export type RequestReviewFreeListingsRequest = {regionCode?: string | undefined}; export type CreateApiMerchantIdFreelistingsprogramRequestreviewArgs = {merchantId: string, body: RequestReviewFreeListingsRequest}; export type CreateApiMerchantIdFreelistingsprogramRequestreviewOptions = {baseUrl?: string | undefined, Oauth2?: string | undefined, Oauth2c?: string | undefined, fetch?: typeof fetch | undefined}; /** * Requests a review of free listings in a specific region. This method deprecated. Use the `MerchantSupportService` to view product and account issues and request a review. * * POST /{merchantId}/freelistingsprogram/requestreview */ export const createApiMerchantIdFreelistingsprogramRequestreview = async (args: CreateApiMerchantIdFreelistingsprogramRequestreviewArgs, options?: CreateApiMerchantIdFreelistingsprogramRequestreviewOptions) => { const {baseUrl = "https://shoppingcontent.googleapis.com/content/v2.1", fetch: fetchFn = fetch, Oauth2, Oauth2c} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (Oauth2 !== undefined) headers.set('authorization', `Bearer ${Oauth2}`) if (Oauth2c !== undefined) headers.set('authorization', `Bearer ${Oauth2c}`) const url = `${baseUrl.replace(/\/+$/, '')}/${encodeURIComponent(String(args.merchantId))}/freelistingsprogram/requestreview${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 undefined };