@googleapis/tagmanager 12.0.1 → 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/CHANGELOG.md +37 -0
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/v1.d.ts +0 -1
- package/build/v1.js +26 -1
- package/build/v1.js.map +1 -1
- package/build/v2.d.ts +90 -1
- package/build/v2.js +71 -1
- package/build/v2.js.map +1 -1
- package/package.json +4 -4
- package/v1.ts +46 -92
- package/v2.ts +275 -204
package/build/v2.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
|
|
3
2
|
import { Readable } from 'stream';
|
|
4
3
|
export declare namespace tagmanager_v2 {
|
|
@@ -152,6 +151,12 @@ export declare namespace tagmanager_v2 {
|
|
|
152
151
|
*/
|
|
153
152
|
workspaceId?: string | null;
|
|
154
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
|
+
}
|
|
155
160
|
export interface Schema$Client {
|
|
156
161
|
/**
|
|
157
162
|
* GTM Account ID.
|
|
@@ -1137,6 +1142,12 @@ export declare namespace tagmanager_v2 {
|
|
|
1137
1142
|
*/
|
|
1138
1143
|
value?: string | null;
|
|
1139
1144
|
}
|
|
1145
|
+
export interface Schema$ProposedChange {
|
|
1146
|
+
/**
|
|
1147
|
+
* The list of workspace changes to be applied.
|
|
1148
|
+
*/
|
|
1149
|
+
changes?: Schema$Entity[];
|
|
1150
|
+
}
|
|
1140
1151
|
/**
|
|
1141
1152
|
* Publish container version response.
|
|
1142
1153
|
*/
|
|
@@ -4493,6 +4504,74 @@ export declare namespace tagmanager_v2 {
|
|
|
4493
4504
|
variables: Resource$Accounts$Containers$Workspaces$Variables;
|
|
4494
4505
|
zones: Resource$Accounts$Containers$Workspaces$Zones;
|
|
4495
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;
|
|
4496
4575
|
/**
|
|
4497
4576
|
* Creates a Workspace.
|
|
4498
4577
|
* @example
|
|
@@ -5189,6 +5268,16 @@ export declare namespace tagmanager_v2 {
|
|
|
5189
5268
|
update(params: Params$Resource$Accounts$Containers$Workspaces$Update, callback: BodyResponseCallback<Schema$Workspace>): void;
|
|
5190
5269
|
update(callback: BodyResponseCallback<Schema$Workspace>): void;
|
|
5191
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
|
+
}
|
|
5192
5281
|
export interface Params$Resource$Accounts$Containers$Workspaces$Create extends StandardParameters {
|
|
5193
5282
|
/**
|
|
5194
5283
|
* GTM parent Container's API relative path.
|
package/build/v2.js
CHANGED
|
@@ -33,6 +33,8 @@ var tagmanager_v2;
|
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
35
|
class Tagmanager {
|
|
36
|
+
context;
|
|
37
|
+
accounts;
|
|
36
38
|
constructor(options, google) {
|
|
37
39
|
this.context = {
|
|
38
40
|
_options: options || {},
|
|
@@ -43,6 +45,9 @@ var tagmanager_v2;
|
|
|
43
45
|
}
|
|
44
46
|
tagmanager_v2.Tagmanager = Tagmanager;
|
|
45
47
|
class Resource$Accounts {
|
|
48
|
+
context;
|
|
49
|
+
containers;
|
|
50
|
+
user_permissions;
|
|
46
51
|
constructor(context) {
|
|
47
52
|
this.context = context;
|
|
48
53
|
this.containers = new Resource$Accounts$Containers(this.context);
|
|
@@ -144,6 +149,12 @@ var tagmanager_v2;
|
|
|
144
149
|
}
|
|
145
150
|
tagmanager_v2.Resource$Accounts = Resource$Accounts;
|
|
146
151
|
class Resource$Accounts$Containers {
|
|
152
|
+
context;
|
|
153
|
+
destinations;
|
|
154
|
+
environments;
|
|
155
|
+
versions;
|
|
156
|
+
version_headers;
|
|
157
|
+
workspaces;
|
|
147
158
|
constructor(context) {
|
|
148
159
|
this.context = context;
|
|
149
160
|
this.destinations = new Resource$Accounts$Containers$Destinations(this.context);
|
|
@@ -443,6 +454,7 @@ var tagmanager_v2;
|
|
|
443
454
|
}
|
|
444
455
|
tagmanager_v2.Resource$Accounts$Containers = Resource$Accounts$Containers;
|
|
445
456
|
class Resource$Accounts$Containers$Destinations {
|
|
457
|
+
context;
|
|
446
458
|
constructor(context) {
|
|
447
459
|
this.context = context;
|
|
448
460
|
}
|
|
@@ -545,6 +557,7 @@ var tagmanager_v2;
|
|
|
545
557
|
}
|
|
546
558
|
tagmanager_v2.Resource$Accounts$Containers$Destinations = Resource$Accounts$Containers$Destinations;
|
|
547
559
|
class Resource$Accounts$Containers$Environments {
|
|
560
|
+
context;
|
|
548
561
|
constructor(context) {
|
|
549
562
|
this.context = context;
|
|
550
563
|
}
|
|
@@ -744,6 +757,7 @@ var tagmanager_v2;
|
|
|
744
757
|
}
|
|
745
758
|
tagmanager_v2.Resource$Accounts$Containers$Environments = Resource$Accounts$Containers$Environments;
|
|
746
759
|
class Resource$Accounts$Containers$Versions {
|
|
760
|
+
context;
|
|
747
761
|
constructor(context) {
|
|
748
762
|
this.context = context;
|
|
749
763
|
}
|
|
@@ -974,6 +988,7 @@ var tagmanager_v2;
|
|
|
974
988
|
}
|
|
975
989
|
tagmanager_v2.Resource$Accounts$Containers$Versions = Resource$Accounts$Containers$Versions;
|
|
976
990
|
class Resource$Accounts$Containers$Version_headers {
|
|
991
|
+
context;
|
|
977
992
|
constructor(context) {
|
|
978
993
|
this.context = context;
|
|
979
994
|
}
|
|
@@ -1045,6 +1060,17 @@ var tagmanager_v2;
|
|
|
1045
1060
|
}
|
|
1046
1061
|
tagmanager_v2.Resource$Accounts$Containers$Version_headers = Resource$Accounts$Containers$Version_headers;
|
|
1047
1062
|
class Resource$Accounts$Containers$Workspaces {
|
|
1063
|
+
context;
|
|
1064
|
+
built_in_variables;
|
|
1065
|
+
clients;
|
|
1066
|
+
folders;
|
|
1067
|
+
gtag_config;
|
|
1068
|
+
tags;
|
|
1069
|
+
templates;
|
|
1070
|
+
transformations;
|
|
1071
|
+
triggers;
|
|
1072
|
+
variables;
|
|
1073
|
+
zones;
|
|
1048
1074
|
constructor(context) {
|
|
1049
1075
|
this.context = context;
|
|
1050
1076
|
this.built_in_variables =
|
|
@@ -1061,6 +1087,39 @@ var tagmanager_v2;
|
|
|
1061
1087
|
this.variables = new Resource$Accounts$Containers$Workspaces$Variables(this.context);
|
|
1062
1088
|
this.zones = new Resource$Accounts$Containers$Workspaces$Zones(this.context);
|
|
1063
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
|
+
}
|
|
1064
1123
|
create(paramsOrCallback, optionsOrCallback, callback) {
|
|
1065
1124
|
let params = (paramsOrCallback ||
|
|
1066
1125
|
{});
|
|
@@ -1387,6 +1446,7 @@ var tagmanager_v2;
|
|
|
1387
1446
|
}
|
|
1388
1447
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces = Resource$Accounts$Containers$Workspaces;
|
|
1389
1448
|
class Resource$Accounts$Containers$Workspaces$Built_in_variables {
|
|
1449
|
+
context;
|
|
1390
1450
|
constructor(context) {
|
|
1391
1451
|
this.context = context;
|
|
1392
1452
|
}
|
|
@@ -1525,6 +1585,7 @@ var tagmanager_v2;
|
|
|
1525
1585
|
}
|
|
1526
1586
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces$Built_in_variables = Resource$Accounts$Containers$Workspaces$Built_in_variables;
|
|
1527
1587
|
class Resource$Accounts$Containers$Workspaces$Clients {
|
|
1588
|
+
context;
|
|
1528
1589
|
constructor(context) {
|
|
1529
1590
|
this.context = context;
|
|
1530
1591
|
}
|
|
@@ -1729,6 +1790,7 @@ var tagmanager_v2;
|
|
|
1729
1790
|
}
|
|
1730
1791
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces$Clients = Resource$Accounts$Containers$Workspaces$Clients;
|
|
1731
1792
|
class Resource$Accounts$Containers$Workspaces$Folders {
|
|
1793
|
+
context;
|
|
1732
1794
|
constructor(context) {
|
|
1733
1795
|
this.context = context;
|
|
1734
1796
|
}
|
|
@@ -1999,6 +2061,7 @@ var tagmanager_v2;
|
|
|
1999
2061
|
}
|
|
2000
2062
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces$Folders = Resource$Accounts$Containers$Workspaces$Folders;
|
|
2001
2063
|
class Resource$Accounts$Containers$Workspaces$Gtag_config {
|
|
2064
|
+
context;
|
|
2002
2065
|
constructor(context) {
|
|
2003
2066
|
this.context = context;
|
|
2004
2067
|
}
|
|
@@ -2170,6 +2233,7 @@ var tagmanager_v2;
|
|
|
2170
2233
|
}
|
|
2171
2234
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces$Gtag_config = Resource$Accounts$Containers$Workspaces$Gtag_config;
|
|
2172
2235
|
class Resource$Accounts$Containers$Workspaces$Tags {
|
|
2236
|
+
context;
|
|
2173
2237
|
constructor(context) {
|
|
2174
2238
|
this.context = context;
|
|
2175
2239
|
}
|
|
@@ -2372,6 +2436,7 @@ var tagmanager_v2;
|
|
|
2372
2436
|
}
|
|
2373
2437
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces$Tags = Resource$Accounts$Containers$Workspaces$Tags;
|
|
2374
2438
|
class Resource$Accounts$Containers$Workspaces$Templates {
|
|
2439
|
+
context;
|
|
2375
2440
|
constructor(context) {
|
|
2376
2441
|
this.context = context;
|
|
2377
2442
|
}
|
|
@@ -2609,6 +2674,7 @@ var tagmanager_v2;
|
|
|
2609
2674
|
}
|
|
2610
2675
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces$Templates = Resource$Accounts$Containers$Workspaces$Templates;
|
|
2611
2676
|
class Resource$Accounts$Containers$Workspaces$Transformations {
|
|
2677
|
+
context;
|
|
2612
2678
|
constructor(context) {
|
|
2613
2679
|
this.context = context;
|
|
2614
2680
|
}
|
|
@@ -2813,6 +2879,7 @@ var tagmanager_v2;
|
|
|
2813
2879
|
}
|
|
2814
2880
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces$Transformations = Resource$Accounts$Containers$Workspaces$Transformations;
|
|
2815
2881
|
class Resource$Accounts$Containers$Workspaces$Triggers {
|
|
2882
|
+
context;
|
|
2816
2883
|
constructor(context) {
|
|
2817
2884
|
this.context = context;
|
|
2818
2885
|
}
|
|
@@ -3017,6 +3084,7 @@ var tagmanager_v2;
|
|
|
3017
3084
|
}
|
|
3018
3085
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces$Triggers = Resource$Accounts$Containers$Workspaces$Triggers;
|
|
3019
3086
|
class Resource$Accounts$Containers$Workspaces$Variables {
|
|
3087
|
+
context;
|
|
3020
3088
|
constructor(context) {
|
|
3021
3089
|
this.context = context;
|
|
3022
3090
|
}
|
|
@@ -3221,6 +3289,7 @@ var tagmanager_v2;
|
|
|
3221
3289
|
}
|
|
3222
3290
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces$Variables = Resource$Accounts$Containers$Workspaces$Variables;
|
|
3223
3291
|
class Resource$Accounts$Containers$Workspaces$Zones {
|
|
3292
|
+
context;
|
|
3224
3293
|
constructor(context) {
|
|
3225
3294
|
this.context = context;
|
|
3226
3295
|
}
|
|
@@ -3424,6 +3493,7 @@ var tagmanager_v2;
|
|
|
3424
3493
|
}
|
|
3425
3494
|
tagmanager_v2.Resource$Accounts$Containers$Workspaces$Zones = Resource$Accounts$Containers$Workspaces$Zones;
|
|
3426
3495
|
class Resource$Accounts$User_permissions {
|
|
3496
|
+
context;
|
|
3427
3497
|
constructor(context) {
|
|
3428
3498
|
this.context = context;
|
|
3429
3499
|
}
|
|
@@ -3589,5 +3659,5 @@ var tagmanager_v2;
|
|
|
3589
3659
|
}
|
|
3590
3660
|
}
|
|
3591
3661
|
tagmanager_v2.Resource$Accounts$User_permissions = Resource$Accounts$User_permissions;
|
|
3592
|
-
})(tagmanager_v2
|
|
3662
|
+
})(tagmanager_v2 || (exports.tagmanager_v2 = tagmanager_v2 = {}));
|
|
3593
3663
|
//# sourceMappingURL=v2.js.map
|