// Copyright 2022 Luca Casonato. All rights reserved. MIT license. /** * Content API for Shopping Client for Deno * ======================================== * * Manage your product listings and accounts for Google Shopping * * Docs: https://developers.google.com/shopping-content/v2/ * Source: https://googleapis.deno.dev/v1/content:v2.1.ts */ import { auth, CredentialsClient, GoogleAuth, request } from "/_/base@v1/mod.ts"; export { auth, GoogleAuth }; export type { CredentialsClient }; /** * Manage your product listings and accounts for Google Shopping */ export class Content { #client: CredentialsClient | undefined; #baseUrl: string; constructor(client?: CredentialsClient, baseUrl: string = "https://shoppingcontent.googleapis.com/content/v2.1/") { this.#client = client; this.#baseUrl = baseUrl; } /** * Returns information about the authenticated user. * */ async accountsAuthinfo(): Promise { const url = new URL(`${this.#baseUrl}accounts/authinfo`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeAccountsAuthInfoResponse(data); } /** * Claims the website of a Merchant Center sub-account. Merchant accounts * with approved third-party CSSs aren't required to claim a website. * * @param accountId The ID of the account whose website is claimed. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async accountsClaimwebsite(accountId: bigint, merchantId: bigint, opts: AccountsClaimwebsiteOptions = {}): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts/${ accountId }/claimwebsite`); if (opts.overwrite !== undefined) { url.searchParams.append("overwrite", String(opts.overwrite)); } const data = await request(url.href, { client: this.#client, method: "POST", }); return data as AccountsClaimWebsiteResponse; } /** * Uploads credentials for the Merchant Center account. If credentials * already exist for this Merchant Center account and purpose, this method * updates them. * * @param accountId Required. The merchant id of the account these credentials belong to. */ async accountsCredentialsCreate(accountId: bigint, req: AccountCredentials): Promise { accountId = String(accountId); req = serializeAccountCredentials(req); const url = new URL(`${this.#baseUrl}accounts/${ accountId }/credentials`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeAccountCredentials(data); } /** * Retrieves, inserts, updates, and deletes multiple Merchant Center * (sub-)accounts in a single request. * */ async accountsCustombatch(req: AccountsCustomBatchRequest): Promise { req = serializeAccountsCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}accounts/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeAccountsCustomBatchResponse(data); } /** * Deletes a Merchant Center sub-account. * * @param accountId The ID of the account. * @param merchantId The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account. */ async accountsDelete(accountId: bigint, merchantId: bigint, opts: AccountsDeleteOptions = {}): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts/${ accountId }`); if (opts.force !== undefined) { url.searchParams.append("force", String(opts.force)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Retrieves a Merchant Center account. * * @param accountId The ID of the account. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async accountsGet(accountId: bigint, merchantId: bigint, opts: AccountsGetOptions = {}): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts/${ accountId }`); if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeAccount(data); } /** * Creates a Merchant Center sub-account. * * @param merchantId The ID of the managing account. This must be a multi-client account. */ async accountsInsert(merchantId: bigint, req: Account): Promise { merchantId = String(merchantId); req = serializeAccount(req); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeAccount(data); } /** * Creates a new label, not assigned to any account. * * @param accountId Required. The id of the account this label belongs to. */ async accountsLabelsCreate(accountId: bigint, req: AccountLabel): Promise { accountId = String(accountId); req = serializeAccountLabel(req); const url = new URL(`${this.#baseUrl}accounts/${ accountId }/labels`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeAccountLabel(data); } /** * Deletes a label and removes it from all accounts to which it was assigned. * * @param accountId Required. The id of the account that owns the label. * @param labelId Required. The id of the label to delete. */ async accountsLabelsDelete(accountId: bigint, labelId: bigint): Promise { accountId = String(accountId); labelId = String(labelId); const url = new URL(`${this.#baseUrl}accounts/${ accountId }/labels/${ labelId }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Lists the labels assigned to an account. * * @param accountId Required. The account id for whose labels are to be listed. */ async accountsLabelsList(accountId: bigint, opts: AccountsLabelsListOptions = {}): Promise { accountId = String(accountId); const url = new URL(`${this.#baseUrl}accounts/${ accountId }/labels`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListAccountLabelsResponse(data); } /** * Updates a label. * * @param accountId Required. The id of the account this label belongs to. * @param labelId Required. The id of the label to update. */ async accountsLabelsPatch(accountId: bigint, labelId: bigint, req: AccountLabel): Promise { accountId = String(accountId); labelId = String(labelId); req = serializeAccountLabel(req); const url = new URL(`${this.#baseUrl}accounts/${ accountId }/labels/${ labelId }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeAccountLabel(data); } /** * Performs an action on a link between two Merchant Center accounts, namely * accountId and linkedAccountId. * * @param accountId The ID of the account that should be linked. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async accountsLink(accountId: bigint, merchantId: bigint, req: AccountsLinkRequest): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts/${ accountId }/link`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as AccountsLinkResponse; } /** * Lists the sub-accounts in your Merchant Center account. * * @param merchantId The ID of the managing account. This must be a multi-client account. */ async accountsList(merchantId: bigint, opts: AccountsListOptions = {}): Promise { merchantId = String(merchantId); opts = serializeAccountsListOptions(opts); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts`); if (opts.label !== undefined) { url.searchParams.append("label", String(opts.label)); } if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.name !== undefined) { url.searchParams.append("name", String(opts.name)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.view !== undefined) { url.searchParams.append("view", String(opts.view)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeAccountsListResponse(data); } /** * Returns the list of accounts linked to your Merchant Center account. * * @param accountId The ID of the account for which to list links. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async accountsListlinks(accountId: bigint, merchantId: bigint, opts: AccountsListlinksOptions = {}): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts/${ accountId }/listlinks`); if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as AccountsListLinksResponse; } /** * Request verification code to start phone verification. * * @param accountId Required. The ID of the account. * @param merchantId Required. The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. */ async accountsRequestphoneverification(accountId: bigint, merchantId: bigint, req: RequestPhoneVerificationRequest): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts/${ accountId }/requestphoneverification`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as RequestPhoneVerificationResponse; } /** * Links return carrier to a merchant account. * * @param accountId Required. The Merchant Center Account Id under which the Return Carrier is to be linked. */ async accountsReturncarrierCreate(accountId: bigint, req: AccountReturnCarrier): Promise { accountId = String(accountId); const url = new URL(`${this.#baseUrl}accounts/${ accountId }/returncarrier`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as AccountReturnCarrier; } /** * Delete a return carrier in the merchant account. * * @param accountId Required. The Merchant Center Account Id under which the Return Carrier is to be linked. * @param carrierAccountId Required. The Google-provided unique carrier ID, used to update the resource. */ async accountsReturncarrierDelete(accountId: bigint, carrierAccountId: bigint): Promise { accountId = String(accountId); carrierAccountId = String(carrierAccountId); const url = new URL(`${this.#baseUrl}accounts/${ accountId }/returncarrier/${ carrierAccountId }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Lists available return carriers in the merchant account. * * @param accountId Required. The Merchant Center Account Id under which the Return Carrier is to be linked. */ async accountsReturncarrierList(accountId: bigint): Promise { accountId = String(accountId); const url = new URL(`${this.#baseUrl}accounts/${ accountId }/returncarrier`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListAccountReturnCarrierResponse; } /** * Updates a return carrier in the merchant account. * * @param accountId Required. The Merchant Center Account Id under which the Return Carrier is to be linked. * @param carrierAccountId Required. The Google-provided unique carrier ID, used to update the resource. */ async accountsReturncarrierPatch(accountId: bigint, carrierAccountId: bigint, req: AccountReturnCarrier): Promise { accountId = String(accountId); carrierAccountId = String(carrierAccountId); const url = new URL(`${this.#baseUrl}accounts/${ accountId }/returncarrier/${ carrierAccountId }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return data as AccountReturnCarrier; } /** * Retrieves multiple Merchant Center account statuses in a single request. * */ async accountstatusesCustombatch(req: AccountstatusesCustomBatchRequest): Promise { req = serializeAccountstatusesCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}accountstatuses/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeAccountstatusesCustomBatchResponse(data); } /** * Retrieves the status of a Merchant Center account. No itemLevelIssues are * returned for multi-client accounts. * * @param accountId The ID of the account. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async accountstatusesGet(accountId: bigint, merchantId: bigint, opts: AccountstatusesGetOptions = {}): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accountstatuses/${ accountId }`); if (opts.destinations !== undefined) { url.searchParams.append("destinations", String(opts.destinations)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeAccountStatus(data); } /** * Lists the statuses of the sub-accounts in your Merchant Center account. * * @param merchantId The ID of the managing account. This must be a multi-client account. */ async accountstatusesList(merchantId: bigint, opts: AccountstatusesListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accountstatuses`); if (opts.destinations !== undefined) { url.searchParams.append("destinations", String(opts.destinations)); } if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.name !== undefined) { url.searchParams.append("name", String(opts.name)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeAccountstatusesListResponse(data); } /** * Updates a Merchant Center account. Any fields that are not provided are * deleted from the resource. * * @param accountId The ID of the account. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async accountsUpdate(accountId: bigint, merchantId: bigint, req: Account): Promise { accountId = String(accountId); merchantId = String(merchantId); req = serializeAccount(req); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts/${ accountId }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PUT", body, }); return deserializeAccount(data); } /** * Updates labels that are assigned to the Merchant Center account by CSS * user. * * @param accountId The ID of the account whose labels are updated. * @param merchantId The ID of the managing account. */ async accountsUpdatelabels(accountId: bigint, merchantId: bigint, req: AccountsUpdateLabelsRequest): Promise { accountId = String(accountId); merchantId = String(merchantId); req = serializeAccountsUpdateLabelsRequest(req); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts/${ accountId }/updatelabels`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as AccountsUpdateLabelsResponse; } /** * Validates verification code to verify phone number for the account. If * successful this will overwrite the value of * `accounts.businessinformation.phoneNumber`. Only verified phone number will * replace an existing verified phone number. * * @param accountId Required. The ID of the account. * @param merchantId Required. The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. */ async accountsVerifyphonenumber(accountId: bigint, merchantId: bigint, req: VerifyPhoneNumberRequest): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accounts/${ accountId }/verifyphonenumber`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as VerifyPhoneNumberResponse; } /** * Retrieves and updates tax settings of multiple accounts in a single * request. * */ async accounttaxCustombatch(req: AccounttaxCustomBatchRequest): Promise { req = serializeAccounttaxCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}accounttax/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeAccounttaxCustomBatchResponse(data); } /** * Retrieves the tax settings of the account. * * @param accountId The ID of the account for which to get/update account tax settings. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async accounttaxGet(accountId: bigint, merchantId: bigint): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accounttax/${ accountId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeAccountTax(data); } /** * Lists the tax settings of the sub-accounts in your Merchant Center * account. * * @param merchantId The ID of the managing account. This must be a multi-client account. */ async accounttaxList(merchantId: bigint, opts: AccounttaxListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/accounttax`); if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeAccounttaxListResponse(data); } /** * Updates the tax settings of the account. Any fields that are not provided * are deleted from the resource. * * @param accountId The ID of the account for which to get/update account tax settings. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async accounttaxUpdate(accountId: bigint, merchantId: bigint, req: AccountTax): Promise { accountId = String(accountId); merchantId = String(merchantId); req = serializeAccountTax(req); const url = new URL(`${this.#baseUrl}${ merchantId }/accounttax/${ accountId }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PUT", body, }); return deserializeAccountTax(data); } /** * Uploads a collection to your Merchant Center account. If a collection with * the same collectionId already exists, this method updates that entry. In * each update, the collection is completely replaced by the fields in the * body of the update request. * * @param merchantId Required. The ID of the account that contains the collection. This account cannot be a multi-client account. */ async collectionsCreate(merchantId: bigint, req: Collection): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/collections`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as Collection; } /** * Deletes a collection from your Merchant Center account. * * @param collectionId Required. The collectionId of the collection. CollectionId is the same as the REST ID of the collection. * @param merchantId Required. The ID of the account that contains the collection. This account cannot be a multi-client account. */ async collectionsDelete(collectionId: string, merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/collections/${ collectionId }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Retrieves a collection from your Merchant Center account. * * @param collectionId Required. The REST ID of the collection. * @param merchantId Required. The ID of the account that contains the collection. This account cannot be a multi-client account. */ async collectionsGet(collectionId: string, merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/collections/${ collectionId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as Collection; } /** * Lists the collections in your Merchant Center account. The response might * contain fewer items than specified by page_size. Rely on next_page_token to * determine if there are more items to be requested. * * @param merchantId Required. The ID of the account that contains the collection. This account cannot be a multi-client account. */ async collectionsList(merchantId: bigint, opts: CollectionsListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/collections`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListCollectionsResponse; } /** * Gets the status of a collection from your Merchant Center account. * * @param collectionId Required. The collectionId of the collection. CollectionId is the same as the REST ID of the collection. * @param merchantId Required. The ID of the account that contains the collection. This account cannot be a multi-client account. */ async collectionstatusesGet(collectionId: string, merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/collectionstatuses/${ collectionId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as CollectionStatus; } /** * Lists the statuses of the collections in your Merchant Center account. * * @param merchantId Required. The ID of the account that contains the collection. This account cannot be a multi-client account. */ async collectionstatusesList(merchantId: bigint, opts: CollectionstatusesListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/collectionstatuses`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListCollectionStatusesResponse; } /** * Creates a new conversion source. * * @param merchantId Required. The ID of the account that owns the new conversion source. */ async conversionsourcesCreate(merchantId: bigint, req: ConversionSource): Promise { merchantId = String(merchantId); req = serializeConversionSource(req); const url = new URL(`${this.#baseUrl}${ merchantId }/conversionsources`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeConversionSource(data); } /** * Archives an existing conversion source. It will be recoverable for 30 * days. This archiving behavior is not typical in the Content API and unique * to this service. * * @param conversionSourceId Required. The ID of the conversion source to be deleted. * @param merchantId Required. The ID of the account that owns the new conversion source. */ async conversionsourcesDelete(conversionSourceId: string, merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/conversionsources/${ conversionSourceId }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Fetches a conversion source. * * @param conversionSourceId Required. The REST ID of the collection. * @param merchantId Required. The ID of the account that owns the new conversion source. */ async conversionsourcesGet(conversionSourceId: string, merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/conversionsources/${ conversionSourceId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeConversionSource(data); } /** * Retrieves the list of conversion sources the caller has access to. * * @param merchantId Required. The ID of the account that owns the new conversion source. */ async conversionsourcesList(merchantId: bigint, opts: ConversionsourcesListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/conversionsources`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } if (opts.showDeleted !== undefined) { url.searchParams.append("showDeleted", String(opts.showDeleted)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListConversionSourcesResponse(data); } /** * Updates information of an existing conversion source. * * @param conversionSourceId Required. The ID of the conversion source to be updated. * @param merchantId Required. The ID of the account that owns the new conversion source. */ async conversionsourcesPatch(conversionSourceId: string, merchantId: bigint, req: ConversionSource, opts: ConversionsourcesPatchOptions = {}): Promise { merchantId = String(merchantId); req = serializeConversionSource(req); opts = serializeConversionsourcesPatchOptions(opts); const url = new URL(`${this.#baseUrl}${ merchantId }/conversionsources/${ conversionSourceId }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeConversionSource(data); } /** * Re-enables an archived conversion source. * * @param conversionSourceId Required. The ID of the conversion source to be undeleted. * @param merchantId Required. The ID of the account that owns the new conversion source. */ async conversionsourcesUndelete(conversionSourceId: string, merchantId: bigint, req: UndeleteConversionSourceRequest): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/conversionsources/${ conversionSourceId }:undelete`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); } /** * Retrieves a single CSS domain by ID. * * @param cssDomainId Required. The ID of the CSS domain to return. * @param cssGroupId Required. The ID of the managing account. If this parameter is not the same as [cssDomainId](#cssDomainId), then this ID must be a CSS group ID and `cssDomainId` must be the ID of a CSS domain affiliated with this group. */ async cssesGet(cssDomainId: bigint, cssGroupId: bigint): Promise { cssDomainId = String(cssDomainId); cssGroupId = String(cssGroupId); const url = new URL(`${this.#baseUrl}${ cssGroupId }/csses/${ cssDomainId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeCss(data); } /** * Lists CSS domains affiliated with a CSS group. * * @param cssGroupId Required. The CSS group ID of CSS domains to be listed. */ async cssesList(cssGroupId: bigint, opts: CssesListOptions = {}): Promise { cssGroupId = String(cssGroupId); const url = new URL(`${this.#baseUrl}${ cssGroupId }/csses`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListCssesResponse(data); } /** * Updates labels that are assigned to a CSS domain by its CSS group. * * @param cssDomainId Required. The ID of the updated CSS domain. * @param cssGroupId Required. The CSS group ID of the updated CSS domain. */ async cssesUpdatelabels(cssDomainId: bigint, cssGroupId: bigint, req: LabelIds): Promise { cssDomainId = String(cssDomainId); cssGroupId = String(cssGroupId); req = serializeLabelIds(req); const url = new URL(`${this.#baseUrl}${ cssGroupId }/csses/${ cssDomainId }/updatelabels`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeCss(data); } /** * Deletes, fetches, gets, inserts and updates multiple datafeeds in a single * request. * */ async datafeedsCustombatch(req: DatafeedsCustomBatchRequest): Promise { req = serializeDatafeedsCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}datafeeds/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeDatafeedsCustomBatchResponse(data); } /** * Deletes a datafeed configuration from your Merchant Center account. * * @param datafeedId The ID of the datafeed. * @param merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. */ async datafeedsDelete(datafeedId: bigint, merchantId: bigint): Promise { datafeedId = String(datafeedId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/datafeeds/${ datafeedId }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Invokes a fetch for the datafeed in your Merchant Center account. If you * need to call this method more than once per day, we recommend you use the * [Products * service](https://developers.google.com/shopping-content/reference/rest/v2.1/products) * to update your product data. * * @param datafeedId The ID of the datafeed to be fetched. * @param merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. */ async datafeedsFetchnow(datafeedId: bigint, merchantId: bigint): Promise { datafeedId = String(datafeedId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/datafeeds/${ datafeedId }/fetchNow`); const data = await request(url.href, { client: this.#client, method: "POST", }); return data as DatafeedsFetchNowResponse; } /** * Retrieves a datafeed configuration from your Merchant Center account. * * @param datafeedId The ID of the datafeed. * @param merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. */ async datafeedsGet(datafeedId: bigint, merchantId: bigint): Promise { datafeedId = String(datafeedId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/datafeeds/${ datafeedId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeDatafeed(data); } /** * Registers a datafeed configuration with your Merchant Center account. * * @param merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. */ async datafeedsInsert(merchantId: bigint, req: Datafeed): Promise { merchantId = String(merchantId); req = serializeDatafeed(req); const url = new URL(`${this.#baseUrl}${ merchantId }/datafeeds`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeDatafeed(data); } /** * Lists the configurations for datafeeds in your Merchant Center account. * * @param merchantId The ID of the account that manages the datafeeds. This account cannot be a multi-client account. */ async datafeedsList(merchantId: bigint, opts: DatafeedsListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/datafeeds`); if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeDatafeedsListResponse(data); } /** * Gets multiple Merchant Center datafeed statuses in a single request. * */ async datafeedstatusesCustombatch(req: DatafeedstatusesCustomBatchRequest): Promise { req = serializeDatafeedstatusesCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}datafeedstatuses/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeDatafeedstatusesCustomBatchResponse(data); } /** * Retrieves the status of a datafeed from your Merchant Center account. * * @param datafeedId The ID of the datafeed. * @param merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. */ async datafeedstatusesGet(datafeedId: bigint, merchantId: bigint, opts: DatafeedstatusesGetOptions = {}): Promise { datafeedId = String(datafeedId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/datafeedstatuses/${ datafeedId }`); if (opts.country !== undefined) { url.searchParams.append("country", String(opts.country)); } if (opts.feedLabel !== undefined) { url.searchParams.append("feedLabel", String(opts.feedLabel)); } if (opts.language !== undefined) { url.searchParams.append("language", String(opts.language)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeDatafeedStatus(data); } /** * Lists the statuses of the datafeeds in your Merchant Center account. * * @param merchantId The ID of the account that manages the datafeeds. This account cannot be a multi-client account. */ async datafeedstatusesList(merchantId: bigint, opts: DatafeedstatusesListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/datafeedstatuses`); if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeDatafeedstatusesListResponse(data); } /** * Updates a datafeed configuration of your Merchant Center account. Any * fields that are not provided are deleted from the resource. * * @param datafeedId The ID of the datafeed. * @param merchantId The ID of the account that manages the datafeed. This account cannot be a multi-client account. */ async datafeedsUpdate(datafeedId: bigint, merchantId: bigint, req: Datafeed): Promise { datafeedId = String(datafeedId); merchantId = String(merchantId); req = serializeDatafeed(req); const url = new URL(`${this.#baseUrl}${ merchantId }/datafeeds/${ datafeedId }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PUT", body, }); return deserializeDatafeed(data); } /** * Deletes `Checkout` settings and unenrolls merchant from `Checkout` * program. * * @param merchantId Required. The ID of the account. */ async freelistingsprogramCheckoutsettingsDelete(merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/freelistingsprogram/checkoutsettings`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Gets Checkout settings for the given merchant. This includes information * about review state, enrollment state and URL settings. * * @param merchantId Required. The ID of the account. */ async freelistingsprogramCheckoutsettingsGet(merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/freelistingsprogram/checkoutsettings`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeCheckoutSettings(data); } /** * Enrolls merchant in `Checkout` program. * * @param merchantId Required. The ID of the account. */ async freelistingsprogramCheckoutsettingsInsert(merchantId: bigint, req: InsertCheckoutSettingsRequest): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/freelistingsprogram/checkoutsettings`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeCheckoutSettings(data); } /** * Retrieves the status and review eligibility for the free listing program. * Returns errors and warnings if they require action to resolve, will become * disapprovals, or impact impressions. Use `accountstatuses` to view all * issues for an account. * * @param merchantId Required. The ID of the account. */ async freelistingsprogramGet(merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/freelistingsprogram`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeFreeListingsProgramStatus(data); } /** * 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. * * @param merchantId Required. The ID of the account. */ async freelistingsprogramRequestreview(merchantId: bigint, req: RequestReviewFreeListingsRequest): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/freelistingsprogram/requestreview`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); } /** * Retrieves and/or updates the LIA settings of multiple accounts in a single * request. * */ async liasettingsCustombatch(req: LiasettingsCustomBatchRequest): Promise { req = serializeLiasettingsCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}liasettings/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeLiasettingsCustomBatchResponse(data); } /** * Retrieves the LIA settings of the account. * * @param accountId The ID of the account for which to get or update LIA settings. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async liasettingsGet(accountId: bigint, merchantId: bigint): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/liasettings/${ accountId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeLiaSettings(data); } /** * Retrieves the list of accessible Business Profiles. * * @param accountId The ID of the account for which to retrieve accessible Business Profiles. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async liasettingsGetaccessiblegmbaccounts(accountId: bigint, merchantId: bigint): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/liasettings/${ accountId }/accessiblegmbaccounts`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeLiasettingsGetAccessibleGmbAccountsResponse(data); } /** * Lists the LIA settings of the sub-accounts in your Merchant Center * account. * * @param merchantId The ID of the managing account. This must be a multi-client account. */ async liasettingsList(merchantId: bigint, opts: LiasettingsListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/liasettings`); if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeLiasettingsListResponse(data); } /** * Retrieves the list of POS data providers that have active settings for the * all eiligible countries. * */ async liasettingsListposdataproviders(): Promise { const url = new URL(`${this.#baseUrl}liasettings/posdataproviders`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeLiasettingsListPosDataProvidersResponse(data); } /** * Requests access to a specified Business Profile. * * @param accountId The ID of the account for which Business Profile access is requested. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async liasettingsRequestgmbaccess(accountId: bigint, merchantId: bigint, opts: LiasettingsRequestgmbaccessOptions = {}): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/liasettings/${ accountId }/requestgmbaccess`); if (opts.gmbEmail !== undefined) { url.searchParams.append("gmbEmail", String(opts.gmbEmail)); } const data = await request(url.href, { client: this.#client, method: "POST", }); return data as LiasettingsRequestGmbAccessResponse; } /** * Requests inventory validation for the specified country. * * @param accountId The ID of the account that manages the order. This cannot be a multi-client account. * @param country The country for which inventory validation is requested. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async liasettingsRequestinventoryverification(accountId: bigint, country: string, merchantId: bigint): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/liasettings/${ accountId }/requestinventoryverification/${ country }`); const data = await request(url.href, { client: this.#client, method: "POST", }); return data as LiasettingsRequestInventoryVerificationResponse; } /** * Sets the inventory verification contract for the specified country. * * @param accountId The ID of the account that manages the order. This cannot be a multi-client account. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async liasettingsSetinventoryverificationcontact(accountId: bigint, merchantId: bigint, opts: LiasettingsSetinventoryverificationcontactOptions = {}): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/liasettings/${ accountId }/setinventoryverificationcontact`); if (opts.contactEmail !== undefined) { url.searchParams.append("contactEmail", String(opts.contactEmail)); } if (opts.contactName !== undefined) { url.searchParams.append("contactName", String(opts.contactName)); } if (opts.country !== undefined) { url.searchParams.append("country", String(opts.country)); } if (opts.language !== undefined) { url.searchParams.append("language", String(opts.language)); } const data = await request(url.href, { client: this.#client, method: "POST", }); return data as LiasettingsSetInventoryVerificationContactResponse; } /** * Sets the omnichannel experience for the specified country. Only supported * for merchants whose POS data provider is trusted to enable the * corresponding experience. For more context, see these help articles [about * LFP](https://support.google.com/merchants/answer/7676652) and [how to get * started](https://support.google.com/merchants/answer/7676578) with it. * * @param accountId The ID of the account for which to retrieve accessible Business Profiles. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async liasettingsSetomnichannelexperience(accountId: bigint, merchantId: bigint, opts: LiasettingsSetomnichannelexperienceOptions = {}): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/liasettings/${ accountId }/setomnichannelexperience`); if (opts.country !== undefined) { url.searchParams.append("country", String(opts.country)); } if (opts.lsfType !== undefined) { url.searchParams.append("lsfType", String(opts.lsfType)); } if (opts.pickupTypes !== undefined) { url.searchParams.append("pickupTypes", String(opts.pickupTypes)); } const data = await request(url.href, { client: this.#client, method: "POST", }); return data as LiaOmnichannelExperience; } /** * Sets the POS data provider for the specified country. * * @param accountId The ID of the account for which to retrieve accessible Business Profiles. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async liasettingsSetposdataprovider(accountId: bigint, merchantId: bigint, opts: LiasettingsSetposdataproviderOptions = {}): Promise { accountId = String(accountId); merchantId = String(merchantId); opts = serializeLiasettingsSetposdataproviderOptions(opts); const url = new URL(`${this.#baseUrl}${ merchantId }/liasettings/${ accountId }/setposdataprovider`); if (opts.country !== undefined) { url.searchParams.append("country", String(opts.country)); } if (opts.posDataProviderId !== undefined) { url.searchParams.append("posDataProviderId", String(opts.posDataProviderId)); } if (opts.posExternalAccountId !== undefined) { url.searchParams.append("posExternalAccountId", String(opts.posExternalAccountId)); } const data = await request(url.href, { client: this.#client, method: "POST", }); return data as LiasettingsSetPosDataProviderResponse; } /** * Updates the LIA settings of the account. Any fields that are not provided * are deleted from the resource. * * @param accountId The ID of the account for which to get or update LIA settings. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async liasettingsUpdate(accountId: bigint, merchantId: bigint, req: LiaSettings): Promise { accountId = String(accountId); merchantId = String(merchantId); req = serializeLiaSettings(req); const url = new URL(`${this.#baseUrl}${ merchantId }/liasettings/${ accountId }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PUT", body, }); return deserializeLiaSettings(data); } /** * Updates local inventory for multiple products or stores in a single * request. * */ async localinventoryCustombatch(req: LocalinventoryCustomBatchRequest): Promise { req = serializeLocalinventoryCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}localinventory/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as LocalinventoryCustomBatchResponse; } /** * Updates the local inventory of a product in your Merchant Center account. * * @param merchantId The ID of the account that contains the product. This account cannot be a multi-client account. * @param productId The REST ID of the product for which to update local inventory. */ async localinventoryInsert(merchantId: bigint, productId: string, req: LocalInventory): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/products/${ productId }/localinventory`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as LocalInventory; } /** * Provide a list of merchant's issues with a support content and available * actions. This content and actions are meant to be rendered and shown in * third-party applications. * * @param merchantId Required. The ID of the account to fetch issues for. */ async merchantsupportRenderaccountissues(merchantId: bigint, req: RenderAccountIssuesRequestPayload, opts: MerchantsupportRenderaccountissuesOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/merchantsupport/renderaccountissues`); if (opts.languageCode !== undefined) { url.searchParams.append("languageCode", String(opts.languageCode)); } if (opts.timeZone !== undefined) { url.searchParams.append("timeZone", String(opts.timeZone)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as RenderAccountIssuesResponse; } /** * Provide a list of issues for merchant's product with a support content and * available actions. This content and actions are meant to be rendered and * shown in third-party applications. * * @param merchantId Required. The ID of the account that contains the product. * @param productId Required. The [REST_ID](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.id) of the product to fetch issues for. */ async merchantsupportRenderproductissues(merchantId: bigint, productId: string, req: RenderProductIssuesRequestPayload, opts: MerchantsupportRenderproductissuesOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/merchantsupport/renderproductissues/${ productId }`); if (opts.languageCode !== undefined) { url.searchParams.append("languageCode", String(opts.languageCode)); } if (opts.timeZone !== undefined) { url.searchParams.append("timeZone", String(opts.timeZone)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as RenderProductIssuesResponse; } /** * Start an action. The action can be requested by merchants in third-party * application. Before merchants can request the action, the third-party * application needs to show them action specific content and display a user * input form. The action can be successfully started only once all `required` * inputs are provided. If any `required` input is missing, or invalid value * was provided, the service will return 400 error. Validation errors will * contain Ids for all problematic field together with translated, human * readable error messages that can be shown to the user. * * @param merchantId Required. The ID of the merchant's account. */ async merchantsupportTriggeraction(merchantId: bigint, req: TriggerActionPayload, opts: MerchantsupportTriggeractionOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/merchantsupport/triggeraction`); if (opts.languageCode !== undefined) { url.searchParams.append("languageCode", String(opts.languageCode)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as TriggerActionResponse; } /** * Creates new order tracking signal. * * @param merchantId The ID of the merchant for which the order signal is created. */ async ordertrackingsignalsCreate(merchantId: bigint, req: OrderTrackingSignal): Promise { merchantId = String(merchantId); req = serializeOrderTrackingSignal(req); const url = new URL(`${this.#baseUrl}${ merchantId }/ordertrackingsignals`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeOrderTrackingSignal(data); } /** * Batches multiple POS-related calls in a single request. * */ async posCustombatch(req: PosCustomBatchRequest): Promise { req = serializePosCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}pos/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePosCustomBatchResponse(data); } /** * Deletes a store for the given merchant. * * @param merchantId The ID of the POS or inventory data provider. * @param storeCode A store code that is unique per merchant. * @param targetMerchantId The ID of the target merchant. */ async posDelete(merchantId: bigint, storeCode: string, targetMerchantId: bigint): Promise { merchantId = String(merchantId); targetMerchantId = String(targetMerchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/pos/${ targetMerchantId }/store/${ storeCode }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Retrieves information about the given store. * * @param merchantId The ID of the POS or inventory data provider. * @param storeCode A store code that is unique per merchant. * @param targetMerchantId The ID of the target merchant. */ async posGet(merchantId: bigint, storeCode: string, targetMerchantId: bigint): Promise { merchantId = String(merchantId); targetMerchantId = String(targetMerchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/pos/${ targetMerchantId }/store/${ storeCode }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as PosStore; } /** * Creates a store for the given merchant. * * @param merchantId The ID of the POS or inventory data provider. * @param targetMerchantId The ID of the target merchant. */ async posInsert(merchantId: bigint, targetMerchantId: bigint, req: PosStore): Promise { merchantId = String(merchantId); targetMerchantId = String(targetMerchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/pos/${ targetMerchantId }/store`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as PosStore; } /** * Submit inventory for the given merchant. * * @param merchantId The ID of the POS or inventory data provider. * @param targetMerchantId The ID of the target merchant. */ async posInventory(merchantId: bigint, targetMerchantId: bigint, req: PosInventoryRequest): Promise { merchantId = String(merchantId); targetMerchantId = String(targetMerchantId); req = serializePosInventoryRequest(req); const url = new URL(`${this.#baseUrl}${ merchantId }/pos/${ targetMerchantId }/inventory`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePosInventoryResponse(data); } /** * Lists the stores of the target merchant. * * @param merchantId The ID of the POS or inventory data provider. * @param targetMerchantId The ID of the target merchant. */ async posList(merchantId: bigint, targetMerchantId: bigint): Promise { merchantId = String(merchantId); targetMerchantId = String(targetMerchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/pos/${ targetMerchantId }/store`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as PosListResponse; } /** * Submit a sale event for the given merchant. * * @param merchantId The ID of the POS or inventory data provider. * @param targetMerchantId The ID of the target merchant. */ async posSale(merchantId: bigint, targetMerchantId: bigint, req: PosSaleRequest): Promise { merchantId = String(merchantId); targetMerchantId = String(targetMerchantId); req = serializePosSaleRequest(req); const url = new URL(`${this.#baseUrl}${ merchantId }/pos/${ targetMerchantId }/sale`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePosSaleResponse(data); } /** * Creates or updates the delivery time of a product. * * @param merchantId The Google merchant ID of the account that contains the product. This account cannot be a multi-client account. */ async productdeliverytimeCreate(merchantId: bigint, req: ProductDeliveryTime): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/productdeliverytime`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as ProductDeliveryTime; } /** * Deletes the delivery time of a product. * * @param merchantId Required. The Google merchant ID of the account that contains the product. This account cannot be a multi-client account. * @param productId Required. The Content API ID of the product, in the form `channel:contentLanguage:targetCountry:offerId`. */ async productdeliverytimeDelete(merchantId: bigint, productId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/productdeliverytime/${ productId }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Gets `productDeliveryTime` by `productId`. * * @param merchantId Required. The Google merchant ID of the account that contains the product. This account cannot be a multi-client account. * @param productId Required. The Content API ID of the product, in the form `channel:contentLanguage:targetCountry:offerId`. */ async productdeliverytimeGet(merchantId: bigint, productId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/productdeliverytime/${ productId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ProductDeliveryTime; } /** * Retrieves, inserts, and deletes multiple products in a single request. * */ async productsCustombatch(req: ProductsCustomBatchRequest): Promise { req = serializeProductsCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}products/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeProductsCustomBatchResponse(data); } /** * Deletes a product from your Merchant Center account. * * @param merchantId The ID of the account that contains the product. This account cannot be a multi-client account. * @param productId The REST ID of the product. */ async productsDelete(merchantId: bigint, productId: string, opts: ProductsDeleteOptions = {}): Promise { merchantId = String(merchantId); opts = serializeProductsDeleteOptions(opts); const url = new URL(`${this.#baseUrl}${ merchantId }/products/${ productId }`); if (opts.feedId !== undefined) { url.searchParams.append("feedId", String(opts.feedId)); } const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Retrieves a product from your Merchant Center account. * * @param merchantId The ID of the account that contains the product. This account cannot be a multi-client account. * @param productId The REST ID of the product. */ async productsGet(merchantId: bigint, productId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/products/${ productId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeProduct(data); } /** * Uploads a product to your Merchant Center account. If an item with the * same channel, contentLanguage, offerId, and targetCountry already exists, * this method updates that entry. * * @param merchantId The ID of the account that contains the product. This account cannot be a multi-client account. */ async productsInsert(merchantId: bigint, req: Product, opts: ProductsInsertOptions = {}): Promise { merchantId = String(merchantId); req = serializeProduct(req); opts = serializeProductsInsertOptions(opts); const url = new URL(`${this.#baseUrl}${ merchantId }/products`); if (opts.feedId !== undefined) { url.searchParams.append("feedId", String(opts.feedId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeProduct(data); } /** * Lists the products in your Merchant Center account. The response might * contain fewer items than specified by maxResults. Rely on nextPageToken to * determine if there are more items to be requested. * * @param merchantId The ID of the account that contains the products. This account cannot be a multi-client account. */ async productsList(merchantId: bigint, opts: ProductsListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/products`); if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeProductsListResponse(data); } /** * Gets the statuses of multiple products in a single request. * */ async productstatusesCustombatch(req: ProductstatusesCustomBatchRequest): Promise { req = serializeProductstatusesCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}productstatuses/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as ProductstatusesCustomBatchResponse; } /** * Gets the status of a product from your Merchant Center account. * * @param merchantId The ID of the account that contains the product. This account cannot be a multi-client account. * @param productId The REST ID of the product. */ async productstatusesGet(merchantId: bigint, productId: string, opts: ProductstatusesGetOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/productstatuses/${ productId }`); if (opts.destinations !== undefined) { url.searchParams.append("destinations", String(opts.destinations)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ProductStatus; } /** * Lists the statuses of the products in your Merchant Center account. * * @param merchantId The ID of the account that contains the products. This account cannot be a multi-client account. */ async productstatusesList(merchantId: bigint, opts: ProductstatusesListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/productstatuses`); if (opts.destinations !== undefined) { url.searchParams.append("destinations", String(opts.destinations)); } if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ProductstatusesListResponse; } /** * Updates an existing product in your Merchant Center account. Only updates * attributes provided in the request. * * @param merchantId The ID of the account that contains the product. This account cannot be a multi-client account. * @param productId The REST ID of the product for which to update. */ async productsUpdate(merchantId: bigint, productId: string, req: Product, opts: ProductsUpdateOptions = {}): Promise { merchantId = String(merchantId); req = serializeProduct(req); opts = serializeProductsUpdateOptions(opts); const url = new URL(`${this.#baseUrl}${ merchantId }/products/${ productId }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeProduct(data); } /** * Inserts a promotion for your Merchant Center account. If the promotion * already exists, then it updates the promotion instead. To [end or delete] * (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) * a promotion update the time period of the promotion to a time that has * already passed. * * @param merchantId Required. The ID of the account that contains the collection. */ async promotionsCreate(merchantId: bigint, req: Promotion): Promise { merchantId = String(merchantId); req = serializePromotion(req); const url = new URL(`${this.#baseUrl}${ merchantId }/promotions`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializePromotion(data); } /** * Retrieves a promotion from your Merchant Center account. * * @param id Required. REST ID of the promotion to retrieve. * @param merchantId Required. The ID of the account that contains the collection. */ async promotionsGet(id: string, merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/promotions/${ id }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializePromotion(data); } /** * List all promotions from your Merchant Center account. * * @param merchantId Required. The ID of the account that contains the collection. */ async promotionsList(merchantId: bigint, opts: PromotionsListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/promotions`); if (opts.countryCode !== undefined) { url.searchParams.append("countryCode", String(opts.countryCode)); } if (opts.languageCode !== undefined) { url.searchParams.append("languageCode", String(opts.languageCode)); } if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListPromotionResponse(data); } /** * Retrieves a Merchant Center account's pubsub notification settings. * * @param merchantId The ID of the account for which to get pubsub notification settings. */ async pubsubnotificationsettingsGet(merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/pubsubnotificationsettings`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as PubsubNotificationSettings; } /** * Register a Merchant Center account for pubsub notifications. Note that * cloud topic name shouldn't be provided as part of the request. * * @param merchantId The ID of the account. */ async pubsubnotificationsettingsUpdate(merchantId: bigint, req: PubsubNotificationSettings): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/pubsubnotificationsettings`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PUT", body, }); return data as PubsubNotificationSettings; } /** * Lists the daily call quota and usage per method for your Merchant Center * account. * * @param merchantId Required. The ID of the account that has quota. This account must be an admin. */ async quotasList(merchantId: bigint, opts: QuotasListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/quotas`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ListMethodQuotasResponse; } /** * Generates recommendations for a merchant. * * @param merchantId Required. The ID of the account to fetch recommendations for. */ async recommendationsGenerate(merchantId: bigint, opts: RecommendationsGenerateOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/recommendations/generate`); if (opts.allowedTag !== undefined) { url.searchParams.append("allowedTag", String(opts.allowedTag)); } if (opts.languageCode !== undefined) { url.searchParams.append("languageCode", String(opts.languageCode)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as GenerateRecommendationsResponse; } /** * Reports an interaction on a recommendation for a merchant. * * @param merchantId Required. The ID of the account that wants to report an interaction. */ async recommendationsReportInteraction(merchantId: bigint, req: ReportInteractionRequest): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/recommendations/reportInteraction`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); } /** * Updates regional inventory for multiple products or regions in a single * request. * */ async regionalinventoryCustombatch(req: RegionalinventoryCustomBatchRequest): Promise { req = serializeRegionalinventoryCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}regionalinventory/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as RegionalinventoryCustomBatchResponse; } /** * Updates the regional inventory of a product in your Merchant Center * account. If a regional inventory with the same region ID already exists, * this method updates that entry. * * @param merchantId The ID of the account that contains the product. This account cannot be a multi-client account. * @param productId The REST ID of the product for which to update the regional inventory. */ async regionalinventoryInsert(merchantId: bigint, productId: string, req: RegionalInventory): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/products/${ productId }/regionalinventory`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as RegionalInventory; } /** * Creates a region definition in your Merchant Center account. * * @param merchantId Required. The id of the merchant for which to create region definition. */ async regionsCreate(merchantId: bigint, req: Region, opts: RegionsCreateOptions = {}): Promise { merchantId = String(merchantId); req = serializeRegion(req); const url = new URL(`${this.#baseUrl}${ merchantId }/regions`); if (opts.regionId !== undefined) { url.searchParams.append("regionId", String(opts.regionId)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeRegion(data); } /** * Deletes a region definition from your Merchant Center account. * * @param merchantId Required. The id of the merchant for which to delete region definition. * @param regionId Required. The id of the region to delete. */ async regionsDelete(merchantId: bigint, regionId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/regions/${ regionId }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Retrieves a region defined in your Merchant Center account. * * @param merchantId Required. The id of the merchant for which to retrieve region definition. * @param regionId Required. The id of the region to retrieve. */ async regionsGet(merchantId: bigint, regionId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/regions/${ regionId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeRegion(data); } /** * Lists the regions in your Merchant Center account. * * @param merchantId Required. The id of the merchant for which to list region definitions. */ async regionsList(merchantId: bigint, opts: RegionsListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/regions`); if (opts.pageSize !== undefined) { url.searchParams.append("pageSize", String(opts.pageSize)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListRegionsResponse(data); } /** * Updates a region definition in your Merchant Center account. * * @param merchantId Required. The id of the merchant for which to update region definition. * @param regionId Required. The id of the region to update. */ async regionsPatch(merchantId: bigint, regionId: string, req: Region, opts: RegionsPatchOptions = {}): Promise { merchantId = String(merchantId); req = serializeRegion(req); opts = serializeRegionsPatchOptions(opts); const url = new URL(`${this.#baseUrl}${ merchantId }/regions/${ regionId }`); if (opts.updateMask !== undefined) { url.searchParams.append("updateMask", String(opts.updateMask)); } const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeRegion(data); } /** * Retrieves merchant performance metrics matching the search query and * optionally segmented by selected dimensions. * * @param merchantId Required. Id of the merchant making the call. Must be a standalone account or an MCA subaccount. */ async reportsSearch(merchantId: bigint, req: SearchRequest): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/reports/search`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeSearchResponse(data); } /** * Batches multiple return address related calls in a single request. * */ async returnaddressCustombatch(req: ReturnaddressCustomBatchRequest): Promise { req = serializeReturnaddressCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}returnaddress/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as ReturnaddressCustomBatchResponse; } /** * Deletes a return address for the given Merchant Center account. * * @param merchantId The Merchant Center account from which to delete the given return address. * @param returnAddressId Return address ID generated by Google. */ async returnaddressDelete(merchantId: bigint, returnAddressId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/returnaddress/${ returnAddressId }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Gets a return address of the Merchant Center account. * * @param merchantId The Merchant Center account to get a return address for. * @param returnAddressId Return address ID generated by Google. */ async returnaddressGet(merchantId: bigint, returnAddressId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/returnaddress/${ returnAddressId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ReturnAddress; } /** * Inserts a return address for the Merchant Center account. * * @param merchantId The Merchant Center account to insert a return address for. */ async returnaddressInsert(merchantId: bigint, req: ReturnAddress): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/returnaddress`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return data as ReturnAddress; } /** * Lists the return addresses of the Merchant Center account. * * @param merchantId The Merchant Center account to list return addresses for. */ async returnaddressList(merchantId: bigint, opts: ReturnaddressListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/returnaddress`); if (opts.country !== undefined) { url.searchParams.append("country", String(opts.country)); } if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ReturnaddressListResponse; } /** * Batches multiple return policy related calls in a single request. * */ async returnpolicyCustombatch(req: ReturnpolicyCustomBatchRequest): Promise { req = serializeReturnpolicyCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}returnpolicy/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeReturnpolicyCustomBatchResponse(data); } /** * Deletes a return policy for the given Merchant Center account. * * @param merchantId The Merchant Center account from which to delete the given return policy. * @param returnPolicyId Return policy ID generated by Google. */ async returnpolicyDelete(merchantId: bigint, returnPolicyId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/returnpolicy/${ returnPolicyId }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Gets a return policy of the Merchant Center account. * * @param merchantId The Merchant Center account to get a return policy for. * @param returnPolicyId Return policy ID generated by Google. */ async returnpolicyGet(merchantId: bigint, returnPolicyId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/returnpolicy/${ returnPolicyId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeReturnPolicy(data); } /** * Inserts a return policy for the Merchant Center account. * * @param merchantId The Merchant Center account to insert a return policy for. */ async returnpolicyInsert(merchantId: bigint, req: ReturnPolicy): Promise { merchantId = String(merchantId); req = serializeReturnPolicy(req); const url = new URL(`${this.#baseUrl}${ merchantId }/returnpolicy`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeReturnPolicy(data); } /** * Lists the return policies of the Merchant Center account. * * @param merchantId The Merchant Center account to list return policies for. */ async returnpolicyList(merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/returnpolicy`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeReturnpolicyListResponse(data); } /** * Creates a new return policy. * * @param merchantId Required. The id of the merchant for which to retrieve the return policy online object. */ async returnpolicyonlineCreate(merchantId: bigint, req: ReturnPolicyOnline): Promise { merchantId = String(merchantId); req = serializeReturnPolicyOnline(req); const url = new URL(`${this.#baseUrl}${ merchantId }/returnpolicyonline`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeReturnPolicyOnline(data); } /** * Deletes an existing return policy. * * @param merchantId Required. The id of the merchant for which to retrieve the return policy online object. * @param returnPolicyId Required. The id of the return policy to delete. */ async returnpolicyonlineDelete(merchantId: bigint, returnPolicyId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/returnpolicyonline/${ returnPolicyId }`); const data = await request(url.href, { client: this.#client, method: "DELETE", }); } /** * Gets an existing return policy. * * @param merchantId Required. The id of the merchant for which to retrieve the return policy online object. * @param returnPolicyId Required. The id of the return policy to retrieve. */ async returnpolicyonlineGet(merchantId: bigint, returnPolicyId: string): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/returnpolicyonline/${ returnPolicyId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeReturnPolicyOnline(data); } /** * Lists all existing return policies. * * @param merchantId Required. The id of the merchant for which to retrieve the return policy online object. */ async returnpolicyonlineList(merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/returnpolicyonline`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeListReturnPolicyOnlineResponse(data); } /** * Updates an existing return policy. * * @param merchantId Required. The id of the merchant for which to retrieve the return policy online object. * @param returnPolicyId Required. The id of the return policy to update. */ async returnpolicyonlinePatch(merchantId: bigint, returnPolicyId: string, req: ReturnPolicyOnline): Promise { merchantId = String(merchantId); req = serializeReturnPolicyOnline(req); const url = new URL(`${this.#baseUrl}${ merchantId }/returnpolicyonline/${ returnPolicyId }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PATCH", body, }); return deserializeReturnPolicyOnline(data); } /** * Retrieves and updates the shipping settings of multiple accounts in a * single request. * */ async shippingsettingsCustombatch(req: ShippingsettingsCustomBatchRequest): Promise { req = serializeShippingsettingsCustomBatchRequest(req); const url = new URL(`${this.#baseUrl}shippingsettings/batch`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); return deserializeShippingsettingsCustomBatchResponse(data); } /** * Retrieves the shipping settings of the account. * * @param accountId The ID of the account for which to get/update shipping settings. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async shippingsettingsGet(accountId: bigint, merchantId: bigint): Promise { accountId = String(accountId); merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/shippingsettings/${ accountId }`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeShippingSettings(data); } /** * Retrieves supported carriers and carrier services for an account. * * @param merchantId The ID of the account for which to retrieve the supported carriers. */ async shippingsettingsGetsupportedcarriers(merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/supportedCarriers`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ShippingsettingsGetSupportedCarriersResponse; } /** * Retrieves supported holidays for an account. * * @param merchantId The ID of the account for which to retrieve the supported holidays. */ async shippingsettingsGetsupportedholidays(merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/supportedHolidays`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeShippingsettingsGetSupportedHolidaysResponse(data); } /** * Retrieves supported pickup services for an account. * * @param merchantId The ID of the account for which to retrieve the supported pickup services. */ async shippingsettingsGetsupportedpickupservices(merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/supportedPickupServices`); const data = await request(url.href, { client: this.#client, method: "GET", }); return data as ShippingsettingsGetSupportedPickupServicesResponse; } /** * Lists the shipping settings of the sub-accounts in your Merchant Center * account. * * @param merchantId The ID of the managing account. This must be a multi-client account. */ async shippingsettingsList(merchantId: bigint, opts: ShippingsettingsListOptions = {}): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/shippingsettings`); if (opts.maxResults !== undefined) { url.searchParams.append("maxResults", String(opts.maxResults)); } if (opts.pageToken !== undefined) { url.searchParams.append("pageToken", String(opts.pageToken)); } const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeShippingsettingsListResponse(data); } /** * Updates the shipping settings of the account. Any fields that are not * provided are deleted from the resource. * * @param accountId The ID of the account for which to get/update shipping settings. * @param merchantId The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account. */ async shippingsettingsUpdate(accountId: bigint, merchantId: bigint, req: ShippingSettings): Promise { accountId = String(accountId); merchantId = String(merchantId); req = serializeShippingSettings(req); const url = new URL(`${this.#baseUrl}${ merchantId }/shippingsettings/${ accountId }`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "PUT", body, }); return deserializeShippingSettings(data); } /** * Retrieves the status and review eligibility for the Shopping Ads program. * Returns errors and warnings if they require action to resolve, will become * disapprovals, or impact impressions. Use `accountstatuses` to view all * issues for an account. * * @param merchantId Required. The ID of the account. */ async shoppingadsprogramGet(merchantId: bigint): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/shoppingadsprogram`); const data = await request(url.href, { client: this.#client, method: "GET", }); return deserializeShoppingAdsProgramStatus(data); } /** * Requests a review of Shopping ads in a specific region. This method * deprecated. Use the `MerchantSupportService` to view product and account * issues and request a review. * * @param merchantId Required. The ID of the account. */ async shoppingadsprogramRequestreview(merchantId: bigint, req: RequestReviewShoppingAdsRequest): Promise { merchantId = String(merchantId); const url = new URL(`${this.#baseUrl}${ merchantId }/shoppingadsprogram/requestreview`); const body = JSON.stringify(req); const data = await request(url.href, { client: this.#client, method: "POST", body, }); } } /** * Account data. After the creation of a new account it may take a few minutes * before it's fully operational. The methods delete, insert, and update require * the admin role. */ export interface Account { /** * Output only. How the account is managed. Acceptable values are: - * "`manual`" - "`automatic`" */ readonly accountManagement?: string; /** * Linked Ads accounts that are active or pending approval. To create a new * link request, add a new link with status `active` to the list. It will * remain in a `pending` state until approved or rejected either in the Ads * interface or through the Google Ads API. To delete an active link, or to * cancel a link request, remove it from the list. */ adsLinks?: AccountAdsLink[]; /** * Indicates whether the merchant sells adult content. */ adultContent?: boolean; /** * The automatic improvements of the account can be used to automatically * update items, improve images and shipping. Each section inside * AutomaticImprovements is updated separately. */ automaticImprovements?: AccountAutomaticImprovements; /** * Automatically created label IDs that are assigned to the account by CSS * Center. */ automaticLabelIds?: bigint[]; /** * The business identity attributes can be used to self-declare attributes * that let customers know more about your business. */ businessIdentity?: AccountBusinessIdentity; /** * The business information of the account. */ businessInformation?: AccountBusinessInformation; /** * Settings for conversion tracking. */ conversionSettings?: AccountConversionSettings; /** * ID of CSS the account belongs to. */ cssId?: bigint; /** * The Business Profile which is linked or in the process of being linked * with the Merchant Center account. */ googleMyBusinessLink?: AccountGoogleMyBusinessLink; /** * Required. 64-bit Merchant Center account ID. */ id?: bigint; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#account`". */ kind?: string; /** * Manually created label IDs that are assigned to the account by CSS. */ labelIds?: bigint[]; /** * Required. Display name for the account. */ name?: string; /** * Client-specific, locally-unique, internal ID for the child account. */ sellerId?: string; /** * Users with access to the account. Every account (except for subaccounts) * must have at least one admin user. */ users?: AccountUser[]; /** * The merchant's website. */ websiteUrl?: string; /** * Linked YouTube channels that are active or pending approval. To create a * new link request, add a new link with status `active` to the list. It will * remain in a `pending` state until approved or rejected in the YT Creator * Studio interface. To delete an active link, or to cancel a link request, * remove it from the list. */ youtubeChannelLinks?: AccountYouTubeChannelLink[]; } function serializeAccount(data: any): Account { return { ...data, adsLinks: data["adsLinks"] !== undefined ? data["adsLinks"].map((item: any) => (serializeAccountAdsLink(item))) : undefined, automaticLabelIds: data["automaticLabelIds"] !== undefined ? data["automaticLabelIds"].map((item: any) => (String(item))) : undefined, cssId: data["cssId"] !== undefined ? String(data["cssId"]) : undefined, id: data["id"] !== undefined ? String(data["id"]) : undefined, labelIds: data["labelIds"] !== undefined ? data["labelIds"].map((item: any) => (String(item))) : undefined, }; } function deserializeAccount(data: any): Account { return { ...data, adsLinks: data["adsLinks"] !== undefined ? data["adsLinks"].map((item: any) => (deserializeAccountAdsLink(item))) : undefined, automaticLabelIds: data["automaticLabelIds"] !== undefined ? data["automaticLabelIds"].map((item: any) => (BigInt(item))) : undefined, cssId: data["cssId"] !== undefined ? BigInt(data["cssId"]) : undefined, id: data["id"] !== undefined ? BigInt(data["id"]) : undefined, labelIds: data["labelIds"] !== undefined ? data["labelIds"].map((item: any) => (BigInt(item))) : undefined, }; } export interface AccountAddress { /** * CLDR country code (for example, "US"). All MCA sub-accounts inherit the * country of their parent MCA by default, however the country can be updated * for individual sub-accounts. */ country?: string; /** * City, town or commune. May also include dependent localities or * sublocalities (for example, neighborhoods or suburbs). */ locality?: string; /** * Postal code or ZIP (for example, "94043"). */ postalCode?: string; /** * Top-level administrative subdivision of the country. For example, a state * like California ("CA") or a province like Quebec ("QC"). */ region?: string; /** * Street-level part of the address. Use `\n` to add a second line. */ streetAddress?: string; } export interface AccountAdsLink { /** * Customer ID of the Ads account. */ adsId?: bigint; /** * Status of the link between this Merchant Center account and the Ads * account. Upon retrieval, it represents the actual status of the link and * can be either `active` if it was approved in Google Ads or `pending` if * it's pending approval. Upon insertion, it represents the *intended* status * of the link. Re-uploading a link with status `active` when it's still * pending or with status `pending` when it's already active will have no * effect: the status will remain unchanged. Re-uploading a link with * deprecated status `inactive` is equivalent to not submitting the link at * all and will delete the link if it was active or cancel the link request if * it was pending. Acceptable values are: - "`active`" - "`pending`" */ status?: string; } function serializeAccountAdsLink(data: any): AccountAdsLink { return { ...data, adsId: data["adsId"] !== undefined ? String(data["adsId"]) : undefined, }; } function deserializeAccountAdsLink(data: any): AccountAdsLink { return { ...data, adsId: data["adsId"] !== undefined ? BigInt(data["adsId"]) : undefined, }; } /** * The automatic improvements of the account can be used to automatically * update items, improve images and shipping. */ export interface AccountAutomaticImprovements { /** * This improvement will attempt to automatically correct submitted images if * they don't meet the [image * requirements](https://support.google.com/merchants/answer/6324350), for * example, removing overlays. If successful, the image will be replaced and * approved. This improvement is only applied to images of disapproved offers. * For more information see: [Automatic image * improvements](https://support.google.com/merchants/answer/9242973) This * field is only updated (cleared) if provided. */ imageImprovements?: AccountImageImprovements; /** * Turning on [item * updates](https://support.google.com/merchants/answer/3246284) allows Google * to automatically update items for you. When item updates are on, Google * uses the structured data markup on the website and advanced data extractors * to update the price and availability of the items. When the item updates * are off, items with mismatched data aren't shown. This field is only * updated (cleared) if provided. */ itemUpdates?: AccountItemUpdates; /** * Not available for MCAs * [accounts](https://support.google.com/merchants/answer/188487). By turning * on [automatic shipping * improvements](https://support.google.com/merchants/answer/10027038), you * are allowing Google to improve the accuracy of your delivery times shown to * shoppers using Google. More accurate delivery times, especially when * faster, typically lead to better conversion rates. Google will improve your * estimated delivery times based on various factors: - Delivery address of an * order - Current handling time and shipping time settings - Estimated * weekdays or business days - Parcel tracking data This field is only updated * (cleared) if provided. */ shippingImprovements?: AccountShippingImprovements; } /** * The [business identity * attributes](https://support.google.com/merchants/answer/10342414) can be used * to self-declare attributes that let customers know more about your business. */ export interface AccountBusinessIdentity { /** * Specifies whether the business identifies itself as being black-owned. * This optional field is only available for merchants with a business country * set to "US". This field is not allowed for marketplaces or marketplace * sellers. */ blackOwned?: AccountIdentityType; /** * Required. By setting this field, your business may be included in * promotions for all the selected attributes. If you clear this option, it * won't affect your identification with any of the attributes. For this field * to be set, the merchant must self identify with at least one of the * `AccountIdentityType`. If none are included, the request will be considered * invalid. */ includeForPromotions?: boolean; /** * Specifies whether the business identifies itself as being latino-owned. * This optional field is only available for merchants with a business country * set to "US". This field is not allowed for marketplaces or marketplace * sellers. */ latinoOwned?: AccountIdentityType; /** * Specifies whether the business identifies itself as a small business. This * optional field is only available for merchants with a business country set * to "US". It is also not allowed for marketplaces, but it is allowed to * marketplace sellers. */ smallBusiness?: AccountIdentityType; /** * Specifies whether the business identifies itself as being veteran-owned. * This optional field is only available for merchants with a business country * set to "US". This field is not allowed for marketplaces or marketplace * sellers. */ veteranOwned?: AccountIdentityType; /** * Specifies whether the business identifies itself as being women-owned. * This optional field is only available for merchants with a business country * set to "US". This field is not allowed for marketplaces or marketplace * sellers. */ womenOwned?: AccountIdentityType; } export interface AccountBusinessInformation { /** * The address of the business. Use `\n` to add a second address line. */ address?: AccountAddress; /** * The customer service information of the business. */ customerService?: AccountCustomerService; /** * The 10-digit [Korean business registration * number](https://support.google.com/merchants/answer/9037766) separated with * dashes in the format: XXX-XX-XXXXX. This field will only be updated if * explicitly set. */ koreanBusinessRegistrationNumber?: string; /** * The phone number of the business in * [E.164](https://en.wikipedia.org/wiki/E.164) format. This can only be * updated if a verified phone number is not already set. To replace a * verified phone number use the `Accounts.requestphoneverification` and * `Accounts.verifyphonenumber`. */ phoneNumber?: string; /** * Verification status of the phone number of the business. This status is * read only and can be updated only by successful phone verification. * Acceptable values are: - "`verified`" - "`unverified`" */ phoneVerificationStatus?: string; } /** * Settings for conversion tracking. */ export interface AccountConversionSettings { /** * When enabled, free listing URLs have a parameter to enable conversion * tracking for products owned by the current merchant account. See * [auto-tagging](https://support.google.com/merchants/answer/11127659). */ freeListingsAutoTaggingEnabled?: boolean; } /** * Credentials allowing Google to call a partner's API on behalf of a merchant. */ export interface AccountCredentials { /** * An OAuth access token. */ accessToken?: string; /** * The amount of time, in seconds, after which the access token is no longer * valid. */ expiresIn?: bigint; /** * Indicates to Google how Google should use these OAuth tokens. */ purpose?: | "ACCOUNT_CREDENTIALS_PURPOSE_UNSPECIFIED" | "SHOPIFY_ORDER_MANAGEMENT" | "SHOPIFY_INTEGRATION"; } function serializeAccountCredentials(data: any): AccountCredentials { return { ...data, expiresIn: data["expiresIn"] !== undefined ? String(data["expiresIn"]) : undefined, }; } function deserializeAccountCredentials(data: any): AccountCredentials { return { ...data, expiresIn: data["expiresIn"] !== undefined ? BigInt(data["expiresIn"]) : undefined, }; } export interface AccountCustomerService { /** * Customer service email. */ email?: string; /** * Customer service phone number. */ phoneNumber?: string; /** * Customer service URL. */ url?: string; } export interface AccountGoogleMyBusinessLink { /** * The ID of the Business Profile. If this is provided, then `gmbEmail` is * ignored. The value of this field should match the `accountId` used by the * Business Profile API. */ gmbAccountId?: string; /** * The Business Profile email address of a specific account within a Business * Profile. A sample account within a Business Profile could be a business * account with set of locations, managed under the Business Profile. */ gmbEmail?: string; /** * Status of the link between this Merchant Center account and the Business * Profile. Acceptable values are: - "`active`" - "`pending`" */ status?: string; } export interface AccountIdentifier { /** * The aggregator ID, set for aggregators and subaccounts (in that case, it * represents the aggregator of the subaccount). */ aggregatorId?: bigint; /** * The merchant account ID, set for individual accounts and subaccounts. */ merchantId?: bigint; } function serializeAccountIdentifier(data: any): AccountIdentifier { return { ...data, aggregatorId: data["aggregatorId"] !== undefined ? String(data["aggregatorId"]) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeAccountIdentifier(data: any): AccountIdentifier { return { ...data, aggregatorId: data["aggregatorId"] !== undefined ? BigInt(data["aggregatorId"]) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } /** * The account identity type used to specify attributes. */ export interface AccountIdentityType { /** * Optional. Indicates that the business identifies itself with a given * identity type. Setting this field does not automatically mean eligibility * for promotions. */ selfIdentified?: boolean; } /** * This improvement will attempt to automatically correct submitted images if * they don't meet the [image * requirements](https://support.google.com/merchants/answer/6324350), for * example, removing overlays. If successful, the image will be replaced and * approved. This improvement is only applied to images of disapproved offers. * For more information see: [Automatic image * improvements](https://support.google.com/merchants/answer/9242973) */ export interface AccountImageImprovements { /** * Determines how the images should be automatically updated. If this field * is not present, then the settings will be deleted. If there are no settings * for subaccount, they are inherited from aggregator. */ accountImageImprovementsSettings?: AccountImageImprovementsSettings; /** * Output only. The effective value of allow_automatic_image_improvements. If * account_image_improvements_settings is present, then this value is the * same. Otherwise, it represents the inherited value of the parent account. * Read-only. */ readonly effectiveAllowAutomaticImageImprovements?: boolean; } /** * Settings for the Automatic Image Improvements. */ export interface AccountImageImprovementsSettings { /** * Enables automatic image improvements. */ allowAutomaticImageImprovements?: boolean; } /** * An issue affecting specific merchant. */ export interface AccountIssue { /** * A list of actionable steps that can be executed to solve the issue. An * example is requesting a re-review or providing arguments when merchant * disagrees with the issue. Actions that are supported in (your) third-party * application can be rendered as buttons and should be available to merchant * when they expand the issue. */ actions?: Action[]; /** * Clarifies the severity of the issue. The summarizing message, if present, * should be shown right under the title for each issue. It helps merchants to * quickly understand the impact of the issue. The detailed breakdown helps * the merchant to fully understand the impact of the issue. It can be * rendered as dialog that opens when the merchant mouse over the summarized * impact statement. Issues with different severity can be styled differently. * They may use a different color or icon to signal the difference between * `ERROR`, `WARNING` and `INFO`. */ impact?: AccountIssueImpact; /** * Details of the issue as a pre-rendered HTML. HTML elements contain CSS * classes that can be used to customize the style of the content. Always * sanitize the HTML before embedding it directly to your application. The * sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, * `ul`, `li`, `table`, `tr`, `td`. For example, you can use * [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * * `issue-detail` - top level container for the detail of the issue * * `callout-banners` - section of the `issue-detail` with callout banners * * `callout-banner` - single callout banner, inside `callout-banners` * * `callout-banner-info` - callout with important information (default) * * `callout-banner-warning` - callout with a warning * `callout-banner-error` * - callout informing about an error (most severe) * `issue-content` - * section of the `issue-detail`, contains multiple `content-element` * * `content-element` - content element such as a list, link or paragraph, * inside `issue-content` * `root-causes` - unordered list with items * describing root causes of the issue, inside `issue-content` * * `root-causes-intro` - intro text before the `root-causes` list, inside * `issue-content` * `segment` - section of the text, `span` inside paragraph * * `segment-attribute` - section of the text that represents a product * attribute, for example 'image\_link' * `segment-literal` - section of the * text that contains a special value, for example '0-1000 kg' * * `segment-bold` - section of the text that should be rendered as bold * * `segment-italic` - section of the text that should be rendered as italic * * `tooltip` - used on paragraphs that should be rendered with a tooltip. A * section of the text in such a paragraph will have a class `tooltip-text` * and is intended to be shown in a mouse over dialog. If the style is not * used, the `tooltip-text` section would be shown on a new line, after the * main part of the text. * `tooltip-text` - marks a section of the text * within a `tooltip`, that is intended to be shown in a mouse over dialog. * * `tooltip-icon` - marks a section of the text within a `tooltip`, that can * be replaced with a tooltip icon, for example '?' or 'i'. By default, this * section contains a `br` tag, that is separating the main text and the * tooltip text when the style is not used. * `tooltip-style-question` - the * tooltip shows helpful information, can use the '?' as an icon. * * `tooltip-style-info` - the tooltip adds additional information fitting to * the context, can use the 'i' as an icon. * `content-moderation` - marks the * paragraph that explains how the issue was identified. * `new-element` - * Present for new elements added to the pre-rendered content in the future. * To make sure that a new content element does not break your style, you can * hide everything with this class. */ prerenderedContent?: string; /** * Title of the issue. */ title?: string; } /** * Overall impact of the issue. */ export interface AccountIssueImpact { /** * Detailed impact breakdown. Explains the types of restriction the issue has * in different shopping destinations and territory. If present, it should be * rendered to the merchant. Can be shown as a mouse over dropdown or a * dialog. Each breakdown item represents a group of regions with the same * impact details. */ breakdowns?: Breakdown[]; /** * Optional. Message summarizing the overall impact of the issue. If present, * it should be rendered to the merchant. For example: "Disapproves 90k offers * in 25 countries" */ message?: string; /** * The severity of the issue. */ severity?: | "SEVERITY_UNSPECIFIED" | "ERROR" | "WARNING" | "INFO"; } /** * Turning on [item * updates](https://support.google.com/merchants/answer/3246284) allows Google * to automatically update items for you. When item updates are on, Google uses * the structured data markup on the website and advanced data extractors to * update the price and availability of the items. When the item updates are * off, items with mismatched data aren't shown. */ export interface AccountItemUpdates { /** * Determines which attributes of the items should be automatically updated. * If this field is not present, then the settings will be deleted. If there * are no settings for subaccount, they are inherited from aggregator. */ accountItemUpdatesSettings?: AccountItemUpdatesSettings; /** * Output only. The effective value of allow_availability_updates. If * account_item_updates_settings is present, then this value is the same. * Otherwise, it represents the inherited value of the parent account. * Read-only. */ readonly effectiveAllowAvailabilityUpdates?: boolean; /** * Output only. The effective value of allow_condition_updates. If * account_item_updates_settings is present, then this value is the same. * Otherwise, it represents the inherited value of the parent account. * Read-only. */ readonly effectiveAllowConditionUpdates?: boolean; /** * Output only. The effective value of allow_price_updates. If * account_item_updates_settings is present, then this value is the same. * Otherwise, it represents the inherited value of the parent account. * Read-only. */ readonly effectiveAllowPriceUpdates?: boolean; /** * Output only. The effective value of allow_strict_availability_updates. If * account_item_updates_settings is present, then this value is the same. * Otherwise, it represents the inherited value of the parent account. * Read-only. */ readonly effectiveAllowStrictAvailabilityUpdates?: boolean; } /** * Settings for the Automatic Item Updates. */ export interface AccountItemUpdatesSettings { /** * If availability updates are enabled, any previous availability values get * overwritten if Google finds an out-of-stock annotation on the offer's page. * If additionally `allow_availability_updates` field is set to true, values * get overwritten if Google finds an in-stock annotation on the offer’s page. */ allowAvailabilityUpdates?: boolean; /** * If condition updates are enabled, Google always updates item condition * with the condition detected from the details of your product. */ allowConditionUpdates?: boolean; /** * If price updates are enabled, Google always updates the active price with * the crawled information. */ allowPriceUpdates?: boolean; /** * If allow_availability_updates is enabled, items are automatically updated * in all your Shopping target countries. By default, availability updates * will only be applied to items that are 'out of stock' on your website but * 'in stock' on Shopping. Set this to true to also update items that are 'in * stock' on your website, but 'out of stock' on Google Shopping. In order for * this field to have an effect, you must also allow availability updates. */ allowStrictAvailabilityUpdates?: boolean; } /** * Label assigned by CSS domain or CSS group to one of its sub-accounts. */ export interface AccountLabel { /** * Immutable. The ID of account this label belongs to. */ accountId?: bigint; /** * The description of this label. */ description?: string; /** * Output only. The ID of the label. */ readonly labelId?: bigint; /** * Output only. The type of this label. */ readonly labelType?: | "LABEL_TYPE_UNSPECIFIED" | "MANUAL" | "AUTOMATIC"; /** * The display name of this label. */ name?: string; } function serializeAccountLabel(data: any): AccountLabel { return { ...data, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, }; } function deserializeAccountLabel(data: any): AccountLabel { return { ...data, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, labelId: data["labelId"] !== undefined ? BigInt(data["labelId"]) : undefined, }; } /** * The return carrier information. This service is designed for merchants * enrolled in the Buy on Google program. */ export interface AccountReturnCarrier { /** * Output only. Immutable. The Google-provided unique carrier ID, used to * update the resource. */ readonly carrierAccountId?: bigint; /** * Name of the carrier account. */ carrierAccountName?: string; /** * Number of the carrier account. */ carrierAccountNumber?: string; /** * The carrier code enum. Accepts the values FEDEX or UPS. */ carrierCode?: | "CARRIER_CODE_UNSPECIFIED" | "FEDEX" | "UPS"; } export interface AccountsAuthInfoResponse { /** * The account identifiers corresponding to the authenticated user. - For an * individual account: only the merchant ID is defined - For an aggregator: * only the aggregator ID is defined - For a subaccount of an MCA: both the * merchant ID and the aggregator ID are defined. */ accountIdentifiers?: AccountIdentifier[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountsAuthInfoResponse`". */ kind?: string; } function serializeAccountsAuthInfoResponse(data: any): AccountsAuthInfoResponse { return { ...data, accountIdentifiers: data["accountIdentifiers"] !== undefined ? data["accountIdentifiers"].map((item: any) => (serializeAccountIdentifier(item))) : undefined, }; } function deserializeAccountsAuthInfoResponse(data: any): AccountsAuthInfoResponse { return { ...data, accountIdentifiers: data["accountIdentifiers"] !== undefined ? data["accountIdentifiers"].map((item: any) => (deserializeAccountIdentifier(item))) : undefined, }; } /** * Additional options for Content#accountsClaimwebsite. */ export interface AccountsClaimwebsiteOptions { /** * Only available to selected merchants, for example multi-client accounts * (MCAs) and their sub-accounts. When set to `True`, this option removes any * existing claim on the requested website and replaces it with a claim from * the account that makes the request. */ overwrite?: boolean; } export interface AccountsClaimWebsiteResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountsClaimWebsiteResponse`". */ kind?: string; } export interface AccountsCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: AccountsCustomBatchRequestEntry[]; } function serializeAccountsCustomBatchRequest(data: any): AccountsCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeAccountsCustomBatchRequestEntry(item))) : undefined, }; } function deserializeAccountsCustomBatchRequest(data: any): AccountsCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeAccountsCustomBatchRequestEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch accounts request. */ export interface AccountsCustomBatchRequestEntry { /** * The account to create or update. Only defined if the method is `insert` or * `update`. */ account?: Account; /** * The ID of the targeted account. Only defined if the method is not * `insert`. */ accountId?: bigint; /** * An entry ID, unique within the batch request. */ batchId?: number; /** * Whether the account should be deleted if the account has offers. Only * applicable if the method is `delete`. */ force?: boolean; /** * Label IDs for the 'updatelabels' request. */ labelIds?: bigint[]; /** * Details about the `link` request. */ linkRequest?: AccountsCustomBatchRequestEntryLinkRequest; /** * The ID of the managing account. */ merchantId?: bigint; /** * The method of the batch entry. Acceptable values are: - "`claimWebsite`" - * "`delete`" - "`get`" - "`insert`" - "`link`" - "`update`" */ method?: string; /** * Only applicable if the method is `claimwebsite`. Indicates whether or not * to take the claim from another account in case there is a conflict. */ overwrite?: boolean; /** * Controls which fields are visible. Only applicable if the method is 'get'. */ view?: string; } function serializeAccountsCustomBatchRequestEntry(data: any): AccountsCustomBatchRequestEntry { return { ...data, account: data["account"] !== undefined ? serializeAccount(data["account"]) : undefined, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, labelIds: data["labelIds"] !== undefined ? data["labelIds"].map((item: any) => (String(item))) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeAccountsCustomBatchRequestEntry(data: any): AccountsCustomBatchRequestEntry { return { ...data, account: data["account"] !== undefined ? deserializeAccount(data["account"]) : undefined, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, labelIds: data["labelIds"] !== undefined ? data["labelIds"].map((item: any) => (BigInt(item))) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } export interface AccountsCustomBatchRequestEntryLinkRequest { /** * Action to perform for this link. The `"request"` action is only available * to select merchants. Acceptable values are: - "`approve`" - "`remove`" - * "`request`" */ action?: string; /** * The ID of the linked account. */ linkedAccountId?: string; /** * Type of the link between the two accounts. Acceptable values are: - * "`channelPartner`" - "`eCommercePlatform`" - "`paymentServiceProvider`" - * "`localProductManager`" */ linkType?: string; /** * Provided services. Acceptable values are: - * "`shoppingAdsProductManagement`" - "`shoppingActionsProductManagement`" - * "`shoppingActionsOrderManagement`" - "`paymentProcessing`" - * "`localProductManagement`" */ services?: string[]; } export interface AccountsCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: AccountsCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountsCustomBatchResponse`". */ kind?: string; } function serializeAccountsCustomBatchResponse(data: any): AccountsCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeAccountsCustomBatchResponseEntry(item))) : undefined, }; } function deserializeAccountsCustomBatchResponse(data: any): AccountsCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeAccountsCustomBatchResponseEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch accounts response. */ export interface AccountsCustomBatchResponseEntry { /** * The retrieved, created, or updated account. Not defined if the method was * `delete`, `claimwebsite` or `link`. */ account?: Account; /** * The ID of the request entry this entry responds to. */ batchId?: number; /** * A list of errors for failed custombatch entries. *Note:* Schema errors * fail the whole request. */ errors?: Errors; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountsCustomBatchResponseEntry`" */ kind?: string; } function serializeAccountsCustomBatchResponseEntry(data: any): AccountsCustomBatchResponseEntry { return { ...data, account: data["account"] !== undefined ? serializeAccount(data["account"]) : undefined, }; } function deserializeAccountsCustomBatchResponseEntry(data: any): AccountsCustomBatchResponseEntry { return { ...data, account: data["account"] !== undefined ? deserializeAccount(data["account"]) : undefined, }; } /** * Additional options for Content#accountsDelete. */ export interface AccountsDeleteOptions { /** * Option to delete sub-accounts with products. The default value is false. */ force?: boolean; } /** * Additional options for Content#accountsGet. */ export interface AccountsGetOptions { /** * Controls which fields will be populated. Acceptable values are: "merchant" * and "css". The default value is "merchant". */ view?: | "MERCHANT" | "CSS"; } /** * Not available for MCAs * [accounts](https://support.google.com/merchants/answer/188487). By turning on * [automatic shipping * improvements](https://support.google.com/merchants/answer/10027038), you are * allowing Google to improve the accuracy of your delivery times shown to * shoppers using Google. More accurate delivery times, especially when faster, * typically lead to better conversion rates. Google will improve your estimated * delivery times based on various factors: * Delivery address of an order * * Current handling time and shipping time settings * Estimated weekdays or * business days * Parcel tracking data */ export interface AccountShippingImprovements { /** * Enables automatic shipping improvements. */ allowShippingImprovements?: boolean; } /** * Additional options for Content#accountsLabelsList. */ export interface AccountsLabelsListOptions { /** * The maximum number of labels to return. The service may return fewer than * this value. If unspecified, at most 50 labels will be returned. The maximum * value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListAccountLabels` call. Provide * this to retrieve the subsequent page. When paginating, all other parameters * provided to `ListAccountLabels` must match the call that provided the page * token. */ pageToken?: string; } export interface AccountsLinkRequest { /** * Action to perform for this link. The `"request"` action is only available * to select merchants. Acceptable values are: - "`approve`" - "`remove`" - * "`request`" */ action?: string; /** * Additional information required for `eCommercePlatform` link type. */ eCommercePlatformLinkInfo?: ECommercePlatformLinkInfo; /** * The ID of the linked account. */ linkedAccountId?: string; /** * Type of the link between the two accounts. Acceptable values are: - * "`channelPartner`" - "`eCommercePlatform`" - "`paymentServiceProvider`" */ linkType?: string; /** * Additional information required for `paymentServiceProvider` link type. */ paymentServiceProviderLinkInfo?: PaymentServiceProviderLinkInfo; /** * Acceptable values are: - "`shoppingAdsProductManagement`" - * "`shoppingActionsProductManagement`" - "`shoppingActionsOrderManagement`" - * "`paymentProcessing`" */ services?: string[]; } export interface AccountsLinkResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountsLinkResponse`". */ kind?: string; } /** * Additional options for Content#accountsListlinks. */ export interface AccountsListlinksOptions { /** * The maximum number of links to return in the response, used for * pagination. The minimum allowed value is 5 results per page. If provided * value is lower than 5, it will be automatically increased to 5. */ maxResults?: number; /** * The token returned by the previous request. */ pageToken?: string; } export interface AccountsListLinksResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountsListLinksResponse`". */ kind?: string; /** * The list of available links. */ links?: LinkedAccount[]; /** * The token for the retrieval of the next page of links. */ nextPageToken?: string; } /** * Additional options for Content#accountsList. */ export interface AccountsListOptions { /** * If view is set to "css", only return accounts that are assigned label with * given ID. */ label?: bigint; /** * The maximum number of accounts to return in the response, used for paging. */ maxResults?: number; /** * If set, only the accounts with the given name (case sensitive) will be * returned. */ name?: string; /** * The token returned by the previous request. */ pageToken?: string; /** * Controls which fields will be populated. Acceptable values are: "merchant" * and "css". The default value is "merchant". */ view?: | "MERCHANT" | "CSS"; } function serializeAccountsListOptions(data: any): AccountsListOptions { return { ...data, label: data["label"] !== undefined ? String(data["label"]) : undefined, }; } function deserializeAccountsListOptions(data: any): AccountsListOptions { return { ...data, label: data["label"] !== undefined ? BigInt(data["label"]) : undefined, }; } export interface AccountsListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountsListResponse`". */ kind?: string; /** * The token for the retrieval of the next page of accounts. */ nextPageToken?: string; resources?: Account[]; } function serializeAccountsListResponse(data: any): AccountsListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (serializeAccount(item))) : undefined, }; } function deserializeAccountsListResponse(data: any): AccountsListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (deserializeAccount(item))) : undefined, }; } /** * The status of an account, that is, information about its products, which is * computed offline and not returned immediately at insertion time. */ export interface AccountStatus { /** * The ID of the account for which the status is reported. */ accountId?: string; /** * A list of account level issues. */ accountLevelIssues?: AccountStatusAccountLevelIssue[]; /** * How the account is managed. Acceptable values are: - "`manual`" - * "`automatic`" */ accountManagement?: string; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountStatus`" */ kind?: string; /** * List of product-related data by channel, destination, and country. Data in * this field may be delayed by up to 30 minutes. */ products?: AccountStatusProducts[]; /** * Whether the account's website is claimed or not. */ websiteClaimed?: boolean; } function serializeAccountStatus(data: any): AccountStatus { return { ...data, products: data["products"] !== undefined ? data["products"].map((item: any) => (serializeAccountStatusProducts(item))) : undefined, }; } function deserializeAccountStatus(data: any): AccountStatus { return { ...data, products: data["products"] !== undefined ? data["products"].map((item: any) => (deserializeAccountStatusProducts(item))) : undefined, }; } export interface AccountStatusAccountLevelIssue { /** * Country for which this issue is reported. */ country?: string; /** * The destination the issue applies to. If this field is empty then the * issue applies to all available destinations. */ destination?: string; /** * Additional details about the issue. */ detail?: string; /** * The URL of a web page to help resolving this issue. */ documentation?: string; /** * Issue identifier. */ id?: string; /** * Severity of the issue. Acceptable values are: - "`critical`" - "`error`" - * "`suggestion`" */ severity?: string; /** * Short description of the issue. */ title?: string; } export interface AccountstatusesCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: AccountstatusesCustomBatchRequestEntry[]; } function serializeAccountstatusesCustomBatchRequest(data: any): AccountstatusesCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeAccountstatusesCustomBatchRequestEntry(item))) : undefined, }; } function deserializeAccountstatusesCustomBatchRequest(data: any): AccountstatusesCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeAccountstatusesCustomBatchRequestEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch accountstatuses request. */ export interface AccountstatusesCustomBatchRequestEntry { /** * The ID of the (sub-)account whose status to get. */ accountId?: bigint; /** * An entry ID, unique within the batch request. */ batchId?: number; /** * If set, only issues for the specified destinations are returned, otherwise * only issues for the Shopping destination. */ destinations?: string[]; /** * The ID of the managing account. */ merchantId?: bigint; /** * The method of the batch entry. Acceptable values are: - "`get`" */ method?: string; } function serializeAccountstatusesCustomBatchRequestEntry(data: any): AccountstatusesCustomBatchRequestEntry { return { ...data, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeAccountstatusesCustomBatchRequestEntry(data: any): AccountstatusesCustomBatchRequestEntry { return { ...data, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } export interface AccountstatusesCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: AccountstatusesCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountstatusesCustomBatchResponse`". */ kind?: string; } function serializeAccountstatusesCustomBatchResponse(data: any): AccountstatusesCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeAccountstatusesCustomBatchResponseEntry(item))) : undefined, }; } function deserializeAccountstatusesCustomBatchResponse(data: any): AccountstatusesCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeAccountstatusesCustomBatchResponseEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch accountstatuses response. */ export interface AccountstatusesCustomBatchResponseEntry { /** * The requested account status. Defined if and only if the request was * successful. */ accountStatus?: AccountStatus; /** * The ID of the request entry this entry responds to. */ batchId?: number; /** * A list of errors for failed custombatch entries. *Note:* Schema errors * fail the whole request. */ errors?: Errors; } function serializeAccountstatusesCustomBatchResponseEntry(data: any): AccountstatusesCustomBatchResponseEntry { return { ...data, accountStatus: data["accountStatus"] !== undefined ? serializeAccountStatus(data["accountStatus"]) : undefined, }; } function deserializeAccountstatusesCustomBatchResponseEntry(data: any): AccountstatusesCustomBatchResponseEntry { return { ...data, accountStatus: data["accountStatus"] !== undefined ? deserializeAccountStatus(data["accountStatus"]) : undefined, }; } /** * Additional options for Content#accountstatusesGet. */ export interface AccountstatusesGetOptions { /** * If set, only issues for the specified destinations are returned, otherwise * only issues for the Shopping destination. */ destinations?: string; } /** * Additional options for Content#accountstatusesList. */ export interface AccountstatusesListOptions { /** * If set, only issues for the specified destinations are returned, otherwise * only issues for the Shopping destination. */ destinations?: string; /** * The maximum number of account statuses to return in the response, used for * paging. */ maxResults?: number; /** * If set, only the accounts with the given name (case sensitive) will be * returned. */ name?: string; /** * The token returned by the previous request. */ pageToken?: string; } export interface AccountstatusesListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountstatusesListResponse`". */ kind?: string; /** * The token for the retrieval of the next page of account statuses. */ nextPageToken?: string; resources?: AccountStatus[]; } function serializeAccountstatusesListResponse(data: any): AccountstatusesListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (serializeAccountStatus(item))) : undefined, }; } function deserializeAccountstatusesListResponse(data: any): AccountstatusesListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (deserializeAccountStatus(item))) : undefined, }; } export interface AccountStatusItemLevelIssue { /** * The attribute's name, if the issue is caused by a single attribute. */ attributeName?: string; /** * The error code of the issue. */ code?: string; /** * A short issue description in English. */ description?: string; /** * A detailed issue description in English. */ detail?: string; /** * The URL of a web page to help with resolving this issue. */ documentation?: string; /** * Number of items with this issue. */ numItems?: bigint; /** * Whether the issue can be resolved by the merchant. */ resolution?: string; /** * How this issue affects serving of the offer. */ servability?: string; } function serializeAccountStatusItemLevelIssue(data: any): AccountStatusItemLevelIssue { return { ...data, numItems: data["numItems"] !== undefined ? String(data["numItems"]) : undefined, }; } function deserializeAccountStatusItemLevelIssue(data: any): AccountStatusItemLevelIssue { return { ...data, numItems: data["numItems"] !== undefined ? BigInt(data["numItems"]) : undefined, }; } export interface AccountStatusProducts { /** * The channel the data applies to. Acceptable values are: - "`local`" - * "`online`" */ channel?: string; /** * The country the data applies to. */ country?: string; /** * The destination the data applies to. */ destination?: string; /** * List of item-level issues. */ itemLevelIssues?: AccountStatusItemLevelIssue[]; /** * Aggregated product statistics. */ statistics?: AccountStatusStatistics; } function serializeAccountStatusProducts(data: any): AccountStatusProducts { return { ...data, itemLevelIssues: data["itemLevelIssues"] !== undefined ? data["itemLevelIssues"].map((item: any) => (serializeAccountStatusItemLevelIssue(item))) : undefined, statistics: data["statistics"] !== undefined ? serializeAccountStatusStatistics(data["statistics"]) : undefined, }; } function deserializeAccountStatusProducts(data: any): AccountStatusProducts { return { ...data, itemLevelIssues: data["itemLevelIssues"] !== undefined ? data["itemLevelIssues"].map((item: any) => (deserializeAccountStatusItemLevelIssue(item))) : undefined, statistics: data["statistics"] !== undefined ? deserializeAccountStatusStatistics(data["statistics"]) : undefined, }; } export interface AccountStatusStatistics { /** * Number of active offers. */ active?: bigint; /** * Number of disapproved offers. */ disapproved?: bigint; /** * Number of expiring offers. */ expiring?: bigint; /** * Number of pending offers. */ pending?: bigint; } function serializeAccountStatusStatistics(data: any): AccountStatusStatistics { return { ...data, active: data["active"] !== undefined ? String(data["active"]) : undefined, disapproved: data["disapproved"] !== undefined ? String(data["disapproved"]) : undefined, expiring: data["expiring"] !== undefined ? String(data["expiring"]) : undefined, pending: data["pending"] !== undefined ? String(data["pending"]) : undefined, }; } function deserializeAccountStatusStatistics(data: any): AccountStatusStatistics { return { ...data, active: data["active"] !== undefined ? BigInt(data["active"]) : undefined, disapproved: data["disapproved"] !== undefined ? BigInt(data["disapproved"]) : undefined, expiring: data["expiring"] !== undefined ? BigInt(data["expiring"]) : undefined, pending: data["pending"] !== undefined ? BigInt(data["pending"]) : undefined, }; } export interface AccountsUpdateLabelsRequest { /** * The IDs of labels that should be assigned to the account. */ labelIds?: bigint[]; } function serializeAccountsUpdateLabelsRequest(data: any): AccountsUpdateLabelsRequest { return { ...data, labelIds: data["labelIds"] !== undefined ? data["labelIds"].map((item: any) => (String(item))) : undefined, }; } function deserializeAccountsUpdateLabelsRequest(data: any): AccountsUpdateLabelsRequest { return { ...data, labelIds: data["labelIds"] !== undefined ? data["labelIds"].map((item: any) => (BigInt(item))) : undefined, }; } export interface AccountsUpdateLabelsResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountsUpdateLabelsResponse`". */ kind?: string; } /** * The tax settings of a merchant account. All methods require the admin role. */ export interface AccountTax { /** * Required. The ID of the account to which these account tax settings * belong. */ accountId?: bigint; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accountTax`". */ kind?: string; /** * Tax rules. Updating the tax rules will enable "US" taxes (not reversible). * Defining no rules is equivalent to not charging tax at all. */ rules?: AccountTaxTaxRule[]; } function serializeAccountTax(data: any): AccountTax { return { ...data, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, rules: data["rules"] !== undefined ? data["rules"].map((item: any) => (serializeAccountTaxTaxRule(item))) : undefined, }; } function deserializeAccountTax(data: any): AccountTax { return { ...data, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, rules: data["rules"] !== undefined ? data["rules"].map((item: any) => (deserializeAccountTaxTaxRule(item))) : undefined, }; } export interface AccounttaxCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: AccounttaxCustomBatchRequestEntry[]; } function serializeAccounttaxCustomBatchRequest(data: any): AccounttaxCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeAccounttaxCustomBatchRequestEntry(item))) : undefined, }; } function deserializeAccounttaxCustomBatchRequest(data: any): AccounttaxCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeAccounttaxCustomBatchRequestEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch accounttax request. */ export interface AccounttaxCustomBatchRequestEntry { /** * The ID of the account for which to get/update account tax settings. */ accountId?: bigint; /** * The account tax settings to update. Only defined if the method is * `update`. */ accountTax?: AccountTax; /** * An entry ID, unique within the batch request. */ batchId?: number; /** * The ID of the managing account. */ merchantId?: bigint; /** * The method of the batch entry. Acceptable values are: - "`get`" - * "`update`" */ method?: string; } function serializeAccounttaxCustomBatchRequestEntry(data: any): AccounttaxCustomBatchRequestEntry { return { ...data, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, accountTax: data["accountTax"] !== undefined ? serializeAccountTax(data["accountTax"]) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeAccounttaxCustomBatchRequestEntry(data: any): AccounttaxCustomBatchRequestEntry { return { ...data, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, accountTax: data["accountTax"] !== undefined ? deserializeAccountTax(data["accountTax"]) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } export interface AccounttaxCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: AccounttaxCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accounttaxCustomBatchResponse`". */ kind?: string; } function serializeAccounttaxCustomBatchResponse(data: any): AccounttaxCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeAccounttaxCustomBatchResponseEntry(item))) : undefined, }; } function deserializeAccounttaxCustomBatchResponse(data: any): AccounttaxCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeAccounttaxCustomBatchResponseEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch accounttax response. */ export interface AccounttaxCustomBatchResponseEntry { /** * The retrieved or updated account tax settings. */ accountTax?: AccountTax; /** * The ID of the request entry this entry responds to. */ batchId?: number; /** * A list of errors for failed custombatch entries. *Note:* Schema errors * fail the whole request. */ errors?: Errors; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accounttaxCustomBatchResponseEntry`" */ kind?: string; } function serializeAccounttaxCustomBatchResponseEntry(data: any): AccounttaxCustomBatchResponseEntry { return { ...data, accountTax: data["accountTax"] !== undefined ? serializeAccountTax(data["accountTax"]) : undefined, }; } function deserializeAccounttaxCustomBatchResponseEntry(data: any): AccounttaxCustomBatchResponseEntry { return { ...data, accountTax: data["accountTax"] !== undefined ? deserializeAccountTax(data["accountTax"]) : undefined, }; } /** * Additional options for Content#accounttaxList. */ export interface AccounttaxListOptions { /** * The maximum number of tax settings to return in the response, used for * paging. */ maxResults?: number; /** * The token returned by the previous request. */ pageToken?: string; } export interface AccounttaxListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#accounttaxListResponse`". */ kind?: string; /** * The token for the retrieval of the next page of account tax settings. */ nextPageToken?: string; resources?: AccountTax[]; } function serializeAccounttaxListResponse(data: any): AccounttaxListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (serializeAccountTax(item))) : undefined, }; } function deserializeAccounttaxListResponse(data: any): AccounttaxListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (deserializeAccountTax(item))) : undefined, }; } /** * Tax calculation rule to apply in a state or province (US only). */ export interface AccountTaxTaxRule { /** * Country code in which tax is applicable. */ country?: string; /** * Required. State (or province) is which the tax is applicable, described by * its location ID (also called criteria ID). */ locationId?: bigint; /** * Explicit tax rate in percent, represented as a floating point number * without the percentage character. Must not be negative. */ ratePercent?: string; /** * If true, shipping charges are also taxed. */ shippingTaxed?: boolean; /** * Whether the tax rate is taken from a global tax table or specified * explicitly. */ useGlobalRate?: boolean; } function serializeAccountTaxTaxRule(data: any): AccountTaxTaxRule { return { ...data, locationId: data["locationId"] !== undefined ? String(data["locationId"]) : undefined, }; } function deserializeAccountTaxTaxRule(data: any): AccountTaxTaxRule { return { ...data, locationId: data["locationId"] !== undefined ? BigInt(data["locationId"]) : undefined, }; } export interface AccountUser { /** * Whether user is an admin. */ admin?: boolean; /** * User's email address. */ emailAddress?: string; /** * Whether user is an order manager. */ orderManager?: boolean; /** * Whether user can access payment statements. */ paymentsAnalyst?: boolean; /** * Whether user can manage payment settings. */ paymentsManager?: boolean; /** * Whether user is a reporting manager. This role is equivalent to the * Performance and insights role in Merchant Center. */ reportingManager?: boolean; } export interface AccountYouTubeChannelLink { /** * Channel ID. */ channelId?: string; /** * Status of the link between this Merchant Center account and the YouTube * channel. Upon retrieval, it represents the actual status of the link and * can be either `active` if it was approved in YT Creator Studio or `pending` * if it's pending approval. Upon insertion, it represents the *intended* * status of the link. Re-uploading a link with status `active` when it's * still pending or with status `pending` when it's already active will have * no effect: the status will remain unchanged. Re-uploading a link with * deprecated status `inactive` is equivalent to not submitting the link at * all and will delete the link if it was active or cancel the link request if * it was pending. */ status?: string; } /** * An actionable step that can be executed to solve the issue. */ export interface Action { /** * Action implemented and performed in (your) third-party application. The * application should point the merchant to the place, where they can access * the corresponding functionality or provide instructions, if the specific * functionality is not available. */ builtinSimpleAction?: BuiltInSimpleAction; /** * Action implemented and performed in (your) third-party application. The * application needs to show an additional content and input form to the * merchant as specified for given action. They can trigger the action only * when they provided all required inputs. */ builtinUserInputAction?: BuiltInUserInputAction; /** * Label of the action button. */ buttonLabel?: string; /** * Action that is implemented and performed outside of (your) third-party * application. The application needs to redirect the merchant to the external * location where they can perform the action. */ externalAction?: ExternalAction; /** * Controlling whether the button is active or disabled. The value is 'false' * when the action was already requested or is not available. If the action is * not available then a reason will be present. If (your) third-party * application shows a disabled button for action that is not available, then * it should also show reasons. */ isAvailable?: boolean; /** * List of reasons why the action is not available. The list of reasons is * empty if the action is available. If there is only one reason, it can be * displayed next to the disabled button. If there are more reasons, all of * them should be displayed, for example in a pop-up dialog. */ reasons?: ActionReason[]; } /** * Flow that can be selected for an action. When merchant selects a flow, * application should open a dialog with more information and input form. */ export interface ActionFlow { /** * Label for the button to trigger the action from the action dialog. For * example: "Request review" */ dialogButtonLabel?: string; /** * Important message to be highlighted in the request dialog. For example: * "You can only request a review for disagreeing with this issue once. If * it's not approved, you'll need to fix the issue and wait a few days before * you can request another review." */ dialogCallout?: Callout; /** * Message displayed in the request dialog. For example: "Make sure you've * fixed all your country-specific issues. If not, you may have to wait 7 days * to request another review". There may be an more information to be shown in * a tooltip. */ dialogMessage?: TextWithTooltip; /** * Title of the request dialog. For example: "Before you request a review" */ dialogTitle?: string; /** * Not for display but need to be sent back for the selected action flow. */ id?: string; /** * A list of input fields. */ inputs?: InputField[]; /** * Text value describing the intent for the action flow. It can be used as an * input label if merchant needs to pick one of multiple flows. For example: * "I disagree with the issue" */ label?: string; } /** * Input provided by the merchant. */ export interface ActionInput { /** * Required. Id of the selected action flow. */ actionFlowId?: string; /** * Required. Values for input fields. */ inputValues?: InputValue[]; } /** * A single reason why the action is not available. */ export interface ActionReason { /** * Optional. An action that needs to be performed to solve the problem * represented by this reason. This action will always be available. Should be * rendered as a link or button next to the summarizing message. For example, * the review may be available only once merchant configure all required * attributes. In such a situation this action can be a link to the form, * where they can fill the missing attribute to unblock the main action. */ action?: Action; /** * Detailed explanation of the reason. Should be displayed as a hint if * present. */ detail?: string; /** * Messages summarizing the reason, why the action is not available. For * example: "Review requested on Jan 03. Review requests can take a few days * to complete." */ message?: string; } export interface Address { /** * Required. Top-level administrative subdivision of the country. For * example, a state like California ("CA") or a province like Quebec ("QC"). */ administrativeArea?: string; /** * Required. City, town or commune. May also include dependent localities or * sublocalities (for example, neighborhoods or suburbs). */ city?: string; /** * Required. [CLDR country * code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) * (for example, "US"). */ country?: string; /** * Required. Postal code or ZIP (for example, "94043"). */ postalCode?: string; /** * Street-level part of the address. Use `\n` to add a second line. */ streetAddress?: string; } /** * The Alternate Dispute Resolution (ADR) that may be available to merchants in * some regions. If present, the link should be shown on the same page as the * list of issues. */ export interface AlternateDisputeResolution { /** * The label for the alternate dispute resolution link. */ label?: string; /** * The URL pointing to a page, where merchant can request alternative dispute * resolution with an [external * body](https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). */ uri?: string; } /** * Represents attribution settings for conversion sources receiving * pre-attribution data. */ export interface AttributionSettings { /** * Required. Lookback windows (in days) used for attribution in this source. * Supported values are 7, 30, 40. */ attributionLookbackWindowInDays?: number; /** * Required. Attribution model. */ attributionModel?: | "ATTRIBUTION_MODEL_UNSPECIFIED" | "CROSS_CHANNEL_LAST_CLICK" | "ADS_PREFERRED_LAST_CLICK" | "CROSS_CHANNEL_DATA_DRIVEN" | "CROSS_CHANNEL_FIRST_CLICK" | "CROSS_CHANNEL_LINEAR" | "CROSS_CHANNEL_POSITION_BASED" | "CROSS_CHANNEL_TIME_DECAY"; /** * Immutable. Unordered list. List of different conversion types a conversion * event can be classified as. A standard "purchase" type will be * automatically created if this list is empty at creation time. */ conversionType?: AttributionSettingsConversionType[]; } /** * Message representing a types of conversion events */ export interface AttributionSettingsConversionType { /** * Output only. Option indicating if the type should be included in Merchant * Center reporting. */ readonly includeInReporting?: boolean; /** * Output only. Conversion event name, as it'll be reported by the client. */ readonly name?: string; } /** * Fields related to the [Best sellers * reports](https://support.google.com/merchants/answer/9488679). */ export interface BestSellers { /** * Google product category ID to calculate the ranking for, represented in * [Google's product * taxonomy](https://support.google.com/merchants/answer/6324436). If a * `WHERE` condition on `best_sellers.category_id` is not specified in the * query, rankings for all top-level categories are returned. */ categoryId?: bigint; /** * Country where the ranking is calculated. A `WHERE` condition on * `best_sellers.country_code` is required in the query. */ countryCode?: string; /** * Popularity rank in the previous week or month. */ previousRank?: bigint; /** * Estimated demand in relation to the item with the highest popularity rank * in the same category and country in the previous week or month. */ previousRelativeDemand?: | "RELATIVE_DEMAND_UNSPECIFIED" | "VERY_LOW" | "LOW" | "MEDIUM" | "HIGH" | "VERY_HIGH"; /** * Popularity on Shopping ads and free listings, in the selected category and * country, based on the estimated number of units sold. */ rank?: bigint; /** * Estimated demand in relation to the item with the highest popularity rank * in the same category and country. */ relativeDemand?: | "RELATIVE_DEMAND_UNSPECIFIED" | "VERY_LOW" | "LOW" | "MEDIUM" | "HIGH" | "VERY_HIGH"; /** * Change in the estimated demand. Whether it rose, sank or remained flat. */ relativeDemandChange?: | "RELATIVE_DEMAND_CHANGE_TYPE_UNSPECIFIED" | "SINKER" | "FLAT" | "RISER"; /** * Report date. The value of this field can only be one of the following: * * The first day of the week (Monday) for weekly reports. * The first day of * the month for monthly reports. If a `WHERE` condition on * `best_sellers.report_date` is not specified in the query, the latest * available weekly or monthly report is returned. */ reportDate?: Date; /** * Granularity of the report. The ranking can be done over a week or a month * timeframe. A `WHERE` condition on `best_sellers.report_granularity` is * required in the query. */ reportGranularity?: | "REPORT_GRANULARITY_UNSPECIFIED" | "WEEKLY" | "MONTHLY"; } function serializeBestSellers(data: any): BestSellers { return { ...data, categoryId: data["categoryId"] !== undefined ? String(data["categoryId"]) : undefined, previousRank: data["previousRank"] !== undefined ? String(data["previousRank"]) : undefined, rank: data["rank"] !== undefined ? String(data["rank"]) : undefined, }; } function deserializeBestSellers(data: any): BestSellers { return { ...data, categoryId: data["categoryId"] !== undefined ? BigInt(data["categoryId"]) : undefined, previousRank: data["previousRank"] !== undefined ? BigInt(data["previousRank"]) : undefined, rank: data["rank"] !== undefined ? BigInt(data["rank"]) : undefined, }; } /** * Brand fields. Values are only set for fields requested explicitly in the * request's search query. */ export interface Brand { /** * Name of the brand. */ name?: string; } /** * A detailed impact breakdown for a group of regions where the impact of the * issue on different shopping destinations is the same. */ export interface Breakdown { /** * Human readable, localized description of issue's effect on different * targets. Should be rendered as a list. For example: * "Products not showing * in ads" * "Products not showing organically" */ details?: string[]; /** * Lists of regions. Should be rendered as a title for this group of details. * The full list should be shown to merchant. If the list is too long, it is * recommended to make it expandable. */ regions?: BreakdownRegion[]; } /** * Region with code and localized name. */ export interface BreakdownRegion { /** * The [CLDR territory code] * (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) */ code?: string; /** * The localized name of the region. For region with code='001' the value is * 'All countries' or the equivalent in other languages. */ name?: string; } /** * Action that is implemented and performed in (your) third-party application. * Represents various functionality that is expected to be available to merchant * and will help them with resolving the issue. The application should point the * merchant to the place, where they can access the corresponding functionality. * If the functionality is not supported, it is recommended to explain the * situation to merchant and provide them with instructions how to solve the * issue. */ export interface BuiltInSimpleAction { /** * Long text from an external source that should be available to the * merchant. Present when the type is `SHOW_ADDITIONAL_CONTENT`. */ additionalContent?: BuiltInSimpleActionAdditionalContent; /** * The attribute that needs to be updated. Present when the type is * `EDIT_ITEM_ATTRIBUTE`. This field contains a code for attribute, * represented in snake_case. You can find a list of product's attributes, * with their codes * [here](https://support.google.com/merchants/answer/7052112). */ attributeCode?: string; /** * The type of action that represents a functionality that is expected to be * available in third-party application. */ type?: | "BUILT_IN_SIMPLE_ACTION_TYPE_UNSPECIFIED" | "VERIFY_PHONE" | "CLAIM_WEBSITE" | "ADD_PRODUCTS" | "ADD_CONTACT_INFO" | "LINK_ADS_ACCOUNT" | "ADD_BUSINESS_REGISTRATION_NUMBER" | "EDIT_ITEM_ATTRIBUTE" | "FIX_ACCOUNT_ISSUE" | "SHOW_ADDITIONAL_CONTENT"; } /** * Long text from external source. */ export interface BuiltInSimpleActionAdditionalContent { /** * Long text organized into paragraphs. */ paragraphs?: string[]; /** * Title of the additional content; */ title?: string; } /** * Action that is implemented and performed in (your) third-party application. * The application needs to show an additional content and input form to the * merchant. They can start the action only when they provided all required * inputs. The application will request processing of the action by calling the * [triggeraction * method](https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/triggeraction). */ export interface BuiltInUserInputAction { /** * Internal details. Not for display but need to be sent back when triggering * the action. */ actionContext?: string; /** * Actions may provide multiple different flows. Merchant selects one that * fits best to their intent. Selecting the flow is the first step in user's * interaction with the action. It affects what input fields will be available * and required and also how the request will be processed. */ flows?: ActionFlow[]; } export interface BusinessDayConfig { /** * Regular business days, such as '"monday"'. May not be empty. */ businessDays?: string[]; } /** * An important message that should be highlighted. Usually displayed as a * banner. */ export interface Callout { /** * A full message that needs to be shown to the merchant. */ fullMessage?: TextWithTooltip; /** * Can be used to render messages with different severity in different * styles. Snippets off all types contain important information that should be * displayed to merchants. */ styleHint?: | "CALLOUT_STYLE_HINT_UNSPECIFIED" | "ERROR" | "WARNING" | "INFO"; } export interface CarrierRate { /** * Carrier service, such as `"UPS"` or `"Fedex"`. The list of supported * carriers can be retrieved through the `getSupportedCarriers` method. * Required. */ carrierName?: string; /** * Carrier service, such as `"ground"` or `"2 days"`. The list of supported * services for a carrier can be retrieved through the `getSupportedCarriers` * method. Required. */ carrierService?: string; /** * Additive shipping rate modifier. Can be negative. For example `{ "value": * "1", "currency" : "USD" }` adds $1 to the rate, `{ "value": "-3", * "currency" : "USD" }` removes $3 from the rate. Optional. */ flatAdjustment?: Price; /** * Name of the carrier rate. Must be unique per rate group. Required. */ name?: string; /** * Shipping origin for this carrier rate. Required. */ originPostalCode?: string; /** * Multiplicative shipping rate modifier as a number in decimal notation. Can * be negative. For example `"5.4"` increases the rate by 5.4%, `"-3"` * decreases the rate by 3%. Optional. */ percentageAdjustment?: string; } export interface CarriersCarrier { /** * The CLDR country code of the carrier (for example, "US"). Always present. */ country?: string; /** * A list of services supported for EDD (Estimated Delivery Date) * calculation. This is the list of valid values for * WarehouseBasedDeliveryTime.carrierService. */ eddServices?: string[]; /** * The name of the carrier (for example, `"UPS"`). Always present. */ name?: string; /** * A list of supported services (for example, `"ground"`) for that carrier. * Contains at least one service. This is the list of valid values for * CarrierRate.carrierService. */ services?: string[]; } /** * `CheckoutSettings` for a specific merchant ID. */ export interface CheckoutSettings { /** * Output only. The effective value of enrollment state for a given merchant * ID. If account level settings are present then this value will be a copy of * the account level settings. Otherwise, it will have the value of the parent * account. */ readonly effectiveEnrollmentState?: | "CHECKOUT_ON_MERCHANT_ENROLLMENT_STATE_UNSPECIFIED" | "INACTIVE" | "ENROLLED" | "OPT_OUT"; /** * Output only. The effective value of review state for a given merchant ID. * If account level settings are present then this value will be a copy of the * account level settings. Otherwise, it will have the value of the parent * account. */ readonly effectiveReviewState?: | "CHECKOUT_ON_MERCHANT_REVIEW_STATE_UNSPECIFIED" | "IN_REVIEW" | "APPROVED" | "DISAPPROVED"; /** * The effective value of `url_settings` for a given merchant ID. If account * level settings are present then this value will be a copy of the account * level settings. Otherwise, it will have the value of the parent account. */ effectiveUriSettings?: UrlSettings; /** * Output only. Reflects the merchant enrollment state in `Checkout` feature. */ readonly enrollmentState?: | "CHECKOUT_ON_MERCHANT_ENROLLMENT_STATE_UNSPECIFIED" | "INACTIVE" | "ENROLLED" | "OPT_OUT"; /** * Required. The ID of the account. */ merchantId?: bigint; /** * Output only. Reflects the merchant review state in `Checkout` feature. * This is set based on the data quality reviews of the URL provided by the * merchant. A merchant with enrollment state as `ENROLLED` can be in the * following review states: `IN_REVIEW`, `APPROVED` or `DISAPPROVED`. A * merchant must be in an enrollment_state of `ENROLLED` before a review can * begin for the merchant. */ readonly reviewState?: | "CHECKOUT_ON_MERCHANT_REVIEW_STATE_UNSPECIFIED" | "IN_REVIEW" | "APPROVED" | "DISAPPROVED"; /** * URL settings for cart or checkout URL. */ uriSettings?: UrlSettings; } function serializeCheckoutSettings(data: any): CheckoutSettings { return { ...data, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeCheckoutSettings(data: any): CheckoutSettings { return { ...data, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } /** * Product property for the Cloud Retail API. For example, properties for a TV * product could be "Screen-Resolution" or "Screen-Size". */ export interface CloudExportAdditionalProperties { /** * Boolean value of the given property. For example for a TV product, "True" * or "False" if the screen is UHD. */ boolValue?: boolean; /** * Float values of the given property. For example for a TV product 1.2345. * Maximum number of specified values for this field is 400. Values are stored * in an arbitrary but consistent order. */ floatValue?: number[]; /** * Integer values of the given property. For example, 1080 for a screen * resolution of a TV product. Maximum number of specified values for this * field is 400. Values are stored in an arbitrary but consistent order. */ intValue?: bigint[]; /** * Maximum float value of the given property. For example for a TV product * 100.00. */ maxValue?: number; /** * Minimum float value of the given property. For example for a TV product * 1.00. */ minValue?: number; /** * Name of the given property. For example, "Screen-Resolution" for a TV * product. Maximum string size is 256 characters. */ propertyName?: string; /** * Text value of the given property. For example, "8K(UHD)" could be a text * value for a TV product. Maximum number of specified values for this field * is 400. Values are stored in an arbitrary but consistent order. Maximum * string size is 256 characters. */ textValue?: string[]; /** * Unit of the given property. For example, "Pixels" for a TV product. * Maximum string size is 256 bytes. */ unitCode?: string; } function serializeCloudExportAdditionalProperties(data: any): CloudExportAdditionalProperties { return { ...data, intValue: data["intValue"] !== undefined ? data["intValue"].map((item: any) => (String(item))) : undefined, }; } function deserializeCloudExportAdditionalProperties(data: any): CloudExportAdditionalProperties { return { ...data, intValue: data["intValue"] !== undefined ? data["intValue"].map((item: any) => (BigInt(item))) : undefined, }; } /** * The collection message. */ export interface Collection { /** * Label that you assign to a collection to help organize bidding and * reporting in Shopping campaigns. [Custom * label](https://support.google.com/merchants/answer/9674217) */ customLabel0?: string; /** * Label that you assign to a collection to help organize bidding and * reporting in Shopping campaigns. */ customLabel1?: string; /** * Label that you assign to a collection to help organize bidding and * reporting in Shopping campaigns. */ customLabel2?: string; /** * Label that you assign to a collection to help organize bidding and * reporting in Shopping campaigns. */ customLabel3?: string; /** * Label that you assign to a collection to help organize bidding and * reporting in Shopping campaigns. */ customLabel4?: string; /** * This identifies one or more products associated with the collection. Used * as a lookup to the corresponding product ID in your product feeds. Provide * a maximum of 100 featuredProduct (for collections). Provide up to 10 * featuredProduct (for Shoppable Images only) with ID and X and Y * coordinates. [featured_product * attribute](https://support.google.com/merchants/answer/9703736) */ featuredProduct?: CollectionFeaturedProduct[]; /** * Your collection's name. [headline * attribute](https://support.google.com/merchants/answer/9673580) */ headline?: string[]; /** * Required. The REST ID of the collection. Content API methods that operate * on collections take this as their collectionId parameter. The REST ID for a * collection is of the form collectionId. [id * attribute](https://support.google.com/merchants/answer/9649290) */ id?: string; /** * The URL of a collection’s image. [image_link * attribute](https://support.google.com/merchants/answer/9703236) */ imageLink?: string[]; /** * The language of a collection and the language of any featured products * linked to the collection. [language * attribute](https://support.google.com/merchants/answer/9673781) */ language?: string; /** * A collection’s landing page. URL directly linking to your collection's * page on your website. [link * attribute](https://support.google.com/merchants/answer/9673983) */ link?: string; /** * A collection’s mobile-optimized landing page when you have a different URL * for mobile and desktop traffic. [mobile_link * attribute](https://support.google.com/merchants/answer/9646123) */ mobileLink?: string; /** * [product_country * attribute](https://support.google.com/merchants/answer/9674155) */ productCountry?: string; } /** * The message for FeaturedProduct. * [FeaturedProduct](https://support.google.com/merchants/answer/9703736) */ export interface CollectionFeaturedProduct { /** * The unique identifier for the product item. */ offerId?: string; /** * Required. X-coordinate of the product callout on the Shoppable Image. */ x?: number; /** * Required. Y-coordinate of the product callout on the Shoppable Image. */ y?: number; } /** * Additional options for Content#collectionsList. */ export interface CollectionsListOptions { /** * The maximum number of collections to return in the response, used for * paging. Defaults to 50; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * Token (if provided) to retrieve the subsequent page. All other parameters * must match the original call that provided the page token. */ pageToken?: string; } /** * The collectionstatus message. */ export interface CollectionStatus { /** * A list of all issues associated with the collection. */ collectionLevelIssuses?: CollectionStatusItemLevelIssue[]; /** * Date on which the collection has been created in [ISO * 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and * offset, for example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" */ creationDate?: string; /** * The intended destinations for the collection. */ destinationStatuses?: CollectionStatusDestinationStatus[]; /** * Required. The ID of the collection for which status is reported. */ id?: string; /** * Date on which the collection has been last updated in [ISO * 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and * offset, for example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" */ lastUpdateDate?: string; } /** * Destination status message. */ export interface CollectionStatusDestinationStatus { /** * Country codes (ISO 3166-1 alpha-2) where the collection is approved. */ approvedCountries?: string[]; /** * The name of the destination */ destination?: string; /** * Country codes (ISO 3166-1 alpha-2) where the collection is disapproved. */ disapprovedCountries?: string[]; /** * Country codes (ISO 3166-1 alpha-2) where the collection is pending * approval. */ pendingCountries?: string[]; /** * The status for the specified destination in the collections target * country. */ status?: string; } /** * Additional options for Content#collectionstatusesList. */ export interface CollectionstatusesListOptions { /** * The maximum number of collection statuses to return in the response, used * for paging. Defaults to 50; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * Token (if provided) to retrieve the subsequent page. All other parameters * must match the original call that provided the page token. */ pageToken?: string; } /** * Issue associated with the collection. */ export interface CollectionStatusItemLevelIssue { /** * Country codes (ISO 3166-1 alpha-2) where issue applies to the offer. */ applicableCountries?: string[]; /** * The attribute's name, if the issue is caused by a single attribute. */ attributeName?: string; /** * The error code of the issue. */ code?: string; /** * A short issue description in English. */ description?: string; /** * The destination the issue applies to. */ destination?: string; /** * A detailed issue description in English. */ detail?: string; /** * The URL of a web page to help with resolving this issue. */ documentation?: string; /** * Whether the issue can be resolved by the merchant. */ resolution?: string; /** * How this issue affects the serving of the collection. */ servability?: string; } /** * Fields related to [competitive visibility reports] * (https://support.google.com/merchants/answer/11366442). */ export interface CompetitiveVisibility { /** * [Ads / organic ratio] * (https://support.google.com/merchants/answer/11366442#zippy=%2Cadsfree-ratio) * shows how often a merchant receives impressions from Shopping ads compared * to organic traffic. The number is rounded and bucketed. Available only in * `CompetitiveVisibilityTopMerchantView` and * `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' * clause. */ adsOrganicRatio?: number; /** * Change in visibility based on impressions with respect to the start of the * selected time range (or first day with non-zero impressions) for a combined * set of merchants with highest visibility approximating the market. * Available only in `CompetitiveVisibilityBenchmarkView`. Cannot be filtered * on in the 'WHERE' clause. */ categoryBenchmarkVisibilityTrend?: number; /** * Google product category ID to calculate the report for, represented in * [Google's product * taxonomy](https://support.google.com/merchants/answer/6324436). Required in * the `SELECT` clause. A `WHERE` condition on * `competitive_visibility.category_id` is required in the query. */ categoryId?: bigint; /** * The country where impression appeared. Required in the `SELECT` clause. A * `WHERE` condition on `competitive_visibility.country_code` is required in * the query. */ countryCode?: string; /** * Date of this row. Available only in `CompetitiveVisibilityBenchmarkView` * and `CompetitiveVisibilityCompetitorView`. Required in the `SELECT` clause * for `CompetitiveVisibilityMarketBenchmarkView`. */ date?: Date; /** * Domain of your competitor or your domain, if 'is_your_domain' is true. * Available only in `CompetitiveVisibilityTopMerchantView` and * `CompetitiveVisibilityCompetitorView`. Required in the `SELECT` clause for * `CompetitiveVisibilityTopMerchantView` and * `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' * clause. */ domain?: string; /** * Higher position rate shows how often a competitor’s offer got placed in a * higher position on the page than your offer. Available only in * `CompetitiveVisibilityTopMerchantView` and * `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' * clause. */ higherPositionRate?: number; /** * True if this row contains data for your domain. Available only in * `CompetitiveVisibilityTopMerchantView` and * `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' * clause. */ isYourDomain?: boolean; /** * Page overlap rate describes how frequently competing retailers’ offers are * shown together with your offers on the same page. Available only in * `CompetitiveVisibilityTopMerchantView` and * `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' * clause. */ pageOverlapRate?: number; /** * Position of the domain in the top merchants ranking for the selected keys * (`date`, `category_id`, `country_code`, `listing_type`) based on * impressions. 1 is the highest. Available only in * `CompetitiveVisibilityTopMerchantView` and * `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' * clause. */ rank?: bigint; /** * Relative visibility shows how often your competitors’ offers are shown * compared to your offers. In other words, this is the number of displayed * impressions of a competitor retailer divided by the number of your * displayed impressions during a selected time range for a selected product * category and country. Available only in * `CompetitiveVisibilityCompetitorView`. Cannot be filtered on in the 'WHERE' * clause. */ relativeVisibility?: number; /** * Type of impression listing. Required in the `SELECT` clause. Cannot be * filtered on in the 'WHERE' clause. */ trafficSource?: | "UNKNOWN" | "ORGANIC" | "ADS" | "ALL"; /** * Change in visibility based on impressions for your domain with respect to * the start of the selected time range (or first day with non-zero * impressions). Available only in `CompetitiveVisibilityBenchmarkView`. * Cannot be filtered on in the 'WHERE' clause. */ yourDomainVisibilityTrend?: number; } function serializeCompetitiveVisibility(data: any): CompetitiveVisibility { return { ...data, categoryId: data["categoryId"] !== undefined ? String(data["categoryId"]) : undefined, rank: data["rank"] !== undefined ? String(data["rank"]) : undefined, }; } function deserializeCompetitiveVisibility(data: any): CompetitiveVisibility { return { ...data, categoryId: data["categoryId"] !== undefined ? BigInt(data["categoryId"]) : undefined, rank: data["rank"] !== undefined ? BigInt(data["rank"]) : undefined, }; } /** * Represents a conversion source owned by a Merchant account. A merchant * account can have up to 200 conversion sources. */ export interface ConversionSource { /** * Output only. Generated by the Content API upon creation of a new * `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the * colon represent the type of conversio source. Content after the colon * represents the ID of the conversion source within that type. The ID of two * different conversion sources might be the same across different types. The * following type prefixes are supported: - galk: For GoogleAnalyticsLink * sources. - mcdn: For MerchantCenterDestination sources. */ readonly conversionSourceId?: string; /** * Output only. The time when an archived conversion source becomes * permanently deleted and is no longer available to undelete. */ readonly expireTime?: Date; /** * Immutable. Conversion Source of type "Link to Google Analytics Property". */ googleAnalyticsLink?: GoogleAnalyticsLink; /** * Conversion Source of type "Merchant Center Tag Destination". */ merchantCenterDestination?: MerchantCenterDestination; /** * Output only. Current state of this conversion source. Can't be edited * through the API. */ readonly state?: | "STATE_UNSPECIFIED" | "ACTIVE" | "ARCHIVED" | "PENDING"; } function serializeConversionSource(data: any): ConversionSource { return { ...data, googleAnalyticsLink: data["googleAnalyticsLink"] !== undefined ? serializeGoogleAnalyticsLink(data["googleAnalyticsLink"]) : undefined, }; } function deserializeConversionSource(data: any): ConversionSource { return { ...data, expireTime: data["expireTime"] !== undefined ? new Date(data["expireTime"]) : undefined, googleAnalyticsLink: data["googleAnalyticsLink"] !== undefined ? deserializeGoogleAnalyticsLink(data["googleAnalyticsLink"]) : undefined, }; } /** * Additional options for Content#conversionsourcesList. */ export interface ConversionsourcesListOptions { /** * The maximum number of conversion sources to return in a page. If no * `page_size` is specified, `100` is used as the default value. The maximum * value is `200`. Values above `200` will be coerced to `200`. Regardless of * pagination, at most `200` conversion sources are returned in total. */ pageSize?: number; /** * Page token. */ pageToken?: string; /** * If true, also returns archived conversion sources. */ showDeleted?: boolean; } /** * Additional options for Content#conversionsourcesPatch. */ export interface ConversionsourcesPatchOptions { /** * Optional. List of fields being updated. */ updateMask?: string /* FieldMask */; } function serializeConversionsourcesPatchOptions(data: any): ConversionsourcesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeConversionsourcesPatchOptions(data: any): ConversionsourcesPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * Information about CSS domain. */ export interface Css { /** * Output only. Immutable. The CSS domain ID. */ readonly cssDomainId?: bigint; /** * Output only. Immutable. The ID of the CSS group this CSS domain is * affiliated with. Only populated for CSS group users. */ readonly cssGroupId?: bigint; /** * Output only. Immutable. The CSS domain's display name, used when space is * constrained. */ readonly displayName?: string; /** * Output only. Immutable. The CSS domain's full name. */ readonly fullName?: string; /** * Output only. Immutable. The CSS domain's homepage. */ readonly homepageUri?: string; /** * A list of label IDs that are assigned to this CSS domain by its CSS group. * Only populated for CSS group users. */ labelIds?: bigint[]; } function serializeCss(data: any): Css { return { ...data, labelIds: data["labelIds"] !== undefined ? data["labelIds"].map((item: any) => (String(item))) : undefined, }; } function deserializeCss(data: any): Css { return { ...data, cssDomainId: data["cssDomainId"] !== undefined ? BigInt(data["cssDomainId"]) : undefined, cssGroupId: data["cssGroupId"] !== undefined ? BigInt(data["cssGroupId"]) : undefined, labelIds: data["labelIds"] !== undefined ? data["labelIds"].map((item: any) => (BigInt(item))) : undefined, }; } /** * Additional options for Content#cssesList. */ export interface CssesListOptions { /** * The maximum number of CSS domains to return. The service may return fewer * than this value. If unspecified, at most 50 CSS domains will be returned. * The maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListCsses` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters * provided to `ListCsses` must match the call that provided the page token. */ pageToken?: string; } /** * A message that represents custom attributes. Exactly one of `value` or * `groupValues` must be provided. Maximum allowed number of characters for each * custom attribute is 10240 (represents sum of characters for name and value). * Maximum 2500 custom attributes can be set per merchant, with total size of * 102.4kB. */ export interface CustomAttribute { /** * Subattributes within this attribute group. Exactly one of value or * groupValues must be provided. */ groupValues?: CustomAttribute[]; /** * The name of the attribute. Underscores will be replaced by spaces upon * insertion. */ name?: string; /** * The value of the attribute. */ value?: string; } export interface CutoffTime { /** * Hour of the cutoff time until which an order has to be placed to be * processed in the same day. Required. */ hour?: number; /** * Minute of the cutoff time until which an order has to be placed to be * processed in the same day. Required. */ minute?: number; /** * Timezone identifier for the cutoff time (for example, "Europe/Zurich"). * List of identifiers. Required. */ timezone?: string; } /** * Datafeed configuration data. */ export interface Datafeed { /** * The two-letter ISO 639-1 language in which the attributes are defined in * the data feed. */ attributeLanguage?: string; /** * Required. The type of data feed. For product inventory feeds, only feeds * for local stores, not online stores, are supported. Acceptable values are: * - "`local products`" - "`product inventory`" - "`products`" */ contentType?: string; /** * Fetch schedule for the feed file. */ fetchSchedule?: DatafeedFetchSchedule; /** * Required. The filename of the feed. All feeds must have a unique file * name. */ fileName?: string; /** * Format of the feed file. */ format?: DatafeedFormat; /** * Required for update. The ID of the data feed. */ id?: bigint; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#datafeed`" */ kind?: string; /** * Required for insert. A descriptive name of the data feed. */ name?: string; /** * The targets this feed should apply to (country, language, destinations). */ targets?: DatafeedTarget[]; } function serializeDatafeed(data: any): Datafeed { return { ...data, id: data["id"] !== undefined ? String(data["id"]) : undefined, }; } function deserializeDatafeed(data: any): Datafeed { return { ...data, id: data["id"] !== undefined ? BigInt(data["id"]) : undefined, }; } /** * The required fields vary based on the frequency of fetching. For a monthly * fetch schedule, day_of_month and hour are required. For a weekly fetch * schedule, weekday and hour are required. For a daily fetch schedule, only * hour is required. */ export interface DatafeedFetchSchedule { /** * The day of the month the feed file should be fetched (1-31). */ dayOfMonth?: number; /** * The URL where the feed file can be fetched. Google Merchant Center will * support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP * protocols, so the value will need to be a valid link using one of those * four protocols. */ fetchUrl?: string; /** * The hour of the day the feed file should be fetched (0-23). */ hour?: number; /** * The minute of the hour the feed file should be fetched (0-59). Read-only. */ minuteOfHour?: number; /** * An optional password for fetch_url. */ password?: string; /** * Whether the scheduled fetch is paused or not. */ paused?: boolean; /** * Time zone used for schedule. UTC by default. For example, * "America/Los_Angeles". */ timeZone?: string; /** * An optional user name for fetch_url. */ username?: string; /** * The day of the week the feed file should be fetched. Acceptable values * are: - "`monday`" - "`tuesday`" - "`wednesday`" - "`thursday`" - "`friday`" * - "`saturday`" - "`sunday`" */ weekday?: string; } export interface DatafeedFormat { /** * Delimiter for the separation of values in a delimiter-separated values * feed. If not specified, the delimiter will be auto-detected. Ignored for * non-DSV data feeds. Acceptable values are: - "`pipe`" - "`tab`" - "`tilde`" * */ columnDelimiter?: string; /** * Character encoding scheme of the data feed. If not specified, the encoding * will be auto-detected. Acceptable values are: - "`latin-1`" - "`utf-16be`" * - "`utf-16le`" - "`utf-8`" - "`windows-1252`" */ fileEncoding?: string; /** * Specifies how double quotes are interpreted. If not specified, the mode * will be auto-detected. Ignored for non-DSV data feeds. Acceptable values * are: - "`normal character`" - "`value quoting`" */ quotingMode?: string; } export interface DatafeedsCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: DatafeedsCustomBatchRequestEntry[]; } function serializeDatafeedsCustomBatchRequest(data: any): DatafeedsCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeDatafeedsCustomBatchRequestEntry(item))) : undefined, }; } function deserializeDatafeedsCustomBatchRequest(data: any): DatafeedsCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeDatafeedsCustomBatchRequestEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch datafeeds request. */ export interface DatafeedsCustomBatchRequestEntry { /** * An entry ID, unique within the batch request. */ batchId?: number; /** * The data feed to insert. */ datafeed?: Datafeed; /** * The ID of the data feed to get, delete or fetch. */ datafeedId?: bigint; /** * The ID of the managing account. */ merchantId?: bigint; /** * The method of the batch entry. Acceptable values are: - "`delete`" - * "`fetchNow`" - "`get`" - "`insert`" - "`update`" */ method?: string; } function serializeDatafeedsCustomBatchRequestEntry(data: any): DatafeedsCustomBatchRequestEntry { return { ...data, datafeed: data["datafeed"] !== undefined ? serializeDatafeed(data["datafeed"]) : undefined, datafeedId: data["datafeedId"] !== undefined ? String(data["datafeedId"]) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeDatafeedsCustomBatchRequestEntry(data: any): DatafeedsCustomBatchRequestEntry { return { ...data, datafeed: data["datafeed"] !== undefined ? deserializeDatafeed(data["datafeed"]) : undefined, datafeedId: data["datafeedId"] !== undefined ? BigInt(data["datafeedId"]) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } export interface DatafeedsCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: DatafeedsCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#datafeedsCustomBatchResponse`". */ kind?: string; } function serializeDatafeedsCustomBatchResponse(data: any): DatafeedsCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeDatafeedsCustomBatchResponseEntry(item))) : undefined, }; } function deserializeDatafeedsCustomBatchResponse(data: any): DatafeedsCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeDatafeedsCustomBatchResponseEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch datafeeds response. */ export interface DatafeedsCustomBatchResponseEntry { /** * The ID of the request entry this entry responds to. */ batchId?: number; /** * The requested data feed. Defined if and only if the request was * successful. */ datafeed?: Datafeed; /** * A list of errors for failed custombatch entries. *Note:* Schema errors * fail the whole request. */ errors?: Errors; } function serializeDatafeedsCustomBatchResponseEntry(data: any): DatafeedsCustomBatchResponseEntry { return { ...data, datafeed: data["datafeed"] !== undefined ? serializeDatafeed(data["datafeed"]) : undefined, }; } function deserializeDatafeedsCustomBatchResponseEntry(data: any): DatafeedsCustomBatchResponseEntry { return { ...data, datafeed: data["datafeed"] !== undefined ? deserializeDatafeed(data["datafeed"]) : undefined, }; } export interface DatafeedsFetchNowResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#datafeedsFetchNowResponse`". */ kind?: string; } /** * Additional options for Content#datafeedsList. */ export interface DatafeedsListOptions { /** * The maximum number of products to return in the response, used for paging. */ maxResults?: number; /** * The token returned by the previous request. */ pageToken?: string; } export interface DatafeedsListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#datafeedsListResponse`". */ kind?: string; /** * The token for the retrieval of the next page of datafeeds. */ nextPageToken?: string; resources?: Datafeed[]; } function serializeDatafeedsListResponse(data: any): DatafeedsListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (serializeDatafeed(item))) : undefined, }; } function deserializeDatafeedsListResponse(data: any): DatafeedsListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (deserializeDatafeed(item))) : undefined, }; } /** * The status of a datafeed, that is, the result of the last retrieval of the * datafeed computed asynchronously when the feed processing is finished. */ export interface DatafeedStatus { /** * The country for which the status is reported, represented as a CLDR * territory code. */ country?: string; /** * The ID of the feed for which the status is reported. */ datafeedId?: bigint; /** * The list of errors occurring in the feed. */ errors?: DatafeedStatusError[]; /** * The feed label status is reported for. */ feedLabel?: string; /** * The number of items in the feed that were processed. */ itemsTotal?: bigint; /** * The number of items in the feed that were valid. */ itemsValid?: bigint; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#datafeedStatus`" */ kind?: string; /** * The two-letter ISO 639-1 language for which the status is reported. */ language?: string; /** * The last date at which the feed was uploaded. */ lastUploadDate?: string; /** * The processing status of the feed. Acceptable values are: - "`"`failure`": * The feed could not be processed or all items had errors.`" - "`in * progress`": The feed is being processed. - "`none`": The feed has not yet * been processed. For example, a feed that has never been uploaded will have * this processing status. - "`success`": The feed was processed successfully, * though some items might have had errors. */ processingStatus?: string; /** * The list of errors occurring in the feed. */ warnings?: DatafeedStatusError[]; } function serializeDatafeedStatus(data: any): DatafeedStatus { return { ...data, datafeedId: data["datafeedId"] !== undefined ? String(data["datafeedId"]) : undefined, errors: data["errors"] !== undefined ? data["errors"].map((item: any) => (serializeDatafeedStatusError(item))) : undefined, itemsTotal: data["itemsTotal"] !== undefined ? String(data["itemsTotal"]) : undefined, itemsValid: data["itemsValid"] !== undefined ? String(data["itemsValid"]) : undefined, warnings: data["warnings"] !== undefined ? data["warnings"].map((item: any) => (serializeDatafeedStatusError(item))) : undefined, }; } function deserializeDatafeedStatus(data: any): DatafeedStatus { return { ...data, datafeedId: data["datafeedId"] !== undefined ? BigInt(data["datafeedId"]) : undefined, errors: data["errors"] !== undefined ? data["errors"].map((item: any) => (deserializeDatafeedStatusError(item))) : undefined, itemsTotal: data["itemsTotal"] !== undefined ? BigInt(data["itemsTotal"]) : undefined, itemsValid: data["itemsValid"] !== undefined ? BigInt(data["itemsValid"]) : undefined, warnings: data["warnings"] !== undefined ? data["warnings"].map((item: any) => (deserializeDatafeedStatusError(item))) : undefined, }; } /** * An error occurring in the feed, like "invalid price". */ export interface DatafeedStatusError { /** * The code of the error, for example, "validation/invalid_value". */ code?: string; /** * The number of occurrences of the error in the feed. */ count?: bigint; /** * A list of example occurrences of the error, grouped by product. */ examples?: DatafeedStatusExample[]; /** * The error message, for example, "Invalid price". */ message?: string; } function serializeDatafeedStatusError(data: any): DatafeedStatusError { return { ...data, count: data["count"] !== undefined ? String(data["count"]) : undefined, examples: data["examples"] !== undefined ? data["examples"].map((item: any) => (serializeDatafeedStatusExample(item))) : undefined, }; } function deserializeDatafeedStatusError(data: any): DatafeedStatusError { return { ...data, count: data["count"] !== undefined ? BigInt(data["count"]) : undefined, examples: data["examples"] !== undefined ? data["examples"].map((item: any) => (deserializeDatafeedStatusExample(item))) : undefined, }; } export interface DatafeedstatusesCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: DatafeedstatusesCustomBatchRequestEntry[]; } function serializeDatafeedstatusesCustomBatchRequest(data: any): DatafeedstatusesCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeDatafeedstatusesCustomBatchRequestEntry(item))) : undefined, }; } function deserializeDatafeedstatusesCustomBatchRequest(data: any): DatafeedstatusesCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeDatafeedstatusesCustomBatchRequestEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch datafeedstatuses request. */ export interface DatafeedstatusesCustomBatchRequestEntry { /** * An entry ID, unique within the batch request. */ batchId?: number; /** * Deprecated. Use `feedLabel` instead. The country to get the datafeed * status for. If this parameter is provided, then `language` must also be * provided. Note that for multi-target datafeeds this parameter is required. */ country?: string; /** * The ID of the data feed to get. */ datafeedId?: bigint; /** * The feed label to get the datafeed status for. If this parameter is * provided, then `language` must also be provided. Note that for multi-target * datafeeds this parameter is required. */ feedLabel?: string; /** * The language to get the datafeed status for. If this parameter is provided * then `country` must also be provided. Note that for multi-target datafeeds * this parameter is required. */ language?: string; /** * The ID of the managing account. */ merchantId?: bigint; /** * The method of the batch entry. Acceptable values are: - "`get`" */ method?: string; } function serializeDatafeedstatusesCustomBatchRequestEntry(data: any): DatafeedstatusesCustomBatchRequestEntry { return { ...data, datafeedId: data["datafeedId"] !== undefined ? String(data["datafeedId"]) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeDatafeedstatusesCustomBatchRequestEntry(data: any): DatafeedstatusesCustomBatchRequestEntry { return { ...data, datafeedId: data["datafeedId"] !== undefined ? BigInt(data["datafeedId"]) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } export interface DatafeedstatusesCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: DatafeedstatusesCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#datafeedstatusesCustomBatchResponse`". */ kind?: string; } function serializeDatafeedstatusesCustomBatchResponse(data: any): DatafeedstatusesCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeDatafeedstatusesCustomBatchResponseEntry(item))) : undefined, }; } function deserializeDatafeedstatusesCustomBatchResponse(data: any): DatafeedstatusesCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeDatafeedstatusesCustomBatchResponseEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch datafeedstatuses response. */ export interface DatafeedstatusesCustomBatchResponseEntry { /** * The ID of the request entry this entry responds to. */ batchId?: number; /** * The requested data feed status. Defined if and only if the request was * successful. */ datafeedStatus?: DatafeedStatus; /** * A list of errors for failed custombatch entries. *Note:* Schema errors * fail the whole request. */ errors?: Errors; } function serializeDatafeedstatusesCustomBatchResponseEntry(data: any): DatafeedstatusesCustomBatchResponseEntry { return { ...data, datafeedStatus: data["datafeedStatus"] !== undefined ? serializeDatafeedStatus(data["datafeedStatus"]) : undefined, }; } function deserializeDatafeedstatusesCustomBatchResponseEntry(data: any): DatafeedstatusesCustomBatchResponseEntry { return { ...data, datafeedStatus: data["datafeedStatus"] !== undefined ? deserializeDatafeedStatus(data["datafeedStatus"]) : undefined, }; } /** * Additional options for Content#datafeedstatusesGet. */ export interface DatafeedstatusesGetOptions { /** * Deprecated. Use `feedLabel` instead. The country to get the datafeed * status for. If this parameter is provided then `language` must also be * provided. Note that this parameter is required for feeds targeting multiple * countries and languages, since a feed may have a different status for each * target. */ country?: string; /** * The feed label to get the datafeed status for. If this parameter is * provided then `language` must also be provided. Note that this parameter is * required for feeds targeting multiple countries and languages, since a feed * may have a different status for each target. */ feedLabel?: string; /** * The language to get the datafeed status for. If this parameter is provided * then `country` must also be provided. Note that this parameter is required * for feeds targeting multiple countries and languages, since a feed may have * a different status for each target. */ language?: string; } /** * Additional options for Content#datafeedstatusesList. */ export interface DatafeedstatusesListOptions { /** * The maximum number of products to return in the response, used for paging. */ maxResults?: number; /** * The token returned by the previous request. */ pageToken?: string; } export interface DatafeedstatusesListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#datafeedstatusesListResponse`". */ kind?: string; /** * The token for the retrieval of the next page of datafeed statuses. */ nextPageToken?: string; resources?: DatafeedStatus[]; } function serializeDatafeedstatusesListResponse(data: any): DatafeedstatusesListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (serializeDatafeedStatus(item))) : undefined, }; } function deserializeDatafeedstatusesListResponse(data: any): DatafeedstatusesListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (deserializeDatafeedStatus(item))) : undefined, }; } /** * An example occurrence for a particular error. */ export interface DatafeedStatusExample { /** * The ID of the example item. */ itemId?: string; /** * Line number in the data feed where the example is found. */ lineNumber?: bigint; /** * The problematic value. */ value?: string; } function serializeDatafeedStatusExample(data: any): DatafeedStatusExample { return { ...data, lineNumber: data["lineNumber"] !== undefined ? String(data["lineNumber"]) : undefined, }; } function deserializeDatafeedStatusExample(data: any): DatafeedStatusExample { return { ...data, lineNumber: data["lineNumber"] !== undefined ? BigInt(data["lineNumber"]) : undefined, }; } export interface DatafeedTarget { /** * Deprecated. Use `feedLabel` instead. The country where the items in the * feed will be included in the search index, represented as a CLDR territory * code. */ country?: string; /** * The list of [destinations to * exclude](//support.google.com/merchants/answer/6324486) for this target * (corresponds to cleared check boxes in Merchant Center). Products that are * excluded from all destinations for more than 7 days are automatically * deleted. */ excludedDestinations?: string[]; /** * Feed label for the DatafeedTarget. Either `country` or `feedLabel` is * required. If both `feedLabel` and `country` is specified, the values must * match. Must be less than or equal to 20 uppercase letters (A-Z), numbers * (0-9), and dashes (-). */ feedLabel?: string; /** * The list of [destinations to * include](//support.google.com/merchants/answer/7501026) for this target * (corresponds to checked check boxes in Merchant Center). Default * destinations are always included unless provided in `excludedDestinations`. */ includedDestinations?: string[]; /** * The two-letter ISO 639-1 language of the items in the feed. Must be a * valid language for `targets[].country`. */ language?: string; /** * The countries where the items may be displayed. Represented as a CLDR * territory code. Will be ignored for "product inventory" feeds. */ targetCountries?: string[]; } /** * Represents a whole or partial calendar date, such as a birthday. The time of * day and time zone are either specified elsewhere or are insignificant. The * date is relative to the Gregorian Calendar. This can represent one of the * following: * A full date, with non-zero year, month, and day values. * A * month and day, with a zero year (for example, an anniversary). * A year on * its own, with a zero month and a zero day. * A year and month, with a zero * day (for example, a credit card expiration date). Related types: * * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */ export interface Date { /** * Day of a month. Must be from 1 to 31 and valid for the year and month, or * 0 to specify a year by itself or a year and month where the day isn't * significant. */ day?: number; /** * Month of a year. Must be from 1 to 12, or 0 to specify a year without a * month and day. */ month?: number; /** * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a * year. */ year?: number; } /** * Represents civil time (or occasionally physical time). This type can * represent a civil time in one of a few possible ways: * When utc_offset is * set and time_zone is unset: a civil time on a calendar day with a particular * offset from UTC. * When time_zone is set and utc_offset is unset: a civil * time on a calendar day in a particular time zone. * When neither time_zone * nor utc_offset is set: a civil time on a calendar day in local time. The date * is relative to the Proleptic Gregorian Calendar. If year, month, or day are * 0, the DateTime is considered not to have a specific year, month, or day * respectively. This type may also be used to represent a physical time if all * the date and time fields are set and either case of the `time_offset` oneof * is set. Consider using `Timestamp` message for physical time instead. If your * use case also would like to store the user's timezone, that can be done in * another field. This type is more flexible than some applications may want. * Make sure to document and validate your application's limitations. */ export interface DateTime { /** * Optional. Day of month. Must be from 1 to 31 and valid for the year and * month, or 0 if specifying a datetime without a day. */ day?: number; /** * Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults * to 0 (midnight). An API may choose to allow the value "24:00:00" for * scenarios like business closing time. */ hours?: number; /** * Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. */ minutes?: number; /** * Optional. Month of year. Must be from 1 to 12, or 0 if specifying a * datetime without a month. */ month?: number; /** * Optional. Fractions of seconds in nanoseconds. Must be from 0 to * 999,999,999, defaults to 0. */ nanos?: number; /** * Optional. Seconds of minutes of the time. Must normally be from 0 to 59, * defaults to 0. An API may allow the value 60 if it allows leap-seconds. */ seconds?: number; /** * Time zone. */ timeZone?: TimeZone; /** * UTC offset. Must be whole seconds, between -18 hours and +18 hours. For * example, a UTC offset of -4:00 would be represented as { seconds: -14400 }. */ utcOffset?: number /* Duration */; /** * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a * datetime without a year. */ year?: number; } function serializeDateTime(data: any): DateTime { return { ...data, utcOffset: data["utcOffset"] !== undefined ? data["utcOffset"] : undefined, }; } function deserializeDateTime(data: any): DateTime { return { ...data, utcOffset: data["utcOffset"] !== undefined ? data["utcOffset"] : undefined, }; } /** * A delivery area for the product. Only one of `countryCode` or * `postalCodeRange` must be set. */ export interface DeliveryArea { /** * Required. The country that the product can be delivered to. Submit a * [unicode CLDR * region](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) * such as `US` or `CH`. */ countryCode?: string; /** * A postal code, postal code range or postal code prefix that defines this * area. Limited to US and AUS. */ postalCodeRange?: DeliveryAreaPostalCodeRange; /** * A state, territory, or prefecture. This is supported for the United * States, Australia, and Japan. Provide a subdivision code from the ISO * 3166-2 code tables ([US](https://en.wikipedia.org/wiki/ISO_3166-2:US), * [AU](https://en.wikipedia.org/wiki/ISO_3166-2:AU), or * [JP](https://en.wikipedia.org/wiki/ISO_3166-2:JP)) without country prefix * (for example, `"NY"`, `"NSW"`, `"03"`). */ regionCode?: string; } /** * A range of postal codes that defines the delivery area. Only set * `firstPostalCode` when specifying a single postal code. */ export interface DeliveryAreaPostalCodeRange { /** * Required. A postal code or a pattern of the form prefix* denoting the * inclusive lower bound of the range defining the area. Examples values: * `"94108"`, `"9410*"`, `"9*"`. */ firstPostalCode?: string; /** * A postal code or a pattern of the form prefix* denoting the inclusive * upper bound of the range defining the area (for example [070* - 078*] * results in the range [07000 - 07899]). It must have the same length as * `firstPostalCode`: if `firstPostalCode` is a postal code then * `lastPostalCode` must be a postal code too; if firstPostalCode is a pattern * then `lastPostalCode` must be a pattern with the same prefix length. * Ignored if not set, then the area is defined as being all the postal codes * matching `firstPostalCode`. */ lastPostalCode?: string; } export interface DeliveryTime { /** * Business days cutoff time definition. If not configured, the cutoff time * will be defaulted to 8AM PST. If local delivery, use * Service.StoreConfig.CutoffConfig. */ cutoffTime?: CutoffTime; /** * The business days during which orders can be handled. If not provided, * Monday to Friday business days will be assumed. */ handlingBusinessDayConfig?: BusinessDayConfig; /** * Holiday cutoff definitions. If configured, they specify order cutoff times * for holiday-specific shipping. */ holidayCutoffs?: HolidayCutoff[]; /** * Maximum number of business days spent before an order is shipped. 0 means * same day shipped, 1 means next day shipped. Must be greater than or equal * to `minHandlingTimeInDays`. */ maxHandlingTimeInDays?: number; /** * Maximum number of business days that are spent in transit. 0 means same * day delivery, 1 means next day delivery. Must be greater than or equal to * `minTransitTimeInDays`. */ maxTransitTimeInDays?: number; /** * Minimum number of business days spent before an order is shipped. 0 means * same day shipped, 1 means next day shipped. */ minHandlingTimeInDays?: number; /** * Minimum number of business days that are spent in transit. 0 means same * day delivery, 1 means next day delivery. Either * `{min,max}TransitTimeInDays` or `transitTimeTable` must be set, but not * both. */ minTransitTimeInDays?: number; /** * The business days during which orders can be in-transit. If not provided, * Monday to Friday business days will be assumed. */ transitBusinessDayConfig?: BusinessDayConfig; /** * Transit time table, number of business days spent in transit based on row * and column dimensions. Either `{min,max}TransitTimeInDays` or * `transitTimeTable` can be set, but not both. */ transitTimeTable?: TransitTable; /** * Indicates that the delivery time should be calculated per warehouse * (shipping origin location) based on the settings of the selected carrier. * When set, no other transit time related field in DeliveryTime should be * set. */ warehouseBasedDeliveryTimes?: WarehouseBasedDeliveryTime[]; } /** * Distance represented by an integer and unit. */ export interface Distance { /** * The distance unit. Acceptable values are `None`, `Miles`, and * `Kilometers`. */ unit?: string; /** * The distance represented as a number. */ value?: bigint; } function serializeDistance(data: any): Distance { return { ...data, value: data["value"] !== undefined ? String(data["value"]) : undefined, }; } function deserializeDistance(data: any): Distance { return { ...data, value: data["value"] !== undefined ? BigInt(data["value"]) : undefined, }; } /** * Additional information required for E_COMMERCE_PLATFORM link type. */ export interface ECommercePlatformLinkInfo { /** * The id used by the third party service provider to identify the merchant. */ externalAccountId?: string; } /** * An error returned by the API. */ export interface Error { /** * The domain of the error. */ domain?: string; /** * A description of the error. */ message?: string; /** * The error code. */ reason?: string; } /** * A list of errors returned by a failed batch entry. */ export interface Errors { /** * The HTTP status of the first error in `errors`. */ code?: number; /** * A list of errors. */ errors?: Error[]; /** * The message of the first error in `errors`. */ message?: string; } /** * Action that is implemented and performed outside of the third-party * application. It should redirect the merchant to the provided URL of an * external system where they can perform the action. For example to request a * review in the Merchant Center. */ export interface ExternalAction { /** * The type of external action. */ type?: | "EXTERNAL_ACTION_TYPE_UNSPECIFIED" | "REVIEW_PRODUCT_ISSUE_IN_MERCHANT_CENTER" | "REVIEW_ACCOUNT_ISSUE_IN_MERCHANT_CENTER" | "LEGAL_APPEAL_IN_HELP_CENTER" | "VERIFY_IDENTITY_IN_MERCHANT_CENTER"; /** * URL to external system, for example Merchant Center, where the merchant * can perform the action. */ uri?: string; } /** * Response message for GetFreeListingsProgramStatus. */ export interface FreeListingsProgramStatus { /** * State of the program. `ENABLED` if there are offers for at least one * region. */ globalState?: | "PROGRAM_STATE_UNSPECIFIED" | "NOT_ENABLED" | "NO_OFFERS_UPLOADED" | "ENABLED"; /** * Status of the program in each region. Regions with the same status and * review eligibility are grouped together in `regionCodes`. */ regionStatuses?: FreeListingsProgramStatusRegionStatus[]; } function serializeFreeListingsProgramStatus(data: any): FreeListingsProgramStatus { return { ...data, regionStatuses: data["regionStatuses"] !== undefined ? data["regionStatuses"].map((item: any) => (serializeFreeListingsProgramStatusRegionStatus(item))) : undefined, }; } function deserializeFreeListingsProgramStatus(data: any): FreeListingsProgramStatus { return { ...data, regionStatuses: data["regionStatuses"] !== undefined ? data["regionStatuses"].map((item: any) => (deserializeFreeListingsProgramStatusRegionStatus(item))) : undefined, }; } /** * Status of program and region. */ export interface FreeListingsProgramStatusRegionStatus { /** * Date by which eligibilityStatus will go from `WARNING` to `DISAPPROVED`. * Only visible when your eligibilityStatus is WARNING. In [ISO * 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`. */ disapprovalDate?: string; /** * Eligibility status of the standard free listing program. */ eligibilityStatus?: | "STATE_UNSPECIFIED" | "APPROVED" | "DISAPPROVED" | "WARNING" | "UNDER_REVIEW" | "PENDING_REVIEW" | "ONBOARDING"; /** * Issues that must be fixed to be eligible for review. */ onboardingIssues?: string[]; /** * The two-letter [ISO 3166-1 * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all * the regions with the same `eligibilityStatus` and `reviewEligibility`. */ regionCodes?: string[]; /** * If a program is eligible for review in a specific region. Only visible if * `eligibilityStatus` is `DISAPPROVED`. */ reviewEligibilityStatus?: | "REVIEW_ELIGIBILITY_UNSPECIFIED" | "ELIGIBLE" | "INELIGIBLE"; /** * Review ineligibility reason if account is not eligible for review. */ reviewIneligibilityReason?: | "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED" | "ONBOARDING_ISSUES" | "NOT_ENOUGH_OFFERS" | "IN_COOLDOWN_PERIOD" | "ALREADY_UNDER_REVIEW" | "NO_REVIEW_REQUIRED" | "WILL_BE_REVIEWED_AUTOMATICALLY" | "IS_RETIRED" | "ALREADY_REVIEWED"; /** * Reason a program in a specific region isn’t eligible for review. Only * visible if `reviewEligibilityStatus` is `INELIGIBLE`. */ reviewIneligibilityReasonDescription?: string; /** * Additional information for ineligibility. If `reviewIneligibilityReason` * is `IN_COOLDOWN_PERIOD`, a timestamp for the end of the cooldown period is * provided. */ reviewIneligibilityReasonDetails?: FreeListingsProgramStatusReviewIneligibilityReasonDetails; /** * Issues evaluated in the review process. Fix all issues before requesting a * review. */ reviewIssues?: string[]; } function serializeFreeListingsProgramStatusRegionStatus(data: any): FreeListingsProgramStatusRegionStatus { return { ...data, reviewIneligibilityReasonDetails: data["reviewIneligibilityReasonDetails"] !== undefined ? serializeFreeListingsProgramStatusReviewIneligibilityReasonDetails(data["reviewIneligibilityReasonDetails"]) : undefined, }; } function deserializeFreeListingsProgramStatusRegionStatus(data: any): FreeListingsProgramStatusRegionStatus { return { ...data, reviewIneligibilityReasonDetails: data["reviewIneligibilityReasonDetails"] !== undefined ? deserializeFreeListingsProgramStatusReviewIneligibilityReasonDetails(data["reviewIneligibilityReasonDetails"]) : undefined, }; } /** * Additional details for review ineligibility reasons. */ export interface FreeListingsProgramStatusReviewIneligibilityReasonDetails { /** * This timestamp represents end of cooldown period for review ineligbility * reason `IN_COOLDOWN_PERIOD`. */ cooldownTime?: Date; } function serializeFreeListingsProgramStatusReviewIneligibilityReasonDetails(data: any): FreeListingsProgramStatusReviewIneligibilityReasonDetails { return { ...data, cooldownTime: data["cooldownTime"] !== undefined ? data["cooldownTime"].toISOString() : undefined, }; } function deserializeFreeListingsProgramStatusReviewIneligibilityReasonDetails(data: any): FreeListingsProgramStatusReviewIneligibilityReasonDetails { return { ...data, cooldownTime: data["cooldownTime"] !== undefined ? new Date(data["cooldownTime"]) : undefined, }; } /** * Conditions to be met for a product to have free shipping. */ export interface FreeShippingThreshold { /** * Required. The [CLDR territory * code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) of * the country to which an item will ship. */ country?: string; /** * Required. The minimum product price for the shipping cost to become free. * Represented as a number. */ priceThreshold?: Price; } /** * Response containing generated recommendations. */ export interface GenerateRecommendationsResponse { /** * Recommendations generated for a request. */ recommendations?: Recommendation[]; /** * Output only. Response token is a string created for each * `GenerateRecommendationsResponse`. This token doesn't expire, and is * globally unique. This token must be used when reporting interactions for * recommendations. */ readonly responseToken?: string; } export interface GmbAccounts { /** * The ID of the Merchant Center account. */ accountId?: bigint; /** * A list of Business Profiles which are available to the merchant. */ gmbAccounts?: GmbAccountsGmbAccount[]; } function serializeGmbAccounts(data: any): GmbAccounts { return { ...data, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, gmbAccounts: data["gmbAccounts"] !== undefined ? data["gmbAccounts"].map((item: any) => (serializeGmbAccountsGmbAccount(item))) : undefined, }; } function deserializeGmbAccounts(data: any): GmbAccounts { return { ...data, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, gmbAccounts: data["gmbAccounts"] !== undefined ? data["gmbAccounts"].map((item: any) => (deserializeGmbAccountsGmbAccount(item))) : undefined, }; } export interface GmbAccountsGmbAccount { /** * The email which identifies the Business Profile. */ email?: string; /** * Number of listings under this account. */ listingCount?: bigint; /** * The name of the Business Profile. */ name?: string; /** * The type of the Business Profile (User or Business). */ type?: string; } function serializeGmbAccountsGmbAccount(data: any): GmbAccountsGmbAccount { return { ...data, listingCount: data["listingCount"] !== undefined ? String(data["listingCount"]) : undefined, }; } function deserializeGmbAccountsGmbAccount(data: any): GmbAccountsGmbAccount { return { ...data, listingCount: data["listingCount"] !== undefined ? BigInt(data["listingCount"]) : undefined, }; } /** * "Google Analytics Link" sources can be used to get conversion data from an * existing Google Analytics property into the linked Merchant Center account. */ export interface GoogleAnalyticsLink { /** * Output only. Attribution settings for the linked Google Analytics * property. */ readonly attributionSettings?: AttributionSettings; /** * Required. Immutable. ID of the Google Analytics property the merchant is * linked to. */ propertyId?: bigint; /** * Output only. Name of the Google Analytics property the merchant is linked * to. */ readonly propertyName?: string; } function serializeGoogleAnalyticsLink(data: any): GoogleAnalyticsLink { return { ...data, propertyId: data["propertyId"] !== undefined ? String(data["propertyId"]) : undefined, }; } function deserializeGoogleAnalyticsLink(data: any): GoogleAnalyticsLink { return { ...data, propertyId: data["propertyId"] !== undefined ? BigInt(data["propertyId"]) : undefined, }; } /** * A non-empty list of row or column headers for a table. Exactly one of * `prices`, `weights`, `numItems`, `postalCodeGroupNames`, or `location` must * be set. */ export interface Headers { /** * A list of location ID sets. Must be non-empty. Can only be set if all * other fields are not set. */ locations?: LocationIdSet[]; /** * A list of inclusive number of items upper bounds. The last value can be * `"infinity"`. For example `["10", "50", "infinity"]` represents the headers * "<= 10 items", "<= 50 items", and "> 50 items". Must be non-empty. Can only * be set if all other fields are not set. */ numberOfItems?: string[]; /** * A list of postal group names. The last value can be `"all other * locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The * referred postal code groups must match the delivery country of the service. * Must be non-empty. Can only be set if all other fields are not set. */ postalCodeGroupNames?: string[]; /** * A list of inclusive order price upper bounds. The last price's value can * be `"infinity"`. For example `[{"value": "10", "currency": "USD"}, * {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": * "USD"}]` represents the headers "<= $10", "<= $500", and "> $500". All * prices within a service must have the same currency. Must be non-empty. Can * only be set if all other fields are not set. */ prices?: Price[]; /** * A list of inclusive order weight upper bounds. The last weight's value can * be `"infinity"`. For example `[{"value": "10", "unit": "kg"}, {"value": * "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}]` represents the * headers "<= 10kg", "<= 50kg", and "> 50kg". All weights within a service * must have the same unit. Must be non-empty. Can only be set if all other * fields are not set. */ weights?: Weight[]; } export interface HolidayCutoff { /** * Date of the order deadline, in ISO 8601 format. For example, "2016-11-29" * for 29th November 2016. Required. */ deadlineDate?: string; /** * Hour of the day on the deadline date until which the order has to be * placed to qualify for the delivery guarantee. Possible values are: 0 * (midnight), 1, ..., 12 (noon), 13, ..., 23. Required. */ deadlineHour?: number; /** * Timezone identifier for the deadline hour (for example, "Europe/Zurich"). * List of identifiers. Required. */ deadlineTimezone?: string; /** * Unique identifier for the holiday. Required. */ holidayId?: string; /** * Date on which the deadline will become visible to consumers in ISO 8601 * format. For example, "2016-10-31" for 31st October 2016. Required. */ visibleFromDate?: string; } export interface HolidaysHoliday { /** * The CLDR territory code of the country in which the holiday is available. * For example, "US", "DE", "GB". A holiday cutoff can only be configured in a * shipping settings service with matching delivery country. Always present. */ countryCode?: string; /** * Date of the holiday, in ISO 8601 format. For example, "2016-12-25" for * Christmas 2016. Always present. */ date?: string; /** * Date on which the order has to arrive at the customer's, in ISO 8601 * format. For example, "2016-12-24" for 24th December 2016. Always present. */ deliveryGuaranteeDate?: string; /** * Hour of the day in the delivery location's timezone on the guaranteed * delivery date by which the order has to arrive at the customer's. Possible * values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23. Always present. */ deliveryGuaranteeHour?: bigint; /** * Unique identifier for the holiday to be used when configuring holiday * cutoffs. Always present. */ id?: string; /** * The holiday type. Always present. Acceptable values are: - "`Christmas`" - * "`Easter`" - "`Father's Day`" - "`Halloween`" - "`Independence Day (USA)`" * - "`Mother's Day`" - "`Thanksgiving`" - "`Valentine's Day`" */ type?: string; } function serializeHolidaysHoliday(data: any): HolidaysHoliday { return { ...data, deliveryGuaranteeHour: data["deliveryGuaranteeHour"] !== undefined ? String(data["deliveryGuaranteeHour"]) : undefined, }; } function deserializeHolidaysHoliday(data: any): HolidaysHoliday { return { ...data, deliveryGuaranteeHour: data["deliveryGuaranteeHour"] !== undefined ? BigInt(data["deliveryGuaranteeHour"]) : undefined, }; } /** * Input field that needs to be available to the merchant. If the field is * marked as required, then a value needs to be provided for a successful * processing of the request. */ export interface InputField { /** * Input field to provide a boolean value. Corresponds to the [html input * type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). */ checkboxInput?: InputFieldCheckboxInput; /** * Input field to select one of the offered choices. Corresponds to the [html * input * type=radio](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.radio.html#input.radio). */ choiceInput?: InputFieldChoiceInput; /** * Not for display but need to be sent back for the given input field. */ id?: string; /** * Input field label. There may be more information to be shown in a tooltip. */ label?: TextWithTooltip; /** * Whether the field is required. The action button needs to stay disabled * till values for all required fields are provided. */ required?: boolean; /** * Input field to provide text information. Corresponds to the [html input * type=text](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.text.html#input.text) * or [html * textarea](https://www.w3.org/TR/2012/WD-html-markup-20121025/textarea.html#textarea). */ textInput?: InputFieldTextInput; } /** * Checkbox input allows merchants to provide a boolean value. Corresponds to * the [html input * type=checkbox](https://www.w3.org/TR/2012/WD-html-markup-20121025/input.checkbox.html#input.checkbox). * If merchant checks the box, the input value for the field is `true`, * otherwise it is `false`. This type of input is often used as a confirmation * that the merchant completed required steps before they are allowed to start * the action. In such a case, the input field is marked as required and the * button to trigger the action should stay disabled until the merchant checks * the box. */ export interface InputFieldCheckboxInput { } /** * Choice input allows merchants to select one of the offered choices. Some * choices may be linked to additional input fields that should be displayed * under or next to the choice option. The value for the additional input field * needs to be provided only when the specific choice is selected by the * merchant. For example, additional input field can be hidden or disabled until * the merchant selects the specific choice. */ export interface InputFieldChoiceInput { /** * A list of choices. Only one option can be selected. */ options?: InputFieldChoiceInputChoiceInputOption[]; } /** * A choice that merchant can select. */ export interface InputFieldChoiceInputChoiceInputOption { /** * Input that should be displayed when this option is selected. The * additional input will not contain a `ChoiceInput`. */ additionalInput?: InputField; /** * Not for display but need to be sent back for the selected choice option. */ id?: string; /** * Short description of the choice option. There may be more information to * be shown as a tooltip. */ label?: TextWithTooltip; } /** * Text input allows merchants to provide a text value. */ export interface InputFieldTextInput { /** * Additional info regarding the field to be displayed to merchant. For * example, warning to not include personal identifiable information. There * may be more information to be shown in a tooltip. */ additionalInfo?: TextWithTooltip; /** * Text to be used as the * [aria-label](https://www.w3.org/TR/WCAG20-TECHS/ARIA14.html) for the input. */ ariaLabel?: string; /** * Information about the required format. If present, it should be shown * close to the input field to help merchants to provide a correct value. For * example: "VAT numbers should be in a format similar to SK9999999999" */ formatInfo?: string; /** * Type of the text input */ type?: | "TEXT_INPUT_TYPE_UNSPECIFIED" | "GENERIC_SHORT_TEXT" | "GENERIC_LONG_TEXT"; } /** * Input provided by the merchant for input field. */ export interface InputValue { /** * Value for checkbox input field. */ checkboxInputValue?: InputValueCheckboxInputValue; /** * Value for choice input field. */ choiceInputValue?: InputValueChoiceInputValue; /** * Required. Id of the corresponding input field. */ inputFieldId?: string; /** * Value for text input field. */ textInputValue?: InputValueTextInputValue; } /** * Value for checkbox input field. */ export interface InputValueCheckboxInputValue { /** * Required. True if the merchant checked the box field. False otherwise. */ value?: boolean; } /** * Value for choice input field. */ export interface InputValueChoiceInputValue { /** * Required. Id of the option that was selected by the merchant. */ choiceInputOptionId?: string; } /** * Value for text input field. */ export interface InputValueTextInputValue { /** * Required. Text provided by the merchant. */ value?: string; } /** * Request message for the `InsertCheckoutSettings` method. */ export interface InsertCheckoutSettingsRequest { /** * Required. The `UrlSettings` for the request. The presence of URL settings * indicates `Checkout` enrollment. */ uriSettings?: UrlSettings; } /** * Details of a monthly installment payment offering. [Learn * more](https://support.google.com/merchants/answer/6324474) about * installments. */ export interface Installment { /** * The amount the buyer has to pay per month. */ amount?: Price; /** * Optional. Type of installment payments. Supported values are: - * "`finance`" - "`lease`" */ creditType?: string; /** * Optional. The initial down payment amount the buyer has to pay. */ downpayment?: Price; /** * The number of installments the buyer has to pay. */ months?: bigint; } function serializeInstallment(data: any): Installment { return { ...data, months: data["months"] !== undefined ? String(data["months"]) : undefined, }; } function deserializeInstallment(data: any): Installment { return { ...data, months: data["months"] !== undefined ? BigInt(data["months"]) : undefined, }; } /** * The IDs of labels that should be assigned to the CSS domain. */ export interface LabelIds { /** * The list of label IDs. */ labelIds?: bigint[]; } function serializeLabelIds(data: any): LabelIds { return { ...data, labelIds: data["labelIds"] !== undefined ? data["labelIds"].map((item: any) => (String(item))) : undefined, }; } function deserializeLabelIds(data: any): LabelIds { return { ...data, labelIds: data["labelIds"] !== undefined ? data["labelIds"].map((item: any) => (BigInt(item))) : undefined, }; } export interface LiaAboutPageSettings { /** * The status of the verification process for the About page. Supported * values are: - "`active`" - "`inactive`" - "`pending`" */ status?: string; /** * The URL for the About page. */ url?: string; } export interface LiaCountrySettings { /** * The settings for the About page. */ about?: LiaAboutPageSettings; /** * Required. CLDR country code (for example, "US"). */ country?: string; /** * The status of the "Merchant hosted local storefront" feature. */ hostedLocalStorefrontActive?: boolean; /** * LIA inventory verification settings. */ inventory?: LiaInventorySettings; /** * The omnichannel experience configured for this country. */ omnichannelExperience?: LiaOmnichannelExperience; /** * LIA "On Display To Order" settings. */ onDisplayToOrder?: LiaOnDisplayToOrderSettings; /** * The POS data provider linked with this country. */ posDataProvider?: LiaPosDataProvider; /** * The status of the "Store pickup" feature. */ storePickupActive?: boolean; } function serializeLiaCountrySettings(data: any): LiaCountrySettings { return { ...data, posDataProvider: data["posDataProvider"] !== undefined ? serializeLiaPosDataProvider(data["posDataProvider"]) : undefined, }; } function deserializeLiaCountrySettings(data: any): LiaCountrySettings { return { ...data, posDataProvider: data["posDataProvider"] !== undefined ? deserializeLiaPosDataProvider(data["posDataProvider"]) : undefined, }; } export interface LiaInventorySettings { /** * The email of the contact for the inventory verification process. */ inventoryVerificationContactEmail?: string; /** * The name of the contact for the inventory verification process. */ inventoryVerificationContactName?: string; /** * The status of the verification contact. Acceptable values are: - * "`active`" - "`inactive`" - "`pending`" */ inventoryVerificationContactStatus?: string; /** * The status of the inventory verification process. Acceptable values are: - * "`active`" - "`inactive`" - "`pending`" */ status?: string; } /** * Omnichannel experience details. */ export interface LiaOmnichannelExperience { /** * The CLDR country code (for example, "US"). */ country?: string; /** * The Local Store Front (LSF) type for this country. Acceptable values are: * - "`ghlsf`" (Google-Hosted Local Store Front) - "`mhlsfBasic`" * (Merchant-Hosted Local Store Front Basic) - "`mhlsfFull`" (Merchant-Hosted * Local Store Front Full) More details about these types can be found here. */ lsfType?: string; /** * The Pickup types for this country. Acceptable values are: - * "`pickupToday`" - "`pickupLater`" */ pickupTypes?: string[]; } export interface LiaOnDisplayToOrderSettings { /** * Shipping cost and policy URL. */ shippingCostPolicyUrl?: string; /** * The status of the ?On display to order? feature. Acceptable values are: - * "`active`" - "`inactive`" - "`pending`" */ status?: string; } export interface LiaPosDataProvider { /** * The ID of the POS data provider. */ posDataProviderId?: bigint; /** * The account ID by which this merchant is known to the POS data provider. */ posExternalAccountId?: string; } function serializeLiaPosDataProvider(data: any): LiaPosDataProvider { return { ...data, posDataProviderId: data["posDataProviderId"] !== undefined ? String(data["posDataProviderId"]) : undefined, }; } function deserializeLiaPosDataProvider(data: any): LiaPosDataProvider { return { ...data, posDataProviderId: data["posDataProviderId"] !== undefined ? BigInt(data["posDataProviderId"]) : undefined, }; } /** * Local Inventory ads (LIA) settings. All methods except listposdataproviders * require the admin role. */ export interface LiaSettings { /** * The ID of the account to which these LIA settings belong. Ignored upon * update, always present in get request responses. */ accountId?: bigint; /** * The LIA settings for each country. */ countrySettings?: LiaCountrySettings[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#liaSettings`" */ kind?: string; } function serializeLiaSettings(data: any): LiaSettings { return { ...data, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, countrySettings: data["countrySettings"] !== undefined ? data["countrySettings"].map((item: any) => (serializeLiaCountrySettings(item))) : undefined, }; } function deserializeLiaSettings(data: any): LiaSettings { return { ...data, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, countrySettings: data["countrySettings"] !== undefined ? data["countrySettings"].map((item: any) => (deserializeLiaCountrySettings(item))) : undefined, }; } export interface LiasettingsCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: LiasettingsCustomBatchRequestEntry[]; } function serializeLiasettingsCustomBatchRequest(data: any): LiasettingsCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeLiasettingsCustomBatchRequestEntry(item))) : undefined, }; } function deserializeLiasettingsCustomBatchRequest(data: any): LiasettingsCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeLiasettingsCustomBatchRequestEntry(item))) : undefined, }; } export interface LiasettingsCustomBatchRequestEntry { /** * The ID of the account for which to get/update account LIA settings. */ accountId?: bigint; /** * An entry ID, unique within the batch request. */ batchId?: number; /** * Inventory validation contact email. Required only for * SetInventoryValidationContact. */ contactEmail?: string; /** * Inventory validation contact name. Required only for * SetInventoryValidationContact. */ contactName?: string; /** * The country code. Required only for RequestInventoryVerification. */ country?: string; /** * The Business Profile. Required only for RequestGmbAccess. */ gmbEmail?: string; /** * The account Lia settings to update. Only defined if the method is * `update`. */ liaSettings?: LiaSettings; /** * The ID of the managing account. */ merchantId?: bigint; /** * The method of the batch entry. Acceptable values are: - "`get`" - * "`getAccessibleGmbAccounts`" - "`requestGmbAccess`" - * "`requestInventoryVerification`" - "`setInventoryVerificationContact`" - * "`update`" */ method?: string; /** * The omnichannel experience for a country. Required only for * SetOmnichannelExperience. */ omnichannelExperience?: LiaOmnichannelExperience; /** * The ID of POS data provider. Required only for SetPosProvider. */ posDataProviderId?: bigint; /** * The account ID by which this merchant is known to the POS provider. */ posExternalAccountId?: string; } function serializeLiasettingsCustomBatchRequestEntry(data: any): LiasettingsCustomBatchRequestEntry { return { ...data, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, liaSettings: data["liaSettings"] !== undefined ? serializeLiaSettings(data["liaSettings"]) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, posDataProviderId: data["posDataProviderId"] !== undefined ? String(data["posDataProviderId"]) : undefined, }; } function deserializeLiasettingsCustomBatchRequestEntry(data: any): LiasettingsCustomBatchRequestEntry { return { ...data, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, liaSettings: data["liaSettings"] !== undefined ? deserializeLiaSettings(data["liaSettings"]) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, posDataProviderId: data["posDataProviderId"] !== undefined ? BigInt(data["posDataProviderId"]) : undefined, }; } export interface LiasettingsCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: LiasettingsCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#liasettingsCustomBatchResponse`". */ kind?: string; } function serializeLiasettingsCustomBatchResponse(data: any): LiasettingsCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeLiasettingsCustomBatchResponseEntry(item))) : undefined, }; } function deserializeLiasettingsCustomBatchResponse(data: any): LiasettingsCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeLiasettingsCustomBatchResponseEntry(item))) : undefined, }; } export interface LiasettingsCustomBatchResponseEntry { /** * The ID of the request entry to which this entry responds. */ batchId?: number; /** * A list of errors defined if, and only if, the request failed. */ errors?: Errors; /** * The list of accessible Business Profiles. */ gmbAccounts?: GmbAccounts; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#liasettingsCustomBatchResponseEntry`" */ kind?: string; /** * The retrieved or updated Lia settings. */ liaSettings?: LiaSettings; /** * The updated omnichannel experience for a country. */ omnichannelExperience?: LiaOmnichannelExperience; /** * The list of POS data providers. */ posDataProviders?: PosDataProviders[]; } function serializeLiasettingsCustomBatchResponseEntry(data: any): LiasettingsCustomBatchResponseEntry { return { ...data, gmbAccounts: data["gmbAccounts"] !== undefined ? serializeGmbAccounts(data["gmbAccounts"]) : undefined, liaSettings: data["liaSettings"] !== undefined ? serializeLiaSettings(data["liaSettings"]) : undefined, posDataProviders: data["posDataProviders"] !== undefined ? data["posDataProviders"].map((item: any) => (serializePosDataProviders(item))) : undefined, }; } function deserializeLiasettingsCustomBatchResponseEntry(data: any): LiasettingsCustomBatchResponseEntry { return { ...data, gmbAccounts: data["gmbAccounts"] !== undefined ? deserializeGmbAccounts(data["gmbAccounts"]) : undefined, liaSettings: data["liaSettings"] !== undefined ? deserializeLiaSettings(data["liaSettings"]) : undefined, posDataProviders: data["posDataProviders"] !== undefined ? data["posDataProviders"].map((item: any) => (deserializePosDataProviders(item))) : undefined, }; } export interface LiasettingsGetAccessibleGmbAccountsResponse { /** * The ID of the Merchant Center account. */ accountId?: bigint; /** * A list of Business Profiles which are available to the merchant. */ gmbAccounts?: GmbAccountsGmbAccount[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#liasettingsGetAccessibleGmbAccountsResponse`". */ kind?: string; } function serializeLiasettingsGetAccessibleGmbAccountsResponse(data: any): LiasettingsGetAccessibleGmbAccountsResponse { return { ...data, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, gmbAccounts: data["gmbAccounts"] !== undefined ? data["gmbAccounts"].map((item: any) => (serializeGmbAccountsGmbAccount(item))) : undefined, }; } function deserializeLiasettingsGetAccessibleGmbAccountsResponse(data: any): LiasettingsGetAccessibleGmbAccountsResponse { return { ...data, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, gmbAccounts: data["gmbAccounts"] !== undefined ? data["gmbAccounts"].map((item: any) => (deserializeGmbAccountsGmbAccount(item))) : undefined, }; } /** * Additional options for Content#liasettingsList. */ export interface LiasettingsListOptions { /** * The maximum number of LIA settings to return in the response, used for * paging. */ maxResults?: number; /** * The token returned by the previous request. */ pageToken?: string; } export interface LiasettingsListPosDataProvidersResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#liasettingsListPosDataProvidersResponse`". */ kind?: string; /** * The list of POS data providers for each eligible country */ posDataProviders?: PosDataProviders[]; } function serializeLiasettingsListPosDataProvidersResponse(data: any): LiasettingsListPosDataProvidersResponse { return { ...data, posDataProviders: data["posDataProviders"] !== undefined ? data["posDataProviders"].map((item: any) => (serializePosDataProviders(item))) : undefined, }; } function deserializeLiasettingsListPosDataProvidersResponse(data: any): LiasettingsListPosDataProvidersResponse { return { ...data, posDataProviders: data["posDataProviders"] !== undefined ? data["posDataProviders"].map((item: any) => (deserializePosDataProviders(item))) : undefined, }; } export interface LiasettingsListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#liasettingsListResponse`". */ kind?: string; /** * The token for the retrieval of the next page of LIA settings. */ nextPageToken?: string; resources?: LiaSettings[]; } function serializeLiasettingsListResponse(data: any): LiasettingsListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (serializeLiaSettings(item))) : undefined, }; } function deserializeLiasettingsListResponse(data: any): LiasettingsListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (deserializeLiaSettings(item))) : undefined, }; } /** * Additional options for Content#liasettingsRequestgmbaccess. */ export interface LiasettingsRequestgmbaccessOptions { /** * The email of the Business Profile. */ gmbEmail: string; } export interface LiasettingsRequestGmbAccessResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#liasettingsRequestGmbAccessResponse`". */ kind?: string; } export interface LiasettingsRequestInventoryVerificationResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#liasettingsRequestInventoryVerificationResponse`". */ kind?: string; } /** * Additional options for Content#liasettingsSetinventoryverificationcontact. */ export interface LiasettingsSetinventoryverificationcontactOptions { /** * The email of the inventory verification contact. */ contactEmail: string; /** * The name of the inventory verification contact. */ contactName: string; /** * The country for which inventory verification is requested. */ country: string; /** * The language for which inventory verification is requested. */ language: string; } export interface LiasettingsSetInventoryVerificationContactResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#liasettingsSetInventoryVerificationContactResponse`". */ kind?: string; } /** * Additional options for Content#liasettingsSetomnichannelexperience. */ export interface LiasettingsSetomnichannelexperienceOptions { /** * The CLDR country code (for example, "US") for which the omnichannel * experience is selected. */ country?: string; /** * The Local Store Front (LSF) type for this country. Acceptable values are: * - "`ghlsf`" (Google-Hosted Local Store Front) - "`mhlsfBasic`" * (Merchant-Hosted Local Store Front Basic) - "`mhlsfFull`" (Merchant-Hosted * Local Store Front Full) More details about these types can be found here. */ lsfType?: string; /** * The Pickup types for this country. Acceptable values are: - * "`pickupToday`" - "`pickupLater`" */ pickupTypes?: string; } /** * Additional options for Content#liasettingsSetposdataprovider. */ export interface LiasettingsSetposdataproviderOptions { /** * The country for which the POS data provider is selected. */ country: string; /** * The ID of POS data provider. */ posDataProviderId?: bigint; /** * The account ID by which this merchant is known to the POS data provider. */ posExternalAccountId?: string; } function serializeLiasettingsSetposdataproviderOptions(data: any): LiasettingsSetposdataproviderOptions { return { ...data, posDataProviderId: data["posDataProviderId"] !== undefined ? String(data["posDataProviderId"]) : undefined, }; } function deserializeLiasettingsSetposdataproviderOptions(data: any): LiasettingsSetposdataproviderOptions { return { ...data, posDataProviderId: data["posDataProviderId"] !== undefined ? BigInt(data["posDataProviderId"]) : undefined, }; } export interface LiasettingsSetPosDataProviderResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#liasettingsSetPosDataProviderResponse`". */ kind?: string; } export interface LinkedAccount { /** * The ID of the linked account. */ linkedAccountId?: string; /** * List of provided services. */ services?: LinkService[]; } export interface LinkService { /** * Service provided to or by the linked account. Acceptable values are: - * "`shoppingActionsOrderManagement`" - "`shoppingActionsProductManagement`" - * "`shoppingAdsProductManagement`" - "`paymentProcessing`" */ service?: string; /** * Status of the link Acceptable values are: - "`active`" - "`inactive`" - * "`pending`" */ status?: string; } /** * Response message for the `ListAccountLabels` method. */ export interface ListAccountLabelsResponse { /** * The labels from the specified account. */ accountLabels?: AccountLabel[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } function serializeListAccountLabelsResponse(data: any): ListAccountLabelsResponse { return { ...data, accountLabels: data["accountLabels"] !== undefined ? data["accountLabels"].map((item: any) => (serializeAccountLabel(item))) : undefined, }; } function deserializeListAccountLabelsResponse(data: any): ListAccountLabelsResponse { return { ...data, accountLabels: data["accountLabels"] !== undefined ? data["accountLabels"].map((item: any) => (deserializeAccountLabel(item))) : undefined, }; } /** * Response for listing account return carriers. */ export interface ListAccountReturnCarrierResponse { /** * List of all available account return carriers for the merchant. */ accountReturnCarriers?: AccountReturnCarrier[]; } /** * Response message for the ListCollections method. */ export interface ListCollectionsResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The collections listed. */ resources?: Collection[]; } /** * Response message for the ListCollectionStatuses method. */ export interface ListCollectionStatusesResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The collectionstatuses listed. */ resources?: CollectionStatus[]; } /** * Response message for the ListConversionSources method. */ export interface ListConversionSourcesResponse { /** * List of conversion sources. */ conversionSources?: ConversionSource[]; /** * Token to be used to fetch the next results page. */ nextPageToken?: string; } function serializeListConversionSourcesResponse(data: any): ListConversionSourcesResponse { return { ...data, conversionSources: data["conversionSources"] !== undefined ? data["conversionSources"].map((item: any) => (serializeConversionSource(item))) : undefined, }; } function deserializeListConversionSourcesResponse(data: any): ListConversionSourcesResponse { return { ...data, conversionSources: data["conversionSources"] !== undefined ? data["conversionSources"].map((item: any) => (deserializeConversionSource(item))) : undefined, }; } /** * The response message for the `ListCsses` method */ export interface ListCssesResponse { /** * The CSS domains affiliated with the specified CSS group. */ csses?: Css[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } function serializeListCssesResponse(data: any): ListCssesResponse { return { ...data, csses: data["csses"] !== undefined ? data["csses"].map((item: any) => (serializeCss(item))) : undefined, }; } function deserializeListCssesResponse(data: any): ListCssesResponse { return { ...data, csses: data["csses"] !== undefined ? data["csses"].map((item: any) => (deserializeCss(item))) : undefined, }; } /** * Response message for the ListMethodQuotas method. */ export interface ListMethodQuotasResponse { /** * The current quota usage and limits per each method. */ methodQuotas?: MethodQuota[]; /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; } /** * Response message for Promotions.List method. */ export interface ListPromotionResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * List of all available promotions for the merchant. */ promotions?: Promotion[]; } function serializeListPromotionResponse(data: any): ListPromotionResponse { return { ...data, promotions: data["promotions"] !== undefined ? data["promotions"].map((item: any) => (serializePromotion(item))) : undefined, }; } function deserializeListPromotionResponse(data: any): ListPromotionResponse { return { ...data, promotions: data["promotions"] !== undefined ? data["promotions"].map((item: any) => (deserializePromotion(item))) : undefined, }; } /** * Response message for the `ListRegions` method. */ export interface ListRegionsResponse { /** * A token, which can be sent as `page_token` to retrieve the next page. If * this field is omitted, there are no subsequent pages. */ nextPageToken?: string; /** * The regions from the specified merchant. */ regions?: Region[]; } function serializeListRegionsResponse(data: any): ListRegionsResponse { return { ...data, regions: data["regions"] !== undefined ? data["regions"].map((item: any) => (serializeRegion(item))) : undefined, }; } function deserializeListRegionsResponse(data: any): ListRegionsResponse { return { ...data, regions: data["regions"] !== undefined ? data["regions"].map((item: any) => (deserializeRegion(item))) : undefined, }; } /** * Response message for the `ListReturnPolicyOnline` method. */ export interface ListReturnPolicyOnlineResponse { /** * The retrieved return policies. */ returnPolicies?: ReturnPolicyOnline[]; } function serializeListReturnPolicyOnlineResponse(data: any): ListReturnPolicyOnlineResponse { return { ...data, returnPolicies: data["returnPolicies"] !== undefined ? data["returnPolicies"].map((item: any) => (serializeReturnPolicyOnline(item))) : undefined, }; } function deserializeListReturnPolicyOnlineResponse(data: any): ListReturnPolicyOnlineResponse { return { ...data, returnPolicies: data["returnPolicies"] !== undefined ? data["returnPolicies"].map((item: any) => (deserializeReturnPolicyOnline(item))) : undefined, }; } /** * Local inventory resource. For accepted attribute values, see the local * product inventory feed specification. */ export interface LocalInventory { /** * The availability of the product. For accepted attribute values, see the * local product inventory feed specification. */ availability?: string; /** * A list of custom (merchant-provided) attributes. Can also be used to * submit any attribute of the feed specification in its generic form, for * example, `{ "name": "size type", "value": "regular" }`. */ customAttributes?: CustomAttribute[]; /** * The in-store product location. */ instoreProductLocation?: string; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#localInventory`" */ kind?: string; /** * The supported pickup method for this offer. Unless the value is "not * supported", this field must be submitted together with `pickupSla`. For * accepted attribute values, see the local product inventory feed * specification. */ pickupMethod?: string; /** * The expected date that an order will be ready for pickup relative to the * order date. Must be submitted together with `pickupMethod`. For accepted * attribute values, see the local product inventory feed specification. */ pickupSla?: string; /** * The price of the product. */ price?: Price; /** * The quantity of the product. Must be nonnegative. */ quantity?: number; /** * The sale price of the product. Mandatory if `sale_price_effective_date` is * defined. */ salePrice?: Price; /** * A date range represented by a pair of ISO 8601 dates separated by a space, * comma, or slash. Both dates may be specified as 'null' if undecided. */ salePriceEffectiveDate?: string; /** * Required. The store code of this local inventory resource. */ storeCode?: string; } export interface LocalinventoryCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: LocalinventoryCustomBatchRequestEntry[]; } function serializeLocalinventoryCustomBatchRequest(data: any): LocalinventoryCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeLocalinventoryCustomBatchRequestEntry(item))) : undefined, }; } function deserializeLocalinventoryCustomBatchRequest(data: any): LocalinventoryCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeLocalinventoryCustomBatchRequestEntry(item))) : undefined, }; } /** * Batch entry encoding a single local inventory update request. */ export interface LocalinventoryCustomBatchRequestEntry { /** * An entry ID, unique within the batch request. */ batchId?: number; /** * Local inventory of the product. */ localInventory?: LocalInventory; /** * The ID of the managing account. */ merchantId?: bigint; /** * Method of the batch request entry. Acceptable values are: - "`insert`" */ method?: string; /** * The ID of the product for which to update local inventory. */ productId?: string; } function serializeLocalinventoryCustomBatchRequestEntry(data: any): LocalinventoryCustomBatchRequestEntry { return { ...data, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeLocalinventoryCustomBatchRequestEntry(data: any): LocalinventoryCustomBatchRequestEntry { return { ...data, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } export interface LocalinventoryCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: LocalinventoryCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#localinventoryCustomBatchResponse`". */ kind?: string; } /** * Batch entry encoding a single local inventory update response. */ export interface LocalinventoryCustomBatchResponseEntry { /** * The ID of the request entry this entry responds to. */ batchId?: number; /** * A list of errors for failed custombatch entries. *Note:* Schema errors * fail the whole request. */ errors?: Errors; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#localinventoryCustomBatchResponseEntry`" */ kind?: string; } export interface LocationIdSet { /** * A non-empty list of location IDs. They must all be of the same location * type (for example, state). */ locationIds?: string[]; } /** * Allows the setting up of loyalty program benefits (for example price or * points). https://support.google.com/merchants/answer/12922446 */ export interface LoyaltyProgram { /** * Optional. The cashback that can be used for future purchases. */ cashbackForFutureUse?: Price; /** * Optional. The amount of loyalty points earned on a purchase. */ loyaltyPoints?: bigint; /** * Optional. A date range during which the item is eligible for member price. * If not specified, the member price is always applicable. The date range is * represented by a pair of ISO 8601 dates separated by a space, comma, or * slash. */ memberPriceEffectiveDate?: string; /** * Optional. The price for members of the given tier (instant discount * price). Must be smaller or equal to the regular price. */ price?: Price; /** * Required. The label of the loyalty program. This is an internal label that * uniquely identifies the relationship between a merchant entity and a * loyalty program entity. It must be provided so that system can associate * the assets below (for example, price and points) with a merchant. The * corresponding program must be linked to the merchant account. */ programLabel?: string; /** * Optional. The shipping label for the loyalty program. You can use this * label to indicate whether this offer has the loyalty shipping benefit. If * not specified, the item is not eligible for loyalty shipping for the given * loyalty tier. */ shippingLabel?: string; /** * Required. The label of the tier within the loyalty program. Must match one * of the labels within the program. */ tierLabel?: string; } function serializeLoyaltyProgram(data: any): LoyaltyProgram { return { ...data, loyaltyPoints: data["loyaltyPoints"] !== undefined ? String(data["loyaltyPoints"]) : undefined, }; } function deserializeLoyaltyProgram(data: any): LoyaltyProgram { return { ...data, loyaltyPoints: data["loyaltyPoints"] !== undefined ? BigInt(data["loyaltyPoints"]) : undefined, }; } /** * "Merchant Center Destination" sources can be used to send conversion events * from a website using a Google tag directly to a Merchant Center account where * the source is created. */ export interface MerchantCenterDestination { /** * Required. Attribution settings being used for the Merchant Center * Destination. */ attributionSettings?: AttributionSettings; /** * Required. Three-letter currency code (ISO 4217). The currency code defines * in which currency the conversions sent to this destination will be reported * in Merchant Center. */ currencyCode?: string; /** * Output only. Merchant Center Destination ID. */ readonly destinationId?: string; /** * Required. Merchant-specified display name for the destination. This is the * name that identifies the conversion source within the Merchant Center UI. * Limited to 64 characters. */ displayName?: string; } /** * Additional options for Content#merchantsupportRenderaccountissues. */ export interface MerchantsupportRenderaccountissuesOptions { /** * Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language * code used to localize support content. If not set, the result will be in * default language `en-US`. */ languageCode?: string; /** * Optional. The [IANA](https://www.iana.org/time-zones) timezone used to * localize times in support content. For example 'America/Los_Angeles'. If * not set, results will use as a default UTC. */ timeZone?: string; } /** * Additional options for Content#merchantsupportRenderproductissues. */ export interface MerchantsupportRenderproductissuesOptions { /** * Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language * code used to localize support content. If not set, the result will be in * default language `en-US`. */ languageCode?: string; /** * Optional. The [IANA](https://www.iana.org/time-zones) timezone used to * localize times in support content. For example 'America/Los_Angeles'. If * not set, results will use as a default UTC. */ timeZone?: string; } /** * Additional options for Content#merchantsupportTriggeraction. */ export interface MerchantsupportTriggeractionOptions { /** * Optional. Language code [IETF BCP 47 * syntax](https://tools.ietf.org/html/bcp47) used to localize the response. * If not set, the result will be in default language `en-US`. */ languageCode?: string; } /** * The quota information per method in the Content API. */ export interface MethodQuota { /** * Output only. The method name, for example `products.list`. Method name * does not contain version because quota can be shared between different API * versions of the same method. */ readonly method?: string; /** * Output only. The maximum number of calls allowed per day for the method. */ readonly quotaLimit?: bigint; /** * Output only. The maximum number of calls allowed per minute for the * method. */ readonly quotaMinuteLimit?: bigint; /** * Output only. The current quota usage, meaning the number of calls already * made to the method per day. Usage is reset every day at 12 PM midday UTC. */ readonly quotaUsage?: bigint; } /** * Performance metrics. Values are only set for metrics requested explicitly in * the request's search query. */ export interface Metrics { /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Average order size - the average number of items * in an order. **This metric cannot be segmented by product dimensions and * customer_country_code.** */ aos?: number; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Average order value in micros (1 millionth of a * standard unit, 1 USD = 1000000 micros) - the average value (total price of * items) of all placed orders. The currency of the returned value is stored * in the currency_code segment. If this metric is selected, * 'segments.currency_code' is automatically added to the SELECT clause in the * search query (unless it is explicitly selected by the user) and the * currency_code segment is populated in the response. **This metric cannot be * segmented by product dimensions and customer_country_code.** */ aovMicros?: number; /** * Number of clicks. */ clicks?: bigint; /** * Number of conversions divided by the number of clicks, reported on the * impression date. The metric is currently available only for the * `FREE_PRODUCT_LISTING` program. */ conversionRate?: number; /** * Number of conversions attributed to the product, reported on the * conversion date. Depending on the attribution model, a conversion might be * distributed across multiple clicks, where each click gets its own credit * assigned. This metric is a sum of all such credits. The metric is currently * available only for the `FREE_PRODUCT_LISTING` program. */ conversions?: number; /** * Value of conversions in micros (1 millionth of a standard unit, 1 USD = * 1000000 micros) attributed to the product, reported on the conversion date. * The metric is currently available only for the `FREE_PRODUCT_LISTING` * program. The currency of the returned value is stored in the currency_code * segment. If this metric is selected, 'segments.currency_code' is * automatically added to the SELECT clause in the search query (unless it is * explicitly selected by the user) and the currency_code segment is populated * in the response. */ conversionValueMicros?: bigint; /** * Click-through rate - the number of clicks merchant's products receive * (clicks) divided by the number of times the products are shown * (impressions). */ ctr?: number; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Average number of days between an order being * placed and the order being fully shipped, reported on the last shipment * date. **This metric cannot be segmented by product dimensions and * customer_country_code.** */ daysToShip?: number; /** * Number of times merchant's products are shown. */ impressions?: bigint; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Average number of days between an item being * ordered and the item being **This metric cannot be segmented by * customer_country_code.** */ itemDaysToShip?: number; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Percentage of shipped items in relation to all * finalized items (shipped or rejected by the merchant; unshipped items are * not taken into account), reported on the order date. Item fill rate is * lowered by merchant rejections. **This metric cannot be segmented by * customer_country_code.** */ itemFillRate?: number; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Number of ordered items. Excludes customer * cancellations that happened within 30 minutes of placing the order. **This * metric cannot be segmented by customer_country_code.** */ orderedItems?: bigint; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Total price of ordered items in micros (1 * millionth of a standard unit, 1 USD = 1000000 micros). Excludes shipping, * taxes (US only), and customer cancellations that happened within 30 minutes * of placing the order. The currency of the returned value is stored in the * currency_code segment. If this metric is selected, 'segments.currency_code' * is automatically added to the SELECT clause in the search query (unless it * is explicitly selected by the user) and the currency_code segment is * populated in the response. **This metric cannot be segmented by * customer_country_code.** */ orderedItemSalesMicros?: bigint; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Number of placed orders. Excludes customer * cancellations that happened within 30 minutes of placing the order. **This * metric cannot be segmented by product dimensions and * customer_country_code.** */ orders?: bigint; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Number of ordered items canceled by the merchant, * reported on the order date. **This metric cannot be segmented by * customer_country_code.** */ rejectedItems?: bigint; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Number of ordered items sent back for return, * reported on the date when the merchant accepted the return. **This metric * cannot be segmented by customer_country_code.** */ returnedItems?: bigint; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Total price of returned items divided by the * total price of shipped items, reported on the order date. If this metric is * selected, 'segments.currency_code' is automatically added to the SELECT * clause in the search query (unless it is explicitly selected by the user) * and the currency_code segment is populated in the response. **This metric * cannot be segmented by customer_country_code.** */ returnRate?: number; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Total price of ordered items sent back for return * in micros (1 millionth of a standard unit, 1 USD = 1000000 micros), * reported on the date when the merchant accepted the return. The currency of * the returned value is stored in the currency_code segment. If this metric * is selected, 'segments.currency_code' is automatically added to the SELECT * clause in the search query (unless it is explicitly selected by the user) * and the currency_code segment is populated in the response. **This metric * cannot be segmented by customer_country_code.** */ returnsMicros?: bigint; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Number of shipped items, reported on the shipment * date. **This metric cannot be segmented by customer_country_code.** */ shippedItems?: bigint; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Total price of shipped items in micros (1 * millionth of a standard unit, 1 USD = 1000000 micros), reported on the * order date. Excludes shipping and taxes (US only). The currency of the * returned value is stored in the currency_code segment. If this metric is * selected, 'segments.currency_code' is automatically added to the SELECT * clause in the search query (unless it is explicitly selected by the user) * and the currency_code segment is populated in the response. **This metric * cannot be segmented by customer_country_code.** */ shippedItemSalesMicros?: bigint; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Number of fully shipped orders, reported on the * last shipment date. **This metric cannot be segmented by product dimensions * and customer_country_code.** */ shippedOrders?: bigint; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Number of ordered items not shipped up until the * end of the queried day. If a multi-day period is specified in the search * query, the returned value is the average number of unshipped items over the * days in the queried period. **This metric cannot be segmented by * customer_country_code.** */ unshippedItems?: number; /** * *Deprecated*: This field is no longer supported and retrieving it returns * 0 starting from May 2024. Number of orders not shipped or partially shipped * up until the end of the queried day. If a multi-day period is specified in * the search query, the returned value is the average number of unshipped * orders over the days in the queried period. **This metric cannot be * segmented by product dimensions and customer_country_code.** */ unshippedOrders?: number; } function serializeMetrics(data: any): Metrics { return { ...data, clicks: data["clicks"] !== undefined ? String(data["clicks"]) : undefined, conversionValueMicros: data["conversionValueMicros"] !== undefined ? String(data["conversionValueMicros"]) : undefined, impressions: data["impressions"] !== undefined ? String(data["impressions"]) : undefined, orderedItems: data["orderedItems"] !== undefined ? String(data["orderedItems"]) : undefined, orderedItemSalesMicros: data["orderedItemSalesMicros"] !== undefined ? String(data["orderedItemSalesMicros"]) : undefined, orders: data["orders"] !== undefined ? String(data["orders"]) : undefined, rejectedItems: data["rejectedItems"] !== undefined ? String(data["rejectedItems"]) : undefined, returnedItems: data["returnedItems"] !== undefined ? String(data["returnedItems"]) : undefined, returnsMicros: data["returnsMicros"] !== undefined ? String(data["returnsMicros"]) : undefined, shippedItems: data["shippedItems"] !== undefined ? String(data["shippedItems"]) : undefined, shippedItemSalesMicros: data["shippedItemSalesMicros"] !== undefined ? String(data["shippedItemSalesMicros"]) : undefined, shippedOrders: data["shippedOrders"] !== undefined ? String(data["shippedOrders"]) : undefined, }; } function deserializeMetrics(data: any): Metrics { return { ...data, clicks: data["clicks"] !== undefined ? BigInt(data["clicks"]) : undefined, conversionValueMicros: data["conversionValueMicros"] !== undefined ? BigInt(data["conversionValueMicros"]) : undefined, impressions: data["impressions"] !== undefined ? BigInt(data["impressions"]) : undefined, orderedItems: data["orderedItems"] !== undefined ? BigInt(data["orderedItems"]) : undefined, orderedItemSalesMicros: data["orderedItemSalesMicros"] !== undefined ? BigInt(data["orderedItemSalesMicros"]) : undefined, orders: data["orders"] !== undefined ? BigInt(data["orders"]) : undefined, rejectedItems: data["rejectedItems"] !== undefined ? BigInt(data["rejectedItems"]) : undefined, returnedItems: data["returnedItems"] !== undefined ? BigInt(data["returnedItems"]) : undefined, returnsMicros: data["returnsMicros"] !== undefined ? BigInt(data["returnsMicros"]) : undefined, shippedItems: data["shippedItems"] !== undefined ? BigInt(data["shippedItems"]) : undefined, shippedItemSalesMicros: data["shippedItemSalesMicros"] !== undefined ? BigInt(data["shippedItemSalesMicros"]) : undefined, shippedOrders: data["shippedOrders"] !== undefined ? BigInt(data["shippedOrders"]) : undefined, }; } export interface MinimumOrderValueTable { storeCodeSetWithMovs?: MinimumOrderValueTableStoreCodeSetWithMov[]; } /** * A list of store code sets sharing the same minimum order value. At least two * sets are required and the last one must be empty, which signifies 'MOV for * all other stores'. Each store code can only appear once across all the sets. * All prices within a service must have the same currency. */ export interface MinimumOrderValueTableStoreCodeSetWithMov { /** * A list of unique store codes or empty for the catch all. */ storeCodes?: string[]; /** * The minimum order value for the given stores. */ value?: Price; } /** * Represents a merchant trade from which signals are extracted, e.g. shipping. */ export interface OrderTrackingSignal { /** * The shipping fee of the order; this value should be set to zero in the * case of free shipping. */ customerShippingFee?: PriceAmount; /** * Required. The delivery postal code, as a continuous string without spaces * or dashes, e.g. "95016". This field will be anonymized in returned * OrderTrackingSignal creation response. */ deliveryPostalCode?: string; /** * Required. The [CLDR territory code] * (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the * shipping destination. */ deliveryRegionCode?: string; /** * Information about line items in the order. */ lineItems?: OrderTrackingSignalLineItemDetails[]; /** * The Google merchant ID of this order tracking signal. This value is * optional. If left unset, the caller's merchant ID is used. You must request * access in order to provide data on behalf of another merchant. For more * information, see [Submitting Order Tracking * Signals](/shopping-content/guides/order-tracking-signals). */ merchantId?: bigint; /** * Required. The time when the order was created on the merchant side. * Include the year and timezone string, if available. */ orderCreatedTime?: DateTime; /** * Required. The ID of the order on the merchant side. This field will be * hashed in returned OrderTrackingSignal creation response. */ orderId?: string; /** * Output only. The ID that uniquely identifies this order tracking signal. */ readonly orderTrackingSignalId?: bigint; /** * The mapping of the line items to the shipment information. */ shipmentLineItemMapping?: OrderTrackingSignalShipmentLineItemMapping[]; /** * The shipping information for the order. */ shippingInfo?: OrderTrackingSignalShippingInfo[]; } function serializeOrderTrackingSignal(data: any): OrderTrackingSignal { return { ...data, lineItems: data["lineItems"] !== undefined ? data["lineItems"].map((item: any) => (serializeOrderTrackingSignalLineItemDetails(item))) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, orderCreatedTime: data["orderCreatedTime"] !== undefined ? serializeDateTime(data["orderCreatedTime"]) : undefined, shipmentLineItemMapping: data["shipmentLineItemMapping"] !== undefined ? data["shipmentLineItemMapping"].map((item: any) => (serializeOrderTrackingSignalShipmentLineItemMapping(item))) : undefined, shippingInfo: data["shippingInfo"] !== undefined ? data["shippingInfo"].map((item: any) => (serializeOrderTrackingSignalShippingInfo(item))) : undefined, }; } function deserializeOrderTrackingSignal(data: any): OrderTrackingSignal { return { ...data, lineItems: data["lineItems"] !== undefined ? data["lineItems"].map((item: any) => (deserializeOrderTrackingSignalLineItemDetails(item))) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, orderCreatedTime: data["orderCreatedTime"] !== undefined ? deserializeDateTime(data["orderCreatedTime"]) : undefined, orderTrackingSignalId: data["orderTrackingSignalId"] !== undefined ? BigInt(data["orderTrackingSignalId"]) : undefined, shipmentLineItemMapping: data["shipmentLineItemMapping"] !== undefined ? data["shipmentLineItemMapping"].map((item: any) => (deserializeOrderTrackingSignalShipmentLineItemMapping(item))) : undefined, shippingInfo: data["shippingInfo"] !== undefined ? data["shippingInfo"].map((item: any) => (deserializeOrderTrackingSignalShippingInfo(item))) : undefined, }; } /** * The line items of the order. */ export interface OrderTrackingSignalLineItemDetails { /** * Brand of the product. */ brand?: string; /** * The Global Trade Item Number. */ gtin?: string; /** * Required. The ID for this line item. */ lineItemId?: string; /** * The manufacturer part number. */ mpn?: string; /** * Plain text description of this product (deprecated: Please use * product_title instead). */ productDescription?: string; /** * Required. The Content API REST ID of the product, in the form * channel:contentLanguage:targetCountry:offerId. */ productId?: string; /** * Plain text title of this product. */ productTitle?: string; /** * The quantity of the line item in the order. */ quantity?: bigint; /** * Merchant SKU for this item (deprecated). */ sku?: string; /** * Universal product code for this item (deprecated: Please use GTIN * instead). */ upc?: string; } function serializeOrderTrackingSignalLineItemDetails(data: any): OrderTrackingSignalLineItemDetails { return { ...data, quantity: data["quantity"] !== undefined ? String(data["quantity"]) : undefined, }; } function deserializeOrderTrackingSignalLineItemDetails(data: any): OrderTrackingSignalLineItemDetails { return { ...data, quantity: data["quantity"] !== undefined ? BigInt(data["quantity"]) : undefined, }; } /** * Represents how many items are in the shipment for the given shipment_id and * line_item_id. */ export interface OrderTrackingSignalShipmentLineItemMapping { /** * Required. The line item ID. */ lineItemId?: string; /** * The line item quantity in the shipment. */ quantity?: bigint; /** * Required. The shipment ID. This field will be hashed in returned * OrderTrackingSignal creation response. */ shipmentId?: string; } function serializeOrderTrackingSignalShipmentLineItemMapping(data: any): OrderTrackingSignalShipmentLineItemMapping { return { ...data, quantity: data["quantity"] !== undefined ? String(data["quantity"]) : undefined, }; } function deserializeOrderTrackingSignalShipmentLineItemMapping(data: any): OrderTrackingSignalShipmentLineItemMapping { return { ...data, quantity: data["quantity"] !== undefined ? BigInt(data["quantity"]) : undefined, }; } /** * The shipping information for the order. */ export interface OrderTrackingSignalShippingInfo { /** * The time when the shipment was actually delivered. Include the year and * timezone string, if available. This field is required, if one of the * following fields is absent: tracking_id or carrier_name. */ actualDeliveryTime?: DateTime; /** * The name of the shipping carrier for the delivery. This field is required * if one of the following fields is absent: earliest_delivery_promise_time, * latest_delivery_promise_time, and actual_delivery_time. */ carrierName?: string; /** * The service type for fulfillment, e.g., GROUND, FIRST_CLASS, etc. */ carrierServiceName?: string; /** * The earliest delivery promised time. Include the year and timezone string, * if available. This field is required, if one of the following fields is * absent: tracking_id or carrier_name. */ earliestDeliveryPromiseTime?: DateTime; /** * The latest delivery promised time. Include the year and timezone string, * if available. This field is required, if one of the following fields is * absent: tracking_id or carrier_name. */ latestDeliveryPromiseTime?: DateTime; /** * The origin postal code, as a continuous string without spaces or dashes, * e.g. "95016". This field will be anonymized in returned OrderTrackingSignal * creation response. */ originPostalCode?: string; /** * The [CLDR territory code] * (http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) for the * shipping origin. */ originRegionCode?: string; /** * Required. The shipment ID. This field will be hashed in returned * OrderTrackingSignal creation response. */ shipmentId?: string; /** * The time when the shipment was shipped. Include the year and timezone * string, if available. */ shippedTime?: DateTime; /** * The status of the shipment. */ shippingStatus?: | "SHIPPING_STATE_UNSPECIFIED" | "SHIPPED" | "DELIVERED"; /** * The tracking ID of the shipment. This field is required if one of the * following fields is absent: earliest_delivery_promise_time, * latest_delivery_promise_time, and actual_delivery_time. */ trackingId?: string; } function serializeOrderTrackingSignalShippingInfo(data: any): OrderTrackingSignalShippingInfo { return { ...data, actualDeliveryTime: data["actualDeliveryTime"] !== undefined ? serializeDateTime(data["actualDeliveryTime"]) : undefined, earliestDeliveryPromiseTime: data["earliestDeliveryPromiseTime"] !== undefined ? serializeDateTime(data["earliestDeliveryPromiseTime"]) : undefined, latestDeliveryPromiseTime: data["latestDeliveryPromiseTime"] !== undefined ? serializeDateTime(data["latestDeliveryPromiseTime"]) : undefined, shippedTime: data["shippedTime"] !== undefined ? serializeDateTime(data["shippedTime"]) : undefined, }; } function deserializeOrderTrackingSignalShippingInfo(data: any): OrderTrackingSignalShippingInfo { return { ...data, actualDeliveryTime: data["actualDeliveryTime"] !== undefined ? deserializeDateTime(data["actualDeliveryTime"]) : undefined, earliestDeliveryPromiseTime: data["earliestDeliveryPromiseTime"] !== undefined ? deserializeDateTime(data["earliestDeliveryPromiseTime"]) : undefined, latestDeliveryPromiseTime: data["latestDeliveryPromiseTime"] !== undefined ? deserializeDateTime(data["latestDeliveryPromiseTime"]) : undefined, shippedTime: data["shippedTime"] !== undefined ? deserializeDateTime(data["shippedTime"]) : undefined, }; } /** * Additional information required for PAYMENT_SERVICE_PROVIDER link type. */ export interface PaymentServiceProviderLinkInfo { /** * The business country of the merchant account as identified by the third * party service provider. */ externalAccountBusinessCountry?: string; /** * The id used by the third party service provider to identify the merchant. */ externalAccountId?: string; } export interface PickupCarrierService { /** * The name of the pickup carrier (for example, `"UPS"`). Required. */ carrierName?: string; /** * The name of the pickup service (for example, `"Access point"`). Required. */ serviceName?: string; } export interface PickupServicesPickupService { /** * The name of the carrier (for example, `"UPS"`). Always present. */ carrierName?: string; /** * The CLDR country code of the carrier (for example, "US"). Always present. */ country?: string; /** * The name of the pickup service (for example, `"Access point"`). Always * present. */ serviceName?: string; } export interface PosCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: PosCustomBatchRequestEntry[]; } function serializePosCustomBatchRequest(data: any): PosCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializePosCustomBatchRequestEntry(item))) : undefined, }; } function deserializePosCustomBatchRequest(data: any): PosCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializePosCustomBatchRequestEntry(item))) : undefined, }; } export interface PosCustomBatchRequestEntry { /** * An entry ID, unique within the batch request. */ batchId?: number; /** * The inventory to submit. This should be set only if the method is * `inventory`. */ inventory?: PosInventory; /** * The ID of the POS data provider. */ merchantId?: bigint; /** * The method of the batch entry. Acceptable values are: - "`delete`" - * "`get`" - "`insert`" - "`inventory`" - "`sale`" */ method?: string; /** * The sale information to submit. This should be set only if the method is * `sale`. */ sale?: PosSale; /** * The store information to submit. This should be set only if the method is * `insert`. */ store?: PosStore; /** * The store code. This should be set only if the method is `delete` or * `get`. */ storeCode?: string; /** * The ID of the account for which to get/submit data. */ targetMerchantId?: bigint; } function serializePosCustomBatchRequestEntry(data: any): PosCustomBatchRequestEntry { return { ...data, inventory: data["inventory"] !== undefined ? serializePosInventory(data["inventory"]) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, sale: data["sale"] !== undefined ? serializePosSale(data["sale"]) : undefined, targetMerchantId: data["targetMerchantId"] !== undefined ? String(data["targetMerchantId"]) : undefined, }; } function deserializePosCustomBatchRequestEntry(data: any): PosCustomBatchRequestEntry { return { ...data, inventory: data["inventory"] !== undefined ? deserializePosInventory(data["inventory"]) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, sale: data["sale"] !== undefined ? deserializePosSale(data["sale"]) : undefined, targetMerchantId: data["targetMerchantId"] !== undefined ? BigInt(data["targetMerchantId"]) : undefined, }; } export interface PosCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: PosCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#posCustomBatchResponse`". */ kind?: string; } function serializePosCustomBatchResponse(data: any): PosCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializePosCustomBatchResponseEntry(item))) : undefined, }; } function deserializePosCustomBatchResponse(data: any): PosCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializePosCustomBatchResponseEntry(item))) : undefined, }; } export interface PosCustomBatchResponseEntry { /** * The ID of the request entry to which this entry responds. */ batchId?: number; /** * A list of errors defined if, and only if, the request failed. */ errors?: Errors; /** * The updated inventory information. */ inventory?: PosInventory; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#posCustomBatchResponseEntry`" */ kind?: string; /** * The updated sale information. */ sale?: PosSale; /** * The retrieved or updated store information. */ store?: PosStore; } function serializePosCustomBatchResponseEntry(data: any): PosCustomBatchResponseEntry { return { ...data, inventory: data["inventory"] !== undefined ? serializePosInventory(data["inventory"]) : undefined, sale: data["sale"] !== undefined ? serializePosSale(data["sale"]) : undefined, }; } function deserializePosCustomBatchResponseEntry(data: any): PosCustomBatchResponseEntry { return { ...data, inventory: data["inventory"] !== undefined ? deserializePosInventory(data["inventory"]) : undefined, sale: data["sale"] !== undefined ? deserializePosSale(data["sale"]) : undefined, }; } export interface PosDataProviders { /** * Country code. */ country?: string; /** * A list of POS data providers. */ posDataProviders?: PosDataProvidersPosDataProvider[]; } function serializePosDataProviders(data: any): PosDataProviders { return { ...data, posDataProviders: data["posDataProviders"] !== undefined ? data["posDataProviders"].map((item: any) => (serializePosDataProvidersPosDataProvider(item))) : undefined, }; } function deserializePosDataProviders(data: any): PosDataProviders { return { ...data, posDataProviders: data["posDataProviders"] !== undefined ? data["posDataProviders"].map((item: any) => (deserializePosDataProvidersPosDataProvider(item))) : undefined, }; } export interface PosDataProvidersPosDataProvider { /** * The display name of Pos data Provider. */ displayName?: string; /** * The full name of this POS data Provider. */ fullName?: string; /** * The ID of the account. */ providerId?: bigint; } function serializePosDataProvidersPosDataProvider(data: any): PosDataProvidersPosDataProvider { return { ...data, providerId: data["providerId"] !== undefined ? String(data["providerId"]) : undefined, }; } function deserializePosDataProvidersPosDataProvider(data: any): PosDataProvidersPosDataProvider { return { ...data, providerId: data["providerId"] !== undefined ? BigInt(data["providerId"]) : undefined, }; } /** * The absolute quantity of an item available at the given store. */ export interface PosInventory { /** * Required. The two-letter ISO 639-1 language code for the item. */ contentLanguage?: string; /** * Global Trade Item Number. */ gtin?: string; /** * Required. A unique identifier for the item. */ itemId?: string; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#posInventory`" */ kind?: string; /** * Optional. Supported pickup method for this offer. Unless the value is "not * supported", this field must be submitted together with `pickupSla`. For * accepted attribute values, see the [local product inventory feed * specification](https://support.google.com/merchants/answer/3061342). */ pickupMethod?: string; /** * Optional. Expected date that an order will be ready for pickup relative to * the order date. Must be submitted together with `pickupMethod`. For * accepted attribute values, see the [local product inventory feed * specification](https://support.google.com/merchants/answer/3061342). */ pickupSla?: string; /** * Required. The current price of the item. */ price?: Price; /** * Required. The available quantity of the item. */ quantity?: bigint; /** * Required. The identifier of the merchant's store. Either a `storeCode` * inserted through the API or the code of the store in a Business Profile. */ storeCode?: string; /** * Required. The CLDR territory code for the item. */ targetCountry?: string; /** * Required. The inventory timestamp, in ISO 8601 format. */ timestamp?: string; } function serializePosInventory(data: any): PosInventory { return { ...data, quantity: data["quantity"] !== undefined ? String(data["quantity"]) : undefined, }; } function deserializePosInventory(data: any): PosInventory { return { ...data, quantity: data["quantity"] !== undefined ? BigInt(data["quantity"]) : undefined, }; } export interface PosInventoryRequest { /** * Required. The two-letter ISO 639-1 language code for the item. */ contentLanguage?: string; /** * Global Trade Item Number. */ gtin?: string; /** * Required. A unique identifier for the item. */ itemId?: string; /** * Optional. Supported pickup method for this offer. Unless the value is "not * supported", this field must be submitted together with `pickupSla`. For * accepted attribute values, see the [local product inventory feed * specification](https://support.google.com/merchants/answer/3061342). */ pickupMethod?: string; /** * Optional. Expected date that an order will be ready for pickup relative to * the order date. Must be submitted together with `pickupMethod`. For * accepted attribute values, see the [local product inventory feed * specification](https://support.google.com/merchants/answer/3061342). */ pickupSla?: string; /** * Required. The current price of the item. */ price?: Price; /** * Required. The available quantity of the item. */ quantity?: bigint; /** * Required. The identifier of the merchant's store. Either a `storeCode` * inserted through the API or the code of the store in a Business Profile. */ storeCode?: string; /** * Required. The CLDR territory code for the item. */ targetCountry?: string; /** * Required. The inventory timestamp, in ISO 8601 format. */ timestamp?: string; } function serializePosInventoryRequest(data: any): PosInventoryRequest { return { ...data, quantity: data["quantity"] !== undefined ? String(data["quantity"]) : undefined, }; } function deserializePosInventoryRequest(data: any): PosInventoryRequest { return { ...data, quantity: data["quantity"] !== undefined ? BigInt(data["quantity"]) : undefined, }; } export interface PosInventoryResponse { /** * Required. The two-letter ISO 639-1 language code for the item. */ contentLanguage?: string; /** * Global Trade Item Number. */ gtin?: string; /** * Required. A unique identifier for the item. */ itemId?: string; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#posInventoryResponse`". */ kind?: string; /** * Optional. Supported pickup method for this offer. Unless the value is "not * supported", this field must be submitted together with `pickupSla`. For * accepted attribute values, see the [local product inventory feed * specification](https://support.google.com/merchants/answer/3061342). */ pickupMethod?: string; /** * Optional. Expected date that an order will be ready for pickup relative to * the order date. Must be submitted together with `pickupMethod`. For * accepted attribute values, see the [local product inventory feed * specification](https://support.google.com/merchants/answer/3061342). */ pickupSla?: string; /** * Required. The current price of the item. */ price?: Price; /** * Required. The available quantity of the item. */ quantity?: bigint; /** * Required. The identifier of the merchant's store. Either a `storeCode` * inserted through the API or the code of the store in a Business Profile. */ storeCode?: string; /** * Required. The CLDR territory code for the item. */ targetCountry?: string; /** * Required. The inventory timestamp, in ISO 8601 format. */ timestamp?: string; } function serializePosInventoryResponse(data: any): PosInventoryResponse { return { ...data, quantity: data["quantity"] !== undefined ? String(data["quantity"]) : undefined, }; } function deserializePosInventoryResponse(data: any): PosInventoryResponse { return { ...data, quantity: data["quantity"] !== undefined ? BigInt(data["quantity"]) : undefined, }; } export interface PosListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#posListResponse`". */ kind?: string; resources?: PosStore[]; } /** * The change of the available quantity of an item at the given store. */ export interface PosSale { /** * Required. The two-letter ISO 639-1 language code for the item. */ contentLanguage?: string; /** * Global Trade Item Number. */ gtin?: string; /** * Required. A unique identifier for the item. */ itemId?: string; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#posSale`" */ kind?: string; /** * Required. The price of the item. */ price?: Price; /** * Required. The relative change of the available quantity. Negative for * items returned. */ quantity?: bigint; /** * A unique ID to group items from the same sale event. */ saleId?: string; /** * Required. The identifier of the merchant's store. Either a `storeCode` * inserted through the API or the code of the store in a Business Profile. */ storeCode?: string; /** * Required. The CLDR territory code for the item. */ targetCountry?: string; /** * Required. The inventory timestamp, in ISO 8601 format. */ timestamp?: string; } function serializePosSale(data: any): PosSale { return { ...data, quantity: data["quantity"] !== undefined ? String(data["quantity"]) : undefined, }; } function deserializePosSale(data: any): PosSale { return { ...data, quantity: data["quantity"] !== undefined ? BigInt(data["quantity"]) : undefined, }; } export interface PosSaleRequest { /** * Required. The two-letter ISO 639-1 language code for the item. */ contentLanguage?: string; /** * Global Trade Item Number. */ gtin?: string; /** * Required. A unique identifier for the item. */ itemId?: string; /** * Required. The price of the item. */ price?: Price; /** * Required. The relative change of the available quantity. Negative for * items returned. */ quantity?: bigint; /** * A unique ID to group items from the same sale event. */ saleId?: string; /** * Required. The identifier of the merchant's store. Either a `storeCode` * inserted through the API or the code of the store in a Business Profile. */ storeCode?: string; /** * Required. The CLDR territory code for the item. */ targetCountry?: string; /** * Required. The inventory timestamp, in ISO 8601 format. */ timestamp?: string; } function serializePosSaleRequest(data: any): PosSaleRequest { return { ...data, quantity: data["quantity"] !== undefined ? String(data["quantity"]) : undefined, }; } function deserializePosSaleRequest(data: any): PosSaleRequest { return { ...data, quantity: data["quantity"] !== undefined ? BigInt(data["quantity"]) : undefined, }; } export interface PosSaleResponse { /** * Required. The two-letter ISO 639-1 language code for the item. */ contentLanguage?: string; /** * Global Trade Item Number. */ gtin?: string; /** * Required. A unique identifier for the item. */ itemId?: string; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#posSaleResponse`". */ kind?: string; /** * Required. The price of the item. */ price?: Price; /** * Required. The relative change of the available quantity. Negative for * items returned. */ quantity?: bigint; /** * A unique ID to group items from the same sale event. */ saleId?: string; /** * Required. The identifier of the merchant's store. Either a `storeCode` * inserted through the API or the code of the store in a Business Profile. */ storeCode?: string; /** * Required. The CLDR territory code for the item. */ targetCountry?: string; /** * Required. The inventory timestamp, in ISO 8601 format. */ timestamp?: string; } function serializePosSaleResponse(data: any): PosSaleResponse { return { ...data, quantity: data["quantity"] !== undefined ? String(data["quantity"]) : undefined, }; } function deserializePosSaleResponse(data: any): PosSaleResponse { return { ...data, quantity: data["quantity"] !== undefined ? BigInt(data["quantity"]) : undefined, }; } /** * Store resource. */ export interface PosStore { /** * The business type of the store. */ gcidCategory?: string[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#posStore`" */ kind?: string; /** * Output only. The matching status of POS store and Google Business Profile * store. Possible values are: - "`matched`": The POS store is successfully * matched with the Google Business Profile store. - "`failed`": The POS store * is not matched with the Google Business Profile store. See * matching_status_hint for further details. Note that there is up to 48 hours * propagation delay for changes in Merchant Center (e.g. creation of new * account, accounts linking) and Google Business Profile (e.g. store address * update) which may affect the matching status. In such cases, after a delay * call * [pos.list](https://developers.google.com/shopping-content/reference/rest/v2.1/pos/list) * to retrieve the updated matching status. */ readonly matchingStatus?: string; /** * Output only. The hint of why the matching has failed. This is only set * when matching_status=failed. Possible values are: - * "`linked-store-not-found`": There aren't any Google Business Profile stores * available for matching. Connect your Merchant Center account with the * Google Business Profile account. Or add a new Google Business Profile store * corresponding to the POS store. - "`store-match-not-found`": The provided * POS store couldn't be matched to any of the connected Google Business * Profile stores. Merchant Center account is connected correctly and stores * are available on Google Business Profile, but POS store location address * does not match with Google Business Profile stores' addresses. Update POS * store address or Google Business Profile store address to match correctly. * - "`store-match-unverified`": The provided POS store couldn't be matched to * any of the connected Google Business Profile stores, as the matched Google * Business Profile store is unverified. Go through the Google Business * Profile verification process to match correctly. */ readonly matchingStatusHint?: string; /** * The store phone number. */ phoneNumber?: string; /** * The Google Place Id of the store location. */ placeId?: string; /** * Required. The street address of the store. */ storeAddress?: string; /** * Required. A store identifier that is unique for the given merchant. */ storeCode?: string; /** * The merchant or store name. */ storeName?: string; /** * The website url for the store or merchant. */ websiteUrl?: string; } export interface PostalCodeGroup { /** * The CLDR territory code of the country the postal code group applies to. * Required. */ country?: string; /** * The name of the postal code group, referred to in headers. Required. */ name?: string; /** * A range of postal codes. Required. */ postalCodeRanges?: PostalCodeRange[]; } export interface PostalCodeRange { /** * A postal code or a pattern of the form `prefix*` denoting the inclusive * lower bound of the range defining the area. Examples values: `"94108"`, * `"9410*"`, `"9*"`. Required. */ postalCodeRangeBegin?: string; /** * A postal code or a pattern of the form `prefix*` denoting the inclusive * upper bound of the range defining the area. It must have the same length as * `postalCodeRangeBegin`: if `postalCodeRangeBegin` is a postal code then * `postalCodeRangeEnd` must be a postal code too; if `postalCodeRangeBegin` * is a pattern then `postalCodeRangeEnd` must be a pattern with the same * prefix length. Optional: if not set, then the area is defined as being all * the postal codes matching `postalCodeRangeBegin`. */ postalCodeRangeEnd?: string; } export interface Price { /** * The currency of the price. */ currency?: string; /** * The price represented as a number. */ value?: string; } /** * The price represented as a number and currency. */ export interface PriceAmount { /** * The currency of the price. */ currency?: string; /** * The price represented as a number. */ value?: string; } /** * Price competitiveness fields requested by the merchant in the query. Field * values are only set if the merchant queries * `PriceCompetitivenessProductView`. * https://support.google.com/merchants/answer/9626903 */ export interface PriceCompetitiveness { /** * The price benchmark currency (ISO 4217 code). */ benchmarkPriceCurrencyCode?: string; /** * The latest available price benchmark in micros (1 millionth of a standard * unit, 1 USD = 1000000 micros) for the product's catalog in the benchmark * country. */ benchmarkPriceMicros?: bigint; /** * The country of the price benchmark (ISO 3166 code). */ countryCode?: string; } function serializePriceCompetitiveness(data: any): PriceCompetitiveness { return { ...data, benchmarkPriceMicros: data["benchmarkPriceMicros"] !== undefined ? String(data["benchmarkPriceMicros"]) : undefined, }; } function deserializePriceCompetitiveness(data: any): PriceCompetitiveness { return { ...data, benchmarkPriceMicros: data["benchmarkPriceMicros"] !== undefined ? BigInt(data["benchmarkPriceMicros"]) : undefined, }; } /** * Price insights fields requested by the merchant in the query. Field values * are only set if the merchant queries `PriceInsightsProductView`. * https://support.google.com/merchants/answer/11916926 */ export interface PriceInsights { /** * The predicted effectiveness of applying the price suggestion, bucketed. */ effectiveness?: | "EFFECTIVENESS_UNSPECIFIED" | "LOW" | "MEDIUM" | "HIGH"; /** * The predicted change in clicks as a fraction after introducing the * suggested price compared to current active price. For example, 0.05 is a 5% * predicted increase in clicks. */ predictedClicksChangeFraction?: number; /** * The predicted change in conversions as a fraction after introducing the * suggested price compared to current active price. For example, 0.05 is a 5% * predicted increase in conversions). */ predictedConversionsChangeFraction?: number; /** * *Deprecated*: This field is no longer supported and will start returning * 0. The predicted change in gross profit as a fraction after introducing the * suggested price compared to current active price. For example, 0.05 is a 5% * predicted increase in gross profit. */ predictedGrossProfitChangeFraction?: number; /** * The predicted change in impressions as a fraction after introducing the * suggested price compared to current active price. For example, 0.05 is a 5% * predicted increase in impressions. */ predictedImpressionsChangeFraction?: number; /** * *Deprecated*: This field is no longer supported and will start returning * USD for all requests. The predicted monthly gross profit change currency * (ISO 4217 code). */ predictedMonthlyGrossProfitChangeCurrencyCode?: string; /** * *Deprecated*: This field is no longer supported and will start returning * 0. The predicted change in gross profit in micros (1 millionth of a * standard unit, 1 USD = 1000000 micros) after introducing the suggested * price for a month compared to current active price. */ predictedMonthlyGrossProfitChangeMicros?: bigint; /** * The suggested price currency (ISO 4217 code). */ suggestedPriceCurrencyCode?: string; /** * The latest suggested price in micros (1 millionth of a standard unit, 1 * USD = 1000000 micros) for the product. */ suggestedPriceMicros?: bigint; } function serializePriceInsights(data: any): PriceInsights { return { ...data, predictedMonthlyGrossProfitChangeMicros: data["predictedMonthlyGrossProfitChangeMicros"] !== undefined ? String(data["predictedMonthlyGrossProfitChangeMicros"]) : undefined, suggestedPriceMicros: data["suggestedPriceMicros"] !== undefined ? String(data["suggestedPriceMicros"]) : undefined, }; } function deserializePriceInsights(data: any): PriceInsights { return { ...data, predictedMonthlyGrossProfitChangeMicros: data["predictedMonthlyGrossProfitChangeMicros"] !== undefined ? BigInt(data["predictedMonthlyGrossProfitChangeMicros"]) : undefined, suggestedPriceMicros: data["suggestedPriceMicros"] !== undefined ? BigInt(data["suggestedPriceMicros"]) : undefined, }; } /** * Required product attributes are primarily defined by the product data * specification. See the Product Data Specification Help Center article for * information. Product data. After inserting, updating, or deleting a product, * it may take several minutes before changes take effect. */ export interface Product { /** * Additional URLs of images of the item. */ additionalImageLinks?: string[]; /** * Additional cut of the item. Used together with size_type to represent * combined size types for apparel items. */ additionalSizeType?: string; /** * Used to group items in an arbitrary way. Only for CPA%, discouraged * otherwise. */ adsGrouping?: string; /** * Similar to ads_grouping, but only works on CPC. */ adsLabels?: string[]; /** * Allows advertisers to override the item URL when the product is shown * within the context of Product Ads. */ adsRedirect?: string; /** * Should be set to true if the item is targeted towards adults. */ adult?: boolean; /** * Target age group of the item. */ ageGroup?: string; /** * A safeguard in the [Automated * Discounts](//support.google.com/merchants/answer/10295759) and [Dynamic * Promotions](//support.google.com/merchants/answer/13949249) projects, * ensuring that discounts on merchants' offers do not fall below this value, * thereby preserving the offer's value and profitability. */ autoPricingMinPrice?: Price; /** * Availability status of the item. */ availability?: string; /** * The day a pre-ordered product becomes available for delivery, in ISO 8601 * format. */ availabilityDate?: string; /** * Brand of the item. */ brand?: string; /** * URL for the canonical version of your item's landing page. */ canonicalLink?: string; /** * Product * [certification](https://support.google.com/merchants/answer/13528839), * introduced for EU energy efficiency labeling compliance using the [EU * EPREL](https://eprel.ec.europa.eu/screen/home) database. */ certifications?: ProductCertification[]; /** * Required. The item's channel (online or local). Acceptable values are: - * "`local`" - "`online`" */ channel?: string; /** * Extra fields to export to the Cloud Retail program. */ cloudExportAdditionalProperties?: CloudExportAdditionalProperties[]; /** * Color of the item. */ color?: string; /** * Condition or state of the item. */ condition?: string; /** * Required. The two-letter ISO 639-1 language code for the item. */ contentLanguage?: string; /** * Cost of goods sold. Used for gross profit reporting. */ costOfGoodsSold?: Price; /** * A list of custom (merchant-provided) attributes. It can also be used for * submitting any attribute of the feed specification in its generic form (for * example, `{ "name": "size type", "value": "regular" }`). This is useful for * submitting attributes not explicitly exposed by the API, such as additional * attributes used for Buy on Google (formerly known as Shopping Actions). */ customAttributes?: CustomAttribute[]; /** * Custom label 0 for custom grouping of items in a Shopping campaign. */ customLabel0?: string; /** * Custom label 1 for custom grouping of items in a Shopping campaign. */ customLabel1?: string; /** * Custom label 2 for custom grouping of items in a Shopping campaign. */ customLabel2?: string; /** * Custom label 3 for custom grouping of items in a Shopping campaign. */ customLabel3?: string; /** * Custom label 4 for custom grouping of items in a Shopping campaign. */ customLabel4?: string; /** * Description of the item. */ description?: string; /** * The date time when an offer becomes visible in search results across * Google’s YouTube surfaces, in [ISO * 8601](http://en.wikipedia.org/wiki/ISO_8601) format. See [Disclosure * date](https://support.google.com/merchants/answer/13034208) for more * information. */ disclosureDate?: string; /** * An identifier for an item for dynamic remarketing campaigns. */ displayAdsId?: string; /** * URL directly to your item's landing page for dynamic remarketing * campaigns. */ displayAdsLink?: string; /** * Advertiser-specified recommendations. */ displayAdsSimilarIds?: string[]; /** * Title of an item for dynamic remarketing campaigns. */ displayAdsTitle?: string; /** * Offer margin for dynamic remarketing campaigns. */ displayAdsValue?: number; /** * The energy efficiency class as defined in EU directive 2010/30/EU. */ energyEfficiencyClass?: string; /** * The list of [destinations to * exclude](//support.google.com/merchants/answer/6324486) for this target * (corresponds to cleared check boxes in Merchant Center). Products that are * excluded from all destinations for more than 7 days are automatically * deleted. */ excludedDestinations?: string[]; /** * Date on which the item should expire, as specified upon insertion, in ISO * 8601 format. The actual expiration date in Google Shopping is exposed in * `productstatuses` as `googleExpirationDate` and might be earlier if * `expirationDate` is too far in the future. */ expirationDate?: string; /** * Required for multi-seller accounts. Use this attribute if you're a * marketplace uploading products for various sellers to your multi-seller * account. */ externalSellerId?: string; /** * Feed label for the item. Either `targetCountry` or `feedLabel` is * required. Must be less than or equal to 20 uppercase letters (A-Z), numbers * (0-9), and dashes (-). */ feedLabel?: string; /** * Optional. Conditions to be met for a product to have free shipping. */ freeShippingThreshold?: FreeShippingThreshold[]; /** * Target gender of the item. */ gender?: string; /** * Google's category of the item (see [Google product * taxonomy](https://support.google.com/merchants/answer/1705911)). When * querying products, this field will contain the user provided value. There * is currently no way to get back the auto assigned google product categories * through the API. */ googleProductCategory?: string; /** * Global Trade Item Number (GTIN) of the item. */ gtin?: string; /** * The REST ID of the product. Content API methods that operate on products * take this as their `productId` parameter. The REST ID for a product has one * of the 2 forms channel:contentLanguage: targetCountry: offerId or * channel:contentLanguage:feedLabel: offerId. */ id?: string; /** * False when the item does not have unique product identifiers appropriate * to its category, such as GTIN, MPN, and brand. Required according to the * Unique Product Identifier Rules for all target countries except for Canada. */ identifierExists?: boolean; /** * URL of an image of the item. */ imageLink?: string; /** * The list of [destinations to * include](//support.google.com/merchants/answer/7501026) for this target * (corresponds to checked check boxes in Merchant Center). Default * destinations are always included unless provided in `excludedDestinations`. */ includedDestinations?: string[]; /** * Number and amount of installments to pay for an item. */ installment?: Installment; /** * Whether the item is a merchant-defined bundle. A bundle is a custom * grouping of different products sold by a merchant for a single price. */ isBundle?: boolean; /** * Shared identifier for all variants of the same product. */ itemGroupId?: string; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#product`" */ kind?: string; /** * Additional URLs of lifestyle images of the item. Used to explicitly * identify images that showcase your item in a real-world context. See the * Help Center article for more information. */ lifestyleImageLinks?: string[]; /** * URL directly linking to your item's page on your website. */ link?: string; /** * URL template for merchant hosted local storefront. */ linkTemplate?: string; /** * Loyalty program information that is used to surface loyalty benefits ( for * example, better pricing, points, etc) to the user of this item. This * signular field points to the latest uploaded loyalty program info. This * field will be deprecated in the coming weeks and should not be used in * favor of the plural 'LoyaltyProgram' field below. */ loyaltyProgram?: LoyaltyProgram; /** * Optional. A list of loyalty program information that is used to surface * loyalty benefits (for example, better pricing, points, etc) to the user of * this item. */ loyaltyPrograms?: LoyaltyProgram[]; /** * The material of which the item is made. */ material?: string; /** * The energy efficiency class as defined in EU directive 2010/30/EU. */ maxEnergyEfficiencyClass?: string; /** * Maximal product handling time (in business days). */ maxHandlingTime?: bigint; /** * The energy efficiency class as defined in EU directive 2010/30/EU. */ minEnergyEfficiencyClass?: string; /** * Minimal product handling time (in business days). */ minHandlingTime?: bigint; /** * URL for the mobile-optimized version of your item's landing page. */ mobileLink?: string; /** * URL template for merchant hosted local storefront optimized for mobile * devices. */ mobileLinkTemplate?: string; /** * Manufacturer Part Number (MPN) of the item. */ mpn?: string; /** * The number of identical products in a merchant-defined multipack. */ multipack?: bigint; /** * Required. A unique identifier for the item. Leading and trailing * whitespaces are stripped and multiple whitespaces are replaced by a single * whitespace upon submission. Only valid unicode characters are accepted. See * the products feed specification for details. *Note:* Content API methods * that operate on products take the REST ID of the product, *not* this * identifier. */ offerId?: string; /** * The item's pattern (for example, polka dots). */ pattern?: string; /** * Publication of this item should be temporarily paused. Acceptable values * are: - "`ads`" */ pause?: string; /** * The pick up option for the item. Acceptable values are: - "`buy`" - * "`reserve`" - "`ship to store`" - "`not supported`" */ pickupMethod?: string; /** * Item store pickup timeline. Acceptable values are: - "`same day`" - "`next * day`" - "`2-day`" - "`3-day`" - "`4-day`" - "`5-day`" - "`6-day`" - * "`7-day`" - "`multi-week`" */ pickupSla?: string; /** * Price of the item. */ price?: Price; /** * Technical specification or additional product details. */ productDetails?: ProductProductDetail[]; /** * The height of the product in the units provided. The value must be between * 0 (exclusive) and 3000 (inclusive). */ productHeight?: ProductDimension; /** * Bullet points describing the most relevant highlights of a product. */ productHighlights?: string[]; /** * The length of the product in the units provided. The value must be between * 0 (exclusive) and 3000 (inclusive). */ productLength?: ProductDimension; /** * Categories of the item (formatted as in product data specification). */ productTypes?: string[]; /** * The weight of the product in the units provided. The value must be between * 0 (exclusive) and 2000 (inclusive). */ productWeight?: ProductWeight; /** * The width of the product in the units provided. The value must be between * 0 (exclusive) and 3000 (inclusive). */ productWidth?: ProductDimension; /** * The unique ID of a promotion. */ promotionIds?: string[]; /** * Advertised sale price of the item. */ salePrice?: Price; /** * Date range during which the item is on sale (see product data * specification ). */ salePriceEffectiveDate?: string; /** * The quantity of the product that is available for selling on Google. * Supported only for online products. */ sellOnGoogleQuantity?: bigint; /** * Shipping rules. */ shipping?: ProductShipping[]; /** * Height of the item for shipping. */ shippingHeight?: ProductShippingDimension; /** * The shipping label of the product, used to group product in account-level * shipping rules. */ shippingLabel?: string; /** * Length of the item for shipping. */ shippingLength?: ProductShippingDimension; /** * Weight of the item for shipping. */ shippingWeight?: ProductShippingWeight; /** * Width of the item for shipping. */ shippingWidth?: ProductShippingDimension; /** * List of country codes (ISO 3166-1 alpha-2) to exclude the offer from * Shopping Ads destination. Countries from this list are removed from * countries configured in MC feed settings. */ shoppingAdsExcludedCountries?: string[]; /** * Size of the item. Only one value is allowed. For variants with different * sizes, insert a separate product for each size with the same `itemGroupId` * value (see size definition). */ sizes?: string[]; /** * System in which the size is specified. Recommended for apparel items. */ sizeSystem?: string; /** * The cut of the item. Recommended for apparel items. */ sizeType?: string; /** * Output only. The source of the offer, that is, how the offer was created. * Acceptable values are: - "`api`" - "`crawl`" - "`feed`" */ source?: string; /** * Structured description, for algorithmically (AI)-generated descriptions. */ structuredDescription?: ProductStructuredDescription; /** * Structured title, for algorithmically (AI)-generated titles. */ structuredTitle?: ProductStructuredTitle; /** * Number of periods (months or years) and amount of payment per period for * an item with an associated subscription contract. */ subscriptionCost?: ProductSubscriptionCost; /** * Required. The CLDR territory code for the item's country of sale. */ targetCountry?: string; /** * The tax category of the product, used to configure detailed tax nexus in * account-level tax settings. */ taxCategory?: string; /** * Tax information. */ taxes?: ProductTax[]; /** * Title of the item. */ title?: string; /** * The transit time label of the product, used to group product in * account-level transit time tables. */ transitTimeLabel?: string; /** * The preference of the denominator of the unit price. */ unitPricingBaseMeasure?: ProductUnitPricingBaseMeasure; /** * The measure and dimension of an item. */ unitPricingMeasure?: ProductUnitPricingMeasure; /** * URL of the 3D model of the item to provide more visuals. */ virtualModelLink?: string; } function serializeProduct(data: any): Product { return { ...data, cloudExportAdditionalProperties: data["cloudExportAdditionalProperties"] !== undefined ? data["cloudExportAdditionalProperties"].map((item: any) => (serializeCloudExportAdditionalProperties(item))) : undefined, installment: data["installment"] !== undefined ? serializeInstallment(data["installment"]) : undefined, loyaltyProgram: data["loyaltyProgram"] !== undefined ? serializeLoyaltyProgram(data["loyaltyProgram"]) : undefined, loyaltyPrograms: data["loyaltyPrograms"] !== undefined ? data["loyaltyPrograms"].map((item: any) => (serializeLoyaltyProgram(item))) : undefined, maxHandlingTime: data["maxHandlingTime"] !== undefined ? String(data["maxHandlingTime"]) : undefined, minHandlingTime: data["minHandlingTime"] !== undefined ? String(data["minHandlingTime"]) : undefined, multipack: data["multipack"] !== undefined ? String(data["multipack"]) : undefined, sellOnGoogleQuantity: data["sellOnGoogleQuantity"] !== undefined ? String(data["sellOnGoogleQuantity"]) : undefined, shipping: data["shipping"] !== undefined ? data["shipping"].map((item: any) => (serializeProductShipping(item))) : undefined, subscriptionCost: data["subscriptionCost"] !== undefined ? serializeProductSubscriptionCost(data["subscriptionCost"]) : undefined, taxes: data["taxes"] !== undefined ? data["taxes"].map((item: any) => (serializeProductTax(item))) : undefined, unitPricingBaseMeasure: data["unitPricingBaseMeasure"] !== undefined ? serializeProductUnitPricingBaseMeasure(data["unitPricingBaseMeasure"]) : undefined, }; } function deserializeProduct(data: any): Product { return { ...data, cloudExportAdditionalProperties: data["cloudExportAdditionalProperties"] !== undefined ? data["cloudExportAdditionalProperties"].map((item: any) => (deserializeCloudExportAdditionalProperties(item))) : undefined, installment: data["installment"] !== undefined ? deserializeInstallment(data["installment"]) : undefined, loyaltyProgram: data["loyaltyProgram"] !== undefined ? deserializeLoyaltyProgram(data["loyaltyProgram"]) : undefined, loyaltyPrograms: data["loyaltyPrograms"] !== undefined ? data["loyaltyPrograms"].map((item: any) => (deserializeLoyaltyProgram(item))) : undefined, maxHandlingTime: data["maxHandlingTime"] !== undefined ? BigInt(data["maxHandlingTime"]) : undefined, minHandlingTime: data["minHandlingTime"] !== undefined ? BigInt(data["minHandlingTime"]) : undefined, multipack: data["multipack"] !== undefined ? BigInt(data["multipack"]) : undefined, sellOnGoogleQuantity: data["sellOnGoogleQuantity"] !== undefined ? BigInt(data["sellOnGoogleQuantity"]) : undefined, shipping: data["shipping"] !== undefined ? data["shipping"].map((item: any) => (deserializeProductShipping(item))) : undefined, subscriptionCost: data["subscriptionCost"] !== undefined ? deserializeProductSubscriptionCost(data["subscriptionCost"]) : undefined, taxes: data["taxes"] !== undefined ? data["taxes"].map((item: any) => (deserializeProductTax(item))) : undefined, unitPricingBaseMeasure: data["unitPricingBaseMeasure"] !== undefined ? deserializeProductUnitPricingBaseMeasure(data["unitPricingBaseMeasure"]) : undefined, }; } /** * Product * [certification](https://support.google.com/merchants/answer/13528839), * introduced for EU energy efficiency labeling compliance using the [EU * EPREL](https://eprel.ec.europa.eu/screen/home) database. */ export interface ProductCertification { /** * The certification authority, for example "European_Commission". Maximum * length is 2000 characters. */ certificationAuthority?: string; /** * The certification code, for eaxample "123456". Maximum length is 2000 * characters. */ certificationCode?: string; /** * The name of the certification, for example "EPREL". Maximum length is 2000 * characters. */ certificationName?: string; /** * The certification value (also known as class, level or grade), for example * "A+", "C", "gold". Maximum length is 2000 characters. */ certificationValue?: string; } /** * Product cluster fields. A product cluster is a grouping for different offers * that represent the same product. Values are only set for fields requested * explicitly in the request's search query. */ export interface ProductCluster { /** * Brand of the product cluster. */ brand?: string; /** * Tells if there is at least one product of the brand currently `IN_STOCK` * in your product feed across multiple countries, all products are * `OUT_OF_STOCK` in your product feed, or `NOT_IN_INVENTORY`. The field * doesn't take the Best Sellers report country filter into account. */ brandInventoryStatus?: | "INVENTORY_STATUS_UNSPECIFIED" | "IN_STOCK" | "OUT_OF_STOCK" | "NOT_IN_INVENTORY"; /** * Product category (1st level) of the product cluster, represented in * Google's product taxonomy. */ categoryL1?: string; /** * Product category (2nd level) of the product cluster, represented in * Google's product taxonomy. */ categoryL2?: string; /** * Product category (3rd level) of the product cluster, represented in * Google's product taxonomy. */ categoryL3?: string; /** * Product category (4th level) of the product cluster, represented in * Google's product taxonomy. */ categoryL4?: string; /** * Product category (5th level) of the product cluster, represented in * Google's product taxonomy. */ categoryL5?: string; /** * Tells whether the product cluster is `IN_STOCK` in your product feed * across multiple countries, `OUT_OF_STOCK` in your product feed, or * `NOT_IN_INVENTORY` at all. The field doesn't take the Best Sellers report * country filter into account. */ inventoryStatus?: | "INVENTORY_STATUS_UNSPECIFIED" | "IN_STOCK" | "OUT_OF_STOCK" | "NOT_IN_INVENTORY"; /** * Title of the product cluster. */ title?: string; /** * GTINs of example variants of the product cluster. */ variantGtins?: string[]; } /** * The estimated days to deliver a product after an order is placed. Only * authorized shipping signals partners working with a merchant can use this * resource. Merchants should use the * [`products`](https://developers.google.com/shopping-content/reference/rest/v2.1/products#productshipping) * resource instead. */ export interface ProductDeliveryTime { /** * Required. A set of associations between `DeliveryArea` and `DeliveryTime` * entries. The total number of `areaDeliveryTimes` can be at most 100. */ areaDeliveryTimes?: ProductDeliveryTimeAreaDeliveryTime[]; /** * Required. The `id` of the product. */ productId?: ProductId; } /** * A pairing of `DeliveryArea` associated with a `DeliveryTime` for this * product. */ export interface ProductDeliveryTimeAreaDeliveryTime { /** * Required. The delivery area associated with `deliveryTime` for this * product. */ deliveryArea?: DeliveryArea; /** * Required. The delivery time associated with `deliveryArea` for this * product. */ deliveryTime?: ProductDeliveryTimeAreaDeliveryTimeDeliveryTime; } /** * A delivery time for this product. */ export interface ProductDeliveryTimeAreaDeliveryTimeDeliveryTime { /** * Required. The maximum number of business days (inclusive) between when an * order is placed and when the product ships. If a product ships in the same * day, set this value to 0. */ maxHandlingTimeDays?: number; /** * Required. The maximum number of business days (inclusive) between when the * product ships and when the product is delivered. */ maxTransitTimeDays?: number; /** * Required. The minimum number of business days (inclusive) between when an * order is placed and when the product ships. If a product ships in the same * day, set this value to 0. */ minHandlingTimeDays?: number; /** * Required. The minimum number of business days (inclusive) between when the * product ships and when the product is delivered. */ minTransitTimeDays?: number; } export interface ProductDimension { /** * Required. The length units. Acceptable values are: - "`in`" - "`cm`" */ unit?: string; /** * Required. The length value represented as a number. The value can have a * maximum precision of four decimal places. */ value?: number; } /** * The Content API ID of the product. */ export interface ProductId { /** * The Content API ID of the product, in the form * `channel:contentLanguage:targetCountry:offerId`. */ productId?: string; } /** * An issue affecting specific product. */ export interface ProductIssue { /** * A list of actionable steps that can be executed to solve the issue. An * example is requesting a re-review or providing arguments when merchant * disagrees with the issue. Actions that are supported in (your) third-party * application can be rendered as buttons and should be available to merchant * when they expand the issue. */ actions?: Action[]; /** * Clarifies the severity of the issue. The summarizing message, if present, * should be shown right under the title for each issue. It helps merchants to * quickly understand the impact of the issue. The detailed breakdown helps * the merchant to fully understand the impact of the issue. It can be * rendered as dialog that opens when the merchant mouse over the summarized * impact statement. Issues with different severity can be styled differently. * They may use a different color or icon to signal the difference between * `ERROR`, `WARNING` and `INFO`. */ impact?: ProductIssueImpact; /** * Details of the issue as a pre-rendered HTML. HTML elements contain CSS * classes that can be used to customize the style of the content. Always * sanitize the HTML before embedding it directly to your application. The * sanitizer needs to allow basic HTML tags, such as: `div`, `span`, `p`, `a`, * `ul`, `li`, `table`, `tr`, `td`. For example, you can use * [DOMPurify](https://www.npmjs.com/package/dompurify). CSS classes: * * `issue-detail` - top level container for the detail of the issue * * `callout-banners` - section of the `issue-detail` with callout banners * * `callout-banner` - single callout banner, inside `callout-banners` * * `callout-banner-info` - callout with important information (default) * * `callout-banner-warning` - callout with a warning * `callout-banner-error` * - callout informing about an error (most severe) * `issue-content` - * section of the `issue-detail`, contains multiple `content-element` * * `content-element` - content element such as a list, link or paragraph, * inside `issue-content` * `root-causes` - unordered list with items * describing root causes of the issue, inside `issue-content` * * `root-causes-intro` - intro text before the `root-causes` list, inside * `issue-content` * `segment` - section of the text, `span` inside paragraph * * `segment-attribute` - section of the text that represents a product * attribute, for example 'image\_link' * `segment-literal` - section of the * text that contains a special value, for example '0-1000 kg' * * `segment-bold` - section of the text that should be rendered as bold * * `segment-italic` - section of the text that should be rendered as italic * * `tooltip` - used on paragraphs that should be rendered with a tooltip. A * section of the text in such a paragraph will have a class `tooltip-text` * and is intended to be shown in a mouse over dialog. If the style is not * used, the `tooltip-text` section would be shown on a new line, after the * main part of the text. * `tooltip-text` - marks a section of the text * within a `tooltip`, that is intended to be shown in a mouse over dialog. * * `tooltip-icon` - marks a section of the text within a `tooltip`, that can * be replaced with a tooltip icon, for example '?' or 'i'. By default, this * section contains a `br` tag, that is separating the main text and the * tooltip text when the style is not used. * `tooltip-style-question` - the * tooltip shows helpful information, can use the '?' as an icon. * * `tooltip-style-info` - the tooltip adds additional information fitting to * the context, can use the 'i' as an icon. * `content-moderation` - marks the * paragraph that explains how the issue was identified. * `list-intro` - * marks the paragraph that contains an intro for a list. This paragraph will * be always followed by a list. * `new-element` - Present for new elements * added to the pre-rendered content in the future. To make sure that a new * content element does not break your style, you can hide everything with * this class. */ prerenderedContent?: string; /** * Title of the issue. */ title?: string; } /** * Overall impact of product issue. */ export interface ProductIssueImpact { /** * Detailed impact breakdown. Explains the types of restriction the issue has * in different shopping destinations and territory. If present, it should be * rendered to the merchant. Can be shown as a mouse over dropdown or a * dialog. Each breakdown item represents a group of regions with the same * impact details. */ breakdowns?: Breakdown[]; /** * Optional. Message summarizing the overall impact of the issue. If present, * it should be rendered to the merchant. For example: "Limits visibility in * France" */ message?: string; /** * The severity of the issue. */ severity?: | "SEVERITY_UNSPECIFIED" | "ERROR" | "WARNING" | "INFO"; } export interface ProductProductDetail { /** * The name of the product detail. */ attributeName?: string; /** * The value of the product detail. */ attributeValue?: string; /** * The section header used to group a set of product details. */ sectionName?: string; } export interface ProductsCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: ProductsCustomBatchRequestEntry[]; } function serializeProductsCustomBatchRequest(data: any): ProductsCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeProductsCustomBatchRequestEntry(item))) : undefined, }; } function deserializeProductsCustomBatchRequest(data: any): ProductsCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeProductsCustomBatchRequestEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch products request. */ export interface ProductsCustomBatchRequestEntry { /** * An entry ID, unique within the batch request. */ batchId?: number; /** * The Content API Supplemental Feed ID. If present then product insertion or * deletion applies to a supplemental feed instead of primary Content API * feed. */ feedId?: bigint; /** * The ID of the managing account. */ merchantId?: bigint; /** * The method of the batch entry. Acceptable values are: - "`delete`" - * "`get`" - "`insert`" - "`update`" */ method?: string; /** * The product to insert or update. Only required if the method is `insert` * or `update`. If the `update` method is used with `updateMask` only to * delete a field, then this isn't required. For example, setting `salePrice` * on the `updateMask` and not providing a `product` will result in an * existing sale price on the product specified by `productId` being deleted. */ product?: Product; /** * The ID of the product to get or mutate. Only defined if the method is * `get`, `delete`, or `update`. */ productId?: string; /** * The comma-separated list of product attributes to be updated. Example: * `"title,salePrice"`. Attributes specified in the update mask without a * value specified in the body will be deleted from the product. *You must * specify the update mask to delete attributes.* Only top-level product * attributes can be updated. If not defined, product attributes with set * values will be updated and other attributes will stay unchanged. Only * defined if the method is `update`. */ updateMask?: string /* FieldMask */; } function serializeProductsCustomBatchRequestEntry(data: any): ProductsCustomBatchRequestEntry { return { ...data, feedId: data["feedId"] !== undefined ? String(data["feedId"]) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, product: data["product"] !== undefined ? serializeProduct(data["product"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProductsCustomBatchRequestEntry(data: any): ProductsCustomBatchRequestEntry { return { ...data, feedId: data["feedId"] !== undefined ? BigInt(data["feedId"]) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, product: data["product"] !== undefined ? deserializeProduct(data["product"]) : undefined, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } export interface ProductsCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: ProductsCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#productsCustomBatchResponse`". */ kind?: string; } function serializeProductsCustomBatchResponse(data: any): ProductsCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeProductsCustomBatchResponseEntry(item))) : undefined, }; } function deserializeProductsCustomBatchResponse(data: any): ProductsCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeProductsCustomBatchResponseEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch products response. */ export interface ProductsCustomBatchResponseEntry { /** * The ID of the request entry this entry responds to. */ batchId?: number; /** * A list of errors for failed custombatch entries. *Note:* Schema errors * fail the whole request. */ errors?: Errors; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#productsCustomBatchResponseEntry`" */ kind?: string; /** * The inserted product. Only defined if the method is `insert` and if the * request was successful. */ product?: Product; } function serializeProductsCustomBatchResponseEntry(data: any): ProductsCustomBatchResponseEntry { return { ...data, product: data["product"] !== undefined ? serializeProduct(data["product"]) : undefined, }; } function deserializeProductsCustomBatchResponseEntry(data: any): ProductsCustomBatchResponseEntry { return { ...data, product: data["product"] !== undefined ? deserializeProduct(data["product"]) : undefined, }; } /** * Additional options for Content#productsDelete. */ export interface ProductsDeleteOptions { /** * The Content API Supplemental Feed ID. If present then product deletion * applies to the data in a supplemental feed. If absent, entire product will * be deleted. */ feedId?: bigint; } function serializeProductsDeleteOptions(data: any): ProductsDeleteOptions { return { ...data, feedId: data["feedId"] !== undefined ? String(data["feedId"]) : undefined, }; } function deserializeProductsDeleteOptions(data: any): ProductsDeleteOptions { return { ...data, feedId: data["feedId"] !== undefined ? BigInt(data["feedId"]) : undefined, }; } export interface ProductShipping { /** * The CLDR territory code of the country to which an item will ship. */ country?: string; /** * The location where the shipping is applicable, represented by a location * group name. */ locationGroupName?: string; /** * The numeric ID of a location that the shipping rate applies to as defined * in the Google Ads API. */ locationId?: bigint; /** * Maximum handling time (inclusive) between when the order is received and * shipped in business days. 0 means that the order is shipped on the same day * as it's received if it happens before the cut-off time. Both * maxHandlingTime and maxTransitTime are required if providing shipping * speeds. */ maxHandlingTime?: bigint; /** * Maximum transit time (inclusive) between when the order has shipped and * when it's delivered in business days. 0 means that the order is delivered * on the same day as it ships. Both maxHandlingTime and maxTransitTime are * required if providing shipping speeds. */ maxTransitTime?: bigint; /** * Minimum handling time (inclusive) between when the order is received and * shipped in business days. 0 means that the order is shipped on the same day * as it's received if it happens before the cut-off time. minHandlingTime can * only be present together with maxHandlingTime; but it's not required if * maxHandlingTime is present. */ minHandlingTime?: bigint; /** * Minimum transit time (inclusive) between when the order has shipped and * when it's delivered in business days. 0 means that the order is delivered * on the same day as it ships. minTransitTime can only be present together * with maxTransitTime; but it's not required if maxTransitTime is present. */ minTransitTime?: bigint; /** * The postal code range that the shipping rate applies to, represented by a * postal code, a postal code prefix followed by a * wildcard, a range between * two postal codes or two postal code prefixes of equal length. */ postalCode?: string; /** * Fixed shipping price, represented as a number. */ price?: Price; /** * The geographic region to which a shipping rate applies. */ region?: string; /** * A free-form description of the service class or delivery speed. */ service?: string; } function serializeProductShipping(data: any): ProductShipping { return { ...data, locationId: data["locationId"] !== undefined ? String(data["locationId"]) : undefined, maxHandlingTime: data["maxHandlingTime"] !== undefined ? String(data["maxHandlingTime"]) : undefined, maxTransitTime: data["maxTransitTime"] !== undefined ? String(data["maxTransitTime"]) : undefined, minHandlingTime: data["minHandlingTime"] !== undefined ? String(data["minHandlingTime"]) : undefined, minTransitTime: data["minTransitTime"] !== undefined ? String(data["minTransitTime"]) : undefined, }; } function deserializeProductShipping(data: any): ProductShipping { return { ...data, locationId: data["locationId"] !== undefined ? BigInt(data["locationId"]) : undefined, maxHandlingTime: data["maxHandlingTime"] !== undefined ? BigInt(data["maxHandlingTime"]) : undefined, maxTransitTime: data["maxTransitTime"] !== undefined ? BigInt(data["maxTransitTime"]) : undefined, minHandlingTime: data["minHandlingTime"] !== undefined ? BigInt(data["minHandlingTime"]) : undefined, minTransitTime: data["minTransitTime"] !== undefined ? BigInt(data["minTransitTime"]) : undefined, }; } export interface ProductShippingDimension { /** * The unit of value. */ unit?: string; /** * The dimension of the product used to calculate the shipping cost of the * item. */ value?: number; } export interface ProductShippingWeight { /** * The unit of value. */ unit?: string; /** * The weight of the product used to calculate the shipping cost of the item. */ value?: number; } /** * Additional options for Content#productsInsert. */ export interface ProductsInsertOptions { /** * The Content API Supplemental Feed ID. If present then product insertion * applies to the data in a supplemental feed. */ feedId?: bigint; } function serializeProductsInsertOptions(data: any): ProductsInsertOptions { return { ...data, feedId: data["feedId"] !== undefined ? String(data["feedId"]) : undefined, }; } function deserializeProductsInsertOptions(data: any): ProductsInsertOptions { return { ...data, feedId: data["feedId"] !== undefined ? BigInt(data["feedId"]) : undefined, }; } /** * Additional options for Content#productsList. */ export interface ProductsListOptions { /** * The maximum number of products to return in the response, used for paging. * The default value is 25. The maximum value is 250. */ maxResults?: number; /** * The token returned by the previous request. */ pageToken?: string; } export interface ProductsListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#productsListResponse`". */ kind?: string; /** * The token for the retrieval of the next page of products. */ nextPageToken?: string; resources?: Product[]; } function serializeProductsListResponse(data: any): ProductsListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (serializeProduct(item))) : undefined, }; } function deserializeProductsListResponse(data: any): ProductsListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (deserializeProduct(item))) : undefined, }; } /** * The status of a product, that is, information about a product computed * asynchronously. */ export interface ProductStatus { /** * Date on which the item has been created, in ISO 8601 format. */ creationDate?: string; /** * The intended destinations for the product. */ destinationStatuses?: ProductStatusDestinationStatus[]; /** * Date on which the item expires in Google Shopping, in ISO 8601 format. */ googleExpirationDate?: string; /** * A list of all issues associated with the product. */ itemLevelIssues?: ProductStatusItemLevelIssue[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#productStatus`" */ kind?: string; /** * Date on which the item has been last updated, in ISO 8601 format. */ lastUpdateDate?: string; /** * The link to the product. */ link?: string; /** * The ID of the product for which status is reported. */ productId?: string; /** * The title of the product. */ title?: string; } export interface ProductStatusDestinationStatus { /** * List of country codes (ISO 3166-1 alpha-2) where the offer is approved. */ approvedCountries?: string[]; /** * The name of the destination */ destination?: string; /** * List of country codes (ISO 3166-1 alpha-2) where the offer is disapproved. */ disapprovedCountries?: string[]; /** * List of country codes (ISO 3166-1 alpha-2) where the offer is pending * approval. */ pendingCountries?: string[]; /** * Deprecated. Destination approval status in `targetCountry` of the offer. */ status?: string; } export interface ProductstatusesCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: ProductstatusesCustomBatchRequestEntry[]; } function serializeProductstatusesCustomBatchRequest(data: any): ProductstatusesCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeProductstatusesCustomBatchRequestEntry(item))) : undefined, }; } function deserializeProductstatusesCustomBatchRequest(data: any): ProductstatusesCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeProductstatusesCustomBatchRequestEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch productstatuses request. */ export interface ProductstatusesCustomBatchRequestEntry { /** * An entry ID, unique within the batch request. */ batchId?: number; /** * If set, only issues for the specified destinations are returned, otherwise * only issues for the Shopping destination. */ destinations?: string[]; /** * Deprecated: Setting this field has no effect and attributes are never * included. */ includeAttributes?: boolean; /** * The ID of the managing account. */ merchantId?: bigint; /** * The method of the batch entry. Acceptable values are: - "`get`" */ method?: string; /** * The ID of the product whose status to get. */ productId?: string; } function serializeProductstatusesCustomBatchRequestEntry(data: any): ProductstatusesCustomBatchRequestEntry { return { ...data, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeProductstatusesCustomBatchRequestEntry(data: any): ProductstatusesCustomBatchRequestEntry { return { ...data, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } export interface ProductstatusesCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: ProductstatusesCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#productstatusesCustomBatchResponse`". */ kind?: string; } /** * A batch entry encoding a single non-batch productstatuses response. */ export interface ProductstatusesCustomBatchResponseEntry { /** * The ID of the request entry this entry responds to. */ batchId?: number; /** * A list of errors for failed custombatch entries. *Note:* Schema errors * fail the whole request. */ errors?: Errors; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#productstatusesCustomBatchResponseEntry`" */ kind?: string; /** * The requested product status. Only defined if the request was successful. */ productStatus?: ProductStatus; } /** * Additional options for Content#productstatusesGet. */ export interface ProductstatusesGetOptions { /** * If set, only issues for the specified destinations are returned, otherwise * only issues for the Shopping destination. */ destinations?: string; } /** * Additional options for Content#productstatusesList. */ export interface ProductstatusesListOptions { /** * If set, only issues for the specified destinations are returned, otherwise * only issues for the Shopping destination. */ destinations?: string; /** * The maximum number of product statuses to return in the response, used for * paging. The default value is 25. The maximum value is 250. */ maxResults?: number; /** * The token returned by the previous request. */ pageToken?: string; } export interface ProductstatusesListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#productstatusesListResponse`". */ kind?: string; /** * The token for the retrieval of the next page of products statuses. */ nextPageToken?: string; resources?: ProductStatus[]; } export interface ProductStatusItemLevelIssue { /** * List of country codes (ISO 3166-1 alpha-2) where issue applies to the * offer. */ applicableCountries?: string[]; /** * The attribute's name, if the issue is caused by a single attribute. */ attributeName?: string; /** * The error code of the issue. */ code?: string; /** * A short issue description in English. */ description?: string; /** * The destination the issue applies to. */ destination?: string; /** * A detailed issue description in English. */ detail?: string; /** * The URL of a web page to help with resolving this issue. */ documentation?: string; /** * Whether the issue can be resolved by the merchant. */ resolution?: string; /** * How this issue affects serving of the offer. */ servability?: string; } /** * Structured description, for algorithmically (AI)-generated descriptions. See * [description](https://support.google.com/merchants/answer/6324468#When_to_use) * for more information. */ export interface ProductStructuredDescription { /** * Required. The description text. Maximum length is 5000 characters. */ content?: string; /** * Optional. The digital source type. Acceptable values are: - * "`trained_algorithmic_media`" - "`default`" */ digitalSourceType?: string; } /** * Structured title, for algorithmically (AI)-generated titles. See * [title](https://support.google.com/merchants/answer/6324415#Whentouse) for * more information. */ export interface ProductStructuredTitle { /** * Required. The title text. Maximum length is 150 characters. */ content?: string; /** * Optional. The digital source type. Acceptable values are: - * "`trained_algorithmic_media`" - "`default`" */ digitalSourceType?: string; } export interface ProductSubscriptionCost { /** * The amount the buyer has to pay per subscription period. */ amount?: Price; /** * The type of subscription period. - "`month`" - "`year`" */ period?: string; /** * The number of subscription periods the buyer has to pay. */ periodLength?: bigint; } function serializeProductSubscriptionCost(data: any): ProductSubscriptionCost { return { ...data, periodLength: data["periodLength"] !== undefined ? String(data["periodLength"]) : undefined, }; } function deserializeProductSubscriptionCost(data: any): ProductSubscriptionCost { return { ...data, periodLength: data["periodLength"] !== undefined ? BigInt(data["periodLength"]) : undefined, }; } /** * Additional options for Content#productsUpdate. */ export interface ProductsUpdateOptions { /** * The comma-separated list of product attributes to be updated. Example: * `"title,salePrice"`. Attributes specified in the update mask without a * value specified in the body will be deleted from the product. *You must * specify the update mask to delete attributes.* Only top-level product * attributes can be updated. If not defined, product attributes with set * values will be updated and other attributes will stay unchanged. */ updateMask?: string /* FieldMask */; } function serializeProductsUpdateOptions(data: any): ProductsUpdateOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeProductsUpdateOptions(data: any): ProductsUpdateOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } export interface ProductTax { /** * The country within which the item is taxed, specified as a CLDR territory * code. */ country?: string; /** * The numeric ID of a location that the tax rate applies to as defined in * the Google Ads API. */ locationId?: bigint; /** * The postal code range that the tax rate applies to, represented by a ZIP * code, a ZIP code prefix using * wildcard, a range between two ZIP codes or * two ZIP code prefixes of equal length. Examples: 94114, 94*, 94002-95460, * 94*-95*. */ postalCode?: string; /** * The percentage of tax rate that applies to the item price. */ rate?: number; /** * The geographic region to which the tax rate applies. */ region?: string; /** * Should be set to true if tax is charged on shipping. */ taxShip?: boolean; } function serializeProductTax(data: any): ProductTax { return { ...data, locationId: data["locationId"] !== undefined ? String(data["locationId"]) : undefined, }; } function deserializeProductTax(data: any): ProductTax { return { ...data, locationId: data["locationId"] !== undefined ? BigInt(data["locationId"]) : undefined, }; } export interface ProductUnitPricingBaseMeasure { /** * The unit of the denominator. */ unit?: string; /** * The denominator of the unit price. */ value?: bigint; } function serializeProductUnitPricingBaseMeasure(data: any): ProductUnitPricingBaseMeasure { return { ...data, value: data["value"] !== undefined ? String(data["value"]) : undefined, }; } function deserializeProductUnitPricingBaseMeasure(data: any): ProductUnitPricingBaseMeasure { return { ...data, value: data["value"] !== undefined ? BigInt(data["value"]) : undefined, }; } export interface ProductUnitPricingMeasure { /** * The unit of the measure. */ unit?: string; /** * The measure of an item. */ value?: number; } /** * Product fields. Values are only set for fields requested explicitly in the * request's search query. */ export interface ProductView { /** * Aggregated destination status. */ aggregatedDestinationStatus?: | "AGGREGATED_STATUS_UNSPECIFIED" | "NOT_ELIGIBLE_OR_DISAPPROVED" | "PENDING" | "ELIGIBLE_LIMITED" | "ELIGIBLE"; /** * Availability of the product. */ availability?: string; /** * Brand of the product. */ brand?: string; /** * First level of the product category in [Google's product * taxonomy](https://support.google.com/merchants/answer/6324436). */ categoryL1?: string; /** * Second level of the product category in [Google's product * taxonomy](https://support.google.com/merchants/answer/6324436). */ categoryL2?: string; /** * Third level of the product category in [Google's product * taxonomy](https://support.google.com/merchants/answer/6324436). */ categoryL3?: string; /** * Fourth level of the product category in [Google's product * taxonomy](https://support.google.com/merchants/answer/6324436). */ categoryL4?: string; /** * Fifth level of the product category in [Google's product * taxonomy](https://support.google.com/merchants/answer/6324436). */ categoryL5?: string; /** * Channel of the product (online versus local). */ channel?: | "CHANNEL_UNSPECIFIED" | "LOCAL" | "ONLINE"; /** * Estimated performance potential compared to highest performing products of * the merchant. */ clickPotential?: | "CLICK_POTENTIAL_UNSPECIFIED" | "LOW" | "MEDIUM" | "HIGH"; /** * Rank of the product based on its click potential. A product with * `click_potential_rank` 1 has the highest click potential among the * merchant's products that fulfill the search query conditions. */ clickPotentialRank?: bigint; /** * Condition of the product. */ condition?: string; /** * The time the merchant created the product in timestamp seconds. */ creationTime?: Date; /** * Product price currency code (for example, ISO 4217). Absent if product * price is not available. */ currencyCode?: string; /** * Expiration date for the product. Specified on insertion. */ expirationDate?: Date; /** * GTIN of the product. */ gtin?: string[]; /** * The REST ID of the product, in the form of * channel:contentLanguage:targetCountry:offerId. Content API methods that * operate on products take this as their productId parameter. Should always * be included in the SELECT clause. */ id?: string; /** * Item group ID provided by the merchant for grouping variants together. */ itemGroupId?: string; /** * List of item issues for the product. */ itemIssues?: ProductViewItemIssue[]; /** * Language code of the product in BCP 47 format. */ languageCode?: string; /** * Merchant-provided id of the product. */ offerId?: string; /** * Product price specified as micros (1 millionth of a standard unit, 1 USD = * 1000000 micros) in the product currency. Absent in case the information * about the price of the product is not available. */ priceMicros?: bigint; /** * First level of the product type in merchant's own [product * taxonomy](https://support.google.com/merchants/answer/6324436). */ productTypeL1?: string; /** * Second level of the product type in merchant's own [product * taxonomy](https://support.google.com/merchants/answer/6324436). */ productTypeL2?: string; /** * Third level of the product type in merchant's own [product * taxonomy](https://support.google.com/merchants/answer/6324436). */ productTypeL3?: string; /** * Fourth level of the product type in merchant's own [product * taxonomy](https://support.google.com/merchants/answer/6324436). */ productTypeL4?: string; /** * Fifth level of the product type in merchant's own [product * taxonomy](https://support.google.com/merchants/answer/6324436). */ productTypeL5?: string; /** * The normalized shipping label specified in the feed */ shippingLabel?: string; /** * Title of the product. */ title?: string; } function serializeProductView(data: any): ProductView { return { ...data, clickPotentialRank: data["clickPotentialRank"] !== undefined ? String(data["clickPotentialRank"]) : undefined, creationTime: data["creationTime"] !== undefined ? data["creationTime"].toISOString() : undefined, priceMicros: data["priceMicros"] !== undefined ? String(data["priceMicros"]) : undefined, }; } function deserializeProductView(data: any): ProductView { return { ...data, clickPotentialRank: data["clickPotentialRank"] !== undefined ? BigInt(data["clickPotentialRank"]) : undefined, creationTime: data["creationTime"] !== undefined ? new Date(data["creationTime"]) : undefined, priceMicros: data["priceMicros"] !== undefined ? BigInt(data["priceMicros"]) : undefined, }; } /** * Item issue associated with the product. */ export interface ProductViewItemIssue { /** * Item issue type. */ issueType?: ProductViewItemIssueItemIssueType; /** * Item issue resolution. */ resolution?: | "UNKNOWN" | "MERCHANT_ACTION" | "PENDING_PROCESSING"; /** * Item issue severity. */ severity?: ProductViewItemIssueItemIssueSeverity; } /** * Issue severity for all affected regions in a destination. */ export interface ProductViewItemIssueIssueSeverityPerDestination { /** * List of demoted countries in the destination. */ demotedCountries?: string[]; /** * Issue destination. */ destination?: string; /** * List of disapproved countries in the destination. */ disapprovedCountries?: string[]; } /** * Severity of an issue per destination in a region, and aggregated severity. */ export interface ProductViewItemIssueItemIssueSeverity { /** * Severity of an issue aggregated for destination. */ aggregatedSeverity?: | "AGGREGATED_ISSUE_SEVERITY_UNSPECIFIED" | "DISAPPROVED" | "DEMOTED" | "PENDING"; /** * Item issue severity for every destination. */ severityPerDestination?: ProductViewItemIssueIssueSeverityPerDestination[]; } /** * Type of the item issue. */ export interface ProductViewItemIssueItemIssueType { /** * Canonical attribute name for attribute-specific issues. */ canonicalAttribute?: string; /** * Error code of the issue. */ code?: string; } export interface ProductWeight { /** * Required. The weight unit. Acceptable values are: - "`g`" - "`kg`" - * "`oz`" - "`lb`" */ unit?: string; /** * Required. The weight represented as a number. The weight can have a * maximum precision of four decimal places. */ value?: number; } /** * Represents a promotion. See the following articles for more details. * * [Promotions feed * specification](https://support.google.com/merchants/answer/2906014) * [Local * promotions feed * specification](https://support.google.com/merchants/answer/10146130) * * [Promotions on Buy on Google product data * specification](https://support.google.com/merchants/answer/9173673) */ export interface Promotion { /** * Product filter by brand for the promotion. */ brand?: string[]; /** * Product filter by brand exclusion for the promotion. */ brandExclusion?: string[]; /** * Required. The content language used as part of the unique identifier. `en` * content language is available for all target countries. `fr` content * language is available for `CA` and `FR` target countries. `de` content * language is available for `DE` target country. `nl` content language is * available for `NL` target country. `it` content language is available for * `IT` target country. `pt` content language is available for `BR` target * country. `ja` content language is available for `JP` target country. `ko` * content language is available for `KR` target country. */ contentLanguage?: string; /** * Required. Coupon value type for the promotion. */ couponValueType?: | "COUPON_VALUE_TYPE_UNSPECIFIED" | "MONEY_OFF" | "PERCENT_OFF" | "BUY_M_GET_N_MONEY_OFF" | "BUY_M_GET_N_PERCENT_OFF" | "BUY_M_GET_MONEY_OFF" | "BUY_M_GET_PERCENT_OFF" | "FREE_GIFT" | "FREE_GIFT_WITH_VALUE" | "FREE_GIFT_WITH_ITEM_ID" | "FREE_SHIPPING_STANDARD" | "FREE_SHIPPING_OVERNIGHT" | "FREE_SHIPPING_TWO_DAY"; /** * Free gift description for the promotion. */ freeGiftDescription?: string; /** * Free gift item ID for the promotion. */ freeGiftItemId?: string; /** * Free gift value for the promotion. */ freeGiftValue?: PriceAmount; /** * Generic redemption code for the promotion. To be used with the `offerType` * field. */ genericRedemptionCode?: string; /** * The number of items discounted in the promotion. */ getThisQuantityDiscounted?: number; /** * Output only. The REST promotion ID to uniquely identify the promotion. * Content API methods that operate on promotions take this as their * `promotionId` parameter. The REST ID for a promotion is of the form * channel:contentLanguage:targetCountry:promotionId The `channel` field has a * value of `"online"`, `"in_store"`, or `"online_in_store"`. */ readonly id?: string; /** * Product filter by item group ID for the promotion. */ itemGroupId?: string[]; /** * Product filter by item group ID exclusion for the promotion. */ itemGroupIdExclusion?: string[]; /** * Product filter by item ID for the promotion. */ itemId?: string[]; /** * Product filter by item ID exclusion for the promotion. */ itemIdExclusion?: string[]; /** * Maximum purchase quantity for the promotion. */ limitQuantity?: number; /** * Maximum purchase value for the promotion. */ limitValue?: PriceAmount; /** * Required. Long title for the promotion. */ longTitle?: string; /** * Minimum purchase amount for the promotion. */ minimumPurchaseAmount?: PriceAmount; /** * Minimum purchase quantity for the promotion. */ minimumPurchaseQuantity?: number; /** * Cost cap for the promotion. */ moneyBudget?: PriceAmount; /** * The money off amount offered in the promotion. */ moneyOffAmount?: PriceAmount; /** * Required. Type of the promotion. */ offerType?: | "OFFER_TYPE_UNSPECIFIED" | "NO_CODE" | "GENERIC_CODE"; /** * Order limit for the promotion. */ orderLimit?: number; /** * The percentage discount offered in the promotion. */ percentOff?: number; /** * Required. Applicability of the promotion to either all products or only * specific products. */ productApplicability?: | "PRODUCT_APPLICABILITY_UNSPECIFIED" | "ALL_PRODUCTS" | "SPECIFIC_PRODUCTS"; /** * Product filter by product type for the promotion. */ productType?: string[]; /** * Product filter by product type exclusion for the promotion. */ productTypeExclusion?: string[]; /** * Destination ID for the promotion. */ promotionDestinationIds?: string[]; /** * String representation of the promotion display dates. Deprecated. Use * `promotion_display_time_period` instead. */ promotionDisplayDates?: string; /** * `TimePeriod` representation of the promotion's display dates. */ promotionDisplayTimePeriod?: TimePeriod; /** * String representation of the promotion effective dates. Deprecated. Use * `promotion_effective_time_period` instead. */ promotionEffectiveDates?: string; /** * Required. `TimePeriod` representation of the promotion's effective dates. */ promotionEffectiveTimePeriod?: TimePeriod; /** * Required. The user provided promotion ID to uniquely identify the * promotion. */ promotionId?: string; /** * Output only. The current status of the promotion. */ readonly promotionStatus?: PromotionPromotionStatus; /** * URL to the page on the merchant's site where the promotion shows. Local * Inventory ads promotions throw an error if no promo url is included. URL is * used to confirm that the promotion is valid and can be redeemed. */ promotionUrl?: string; /** * Required. Redemption channel for the promotion. At least one channel is * required. */ redemptionChannel?: | "REDEMPTION_CHANNEL_UNSPECIFIED" | "IN_STORE" | "ONLINE"[]; /** * Shipping service names for the promotion. */ shippingServiceNames?: string[]; /** * Whether the promotion applies to all stores, or only specified stores. * Local Inventory ads promotions throw an error if no store applicability is * included. An INVALID_ARGUMENT error is thrown if store_applicability is set * to ALL_STORES and store_code or score_code_exclusion is set to a value. */ storeApplicability?: | "STORE_APPLICABILITY_UNSPECIFIED" | "ALL_STORES" | "SPECIFIC_STORES"; /** * Store codes to include for the promotion. */ storeCode?: string[]; /** * Store codes to exclude for the promotion. */ storeCodeExclusion?: string[]; /** * Required. The target country used as part of the unique identifier. Can be * `AU`, `CA`, `DE`, `FR`, `GB`, `IN`, `US`, `BR`, `ES`, `NL`, `JP`, `IT` or * `KR`. */ targetCountry?: string; } function serializePromotion(data: any): Promotion { return { ...data, promotionDisplayTimePeriod: data["promotionDisplayTimePeriod"] !== undefined ? serializeTimePeriod(data["promotionDisplayTimePeriod"]) : undefined, promotionEffectiveTimePeriod: data["promotionEffectiveTimePeriod"] !== undefined ? serializeTimePeriod(data["promotionEffectiveTimePeriod"]) : undefined, }; } function deserializePromotion(data: any): Promotion { return { ...data, promotionDisplayTimePeriod: data["promotionDisplayTimePeriod"] !== undefined ? deserializeTimePeriod(data["promotionDisplayTimePeriod"]) : undefined, promotionEffectiveTimePeriod: data["promotionEffectiveTimePeriod"] !== undefined ? deserializeTimePeriod(data["promotionEffectiveTimePeriod"]) : undefined, }; } /** * The status of the promotion. */ export interface PromotionPromotionStatus { /** * Date on which the promotion has been created in [ISO * 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and * offset, for example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" */ creationDate?: string; /** * The intended destinations for the promotion. */ destinationStatuses?: PromotionPromotionStatusDestinationStatus[]; /** * Date on which the promotion status has been last updated in [ISO * 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time, and * offset, for example "2020-01-02T09:00:00+01:00" or "2020-01-02T09:00:00Z" */ lastUpdateDate?: string; /** * A list of issues associated with the promotion. */ promotionIssue?: PromotionPromotionStatusPromotionIssue[]; } /** * The destination status of the promotion. */ export interface PromotionPromotionStatusDestinationStatus { /** * The name of the destination. */ destination?: string; /** * The status for the specified destination. */ status?: | "STATE_UNSPECIFIED" | "IN_REVIEW" | "REJECTED" | "LIVE" | "STOPPED" | "EXPIRED" | "PENDING"; } /** * The issue associated with the promotion. */ export interface PromotionPromotionStatusPromotionIssue { /** * Code of the issue. */ code?: string; /** * Explanation of the issue. */ detail?: string; } /** * Additional options for Content#promotionsList. */ export interface PromotionsListOptions { /** * [CLDR country * code](http://www.unicode.org/repos/cldr/tags/latest/common/main/en.xml) * (for example, "US"), used as a filter on promotions target country. */ countryCode?: string; /** * The two-letter ISO 639-1 language code associated with the promotions, * used as a filter. */ languageCode?: string; /** * The maximum number of promotions to return. The service may return fewer * than this value. If unspecified, at most 50 labels will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListPromotion` call. Provide this * to retrieve the subsequent page. When paginating, all other parameters * provided to `ListPromotion` must match the call that provided the page * token. */ pageToken?: string; } /** * Settings for Pub/Sub notifications, all methods require that the caller is a * direct user of the merchant center account. */ export interface PubsubNotificationSettings { /** * Cloud pub/sub topic to which notifications are sent (read-only). */ cloudTopicName?: string; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#pubsubNotificationSettings`" */ kind?: string; /** * List of event types. Acceptable values are: - "`orderPendingShipment`" */ registeredEvents?: string[]; } /** * Additional options for Content#quotasList. */ export interface QuotasListOptions { /** * The maximum number of quotas to return in the response, used for paging. * Defaults to 500; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * Token (if provided) to retrieve the subsequent page. All other parameters * must match the original call that provided the page token. */ pageToken?: string; } export interface RateGroup { /** * A list of shipping labels defining the products to which this rate group * applies to. This is a disjunction: only one of the labels has to match for * the rate group to apply. May only be empty for the last rate group of a * service. Required. */ applicableShippingLabels?: string[]; /** * A list of carrier rates that can be referred to by `mainTable` or * `singleValue`. */ carrierRates?: CarrierRate[]; /** * A table defining the rate group, when `singleValue` is not expressive * enough. Can only be set if `singleValue` is not set. */ mainTable?: Table; /** * Name of the rate group. Optional. If set has to be unique within shipping * service. */ name?: string; /** * The value of the rate group (for example, flat rate $10). Can only be set * if `mainTable` and `subtables` are not set. */ singleValue?: Value; /** * A list of subtables referred to by `mainTable`. Can only be set if * `mainTable` is set. */ subtables?: Table[]; } /** * Recommendations are suggested ways to improve your merchant account's * performance. For example, to engage with a feature, or start using a new * Google product. */ export interface Recommendation { /** * Output only. CTAs of this recommendation. Repeated. */ readonly additionalCallToAction?: RecommendationCallToAction[]; /** * Output only. List of additional localized descriptions for a * recommendation. Localication uses the `languageCode` field in * `GenerateRecommendations` requests. Not all description types are * guaranteed to be present and we recommend to rely on default description. */ readonly additionalDescriptions?: RecommendationDescription[]; /** * Output only. Any creatives attached to the recommendation. Repeated. */ readonly creative?: RecommendationCreative[]; /** * Optional. Default CTA of the recommendation. */ defaultCallToAction?: RecommendationCallToAction; /** * Optional. Localized recommendation description. The localization the * {@link `GenerateRecommendationsRequest.language_code`} field in {@link * `GenerateRecommendationsRequest`} requests. */ defaultDescription?: string; /** * Optional. A numerical score of the impact from the recommendation's * description. For example, a recommendation might suggest an upward trend in * sales for a certain product. Higher number means larger impact. */ numericalImpact?: number; /** * Optional. Indicates whether a user needs to pay when they complete the * user journey suggested by the recommendation. */ paid?: boolean; /** * Optional. Localized recommendation name. The localization uses the {@link * `GenerateRecommendationsRequest.language_code`} field in {@link * `GenerateRecommendationsRequest`} requests. */ recommendationName?: string; /** * Optional. Subtype of the recommendations. Only applicable when multiple * recommendations can be generated per type, and is used as an identifier of * recommendation under the same recommendation type. */ subType?: string; /** * Optional. Localized Recommendation Title. Localization uses the {@link * `GenerateRecommendationsRequest.language_code`} field in {@link * `GenerateRecommendationsRequest`} requests. */ title?: string; /** * Output only. Type of the recommendation. List of currently available * recommendation types: - OPPORTUNITY_CREATE_NEW_COLLECTION - * OPPORTUNITY_CREATE_EMAIL_CAMPAIGN */ readonly type?: string; } /** * Call to action (CTA) that explains how a merchant can implement this * recommendation */ export interface RecommendationCallToAction { /** * Output only. Intent of the action. This value describes the intent (for * example, `OPEN_CREATE_EMAIL_CAMPAIGN_FLOW`) and can vary from * recommendation to recommendation. This value can change over time for the * same recommendation. Currently available intent values: - * OPEN_CREATE_EMAIL_CAMPAIGN_FLOW: Opens a user journey where they can create * a marketing email campaign. (No default URL) - OPEN_CREATE_COLLECTION_TAB: * Opens a user journey where they can [create a * collection](https://support.google.com/merchants/answer/9703228) for their * Merchant account. (No default URL) */ readonly intent?: string; /** * Output only. Localized text of the CTA. Optional. */ readonly localizedText?: string; /** * Optional. URL of the CTA. This field will only be set for some * recommendations where there is a suggested landing URL. Otherwise it will * be set to an empty string. We recommend developers to use their own custom * landing page according to the description of the intent field above when * this uri field is empty. */ uri?: string; } /** * Creative is a multimedia attachment to recommendation that can be used on * the frontend. */ export interface RecommendationCreative { /** * Type of the creative. */ type?: | "CREATIVE_TYPE_UNSPECIFIED" | "VIDEO" | "PHOTO"; /** * URL of the creative. */ uri?: string; } /** * Google-provided description for the recommendation. */ export interface RecommendationDescription { /** * Output only. Text of the description. */ readonly text?: string; /** * Output only. Type of the description. */ readonly type?: | "DESCRIPTION_TYPE_UNSPECIFIED" | "SHORT" | "LONG"; } /** * Additional options for Content#recommendationsGenerate. */ export interface RecommendationsGenerateOptions { /** * Optional. List of allowed tags. Tags are a set of predefined strings that * describe the category that individual recommendation types belong to. User * can specify zero or more tags in this field to indicate what categories of * recommendations they want to receive. Current list of supported tags: - * TREND */ allowedTag?: string; /** * Optional. Language code of the client. If not set, the result will be in * default language (English). This language code affects all fields prefixed * with "localized". This should be set to ISO 639-1 country code. List of * currently verified supported language code: en, fr, cs, da, de, es, it, nl, * no, pl, pt, pt, fi, sv, vi, tr, th, ko, zh-CN, zh-TW, ja, id, hi */ languageCode?: string; } /** * Represents a geographic region that you can use as a target with both the * `RegionalInventory` and `ShippingSettings` services. You can define regions * as collections of either postal codes or, in some countries, using predefined * geotargets. */ export interface Region { /** * The display name of the region. */ displayName?: string; /** * A list of geotargets that defines the region area. */ geotargetArea?: RegionGeoTargetArea; /** * Output only. Immutable. Merchant that owns the region. */ readonly merchantId?: bigint; /** * A list of postal codes that defines the region area. */ postalCodeArea?: RegionPostalCodeArea; /** * Output only. Indicates if the region is eligible to use in the Regional * Inventory configuration. */ readonly regionalInventoryEligible?: boolean; /** * Output only. Immutable. The ID uniquely identifying each region. */ readonly regionId?: string; /** * Output only. Indicates if the region is eligible to use in the Shipping * Services configuration. */ readonly shippingEligible?: boolean; } function serializeRegion(data: any): Region { return { ...data, geotargetArea: data["geotargetArea"] !== undefined ? serializeRegionGeoTargetArea(data["geotargetArea"]) : undefined, }; } function deserializeRegion(data: any): Region { return { ...data, geotargetArea: data["geotargetArea"] !== undefined ? deserializeRegionGeoTargetArea(data["geotargetArea"]) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } /** * Regional inventory resource. contains the regional name and all attributes * which are overridden for the specified region. */ export interface RegionalInventory { /** * The availability of the product. */ availability?: string; /** * A list of custom (merchant-provided) attributes. It can also be used for * submitting any attribute of the feed specification in its generic form. */ customAttributes?: CustomAttribute[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#regionalInventory`". */ kind?: string; /** * The price of the product. */ price?: Price; /** * The ID uniquely identifying each region. */ regionId?: string; /** * The sale price of the product. Mandatory if `sale_price_effective_date` is * defined. */ salePrice?: Price; /** * A date range represented by a pair of ISO 8601 dates separated by a space, * comma, or slash. Both dates might be specified as 'null' if undecided. */ salePriceEffectiveDate?: string; } export interface RegionalinventoryCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: RegionalinventoryCustomBatchRequestEntry[]; } function serializeRegionalinventoryCustomBatchRequest(data: any): RegionalinventoryCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeRegionalinventoryCustomBatchRequestEntry(item))) : undefined, }; } function deserializeRegionalinventoryCustomBatchRequest(data: any): RegionalinventoryCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeRegionalinventoryCustomBatchRequestEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch regional inventory request. */ export interface RegionalinventoryCustomBatchRequestEntry { /** * An entry ID, unique within the batch request. */ batchId?: number; /** * The ID of the managing account. */ merchantId?: bigint; /** * Method of the batch request entry. Acceptable values are: - "`insert`" */ method?: string; /** * The ID of the product for which to update price and availability. */ productId?: string; /** * Price and availability of the product. */ regionalInventory?: RegionalInventory; } function serializeRegionalinventoryCustomBatchRequestEntry(data: any): RegionalinventoryCustomBatchRequestEntry { return { ...data, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeRegionalinventoryCustomBatchRequestEntry(data: any): RegionalinventoryCustomBatchRequestEntry { return { ...data, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } export interface RegionalinventoryCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: RegionalinventoryCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#regionalinventoryCustomBatchResponse`". */ kind?: string; } /** * A batch entry encoding a single non-batch regional inventory response. */ export interface RegionalinventoryCustomBatchResponseEntry { /** * The ID of the request entry this entry responds to. */ batchId?: number; /** * A list of errors for failed custombatch entries. *Note:* Schema errors * fail the whole request. */ errors?: Errors; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#regionalinventoryCustomBatchResponseEntry`". */ kind?: string; /** * Price and availability of the product. */ regionalInventory?: RegionalInventory; } /** * A list of geotargets that defines the region area. */ export interface RegionGeoTargetArea { /** * Required. A non-empty list of [location * IDs](https://developers.google.com/adwords/api/docs/appendix/geotargeting). * They must all be of the same location type (e.g., state). */ geotargetCriteriaIds?: bigint[]; } function serializeRegionGeoTargetArea(data: any): RegionGeoTargetArea { return { ...data, geotargetCriteriaIds: data["geotargetCriteriaIds"] !== undefined ? data["geotargetCriteriaIds"].map((item: any) => (String(item))) : undefined, }; } function deserializeRegionGeoTargetArea(data: any): RegionGeoTargetArea { return { ...data, geotargetCriteriaIds: data["geotargetCriteriaIds"] !== undefined ? data["geotargetCriteriaIds"].map((item: any) => (BigInt(item))) : undefined, }; } /** * A list of postal codes that defines the region area. Note: All regions * defined using postal codes are accessible via the account's * `ShippingSettings.postalCodeGroups` resource. */ export interface RegionPostalCodeArea { /** * Required. A range of postal codes. */ postalCodes?: RegionPostalCodeAreaPostalCodeRange[]; /** * Required. CLDR territory code or the country the postal code group applies * to. */ regionCode?: string; } /** * A range of postal codes that defines the region area. */ export interface RegionPostalCodeAreaPostalCodeRange { /** * Required. A postal code or a pattern of the form prefix* denoting the * inclusive lower bound of the range defining the area. Examples values: * "94108", "9410*", "9*". */ begin?: string; /** * Optional. A postal code or a pattern of the form prefix* denoting the * inclusive upper bound of the range defining the area. It must have the same * length as postalCodeRangeBegin: if postalCodeRangeBegin is a postal code * then postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin * is a pattern then postalCodeRangeEnd must be a pattern with the same prefix * length. Optional: if not set, then the area is defined as being all the * postal codes matching postalCodeRangeBegin. */ end?: string; } /** * Additional options for Content#regionsCreate. */ export interface RegionsCreateOptions { /** * Required. The id of the region to create. */ regionId?: string; } /** * Additional options for Content#regionsList. */ export interface RegionsListOptions { /** * The maximum number of regions to return. The service may return fewer than * this value. If unspecified, at most 50 rules will be returned. The maximum * value is 1000; values above 1000 will be coerced to 1000. */ pageSize?: number; /** * A page token, received from a previous `ListRegions` call. Provide this to * retrieve the subsequent page. When paginating, all other parameters * provided to `ListRegions` must match the call that provided the page token. */ pageToken?: string; } /** * Additional options for Content#regionsPatch. */ export interface RegionsPatchOptions { /** * Optional. The comma-separated field mask indicating the fields to update. * Example: `"displayName,postalCodeArea.regionCode"`. */ updateMask?: string /* FieldMask */; } function serializeRegionsPatchOptions(data: any): RegionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } function deserializeRegionsPatchOptions(data: any): RegionsPatchOptions { return { ...data, updateMask: data["updateMask"] !== undefined ? data["updateMask"] : undefined, }; } /** * The payload for configuring how the content should be rendered. */ export interface RenderAccountIssuesRequestPayload { /** * Optional. How the detailed content should be returned. Default option is * to return the content as a pre-rendered HTML text. */ contentOption?: | "CONTENT_OPTION_UNSPECIFIED" | "PRE_RENDERED_HTML"; /** * Optional. How actions with user input form should be handled. If not * provided, actions will be returned as links that points merchant to * Merchant Center where they can request the action. */ userInputActionOption?: | "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" | "REDIRECT_TO_MERCHANT_CENTER" | "BUILT_IN_USER_INPUT_ACTIONS"; } /** * Response containing support content and actions for listed account issues. */ export interface RenderAccountIssuesResponse { /** * The Alternate Dispute Resolution (ADR) contains a link to a page where * merchant can bring their appeal to an [external * body](https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). * If the ADR is present, it MUST be available to the merchant on the page * that shows the list with their account issues. */ alternateDisputeResolution?: AlternateDisputeResolution; /** * List of account issues for a given account. This list can be shown with * compressed, expandable items. In the compressed form, the title and impact * should be shown for each issue. Once the issue is expanded, the detailed * content and available actions should be rendered. */ issues?: AccountIssue[]; } /** * The payload for configuring how the content should be rendered. */ export interface RenderProductIssuesRequestPayload { /** * Optional. How the detailed content should be returned. Default option is * to return the content as a pre-rendered HTML text. */ contentOption?: | "CONTENT_OPTION_UNSPECIFIED" | "PRE_RENDERED_HTML"; /** * Optional. How actions with user input form should be handled. If not * provided, actions will be returned as links that points merchant to * Merchant Center where they can request the action. */ userInputActionOption?: | "USER_INPUT_ACTION_RENDERING_OPTION_UNSPECIFIED" | "REDIRECT_TO_MERCHANT_CENTER" | "BUILT_IN_USER_INPUT_ACTIONS"; } /** * Response containing support content and actions for listed product issues. */ export interface RenderProductIssuesResponse { /** * The Alternate Dispute Resolution (ADR) contains a link to a page where * merchant can bring their appeal to an [external * body](https://support.google.com/european-union-digital-services-act-redress-options/answer/13535501). * If present, the link should be shown on the same page as the list of * issues. */ alternateDisputeResolution?: AlternateDisputeResolution; /** * List of issues for a given product. This list can be shown with * compressed, expandable items. In the compressed form, the title and impact * should be shown for each issue. Once the issue is expanded, the detailed * content and available actions should be rendered. */ issues?: ProductIssue[]; } /** * Request to report interactions on a recommendation. */ export interface ReportInteractionRequest { /** * Required. Type of the interaction that is reported, for example * INTERACTION_CLICK. */ interactionType?: | "INTERACTION_TYPE_UNSPECIFIED" | "INTERACTION_DISMISS" | "INTERACTION_CLICK"; /** * Required. Token of the response when recommendation was returned. */ responseToken?: string; /** * Optional. Subtype of the recommendations this interaction happened on. * This field must be set only to the value that is returned by {@link * `RecommendationsService.GenerateRecommendations`} call. */ subtype?: string; /** * Required. Type of the recommendations on which this interaction happened. * This field must be set only to the value that is returned by {@link * `GenerateRecommendationsResponse`} call. */ type?: string; } /** * Result row returned from the search query. */ export interface ReportRow { /** * Best sellers fields requested by the merchant in the query. Field values * are only set if the merchant queries `BestSellersProductClusterView` or * `BestSellersBrandView`. */ bestSellers?: BestSellers; /** * Brand fields requested by the merchant in the query. Field values are only * set if the merchant queries `BestSellersBrandView`. */ brand?: Brand; /** * Competitive visibility fields requested by the merchant in the query. * Field values are only set if the merchant queries * `CompetitiveVisibilityTopMerchantView`, * `CompetitiveVisibilityBenchmarkView` or * `CompetitiveVisibilityCompetitorView`. */ competitiveVisibility?: CompetitiveVisibility; /** * Metrics requested by the merchant in the query. Metric values are only set * for metrics requested explicitly in the query. */ metrics?: Metrics; /** * Price competitiveness fields requested by the merchant in the query. Field * values are only set if the merchant queries * `PriceCompetitivenessProductView`. */ priceCompetitiveness?: PriceCompetitiveness; /** * Price insights fields requested by the merchant in the query. Field values * are only set if the merchant queries `PriceInsightsProductView`. */ priceInsights?: PriceInsights; /** * Product cluster fields requested by the merchant in the query. Field * values are only set if the merchant queries * `BestSellersProductClusterView`. */ productCluster?: ProductCluster; /** * Product fields requested by the merchant in the query. Field values are * only set if the merchant queries `ProductView`. */ productView?: ProductView; /** * Segmentation dimensions requested by the merchant in the query. Dimension * values are only set for dimensions requested explicitly in the query. */ segments?: Segments; /** * [Topic trends](https://support.google.com/merchants/answer/13542370) * fields requested by the merchant in the query. Field values are only set if * the merchant queries `TopicTrendsView`. */ topicTrends?: TopicTrends; } function serializeReportRow(data: any): ReportRow { return { ...data, bestSellers: data["bestSellers"] !== undefined ? serializeBestSellers(data["bestSellers"]) : undefined, competitiveVisibility: data["competitiveVisibility"] !== undefined ? serializeCompetitiveVisibility(data["competitiveVisibility"]) : undefined, metrics: data["metrics"] !== undefined ? serializeMetrics(data["metrics"]) : undefined, priceCompetitiveness: data["priceCompetitiveness"] !== undefined ? serializePriceCompetitiveness(data["priceCompetitiveness"]) : undefined, priceInsights: data["priceInsights"] !== undefined ? serializePriceInsights(data["priceInsights"]) : undefined, productView: data["productView"] !== undefined ? serializeProductView(data["productView"]) : undefined, }; } function deserializeReportRow(data: any): ReportRow { return { ...data, bestSellers: data["bestSellers"] !== undefined ? deserializeBestSellers(data["bestSellers"]) : undefined, competitiveVisibility: data["competitiveVisibility"] !== undefined ? deserializeCompetitiveVisibility(data["competitiveVisibility"]) : undefined, metrics: data["metrics"] !== undefined ? deserializeMetrics(data["metrics"]) : undefined, priceCompetitiveness: data["priceCompetitiveness"] !== undefined ? deserializePriceCompetitiveness(data["priceCompetitiveness"]) : undefined, priceInsights: data["priceInsights"] !== undefined ? deserializePriceInsights(data["priceInsights"]) : undefined, productView: data["productView"] !== undefined ? deserializeProductView(data["productView"]) : undefined, }; } /** * Request message for the RequestPhoneVerification method. */ export interface RequestPhoneVerificationRequest { /** * Language code [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) (for * example, en-US). Language code is used to provide localized `SMS` and * `PHONE_CALL`. Default language used is en-US if not provided. */ languageCode?: string; /** * Phone number to be verified. */ phoneNumber?: string; /** * Required. Two letter country code for the phone number, for example `CA` * for Canadian numbers. See the [ISO 3166-1 * alpha-2](https://wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) * officially assigned codes. */ phoneRegionCode?: string; /** * Verification method to receive verification code. */ phoneVerificationMethod?: | "PHONE_VERIFICATION_METHOD_UNSPECIFIED" | "SMS" | "PHONE_CALL"; } /** * Response message for the RequestPhoneVerification method. */ export interface RequestPhoneVerificationResponse { /** * The verification ID to use in subsequent calls to `verifyphonenumber`. */ verificationId?: string; } /** * Request message for the RequestReviewFreeListings Program method. */ export interface RequestReviewFreeListingsRequest { /** * The code [ISO 3166-1 * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country * for which review is to be requested. */ regionCode?: string; } /** * Request message for the RequestReviewShoppingAds program method. */ export interface RequestReviewShoppingAdsRequest { /** * The code [ISO 3166-1 * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the country * for which review is to be requested. */ regionCode?: string; } /** * Return address resource. */ export interface ReturnAddress { /** * Required. The address. */ address?: ReturnAddressAddress; /** * Required. The country of sale where the return address is applicable. */ country?: string; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#returnAddress`" */ kind?: string; /** * Required. The user-defined label of the return address. For the default * address, use the label "default". */ label?: string; /** * Required. The merchant's contact phone number regarding the return. */ phoneNumber?: string; /** * Return address ID generated by Google. */ returnAddressId?: string; } export interface ReturnAddressAddress { /** * CLDR country code (for example, "US"). */ country?: string; /** * City, town or commune. May also include dependent localities or * sublocalities (for example, neighborhoods or suburbs). */ locality?: string; /** * Postal code or ZIP (for example, "94043"). */ postalCode?: string; /** * Name of the recipient to address returns to. */ recipientName?: string; /** * Top-level administrative subdivision of the country. For example, a state * like California ("CA") or a province like Quebec ("QC"). */ region?: string; /** * Street-level part of the address. May be up to two lines, each line * specified as an array element. */ streetAddress?: string[]; } export interface ReturnaddressCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: ReturnaddressCustomBatchRequestEntry[]; } function serializeReturnaddressCustomBatchRequest(data: any): ReturnaddressCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeReturnaddressCustomBatchRequestEntry(item))) : undefined, }; } function deserializeReturnaddressCustomBatchRequest(data: any): ReturnaddressCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeReturnaddressCustomBatchRequestEntry(item))) : undefined, }; } export interface ReturnaddressCustomBatchRequestEntry { /** * An entry ID, unique within the batch request. */ batchId?: number; /** * The Merchant Center account ID. */ merchantId?: bigint; /** * Method of the batch request entry. Acceptable values are: - "`delete`" - * "`get`" - "`insert`" */ method?: string; /** * The return address to submit. This should be set only if the method is * `insert`. */ returnAddress?: ReturnAddress; /** * The return address ID. This should be set only if the method is `delete` * or `get`. */ returnAddressId?: string; } function serializeReturnaddressCustomBatchRequestEntry(data: any): ReturnaddressCustomBatchRequestEntry { return { ...data, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, }; } function deserializeReturnaddressCustomBatchRequestEntry(data: any): ReturnaddressCustomBatchRequestEntry { return { ...data, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, }; } export interface ReturnaddressCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: ReturnaddressCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#returnaddressCustomBatchResponse`". */ kind?: string; } export interface ReturnaddressCustomBatchResponseEntry { /** * The ID of the request entry to which this entry responds. */ batchId?: number; /** * A list of errors defined if, and only if, the request failed. */ errors?: Errors; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#returnaddressCustomBatchResponseEntry`" */ kind?: string; /** * The retrieved return address. */ returnAddress?: ReturnAddress; } /** * Additional options for Content#returnaddressList. */ export interface ReturnaddressListOptions { /** * List only return addresses applicable to the given country of sale. When * omitted, all return addresses are listed. */ country?: string; /** * The maximum number of addresses in the response, used for paging. */ maxResults?: number; /** * The token returned by the previous request. */ pageToken?: string; } export interface ReturnaddressListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#returnaddressListResponse`". */ kind?: string; /** * The token for the retrieval of the next page of addresses. */ nextPageToken?: string; resources?: ReturnAddress[]; } /** * Return policy resource. */ export interface ReturnPolicy { /** * Required. The country of sale where the return policy is applicable. */ country?: string; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#returnPolicy`" */ kind?: string; /** * Required. The user-defined label of the return policy. For the default * policy, use the label "default". */ label?: string; /** * Required. The name of the policy as shown in Merchant Center. */ name?: string; /** * Return reasons that will incur return fees. */ nonFreeReturnReasons?: string[]; /** * Required. The policy. */ policy?: ReturnPolicyPolicy; /** * Return policy ID generated by Google. */ returnPolicyId?: string; /** * The return shipping fee that will apply to non free return reasons. */ returnShippingFee?: Price; /** * An optional list of seasonal overrides. */ seasonalOverrides?: ReturnPolicySeasonalOverride[]; } function serializeReturnPolicy(data: any): ReturnPolicy { return { ...data, policy: data["policy"] !== undefined ? serializeReturnPolicyPolicy(data["policy"]) : undefined, seasonalOverrides: data["seasonalOverrides"] !== undefined ? data["seasonalOverrides"].map((item: any) => (serializeReturnPolicySeasonalOverride(item))) : undefined, }; } function deserializeReturnPolicy(data: any): ReturnPolicy { return { ...data, policy: data["policy"] !== undefined ? deserializeReturnPolicyPolicy(data["policy"]) : undefined, seasonalOverrides: data["seasonalOverrides"] !== undefined ? data["seasonalOverrides"].map((item: any) => (deserializeReturnPolicySeasonalOverride(item))) : undefined, }; } export interface ReturnpolicyCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: ReturnpolicyCustomBatchRequestEntry[]; } function serializeReturnpolicyCustomBatchRequest(data: any): ReturnpolicyCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeReturnpolicyCustomBatchRequestEntry(item))) : undefined, }; } function deserializeReturnpolicyCustomBatchRequest(data: any): ReturnpolicyCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeReturnpolicyCustomBatchRequestEntry(item))) : undefined, }; } export interface ReturnpolicyCustomBatchRequestEntry { /** * An entry ID, unique within the batch request. */ batchId?: number; /** * The Merchant Center account ID. */ merchantId?: bigint; /** * Method of the batch request entry. Acceptable values are: - "`delete`" - * "`get`" - "`insert`" */ method?: string; /** * The return policy to submit. This should be set only if the method is * `insert`. */ returnPolicy?: ReturnPolicy; /** * The return policy ID. This should be set only if the method is `delete` or * `get`. */ returnPolicyId?: string; } function serializeReturnpolicyCustomBatchRequestEntry(data: any): ReturnpolicyCustomBatchRequestEntry { return { ...data, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, returnPolicy: data["returnPolicy"] !== undefined ? serializeReturnPolicy(data["returnPolicy"]) : undefined, }; } function deserializeReturnpolicyCustomBatchRequestEntry(data: any): ReturnpolicyCustomBatchRequestEntry { return { ...data, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, returnPolicy: data["returnPolicy"] !== undefined ? deserializeReturnPolicy(data["returnPolicy"]) : undefined, }; } export interface ReturnpolicyCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: ReturnpolicyCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#returnpolicyCustomBatchResponse`". */ kind?: string; } function serializeReturnpolicyCustomBatchResponse(data: any): ReturnpolicyCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeReturnpolicyCustomBatchResponseEntry(item))) : undefined, }; } function deserializeReturnpolicyCustomBatchResponse(data: any): ReturnpolicyCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeReturnpolicyCustomBatchResponseEntry(item))) : undefined, }; } export interface ReturnpolicyCustomBatchResponseEntry { /** * The ID of the request entry to which this entry responds. */ batchId?: number; /** * A list of errors defined if, and only if, the request failed. */ errors?: Errors; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#returnpolicyCustomBatchResponseEntry`" */ kind?: string; /** * The retrieved return policy. */ returnPolicy?: ReturnPolicy; } function serializeReturnpolicyCustomBatchResponseEntry(data: any): ReturnpolicyCustomBatchResponseEntry { return { ...data, returnPolicy: data["returnPolicy"] !== undefined ? serializeReturnPolicy(data["returnPolicy"]) : undefined, }; } function deserializeReturnpolicyCustomBatchResponseEntry(data: any): ReturnpolicyCustomBatchResponseEntry { return { ...data, returnPolicy: data["returnPolicy"] !== undefined ? deserializeReturnPolicy(data["returnPolicy"]) : undefined, }; } export interface ReturnpolicyListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#returnpolicyListResponse`". */ kind?: string; resources?: ReturnPolicy[]; } function serializeReturnpolicyListResponse(data: any): ReturnpolicyListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (serializeReturnPolicy(item))) : undefined, }; } function deserializeReturnpolicyListResponse(data: any): ReturnpolicyListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (deserializeReturnPolicy(item))) : undefined, }; } /** * Return policy online object. This is currently used to represent return * policies for ads and free listings programs. */ export interface ReturnPolicyOnline { /** * The countries of sale where the return policy is applicable. The values * must be a valid 2 letter ISO 3166 code, e.g. "US". */ countries?: string[]; /** * The item conditions that are accepted for returns. This is required to not * be empty unless the type of return policy is noReturns. */ itemConditions?: | "ITEM_CONDITION_UNSPECIFIED" | "NEW" | "USED"[]; /** * The unique user-defined label of the return policy. The same label cannot * be used in different return policies for the same country. Policies with * the label 'default' will apply to all products, unless a product specifies * a return_policy_label attribute. */ label?: string; /** * The name of the policy as shown in Merchant Center. */ name?: string; /** * The return policy. */ policy?: ReturnPolicyOnlinePolicy; /** * The restocking fee that applies to all return reason categories. This * would be treated as a free restocking fee if the value is not set. */ restockingFee?: ReturnPolicyOnlineRestockingFee; /** * The return methods of how customers can return an item. This value is * required to not be empty unless the type of return policy is noReturns. */ returnMethods?: | "RETURN_METHOD_UNSPECIFIED" | "BY_MAIL" | "IN_STORE" | "AT_A_KIOSK"[]; /** * Output only. Return policy ID generated by Google. */ readonly returnPolicyId?: string; /** * The return policy uri. This can used by Google to do a sanity check for * the policy. */ returnPolicyUri?: string; /** * The return reason category information. This required to not be empty * unless the type of return policy is noReturns. */ returnReasonCategoryInfo?: ReturnPolicyOnlineReturnReasonCategoryInfo[]; } function serializeReturnPolicyOnline(data: any): ReturnPolicyOnline { return { ...data, policy: data["policy"] !== undefined ? serializeReturnPolicyOnlinePolicy(data["policy"]) : undefined, }; } function deserializeReturnPolicyOnline(data: any): ReturnPolicyOnline { return { ...data, policy: data["policy"] !== undefined ? deserializeReturnPolicyOnlinePolicy(data["policy"]) : undefined, }; } /** * The available policies. */ export interface ReturnPolicyOnlinePolicy { /** * The number of days items can be returned after delivery, where one day is * defined to be 24 hours after the delivery timestamp. Required for * `numberOfDaysAfterDelivery` returns. */ days?: bigint; /** * Policy type. */ type?: | "TYPE_UNSPECIFIED" | "NUMBER_OF_DAYS_AFTER_DELIVERY" | "NO_RETURNS" | "LIFETIME_RETURNS"; } function serializeReturnPolicyOnlinePolicy(data: any): ReturnPolicyOnlinePolicy { return { ...data, days: data["days"] !== undefined ? String(data["days"]) : undefined, }; } function deserializeReturnPolicyOnlinePolicy(data: any): ReturnPolicyOnlinePolicy { return { ...data, days: data["days"] !== undefined ? BigInt(data["days"]) : undefined, }; } /** * The restocking fee. This can either be a fixed fee or a micro percent. */ export interface ReturnPolicyOnlineRestockingFee { /** * Fixed restocking fee. */ fixedFee?: PriceAmount; /** * Percent of total price in micros. 15,000,000 means 15% of the total price * would be charged. */ microPercent?: number; } /** * The return reason category info wrapper. */ export interface ReturnPolicyOnlineReturnReasonCategoryInfo { /** * The corresponding return label source. */ returnLabelSource?: | "RETURN_LABEL_SOURCE_UNSPECIFIED" | "DOWNLOAD_AND_PRINT" | "IN_THE_BOX" | "CUSTOMER_RESPONSIBILITY"; /** * The return reason category. */ returnReasonCategory?: | "RETURN_REASON_CATEGORY_UNSPECIFIED" | "BUYER_REMORSE" | "ITEM_DEFECT"; /** * The corresponding return shipping fee. This is only applicable when * returnLabelSource is not the customer's responsibility. */ returnShippingFee?: ReturnPolicyOnlineReturnShippingFee; } /** * The return shipping fee. This can either be a fixed fee or a boolean to * indicate that the customer pays the actual shipping cost. */ export interface ReturnPolicyOnlineReturnShippingFee { /** * Fixed return shipping fee amount. This value is only applicable when type * is FIXED. We will treat the return shipping fee as free if type is FIXED * and this value is not set. */ fixedFee?: PriceAmount; /** * Type of return shipping fee. */ type?: | "TYPE_UNSPECIFIED" | "FIXED" | "CUSTOMER_PAYING_ACTUAL_FEE"; } export interface ReturnPolicyPolicy { /** * Required. Last day for returning the items. In ISO 8601 format. When * specifying the return window like this, set the policy type to * "lastReturnDate". Use this for seasonal overrides only. */ lastReturnDate?: string; /** * The number of days items can be returned after delivery, where one day is * defined to be 24 hours after the delivery timestamp. When specifying the * return window like this, set the policy type to * "numberOfDaysAfterDelivery". Acceptable values are 30, 45, 60, 90, 100, * 180, 270 and 365 for the default policy. Additional policies further allow * 14, 15, 21 and 28 days, but note that for most items a minimum of 30 days * is required for returns. Exceptions may be made for electronics. A policy * of less than 30 days can only be applied to those items. */ numberOfDays?: bigint; /** * Policy type. Use "lastReturnDate" for seasonal overrides only. Note that * for most items a minimum of 30 days is required for returns. Exceptions may * be made for electronics or non-returnable items such as food, perishables, * and living things. A policy of less than 30 days can only be applied to * those items. Acceptable values are: - "`lastReturnDate`" - * "`lifetimeReturns`" - "`noReturns`" - "`numberOfDaysAfterDelivery`" */ type?: string; } function serializeReturnPolicyPolicy(data: any): ReturnPolicyPolicy { return { ...data, numberOfDays: data["numberOfDays"] !== undefined ? String(data["numberOfDays"]) : undefined, }; } function deserializeReturnPolicyPolicy(data: any): ReturnPolicyPolicy { return { ...data, numberOfDays: data["numberOfDays"] !== undefined ? BigInt(data["numberOfDays"]) : undefined, }; } export interface ReturnPolicySeasonalOverride { /** * Required. Last day on which the override applies. In ISO 8601 format. */ endDate?: string; /** * Required. The name of the seasonal override as shown in Merchant Center. */ name?: string; /** * Required. The policy which is in effect during that time. */ policy?: ReturnPolicyPolicy; /** * Required. First day on which the override applies. In ISO 8601 format. */ startDate?: string; } function serializeReturnPolicySeasonalOverride(data: any): ReturnPolicySeasonalOverride { return { ...data, policy: data["policy"] !== undefined ? serializeReturnPolicyPolicy(data["policy"]) : undefined, }; } function deserializeReturnPolicySeasonalOverride(data: any): ReturnPolicySeasonalOverride { return { ...data, policy: data["policy"] !== undefined ? deserializeReturnPolicyPolicy(data["policy"]) : undefined, }; } export interface Row { /** * The list of cells that constitute the row. Must have the same length as * `columnHeaders` for two-dimensional tables, a length of 1 for * one-dimensional tables. Required. */ cells?: Value[]; } /** * Request message for the ReportService.Search method. */ export interface SearchRequest { /** * Number of ReportRows to retrieve in a single page. Defaults to 1000. * Values above 5000 are coerced to 5000. */ pageSize?: number; /** * Token of the page to retrieve. If not specified, the first page of results * is returned. In order to request the next page of results, the value * obtained from `next_page_token` in the previous response should be used. */ pageToken?: string; /** * Required. Query that defines performance metrics to retrieve and * dimensions according to which the metrics are to be segmented. For details * on how to construct your query, see the [Query Language * guide](https://developers.google.com/shopping-content/guides/reports/query-language/overview). */ query?: string; } /** * Response message for the ReportService.Search method. */ export interface SearchResponse { /** * Token which can be sent as `page_token` to retrieve the next page. If * omitted, there are no subsequent pages. */ nextPageToken?: string; /** * Rows that matched the search query. */ results?: ReportRow[]; } function serializeSearchResponse(data: any): SearchResponse { return { ...data, results: data["results"] !== undefined ? data["results"].map((item: any) => (serializeReportRow(item))) : undefined, }; } function deserializeSearchResponse(data: any): SearchResponse { return { ...data, results: data["results"] !== undefined ? data["results"].map((item: any) => (deserializeReportRow(item))) : undefined, }; } /** * Dimensions according to which metrics are segmented in the response. Values * of product dimensions, such as `offer_id`, reflect the state of a product at * the time of the corresponding event, for example, impression or order. * Segment fields cannot be selected in queries without also selecting at least * one metric field. Values are only set for dimensions requested explicitly in * the request's search query. */ export interface Segments { /** * Brand of the product. */ brand?: string; /** * [Product category (1st * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) * in Google's product taxonomy. */ categoryL1?: string; /** * [Product category (2nd * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) * in Google's product taxonomy. */ categoryL2?: string; /** * [Product category (3rd * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) * in Google's product taxonomy. */ categoryL3?: string; /** * [Product category (4th * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) * in Google's product taxonomy. */ categoryL4?: string; /** * [Product category (5th * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) * in Google's product taxonomy. */ categoryL5?: string; /** * Currency in which price metrics are represented, for example, if you * select `ordered_item_sales_micros`, the returned value will be represented * by this currency. */ currencyCode?: string; /** * Code of the country where the customer is located at the time of the * event. Represented in the ISO 3166 format. If the customer country cannot * be determined, a special 'ZZ' code is returned. */ customerCountryCode?: string; /** * Custom label 0 for custom grouping of products. */ customLabel0?: string; /** * Custom label 1 for custom grouping of products. */ customLabel1?: string; /** * Custom label 2 for custom grouping of products. */ customLabel2?: string; /** * Custom label 3 for custom grouping of products. */ customLabel3?: string; /** * Custom label 4 for custom grouping of products. */ customLabel4?: string; /** * Date in the merchant timezone to which metrics apply. */ date?: Date; /** * Merchant-provided id of the product. */ offerId?: string; /** * [Product type (1st * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) * in merchant's own product taxonomy. */ productTypeL1?: string; /** * [Product type (2nd * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) * in merchant's own product taxonomy. */ productTypeL2?: string; /** * [Product type (3rd * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) * in merchant's own product taxonomy. */ productTypeL3?: string; /** * [Product type (4th * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) * in merchant's own product taxonomy. */ productTypeL4?: string; /** * [Product type (5th * level)](https://developers.google.com/shopping-content/guides/reports/segmentation#category_and_product_type) * in merchant's own product taxonomy. */ productTypeL5?: string; /** * Program to which metrics apply, for example, Free Product Listing. */ program?: | "PROGRAM_UNSPECIFIED" | "SHOPPING_ADS" | "FREE_PRODUCT_LISTING" | "FREE_LOCAL_PRODUCT_LISTING" | "BUY_ON_GOOGLE_LISTING"; /** * Title of the product. */ title?: string; /** * First day of the week (Monday) of the metrics date in the merchant * timezone. */ week?: Date; } export interface Service { /** * A boolean exposing the active status of the shipping service. Required. */ active?: boolean; /** * The CLDR code of the currency to which this service applies. Must match * that of the prices in rate groups. */ currency?: string; /** * The CLDR territory code of the country to which the service applies. * Required. */ deliveryCountry?: string; /** * Time spent in various aspects from order to the delivery of the product. * Required. */ deliveryTime?: DeliveryTime; /** * Eligibility for this service. Acceptable values are: - "`All scenarios`" - * "`All scenarios except Shopping Actions`" - "`Shopping Actions`" */ eligibility?: string; /** * Minimum order value for this service. If set, indicates that customers * will have to spend at least this amount. All prices within a service must * have the same currency. Cannot be set together with * minimum_order_value_table. */ minimumOrderValue?: Price; /** * Table of per store minimum order values for the pickup fulfillment type. * Cannot be set together with minimum_order_value. */ minimumOrderValueTable?: MinimumOrderValueTable; /** * Free-form name of the service. Must be unique within target account. * Required. */ name?: string; /** * The carrier-service pair delivering items to collection points. The list * of supported pickup services can be retrieved through the * `getSupportedPickupServices` method. Required if and only if the service * delivery type is `pickup`. */ pickupService?: PickupCarrierService; /** * Shipping rate group definitions. Only the last one is allowed to have an * empty `applicableShippingLabels`, which means "everything else". The other * `applicableShippingLabels` must not overlap. */ rateGroups?: RateGroup[]; /** * Type of locations this service ships orders to. Acceptable values are: - * "`delivery`" - "`pickup` (deprecated)" - "`local_delivery`" - * "`collection_point`" */ shipmentType?: string; /** * A list of stores your products are delivered from. This is only available * for the local delivery shipment type. */ storeConfig?: ServiceStoreConfig; } function serializeService(data: any): Service { return { ...data, storeConfig: data["storeConfig"] !== undefined ? serializeServiceStoreConfig(data["storeConfig"]) : undefined, }; } function deserializeService(data: any): Service { return { ...data, storeConfig: data["storeConfig"] !== undefined ? deserializeServiceStoreConfig(data["storeConfig"]) : undefined, }; } /** * Stores that provide local delivery. Only valid with local delivery * fulfillment. */ export interface ServiceStoreConfig { /** * Time local delivery ends for the day. This can be either * `local_cutoff_time` or `store_close_offset_hours`, if both are provided an * error is thrown. */ cutoffConfig?: ServiceStoreConfigCutoffConfig; /** * Maximum delivery radius. Only needed for local delivery fulfillment type. */ serviceRadius?: Distance; /** * A list of store codes that provide local delivery. If empty, then * `store_service_type` must be `all_stores`, or an error is thrown. If not * empty, then `store_service_type` must be `selected_stores`, or an error is * thrown. */ storeCodes?: string[]; /** * Indicates whether all stores listed by this merchant provide local * delivery or not. Acceptable values are `all stores` and `selected stores` */ storeServiceType?: string; } function serializeServiceStoreConfig(data: any): ServiceStoreConfig { return { ...data, cutoffConfig: data["cutoffConfig"] !== undefined ? serializeServiceStoreConfigCutoffConfig(data["cutoffConfig"]) : undefined, serviceRadius: data["serviceRadius"] !== undefined ? serializeDistance(data["serviceRadius"]) : undefined, }; } function deserializeServiceStoreConfig(data: any): ServiceStoreConfig { return { ...data, cutoffConfig: data["cutoffConfig"] !== undefined ? deserializeServiceStoreConfigCutoffConfig(data["cutoffConfig"]) : undefined, serviceRadius: data["serviceRadius"] !== undefined ? deserializeDistance(data["serviceRadius"]) : undefined, }; } /** * Time local delivery ends for the day based on the local timezone of the * store. `local_cutoff_time` and `store_close_offset_hours` are mutually * exclusive. */ export interface ServiceStoreConfigCutoffConfig { /** * Time in hours and minutes in the local timezone when local delivery ends. */ localCutoffTime?: ServiceStoreConfigCutoffConfigLocalCutoffTime; /** * Merchants can opt-out of showing n+1 day local delivery when they have a * shipping service configured to n day local delivery. For example, if the * shipping service defines same-day delivery, and it's past the cut-off, * setting this field to `true` results in the calculated shipping service * rate returning `NO_DELIVERY_POST_CUTOFF`. In the same example, setting this * field to `false` results in the calculated shipping time being one day. * This is only for local delivery. */ noDeliveryPostCutoff?: boolean; /** * Represents cutoff time as the number of hours before store closing. * Mutually exclusive with other fields (hour and minute). */ storeCloseOffsetHours?: bigint; } function serializeServiceStoreConfigCutoffConfig(data: any): ServiceStoreConfigCutoffConfig { return { ...data, localCutoffTime: data["localCutoffTime"] !== undefined ? serializeServiceStoreConfigCutoffConfigLocalCutoffTime(data["localCutoffTime"]) : undefined, storeCloseOffsetHours: data["storeCloseOffsetHours"] !== undefined ? String(data["storeCloseOffsetHours"]) : undefined, }; } function deserializeServiceStoreConfigCutoffConfig(data: any): ServiceStoreConfigCutoffConfig { return { ...data, localCutoffTime: data["localCutoffTime"] !== undefined ? deserializeServiceStoreConfigCutoffConfigLocalCutoffTime(data["localCutoffTime"]) : undefined, storeCloseOffsetHours: data["storeCloseOffsetHours"] !== undefined ? BigInt(data["storeCloseOffsetHours"]) : undefined, }; } /** * Time in hours and minutes in the local timezone when local delivery ends. */ export interface ServiceStoreConfigCutoffConfigLocalCutoffTime { /** * Hour local delivery orders must be placed by to process the same day. */ hour?: bigint; /** * Minute local delivery orders must be placed by to process the same day. */ minute?: bigint; } function serializeServiceStoreConfigCutoffConfigLocalCutoffTime(data: any): ServiceStoreConfigCutoffConfigLocalCutoffTime { return { ...data, hour: data["hour"] !== undefined ? String(data["hour"]) : undefined, minute: data["minute"] !== undefined ? String(data["minute"]) : undefined, }; } function deserializeServiceStoreConfigCutoffConfigLocalCutoffTime(data: any): ServiceStoreConfigCutoffConfigLocalCutoffTime { return { ...data, hour: data["hour"] !== undefined ? BigInt(data["hour"]) : undefined, minute: data["minute"] !== undefined ? BigInt(data["minute"]) : undefined, }; } /** * The merchant account's shipping settings. All methods except * getsupportedcarriers and getsupportedholidays require the admin role. */ export interface ShippingSettings { /** * The ID of the account to which these account shipping settings belong. * Ignored upon update, always present in get request responses. */ accountId?: bigint; /** * A list of postal code groups that can be referred to in `services`. * Optional. */ postalCodeGroups?: PostalCodeGroup[]; /** * The target account's list of services. Optional. */ services?: Service[]; /** * Optional. A list of warehouses which can be referred to in `services`. */ warehouses?: Warehouse[]; } function serializeShippingSettings(data: any): ShippingSettings { return { ...data, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, services: data["services"] !== undefined ? data["services"].map((item: any) => (serializeService(item))) : undefined, warehouses: data["warehouses"] !== undefined ? data["warehouses"].map((item: any) => (serializeWarehouse(item))) : undefined, }; } function deserializeShippingSettings(data: any): ShippingSettings { return { ...data, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, services: data["services"] !== undefined ? data["services"].map((item: any) => (deserializeService(item))) : undefined, warehouses: data["warehouses"] !== undefined ? data["warehouses"].map((item: any) => (deserializeWarehouse(item))) : undefined, }; } export interface ShippingsettingsCustomBatchRequest { /** * The request entries to be processed in the batch. */ entries?: ShippingsettingsCustomBatchRequestEntry[]; } function serializeShippingsettingsCustomBatchRequest(data: any): ShippingsettingsCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeShippingsettingsCustomBatchRequestEntry(item))) : undefined, }; } function deserializeShippingsettingsCustomBatchRequest(data: any): ShippingsettingsCustomBatchRequest { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeShippingsettingsCustomBatchRequestEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch shippingsettings request. */ export interface ShippingsettingsCustomBatchRequestEntry { /** * The ID of the account for which to get/update account shipping settings. */ accountId?: bigint; /** * An entry ID, unique within the batch request. */ batchId?: number; /** * The ID of the managing account. */ merchantId?: bigint; /** * The method of the batch entry. Acceptable values are: - "`get`" - * "`update`" */ method?: string; /** * The account shipping settings to update. Only defined if the method is * `update`. */ shippingSettings?: ShippingSettings; } function serializeShippingsettingsCustomBatchRequestEntry(data: any): ShippingsettingsCustomBatchRequestEntry { return { ...data, accountId: data["accountId"] !== undefined ? String(data["accountId"]) : undefined, merchantId: data["merchantId"] !== undefined ? String(data["merchantId"]) : undefined, shippingSettings: data["shippingSettings"] !== undefined ? serializeShippingSettings(data["shippingSettings"]) : undefined, }; } function deserializeShippingsettingsCustomBatchRequestEntry(data: any): ShippingsettingsCustomBatchRequestEntry { return { ...data, accountId: data["accountId"] !== undefined ? BigInt(data["accountId"]) : undefined, merchantId: data["merchantId"] !== undefined ? BigInt(data["merchantId"]) : undefined, shippingSettings: data["shippingSettings"] !== undefined ? deserializeShippingSettings(data["shippingSettings"]) : undefined, }; } export interface ShippingsettingsCustomBatchResponse { /** * The result of the execution of the batch requests. */ entries?: ShippingsettingsCustomBatchResponseEntry[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#shippingsettingsCustomBatchResponse`". */ kind?: string; } function serializeShippingsettingsCustomBatchResponse(data: any): ShippingsettingsCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (serializeShippingsettingsCustomBatchResponseEntry(item))) : undefined, }; } function deserializeShippingsettingsCustomBatchResponse(data: any): ShippingsettingsCustomBatchResponse { return { ...data, entries: data["entries"] !== undefined ? data["entries"].map((item: any) => (deserializeShippingsettingsCustomBatchResponseEntry(item))) : undefined, }; } /** * A batch entry encoding a single non-batch shipping settings response. */ export interface ShippingsettingsCustomBatchResponseEntry { /** * The ID of the request entry to which this entry responds. */ batchId?: number; /** * A list of errors for failed custombatch entries. *Note:* Schema errors * fail the whole request. */ errors?: Errors; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#shippingsettingsCustomBatchResponseEntry`" */ kind?: string; /** * The retrieved or updated account shipping settings. */ shippingSettings?: ShippingSettings; } function serializeShippingsettingsCustomBatchResponseEntry(data: any): ShippingsettingsCustomBatchResponseEntry { return { ...data, shippingSettings: data["shippingSettings"] !== undefined ? serializeShippingSettings(data["shippingSettings"]) : undefined, }; } function deserializeShippingsettingsCustomBatchResponseEntry(data: any): ShippingsettingsCustomBatchResponseEntry { return { ...data, shippingSettings: data["shippingSettings"] !== undefined ? deserializeShippingSettings(data["shippingSettings"]) : undefined, }; } export interface ShippingsettingsGetSupportedCarriersResponse { /** * A list of supported carriers. May be empty. */ carriers?: CarriersCarrier[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#shippingsettingsGetSupportedCarriersResponse`". */ kind?: string; } export interface ShippingsettingsGetSupportedHolidaysResponse { /** * A list of holidays applicable for delivery guarantees. May be empty. */ holidays?: HolidaysHoliday[]; /** * Identifies what kind of resource this is. Value: the fixed string * "`content#shippingsettingsGetSupportedHolidaysResponse`". */ kind?: string; } function serializeShippingsettingsGetSupportedHolidaysResponse(data: any): ShippingsettingsGetSupportedHolidaysResponse { return { ...data, holidays: data["holidays"] !== undefined ? data["holidays"].map((item: any) => (serializeHolidaysHoliday(item))) : undefined, }; } function deserializeShippingsettingsGetSupportedHolidaysResponse(data: any): ShippingsettingsGetSupportedHolidaysResponse { return { ...data, holidays: data["holidays"] !== undefined ? data["holidays"].map((item: any) => (deserializeHolidaysHoliday(item))) : undefined, }; } export interface ShippingsettingsGetSupportedPickupServicesResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#shippingsettingsGetSupportedPickupServicesResponse`". */ kind?: string; /** * A list of supported pickup services. May be empty. */ pickupServices?: PickupServicesPickupService[]; } /** * Additional options for Content#shippingsettingsList. */ export interface ShippingsettingsListOptions { /** * The maximum number of shipping settings to return in the response, used * for paging. */ maxResults?: number; /** * The token returned by the previous request. */ pageToken?: string; } export interface ShippingsettingsListResponse { /** * Identifies what kind of resource this is. Value: the fixed string * "`content#shippingsettingsListResponse`". */ kind?: string; /** * The token for the retrieval of the next page of shipping settings. */ nextPageToken?: string; resources?: ShippingSettings[]; } function serializeShippingsettingsListResponse(data: any): ShippingsettingsListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (serializeShippingSettings(item))) : undefined, }; } function deserializeShippingsettingsListResponse(data: any): ShippingsettingsListResponse { return { ...data, resources: data["resources"] !== undefined ? data["resources"].map((item: any) => (deserializeShippingSettings(item))) : undefined, }; } /** * Response message for GetShoppingAdsProgramStatus. */ export interface ShoppingAdsProgramStatus { /** * State of the program. `ENABLED` if there are offers for at least one * region. */ globalState?: | "PROGRAM_STATE_UNSPECIFIED" | "NOT_ENABLED" | "NO_OFFERS_UPLOADED" | "ENABLED"; /** * Status of the program in each region. Regions with the same status and * review eligibility are grouped together in `regionCodes`. */ regionStatuses?: ShoppingAdsProgramStatusRegionStatus[]; } function serializeShoppingAdsProgramStatus(data: any): ShoppingAdsProgramStatus { return { ...data, regionStatuses: data["regionStatuses"] !== undefined ? data["regionStatuses"].map((item: any) => (serializeShoppingAdsProgramStatusRegionStatus(item))) : undefined, }; } function deserializeShoppingAdsProgramStatus(data: any): ShoppingAdsProgramStatus { return { ...data, regionStatuses: data["regionStatuses"] !== undefined ? data["regionStatuses"].map((item: any) => (deserializeShoppingAdsProgramStatusRegionStatus(item))) : undefined, }; } /** * Status of program and region. */ export interface ShoppingAdsProgramStatusRegionStatus { /** * Date by which eligibilityStatus will go from `WARNING` to `DISAPPROVED`. * Only visible when your eligibilityStatus is WARNING. In [ISO * 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DD`. */ disapprovalDate?: string; /** * Eligibility status of the Shopping Ads program. */ eligibilityStatus?: | "STATE_UNSPECIFIED" | "APPROVED" | "DISAPPROVED" | "WARNING" | "UNDER_REVIEW" | "PENDING_REVIEW" | "ONBOARDING"; /** * Issues that must be fixed to be eligible for review. */ onboardingIssues?: string[]; /** * The two-letter [ISO 3166-1 * alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes for all * the regions with the same `eligibilityStatus` and `reviewEligibility`. */ regionCodes?: string[]; /** * If a program is eligible for review in a specific region. Only visible if * `eligibilityStatus` is `DISAPPROVED`. */ reviewEligibilityStatus?: | "REVIEW_ELIGIBILITY_UNSPECIFIED" | "ELIGIBLE" | "INELIGIBLE"; /** * Review ineligibility reason if account is not eligible for review. */ reviewIneligibilityReason?: | "REVIEW_INELIGIBILITY_REASON_UNSPECIFIED" | "ONBOARDING_ISSUES" | "NOT_ENOUGH_OFFERS" | "IN_COOLDOWN_PERIOD" | "ALREADY_UNDER_REVIEW" | "NO_REVIEW_REQUIRED" | "WILL_BE_REVIEWED_AUTOMATICALLY" | "IS_RETIRED" | "ALREADY_REVIEWED"; /** * Reason a program in a specific region isn’t eligible for review. Only * visible if `reviewEligibilityStatus` is `INELIGIBLE`. */ reviewIneligibilityReasonDescription?: string; /** * Additional information for ineligibility. If `reviewIneligibilityReason` * is `IN_COOLDOWN_PERIOD`, a timestamp for the end of the cooldown period is * provided. */ reviewIneligibilityReasonDetails?: ShoppingAdsProgramStatusReviewIneligibilityReasonDetails; /** * Issues evaluated in the review process. Fix all issues before requesting a * review. */ reviewIssues?: string[]; } function serializeShoppingAdsProgramStatusRegionStatus(data: any): ShoppingAdsProgramStatusRegionStatus { return { ...data, reviewIneligibilityReasonDetails: data["reviewIneligibilityReasonDetails"] !== undefined ? serializeShoppingAdsProgramStatusReviewIneligibilityReasonDetails(data["reviewIneligibilityReasonDetails"]) : undefined, }; } function deserializeShoppingAdsProgramStatusRegionStatus(data: any): ShoppingAdsProgramStatusRegionStatus { return { ...data, reviewIneligibilityReasonDetails: data["reviewIneligibilityReasonDetails"] !== undefined ? deserializeShoppingAdsProgramStatusReviewIneligibilityReasonDetails(data["reviewIneligibilityReasonDetails"]) : undefined, }; } /** * Additional details for review ineligibility reasons. */ export interface ShoppingAdsProgramStatusReviewIneligibilityReasonDetails { /** * This timestamp represents end of cooldown period for review ineligbility * reason `IN_COOLDOWN_PERIOD`. */ cooldownTime?: Date; } function serializeShoppingAdsProgramStatusReviewIneligibilityReasonDetails(data: any): ShoppingAdsProgramStatusReviewIneligibilityReasonDetails { return { ...data, cooldownTime: data["cooldownTime"] !== undefined ? data["cooldownTime"].toISOString() : undefined, }; } function deserializeShoppingAdsProgramStatusReviewIneligibilityReasonDetails(data: any): ShoppingAdsProgramStatusReviewIneligibilityReasonDetails { return { ...data, cooldownTime: data["cooldownTime"] !== undefined ? new Date(data["cooldownTime"]) : undefined, }; } export interface Table { /** * Headers of the table's columns. Optional: if not set then the table has * only one dimension. */ columnHeaders?: Headers; /** * Name of the table. Required for subtables, ignored for the main table. */ name?: string; /** * Headers of the table's rows. Required. */ rowHeaders?: Headers; /** * The list of rows that constitute the table. Must have the same length as * `rowHeaders`. Required. */ rows?: Row[]; } /** * Block of text that may contain a tooltip with more information. */ export interface TextWithTooltip { /** * Value of the tooltip as a simple text. */ simpleTooltipValue?: string; /** * Value of the message as a simple text. */ simpleValue?: string; /** * The suggested type of an icon for tooltip, if a tooltip is present. */ tooltipIconStyle?: | "TOOLTIP_ICON_STYLE_UNSPECIFIED" | "INFO" | "QUESTION"; } /** * A message that represents a time period. */ export interface TimePeriod { /** * The ending timestamp. */ endTime?: Date; /** * The starting timestamp. */ startTime?: Date; } function serializeTimePeriod(data: any): TimePeriod { return { ...data, endTime: data["endTime"] !== undefined ? data["endTime"].toISOString() : undefined, startTime: data["startTime"] !== undefined ? data["startTime"].toISOString() : undefined, }; } function deserializeTimePeriod(data: any): TimePeriod { return { ...data, endTime: data["endTime"] !== undefined ? new Date(data["endTime"]) : undefined, startTime: data["startTime"] !== undefined ? new Date(data["startTime"]) : undefined, }; } /** * Represents a time zone from the [IANA Time Zone * Database](https://www.iana.org/time-zones). */ export interface TimeZone { /** * IANA Time Zone Database time zone. For example "America/New_York". */ id?: string; /** * Optional. IANA Time Zone Database version number. For example "2019a". */ version?: string; } /** * Topic trends fields requested by the merchant in the query. Field values are * only set if the merchant queries `TopicTrendsView`. Forecast data can be * queried up to 13 weeks by passing a future date in the `date` field. * Historical data is measured daily, and forecasted data is projected weekly. * All data points are normalized based on the highest data points returned in * the response. If you make separate queries with different date ranges, you * might see different values for the same date in each response. The * recommended way to get a trend score of a topic is * `last7_days_search_interest / last{$day}_days_search_interest - 1`. You can * view trends for up to eight topics at a time. */ export interface TopicTrends { /** * Country trends are calculated for. Must be a two-letter country code (ISO * 3166-1-alpha-2 code), for example, `“US”`. */ customerCountryCode?: string; /** * Date the trend score was retrieved. */ date?: Date; /** * Search interest in the last 120 days, with the same normalization as * search_interest. This field is only present for a past date. */ last120DaysSearchInterest?: number; /** * Search interest in the last 30 days, with the same normalization as * search_interest. This field is only present for a past date. */ last30DaysSearchInterest?: number; /** * Search interest in the last 7 days, with the same normalization as * search_interest. This field is only present for a past date. */ last7DaysSearchInterest?: number; /** * Search interest in the last 90 days, with the same normalization as * search_interest. This field is only present for a past date. */ last90DaysSearchInterest?: number; /** * Estimated search interest in the next 7 days, with the same normalization * as search_interest. This field is only present for a future date. */ next7DaysSearchInterest?: number; /** * Daily search interest, normalized to the time and country to make * comparisons easier, with 100 representing peak popularity (from 0 to 100) * for the requested time period and location. */ searchInterest?: number; /** * Google-provided topic trends are calculated for. Only top eight topics are * returned. Topic is what shoppers are searching for on Google, grouped by * the same concept. */ topic?: string; } export interface TransitTable { /** * A list of postal group names. The last value can be `"all other * locations"`. Example: `["zone 1", "zone 2", "all other locations"]`. The * referred postal code groups must match the delivery country of the service. */ postalCodeGroupNames?: string[]; rows?: TransitTableTransitTimeRow[]; /** * A list of transit time labels. The last value can be `"all other labels"`. * Example: `["food", "electronics", "all other labels"]`. */ transitTimeLabels?: string[]; } export interface TransitTableTransitTimeRow { values?: TransitTableTransitTimeRowTransitTimeValue[]; } export interface TransitTableTransitTimeRowTransitTimeValue { /** * Must be greater than or equal to `minTransitTimeInDays`. */ maxTransitTimeInDays?: number; /** * Transit time range (min-max) in business days. 0 means same day delivery, * 1 means next day delivery. */ minTransitTimeInDays?: number; } /** * The payload for the triggered action. */ export interface TriggerActionPayload { /** * Required. The context from the selected action. The value is obtained from * rendered issues and needs to be sent back to identify the action that is * being triggered. */ actionContext?: string; /** * Required. Input provided by the merchant. */ actionInput?: ActionInput; } /** * Response informing about the started action. */ export interface TriggerActionResponse { /** * The message for merchant. */ message?: string; } /** * Request message for the UndeleteConversionSource method. */ export interface UndeleteConversionSourceRequest { } /** * Specifications related to the `Checkout` URL. The `UriTemplate` is of the * form `https://www.mystore.com/checkout?item_id={id}` where `{id}` will be * automatically replaced with data from the merchant account with this * attribute * [offer_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.offer_id) */ export interface UrlSettings { /** * URL template when the placeholders are expanded will redirect the buyer to * the cart page on the merchant website with the selected item in cart. */ cartUriTemplate?: string; /** * URL template when the placeholders are expanded will redirect the buyer to * the merchant checkout page with the item in the cart. */ checkoutUriTemplate?: string; } /** * The single value of a rate group or the value of a rate group table's cell. * Exactly one of `noShipping`, `flatRate`, `pricePercentage`, * `carrierRateName`, `subtableName` must be set. */ export interface Value { /** * The name of a carrier rate referring to a carrier rate defined in the same * rate group. Can only be set if all other fields are not set. */ carrierRateName?: string; /** * A flat rate. Can only be set if all other fields are not set. */ flatRate?: Price; /** * If true, then the product can't ship. Must be true when set, can only be * set if all other fields are not set. */ noShipping?: boolean; /** * A percentage of the price represented as a number in decimal notation (for * example, `"5.4"`). Can only be set if all other fields are not set. */ pricePercentage?: string; /** * The name of a subtable. Can only be set in table cells (not for single * values), and only if all other fields are not set. */ subtableName?: string; } /** * Request message for the VerifyPhoneNumber method. */ export interface VerifyPhoneNumberRequest { /** * Verification method used to receive verification code. */ phoneVerificationMethod?: | "PHONE_VERIFICATION_METHOD_UNSPECIFIED" | "SMS" | "PHONE_CALL"; /** * The verification code that was sent to the phone number for validation. */ verificationCode?: string; /** * The verification ID returned by `requestphoneverification`. */ verificationId?: string; } /** * Response message for the VerifyPhoneNumber method. */ export interface VerifyPhoneNumberResponse { /** * Verified phone number if verification is successful. This phone number can * only be replaced by another verified phone number. */ verifiedPhoneNumber?: string; } /** * A fulfillment warehouse, which stores and handles inventory. */ export interface Warehouse { /** * Business days of the warehouse. If not set, will be Monday to Friday by * default. */ businessDayConfig?: BusinessDayConfig; /** * Required. The latest time of day that an order can be accepted and begin * processing. Later orders will be processed in the next day. The time is * based on the warehouse postal code. */ cutoffTime?: WarehouseCutoffTime; /** * Required. The number of days it takes for this warehouse to pack up and * ship an item. This is on the warehouse level, but can be overridden on the * offer level based on the attributes of an item. */ handlingDays?: bigint; /** * Required. The name of the warehouse. Must be unique within account. */ name?: string; /** * Required. Shipping address of the warehouse. */ shippingAddress?: Address; } function serializeWarehouse(data: any): Warehouse { return { ...data, handlingDays: data["handlingDays"] !== undefined ? String(data["handlingDays"]) : undefined, }; } function deserializeWarehouse(data: any): Warehouse { return { ...data, handlingDays: data["handlingDays"] !== undefined ? BigInt(data["handlingDays"]) : undefined, }; } export interface WarehouseBasedDeliveryTime { /** * Required. Carrier, such as `"UPS"` or `"Fedex"`. The list of supported * carriers can be retrieved through the `listSupportedCarriers` method. */ carrier?: string; /** * Required. Carrier service, such as `"ground"` or `"2 days"`. The list of * supported services for a carrier can be retrieved through the * `listSupportedCarriers` method. The name of the service must be in the * eddSupportedServices list. */ carrierService?: string; /** * Shipping origin's state. */ originAdministrativeArea?: string; /** * Shipping origin's city. */ originCity?: string; /** * Shipping origin's country represented as a [CLDR territory * code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). */ originCountry?: string; /** * Shipping origin. */ originPostalCode?: string; /** * Shipping origin's street address. */ originStreetAddress?: string; /** * The name of the warehouse. Warehouse name need to be matched with name. If * warehouseName is set, the below fields will be ignored. The warehouse info * will be read from warehouse. */ warehouseName?: string; } export interface WarehouseCutoffTime { /** * Required. Hour (24-hour clock) of the cutoff time until which an order has * to be placed to be processed in the same day by the warehouse. Hour is * based on the timezone of warehouse. */ hour?: number; /** * Required. Minute of the cutoff time until which an order has to be placed * to be processed in the same day by the warehouse. Minute is based on the * timezone of warehouse. */ minute?: number; } export interface Weight { /** * Required. The weight unit. Acceptable values are: - "`kg`" - "`lb`" */ unit?: string; /** * Required. The weight represented as a number. The weight can have a * maximum precision of four decimal places. */ value?: string; }