export type CreateApiApiV1PaymentCallbackRelianceTenantOrgIdJobInstanceIdArgs = {tenant: string, orgId: string, jobInstanceId: string}; export type CreateApiApiV1PaymentCallbackRelianceTenantOrgIdJobInstanceIdOptions = {baseUrl?: string | undefined, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /api/v1/payment/callback/reliance/{tenant}/{orgId}/{jobInstanceId} */ export const createApiApiV1PaymentCallbackRelianceTenantOrgIdJobInstanceId = async (args: CreateApiApiV1PaymentCallbackRelianceTenantOrgIdJobInstanceIdArgs, options?: CreateApiApiV1PaymentCallbackRelianceTenantOrgIdJobInstanceIdOptions) => { const {baseUrl = "https://api-docs.gosure.ai", fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/payment/callback/reliance/${encodeURIComponent(String(args.tenant))}/${encodeURIComponent(String(args.orgId))}/${encodeURIComponent(String(args.jobInstanceId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };