@googleapis/merchantapi 17.3.0 → 18.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 +19 -0
- package/accounts_v1.ts +181 -13
- package/accounts_v1beta.ts +180 -13
- package/build/accounts_v1.d.ts +103 -13
- package/build/accounts_v1.js +32 -0
- package/build/accounts_v1.js.map +1 -1
- package/build/accounts_v1beta.d.ts +103 -13
- package/build/accounts_v1beta.js +32 -0
- package/build/accounts_v1beta.js.map +1 -1
- package/build/datasources_v1.d.ts +4 -4
- package/build/datasources_v1beta.d.ts +4 -4
- package/build/inventories_v1.d.ts +26 -14
- package/build/inventories_v1.js.map +1 -1
- package/build/inventories_v1beta.d.ts +26 -14
- package/build/inventories_v1beta.js.map +1 -1
- package/build/issueresolution_v1.d.ts +3 -3
- package/build/issueresolution_v1beta.d.ts +3 -3
- package/build/products_v1.d.ts +319 -11
- package/build/products_v1.js.map +1 -1
- package/build/products_v1beta.d.ts +45 -11
- package/build/products_v1beta.js.map +1 -1
- package/build/promotions_v1.d.ts +66 -22
- package/build/promotions_v1.js.map +1 -1
- package/build/promotions_v1beta.d.ts +66 -22
- package/build/promotions_v1beta.js.map +1 -1
- package/build/reports_v1.d.ts +39 -6
- package/build/reports_v1.js.map +1 -1
- package/build/reports_v1beta.d.ts +39 -6
- package/build/reports_v1beta.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/datasources_v1.ts +4 -4
- package/datasources_v1beta.ts +4 -4
- package/inventories_v1.ts +26 -14
- package/inventories_v1beta.ts +26 -14
- package/issueresolution_v1.ts +3 -3
- package/issueresolution_v1beta.ts +3 -3
- package/package.json +1 -1
- package/products_v1.ts +319 -11
- package/products_v1beta.ts +45 -11
- package/promotions_v1.ts +66 -22
- package/promotions_v1beta.ts +66 -22
- package/reports_v1.ts +39 -6
- package/reports_v1beta.ts +39 -6
package/build/accounts_v1.d.ts
CHANGED
|
@@ -111,7 +111,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
111
111
|
termsOfServiceAgreementState?: Schema$TermsOfServiceAgreementState;
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
* The `Account` message represents a business's account within
|
|
114
|
+
* The `Account` message represents a business's account within Merchant Center. It's the primary entity for managing product data, settings, and interactions with Google's services and external providers. Accounts can operate as standalone entities or be part of a advanced account structure. In an advanced account setup the parent account manages multiple sub-accounts. Establishing an account involves configuring attributes like the account name, time zone, and language preferences. The `Account` message is the parent entity for many other resources, for example, `AccountRelationship`, `Homepage`, `BusinessInfo` and so on.
|
|
115
115
|
*/
|
|
116
116
|
export interface Schema$Account {
|
|
117
117
|
/**
|
|
@@ -119,7 +119,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
119
119
|
*/
|
|
120
120
|
accountId?: string | null;
|
|
121
121
|
/**
|
|
122
|
-
* Required. A human-readable name of the account.
|
|
122
|
+
* Required. A human-readable name of the account. Don't use punctuation, capitalization, or non-alphanumeric symbols such as the "/" or "_" symbols. See [Adding a business name](https://support.google.com/merchants/answer/12159159) for more information.
|
|
123
123
|
*/
|
|
124
124
|
accountName?: string | null;
|
|
125
125
|
/**
|
|
@@ -588,7 +588,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
588
588
|
*/
|
|
589
589
|
effectiveUriSettings?: Schema$UriSettings;
|
|
590
590
|
/**
|
|
591
|
-
* Optional. The destinations (also known as [Marketing methods](https://support.google.com/merchants/answer/15130232)) to which the checkout program applies
|
|
591
|
+
* Optional. Required for the create operation. The destinations (also known as [Marketing methods](https://support.google.com/merchants/answer/15130232)) to which the checkout program applies. Valid destination values are `SHOPPING_ADS` and `FREE_LISTINGS`.
|
|
592
592
|
*/
|
|
593
593
|
eligibleDestinations?: string[] | null;
|
|
594
594
|
/**
|
|
@@ -631,7 +631,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
631
631
|
*/
|
|
632
632
|
account?: Schema$Account;
|
|
633
633
|
/**
|
|
634
|
-
* Required. An account service between the account to be created and the provider account is initialized as part of the creation. At least one such service needs to be provided. Currently exactly one of these needs to be `account_aggregation` and `accounts.createAndConfigure` method can be used to create a sub-account under an existing advanced account through this method. Additional `account_management` or `
|
|
634
|
+
* Required. An account service between the account to be created and the provider account is initialized as part of the creation. At least one such service needs to be provided. Currently exactly one of these needs to be `account_aggregation` and `accounts.createAndConfigure` method can be used to create a sub-account under an existing advanced account through this method. Additional `account_management` or `products_management` services may be provided.
|
|
635
635
|
*/
|
|
636
636
|
service?: Schema$AddAccountService[];
|
|
637
637
|
/**
|
|
@@ -787,7 +787,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
787
787
|
*/
|
|
788
788
|
gcpIds?: string[] | null;
|
|
789
789
|
/**
|
|
790
|
-
* Identifier. The `name` (ID) of the developer registration. Generated
|
|
790
|
+
* Identifier. The `name` (ID) of the developer registration. Generated upon creation of a new `DeveloperRegistration`. The `account` represents the merchant ID of the merchant that owns the registration.
|
|
791
791
|
*/
|
|
792
792
|
name?: string | null;
|
|
793
793
|
}
|
|
@@ -889,7 +889,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
889
889
|
name?: string | null;
|
|
890
890
|
}
|
|
891
891
|
/**
|
|
892
|
-
* The current status of establishing of the service. (for example, pending approval
|
|
892
|
+
* The current status of establishing of the service. (for example, pending approval, approved, established).
|
|
893
893
|
*/
|
|
894
894
|
export interface Schema$Handshake {
|
|
895
895
|
/**
|
|
@@ -1644,7 +1644,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
1644
1644
|
resourceType?: string | null;
|
|
1645
1645
|
}
|
|
1646
1646
|
/**
|
|
1647
|
-
* Defines participation in a given program for the specified account. Programs provide a mechanism for adding functionality to a Merchant Center accounts. A typical example of this is the [Free product listings](https://support.google.com/merchants/answer/13889434) program, which enables products from a business's store to be shown across Google for free. The following list is the available set of program resource IDs accessible through the API: * `checkout` * `free-listings` * `shopping-ads` * `youtube-shopping-checkout`
|
|
1647
|
+
* Defines participation in a given program for the specified account. Programs provide a mechanism for adding functionality to a Merchant Center accounts. A typical example of this is the [Free product listings](https://support.google.com/merchants/answer/13889434) program, which enables products from a business's store to be shown across Google for free. The following list is the available set of program resource IDs accessible through the API: * `checkout` * `free-listings` * `product-ratings` * `shopping-ads` * `youtube-affiliate` * `youtube-shopping-checkout`
|
|
1648
1648
|
*/
|
|
1649
1649
|
export interface Schema$Program {
|
|
1650
1650
|
/**
|
|
@@ -1732,7 +1732,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
1732
1732
|
subtables?: Schema$Table[];
|
|
1733
1733
|
}
|
|
1734
1734
|
/**
|
|
1735
|
-
* Represents a geographic region that you can use as a target with both the `RegionalInventory` and `ShippingSettings` services. You can define regions as collections of either postal codes or, in some countries, using predefined geotargets. For more information, see [Set up regions ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) for more information.
|
|
1735
|
+
* Represents a geographic region that you can use as a target with both the `RegionalInventory` and `ShippingSettings` services. You can define regions as collections of either postal codes, radius areas or, in some countries, using predefined geotargets. A region must be defined by specifying exactly one of `postal_code_area`, `geotarget_area`, or `radius_area`. For more information, see [Set up regions ](https://support.google.com/merchants/answer/7410946#zippy=%2Ccreate-a-new-region) for more information.
|
|
1736
1736
|
*/
|
|
1737
1737
|
export interface Schema$Region {
|
|
1738
1738
|
/**
|
|
@@ -1769,7 +1769,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
1769
1769
|
*/
|
|
1770
1770
|
export interface Schema$RegisterGcpRequest {
|
|
1771
1771
|
/**
|
|
1772
|
-
* Immutable. If the developer email provided is associated with a user in the merchant account
|
|
1772
|
+
* Immutable. Optional field. Developer role can be also added by using `users.update` method. If the developer email provided is associated with a user in the provided merchant account, the user will be updated to have `API_DEVELOPER` `access_rights` and the email preference corresponding to that user will be updated to have the new API notifications preference. If the developer email provided is not associated with any user, it is added as a contact. The email preference corresponding to that contact will have the new API notifications preference. Make sure the email used is associated with a Google Account and is not a service account as service accounts can't receive emails.
|
|
1773
1773
|
*/
|
|
1774
1774
|
developerEmail?: string | null;
|
|
1775
1775
|
}
|
|
@@ -2387,6 +2387,86 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
2387
2387
|
createAndConfigure(params: Params$Resource$Accounts$Createandconfigure, options: MethodOptions | BodyResponseCallback<Schema$Account>, callback: BodyResponseCallback<Schema$Account>): void;
|
|
2388
2388
|
createAndConfigure(params: Params$Resource$Accounts$Createandconfigure, callback: BodyResponseCallback<Schema$Account>): void;
|
|
2389
2389
|
createAndConfigure(callback: BodyResponseCallback<Schema$Account>): void;
|
|
2390
|
+
/**
|
|
2391
|
+
* Creates a Merchant Center test account. Test accounts are intended for development and testing purposes, such as validating API integrations or new feature behavior. Key characteristics and limitations of test accounts: - Immutable Type: A test account cannot be converted into a regular (live) Merchant Center account. Likewise, a regular account cannot be converted into a test account. - Non-Serving Products: Any products, offers, or data created within a test account will not be published or made visible to end-users on any Google surfaces. They are strictly for testing environments. - Separate Environment: Test accounts operate in a sandbox-like manner, isolated from live serving and real user traffic.
|
|
2392
|
+
* @example
|
|
2393
|
+
* ```js
|
|
2394
|
+
* // Before running the sample:
|
|
2395
|
+
* // - Enable the API at:
|
|
2396
|
+
* // https://console.developers.google.com/apis/api/merchantapi.googleapis.com
|
|
2397
|
+
* // - Login into gcloud by running:
|
|
2398
|
+
* // ```sh
|
|
2399
|
+
* // $ gcloud auth application-default login
|
|
2400
|
+
* // ```
|
|
2401
|
+
* // - Install the npm module by running:
|
|
2402
|
+
* // ```sh
|
|
2403
|
+
* // $ npm install googleapis
|
|
2404
|
+
* // ```
|
|
2405
|
+
*
|
|
2406
|
+
* const {google} = require('googleapis');
|
|
2407
|
+
* const merchantapi = google.merchantapi('accounts_v1');
|
|
2408
|
+
*
|
|
2409
|
+
* async function main() {
|
|
2410
|
+
* const auth = new google.auth.GoogleAuth({
|
|
2411
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
2412
|
+
* scopes: ['https://www.googleapis.com/auth/content'],
|
|
2413
|
+
* });
|
|
2414
|
+
*
|
|
2415
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
2416
|
+
* const authClient = await auth.getClient();
|
|
2417
|
+
* google.options({auth: authClient});
|
|
2418
|
+
*
|
|
2419
|
+
* // Do the magic
|
|
2420
|
+
* const res = await merchantapi.accounts.createTestAccount({
|
|
2421
|
+
* // Required. The account resource name to create the test account under. Format: accounts/{account\}
|
|
2422
|
+
* parent: 'accounts/my-account',
|
|
2423
|
+
*
|
|
2424
|
+
* // Request body metadata
|
|
2425
|
+
* requestBody: {
|
|
2426
|
+
* // request body parameters
|
|
2427
|
+
* // {
|
|
2428
|
+
* // "accountId": "my_accountId",
|
|
2429
|
+
* // "accountName": "my_accountName",
|
|
2430
|
+
* // "adultContent": false,
|
|
2431
|
+
* // "languageCode": "my_languageCode",
|
|
2432
|
+
* // "name": "my_name",
|
|
2433
|
+
* // "testAccount": false,
|
|
2434
|
+
* // "timeZone": {}
|
|
2435
|
+
* // }
|
|
2436
|
+
* },
|
|
2437
|
+
* });
|
|
2438
|
+
* console.log(res.data);
|
|
2439
|
+
*
|
|
2440
|
+
* // Example response
|
|
2441
|
+
* // {
|
|
2442
|
+
* // "accountId": "my_accountId",
|
|
2443
|
+
* // "accountName": "my_accountName",
|
|
2444
|
+
* // "adultContent": false,
|
|
2445
|
+
* // "languageCode": "my_languageCode",
|
|
2446
|
+
* // "name": "my_name",
|
|
2447
|
+
* // "testAccount": false,
|
|
2448
|
+
* // "timeZone": {}
|
|
2449
|
+
* // }
|
|
2450
|
+
* }
|
|
2451
|
+
*
|
|
2452
|
+
* main().catch(e => {
|
|
2453
|
+
* console.error(e);
|
|
2454
|
+
* throw e;
|
|
2455
|
+
* });
|
|
2456
|
+
*
|
|
2457
|
+
* ```
|
|
2458
|
+
*
|
|
2459
|
+
* @param params - Parameters for request
|
|
2460
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
2461
|
+
* @param callback - Optional callback that handles the response.
|
|
2462
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
2463
|
+
*/
|
|
2464
|
+
createTestAccount(params: Params$Resource$Accounts$Createtestaccount, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
2465
|
+
createTestAccount(params?: Params$Resource$Accounts$Createtestaccount, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Account>>;
|
|
2466
|
+
createTestAccount(params: Params$Resource$Accounts$Createtestaccount, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
2467
|
+
createTestAccount(params: Params$Resource$Accounts$Createtestaccount, options: MethodOptions | BodyResponseCallback<Schema$Account>, callback: BodyResponseCallback<Schema$Account>): void;
|
|
2468
|
+
createTestAccount(params: Params$Resource$Accounts$Createtestaccount, callback: BodyResponseCallback<Schema$Account>): void;
|
|
2469
|
+
createTestAccount(callback: BodyResponseCallback<Schema$Account>): void;
|
|
2390
2470
|
/**
|
|
2391
2471
|
* Deletes the specified account regardless of its type: standalone, advanced account or sub-account. Deleting an advanced account leads to the deletion of all of its sub-accounts. This also deletes the account's [developer registration entity](/merchant/api/reference/rest/accounts_v1/accounts.developerRegistration) and any associated GCP project to the account. Executing this method requires admin access. The deletion succeeds only if the account does not provide services to any other account and has no processed offers. You can use the `force` parameter to override this.
|
|
2392
2472
|
* @example
|
|
@@ -2732,6 +2812,16 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
2732
2812
|
*/
|
|
2733
2813
|
requestBody?: Schema$CreateAndConfigureAccountRequest;
|
|
2734
2814
|
}
|
|
2815
|
+
export interface Params$Resource$Accounts$Createtestaccount extends StandardParameters {
|
|
2816
|
+
/**
|
|
2817
|
+
* Required. The account resource name to create the test account under. Format: accounts/{account\}
|
|
2818
|
+
*/
|
|
2819
|
+
parent?: string;
|
|
2820
|
+
/**
|
|
2821
|
+
* Request body metadata
|
|
2822
|
+
*/
|
|
2823
|
+
requestBody?: Schema$Account;
|
|
2824
|
+
}
|
|
2735
2825
|
export interface Params$Resource$Accounts$Delete extends StandardParameters {
|
|
2736
2826
|
/**
|
|
2737
2827
|
* Optional. If set to `true`, the account is deleted even if it provides services to other accounts or has processed offers.
|
|
@@ -3586,7 +3676,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
3586
3676
|
getDeveloperRegistration(params: Params$Resource$Accounts$Developerregistration$Getdeveloperregistration, callback: BodyResponseCallback<Schema$DeveloperRegistration>): void;
|
|
3587
3677
|
getDeveloperRegistration(callback: BodyResponseCallback<Schema$DeveloperRegistration>): void;
|
|
3588
3678
|
/**
|
|
3589
|
-
* Registers the GCP used for the API call to the shopping account passed in the request. Will create a user with an "API developer" and add the "developer_email" as a contact with "API notifications" email preference on.
|
|
3679
|
+
* Registers the GCP used for the API call to the shopping account passed in the request. Will create a user with an "API developer" and add the "developer_email" as a contact with "API notifications" email preference on. Restrictions: * The caller account must be authenticated and must not impersonate another account at registration time. Registering for subaccounts is not supported if the caller account is authenticated with the parent or the managing advanced account. * The caller account must have a [verified website](https://support.google.com/merchants/answer/11586344) in Merchant Center. * [Test accounts](https://developers.google.com/merchant/api/guides/accounts/test-accounts) are not eligible for registration.
|
|
3590
3680
|
* @example
|
|
3591
3681
|
* ```js
|
|
3592
3682
|
* // Before running the sample:
|
|
@@ -3616,7 +3706,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
3616
3706
|
*
|
|
3617
3707
|
* // Do the magic
|
|
3618
3708
|
* const res = await merchantapi.accounts.developerRegistration.registerGcp({
|
|
3619
|
-
* // Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration`
|
|
3709
|
+
* // Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration` The {account\} used must be the same account where user calling this API method is directly added to. Note: The account used must be a production account (can't be a [test account](https://developers.google.com/merchant/api/guides/accounts/test-accounts) ) and must have a [verified website](https://support.google.com/merchants/answer/11586344) in Merchant Center.
|
|
3620
3710
|
* name: 'accounts/my-account/developerRegistration',
|
|
3621
3711
|
*
|
|
3622
3712
|
* // Request body metadata
|
|
@@ -3729,7 +3819,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
3729
3819
|
}
|
|
3730
3820
|
export interface Params$Resource$Accounts$Developerregistration$Registergcp extends StandardParameters {
|
|
3731
3821
|
/**
|
|
3732
|
-
* Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration`
|
|
3822
|
+
* Required. The name of the developer registration to be created for the merchant account that the GCP will be registered with. Format: `accounts/{account\}/developerRegistration` The {account\} used must be the same account where user calling this API method is directly added to. Note: The account used must be a production account (can't be a [test account](https://developers.google.com/merchant/api/guides/accounts/test-accounts) ) and must have a [verified website](https://support.google.com/merchants/answer/11586344) in Merchant Center.
|
|
3733
3823
|
*/
|
|
3734
3824
|
name?: string;
|
|
3735
3825
|
/**
|
|
@@ -7738,7 +7828,7 @@ export declare namespace merchantapi_accounts_v1 {
|
|
|
7738
7828
|
create(params: Params$Resource$Accounts$Users$Create, callback: BodyResponseCallback<Schema$User>): void;
|
|
7739
7829
|
create(callback: BodyResponseCallback<Schema$User>): void;
|
|
7740
7830
|
/**
|
|
7741
|
-
* Deletes a Merchant Center account user. Executing this method requires admin access. The user to be deleted can't be the last admin user of that account.
|
|
7831
|
+
* Deletes a Merchant Center account user. Executing this method requires admin access. The user to be deleted can't be the last admin user of that account.
|
|
7742
7832
|
* @example
|
|
7743
7833
|
* ```js
|
|
7744
7834
|
* // Before running the sample:
|
package/build/accounts_v1.js
CHANGED
|
@@ -120,6 +120,38 @@ var merchantapi_accounts_v1;
|
|
|
120
120
|
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
+
createTestAccount(paramsOrCallback, optionsOrCallback, callback) {
|
|
124
|
+
let params = (paramsOrCallback ||
|
|
125
|
+
{});
|
|
126
|
+
let options = (optionsOrCallback || {});
|
|
127
|
+
if (typeof paramsOrCallback === 'function') {
|
|
128
|
+
callback = paramsOrCallback;
|
|
129
|
+
params = {};
|
|
130
|
+
options = {};
|
|
131
|
+
}
|
|
132
|
+
if (typeof optionsOrCallback === 'function') {
|
|
133
|
+
callback = optionsOrCallback;
|
|
134
|
+
options = {};
|
|
135
|
+
}
|
|
136
|
+
const rootUrl = options.rootUrl || 'https://merchantapi.googleapis.com/';
|
|
137
|
+
const parameters = {
|
|
138
|
+
options: Object.assign({
|
|
139
|
+
url: (rootUrl + '/accounts/v1/{+parent}:createTestAccount').replace(/([^:]\/)\/+/g, '$1'),
|
|
140
|
+
method: 'POST',
|
|
141
|
+
apiVersion: '',
|
|
142
|
+
}, options),
|
|
143
|
+
params,
|
|
144
|
+
requiredParams: ['parent'],
|
|
145
|
+
pathParams: ['parent'],
|
|
146
|
+
context: this.context,
|
|
147
|
+
};
|
|
148
|
+
if (callback) {
|
|
149
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
123
155
|
delete(paramsOrCallback, optionsOrCallback, callback) {
|
|
124
156
|
let params = (paramsOrCallback || {});
|
|
125
157
|
let options = (optionsOrCallback || {});
|