@googleapis/merchantapi 6.0.1 → 8.0.0
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/CHANGELOG.md +32 -0
- package/README.md +9 -0
- package/accounts_v1beta.ts +6214 -358
- package/build/accounts_v1beta.d.ts +4685 -141
- package/build/accounts_v1beta.js +560 -12
- package/build/accounts_v1beta.js.map +1 -1
- package/build/conversions_v1beta.d.ts +336 -1
- package/build/conversions_v1beta.js.map +1 -1
- package/build/datasources_v1beta.d.ts +411 -2
- package/build/datasources_v1beta.js.map +1 -1
- package/build/inventories_v1beta.d.ts +336 -2
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1beta.d.ts +367 -1
- package/build/issueresolution_v1beta.js +48 -0
- package/build/issueresolution_v1beta.js.map +1 -1
- package/build/lfp_v1beta.d.ts +436 -3
- package/build/lfp_v1beta.js.map +1 -1
- package/build/notifications_v1beta.d.ts +272 -1
- package/build/notifications_v1beta.js.map +1 -1
- package/build/ordertracking_v1beta.d.ts +75 -1
- package/build/ordertracking_v1beta.js.map +1 -1
- package/build/products_v1beta.d.ts +347 -44
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1beta.d.ts +171 -4
- package/build/promotions_v1beta.js.map +1 -1
- package/build/quota_v1beta.d.ts +52 -1
- package/build/quota_v1beta.js.map +1 -1
- package/build/reports_v1beta.d.ts +58 -1
- package/build/reports_v1beta.js.map +1 -1
- package/build/reviews_v1beta.d.ts +426 -2
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +336 -1
- package/datasources_v1beta.ts +411 -2
- package/inventories_v1beta.ts +336 -2
- package/issueresolution_v1beta.ts +465 -1
- package/lfp_v1beta.ts +436 -3
- package/notifications_v1beta.ts +272 -1
- package/ordertracking_v1beta.ts +75 -1
- package/package.json +1 -1
- package/products_v1beta.ts +347 -44
- package/promotions_v1beta.ts +171 -4
- package/quota_v1beta.ts +52 -1
- package/reports_v1beta.ts +58 -1
- package/reviews_v1beta.ts +426 -2
|
@@ -68,6 +68,7 @@ export declare namespace merchantapi_issueresolution_v1beta {
|
|
|
68
68
|
*/
|
|
69
69
|
export class Merchantapi {
|
|
70
70
|
context: APIRequestContext;
|
|
71
|
+
accounts: Resource$Accounts;
|
|
71
72
|
issueresolution: Resource$Issueresolution;
|
|
72
73
|
constructor(options: GlobalOptions, google?: GoogleConfigurable);
|
|
73
74
|
}
|
|
@@ -159,6 +160,31 @@ export declare namespace merchantapi_issueresolution_v1beta {
|
|
|
159
160
|
*/
|
|
160
161
|
title?: string | null;
|
|
161
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Aggregate product statuses for a given reporting context and country.
|
|
165
|
+
*/
|
|
166
|
+
export interface Schema$AggregateProductStatus {
|
|
167
|
+
/**
|
|
168
|
+
* The country of the aggregate product statuses. Represented as a [CLDR territory code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml).
|
|
169
|
+
*/
|
|
170
|
+
country?: string | null;
|
|
171
|
+
/**
|
|
172
|
+
* The product issues that affect the given reporting context and country.
|
|
173
|
+
*/
|
|
174
|
+
itemLevelIssues?: Schema$ItemLevelIssue[];
|
|
175
|
+
/**
|
|
176
|
+
* Identifier. The name of the `AggregateProductStatuses` resource. Format: `accounts/{account\}/aggregateProductStatuses/{aggregateProductStatuses\}`
|
|
177
|
+
*/
|
|
178
|
+
name?: string | null;
|
|
179
|
+
/**
|
|
180
|
+
* The reporting context of the aggregate product statuses.
|
|
181
|
+
*/
|
|
182
|
+
reportingContext?: string | null;
|
|
183
|
+
/**
|
|
184
|
+
* Products statistics for the given reporting context and country.
|
|
185
|
+
*/
|
|
186
|
+
stats?: Schema$Stats;
|
|
187
|
+
}
|
|
162
188
|
/**
|
|
163
189
|
* A detailed impact breakdown for a group of regions where the impact of the issue on different shopping destinations is the same.
|
|
164
190
|
*/
|
|
@@ -344,6 +370,56 @@ export declare namespace merchantapi_issueresolution_v1beta {
|
|
|
344
370
|
*/
|
|
345
371
|
textInputValue?: Schema$TextInputValue;
|
|
346
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* The ItemLevelIssue of the product status.
|
|
375
|
+
*/
|
|
376
|
+
export interface Schema$ItemLevelIssue {
|
|
377
|
+
/**
|
|
378
|
+
* The attribute's name, if the issue is caused by a single attribute.
|
|
379
|
+
*/
|
|
380
|
+
attribute?: string | null;
|
|
381
|
+
/**
|
|
382
|
+
* The error code of the issue.
|
|
383
|
+
*/
|
|
384
|
+
code?: string | null;
|
|
385
|
+
/**
|
|
386
|
+
* A short issue description in English.
|
|
387
|
+
*/
|
|
388
|
+
description?: string | null;
|
|
389
|
+
/**
|
|
390
|
+
* A detailed issue description in English.
|
|
391
|
+
*/
|
|
392
|
+
detail?: string | null;
|
|
393
|
+
/**
|
|
394
|
+
* The URL of a web page to help with resolving this issue.
|
|
395
|
+
*/
|
|
396
|
+
documentationUri?: string | null;
|
|
397
|
+
/**
|
|
398
|
+
* The number of products affected by this issue.
|
|
399
|
+
*/
|
|
400
|
+
productCount?: string | null;
|
|
401
|
+
/**
|
|
402
|
+
* Whether the issue can be resolved by the merchant.
|
|
403
|
+
*/
|
|
404
|
+
resolution?: string | null;
|
|
405
|
+
/**
|
|
406
|
+
* How this issue affects serving of the offer.
|
|
407
|
+
*/
|
|
408
|
+
severity?: string | null;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Response message for the `ListAggregateProductStatuses` method.
|
|
412
|
+
*/
|
|
413
|
+
export interface Schema$ListAggregateProductStatusesResponse {
|
|
414
|
+
/**
|
|
415
|
+
* The `AggregateProductStatuses` resources for the given account.
|
|
416
|
+
*/
|
|
417
|
+
aggregateProductStatuses?: Schema$AggregateProductStatus[];
|
|
418
|
+
/**
|
|
419
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
420
|
+
*/
|
|
421
|
+
nextPageToken?: string | null;
|
|
422
|
+
}
|
|
347
423
|
/**
|
|
348
424
|
* The change that happened to the product including old value, new value, country code as the region code and reporting context.
|
|
349
425
|
*/
|
|
@@ -386,7 +462,7 @@ export declare namespace merchantapi_issueresolution_v1beta {
|
|
|
386
462
|
*/
|
|
387
463
|
eventTime?: string | null;
|
|
388
464
|
/**
|
|
389
|
-
* Optional. The product expiration time. This field will not
|
|
465
|
+
* Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
|
|
390
466
|
*/
|
|
391
467
|
expirationTime?: string | null;
|
|
392
468
|
/**
|
|
@@ -492,6 +568,27 @@ export declare namespace merchantapi_issueresolution_v1beta {
|
|
|
492
568
|
*/
|
|
493
569
|
renderedIssues?: Schema$RenderedIssue[];
|
|
494
570
|
}
|
|
571
|
+
/**
|
|
572
|
+
* Products statistics.
|
|
573
|
+
*/
|
|
574
|
+
export interface Schema$Stats {
|
|
575
|
+
/**
|
|
576
|
+
* The number of products that are active.
|
|
577
|
+
*/
|
|
578
|
+
activeCount?: string | null;
|
|
579
|
+
/**
|
|
580
|
+
* The number of products that are disapproved.
|
|
581
|
+
*/
|
|
582
|
+
disapprovedCount?: string | null;
|
|
583
|
+
/**
|
|
584
|
+
* The number of products that are expiring.
|
|
585
|
+
*/
|
|
586
|
+
expiringCount?: string | null;
|
|
587
|
+
/**
|
|
588
|
+
* The number of products that are pending.
|
|
589
|
+
*/
|
|
590
|
+
pendingCount?: string | null;
|
|
591
|
+
}
|
|
495
592
|
/**
|
|
496
593
|
* Text input allows the business to provide a text value.
|
|
497
594
|
*/
|
|
@@ -561,11 +658,164 @@ export declare namespace merchantapi_issueresolution_v1beta {
|
|
|
561
658
|
*/
|
|
562
659
|
message?: string | null;
|
|
563
660
|
}
|
|
661
|
+
export class Resource$Accounts {
|
|
662
|
+
context: APIRequestContext;
|
|
663
|
+
aggregateProductStatuses: Resource$Accounts$Aggregateproductstatuses;
|
|
664
|
+
constructor(context: APIRequestContext);
|
|
665
|
+
}
|
|
666
|
+
export class Resource$Accounts$Aggregateproductstatuses {
|
|
667
|
+
context: APIRequestContext;
|
|
668
|
+
constructor(context: APIRequestContext);
|
|
669
|
+
/**
|
|
670
|
+
* Lists the `AggregateProductStatuses` resources for your merchant account. The response might contain fewer items than specified by `pageSize`. If `pageToken` was returned in previous request, it can be used to obtain additional results.
|
|
671
|
+
* @example
|
|
672
|
+
* ```js
|
|
673
|
+
* // Before running the sample:
|
|
674
|
+
* // - Enable the API at:
|
|
675
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
676
|
+
* // - Login into gcloud by running:
|
|
677
|
+
* // ```sh
|
|
678
|
+
* // $ gcloud auth application-default login
|
|
679
|
+
* // ```
|
|
680
|
+
* // - Install the npm module by running:
|
|
681
|
+
* // ```sh
|
|
682
|
+
* // $ npm install googleapis
|
|
683
|
+
* // ```
|
|
684
|
+
*
|
|
685
|
+
* const {google} = require('googleapis');
|
|
686
|
+
* const merchantapi = google.merchantapi('issueresolution_v1beta');
|
|
687
|
+
*
|
|
688
|
+
* async function main() {
|
|
689
|
+
* const auth = new google.auth.GoogleAuth({
|
|
690
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
691
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
692
|
+
* });
|
|
693
|
+
*
|
|
694
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
695
|
+
* const authClient = await auth.getClient();
|
|
696
|
+
* google.options({auth: authClient});
|
|
697
|
+
*
|
|
698
|
+
* // Do the magic
|
|
699
|
+
* const res = await merchantapi.accounts.aggregateProductStatuses.list({
|
|
700
|
+
* // Optional. A filter expression that filters the aggregate product statuses. Filtering is only supported by the `reporting_context` and `country` field. For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`.
|
|
701
|
+
* filter: 'placeholder-value',
|
|
702
|
+
* // Optional. The maximum number of aggregate product statuses to return. The service may return fewer than this value. If unspecified, at most 25 aggregate product statuses are returned. The maximum value is 250; values above 250 are coerced to 250.
|
|
703
|
+
* pageSize: 'placeholder-value',
|
|
704
|
+
* // Optional. A page token, received from a previous `ListAggregateProductStatuses` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAggregateProductStatuses` must match the call that provided the page token.
|
|
705
|
+
* pageToken: 'placeholder-value',
|
|
706
|
+
* // Required. The account to list aggregate product statuses for. Format: `accounts/{account\}`
|
|
707
|
+
* parent: 'accounts/my-account',
|
|
708
|
+
* });
|
|
709
|
+
* console.log(res.data);
|
|
710
|
+
*
|
|
711
|
+
* // Example response
|
|
712
|
+
* // {
|
|
713
|
+
* // "aggregateProductStatuses": [],
|
|
714
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
715
|
+
* // }
|
|
716
|
+
* }
|
|
717
|
+
*
|
|
718
|
+
* main().catch(e => {
|
|
719
|
+
* console.error(e);
|
|
720
|
+
* throw e;
|
|
721
|
+
* });
|
|
722
|
+
*
|
|
723
|
+
* ```
|
|
724
|
+
*
|
|
725
|
+
* @param params - Parameters for request
|
|
726
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
727
|
+
* @param callback - Optional callback that handles the response.
|
|
728
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
729
|
+
*/
|
|
730
|
+
list(params: Params$Resource$Accounts$Aggregateproductstatuses$List, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
731
|
+
list(params?: Params$Resource$Accounts$Aggregateproductstatuses$List, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$ListAggregateProductStatusesResponse>>;
|
|
732
|
+
list(params: Params$Resource$Accounts$Aggregateproductstatuses$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
733
|
+
list(params: Params$Resource$Accounts$Aggregateproductstatuses$List, options: MethodOptions | BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>, callback: BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>): void;
|
|
734
|
+
list(params: Params$Resource$Accounts$Aggregateproductstatuses$List, callback: BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>): void;
|
|
735
|
+
list(callback: BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>): void;
|
|
736
|
+
}
|
|
737
|
+
export interface Params$Resource$Accounts$Aggregateproductstatuses$List extends StandardParameters {
|
|
738
|
+
/**
|
|
739
|
+
* Optional. A filter expression that filters the aggregate product statuses. Filtering is only supported by the `reporting_context` and `country` field. For example: `reporting_context = "SHOPPING_ADS" AND country = "US"`.
|
|
740
|
+
*/
|
|
741
|
+
filter?: string;
|
|
742
|
+
/**
|
|
743
|
+
* Optional. The maximum number of aggregate product statuses to return. The service may return fewer than this value. If unspecified, at most 25 aggregate product statuses are returned. The maximum value is 250; values above 250 are coerced to 250.
|
|
744
|
+
*/
|
|
745
|
+
pageSize?: number;
|
|
746
|
+
/**
|
|
747
|
+
* Optional. A page token, received from a previous `ListAggregateProductStatuses` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListAggregateProductStatuses` must match the call that provided the page token.
|
|
748
|
+
*/
|
|
749
|
+
pageToken?: string;
|
|
750
|
+
/**
|
|
751
|
+
* Required. The account to list aggregate product statuses for. Format: `accounts/{account\}`
|
|
752
|
+
*/
|
|
753
|
+
parent?: string;
|
|
754
|
+
}
|
|
564
755
|
export class Resource$Issueresolution {
|
|
565
756
|
context: APIRequestContext;
|
|
566
757
|
constructor(context: APIRequestContext);
|
|
567
758
|
/**
|
|
568
759
|
* Provide a list of business's account issues with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
|
|
760
|
+
* @example
|
|
761
|
+
* ```js
|
|
762
|
+
* // Before running the sample:
|
|
763
|
+
* // - Enable the API at:
|
|
764
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
765
|
+
* // - Login into gcloud by running:
|
|
766
|
+
* // ```sh
|
|
767
|
+
* // $ gcloud auth application-default login
|
|
768
|
+
* // ```
|
|
769
|
+
* // - Install the npm module by running:
|
|
770
|
+
* // ```sh
|
|
771
|
+
* // $ npm install googleapis
|
|
772
|
+
* // ```
|
|
773
|
+
*
|
|
774
|
+
* const {google} = require('googleapis');
|
|
775
|
+
* const merchantapi = google.merchantapi('issueresolution_v1beta');
|
|
776
|
+
*
|
|
777
|
+
* async function main() {
|
|
778
|
+
* const auth = new google.auth.GoogleAuth({
|
|
779
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
780
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
781
|
+
* });
|
|
782
|
+
*
|
|
783
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
784
|
+
* const authClient = await auth.getClient();
|
|
785
|
+
* google.options({auth: authClient});
|
|
786
|
+
*
|
|
787
|
+
* // Do the magic
|
|
788
|
+
* const res = await merchantapi.issueresolution.renderaccountissues({
|
|
789
|
+
* // Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize issue resolution content. If not set, the result will be in default language `en-US`.
|
|
790
|
+
* languageCode: 'placeholder-value',
|
|
791
|
+
* // Required. The account to fetch issues for. Format: `accounts/{account\}`
|
|
792
|
+
* name: 'accounts/my-account',
|
|
793
|
+
* // Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in an issue resolution content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC.
|
|
794
|
+
* timeZone: 'placeholder-value',
|
|
795
|
+
*
|
|
796
|
+
* // Request body metadata
|
|
797
|
+
* requestBody: {
|
|
798
|
+
* // request body parameters
|
|
799
|
+
* // {
|
|
800
|
+
* // "contentOption": "my_contentOption",
|
|
801
|
+
* // "userInputActionOption": "my_userInputActionOption"
|
|
802
|
+
* // }
|
|
803
|
+
* },
|
|
804
|
+
* });
|
|
805
|
+
* console.log(res.data);
|
|
806
|
+
*
|
|
807
|
+
* // Example response
|
|
808
|
+
* // {
|
|
809
|
+
* // "renderedIssues": []
|
|
810
|
+
* // }
|
|
811
|
+
* }
|
|
812
|
+
*
|
|
813
|
+
* main().catch(e => {
|
|
814
|
+
* console.error(e);
|
|
815
|
+
* throw e;
|
|
816
|
+
* });
|
|
817
|
+
*
|
|
818
|
+
* ```
|
|
569
819
|
*
|
|
570
820
|
* @param params - Parameters for request
|
|
571
821
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -580,6 +830,65 @@ export declare namespace merchantapi_issueresolution_v1beta {
|
|
|
580
830
|
renderaccountissues(callback: BodyResponseCallback<Schema$RenderAccountIssuesResponse>): void;
|
|
581
831
|
/**
|
|
582
832
|
* Provide a list of issues for business's product with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
|
|
833
|
+
* @example
|
|
834
|
+
* ```js
|
|
835
|
+
* // Before running the sample:
|
|
836
|
+
* // - Enable the API at:
|
|
837
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
838
|
+
* // - Login into gcloud by running:
|
|
839
|
+
* // ```sh
|
|
840
|
+
* // $ gcloud auth application-default login
|
|
841
|
+
* // ```
|
|
842
|
+
* // - Install the npm module by running:
|
|
843
|
+
* // ```sh
|
|
844
|
+
* // $ npm install googleapis
|
|
845
|
+
* // ```
|
|
846
|
+
*
|
|
847
|
+
* const {google} = require('googleapis');
|
|
848
|
+
* const merchantapi = google.merchantapi('issueresolution_v1beta');
|
|
849
|
+
*
|
|
850
|
+
* async function main() {
|
|
851
|
+
* const auth = new google.auth.GoogleAuth({
|
|
852
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
853
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
854
|
+
* });
|
|
855
|
+
*
|
|
856
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
857
|
+
* const authClient = await auth.getClient();
|
|
858
|
+
* google.options({auth: authClient});
|
|
859
|
+
*
|
|
860
|
+
* // Do the magic
|
|
861
|
+
* const res = await merchantapi.issueresolution.renderproductissues({
|
|
862
|
+
* // Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code used to localize an issue resolution content. If not set, the result will be in default language `en-US`.
|
|
863
|
+
* languageCode: 'placeholder-value',
|
|
864
|
+
* // Required. The name of the product to fetch issues for. Format: `accounts/{account\}/products/{product\}`
|
|
865
|
+
* name: 'accounts/my-account/products/my-product',
|
|
866
|
+
* // Optional. The [IANA](https://www.iana.org/time-zones) timezone used to localize times in an issue resolution content. For example 'America/Los_Angeles'. If not set, results will use as a default UTC.
|
|
867
|
+
* timeZone: 'placeholder-value',
|
|
868
|
+
*
|
|
869
|
+
* // Request body metadata
|
|
870
|
+
* requestBody: {
|
|
871
|
+
* // request body parameters
|
|
872
|
+
* // {
|
|
873
|
+
* // "contentOption": "my_contentOption",
|
|
874
|
+
* // "userInputActionOption": "my_userInputActionOption"
|
|
875
|
+
* // }
|
|
876
|
+
* },
|
|
877
|
+
* });
|
|
878
|
+
* console.log(res.data);
|
|
879
|
+
*
|
|
880
|
+
* // Example response
|
|
881
|
+
* // {
|
|
882
|
+
* // "renderedIssues": []
|
|
883
|
+
* // }
|
|
884
|
+
* }
|
|
885
|
+
*
|
|
886
|
+
* main().catch(e => {
|
|
887
|
+
* console.error(e);
|
|
888
|
+
* throw e;
|
|
889
|
+
* });
|
|
890
|
+
*
|
|
891
|
+
* ```
|
|
583
892
|
*
|
|
584
893
|
* @param params - Parameters for request
|
|
585
894
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -594,6 +903,63 @@ export declare namespace merchantapi_issueresolution_v1beta {
|
|
|
594
903
|
renderproductissues(callback: BodyResponseCallback<Schema$RenderProductIssuesResponse>): void;
|
|
595
904
|
/**
|
|
596
905
|
* Start an action. The action can be requested by a business in third-party application. Before the business can request the action, the third-party application needs to show them action specific content and display a user input form. The action can be successfully started only once all `required` inputs are provided. If any `required` input is missing, or invalid value was provided, the service will return 400 error. Validation errors will contain Ids for all problematic field together with translated, human readable error messages that can be shown to the user.
|
|
906
|
+
* @example
|
|
907
|
+
* ```js
|
|
908
|
+
* // Before running the sample:
|
|
909
|
+
* // - Enable the API at:
|
|
910
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
911
|
+
* // - Login into gcloud by running:
|
|
912
|
+
* // ```sh
|
|
913
|
+
* // $ gcloud auth application-default login
|
|
914
|
+
* // ```
|
|
915
|
+
* // - Install the npm module by running:
|
|
916
|
+
* // ```sh
|
|
917
|
+
* // $ npm install googleapis
|
|
918
|
+
* // ```
|
|
919
|
+
*
|
|
920
|
+
* const {google} = require('googleapis');
|
|
921
|
+
* const merchantapi = google.merchantapi('issueresolution_v1beta');
|
|
922
|
+
*
|
|
923
|
+
* async function main() {
|
|
924
|
+
* const auth = new google.auth.GoogleAuth({
|
|
925
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
926
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
927
|
+
* });
|
|
928
|
+
*
|
|
929
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
930
|
+
* const authClient = await auth.getClient();
|
|
931
|
+
* google.options({auth: authClient});
|
|
932
|
+
*
|
|
933
|
+
* // Do the magic
|
|
934
|
+
* const res = await merchantapi.issueresolution.triggeraction({
|
|
935
|
+
* // Optional. Language code [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47) used to localize the response. If not set, the result will be in default language `en-US`.
|
|
936
|
+
* languageCode: 'placeholder-value',
|
|
937
|
+
* // Required. The business's account that is triggering the action. Format: `accounts/{account\}`
|
|
938
|
+
* name: 'accounts/my-account',
|
|
939
|
+
*
|
|
940
|
+
* // Request body metadata
|
|
941
|
+
* requestBody: {
|
|
942
|
+
* // request body parameters
|
|
943
|
+
* // {
|
|
944
|
+
* // "actionContext": "my_actionContext",
|
|
945
|
+
* // "actionInput": {}
|
|
946
|
+
* // }
|
|
947
|
+
* },
|
|
948
|
+
* });
|
|
949
|
+
* console.log(res.data);
|
|
950
|
+
*
|
|
951
|
+
* // Example response
|
|
952
|
+
* // {
|
|
953
|
+
* // "message": "my_message"
|
|
954
|
+
* // }
|
|
955
|
+
* }
|
|
956
|
+
*
|
|
957
|
+
* main().catch(e => {
|
|
958
|
+
* console.error(e);
|
|
959
|
+
* throw e;
|
|
960
|
+
* });
|
|
961
|
+
*
|
|
962
|
+
* ```
|
|
597
963
|
*
|
|
598
964
|
* @param params - Parameters for request
|
|
599
965
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -38,10 +38,58 @@ var merchantapi_issueresolution_v1beta;
|
|
|
38
38
|
_options: options || {},
|
|
39
39
|
google,
|
|
40
40
|
};
|
|
41
|
+
this.accounts = new Resource$Accounts(this.context);
|
|
41
42
|
this.issueresolution = new Resource$Issueresolution(this.context);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
merchantapi_issueresolution_v1beta.Merchantapi = Merchantapi;
|
|
46
|
+
class Resource$Accounts {
|
|
47
|
+
constructor(context) {
|
|
48
|
+
this.context = context;
|
|
49
|
+
this.aggregateProductStatuses =
|
|
50
|
+
new Resource$Accounts$Aggregateproductstatuses(this.context);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
merchantapi_issueresolution_v1beta.Resource$Accounts = Resource$Accounts;
|
|
54
|
+
class Resource$Accounts$Aggregateproductstatuses {
|
|
55
|
+
constructor(context) {
|
|
56
|
+
this.context = context;
|
|
57
|
+
}
|
|
58
|
+
list(paramsOrCallback, optionsOrCallback, callback) {
|
|
59
|
+
let params = (paramsOrCallback ||
|
|
60
|
+
{});
|
|
61
|
+
let options = (optionsOrCallback || {});
|
|
62
|
+
if (typeof paramsOrCallback === 'function') {
|
|
63
|
+
callback = paramsOrCallback;
|
|
64
|
+
params = {};
|
|
65
|
+
options = {};
|
|
66
|
+
}
|
|
67
|
+
if (typeof optionsOrCallback === 'function') {
|
|
68
|
+
callback = optionsOrCallback;
|
|
69
|
+
options = {};
|
|
70
|
+
}
|
|
71
|
+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
72
|
+
const parameters = {
|
|
73
|
+
options: Object.assign({
|
|
74
|
+
url: (rootUrl +
|
|
75
|
+
'/issueresolution/v1beta/{+parent}/aggregateProductStatuses').replace(/([^:]\/)\/+/g, '$1'),
|
|
76
|
+
method: 'GET',
|
|
77
|
+
apiVersion: '',
|
|
78
|
+
}, options),
|
|
79
|
+
params,
|
|
80
|
+
requiredParams: ['parent'],
|
|
81
|
+
pathParams: ['parent'],
|
|
82
|
+
context: this.context,
|
|
83
|
+
};
|
|
84
|
+
if (callback) {
|
|
85
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
merchantapi_issueresolution_v1beta.Resource$Accounts$Aggregateproductstatuses = Resource$Accounts$Aggregateproductstatuses;
|
|
45
93
|
class Resource$Issueresolution {
|
|
46
94
|
constructor(context) {
|
|
47
95
|
this.context = context;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issueresolution_v1beta.js","sourceRoot":"","sources":["../issueresolution_v1beta.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,kCAAkC,
|
|
1
|
+
{"version":3,"file":"issueresolution_v1beta.js","sourceRoot":"","sources":["../issueresolution_v1beta.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AAC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