@googleapis/merchantapi 6.0.1 → 9.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 +43 -0
- package/README.md +9 -0
- package/accounts_v1beta.ts +6894 -534
- package/build/accounts_v1beta.d.ts +4933 -137
- package/build/accounts_v1beta.js +679 -26
- 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 +412 -6
- 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 +352 -45
- 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 +434 -2
- package/build/reviews_v1beta.js.map +1 -1
- package/conversions_v1beta.ts +336 -1
- package/datasources_v1beta.ts +412 -6
- 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 +352 -45
- package/promotions_v1beta.ts +171 -4
- package/quota_v1beta.ts +52 -1
- package/reports_v1beta.ts +58 -1
- package/reviews_v1beta.ts +434 -2
|
@@ -112,6 +112,7 @@ export namespace merchantapi_issueresolution_v1beta {
|
|
|
112
112
|
*/
|
|
113
113
|
export class Merchantapi {
|
|
114
114
|
context: APIRequestContext;
|
|
115
|
+
accounts: Resource$Accounts;
|
|
115
116
|
issueresolution: Resource$Issueresolution;
|
|
116
117
|
|
|
117
118
|
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
|
|
@@ -120,6 +121,7 @@ export namespace merchantapi_issueresolution_v1beta {
|
|
|
120
121
|
google,
|
|
121
122
|
};
|
|
122
123
|
|
|
124
|
+
this.accounts = new Resource$Accounts(this.context);
|
|
123
125
|
this.issueresolution = new Resource$Issueresolution(this.context);
|
|
124
126
|
}
|
|
125
127
|
}
|
|
@@ -212,6 +214,31 @@ export namespace merchantapi_issueresolution_v1beta {
|
|
|
212
214
|
*/
|
|
213
215
|
title?: string | null;
|
|
214
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* Aggregate product statuses for a given reporting context and country.
|
|
219
|
+
*/
|
|
220
|
+
export interface Schema$AggregateProductStatus {
|
|
221
|
+
/**
|
|
222
|
+
* 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).
|
|
223
|
+
*/
|
|
224
|
+
country?: string | null;
|
|
225
|
+
/**
|
|
226
|
+
* The product issues that affect the given reporting context and country.
|
|
227
|
+
*/
|
|
228
|
+
itemLevelIssues?: Schema$ItemLevelIssue[];
|
|
229
|
+
/**
|
|
230
|
+
* Identifier. The name of the `AggregateProductStatuses` resource. Format: `accounts/{account\}/aggregateProductStatuses/{aggregateProductStatuses\}`
|
|
231
|
+
*/
|
|
232
|
+
name?: string | null;
|
|
233
|
+
/**
|
|
234
|
+
* The reporting context of the aggregate product statuses.
|
|
235
|
+
*/
|
|
236
|
+
reportingContext?: string | null;
|
|
237
|
+
/**
|
|
238
|
+
* Products statistics for the given reporting context and country.
|
|
239
|
+
*/
|
|
240
|
+
stats?: Schema$Stats;
|
|
241
|
+
}
|
|
215
242
|
/**
|
|
216
243
|
* A detailed impact breakdown for a group of regions where the impact of the issue on different shopping destinations is the same.
|
|
217
244
|
*/
|
|
@@ -396,6 +423,56 @@ export namespace merchantapi_issueresolution_v1beta {
|
|
|
396
423
|
*/
|
|
397
424
|
textInputValue?: Schema$TextInputValue;
|
|
398
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
* The ItemLevelIssue of the product status.
|
|
428
|
+
*/
|
|
429
|
+
export interface Schema$ItemLevelIssue {
|
|
430
|
+
/**
|
|
431
|
+
* The attribute's name, if the issue is caused by a single attribute.
|
|
432
|
+
*/
|
|
433
|
+
attribute?: string | null;
|
|
434
|
+
/**
|
|
435
|
+
* The error code of the issue.
|
|
436
|
+
*/
|
|
437
|
+
code?: string | null;
|
|
438
|
+
/**
|
|
439
|
+
* A short issue description in English.
|
|
440
|
+
*/
|
|
441
|
+
description?: string | null;
|
|
442
|
+
/**
|
|
443
|
+
* A detailed issue description in English.
|
|
444
|
+
*/
|
|
445
|
+
detail?: string | null;
|
|
446
|
+
/**
|
|
447
|
+
* The URL of a web page to help with resolving this issue.
|
|
448
|
+
*/
|
|
449
|
+
documentationUri?: string | null;
|
|
450
|
+
/**
|
|
451
|
+
* The number of products affected by this issue.
|
|
452
|
+
*/
|
|
453
|
+
productCount?: string | null;
|
|
454
|
+
/**
|
|
455
|
+
* Whether the issue can be resolved by the merchant.
|
|
456
|
+
*/
|
|
457
|
+
resolution?: string | null;
|
|
458
|
+
/**
|
|
459
|
+
* How this issue affects serving of the offer.
|
|
460
|
+
*/
|
|
461
|
+
severity?: string | null;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Response message for the `ListAggregateProductStatuses` method.
|
|
465
|
+
*/
|
|
466
|
+
export interface Schema$ListAggregateProductStatusesResponse {
|
|
467
|
+
/**
|
|
468
|
+
* The `AggregateProductStatuses` resources for the given account.
|
|
469
|
+
*/
|
|
470
|
+
aggregateProductStatuses?: Schema$AggregateProductStatus[];
|
|
471
|
+
/**
|
|
472
|
+
* A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted, there are no subsequent pages.
|
|
473
|
+
*/
|
|
474
|
+
nextPageToken?: string | null;
|
|
475
|
+
}
|
|
399
476
|
/**
|
|
400
477
|
* The change that happened to the product including old value, new value, country code as the region code and reporting context.
|
|
401
478
|
*/
|
|
@@ -438,7 +515,7 @@ export namespace merchantapi_issueresolution_v1beta {
|
|
|
438
515
|
*/
|
|
439
516
|
eventTime?: string | null;
|
|
440
517
|
/**
|
|
441
|
-
* Optional. The product expiration time. This field will not
|
|
518
|
+
* Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.
|
|
442
519
|
*/
|
|
443
520
|
expirationTime?: string | null;
|
|
444
521
|
/**
|
|
@@ -544,6 +621,27 @@ export namespace merchantapi_issueresolution_v1beta {
|
|
|
544
621
|
*/
|
|
545
622
|
renderedIssues?: Schema$RenderedIssue[];
|
|
546
623
|
}
|
|
624
|
+
/**
|
|
625
|
+
* Products statistics.
|
|
626
|
+
*/
|
|
627
|
+
export interface Schema$Stats {
|
|
628
|
+
/**
|
|
629
|
+
* The number of products that are active.
|
|
630
|
+
*/
|
|
631
|
+
activeCount?: string | null;
|
|
632
|
+
/**
|
|
633
|
+
* The number of products that are disapproved.
|
|
634
|
+
*/
|
|
635
|
+
disapprovedCount?: string | null;
|
|
636
|
+
/**
|
|
637
|
+
* The number of products that are expiring.
|
|
638
|
+
*/
|
|
639
|
+
expiringCount?: string | null;
|
|
640
|
+
/**
|
|
641
|
+
* The number of products that are pending.
|
|
642
|
+
*/
|
|
643
|
+
pendingCount?: string | null;
|
|
644
|
+
}
|
|
547
645
|
/**
|
|
548
646
|
* Text input allows the business to provide a text value.
|
|
549
647
|
*/
|
|
@@ -614,6 +712,197 @@ export namespace merchantapi_issueresolution_v1beta {
|
|
|
614
712
|
message?: string | null;
|
|
615
713
|
}
|
|
616
714
|
|
|
715
|
+
export class Resource$Accounts {
|
|
716
|
+
context: APIRequestContext;
|
|
717
|
+
aggregateProductStatuses: Resource$Accounts$Aggregateproductstatuses;
|
|
718
|
+
constructor(context: APIRequestContext) {
|
|
719
|
+
this.context = context;
|
|
720
|
+
this.aggregateProductStatuses =
|
|
721
|
+
new Resource$Accounts$Aggregateproductstatuses(this.context);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
export class Resource$Accounts$Aggregateproductstatuses {
|
|
726
|
+
context: APIRequestContext;
|
|
727
|
+
constructor(context: APIRequestContext) {
|
|
728
|
+
this.context = context;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* 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.
|
|
733
|
+
* @example
|
|
734
|
+
* ```js
|
|
735
|
+
* // Before running the sample:
|
|
736
|
+
* // - Enable the API at:
|
|
737
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
738
|
+
* // - Login into gcloud by running:
|
|
739
|
+
* // ```sh
|
|
740
|
+
* // $ gcloud auth application-default login
|
|
741
|
+
* // ```
|
|
742
|
+
* // - Install the npm module by running:
|
|
743
|
+
* // ```sh
|
|
744
|
+
* // $ npm install googleapis
|
|
745
|
+
* // ```
|
|
746
|
+
*
|
|
747
|
+
* const {google} = require('googleapis');
|
|
748
|
+
* const merchantapi = google.merchantapi('issueresolution_v1beta');
|
|
749
|
+
*
|
|
750
|
+
* async function main() {
|
|
751
|
+
* const auth = new google.auth.GoogleAuth({
|
|
752
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
753
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
754
|
+
* });
|
|
755
|
+
*
|
|
756
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
757
|
+
* const authClient = await auth.getClient();
|
|
758
|
+
* google.options({auth: authClient});
|
|
759
|
+
*
|
|
760
|
+
* // Do the magic
|
|
761
|
+
* const res = await merchantapi.accounts.aggregateProductStatuses.list({
|
|
762
|
+
* // 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"`.
|
|
763
|
+
* filter: 'placeholder-value',
|
|
764
|
+
* // 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.
|
|
765
|
+
* pageSize: 'placeholder-value',
|
|
766
|
+
* // 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.
|
|
767
|
+
* pageToken: 'placeholder-value',
|
|
768
|
+
* // Required. The account to list aggregate product statuses for. Format: `accounts/{account\}`
|
|
769
|
+
* parent: 'accounts/my-account',
|
|
770
|
+
* });
|
|
771
|
+
* console.log(res.data);
|
|
772
|
+
*
|
|
773
|
+
* // Example response
|
|
774
|
+
* // {
|
|
775
|
+
* // "aggregateProductStatuses": [],
|
|
776
|
+
* // "nextPageToken": "my_nextPageToken"
|
|
777
|
+
* // }
|
|
778
|
+
* }
|
|
779
|
+
*
|
|
780
|
+
* main().catch(e => {
|
|
781
|
+
* console.error(e);
|
|
782
|
+
* throw e;
|
|
783
|
+
* });
|
|
784
|
+
*
|
|
785
|
+
* ```
|
|
786
|
+
*
|
|
787
|
+
* @param params - Parameters for request
|
|
788
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
789
|
+
* @param callback - Optional callback that handles the response.
|
|
790
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
791
|
+
*/
|
|
792
|
+
list(
|
|
793
|
+
params: Params$Resource$Accounts$Aggregateproductstatuses$List,
|
|
794
|
+
options: StreamMethodOptions
|
|
795
|
+
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
796
|
+
list(
|
|
797
|
+
params?: Params$Resource$Accounts$Aggregateproductstatuses$List,
|
|
798
|
+
options?: MethodOptions
|
|
799
|
+
): Promise<
|
|
800
|
+
GaxiosResponseWithHTTP2<Schema$ListAggregateProductStatusesResponse>
|
|
801
|
+
>;
|
|
802
|
+
list(
|
|
803
|
+
params: Params$Resource$Accounts$Aggregateproductstatuses$List,
|
|
804
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
805
|
+
callback: BodyResponseCallback<Readable>
|
|
806
|
+
): void;
|
|
807
|
+
list(
|
|
808
|
+
params: Params$Resource$Accounts$Aggregateproductstatuses$List,
|
|
809
|
+
options:
|
|
810
|
+
| MethodOptions
|
|
811
|
+
| BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>,
|
|
812
|
+
callback: BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>
|
|
813
|
+
): void;
|
|
814
|
+
list(
|
|
815
|
+
params: Params$Resource$Accounts$Aggregateproductstatuses$List,
|
|
816
|
+
callback: BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>
|
|
817
|
+
): void;
|
|
818
|
+
list(
|
|
819
|
+
callback: BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>
|
|
820
|
+
): void;
|
|
821
|
+
list(
|
|
822
|
+
paramsOrCallback?:
|
|
823
|
+
| Params$Resource$Accounts$Aggregateproductstatuses$List
|
|
824
|
+
| BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>
|
|
825
|
+
| BodyResponseCallback<Readable>,
|
|
826
|
+
optionsOrCallback?:
|
|
827
|
+
| MethodOptions
|
|
828
|
+
| StreamMethodOptions
|
|
829
|
+
| BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>
|
|
830
|
+
| BodyResponseCallback<Readable>,
|
|
831
|
+
callback?:
|
|
832
|
+
| BodyResponseCallback<Schema$ListAggregateProductStatusesResponse>
|
|
833
|
+
| BodyResponseCallback<Readable>
|
|
834
|
+
):
|
|
835
|
+
| void
|
|
836
|
+
| Promise<
|
|
837
|
+
GaxiosResponseWithHTTP2<Schema$ListAggregateProductStatusesResponse>
|
|
838
|
+
>
|
|
839
|
+
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
840
|
+
let params = (paramsOrCallback ||
|
|
841
|
+
{}) as Params$Resource$Accounts$Aggregateproductstatuses$List;
|
|
842
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
843
|
+
|
|
844
|
+
if (typeof paramsOrCallback === 'function') {
|
|
845
|
+
callback = paramsOrCallback;
|
|
846
|
+
params = {} as Params$Resource$Accounts$Aggregateproductstatuses$List;
|
|
847
|
+
options = {};
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
if (typeof optionsOrCallback === 'function') {
|
|
851
|
+
callback = optionsOrCallback;
|
|
852
|
+
options = {};
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
856
|
+
const parameters = {
|
|
857
|
+
options: Object.assign(
|
|
858
|
+
{
|
|
859
|
+
url: (
|
|
860
|
+
rootUrl +
|
|
861
|
+
'/issueresolution/v1beta/{+parent}/aggregateProductStatuses'
|
|
862
|
+
).replace(/([^:]\/)\/+/g, '$1'),
|
|
863
|
+
method: 'GET',
|
|
864
|
+
apiVersion: '',
|
|
865
|
+
},
|
|
866
|
+
options
|
|
867
|
+
),
|
|
868
|
+
params,
|
|
869
|
+
requiredParams: ['parent'],
|
|
870
|
+
pathParams: ['parent'],
|
|
871
|
+
context: this.context,
|
|
872
|
+
};
|
|
873
|
+
if (callback) {
|
|
874
|
+
createAPIRequest<Schema$ListAggregateProductStatusesResponse>(
|
|
875
|
+
parameters,
|
|
876
|
+
callback as BodyResponseCallback<unknown>
|
|
877
|
+
);
|
|
878
|
+
} else {
|
|
879
|
+
return createAPIRequest<Schema$ListAggregateProductStatusesResponse>(
|
|
880
|
+
parameters
|
|
881
|
+
);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export interface Params$Resource$Accounts$Aggregateproductstatuses$List
|
|
887
|
+
extends StandardParameters {
|
|
888
|
+
/**
|
|
889
|
+
* 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"`.
|
|
890
|
+
*/
|
|
891
|
+
filter?: string;
|
|
892
|
+
/**
|
|
893
|
+
* 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.
|
|
894
|
+
*/
|
|
895
|
+
pageSize?: number;
|
|
896
|
+
/**
|
|
897
|
+
* 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.
|
|
898
|
+
*/
|
|
899
|
+
pageToken?: string;
|
|
900
|
+
/**
|
|
901
|
+
* Required. The account to list aggregate product statuses for. Format: `accounts/{account\}`
|
|
902
|
+
*/
|
|
903
|
+
parent?: string;
|
|
904
|
+
}
|
|
905
|
+
|
|
617
906
|
export class Resource$Issueresolution {
|
|
618
907
|
context: APIRequestContext;
|
|
619
908
|
constructor(context: APIRequestContext) {
|
|
@@ -622,6 +911,65 @@ export namespace merchantapi_issueresolution_v1beta {
|
|
|
622
911
|
|
|
623
912
|
/**
|
|
624
913
|
* 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.
|
|
914
|
+
* @example
|
|
915
|
+
* ```js
|
|
916
|
+
* // Before running the sample:
|
|
917
|
+
* // - Enable the API at:
|
|
918
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
919
|
+
* // - Login into gcloud by running:
|
|
920
|
+
* // ```sh
|
|
921
|
+
* // $ gcloud auth application-default login
|
|
922
|
+
* // ```
|
|
923
|
+
* // - Install the npm module by running:
|
|
924
|
+
* // ```sh
|
|
925
|
+
* // $ npm install googleapis
|
|
926
|
+
* // ```
|
|
927
|
+
*
|
|
928
|
+
* const {google} = require('googleapis');
|
|
929
|
+
* const merchantapi = google.merchantapi('issueresolution_v1beta');
|
|
930
|
+
*
|
|
931
|
+
* async function main() {
|
|
932
|
+
* const auth = new google.auth.GoogleAuth({
|
|
933
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
934
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
935
|
+
* });
|
|
936
|
+
*
|
|
937
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
938
|
+
* const authClient = await auth.getClient();
|
|
939
|
+
* google.options({auth: authClient});
|
|
940
|
+
*
|
|
941
|
+
* // Do the magic
|
|
942
|
+
* const res = await merchantapi.issueresolution.renderaccountissues({
|
|
943
|
+
* // 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`.
|
|
944
|
+
* languageCode: 'placeholder-value',
|
|
945
|
+
* // Required. The account to fetch issues for. Format: `accounts/{account\}`
|
|
946
|
+
* name: 'accounts/my-account',
|
|
947
|
+
* // 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.
|
|
948
|
+
* timeZone: 'placeholder-value',
|
|
949
|
+
*
|
|
950
|
+
* // Request body metadata
|
|
951
|
+
* requestBody: {
|
|
952
|
+
* // request body parameters
|
|
953
|
+
* // {
|
|
954
|
+
* // "contentOption": "my_contentOption",
|
|
955
|
+
* // "userInputActionOption": "my_userInputActionOption"
|
|
956
|
+
* // }
|
|
957
|
+
* },
|
|
958
|
+
* });
|
|
959
|
+
* console.log(res.data);
|
|
960
|
+
*
|
|
961
|
+
* // Example response
|
|
962
|
+
* // {
|
|
963
|
+
* // "renderedIssues": []
|
|
964
|
+
* // }
|
|
965
|
+
* }
|
|
966
|
+
*
|
|
967
|
+
* main().catch(e => {
|
|
968
|
+
* console.error(e);
|
|
969
|
+
* throw e;
|
|
970
|
+
* });
|
|
971
|
+
*
|
|
972
|
+
* ```
|
|
625
973
|
*
|
|
626
974
|
* @param params - Parameters for request
|
|
627
975
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -716,6 +1064,65 @@ export namespace merchantapi_issueresolution_v1beta {
|
|
|
716
1064
|
|
|
717
1065
|
/**
|
|
718
1066
|
* 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.
|
|
1067
|
+
* @example
|
|
1068
|
+
* ```js
|
|
1069
|
+
* // Before running the sample:
|
|
1070
|
+
* // - Enable the API at:
|
|
1071
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1072
|
+
* // - Login into gcloud by running:
|
|
1073
|
+
* // ```sh
|
|
1074
|
+
* // $ gcloud auth application-default login
|
|
1075
|
+
* // ```
|
|
1076
|
+
* // - Install the npm module by running:
|
|
1077
|
+
* // ```sh
|
|
1078
|
+
* // $ npm install googleapis
|
|
1079
|
+
* // ```
|
|
1080
|
+
*
|
|
1081
|
+
* const {google} = require('googleapis');
|
|
1082
|
+
* const merchantapi = google.merchantapi('issueresolution_v1beta');
|
|
1083
|
+
*
|
|
1084
|
+
* async function main() {
|
|
1085
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1086
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1087
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1088
|
+
* });
|
|
1089
|
+
*
|
|
1090
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1091
|
+
* const authClient = await auth.getClient();
|
|
1092
|
+
* google.options({auth: authClient});
|
|
1093
|
+
*
|
|
1094
|
+
* // Do the magic
|
|
1095
|
+
* const res = await merchantapi.issueresolution.renderproductissues({
|
|
1096
|
+
* // 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`.
|
|
1097
|
+
* languageCode: 'placeholder-value',
|
|
1098
|
+
* // Required. The name of the product to fetch issues for. Format: `accounts/{account\}/products/{product\}`
|
|
1099
|
+
* name: 'accounts/my-account/products/my-product',
|
|
1100
|
+
* // 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.
|
|
1101
|
+
* timeZone: 'placeholder-value',
|
|
1102
|
+
*
|
|
1103
|
+
* // Request body metadata
|
|
1104
|
+
* requestBody: {
|
|
1105
|
+
* // request body parameters
|
|
1106
|
+
* // {
|
|
1107
|
+
* // "contentOption": "my_contentOption",
|
|
1108
|
+
* // "userInputActionOption": "my_userInputActionOption"
|
|
1109
|
+
* // }
|
|
1110
|
+
* },
|
|
1111
|
+
* });
|
|
1112
|
+
* console.log(res.data);
|
|
1113
|
+
*
|
|
1114
|
+
* // Example response
|
|
1115
|
+
* // {
|
|
1116
|
+
* // "renderedIssues": []
|
|
1117
|
+
* // }
|
|
1118
|
+
* }
|
|
1119
|
+
*
|
|
1120
|
+
* main().catch(e => {
|
|
1121
|
+
* console.error(e);
|
|
1122
|
+
* throw e;
|
|
1123
|
+
* });
|
|
1124
|
+
*
|
|
1125
|
+
* ```
|
|
719
1126
|
*
|
|
720
1127
|
* @param params - Parameters for request
|
|
721
1128
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -810,6 +1217,63 @@ export namespace merchantapi_issueresolution_v1beta {
|
|
|
810
1217
|
|
|
811
1218
|
/**
|
|
812
1219
|
* 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.
|
|
1220
|
+
* @example
|
|
1221
|
+
* ```js
|
|
1222
|
+
* // Before running the sample:
|
|
1223
|
+
* // - Enable the API at:
|
|
1224
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
1225
|
+
* // - Login into gcloud by running:
|
|
1226
|
+
* // ```sh
|
|
1227
|
+
* // $ gcloud auth application-default login
|
|
1228
|
+
* // ```
|
|
1229
|
+
* // - Install the npm module by running:
|
|
1230
|
+
* // ```sh
|
|
1231
|
+
* // $ npm install googleapis
|
|
1232
|
+
* // ```
|
|
1233
|
+
*
|
|
1234
|
+
* const {google} = require('googleapis');
|
|
1235
|
+
* const merchantapi = google.merchantapi('issueresolution_v1beta');
|
|
1236
|
+
*
|
|
1237
|
+
* async function main() {
|
|
1238
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1239
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1240
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
1241
|
+
* });
|
|
1242
|
+
*
|
|
1243
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1244
|
+
* const authClient = await auth.getClient();
|
|
1245
|
+
* google.options({auth: authClient});
|
|
1246
|
+
*
|
|
1247
|
+
* // Do the magic
|
|
1248
|
+
* const res = await merchantapi.issueresolution.triggeraction({
|
|
1249
|
+
* // 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`.
|
|
1250
|
+
* languageCode: 'placeholder-value',
|
|
1251
|
+
* // Required. The business's account that is triggering the action. Format: `accounts/{account\}`
|
|
1252
|
+
* name: 'accounts/my-account',
|
|
1253
|
+
*
|
|
1254
|
+
* // Request body metadata
|
|
1255
|
+
* requestBody: {
|
|
1256
|
+
* // request body parameters
|
|
1257
|
+
* // {
|
|
1258
|
+
* // "actionContext": "my_actionContext",
|
|
1259
|
+
* // "actionInput": {}
|
|
1260
|
+
* // }
|
|
1261
|
+
* },
|
|
1262
|
+
* });
|
|
1263
|
+
* console.log(res.data);
|
|
1264
|
+
*
|
|
1265
|
+
* // Example response
|
|
1266
|
+
* // {
|
|
1267
|
+
* // "message": "my_message"
|
|
1268
|
+
* // }
|
|
1269
|
+
* }
|
|
1270
|
+
*
|
|
1271
|
+
* main().catch(e => {
|
|
1272
|
+
* console.error(e);
|
|
1273
|
+
* throw e;
|
|
1274
|
+
* });
|
|
1275
|
+
*
|
|
1276
|
+
* ```
|
|
813
1277
|
*
|
|
814
1278
|
* @param params - Parameters for request
|
|
815
1279
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|