@googleapis/tagmanager 13.0.0 → 14.1.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/build/v2.d.ts CHANGED
@@ -151,6 +151,12 @@ export declare namespace tagmanager_v2 {
151
151
  */
152
152
  workspaceId?: string | null;
153
153
  }
154
+ export interface Schema$BulkUpdateWorkspaceResponse {
155
+ /**
156
+ * The entities that were added or updated during the bulk-update. Does not include entities that were deleted or updated by the system.
157
+ */
158
+ changes?: Schema$Entity[];
159
+ }
154
160
  export interface Schema$Client {
155
161
  /**
156
162
  * GTM Account ID.
@@ -1136,6 +1142,12 @@ export declare namespace tagmanager_v2 {
1136
1142
  */
1137
1143
  value?: string | null;
1138
1144
  }
1145
+ export interface Schema$ProposedChange {
1146
+ /**
1147
+ * The list of workspace changes to be applied.
1148
+ */
1149
+ changes?: Schema$Entity[];
1150
+ }
1139
1151
  /**
1140
1152
  * Publish container version response.
1141
1153
  */
@@ -4492,6 +4504,74 @@ export declare namespace tagmanager_v2 {
4492
4504
  variables: Resource$Accounts$Containers$Workspaces$Variables;
4493
4505
  zones: Resource$Accounts$Containers$Workspaces$Zones;
4494
4506
  constructor(context: APIRequestContext);
4507
+ /**
4508
+ * Applies multiple entity changes to a workspace in one call. When creating new entities, their entity IDs must be unique and in correct format. That is, they must start with "new_" and followed by number, e.g. "new_1", "new_2". Example body snippet to create myNewTag under myNewFolder is: ``` "changes": [ { "folder": { "folderId": "new_1", "name": "myNewFolder", ... \}, "changeStatus": "added" \}, { "tag": { "tagId": "new_2", "name": "myNewTag", "parentFolderId": "new_1", ... \}, "changeStatus": "added" \} ] ```
4509
+ * @example
4510
+ * ```js
4511
+ * // Before running the sample:
4512
+ * // - Enable the API at:
4513
+ * // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
4514
+ * // - Login into gcloud by running:
4515
+ * // ```sh
4516
+ * // $ gcloud auth application-default login
4517
+ * // ```
4518
+ * // - Install the npm module by running:
4519
+ * // ```sh
4520
+ * // $ npm install googleapis
4521
+ * // ```
4522
+ *
4523
+ * const {google} = require('googleapis');
4524
+ * const tagmanager = google.tagmanager('v2');
4525
+ *
4526
+ * async function main() {
4527
+ * const auth = new google.auth.GoogleAuth({
4528
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
4529
+ * scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
4530
+ * });
4531
+ *
4532
+ * // Acquire an auth client, and bind it to all future calls
4533
+ * const authClient = await auth.getClient();
4534
+ * google.options({auth: authClient});
4535
+ *
4536
+ * // Do the magic
4537
+ * const res = await tagmanager.accounts.containers.workspaces.bulk_update({
4538
+ * // GTM Workspace's API relative path.
4539
+ * path: 'accounts/my-account/containers/my-container/workspaces/my-workspace',
4540
+ *
4541
+ * // Request body metadata
4542
+ * requestBody: {
4543
+ * // request body parameters
4544
+ * // {
4545
+ * // "changes": []
4546
+ * // }
4547
+ * },
4548
+ * });
4549
+ * console.log(res.data);
4550
+ *
4551
+ * // Example response
4552
+ * // {
4553
+ * // "changes": []
4554
+ * // }
4555
+ * }
4556
+ *
4557
+ * main().catch(e => {
4558
+ * console.error(e);
4559
+ * throw e;
4560
+ * });
4561
+ *
4562
+ * ```
4563
+ *
4564
+ * @param params - Parameters for request
4565
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
4566
+ * @param callback - Optional callback that handles the response.
4567
+ * @returns A promise if used with async/await, or void if used with a callback.
4568
+ */
4569
+ bulk_update(params: Params$Resource$Accounts$Containers$Workspaces$Bulk_update, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
4570
+ bulk_update(params?: Params$Resource$Accounts$Containers$Workspaces$Bulk_update, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$BulkUpdateWorkspaceResponse>>;
4571
+ bulk_update(params: Params$Resource$Accounts$Containers$Workspaces$Bulk_update, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
4572
+ bulk_update(params: Params$Resource$Accounts$Containers$Workspaces$Bulk_update, options: MethodOptions | BodyResponseCallback<Schema$BulkUpdateWorkspaceResponse>, callback: BodyResponseCallback<Schema$BulkUpdateWorkspaceResponse>): void;
4573
+ bulk_update(params: Params$Resource$Accounts$Containers$Workspaces$Bulk_update, callback: BodyResponseCallback<Schema$BulkUpdateWorkspaceResponse>): void;
4574
+ bulk_update(callback: BodyResponseCallback<Schema$BulkUpdateWorkspaceResponse>): void;
4495
4575
  /**
4496
4576
  * Creates a Workspace.
4497
4577
  * @example
@@ -5188,6 +5268,16 @@ export declare namespace tagmanager_v2 {
5188
5268
  update(params: Params$Resource$Accounts$Containers$Workspaces$Update, callback: BodyResponseCallback<Schema$Workspace>): void;
5189
5269
  update(callback: BodyResponseCallback<Schema$Workspace>): void;
5190
5270
  }
5271
+ export interface Params$Resource$Accounts$Containers$Workspaces$Bulk_update extends StandardParameters {
5272
+ /**
5273
+ * GTM Workspace's API relative path.
5274
+ */
5275
+ path?: string;
5276
+ /**
5277
+ * Request body metadata
5278
+ */
5279
+ requestBody?: Schema$ProposedChange;
5280
+ }
5191
5281
  export interface Params$Resource$Accounts$Containers$Workspaces$Create extends StandardParameters {
5192
5282
  /**
5193
5283
  * GTM parent Container's API relative path.
package/build/v2.js CHANGED
@@ -1087,6 +1087,39 @@ var tagmanager_v2;
1087
1087
  this.variables = new Resource$Accounts$Containers$Workspaces$Variables(this.context);
1088
1088
  this.zones = new Resource$Accounts$Containers$Workspaces$Zones(this.context);
1089
1089
  }
1090
+ bulk_update(paramsOrCallback, optionsOrCallback, callback) {
1091
+ let params = (paramsOrCallback ||
1092
+ {});
1093
+ let options = (optionsOrCallback || {});
1094
+ if (typeof paramsOrCallback === 'function') {
1095
+ callback = paramsOrCallback;
1096
+ params =
1097
+ {};
1098
+ options = {};
1099
+ }
1100
+ if (typeof optionsOrCallback === 'function') {
1101
+ callback = optionsOrCallback;
1102
+ options = {};
1103
+ }
1104
+ const rootUrl = options.rootUrl || 'https://tagmanager.googleapis.com/';
1105
+ const parameters = {
1106
+ options: Object.assign({
1107
+ url: (rootUrl + '/tagmanager/v2/{+path}/bulk_update').replace(/([^:]\/)\/+/g, '$1'),
1108
+ method: 'POST',
1109
+ apiVersion: '',
1110
+ }, options),
1111
+ params,
1112
+ requiredParams: ['path'],
1113
+ pathParams: ['path'],
1114
+ context: this.context,
1115
+ };
1116
+ if (callback) {
1117
+ (0, googleapis_common_1.createAPIRequest)(parameters, callback);
1118
+ }
1119
+ else {
1120
+ return (0, googleapis_common_1.createAPIRequest)(parameters);
1121
+ }
1122
+ }
1090
1123
  create(paramsOrCallback, optionsOrCallback, callback) {
1091
1124
  let params = (paramsOrCallback ||
1092
1125
  {});