@maxim_mazurok/gapi.client.merchantapi-products_v1 0.0.20250804
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +758 -0
- package/package.json +20 -0
- package/readme.md +73 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,758 @@
|
|
|
1
|
+
/* Type definitions for non-npm package Merchant API products_v1 0.0 */
|
|
2
|
+
// Project: https://developers.google.com/merchant/api
|
|
3
|
+
// Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
|
|
4
|
+
// Nick Amoscato <https://github.com/namoscato>
|
|
5
|
+
// Declan Vong <https://github.com/declanvong>
|
|
6
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
7
|
+
|
|
8
|
+
// IMPORTANT
|
|
9
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
|
+
// Generated from: https://merchantapi.googleapis.com/$discovery/rest?version=products_v1
|
|
12
|
+
// Revision: 20250804
|
|
13
|
+
|
|
14
|
+
/// <reference types="gapi.client" />
|
|
15
|
+
|
|
16
|
+
declare namespace gapi.client {
|
|
17
|
+
/** Load Merchant API products_v1 */
|
|
18
|
+
function load(
|
|
19
|
+
urlOrObject: 'https://merchantapi.googleapis.com/$discovery/rest?version=products_v1',
|
|
20
|
+
): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(name: 'merchantapi', version: 'products_v1'): Promise<void>;
|
|
23
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
24
|
+
function load(
|
|
25
|
+
name: 'merchantapi',
|
|
26
|
+
version: 'products_v1',
|
|
27
|
+
callback: () => any,
|
|
28
|
+
): void;
|
|
29
|
+
|
|
30
|
+
namespace merchantapi {
|
|
31
|
+
interface AutomatedDiscounts {
|
|
32
|
+
/** The current sale price for products with a price optimized using Google Automated Discounts (GAD). Absent if the information about the GAD_price of the product is not available. */
|
|
33
|
+
gadPrice?: Price;
|
|
34
|
+
/** The price prior to the application of the first price reduction. Absent if the information about the prior price of the product is not available. */
|
|
35
|
+
priorPrice?: Price;
|
|
36
|
+
/** The price prior to the application of consecutive price reductions. Absent if the information about the prior price of the product is not available. */
|
|
37
|
+
priorPriceProgressive?: Price;
|
|
38
|
+
}
|
|
39
|
+
interface CloudExportAdditionalProperties {
|
|
40
|
+
/** Boolean value of the given property. For example for a TV product, "True" or "False" if the screen is UHD. */
|
|
41
|
+
boolValue?: boolean;
|
|
42
|
+
/** Float values of the given property. For example for a TV product 1.2345. Maximum repeatedness of this value is 400. Values are stored in an arbitrary but consistent order. */
|
|
43
|
+
floatValue?: number[];
|
|
44
|
+
/** Integer values of the given property. For example, 1080 for a TV product's Screen Resolution. Maximum repeatedness of this value is 400. Values are stored in an arbitrary but consistent order. */
|
|
45
|
+
intValue?: string[];
|
|
46
|
+
/** Maximum float value of the given property. For example for a TV product 100.00. */
|
|
47
|
+
maxValue?: number;
|
|
48
|
+
/** Minimum float value of the given property. For example for a TV product 1.00. */
|
|
49
|
+
minValue?: number;
|
|
50
|
+
/** Name of the given property. For example, "Screen-Resolution" for a TV product. Maximum string size is 256 characters. */
|
|
51
|
+
propertyName?: string;
|
|
52
|
+
/** Text value of the given property. For example, "8K(UHD)" could be a text value for a TV product. Maximum repeatedness of this value is 400. Values are stored in an arbitrary but consistent order. Maximum string size is 256 characters. */
|
|
53
|
+
textValue?: string[];
|
|
54
|
+
/** Unit of the given property. For example, "Pixels" for a TV product. Maximum string size is 256B. */
|
|
55
|
+
unitCode?: string;
|
|
56
|
+
}
|
|
57
|
+
interface CustomAttribute {
|
|
58
|
+
/** Subattributes within this attribute group. If `group_values` is not empty, `value` must be empty. */
|
|
59
|
+
groupValues?: CustomAttribute[];
|
|
60
|
+
/** The name of the attribute. */
|
|
61
|
+
name?: string;
|
|
62
|
+
/** The value of the attribute. If `value` is not empty, `group_values` must be empty. */
|
|
63
|
+
value?: string;
|
|
64
|
+
}
|
|
65
|
+
interface DestinationStatus {
|
|
66
|
+
/** List of country codes (ISO 3166-1 alpha-2) where the offer is approved. */
|
|
67
|
+
approvedCountries?: string[];
|
|
68
|
+
/** List of country codes (ISO 3166-1 alpha-2) where the offer is disapproved. */
|
|
69
|
+
disapprovedCountries?: string[];
|
|
70
|
+
/** List of country codes (ISO 3166-1 alpha-2) where the offer is pending approval. */
|
|
71
|
+
pendingCountries?: string[];
|
|
72
|
+
/** The name of the reporting context. */
|
|
73
|
+
reportingContext?: string;
|
|
74
|
+
}
|
|
75
|
+
interface Empty {}
|
|
76
|
+
interface FreeShippingThreshold {
|
|
77
|
+
/** 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. */
|
|
78
|
+
country?: string;
|
|
79
|
+
/** The minimum product price for the shipping cost to become free. Represented as a number. */
|
|
80
|
+
priceThreshold?: Price;
|
|
81
|
+
}
|
|
82
|
+
interface Interval {
|
|
83
|
+
/** Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. */
|
|
84
|
+
endTime?: string;
|
|
85
|
+
/** Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. */
|
|
86
|
+
startTime?: string;
|
|
87
|
+
}
|
|
88
|
+
interface ItemLevelIssue {
|
|
89
|
+
/** List of country codes (ISO 3166-1 alpha-2) where issue applies to the offer. */
|
|
90
|
+
applicableCountries?: string[];
|
|
91
|
+
/** The attribute's name, if the issue is caused by a single attribute. */
|
|
92
|
+
attribute?: string;
|
|
93
|
+
/** The error code of the issue. */
|
|
94
|
+
code?: string;
|
|
95
|
+
/** A short issue description in English. */
|
|
96
|
+
description?: string;
|
|
97
|
+
/** A detailed issue description in English. */
|
|
98
|
+
detail?: string;
|
|
99
|
+
/** The URL of a web page to help with resolving this issue. */
|
|
100
|
+
documentation?: string;
|
|
101
|
+
/** The reporting context the issue applies to. */
|
|
102
|
+
reportingContext?: string;
|
|
103
|
+
/** Whether the issue can be resolved by the business. */
|
|
104
|
+
resolution?: string;
|
|
105
|
+
/** How this issue affects serving of the offer. */
|
|
106
|
+
severity?: string;
|
|
107
|
+
}
|
|
108
|
+
interface ListProductsResponse {
|
|
109
|
+
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
110
|
+
nextPageToken?: string;
|
|
111
|
+
/** The processed products from the specified account. These are your processed products after applying rules and supplemental data sources. */
|
|
112
|
+
products?: Product[];
|
|
113
|
+
}
|
|
114
|
+
interface LoyaltyPoints {
|
|
115
|
+
/** Name of loyalty points program. It is recommended to limit the name to 12 full-width characters or 24 Roman characters. */
|
|
116
|
+
name?: string;
|
|
117
|
+
/** The retailer's loyalty points in absolute value. */
|
|
118
|
+
pointsValue?: string;
|
|
119
|
+
/** The ratio of a point when converted to currency. Google assumes currency based on Merchant Center settings. If ratio is left out, it defaults to 1.0. */
|
|
120
|
+
ratio?: number;
|
|
121
|
+
}
|
|
122
|
+
interface LoyaltyProgram {
|
|
123
|
+
/** The cashback that can be used for future purchases. */
|
|
124
|
+
cashbackForFutureUse?: Price;
|
|
125
|
+
/** The amount of loyalty points earned on a purchase. */
|
|
126
|
+
loyaltyPoints?: string;
|
|
127
|
+
/** 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. */
|
|
128
|
+
memberPriceEffectiveDate?: Interval;
|
|
129
|
+
/** The price for members of the given tier, that is, the instant discount price. Must be smaller or equal to the regular price. */
|
|
130
|
+
price?: Price;
|
|
131
|
+
/** The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a business entity and a loyalty program entity. The label must be provided so that the system can associate the assets below (for example, price and points) with a business. The corresponding program must be linked to the Merchant Center account. */
|
|
132
|
+
programLabel?: string;
|
|
133
|
+
/** The label of the shipping benefit. If the field has value, this offer has loyalty shipping benefit. If the field value isn't provided, the item is not eligible for loyalty shipping for the given loyalty tier. */
|
|
134
|
+
shippingLabel?: string;
|
|
135
|
+
/** The label of the tier within the loyalty program. Must match one of the labels within the program. */
|
|
136
|
+
tierLabel?: string;
|
|
137
|
+
}
|
|
138
|
+
interface Price {
|
|
139
|
+
/** The price represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 USD = 1000000 micros). */
|
|
140
|
+
amountMicros?: string;
|
|
141
|
+
/** The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). */
|
|
142
|
+
currencyCode?: string;
|
|
143
|
+
}
|
|
144
|
+
interface Product {
|
|
145
|
+
/** Output only. The automated discounts information for the product. */
|
|
146
|
+
automatedDiscounts?: AutomatedDiscounts;
|
|
147
|
+
/** Output only. The two-letter [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the product. */
|
|
148
|
+
contentLanguage?: string;
|
|
149
|
+
/** Output only. A list of custom (merchant-provided) attributes. It can also be used to submit any attribute of the data 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. */
|
|
150
|
+
customAttributes?: CustomAttribute[];
|
|
151
|
+
/** Output only. The primary data source of the product. */
|
|
152
|
+
dataSource?: string;
|
|
153
|
+
/** Output only. The feed label lets you categorize and identify your products. The maximum allowed characters is 20 and the supported characters are`A-Z`, `0-9`, hyphen and underscore. The feed label must not include any spaces. For more information, see [Using feed labels](//support.google.com/merchants/answer/14994087) */
|
|
154
|
+
feedLabel?: string;
|
|
155
|
+
/** Output only. Determines whether the product is **only** targeting local destinations and whether the product name should be distinguished with a `local~` prefix. For example, `accounts/123/products/local~en~US~sku123`. */
|
|
156
|
+
legacyLocal?: boolean;
|
|
157
|
+
/** The name of the product. Format: `accounts/{account}/products/{product}` where the last section `product` consists of: `content_language~feed_label~offer_id` example for product name is `accounts/123/products/en~US~sku123`. A legacy local product name would be `accounts/123/products/local~en~US~sku123`. Note: For calls to the v1beta version, the `product` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`. */
|
|
158
|
+
name?: string;
|
|
159
|
+
/** Output only. Your unique identifier for the product. This is the same for the product input and processed product. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. See the [product data specification](https://support.google.com/merchants/answer/188494#id) for details. */
|
|
160
|
+
offerId?: string;
|
|
161
|
+
/** Output only. A list of strongly-typed product attributes. */
|
|
162
|
+
productAttributes?: ProductAttributes;
|
|
163
|
+
/** Output only. The status of a product, data validation issues, that is, information about a product computed asynchronously. */
|
|
164
|
+
productStatus?: ProductStatus;
|
|
165
|
+
/** Output only. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time. If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current `version_number`. Only supported for insertions into primary data sources. If the operation is prevented, the aborted exception will be thrown. */
|
|
166
|
+
versionNumber?: string;
|
|
167
|
+
}
|
|
168
|
+
interface ProductAttributes {
|
|
169
|
+
/** Additional URLs of images of the item. */
|
|
170
|
+
additionalImageLinks?: string[];
|
|
171
|
+
/** Used to group items in an arbitrary way. Only for CPA%, discouraged otherwise. For more information, see [Display ads attribute](https://support.google.com/merchants/answer/6069387). */
|
|
172
|
+
adsGrouping?: string;
|
|
173
|
+
/** Similar to ads_grouping, but only works on CPC. */
|
|
174
|
+
adsLabels?: string[];
|
|
175
|
+
/** Allows advertisers to override the item URL when the product is shown within the context of Product ads. */
|
|
176
|
+
adsRedirect?: string;
|
|
177
|
+
/** Set to true if the item is targeted towards adults. */
|
|
178
|
+
adult?: boolean;
|
|
179
|
+
/** Target [age group](https://support.google.com/merchants/answer/6324463) of the item. */
|
|
180
|
+
ageGroup?: string;
|
|
181
|
+
/** A safeguard in the [automated discounts] (https://support.google.com/merchants/answer/10295759) and "Dynamic Promotions" (https://support.google.com/merchants/answer/13949249) projects, ensuring that discounts on business offers do not fall below this value, thereby preserving the offer's value and profitability. */
|
|
182
|
+
autoPricingMinPrice?: Price;
|
|
183
|
+
/** [Availability](https://support.google.com/merchants/answer/6324448) status of the item. */
|
|
184
|
+
availability?: string;
|
|
185
|
+
/** The day a pre-ordered product becomes available for delivery, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. */
|
|
186
|
+
availabilityDate?: string;
|
|
187
|
+
/** [Brand](https://support.google.com/merchants/answer/6324351) of the item. For example, "Google". */
|
|
188
|
+
brand?: string;
|
|
189
|
+
/** URL for the canonical version of your item's landing page. */
|
|
190
|
+
canonicalLink?: string;
|
|
191
|
+
/** Product Certifications, for example for energy efficiency labeling of products recorded in the [EU EPREL](https://eprel.ec.europa.eu/screen/home) database. See the [Help Center](https://support.google.com/merchants/answer/13528839) article for more information. */
|
|
192
|
+
certifications?: ProductCertification[];
|
|
193
|
+
/** Extra fields to export to the Cloud Retail program. */
|
|
194
|
+
cloudExportAdditionalProperties?: CloudExportAdditionalProperties[];
|
|
195
|
+
/** [Color](https://support.google.com/merchants/answer/6324487) of the item. For example, "red". */
|
|
196
|
+
color?: string;
|
|
197
|
+
/** [Condition](https://support.google.com/merchants/answer/6324469) or state of the item. */
|
|
198
|
+
condition?: string;
|
|
199
|
+
/** Cost of goods sold. Used for gross profit reporting. */
|
|
200
|
+
costOfGoodsSold?: Price;
|
|
201
|
+
/** [Custom label 0](https://support.google.com/merchants/answer/6324473) for custom grouping of items in a Shopping campaign. */
|
|
202
|
+
customLabel0?: string;
|
|
203
|
+
/** [Custom label 1](https://support.google.com/merchants/answer/6324473) for custom grouping of items in a Shopping campaign. */
|
|
204
|
+
customLabel1?: string;
|
|
205
|
+
/** [Custom label 2](https://support.google.com/merchants/answer/6324473) for custom grouping of items in a Shopping campaign. */
|
|
206
|
+
customLabel2?: string;
|
|
207
|
+
/** [Custom label 3](https://support.google.com/merchants/answer/6324473) for custom grouping of items in a Shopping campaign. */
|
|
208
|
+
customLabel3?: string;
|
|
209
|
+
/** [Custom label 4](https://support.google.com/merchants/answer/6324473) for custom grouping of items in a Shopping campaign. */
|
|
210
|
+
customLabel4?: string;
|
|
211
|
+
/** Description of the item. */
|
|
212
|
+
description?: string;
|
|
213
|
+
/** 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. */
|
|
214
|
+
disclosureDate?: string;
|
|
215
|
+
/** An identifier for an item for dynamic remarketing campaigns. */
|
|
216
|
+
displayAdsId?: string;
|
|
217
|
+
/** URL directly to your item's landing page for dynamic remarketing campaigns. */
|
|
218
|
+
displayAdsLink?: string;
|
|
219
|
+
/** Advertiser-specified recommendations. For more information, see [Display ads attribute specification](https://support.google.com/merchants/answer/6069387). */
|
|
220
|
+
displayAdsSimilarIds?: string[];
|
|
221
|
+
/** Title of an item for dynamic remarketing campaigns. */
|
|
222
|
+
displayAdsTitle?: string;
|
|
223
|
+
/** Offer margin for dynamic remarketing campaigns. For more information, see [Display ads attribute](https://support.google.com/merchants/answer/6069387). */
|
|
224
|
+
displayAdsValue?: number;
|
|
225
|
+
/** The [energy efficiency class](https://support.google.com/merchants/answer/7562785) as defined in EU directive 2010/30/EU. */
|
|
226
|
+
energyEfficiencyClass?: string;
|
|
227
|
+
/** The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center). For more information, see [Excluded destination](https://support.google.com/merchants/answer/6324486). Note: We recommend setting destinations on datasources level for most use cases. Use this field within products to only setup exceptions. */
|
|
228
|
+
excludedDestinations?: string[];
|
|
229
|
+
/** Date on which the item should expire, as specified upon insertion, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. The actual expiration date is exposed in `productstatuses` as [googleExpirationDate](https://support.google.com/merchants/answer/6324499) and might be earlier if `expirationDate` is too far in the future. */
|
|
230
|
+
expirationDate?: string;
|
|
231
|
+
/** Required for multi-seller accounts. Use this attribute if you're a marketplace uploading products for various sellers to your multi-seller account. */
|
|
232
|
+
externalSellerId?: string;
|
|
233
|
+
/** Conditions to be met for a product to have free shipping. */
|
|
234
|
+
freeShippingThreshold?: FreeShippingThreshold[];
|
|
235
|
+
/** Target [gender](https://support.google.com/merchants/answer/6324479) of the item. */
|
|
236
|
+
gender?: string;
|
|
237
|
+
/** 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. */
|
|
238
|
+
googleProductCategory?: string;
|
|
239
|
+
/** Global Trade Item Numbers ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the item. You can provide up to 10 GTINs. */
|
|
240
|
+
gtins?: string[];
|
|
241
|
+
/** Set this value to false when the item does not have unique product identifiers appropriate to its category, such as GTIN, MPN, and brand. Defaults to true, if not provided. */
|
|
242
|
+
identifierExists?: boolean;
|
|
243
|
+
/** URL of an image of the item. */
|
|
244
|
+
imageLink?: string;
|
|
245
|
+
/** The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in `excludedDestinations`. For more information, see [Included destination](https://support.google.com/merchants/answer/7501026). Note: We recommend setting destinations on datasources level for most use cases. Use this field within products to only setup exceptions. */
|
|
246
|
+
includedDestinations?: string[];
|
|
247
|
+
/** Number and amount of installments to pay for an item. */
|
|
248
|
+
installment?: ProductInstallment;
|
|
249
|
+
/** Whether the item is a business-defined sub-API. A [sub-API] (https://support.google.com/merchants/answer/6324449) is a custom grouping of different products sold by a business for a single price. */
|
|
250
|
+
isBundle?: boolean;
|
|
251
|
+
/** Shared identifier for all variants of the same product. */
|
|
252
|
+
itemGroupId?: string;
|
|
253
|
+
/** 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](https://support.google.com/merchants/answer/9103186) for more information. */
|
|
254
|
+
lifestyleImageLinks?: string[];
|
|
255
|
+
/** URL directly linking to your item's page on your online store. */
|
|
256
|
+
link?: string;
|
|
257
|
+
/** [Link template](https://support.google.com/merchants/answer/13871172) for business hosted local storefront. */
|
|
258
|
+
linkTemplate?: string;
|
|
259
|
+
/** Loyalty points that users receive after purchasing the item. Japan only. */
|
|
260
|
+
loyaltyPoints?: LoyaltyPoints;
|
|
261
|
+
/** 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. */
|
|
262
|
+
loyaltyPrograms?: LoyaltyProgram[];
|
|
263
|
+
/** The [material](https://support.google.com/merchants/answer/6324410) of which the item is made. For example, "Leather" or "Cotton". */
|
|
264
|
+
material?: string;
|
|
265
|
+
/** The [energy efficiency class](https://support.google.com/merchants/answer/7562785) as defined in EU directive 2010/30/EU. */
|
|
266
|
+
maxEnergyEfficiencyClass?: string;
|
|
267
|
+
/** Maximal product handling time (in business days). */
|
|
268
|
+
maxHandlingTime?: string;
|
|
269
|
+
/** Maximum retail price (MRP) of the item. Applicable to India only. */
|
|
270
|
+
maximumRetailPrice?: Price;
|
|
271
|
+
/** The [energy efficiency class](https://support.google.com/merchants/answer/7562785) as defined in EU directive 2010/30/EU. */
|
|
272
|
+
minEnergyEfficiencyClass?: string;
|
|
273
|
+
/** Minimal product handling time (in business days). */
|
|
274
|
+
minHandlingTime?: string;
|
|
275
|
+
/** URL for the mobile-optimized version of your item's landing page. */
|
|
276
|
+
mobileLink?: string;
|
|
277
|
+
/** [Link template](https://support.google.com/merchants/answer/13870216) for business hosted local storefront optimized for mobile devices. */
|
|
278
|
+
mobileLinkTemplate?: string;
|
|
279
|
+
/** Manufacturer Part Number ([MPN](https://support.google.com/merchants/answer/188494#mpn)) of the item. */
|
|
280
|
+
mpn?: string;
|
|
281
|
+
/** The number of identical products in a business-defined multipack. */
|
|
282
|
+
multipack?: string;
|
|
283
|
+
/** The item's [pattern](https://support.google.com/merchants/answer/6324483). For example, polka dots. */
|
|
284
|
+
pattern?: string;
|
|
285
|
+
/** Publication of this item will be temporarily [paused](https://support.google.com/merchants/answer/11909930). */
|
|
286
|
+
pause?: string;
|
|
287
|
+
/** The [pickup](https://support.google.com/merchants/answer/14634021) option for the item. */
|
|
288
|
+
pickupMethod?: string;
|
|
289
|
+
/** Item store pickup timeline. For more information, see [Pickup SLA](https://support.google.com/merchants/answer/14635400). */
|
|
290
|
+
pickupSla?: string;
|
|
291
|
+
/** Price of the item. */
|
|
292
|
+
price?: Price;
|
|
293
|
+
/** Technical specification or additional product details. */
|
|
294
|
+
productDetails?: ProductDetail[];
|
|
295
|
+
/** The height of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive). */
|
|
296
|
+
productHeight?: ProductDimension;
|
|
297
|
+
/** Bullet points describing the most relevant [product highlights](https://support.google.com/merchants/answer/9216100). */
|
|
298
|
+
productHighlights?: string[];
|
|
299
|
+
/** The length of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive). */
|
|
300
|
+
productLength?: ProductDimension;
|
|
301
|
+
/** Categories of the item (formatted as in [product data specification](https://support.google.com/merchants/answer/7052112#product_category)). */
|
|
302
|
+
productTypes?: string[];
|
|
303
|
+
/** The weight of the product in the units provided. The value must be between 0 (exclusive) and 2000 (inclusive). */
|
|
304
|
+
productWeight?: ProductWeight;
|
|
305
|
+
/** The width of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive). */
|
|
306
|
+
productWidth?: ProductDimension;
|
|
307
|
+
/** The unique ID of a promotion. */
|
|
308
|
+
promotionIds?: string[];
|
|
309
|
+
/** Advertised sale price of the item. */
|
|
310
|
+
salePrice?: Price;
|
|
311
|
+
/** Date range during which the item is on sale, see [product data specification](https://support.google.com/merchants/answer/7052112#price_and_availability). */
|
|
312
|
+
salePriceEffectiveDate?: Interval;
|
|
313
|
+
/** The quantity of the product that is available for selling on Google. Supported only for online products. */
|
|
314
|
+
sellOnGoogleQuantity?: string;
|
|
315
|
+
/** Shipping rules. */
|
|
316
|
+
shipping?: Shipping[];
|
|
317
|
+
/** Height of the item for shipping. */
|
|
318
|
+
shippingHeight?: ShippingDimension;
|
|
319
|
+
/** The shipping label of the product, used to group product in account-level shipping rules. */
|
|
320
|
+
shippingLabel?: string;
|
|
321
|
+
/** Length of the item for shipping. */
|
|
322
|
+
shippingLength?: ShippingDimension;
|
|
323
|
+
/** Weight of the item for shipping. */
|
|
324
|
+
shippingWeight?: ShippingWeight;
|
|
325
|
+
/** Width of the item for shipping. */
|
|
326
|
+
shippingWidth?: ShippingDimension;
|
|
327
|
+
/** List of country codes [(ISO 3166-1 alpha-2)](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to exclude the offer from Shopping Ads destination. Countries from this list are removed from countries configured in data source settings. */
|
|
328
|
+
shoppingAdsExcludedCountries?: string[];
|
|
329
|
+
/** 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](https://support.google.com/merchants/answer/6324492). */
|
|
330
|
+
size?: string;
|
|
331
|
+
/** System in which the size is specified. Recommended for apparel items. For more information, see [Size system](https://support.google.com/merchants/answer/6324502). */
|
|
332
|
+
sizeSystem?: string;
|
|
333
|
+
/** The cut of the item. It can be used to represent combined size types for apparel items. Maximum two of size types can be provided, see [Size type](https://support.google.com/merchants/answer/6324497). */
|
|
334
|
+
sizeTypes?: string[];
|
|
335
|
+
/** Structured description, for algorithmically (AI)-generated descriptions. */
|
|
336
|
+
structuredDescription?: StructuredDescription;
|
|
337
|
+
/** Structured title, for algorithmically (AI)-generated titles. */
|
|
338
|
+
structuredTitle?: StructuredTitle;
|
|
339
|
+
/** Number of periods (months or years) and amount of payment per period for an item with an associated subscription contract. */
|
|
340
|
+
subscriptionCost?: SubscriptionCost;
|
|
341
|
+
/** The list of sustainability incentive programs. */
|
|
342
|
+
sustainabilityIncentives?: ProductSustainabilityIncentive[];
|
|
343
|
+
/** Title of the item. */
|
|
344
|
+
title?: string;
|
|
345
|
+
/** The transit time label of the product, used to group product in account-level transit time tables. */
|
|
346
|
+
transitTimeLabel?: string;
|
|
347
|
+
/** The preference of the denominator of the unit price. */
|
|
348
|
+
unitPricingBaseMeasure?: UnitPricingBaseMeasure;
|
|
349
|
+
/** The measure and dimension of an item. */
|
|
350
|
+
unitPricingMeasure?: UnitPricingMeasure;
|
|
351
|
+
/** URL of the 3D image of the item. See the [Help Center article](https://support.google.com/merchants/answer/13674896) for more information. */
|
|
352
|
+
virtualModelLink?: string;
|
|
353
|
+
}
|
|
354
|
+
interface ProductCertification {
|
|
355
|
+
/** The certification authority. */
|
|
356
|
+
certificationAuthority?: string;
|
|
357
|
+
/** The certification code. Maximum length is 2000 characters. */
|
|
358
|
+
certificationCode?: string;
|
|
359
|
+
/** The name of the certification. */
|
|
360
|
+
certificationName?: string;
|
|
361
|
+
/** The certification value (also known as class, level or grade), for example "A+", "C", "gold". Maximum length is 2000 characters. */
|
|
362
|
+
certificationValue?: string;
|
|
363
|
+
}
|
|
364
|
+
interface ProductChange {
|
|
365
|
+
/** The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``) */
|
|
366
|
+
newValue?: string;
|
|
367
|
+
/** The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``) */
|
|
368
|
+
oldValue?: string;
|
|
369
|
+
/** Countries that have the change (if applicable). Represented in the ISO 3166 format. */
|
|
370
|
+
regionCode?: string;
|
|
371
|
+
/** Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum) */
|
|
372
|
+
reportingContext?: string;
|
|
373
|
+
}
|
|
374
|
+
interface ProductDetail {
|
|
375
|
+
/** The name of the product detail. */
|
|
376
|
+
attributeName?: string;
|
|
377
|
+
/** The value of the product detail. */
|
|
378
|
+
attributeValue?: string;
|
|
379
|
+
/** The section header used to group a set of product details. */
|
|
380
|
+
sectionName?: string;
|
|
381
|
+
}
|
|
382
|
+
interface ProductDimension {
|
|
383
|
+
/** Required. The dimension units. Acceptable values are: * "`in`" * "`cm`" */
|
|
384
|
+
unit?: string;
|
|
385
|
+
/** Required. The dimension value represented as a number. The value can have a maximum precision of four decimal places. */
|
|
386
|
+
value?: number;
|
|
387
|
+
}
|
|
388
|
+
interface ProductInput {
|
|
389
|
+
/** Required. Immutable. The two-letter [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the product. */
|
|
390
|
+
contentLanguage?: string;
|
|
391
|
+
/** Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, `{ "name": "size type", "value": "regular" }`). This is useful for submitting attributes not explicitly exposed by the API. 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 product, with total size of 102.4kB. Underscores in custom attribute names are replaced by spaces upon insertion. */
|
|
392
|
+
customAttributes?: CustomAttribute[];
|
|
393
|
+
/** Required. Immutable. The feed label that lets you categorize and identify your products. The maximum allowed characters are 20, and the supported characters are `A-Z`, `0-9`, hyphen, and underscore. The feed label must not include any spaces. For more information, see [Using feed labels](//support.google.com/merchants/answer/14994087). */
|
|
394
|
+
feedLabel?: string;
|
|
395
|
+
/** Immutable. Determines whether the product is **only** targeting local destinations and whether the product name should be distinguished with a `local~` prefix. For example, `accounts/123/productInputs/local~en~US~sku123`. If a product that is not `legacy_local` is already targeting local destinations, creating a `legacy_local` product with an otherwise matching name will fail. */
|
|
396
|
+
legacyLocal?: boolean;
|
|
397
|
+
/** Identifier. The name of the product input. Format: `accounts/{account}/productInputs/{productinput}` where the last section `productinput` consists of: `content_language~feed_label~offer_id` example for product input name is `accounts/123/productInputs/en~US~sku123`. A legacy local product input name would be `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the v1beta version, the `productInput` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productInputs/online~en~US~sku123`. */
|
|
398
|
+
name?: string;
|
|
399
|
+
/** Required. Immutable. Your unique identifier for the product. This is the same for the product input and processed product. Leading and trailing whitespaces are stripped and multiple whitespaces are replaced by a single whitespace upon submission. See the [products data specification](https://support.google.com/merchants/answer/188494#id) for details. */
|
|
400
|
+
offerId?: string;
|
|
401
|
+
/** Output only. The name of the processed product. Format: `accounts/{account}/products/{product}` */
|
|
402
|
+
product?: string;
|
|
403
|
+
/** Optional. A list of strongly-typed product attributes. */
|
|
404
|
+
productAttributes?: ProductAttributes;
|
|
405
|
+
/** Optional. Immutable. Represents the existing version (freshness) of the product, which can be used to preserve the right order when multiple updates are done at the same time. If set, the insertion is prevented when version number is lower than the current version number of the existing product. Re-insertion (for example, product refresh after 30 days) can be performed with the current `version_number`. Only supported for insertions into primary data sources. Do not set this field for updates. Do not set this field for insertions into supplemental data sources. If the operation is prevented, the aborted exception will be thrown. */
|
|
406
|
+
versionNumber?: string;
|
|
407
|
+
}
|
|
408
|
+
interface ProductInstallment {
|
|
409
|
+
/** The amount the buyer has to pay per month. */
|
|
410
|
+
amount?: Price;
|
|
411
|
+
/** Type of installment payments. */
|
|
412
|
+
creditType?: string;
|
|
413
|
+
/** The up-front down payment amount the buyer has to pay. */
|
|
414
|
+
downpayment?: Price;
|
|
415
|
+
/** The number of installments the buyer has to pay. */
|
|
416
|
+
months?: string;
|
|
417
|
+
}
|
|
418
|
+
interface ProductStatus {
|
|
419
|
+
/** Date on which the item has been created, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. */
|
|
420
|
+
creationDate?: string;
|
|
421
|
+
/** The intended destinations for the product. */
|
|
422
|
+
destinationStatuses?: DestinationStatus[];
|
|
423
|
+
/** Date on which the item expires, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. */
|
|
424
|
+
googleExpirationDate?: string;
|
|
425
|
+
/** A list of all issues associated with the product. */
|
|
426
|
+
itemLevelIssues?: ItemLevelIssue[];
|
|
427
|
+
/** Date on which the item has been last updated, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. */
|
|
428
|
+
lastUpdateDate?: string;
|
|
429
|
+
}
|
|
430
|
+
interface ProductStatusChangeMessage {
|
|
431
|
+
/** The target account that owns the entity that changed. Format : `accounts/{merchant_id}` */
|
|
432
|
+
account?: string;
|
|
433
|
+
/** The attribute in the resource that changed, in this case it will be always `Status`. */
|
|
434
|
+
attribute?: string;
|
|
435
|
+
/** A message to describe the change that happened to the product */
|
|
436
|
+
changes?: ProductChange[];
|
|
437
|
+
/** The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications. */
|
|
438
|
+
eventTime?: string;
|
|
439
|
+
/** Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event. */
|
|
440
|
+
expirationTime?: string;
|
|
441
|
+
/** The account that manages the merchant's account. can be the same as merchant id if it is standalone account. Format : `accounts/{service_provider_id}` */
|
|
442
|
+
managingAccount?: string;
|
|
443
|
+
/** The product name. Format: `accounts/{account}/products/{product}` */
|
|
444
|
+
resource?: string;
|
|
445
|
+
/** The product id. */
|
|
446
|
+
resourceId?: string;
|
|
447
|
+
/** The resource that changed, in this case it will always be `Product`. */
|
|
448
|
+
resourceType?: string;
|
|
449
|
+
}
|
|
450
|
+
interface ProductSustainabilityIncentive {
|
|
451
|
+
/** The fixed amount of the incentive. */
|
|
452
|
+
amount?: Price;
|
|
453
|
+
/** The percentage of the sale price that the incentive is applied to. */
|
|
454
|
+
percentage?: number;
|
|
455
|
+
/** Sustainability incentive program. */
|
|
456
|
+
type?: string;
|
|
457
|
+
}
|
|
458
|
+
interface ProductWeight {
|
|
459
|
+
/** Required. The weight unit. Acceptable values are: * "`g`" * "`kg`" * "`oz`" * "`lb`" */
|
|
460
|
+
unit?: string;
|
|
461
|
+
/** Required. The weight represented as a number. The weight can have a maximum precision of four decimal places. */
|
|
462
|
+
value?: number;
|
|
463
|
+
}
|
|
464
|
+
interface Shipping {
|
|
465
|
+
/** 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. */
|
|
466
|
+
country?: string;
|
|
467
|
+
/** The location where the shipping is applicable, represented by a location group name. */
|
|
468
|
+
locationGroupName?: string;
|
|
469
|
+
/** The numeric ID of a location that the shipping rate applies to as defined in the [AdWords API](https://developers.google.com/adwords/api/docs/appendix/geotargeting). */
|
|
470
|
+
locationId?: string;
|
|
471
|
+
/** 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 is received if it happens before the cut-off time. Both maxHandlingTime and maxTransitTime are required if providing shipping speeds. minHandlingTime is optional if maxHandlingTime is present. */
|
|
472
|
+
maxHandlingTime?: string;
|
|
473
|
+
/** Maximum transit time (inclusive) between when the order has shipped and when it is 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. minTransitTime is optional if maxTransitTime is present. */
|
|
474
|
+
maxTransitTime?: string;
|
|
475
|
+
/** 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 is received if it happens before the cut-off time. minHandlingTime can only be present together with maxHandlingTime; but it is not required if maxHandlingTime is present. */
|
|
476
|
+
minHandlingTime?: string;
|
|
477
|
+
/** Minimum transit time (inclusive) between when the order has shipped and when it is 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 is not required if maxTransitTime is present. */
|
|
478
|
+
minTransitTime?: string;
|
|
479
|
+
/** 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. */
|
|
480
|
+
postalCode?: string;
|
|
481
|
+
/** Fixed shipping price, represented as a number. */
|
|
482
|
+
price?: Price;
|
|
483
|
+
/** The geographic region to which a shipping rate applies. See [region](https://support.google.com/merchants/answer/6324484) for more information. */
|
|
484
|
+
region?: string;
|
|
485
|
+
/** A free-form description of the service class or delivery speed. */
|
|
486
|
+
service?: string;
|
|
487
|
+
}
|
|
488
|
+
interface ShippingDimension {
|
|
489
|
+
/** The unit of value. */
|
|
490
|
+
unit?: string;
|
|
491
|
+
/** The dimension of the product used to calculate the shipping cost of the item. */
|
|
492
|
+
value?: number;
|
|
493
|
+
}
|
|
494
|
+
interface ShippingWeight {
|
|
495
|
+
/** The unit of value. */
|
|
496
|
+
unit?: string;
|
|
497
|
+
/** The weight of the product used to calculate the shipping cost of the item. */
|
|
498
|
+
value?: number;
|
|
499
|
+
}
|
|
500
|
+
interface StructuredDescription {
|
|
501
|
+
/** The description text Maximum length is 5000 characters */
|
|
502
|
+
content?: string;
|
|
503
|
+
/** The digital source type. Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). */
|
|
504
|
+
digitalSourceType?: string;
|
|
505
|
+
}
|
|
506
|
+
interface StructuredTitle {
|
|
507
|
+
/** The title text Maximum length is 150 characters */
|
|
508
|
+
content?: string;
|
|
509
|
+
/** The digital source type. Following [IPTC](https://cv.iptc.org/newscodes/digitalsourcetype). */
|
|
510
|
+
digitalSourceType?: string;
|
|
511
|
+
}
|
|
512
|
+
interface SubscriptionCost {
|
|
513
|
+
/** The amount the buyer has to pay per subscription period. */
|
|
514
|
+
amount?: Price;
|
|
515
|
+
/** The type of subscription period. Supported values are: * "`month`" * "`year`" */
|
|
516
|
+
period?: string;
|
|
517
|
+
/** The number of subscription periods the buyer has to pay. */
|
|
518
|
+
periodLength?: string;
|
|
519
|
+
}
|
|
520
|
+
interface UnitPricingBaseMeasure {
|
|
521
|
+
/** The unit of the denominator. */
|
|
522
|
+
unit?: string;
|
|
523
|
+
/** The denominator of the unit price. */
|
|
524
|
+
value?: string;
|
|
525
|
+
}
|
|
526
|
+
interface UnitPricingMeasure {
|
|
527
|
+
/** The unit of the measure. */
|
|
528
|
+
unit?: string;
|
|
529
|
+
/** The measure of an item. */
|
|
530
|
+
value?: number;
|
|
531
|
+
}
|
|
532
|
+
interface ProductInputsResource {
|
|
533
|
+
/** Deletes a product input from your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. */
|
|
534
|
+
delete(request?: {
|
|
535
|
+
/** V1 error format. */
|
|
536
|
+
'$.xgafv'?: string;
|
|
537
|
+
/** OAuth access token. */
|
|
538
|
+
access_token?: string;
|
|
539
|
+
/** Data format for response. */
|
|
540
|
+
alt?: string;
|
|
541
|
+
/** JSONP */
|
|
542
|
+
callback?: string;
|
|
543
|
+
/** Required. The primary or supplemental data source from which the product input should be deleted. Format: `accounts/{account}/dataSources/{datasource}`. For example, `accounts/123456/dataSources/104628`. */
|
|
544
|
+
dataSource?: string;
|
|
545
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
546
|
+
fields?: string;
|
|
547
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
548
|
+
key?: string;
|
|
549
|
+
/** Required. The name of the product input resource to delete. Format: `accounts/{account}/productInputs/{product}` where the last section `product` consists of: `content_language~feed_label~offer_id` example for product name is `accounts/123/productInputs/en~US~sku123`. */
|
|
550
|
+
name: string;
|
|
551
|
+
/** OAuth 2.0 token for the current user. */
|
|
552
|
+
oauth_token?: string;
|
|
553
|
+
/** Returns response with indentations and line breaks. */
|
|
554
|
+
prettyPrint?: boolean;
|
|
555
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
556
|
+
quotaUser?: string;
|
|
557
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
558
|
+
upload_protocol?: string;
|
|
559
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
560
|
+
uploadType?: string;
|
|
561
|
+
}): Request<{}>;
|
|
562
|
+
/** [Uploads a product input to your Merchant Center account](/merchant/api/guides/products/overview#upload-product-input). You must have a products [data source](/merchant/api/guides/data-sources/overview) to be able to insert a product. The unique identifier of the data source is passed as a query parameter in the request URL. If a product input with the same contentLanguage, offerId, and dataSource already exists, then the product input inserted by this method replaces that entry. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. */
|
|
563
|
+
insert(request: {
|
|
564
|
+
/** V1 error format. */
|
|
565
|
+
'$.xgafv'?: string;
|
|
566
|
+
/** OAuth access token. */
|
|
567
|
+
access_token?: string;
|
|
568
|
+
/** Data format for response. */
|
|
569
|
+
alt?: string;
|
|
570
|
+
/** JSONP */
|
|
571
|
+
callback?: string;
|
|
572
|
+
/** Required. The primary or supplemental product data source name. If the product already exists and data source provided is different, then the product will be moved to a new data source. For more information, see [Overview of Data sources sub-API](/merchant/api/guides/data-sources/overview). Only API data sources are supported. Format: `accounts/{account}/dataSources/{datasource}`. For example, `accounts/123456/dataSources/104628`. */
|
|
573
|
+
dataSource?: string;
|
|
574
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
575
|
+
fields?: string;
|
|
576
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
577
|
+
key?: string;
|
|
578
|
+
/** OAuth 2.0 token for the current user. */
|
|
579
|
+
oauth_token?: string;
|
|
580
|
+
/** Required. The account where this product will be inserted. Format: `accounts/{account}` */
|
|
581
|
+
parent: string;
|
|
582
|
+
/** Returns response with indentations and line breaks. */
|
|
583
|
+
prettyPrint?: boolean;
|
|
584
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
585
|
+
quotaUser?: string;
|
|
586
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
587
|
+
upload_protocol?: string;
|
|
588
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
589
|
+
uploadType?: string;
|
|
590
|
+
/** Request body */
|
|
591
|
+
resource: ProductInput;
|
|
592
|
+
}): Request<ProductInput>;
|
|
593
|
+
insert(
|
|
594
|
+
request: {
|
|
595
|
+
/** V1 error format. */
|
|
596
|
+
'$.xgafv'?: string;
|
|
597
|
+
/** OAuth access token. */
|
|
598
|
+
access_token?: string;
|
|
599
|
+
/** Data format for response. */
|
|
600
|
+
alt?: string;
|
|
601
|
+
/** JSONP */
|
|
602
|
+
callback?: string;
|
|
603
|
+
/** Required. The primary or supplemental product data source name. If the product already exists and data source provided is different, then the product will be moved to a new data source. For more information, see [Overview of Data sources sub-API](/merchant/api/guides/data-sources/overview). Only API data sources are supported. Format: `accounts/{account}/dataSources/{datasource}`. For example, `accounts/123456/dataSources/104628`. */
|
|
604
|
+
dataSource?: string;
|
|
605
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
606
|
+
fields?: string;
|
|
607
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
608
|
+
key?: string;
|
|
609
|
+
/** OAuth 2.0 token for the current user. */
|
|
610
|
+
oauth_token?: string;
|
|
611
|
+
/** Required. The account where this product will be inserted. Format: `accounts/{account}` */
|
|
612
|
+
parent: string;
|
|
613
|
+
/** Returns response with indentations and line breaks. */
|
|
614
|
+
prettyPrint?: boolean;
|
|
615
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
616
|
+
quotaUser?: string;
|
|
617
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
618
|
+
upload_protocol?: string;
|
|
619
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
620
|
+
uploadType?: string;
|
|
621
|
+
},
|
|
622
|
+
body: ProductInput,
|
|
623
|
+
): Request<ProductInput>;
|
|
624
|
+
/** Updates the existing product input in your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. */
|
|
625
|
+
patch(request: {
|
|
626
|
+
/** V1 error format. */
|
|
627
|
+
'$.xgafv'?: string;
|
|
628
|
+
/** OAuth access token. */
|
|
629
|
+
access_token?: string;
|
|
630
|
+
/** Data format for response. */
|
|
631
|
+
alt?: string;
|
|
632
|
+
/** JSONP */
|
|
633
|
+
callback?: string;
|
|
634
|
+
/** Required. The primary or supplemental product data source where `data_source` name identifies the product input to be updated. Only API data sources are supported. Format: `accounts/{account}/dataSources/{datasource}`. For example, `accounts/123456/dataSources/104628`. */
|
|
635
|
+
dataSource?: string;
|
|
636
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
637
|
+
fields?: string;
|
|
638
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
639
|
+
key?: string;
|
|
640
|
+
/** Identifier. The name of the product input. Format: `accounts/{account}/productInputs/{productinput}` where the last section `productinput` consists of: `content_language~feed_label~offer_id` example for product input name is `accounts/123/productInputs/en~US~sku123`. A legacy local product input name would be `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the v1beta version, the `productInput` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productInputs/online~en~US~sku123`. */
|
|
641
|
+
name: string;
|
|
642
|
+
/** OAuth 2.0 token for the current user. */
|
|
643
|
+
oauth_token?: string;
|
|
644
|
+
/** Returns response with indentations and line breaks. */
|
|
645
|
+
prettyPrint?: boolean;
|
|
646
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
647
|
+
quotaUser?: string;
|
|
648
|
+
/** Optional. The list of product attributes to be updated. If the update mask is omitted, then it is treated as implied field mask equivalent to all fields that are populated (have a non-empty value). Attributes specified in the update mask without a value specified in the body will be deleted from the product. Update mask can only be specified for top level fields in attributes and custom attributes. To specify the update mask for custom attributes you need to add the `custom_attribute.` prefix. Providing special "*" value for full product replacement is not supported. */
|
|
649
|
+
updateMask?: string;
|
|
650
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
651
|
+
upload_protocol?: string;
|
|
652
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
653
|
+
uploadType?: string;
|
|
654
|
+
/** Request body */
|
|
655
|
+
resource: ProductInput;
|
|
656
|
+
}): Request<ProductInput>;
|
|
657
|
+
patch(
|
|
658
|
+
request: {
|
|
659
|
+
/** V1 error format. */
|
|
660
|
+
'$.xgafv'?: string;
|
|
661
|
+
/** OAuth access token. */
|
|
662
|
+
access_token?: string;
|
|
663
|
+
/** Data format for response. */
|
|
664
|
+
alt?: string;
|
|
665
|
+
/** JSONP */
|
|
666
|
+
callback?: string;
|
|
667
|
+
/** Required. The primary or supplemental product data source where `data_source` name identifies the product input to be updated. Only API data sources are supported. Format: `accounts/{account}/dataSources/{datasource}`. For example, `accounts/123456/dataSources/104628`. */
|
|
668
|
+
dataSource?: string;
|
|
669
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
670
|
+
fields?: string;
|
|
671
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
672
|
+
key?: string;
|
|
673
|
+
/** Identifier. The name of the product input. Format: `accounts/{account}/productInputs/{productinput}` where the last section `productinput` consists of: `content_language~feed_label~offer_id` example for product input name is `accounts/123/productInputs/en~US~sku123`. A legacy local product input name would be `accounts/123/productInputs/local~en~US~sku123`. Note: For calls to the v1beta version, the `productInput` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/productInputs/online~en~US~sku123`. */
|
|
674
|
+
name: string;
|
|
675
|
+
/** OAuth 2.0 token for the current user. */
|
|
676
|
+
oauth_token?: string;
|
|
677
|
+
/** Returns response with indentations and line breaks. */
|
|
678
|
+
prettyPrint?: boolean;
|
|
679
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
680
|
+
quotaUser?: string;
|
|
681
|
+
/** Optional. The list of product attributes to be updated. If the update mask is omitted, then it is treated as implied field mask equivalent to all fields that are populated (have a non-empty value). Attributes specified in the update mask without a value specified in the body will be deleted from the product. Update mask can only be specified for top level fields in attributes and custom attributes. To specify the update mask for custom attributes you need to add the `custom_attribute.` prefix. Providing special "*" value for full product replacement is not supported. */
|
|
682
|
+
updateMask?: string;
|
|
683
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
684
|
+
upload_protocol?: string;
|
|
685
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
686
|
+
uploadType?: string;
|
|
687
|
+
},
|
|
688
|
+
body: ProductInput,
|
|
689
|
+
): Request<ProductInput>;
|
|
690
|
+
}
|
|
691
|
+
interface ProductsResource {
|
|
692
|
+
/** Retrieves the processed product from your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the updated final product can be retrieved. */
|
|
693
|
+
get(request?: {
|
|
694
|
+
/** V1 error format. */
|
|
695
|
+
'$.xgafv'?: string;
|
|
696
|
+
/** OAuth access token. */
|
|
697
|
+
access_token?: string;
|
|
698
|
+
/** Data format for response. */
|
|
699
|
+
alt?: string;
|
|
700
|
+
/** JSONP */
|
|
701
|
+
callback?: string;
|
|
702
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
703
|
+
fields?: string;
|
|
704
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
705
|
+
key?: string;
|
|
706
|
+
/** Required. The name of the product to retrieve. Format: `accounts/{account}/products/{product}` where the last section `product` consists of: `content_language~feed_label~offer_id` example for product name is `accounts/123/products/en~US~sku123`. A legacy local product name would be `accounts/123/products/local~en~US~sku123`. Note: For calls to the v1beta version, the `product` section consists of: `channel~content_language~feed_label~offer_id`, for example: `accounts/123/products/online~en~US~sku123`. */
|
|
707
|
+
name: string;
|
|
708
|
+
/** OAuth 2.0 token for the current user. */
|
|
709
|
+
oauth_token?: string;
|
|
710
|
+
/** Returns response with indentations and line breaks. */
|
|
711
|
+
prettyPrint?: boolean;
|
|
712
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
713
|
+
quotaUser?: string;
|
|
714
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
715
|
+
upload_protocol?: string;
|
|
716
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
717
|
+
uploadType?: string;
|
|
718
|
+
}): Request<Product>;
|
|
719
|
+
/** Lists the processed products in your Merchant Center account. The response might contain fewer items than specified by `pageSize`. Rely on `pageToken` to determine if there are more items to be requested. After inserting, updating, or deleting a product input, it may take several minutes before the updated processed product can be retrieved. */
|
|
720
|
+
list(request?: {
|
|
721
|
+
/** V1 error format. */
|
|
722
|
+
'$.xgafv'?: string;
|
|
723
|
+
/** OAuth access token. */
|
|
724
|
+
access_token?: string;
|
|
725
|
+
/** Data format for response. */
|
|
726
|
+
alt?: string;
|
|
727
|
+
/** JSONP */
|
|
728
|
+
callback?: string;
|
|
729
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
730
|
+
fields?: string;
|
|
731
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
732
|
+
key?: string;
|
|
733
|
+
/** OAuth 2.0 token for the current user. */
|
|
734
|
+
oauth_token?: string;
|
|
735
|
+
/** The maximum number of products to return. The service may return fewer than this value. The maximum value is 1000; values above 1000 will be coerced to 1000. If unspecified, the default page size of 25 products will be returned. */
|
|
736
|
+
pageSize?: number;
|
|
737
|
+
/** A page token, received from a previous `ListProducts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProducts` must match the call that provided the page token. */
|
|
738
|
+
pageToken?: string;
|
|
739
|
+
/** Required. The account to list processed products for. Format: `accounts/{account}` */
|
|
740
|
+
parent: string;
|
|
741
|
+
/** Returns response with indentations and line breaks. */
|
|
742
|
+
prettyPrint?: boolean;
|
|
743
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
744
|
+
quotaUser?: string;
|
|
745
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
746
|
+
upload_protocol?: string;
|
|
747
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
748
|
+
uploadType?: string;
|
|
749
|
+
}): Request<ListProductsResponse>;
|
|
750
|
+
}
|
|
751
|
+
interface AccountsResource {
|
|
752
|
+
productInputs: ProductInputsResource;
|
|
753
|
+
products: ProductsResource;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
const accounts: AccountsResource;
|
|
757
|
+
}
|
|
758
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.merchantapi-products_v1",
|
|
3
|
+
"version": "0.0.20250804",
|
|
4
|
+
"description": "TypeScript typings for Merchant API products_v1",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "Maxim Mazurok",
|
|
12
|
+
"email": "maxim@mazurok.com",
|
|
13
|
+
"url": "https://maxim.mazurok.com"
|
|
14
|
+
},
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@types/gapi.client": "*",
|
|
18
|
+
"@types/gapi.client.discovery-v1": "*"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# TypeScript typings for Merchant API products_v1
|
|
2
|
+
|
|
3
|
+
Programmatically manage your Merchant Center Accounts.
|
|
4
|
+
For detailed description please check [documentation](https://developers.google.com/merchant/api).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for Merchant API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.merchantapi-products_v1 --save-dev
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
You need to initialize Google API client in your code:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
gapi.load('client', () => {
|
|
20
|
+
// now we can use gapi.client
|
|
21
|
+
// ...
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then load api client wrapper:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
gapi.client.load(
|
|
29
|
+
'https://merchantapi.googleapis.com/$discovery/rest?version=products_v1',
|
|
30
|
+
() => {
|
|
31
|
+
// now we can use:
|
|
32
|
+
// gapi.client.merchantapi
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
|
|
39
|
+
gapi.client.load('merchantapi', 'products_v1', () => {
|
|
40
|
+
// now we can use:
|
|
41
|
+
// gapi.client.merchantapi
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Don't forget to authenticate your client before sending any request to resources:
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
// declare client_id registered in Google Developers Console
|
|
49
|
+
var client_id = '',
|
|
50
|
+
scope = [
|
|
51
|
+
// Manage your product listings and accounts for Google Shopping
|
|
52
|
+
'https://www.googleapis.com/auth/content',
|
|
53
|
+
],
|
|
54
|
+
immediate = true;
|
|
55
|
+
// ...
|
|
56
|
+
|
|
57
|
+
gapi.auth.authorize(
|
|
58
|
+
{client_id: client_id, scope: scope, immediate: immediate},
|
|
59
|
+
authResult => {
|
|
60
|
+
if (authResult && !authResult.error) {
|
|
61
|
+
/* handle successful authorization */
|
|
62
|
+
} else {
|
|
63
|
+
/* handle authorization error */
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
After that you can use Merchant API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
|
|
73
|
+
```
|