@maxim_mazurok/gapi.client.merchantapi-lfp_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.
Files changed (3) hide show
  1. package/index.d.ts +505 -0
  2. package/package.json +20 -0
  3. package/readme.md +73 -0
package/index.d.ts ADDED
@@ -0,0 +1,505 @@
1
+ /* Type definitions for non-npm package Merchant API lfp_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=lfp_v1
12
+ // Revision: 20250804
13
+
14
+ /// <reference types="gapi.client" />
15
+
16
+ declare namespace gapi.client {
17
+ /** Load Merchant API lfp_v1 */
18
+ function load(
19
+ urlOrObject: 'https://merchantapi.googleapis.com/$discovery/rest?version=lfp_v1',
20
+ ): Promise<void>;
21
+ /** @deprecated Please load APIs with discovery documents. */
22
+ function load(name: 'merchantapi', version: 'lfp_v1'): Promise<void>;
23
+ /** @deprecated Please load APIs with discovery documents. */
24
+ function load(
25
+ name: 'merchantapi',
26
+ version: 'lfp_v1',
27
+ callback: () => any,
28
+ ): void;
29
+
30
+ namespace merchantapi {
31
+ interface CountrySettings {
32
+ /** True if this merchant has enabled free local listings in MC. */
33
+ freeLocalListingsEnabled?: boolean;
34
+ /** Output only. The verification state of this merchant's instock serving feature. */
35
+ instockServingVerificationState?: string;
36
+ /** Output only. The verification state of this merchant's inventory check. */
37
+ inventoryVerificationState?: string;
38
+ /** True if this merchant has enabled local inventory ads in MC. */
39
+ localInventoryAdsEnabled?: boolean;
40
+ /** Output only. The verification state of this merchant's pickup serving feature. */
41
+ pickupServingVerificationState?: string;
42
+ /** Output only. The product page type selected by this merchant. */
43
+ productPageType?: string;
44
+ /** Required. The [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) for the country for which these settings are defined. */
45
+ regionCode?: string;
46
+ }
47
+ interface Empty {}
48
+ interface InventoryStats {
49
+ /** Number of entries (understanding entry as a pair of product and store) that were built based on provided inventories/sales and submitted to Google. */
50
+ submittedEntries?: string;
51
+ /** Number of submitted in stock entries. */
52
+ submittedInStockEntries?: string;
53
+ /** Number of products from provided inventories/sales that were created from matches to existing online products provided by the merchant or to the Google catalog. */
54
+ submittedProducts?: string;
55
+ /** Number of entries that were built based on provided inventories/sales and couldn't be submitted to Google due to errors like missing product. */
56
+ unsubmittedEntries?: string;
57
+ }
58
+ interface LfpInventory {
59
+ /** Required. Availability of the product at this store. For accepted attribute values, see the [local product inventory data specification](https://support.google.com/merchants/answer/3061342) */
60
+ availability?: string;
61
+ /** Optional. The time when the inventory is collected. If not set, it will be set to the time when the inventory is submitted. */
62
+ collectionTime?: string;
63
+ /** Required. The two-letter ISO 639-1 language code for the item. */
64
+ contentLanguage?: string;
65
+ /** Optional. The [feed label](https://developers.google.com/shopping-content/guides/products/feed-labels) for the product. If this is not set, it will default to `regionCode`. */
66
+ feedLabel?: string;
67
+ /** Optional. The Global Trade Item Number of the product. */
68
+ gtin?: string;
69
+ /** Output only. Identifier. The name for the `LfpInventory` resource. Format: `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}` */
70
+ name?: string;
71
+ /** Required. Immutable. A unique identifier for the product. If both inventories and sales are submitted for a merchant, this id should match for the same product. **Note**: if the merchant sells the same product new and used, they should have different IDs. */
72
+ offerId?: string;
73
+ /** 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 data specification](https://support.google.com/merchants/answer/3061342). */
74
+ pickupMethod?: string;
75
+ /** 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 data specification](https://support.google.com/merchants/answer/3061342). */
76
+ pickupSla?: string;
77
+ /** Optional. The current price of the product. */
78
+ price?: Price;
79
+ /** Optional. Quantity of the product available at this store. Must be greater than or equal to zero. */
80
+ quantity?: string;
81
+ /** Required. The [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) for the country where the product is sold. */
82
+ regionCode?: string;
83
+ /** Required. The identifier of the merchant's store. Either the store code inserted through `InsertLfpStore` or the store code in the Business Profile. */
84
+ storeCode?: string;
85
+ /** Required. The Merchant Center ID of the merchant to submit the inventory for. */
86
+ targetAccount?: string;
87
+ }
88
+ interface LfpMerchantState {
89
+ /** Country-specific settings for the merchant. */
90
+ countrySettings?: CountrySettings[];
91
+ /** The inventory statistics for the merchant. The field will be absent if the merchant has no inventory submitted through LFP. */
92
+ inventoryStats?: InventoryStats;
93
+ /** Number of [GBPs](https://www.google.com/business/) this merchant has access to. */
94
+ linkedGbps?: string;
95
+ /** Identifier. The name of the `LfpMerchantState` resource. Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For example, `accounts/123456/lfpMerchantStates/567890`. */
96
+ name?: string;
97
+ /** Output only. The state per store from the specified merchant. The field will be absent if the merchant has no stores submitted through LFP. */
98
+ storeStates?: LfpStoreState[];
99
+ }
100
+ interface LfpSale {
101
+ /** Required. The two-letter ISO 639-1 language code for the item. */
102
+ contentLanguage?: string;
103
+ /** Optional. The [feed label](https://developers.google.com/shopping-content/guides/products/feed-labels) for the product. If this is not set, it will default to `regionCode`. */
104
+ feedLabel?: string;
105
+ /** Required. The Global Trade Item Number of the sold product. */
106
+ gtin?: string;
107
+ /** Output only. Identifier. The name of the `LfpSale` resource. Format: `accounts/{account}/lfpSales/{sale}` */
108
+ name?: string;
109
+ /** Required. A unique identifier for the product. If both inventories and sales are submitted for a merchant, this id should match for the same product. **Note**: if the merchant sells the same product new and used, they should have different IDs. */
110
+ offerId?: string;
111
+ /** Required. The unit price of the product. */
112
+ price?: Price;
113
+ /** Required. The relative change of the available quantity. Negative for items returned. */
114
+ quantity?: string;
115
+ /** Required. The [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml) for the country where the product is sold. */
116
+ regionCode?: string;
117
+ /** Required. The timestamp for the sale. */
118
+ saleTime?: string;
119
+ /** Required. The identifier of the merchant's store. Either a `storeCode` inserted through the API or the code of the store in the Business Profile. */
120
+ storeCode?: string;
121
+ /** Required. The Merchant Center ID of the merchant to submit the sale for. */
122
+ targetAccount?: string;
123
+ /** Output only. System generated globally unique ID for the `LfpSale`. */
124
+ uid?: string;
125
+ }
126
+ interface LfpStore {
127
+ /** Optional. [Google My Business category id](https://support.google.com/business/answer/7249669). */
128
+ gcidCategory?: string[];
129
+ /** Optional. Output only. The state of matching to a Google Business Profile. See matchingStateHint for further details if no match is found. */
130
+ matchingState?: string;
131
+ /** Optional. Output only. The hint of why the matching has failed. This is only set when matchingState=`STORE_MATCHING_STATE_FAILED`. Possible values are: - "`linked-store-not-found`": There aren't any Google Business Profile stores available for matching. - "`store-match-not-found`": The provided `LfpStore` 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 the `LfpStore` location address does not match with Google Business Profile stores' addresses. Update the `LfpStore` address or Google Business Profile store address to match correctly. - "`store-match-unverified`": The provided `LfpStore` 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. */
132
+ matchingStateHint?: string;
133
+ /** Output only. Identifier. The name of the `LfpStore` resource. Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` */
134
+ name?: string;
135
+ /** Optional. The store phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format. Example: `+15556767888` */
136
+ phoneNumber?: string;
137
+ /** Optional. The [Google Place Id](https://developers.google.com/maps/documentation/places/web-service/place-id#id-overview) of the store location. */
138
+ placeId?: string;
139
+ /** Required. The street address of the store. Example: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA. */
140
+ storeAddress?: string;
141
+ /** Required. Immutable. A store identifier that is unique for the target merchant. */
142
+ storeCode?: string;
143
+ /** Optional. The merchant or store name. */
144
+ storeName?: string;
145
+ /** Required. The Merchant Center id of the merchant to submit the store for. */
146
+ targetAccount?: string;
147
+ /** Optional. The website URL for the store or merchant. */
148
+ websiteUri?: string;
149
+ }
150
+ interface LfpStoreState {
151
+ /** Output only. The store matching state. */
152
+ matchingState?: string;
153
+ /** The hint of why the matching has failed (only set if matching_state is FAILED). */
154
+ matchingStateHint?: string;
155
+ /** Required. Immutable. The identifier of this store. */
156
+ storeCode?: string;
157
+ }
158
+ interface ListLfpStoresResponse {
159
+ /** The stores from the specified merchant. */
160
+ lfpStores?: LfpStore[];
161
+ /** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
162
+ nextPageToken?: string;
163
+ }
164
+ interface Price {
165
+ /** 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). */
166
+ amountMicros?: string;
167
+ /** The currency of the price using three-letter acronyms according to [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217). */
168
+ currencyCode?: string;
169
+ }
170
+ interface ProductChange {
171
+ /** 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`, ``) */
172
+ newValue?: string;
173
+ /** 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`, ``) */
174
+ oldValue?: string;
175
+ /** Countries that have the change (if applicable). Represented in the ISO 3166 format. */
176
+ regionCode?: string;
177
+ /** 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) */
178
+ reportingContext?: string;
179
+ }
180
+ interface ProductStatusChangeMessage {
181
+ /** The target account that owns the entity that changed. Format : `accounts/{merchant_id}` */
182
+ account?: string;
183
+ /** The attribute in the resource that changed, in this case it will be always `Status`. */
184
+ attribute?: string;
185
+ /** A message to describe the change that happened to the product */
186
+ changes?: ProductChange[];
187
+ /** 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. */
188
+ eventTime?: string;
189
+ /** Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event. */
190
+ expirationTime?: string;
191
+ /** 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}` */
192
+ managingAccount?: string;
193
+ /** The product name. Format: `accounts/{account}/products/{product}` */
194
+ resource?: string;
195
+ /** The product id. */
196
+ resourceId?: string;
197
+ /** The resource that changed, in this case it will always be `Product`. */
198
+ resourceType?: string;
199
+ }
200
+ interface LfpInventoriesResource {
201
+ /** Inserts a `LfpInventory` resource for the given target merchant account. If the resource already exists, it will be replaced. The inventory automatically expires after 30 days. */
202
+ insert(request: {
203
+ /** V1 error format. */
204
+ '$.xgafv'?: string;
205
+ /** OAuth access token. */
206
+ access_token?: string;
207
+ /** Data format for response. */
208
+ alt?: string;
209
+ /** JSONP */
210
+ callback?: string;
211
+ /** Selector specifying which fields to include in a partial response. */
212
+ fields?: string;
213
+ /** 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. */
214
+ key?: string;
215
+ /** OAuth 2.0 token for the current user. */
216
+ oauth_token?: string;
217
+ /** Required. The LFP provider account. Format: `accounts/{account}` */
218
+ parent: string;
219
+ /** Returns response with indentations and line breaks. */
220
+ prettyPrint?: boolean;
221
+ /** 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. */
222
+ quotaUser?: string;
223
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
224
+ upload_protocol?: string;
225
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
226
+ uploadType?: string;
227
+ /** Request body */
228
+ resource: LfpInventory;
229
+ }): Request<LfpInventory>;
230
+ insert(
231
+ request: {
232
+ /** V1 error format. */
233
+ '$.xgafv'?: string;
234
+ /** OAuth access token. */
235
+ access_token?: string;
236
+ /** Data format for response. */
237
+ alt?: string;
238
+ /** JSONP */
239
+ callback?: string;
240
+ /** Selector specifying which fields to include in a partial response. */
241
+ fields?: string;
242
+ /** 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. */
243
+ key?: string;
244
+ /** OAuth 2.0 token for the current user. */
245
+ oauth_token?: string;
246
+ /** Required. The LFP provider account. Format: `accounts/{account}` */
247
+ parent: string;
248
+ /** Returns response with indentations and line breaks. */
249
+ prettyPrint?: boolean;
250
+ /** 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. */
251
+ quotaUser?: string;
252
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
253
+ upload_protocol?: string;
254
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
255
+ uploadType?: string;
256
+ },
257
+ body: LfpInventory,
258
+ ): Request<LfpInventory>;
259
+ }
260
+ interface LfpMerchantStatesResource {
261
+ /** Gets the LFP state of a merchant */
262
+ get(request?: {
263
+ /** V1 error format. */
264
+ '$.xgafv'?: string;
265
+ /** OAuth access token. */
266
+ access_token?: string;
267
+ /** Data format for response. */
268
+ alt?: string;
269
+ /** JSONP */
270
+ callback?: string;
271
+ /** Selector specifying which fields to include in a partial response. */
272
+ fields?: string;
273
+ /** 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. */
274
+ key?: string;
275
+ /** Required. The name of the state to retrieve. Format: `accounts/{account}/lfpMerchantStates/{target_merchant}`. For example, `accounts/123456/lfpMerchantStates/567890`. */
276
+ name: string;
277
+ /** OAuth 2.0 token for the current user. */
278
+ oauth_token?: string;
279
+ /** Returns response with indentations and line breaks. */
280
+ prettyPrint?: boolean;
281
+ /** 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. */
282
+ quotaUser?: string;
283
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
284
+ upload_protocol?: string;
285
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
286
+ uploadType?: string;
287
+ }): Request<LfpMerchantState>;
288
+ }
289
+ interface LfpSalesResource {
290
+ /** Inserts a `LfpSale` for the given merchant. */
291
+ insert(request: {
292
+ /** V1 error format. */
293
+ '$.xgafv'?: string;
294
+ /** OAuth access token. */
295
+ access_token?: string;
296
+ /** Data format for response. */
297
+ alt?: string;
298
+ /** JSONP */
299
+ callback?: string;
300
+ /** Selector specifying which fields to include in a partial response. */
301
+ fields?: string;
302
+ /** 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. */
303
+ key?: string;
304
+ /** OAuth 2.0 token for the current user. */
305
+ oauth_token?: string;
306
+ /** Required. The LFP provider account. Format: `accounts/{lfp_partner}` */
307
+ parent: string;
308
+ /** Returns response with indentations and line breaks. */
309
+ prettyPrint?: boolean;
310
+ /** 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. */
311
+ quotaUser?: string;
312
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
313
+ upload_protocol?: string;
314
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
315
+ uploadType?: string;
316
+ /** Request body */
317
+ resource: LfpSale;
318
+ }): Request<LfpSale>;
319
+ insert(
320
+ request: {
321
+ /** V1 error format. */
322
+ '$.xgafv'?: string;
323
+ /** OAuth access token. */
324
+ access_token?: string;
325
+ /** Data format for response. */
326
+ alt?: string;
327
+ /** JSONP */
328
+ callback?: string;
329
+ /** Selector specifying which fields to include in a partial response. */
330
+ fields?: string;
331
+ /** 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. */
332
+ key?: string;
333
+ /** OAuth 2.0 token for the current user. */
334
+ oauth_token?: string;
335
+ /** Required. The LFP provider account. Format: `accounts/{lfp_partner}` */
336
+ parent: string;
337
+ /** Returns response with indentations and line breaks. */
338
+ prettyPrint?: boolean;
339
+ /** 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. */
340
+ quotaUser?: string;
341
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
342
+ upload_protocol?: string;
343
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
344
+ uploadType?: string;
345
+ },
346
+ body: LfpSale,
347
+ ): Request<LfpSale>;
348
+ }
349
+ interface LfpStoresResource {
350
+ /** Deletes a store for a target merchant. */
351
+ delete(request?: {
352
+ /** V1 error format. */
353
+ '$.xgafv'?: string;
354
+ /** OAuth access token. */
355
+ access_token?: string;
356
+ /** Data format for response. */
357
+ alt?: string;
358
+ /** JSONP */
359
+ callback?: string;
360
+ /** Selector specifying which fields to include in a partial response. */
361
+ fields?: string;
362
+ /** 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. */
363
+ key?: string;
364
+ /** Required. The name of the store to delete for the target merchant account. Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` */
365
+ name: string;
366
+ /** OAuth 2.0 token for the current user. */
367
+ oauth_token?: string;
368
+ /** Returns response with indentations and line breaks. */
369
+ prettyPrint?: boolean;
370
+ /** 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. */
371
+ quotaUser?: string;
372
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
373
+ upload_protocol?: string;
374
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
375
+ uploadType?: string;
376
+ }): Request<{}>;
377
+ /** Retrieves information about a store. */
378
+ get(request?: {
379
+ /** V1 error format. */
380
+ '$.xgafv'?: string;
381
+ /** OAuth access token. */
382
+ access_token?: string;
383
+ /** Data format for response. */
384
+ alt?: string;
385
+ /** JSONP */
386
+ callback?: string;
387
+ /** Selector specifying which fields to include in a partial response. */
388
+ fields?: string;
389
+ /** 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. */
390
+ key?: string;
391
+ /** Required. The name of the store to retrieve. Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}` */
392
+ name: string;
393
+ /** OAuth 2.0 token for the current user. */
394
+ oauth_token?: string;
395
+ /** Returns response with indentations and line breaks. */
396
+ prettyPrint?: boolean;
397
+ /** 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. */
398
+ quotaUser?: string;
399
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
400
+ upload_protocol?: string;
401
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
402
+ uploadType?: string;
403
+ }): Request<LfpStore>;
404
+ /** Inserts a store for the target merchant. If the store with the same store code already exists, it will be replaced. */
405
+ insert(request: {
406
+ /** V1 error format. */
407
+ '$.xgafv'?: string;
408
+ /** OAuth access token. */
409
+ access_token?: string;
410
+ /** Data format for response. */
411
+ alt?: string;
412
+ /** JSONP */
413
+ callback?: string;
414
+ /** Selector specifying which fields to include in a partial response. */
415
+ fields?: string;
416
+ /** 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. */
417
+ key?: string;
418
+ /** OAuth 2.0 token for the current user. */
419
+ oauth_token?: string;
420
+ /** Required. The LFP provider account Format: `accounts/{account}` */
421
+ parent: string;
422
+ /** Returns response with indentations and line breaks. */
423
+ prettyPrint?: boolean;
424
+ /** 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. */
425
+ quotaUser?: string;
426
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
427
+ upload_protocol?: string;
428
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
429
+ uploadType?: string;
430
+ /** Request body */
431
+ resource: LfpStore;
432
+ }): Request<LfpStore>;
433
+ insert(
434
+ request: {
435
+ /** V1 error format. */
436
+ '$.xgafv'?: string;
437
+ /** OAuth access token. */
438
+ access_token?: string;
439
+ /** Data format for response. */
440
+ alt?: string;
441
+ /** JSONP */
442
+ callback?: string;
443
+ /** Selector specifying which fields to include in a partial response. */
444
+ fields?: string;
445
+ /** 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. */
446
+ key?: string;
447
+ /** OAuth 2.0 token for the current user. */
448
+ oauth_token?: string;
449
+ /** Required. The LFP provider account Format: `accounts/{account}` */
450
+ parent: string;
451
+ /** Returns response with indentations and line breaks. */
452
+ prettyPrint?: boolean;
453
+ /** 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. */
454
+ quotaUser?: string;
455
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
456
+ upload_protocol?: string;
457
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
458
+ uploadType?: string;
459
+ },
460
+ body: LfpStore,
461
+ ): Request<LfpStore>;
462
+ /** Lists the stores of the target merchant, specified by the filter in `ListLfpStoresRequest`. */
463
+ list(request?: {
464
+ /** V1 error format. */
465
+ '$.xgafv'?: string;
466
+ /** OAuth access token. */
467
+ access_token?: string;
468
+ /** Data format for response. */
469
+ alt?: string;
470
+ /** JSONP */
471
+ callback?: string;
472
+ /** Selector specifying which fields to include in a partial response. */
473
+ fields?: string;
474
+ /** 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. */
475
+ key?: string;
476
+ /** OAuth 2.0 token for the current user. */
477
+ oauth_token?: string;
478
+ /** Optional. The maximum number of `LfpStore` resources for the given account to return. The service returns fewer than this value if the number of stores for the given account is less than the `pageSize`. The default value is 250. The maximum value is 1000; If a value higher than the maximum is specified, then the `pageSize` will default to the maximum. */
479
+ pageSize?: number;
480
+ /** Optional. A page token, received from a previous `ListLfpStoresRequest` call. Provide the page token to retrieve the subsequent page. When paginating, all other parameters provided to `ListLfpStoresRequest` must match the call that provided the page token. The token returned as nextPageToken in the response to the previous request. */
481
+ pageToken?: string;
482
+ /** Required. The LFP partner. Format: `accounts/{account}` */
483
+ parent: string;
484
+ /** Returns response with indentations and line breaks. */
485
+ prettyPrint?: boolean;
486
+ /** 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. */
487
+ quotaUser?: string;
488
+ /** Required. The Merchant Center id of the merchant to list stores for. */
489
+ targetAccount?: string;
490
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
491
+ upload_protocol?: string;
492
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
493
+ uploadType?: string;
494
+ }): Request<ListLfpStoresResponse>;
495
+ }
496
+ interface AccountsResource {
497
+ lfpInventories: LfpInventoriesResource;
498
+ lfpMerchantStates: LfpMerchantStatesResource;
499
+ lfpSales: LfpSalesResource;
500
+ lfpStores: LfpStoresResource;
501
+ }
502
+
503
+ const accounts: AccountsResource;
504
+ }
505
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.merchantapi-lfp_v1",
3
+ "version": "0.0.20250804",
4
+ "description": "TypeScript typings for Merchant API lfp_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 lfp_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-lfp_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=lfp_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', 'lfp_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
+ ```