export type GetApiV1ShopsShopIdFeedbacksExportArgs = {body: {page?: (number | null) | undefined, perPage?: (number | null) | undefined, orderColumn?: ('status' | 'rating' | 'reply' | 'created_at' | 'updated_at' | null) | undefined, orderDirection?: ('asc' | 'desc' | null) | undefined, id?: (string | null) | undefined, statuses?: (Array<'published' | 'disputed' | 'removed'>) | undefined, invoice_id?: (string | null) | undefined, rating?: (number | null) | undefined, invoice_email?: (string | null) | undefined, message_keyword?: (string | null) | undefined, is_automatic?: (boolean | null) | undefined, created_at_start?: (string | null) | undefined, created_at_end?: (string | null) | undefined, reply_keyword?: (string | null) | undefined, has_reply?: (boolean | null) | undefined, product_name?: (string | null) | undefined, variant_name?: (string | null) | undefined, product_id?: (string | null) | undefined, variant_id?: (string | null) | undefined}}; export type GetApiV1ShopsShopIdFeedbacksExportOptions = {baseUrl?: string | undefined, defaultValue?: string | undefined, fetch?: typeof fetch | undefined}; /** * Export Feedbacks * * GET /v1/shops/{shopId}/feedbacks/export */ export const getApiV1ShopsShopIdFeedbacksExport = async (args: GetApiV1ShopsShopIdFeedbacksExportArgs, options?: GetApiV1ShopsShopIdFeedbacksExportOptions) => { const {baseUrl = "https://api.sellauth.com", fetch: fetchFn = fetch, defaultValue} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "text/plain") if (defaultValue !== undefined) headers.set('authorization', `Bearer ${defaultValue}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/shops/${encodeURIComponent(String(args.shopId))}/feedbacks/export${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", 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.text() };