export type CreateApiV1LocalizationImportEngagementArgs = {body: BodyInit}; export type CreateApiV1LocalizationImportEngagementOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * import XLIFF * * POST /v1/localization/import/engagement */ export const createApiV1LocalizationImportEngagement = async (args: CreateApiV1LocalizationImportEngagementArgs, options?: CreateApiV1LocalizationImportEngagementOptions) => { const {baseUrl = "https://app.aptrinsic.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/localization/import/engagement${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: args.body}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };