export type GetApiV1LocalizationExportContentArgs = {contentId: string, strategy?: string | undefined, translated?: boolean | undefined, trgLang?: string | undefined, type: 'GUIDE' | 'ANNOUNCEMENT' | 'SLIDER' | 'LINK' | 'BOOLEAN_SURVEY' | 'RATING_SURVEY' | 'NPS_SURVEY' | 'CES_SURVEY' | 'MULTIPLE_QUESTION_SURVEY' | 'ARTICLE' | 'KNOWLEDGE_BASE_ARTICLE' | 'CUSTOM_LINK' | 'FUNC_CALL' | 'COMMUNITY', version?: string | undefined}; export type GetApiV1LocalizationExportContentOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * export XLIFF * * GET /v1/localization/export/content */ export const getApiV1LocalizationExportContent = async (args: GetApiV1LocalizationExportContentArgs, options?: GetApiV1LocalizationExportContentOptions) => { const {baseUrl = "https://app.aptrinsic.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.contentId != null) query.append("contentId", String(args.contentId)) if (args.strategy != null) query.append("strategy", String(args.strategy)) if (args.translated != null) query.append("translated", String(args.translated)) if (args.trgLang != null) query.append("trgLang", String(args.trgLang)) if (args.type != null) query.append("type", String(args.type)) if (args.version != null) query.append("version", String(args.version)) const url = `${baseUrl.replace(/\/+$/, '')}/v1/localization/export/content${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };