export type GroupPaymentMemberDTO = {id?: number | undefined, memberLogin?: string | undefined, mobile?: string | undefined, templateId?: number | undefined, templateName?: string | undefined}; export type GroupPaymentTemplateDTO = {acceptorCode?: string | undefined, description?: string | undefined, id?: number | undefined, members?: Array | undefined, name?: string | undefined, order?: number | undefined, ownerLogin?: string | undefined}; export type CreateApiApiGroupPaymentTemplatesArgs = {body: GroupPaymentTemplateDTO}; export type CreateApiApiGroupPaymentTemplatesOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * createGroupPaymentTemplate * * POST /api/group-payment-templates */ export const createApiApiGroupPaymentTemplates = async (args: CreateApiApiGroupPaymentTemplatesArgs, options: CreateApiApiGroupPaymentTemplatesOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/api/group-payment-templates${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };