@googleapis/tagmanager 3.0.0 → 4.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 +11 -0
- package/build/v2.d.ts +575 -0
- package/build/v2.js +200 -0
- package/build/v2.js.map +1 -1
- package/package.json +1 -1
- package/v2.ts +1049 -0
package/v2.ts
CHANGED
|
@@ -371,6 +371,10 @@ export namespace tagmanager_v2 {
|
|
|
371
371
|
* Whether this Container supports templates.
|
|
372
372
|
*/
|
|
373
373
|
supportTemplates?: boolean | null;
|
|
374
|
+
/**
|
|
375
|
+
* Whether this Container supports transformations.
|
|
376
|
+
*/
|
|
377
|
+
supportTransformations?: boolean | null;
|
|
374
378
|
/**
|
|
375
379
|
* Whether this Container supports triggers.
|
|
376
380
|
*/
|
|
@@ -464,6 +468,10 @@ export namespace tagmanager_v2 {
|
|
|
464
468
|
* Auto generated link to the tag manager UI
|
|
465
469
|
*/
|
|
466
470
|
tagManagerUrl?: string | null;
|
|
471
|
+
/**
|
|
472
|
+
* The transformations in the container that this version was taken from.
|
|
473
|
+
*/
|
|
474
|
+
transformation?: Schema$Transformation[];
|
|
467
475
|
/**
|
|
468
476
|
* The triggers in the container that this version was taken from.
|
|
469
477
|
*/
|
|
@@ -688,6 +696,10 @@ export namespace tagmanager_v2 {
|
|
|
688
696
|
* The tag being represented by the entity.
|
|
689
697
|
*/
|
|
690
698
|
tag?: Schema$Tag;
|
|
699
|
+
/**
|
|
700
|
+
* The transformation being represented by the entity.
|
|
701
|
+
*/
|
|
702
|
+
transformation?: Schema$Transformation;
|
|
691
703
|
/**
|
|
692
704
|
* The trigger being represented by the entity.
|
|
693
705
|
*/
|
|
@@ -1044,6 +1056,16 @@ export namespace tagmanager_v2 {
|
|
|
1044
1056
|
*/
|
|
1045
1057
|
template?: Schema$CustomTemplate[];
|
|
1046
1058
|
}
|
|
1059
|
+
export interface Schema$ListTransformationsResponse {
|
|
1060
|
+
/**
|
|
1061
|
+
* Continuation token for fetching the next page of results.
|
|
1062
|
+
*/
|
|
1063
|
+
nextPageToken?: string | null;
|
|
1064
|
+
/**
|
|
1065
|
+
* All GTM Transformations of a GTM Container.
|
|
1066
|
+
*/
|
|
1067
|
+
transformation?: Schema$Transformation[];
|
|
1068
|
+
}
|
|
1047
1069
|
/**
|
|
1048
1070
|
* List triggers response.
|
|
1049
1071
|
*/
|
|
@@ -1219,6 +1241,15 @@ export namespace tagmanager_v2 {
|
|
|
1219
1241
|
*/
|
|
1220
1242
|
template?: Schema$CustomTemplate;
|
|
1221
1243
|
}
|
|
1244
|
+
/**
|
|
1245
|
+
* The result of reverting a transformation in a workspace.
|
|
1246
|
+
*/
|
|
1247
|
+
export interface Schema$RevertTransformationResponse {
|
|
1248
|
+
/**
|
|
1249
|
+
* Transformation as it appears in the latest container version since the last workspace synchronization operation. If no transformation is present, that means the transformation was deleted in the latest container version.
|
|
1250
|
+
*/
|
|
1251
|
+
transformation?: Schema$Transformation;
|
|
1252
|
+
}
|
|
1222
1253
|
/**
|
|
1223
1254
|
* The result of reverting a trigger in a workspace.
|
|
1224
1255
|
*/
|
|
@@ -1421,6 +1452,59 @@ export namespace tagmanager_v2 {
|
|
|
1421
1452
|
*/
|
|
1422
1453
|
tagName?: string | null;
|
|
1423
1454
|
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Represents a Google Tag Manager Transformation.
|
|
1457
|
+
*/
|
|
1458
|
+
export interface Schema$Transformation {
|
|
1459
|
+
/**
|
|
1460
|
+
* GTM Account ID.
|
|
1461
|
+
*/
|
|
1462
|
+
accountId?: string | null;
|
|
1463
|
+
/**
|
|
1464
|
+
* GTM Container ID.
|
|
1465
|
+
*/
|
|
1466
|
+
containerId?: string | null;
|
|
1467
|
+
/**
|
|
1468
|
+
* The fingerprint of the GTM Transformation as computed at storage time. This value is recomputed whenever the transformation is modified.
|
|
1469
|
+
*/
|
|
1470
|
+
fingerprint?: string | null;
|
|
1471
|
+
/**
|
|
1472
|
+
* Transformation display name. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update
|
|
1473
|
+
*/
|
|
1474
|
+
name?: string | null;
|
|
1475
|
+
/**
|
|
1476
|
+
* User notes on how to apply this transformation in the container. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update
|
|
1477
|
+
*/
|
|
1478
|
+
notes?: string | null;
|
|
1479
|
+
/**
|
|
1480
|
+
* The transformation's parameters. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update
|
|
1481
|
+
*/
|
|
1482
|
+
parameter?: Schema$Parameter[];
|
|
1483
|
+
/**
|
|
1484
|
+
* Parent folder id.
|
|
1485
|
+
*/
|
|
1486
|
+
parentFolderId?: string | null;
|
|
1487
|
+
/**
|
|
1488
|
+
* GTM transformation's API relative path.
|
|
1489
|
+
*/
|
|
1490
|
+
path?: string | null;
|
|
1491
|
+
/**
|
|
1492
|
+
* Auto generated link to the tag manager UI
|
|
1493
|
+
*/
|
|
1494
|
+
tagManagerUrl?: string | null;
|
|
1495
|
+
/**
|
|
1496
|
+
* The Transformation ID uniquely identifies the GTM transformation.
|
|
1497
|
+
*/
|
|
1498
|
+
transformationId?: string | null;
|
|
1499
|
+
/**
|
|
1500
|
+
* Transformation type. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update
|
|
1501
|
+
*/
|
|
1502
|
+
type?: string | null;
|
|
1503
|
+
/**
|
|
1504
|
+
* GTM Workspace ID.
|
|
1505
|
+
*/
|
|
1506
|
+
workspaceId?: string | null;
|
|
1507
|
+
}
|
|
1424
1508
|
/**
|
|
1425
1509
|
* Represents a Google Tag Manager Trigger
|
|
1426
1510
|
*/
|
|
@@ -5350,6 +5434,7 @@ export namespace tagmanager_v2 {
|
|
|
5350
5434
|
* // "path": "my_path",
|
|
5351
5435
|
* // "tag": [],
|
|
5352
5436
|
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
5437
|
+
* // "transformation": [],
|
|
5353
5438
|
* // "trigger": [],
|
|
5354
5439
|
* // "variable": [],
|
|
5355
5440
|
* // "zone": []
|
|
@@ -5500,6 +5585,7 @@ export namespace tagmanager_v2 {
|
|
|
5500
5585
|
* // "path": "my_path",
|
|
5501
5586
|
* // "tag": [],
|
|
5502
5587
|
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
5588
|
+
* // "transformation": [],
|
|
5503
5589
|
* // "trigger": [],
|
|
5504
5590
|
* // "variable": [],
|
|
5505
5591
|
* // "zone": []
|
|
@@ -5788,6 +5874,7 @@ export namespace tagmanager_v2 {
|
|
|
5788
5874
|
* // "path": "my_path",
|
|
5789
5875
|
* // "tag": [],
|
|
5790
5876
|
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
5877
|
+
* // "transformation": [],
|
|
5791
5878
|
* // "trigger": [],
|
|
5792
5879
|
* // "variable": [],
|
|
5793
5880
|
* // "zone": []
|
|
@@ -5937,6 +6024,7 @@ export namespace tagmanager_v2 {
|
|
|
5937
6024
|
* // "path": "my_path",
|
|
5938
6025
|
* // "tag": [],
|
|
5939
6026
|
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
6027
|
+
* // "transformation": [],
|
|
5940
6028
|
* // "trigger": [],
|
|
5941
6029
|
* // "variable": [],
|
|
5942
6030
|
* // "zone": []
|
|
@@ -6088,6 +6176,7 @@ export namespace tagmanager_v2 {
|
|
|
6088
6176
|
* // "path": "my_path",
|
|
6089
6177
|
* // "tag": [],
|
|
6090
6178
|
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
6179
|
+
* // "transformation": [],
|
|
6091
6180
|
* // "trigger": [],
|
|
6092
6181
|
* // "variable": [],
|
|
6093
6182
|
* // "zone": []
|
|
@@ -6114,6 +6203,7 @@ export namespace tagmanager_v2 {
|
|
|
6114
6203
|
* // "path": "my_path",
|
|
6115
6204
|
* // "tag": [],
|
|
6116
6205
|
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
6206
|
+
* // "transformation": [],
|
|
6117
6207
|
* // "trigger": [],
|
|
6118
6208
|
* // "variable": [],
|
|
6119
6209
|
* // "zone": []
|
|
@@ -6616,6 +6706,7 @@ export namespace tagmanager_v2 {
|
|
|
6616
6706
|
gtag_config: Resource$Accounts$Containers$Workspaces$Gtag_config;
|
|
6617
6707
|
tags: Resource$Accounts$Containers$Workspaces$Tags;
|
|
6618
6708
|
templates: Resource$Accounts$Containers$Workspaces$Templates;
|
|
6709
|
+
transformations: Resource$Accounts$Containers$Workspaces$Transformations;
|
|
6619
6710
|
triggers: Resource$Accounts$Containers$Workspaces$Triggers;
|
|
6620
6711
|
variables: Resource$Accounts$Containers$Workspaces$Variables;
|
|
6621
6712
|
zones: Resource$Accounts$Containers$Workspaces$Zones;
|
|
@@ -6639,6 +6730,10 @@ export namespace tagmanager_v2 {
|
|
|
6639
6730
|
this.templates = new Resource$Accounts$Containers$Workspaces$Templates(
|
|
6640
6731
|
this.context
|
|
6641
6732
|
);
|
|
6733
|
+
this.transformations =
|
|
6734
|
+
new Resource$Accounts$Containers$Workspaces$Transformations(
|
|
6735
|
+
this.context
|
|
6736
|
+
);
|
|
6642
6737
|
this.triggers = new Resource$Accounts$Containers$Workspaces$Triggers(
|
|
6643
6738
|
this.context
|
|
6644
6739
|
);
|
|
@@ -7676,6 +7771,7 @@ export namespace tagmanager_v2 {
|
|
|
7676
7771
|
* // "client": {},
|
|
7677
7772
|
* // "folder": {},
|
|
7678
7773
|
* // "tag": {},
|
|
7774
|
+
* // "transformation": {},
|
|
7679
7775
|
* // "trigger": {},
|
|
7680
7776
|
* // "variable": {}
|
|
7681
7777
|
* // }
|
|
@@ -13680,6 +13776,959 @@ export namespace tagmanager_v2 {
|
|
|
13680
13776
|
requestBody?: Schema$CustomTemplate;
|
|
13681
13777
|
}
|
|
13682
13778
|
|
|
13779
|
+
export class Resource$Accounts$Containers$Workspaces$Transformations {
|
|
13780
|
+
context: APIRequestContext;
|
|
13781
|
+
constructor(context: APIRequestContext) {
|
|
13782
|
+
this.context = context;
|
|
13783
|
+
}
|
|
13784
|
+
|
|
13785
|
+
/**
|
|
13786
|
+
* Creates a GTM Transformation.
|
|
13787
|
+
* @example
|
|
13788
|
+
* ```js
|
|
13789
|
+
* // Before running the sample:
|
|
13790
|
+
* // - Enable the API at:
|
|
13791
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
13792
|
+
* // - Login into gcloud by running:
|
|
13793
|
+
* // `$ gcloud auth application-default login`
|
|
13794
|
+
* // - Install the npm module by running:
|
|
13795
|
+
* // `$ npm install googleapis`
|
|
13796
|
+
*
|
|
13797
|
+
* const {google} = require('googleapis');
|
|
13798
|
+
* const tagmanager = google.tagmanager('v2');
|
|
13799
|
+
*
|
|
13800
|
+
* async function main() {
|
|
13801
|
+
* const auth = new google.auth.GoogleAuth({
|
|
13802
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
13803
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
13804
|
+
* });
|
|
13805
|
+
*
|
|
13806
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
13807
|
+
* const authClient = await auth.getClient();
|
|
13808
|
+
* google.options({auth: authClient});
|
|
13809
|
+
*
|
|
13810
|
+
* // Do the magic
|
|
13811
|
+
* const res =
|
|
13812
|
+
* await tagmanager.accounts.containers.workspaces.transformations.create({
|
|
13813
|
+
* // GTM Workspace's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}
|
|
13814
|
+
* parent:
|
|
13815
|
+
* 'accounts/my-account/containers/my-container/workspaces/my-workspace',
|
|
13816
|
+
*
|
|
13817
|
+
* // Request body metadata
|
|
13818
|
+
* requestBody: {
|
|
13819
|
+
* // request body parameters
|
|
13820
|
+
* // {
|
|
13821
|
+
* // "accountId": "my_accountId",
|
|
13822
|
+
* // "containerId": "my_containerId",
|
|
13823
|
+
* // "fingerprint": "my_fingerprint",
|
|
13824
|
+
* // "name": "my_name",
|
|
13825
|
+
* // "notes": "my_notes",
|
|
13826
|
+
* // "parameter": [],
|
|
13827
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
13828
|
+
* // "path": "my_path",
|
|
13829
|
+
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
13830
|
+
* // "transformationId": "my_transformationId",
|
|
13831
|
+
* // "type": "my_type",
|
|
13832
|
+
* // "workspaceId": "my_workspaceId"
|
|
13833
|
+
* // }
|
|
13834
|
+
* },
|
|
13835
|
+
* });
|
|
13836
|
+
* console.log(res.data);
|
|
13837
|
+
*
|
|
13838
|
+
* // Example response
|
|
13839
|
+
* // {
|
|
13840
|
+
* // "accountId": "my_accountId",
|
|
13841
|
+
* // "containerId": "my_containerId",
|
|
13842
|
+
* // "fingerprint": "my_fingerprint",
|
|
13843
|
+
* // "name": "my_name",
|
|
13844
|
+
* // "notes": "my_notes",
|
|
13845
|
+
* // "parameter": [],
|
|
13846
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
13847
|
+
* // "path": "my_path",
|
|
13848
|
+
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
13849
|
+
* // "transformationId": "my_transformationId",
|
|
13850
|
+
* // "type": "my_type",
|
|
13851
|
+
* // "workspaceId": "my_workspaceId"
|
|
13852
|
+
* // }
|
|
13853
|
+
* }
|
|
13854
|
+
*
|
|
13855
|
+
* main().catch(e => {
|
|
13856
|
+
* console.error(e);
|
|
13857
|
+
* throw e;
|
|
13858
|
+
* });
|
|
13859
|
+
*
|
|
13860
|
+
* ```
|
|
13861
|
+
*
|
|
13862
|
+
* @param params - Parameters for request
|
|
13863
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
13864
|
+
* @param callback - Optional callback that handles the response.
|
|
13865
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
13866
|
+
*/
|
|
13867
|
+
create(
|
|
13868
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Create,
|
|
13869
|
+
options: StreamMethodOptions
|
|
13870
|
+
): GaxiosPromise<Readable>;
|
|
13871
|
+
create(
|
|
13872
|
+
params?: Params$Resource$Accounts$Containers$Workspaces$Transformations$Create,
|
|
13873
|
+
options?: MethodOptions
|
|
13874
|
+
): GaxiosPromise<Schema$Transformation>;
|
|
13875
|
+
create(
|
|
13876
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Create,
|
|
13877
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
13878
|
+
callback: BodyResponseCallback<Readable>
|
|
13879
|
+
): void;
|
|
13880
|
+
create(
|
|
13881
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Create,
|
|
13882
|
+
options: MethodOptions | BodyResponseCallback<Schema$Transformation>,
|
|
13883
|
+
callback: BodyResponseCallback<Schema$Transformation>
|
|
13884
|
+
): void;
|
|
13885
|
+
create(
|
|
13886
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Create,
|
|
13887
|
+
callback: BodyResponseCallback<Schema$Transformation>
|
|
13888
|
+
): void;
|
|
13889
|
+
create(callback: BodyResponseCallback<Schema$Transformation>): void;
|
|
13890
|
+
create(
|
|
13891
|
+
paramsOrCallback?:
|
|
13892
|
+
| Params$Resource$Accounts$Containers$Workspaces$Transformations$Create
|
|
13893
|
+
| BodyResponseCallback<Schema$Transformation>
|
|
13894
|
+
| BodyResponseCallback<Readable>,
|
|
13895
|
+
optionsOrCallback?:
|
|
13896
|
+
| MethodOptions
|
|
13897
|
+
| StreamMethodOptions
|
|
13898
|
+
| BodyResponseCallback<Schema$Transformation>
|
|
13899
|
+
| BodyResponseCallback<Readable>,
|
|
13900
|
+
callback?:
|
|
13901
|
+
| BodyResponseCallback<Schema$Transformation>
|
|
13902
|
+
| BodyResponseCallback<Readable>
|
|
13903
|
+
): void | GaxiosPromise<Schema$Transformation> | GaxiosPromise<Readable> {
|
|
13904
|
+
let params = (paramsOrCallback ||
|
|
13905
|
+
{}) as Params$Resource$Accounts$Containers$Workspaces$Transformations$Create;
|
|
13906
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
13907
|
+
|
|
13908
|
+
if (typeof paramsOrCallback === 'function') {
|
|
13909
|
+
callback = paramsOrCallback;
|
|
13910
|
+
params =
|
|
13911
|
+
{} as Params$Resource$Accounts$Containers$Workspaces$Transformations$Create;
|
|
13912
|
+
options = {};
|
|
13913
|
+
}
|
|
13914
|
+
|
|
13915
|
+
if (typeof optionsOrCallback === 'function') {
|
|
13916
|
+
callback = optionsOrCallback;
|
|
13917
|
+
options = {};
|
|
13918
|
+
}
|
|
13919
|
+
|
|
13920
|
+
const rootUrl = options.rootUrl || 'https://tagmanager.googleapis.com/';
|
|
13921
|
+
const parameters = {
|
|
13922
|
+
options: Object.assign(
|
|
13923
|
+
{
|
|
13924
|
+
url: (rootUrl + '/tagmanager/v2/{+parent}/transformations').replace(
|
|
13925
|
+
/([^:]\/)\/+/g,
|
|
13926
|
+
'$1'
|
|
13927
|
+
),
|
|
13928
|
+
method: 'POST',
|
|
13929
|
+
},
|
|
13930
|
+
options
|
|
13931
|
+
),
|
|
13932
|
+
params,
|
|
13933
|
+
requiredParams: ['parent'],
|
|
13934
|
+
pathParams: ['parent'],
|
|
13935
|
+
context: this.context,
|
|
13936
|
+
};
|
|
13937
|
+
if (callback) {
|
|
13938
|
+
createAPIRequest<Schema$Transformation>(
|
|
13939
|
+
parameters,
|
|
13940
|
+
callback as BodyResponseCallback<unknown>
|
|
13941
|
+
);
|
|
13942
|
+
} else {
|
|
13943
|
+
return createAPIRequest<Schema$Transformation>(parameters);
|
|
13944
|
+
}
|
|
13945
|
+
}
|
|
13946
|
+
|
|
13947
|
+
/**
|
|
13948
|
+
* Deletes a GTM Transformation.
|
|
13949
|
+
* @example
|
|
13950
|
+
* ```js
|
|
13951
|
+
* // Before running the sample:
|
|
13952
|
+
* // - Enable the API at:
|
|
13953
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
13954
|
+
* // - Login into gcloud by running:
|
|
13955
|
+
* // `$ gcloud auth application-default login`
|
|
13956
|
+
* // - Install the npm module by running:
|
|
13957
|
+
* // `$ npm install googleapis`
|
|
13958
|
+
*
|
|
13959
|
+
* const {google} = require('googleapis');
|
|
13960
|
+
* const tagmanager = google.tagmanager('v2');
|
|
13961
|
+
*
|
|
13962
|
+
* async function main() {
|
|
13963
|
+
* const auth = new google.auth.GoogleAuth({
|
|
13964
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
13965
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
13966
|
+
* });
|
|
13967
|
+
*
|
|
13968
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
13969
|
+
* const authClient = await auth.getClient();
|
|
13970
|
+
* google.options({auth: authClient});
|
|
13971
|
+
*
|
|
13972
|
+
* // Do the magic
|
|
13973
|
+
* const res =
|
|
13974
|
+
* await tagmanager.accounts.containers.workspaces.transformations.delete({
|
|
13975
|
+
* // GTM Transformation's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}/transformations/{transformation_id\}
|
|
13976
|
+
* path: 'accounts/my-account/containers/my-container/workspaces/my-workspace/transformations/my-transformation',
|
|
13977
|
+
* });
|
|
13978
|
+
* console.log(res.data);
|
|
13979
|
+
* }
|
|
13980
|
+
*
|
|
13981
|
+
* main().catch(e => {
|
|
13982
|
+
* console.error(e);
|
|
13983
|
+
* throw e;
|
|
13984
|
+
* });
|
|
13985
|
+
*
|
|
13986
|
+
* ```
|
|
13987
|
+
*
|
|
13988
|
+
* @param params - Parameters for request
|
|
13989
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
13990
|
+
* @param callback - Optional callback that handles the response.
|
|
13991
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
13992
|
+
*/
|
|
13993
|
+
delete(
|
|
13994
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Delete,
|
|
13995
|
+
options: StreamMethodOptions
|
|
13996
|
+
): GaxiosPromise<Readable>;
|
|
13997
|
+
delete(
|
|
13998
|
+
params?: Params$Resource$Accounts$Containers$Workspaces$Transformations$Delete,
|
|
13999
|
+
options?: MethodOptions
|
|
14000
|
+
): GaxiosPromise<void>;
|
|
14001
|
+
delete(
|
|
14002
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Delete,
|
|
14003
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
14004
|
+
callback: BodyResponseCallback<Readable>
|
|
14005
|
+
): void;
|
|
14006
|
+
delete(
|
|
14007
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Delete,
|
|
14008
|
+
options: MethodOptions | BodyResponseCallback<void>,
|
|
14009
|
+
callback: BodyResponseCallback<void>
|
|
14010
|
+
): void;
|
|
14011
|
+
delete(
|
|
14012
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Delete,
|
|
14013
|
+
callback: BodyResponseCallback<void>
|
|
14014
|
+
): void;
|
|
14015
|
+
delete(callback: BodyResponseCallback<void>): void;
|
|
14016
|
+
delete(
|
|
14017
|
+
paramsOrCallback?:
|
|
14018
|
+
| Params$Resource$Accounts$Containers$Workspaces$Transformations$Delete
|
|
14019
|
+
| BodyResponseCallback<void>
|
|
14020
|
+
| BodyResponseCallback<Readable>,
|
|
14021
|
+
optionsOrCallback?:
|
|
14022
|
+
| MethodOptions
|
|
14023
|
+
| StreamMethodOptions
|
|
14024
|
+
| BodyResponseCallback<void>
|
|
14025
|
+
| BodyResponseCallback<Readable>,
|
|
14026
|
+
callback?: BodyResponseCallback<void> | BodyResponseCallback<Readable>
|
|
14027
|
+
): void | GaxiosPromise<void> | GaxiosPromise<Readable> {
|
|
14028
|
+
let params = (paramsOrCallback ||
|
|
14029
|
+
{}) as Params$Resource$Accounts$Containers$Workspaces$Transformations$Delete;
|
|
14030
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
14031
|
+
|
|
14032
|
+
if (typeof paramsOrCallback === 'function') {
|
|
14033
|
+
callback = paramsOrCallback;
|
|
14034
|
+
params =
|
|
14035
|
+
{} as Params$Resource$Accounts$Containers$Workspaces$Transformations$Delete;
|
|
14036
|
+
options = {};
|
|
14037
|
+
}
|
|
14038
|
+
|
|
14039
|
+
if (typeof optionsOrCallback === 'function') {
|
|
14040
|
+
callback = optionsOrCallback;
|
|
14041
|
+
options = {};
|
|
14042
|
+
}
|
|
14043
|
+
|
|
14044
|
+
const rootUrl = options.rootUrl || 'https://tagmanager.googleapis.com/';
|
|
14045
|
+
const parameters = {
|
|
14046
|
+
options: Object.assign(
|
|
14047
|
+
{
|
|
14048
|
+
url: (rootUrl + '/tagmanager/v2/{+path}').replace(
|
|
14049
|
+
/([^:]\/)\/+/g,
|
|
14050
|
+
'$1'
|
|
14051
|
+
),
|
|
14052
|
+
method: 'DELETE',
|
|
14053
|
+
},
|
|
14054
|
+
options
|
|
14055
|
+
),
|
|
14056
|
+
params,
|
|
14057
|
+
requiredParams: ['path'],
|
|
14058
|
+
pathParams: ['path'],
|
|
14059
|
+
context: this.context,
|
|
14060
|
+
};
|
|
14061
|
+
if (callback) {
|
|
14062
|
+
createAPIRequest<void>(
|
|
14063
|
+
parameters,
|
|
14064
|
+
callback as BodyResponseCallback<unknown>
|
|
14065
|
+
);
|
|
14066
|
+
} else {
|
|
14067
|
+
return createAPIRequest<void>(parameters);
|
|
14068
|
+
}
|
|
14069
|
+
}
|
|
14070
|
+
|
|
14071
|
+
/**
|
|
14072
|
+
* Gets a GTM Transformation.
|
|
14073
|
+
* @example
|
|
14074
|
+
* ```js
|
|
14075
|
+
* // Before running the sample:
|
|
14076
|
+
* // - Enable the API at:
|
|
14077
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
14078
|
+
* // - Login into gcloud by running:
|
|
14079
|
+
* // `$ gcloud auth application-default login`
|
|
14080
|
+
* // - Install the npm module by running:
|
|
14081
|
+
* // `$ npm install googleapis`
|
|
14082
|
+
*
|
|
14083
|
+
* const {google} = require('googleapis');
|
|
14084
|
+
* const tagmanager = google.tagmanager('v2');
|
|
14085
|
+
*
|
|
14086
|
+
* async function main() {
|
|
14087
|
+
* const auth = new google.auth.GoogleAuth({
|
|
14088
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
14089
|
+
* scopes: [
|
|
14090
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
14091
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
14092
|
+
* ],
|
|
14093
|
+
* });
|
|
14094
|
+
*
|
|
14095
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
14096
|
+
* const authClient = await auth.getClient();
|
|
14097
|
+
* google.options({auth: authClient});
|
|
14098
|
+
*
|
|
14099
|
+
* // Do the magic
|
|
14100
|
+
* const res =
|
|
14101
|
+
* await tagmanager.accounts.containers.workspaces.transformations.get({
|
|
14102
|
+
* // GTM Transformation's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}/transformations/{transformation_id\}
|
|
14103
|
+
* path: 'accounts/my-account/containers/my-container/workspaces/my-workspace/transformations/my-transformation',
|
|
14104
|
+
* });
|
|
14105
|
+
* console.log(res.data);
|
|
14106
|
+
*
|
|
14107
|
+
* // Example response
|
|
14108
|
+
* // {
|
|
14109
|
+
* // "accountId": "my_accountId",
|
|
14110
|
+
* // "containerId": "my_containerId",
|
|
14111
|
+
* // "fingerprint": "my_fingerprint",
|
|
14112
|
+
* // "name": "my_name",
|
|
14113
|
+
* // "notes": "my_notes",
|
|
14114
|
+
* // "parameter": [],
|
|
14115
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
14116
|
+
* // "path": "my_path",
|
|
14117
|
+
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
14118
|
+
* // "transformationId": "my_transformationId",
|
|
14119
|
+
* // "type": "my_type",
|
|
14120
|
+
* // "workspaceId": "my_workspaceId"
|
|
14121
|
+
* // }
|
|
14122
|
+
* }
|
|
14123
|
+
*
|
|
14124
|
+
* main().catch(e => {
|
|
14125
|
+
* console.error(e);
|
|
14126
|
+
* throw e;
|
|
14127
|
+
* });
|
|
14128
|
+
*
|
|
14129
|
+
* ```
|
|
14130
|
+
*
|
|
14131
|
+
* @param params - Parameters for request
|
|
14132
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
14133
|
+
* @param callback - Optional callback that handles the response.
|
|
14134
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
14135
|
+
*/
|
|
14136
|
+
get(
|
|
14137
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Get,
|
|
14138
|
+
options: StreamMethodOptions
|
|
14139
|
+
): GaxiosPromise<Readable>;
|
|
14140
|
+
get(
|
|
14141
|
+
params?: Params$Resource$Accounts$Containers$Workspaces$Transformations$Get,
|
|
14142
|
+
options?: MethodOptions
|
|
14143
|
+
): GaxiosPromise<Schema$Transformation>;
|
|
14144
|
+
get(
|
|
14145
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Get,
|
|
14146
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
14147
|
+
callback: BodyResponseCallback<Readable>
|
|
14148
|
+
): void;
|
|
14149
|
+
get(
|
|
14150
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Get,
|
|
14151
|
+
options: MethodOptions | BodyResponseCallback<Schema$Transformation>,
|
|
14152
|
+
callback: BodyResponseCallback<Schema$Transformation>
|
|
14153
|
+
): void;
|
|
14154
|
+
get(
|
|
14155
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Get,
|
|
14156
|
+
callback: BodyResponseCallback<Schema$Transformation>
|
|
14157
|
+
): void;
|
|
14158
|
+
get(callback: BodyResponseCallback<Schema$Transformation>): void;
|
|
14159
|
+
get(
|
|
14160
|
+
paramsOrCallback?:
|
|
14161
|
+
| Params$Resource$Accounts$Containers$Workspaces$Transformations$Get
|
|
14162
|
+
| BodyResponseCallback<Schema$Transformation>
|
|
14163
|
+
| BodyResponseCallback<Readable>,
|
|
14164
|
+
optionsOrCallback?:
|
|
14165
|
+
| MethodOptions
|
|
14166
|
+
| StreamMethodOptions
|
|
14167
|
+
| BodyResponseCallback<Schema$Transformation>
|
|
14168
|
+
| BodyResponseCallback<Readable>,
|
|
14169
|
+
callback?:
|
|
14170
|
+
| BodyResponseCallback<Schema$Transformation>
|
|
14171
|
+
| BodyResponseCallback<Readable>
|
|
14172
|
+
): void | GaxiosPromise<Schema$Transformation> | GaxiosPromise<Readable> {
|
|
14173
|
+
let params = (paramsOrCallback ||
|
|
14174
|
+
{}) as Params$Resource$Accounts$Containers$Workspaces$Transformations$Get;
|
|
14175
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
14176
|
+
|
|
14177
|
+
if (typeof paramsOrCallback === 'function') {
|
|
14178
|
+
callback = paramsOrCallback;
|
|
14179
|
+
params =
|
|
14180
|
+
{} as Params$Resource$Accounts$Containers$Workspaces$Transformations$Get;
|
|
14181
|
+
options = {};
|
|
14182
|
+
}
|
|
14183
|
+
|
|
14184
|
+
if (typeof optionsOrCallback === 'function') {
|
|
14185
|
+
callback = optionsOrCallback;
|
|
14186
|
+
options = {};
|
|
14187
|
+
}
|
|
14188
|
+
|
|
14189
|
+
const rootUrl = options.rootUrl || 'https://tagmanager.googleapis.com/';
|
|
14190
|
+
const parameters = {
|
|
14191
|
+
options: Object.assign(
|
|
14192
|
+
{
|
|
14193
|
+
url: (rootUrl + '/tagmanager/v2/{+path}').replace(
|
|
14194
|
+
/([^:]\/)\/+/g,
|
|
14195
|
+
'$1'
|
|
14196
|
+
),
|
|
14197
|
+
method: 'GET',
|
|
14198
|
+
},
|
|
14199
|
+
options
|
|
14200
|
+
),
|
|
14201
|
+
params,
|
|
14202
|
+
requiredParams: ['path'],
|
|
14203
|
+
pathParams: ['path'],
|
|
14204
|
+
context: this.context,
|
|
14205
|
+
};
|
|
14206
|
+
if (callback) {
|
|
14207
|
+
createAPIRequest<Schema$Transformation>(
|
|
14208
|
+
parameters,
|
|
14209
|
+
callback as BodyResponseCallback<unknown>
|
|
14210
|
+
);
|
|
14211
|
+
} else {
|
|
14212
|
+
return createAPIRequest<Schema$Transformation>(parameters);
|
|
14213
|
+
}
|
|
14214
|
+
}
|
|
14215
|
+
|
|
14216
|
+
/**
|
|
14217
|
+
* Lists all GTM Transformations of a GTM container workspace.
|
|
14218
|
+
* @example
|
|
14219
|
+
* ```js
|
|
14220
|
+
* // Before running the sample:
|
|
14221
|
+
* // - Enable the API at:
|
|
14222
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
14223
|
+
* // - Login into gcloud by running:
|
|
14224
|
+
* // `$ gcloud auth application-default login`
|
|
14225
|
+
* // - Install the npm module by running:
|
|
14226
|
+
* // `$ npm install googleapis`
|
|
14227
|
+
*
|
|
14228
|
+
* const {google} = require('googleapis');
|
|
14229
|
+
* const tagmanager = google.tagmanager('v2');
|
|
14230
|
+
*
|
|
14231
|
+
* async function main() {
|
|
14232
|
+
* const auth = new google.auth.GoogleAuth({
|
|
14233
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
14234
|
+
* scopes: [
|
|
14235
|
+
* 'https://www.googleapis.com/auth/tagmanager.edit.containers',
|
|
14236
|
+
* 'https://www.googleapis.com/auth/tagmanager.readonly',
|
|
14237
|
+
* ],
|
|
14238
|
+
* });
|
|
14239
|
+
*
|
|
14240
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
14241
|
+
* const authClient = await auth.getClient();
|
|
14242
|
+
* google.options({auth: authClient});
|
|
14243
|
+
*
|
|
14244
|
+
* // Do the magic
|
|
14245
|
+
* const res =
|
|
14246
|
+
* await tagmanager.accounts.containers.workspaces.transformations.list({
|
|
14247
|
+
* // Continuation token for fetching the next page of results.
|
|
14248
|
+
* pageToken: 'placeholder-value',
|
|
14249
|
+
* // GTM Workspace's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}
|
|
14250
|
+
* parent:
|
|
14251
|
+
* 'accounts/my-account/containers/my-container/workspaces/my-workspace',
|
|
14252
|
+
* });
|
|
14253
|
+
* console.log(res.data);
|
|
14254
|
+
*
|
|
14255
|
+
* // Example response
|
|
14256
|
+
* // {
|
|
14257
|
+
* // "nextPageToken": "my_nextPageToken",
|
|
14258
|
+
* // "transformation": []
|
|
14259
|
+
* // }
|
|
14260
|
+
* }
|
|
14261
|
+
*
|
|
14262
|
+
* main().catch(e => {
|
|
14263
|
+
* console.error(e);
|
|
14264
|
+
* throw e;
|
|
14265
|
+
* });
|
|
14266
|
+
*
|
|
14267
|
+
* ```
|
|
14268
|
+
*
|
|
14269
|
+
* @param params - Parameters for request
|
|
14270
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
14271
|
+
* @param callback - Optional callback that handles the response.
|
|
14272
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
14273
|
+
*/
|
|
14274
|
+
list(
|
|
14275
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$List,
|
|
14276
|
+
options: StreamMethodOptions
|
|
14277
|
+
): GaxiosPromise<Readable>;
|
|
14278
|
+
list(
|
|
14279
|
+
params?: Params$Resource$Accounts$Containers$Workspaces$Transformations$List,
|
|
14280
|
+
options?: MethodOptions
|
|
14281
|
+
): GaxiosPromise<Schema$ListTransformationsResponse>;
|
|
14282
|
+
list(
|
|
14283
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$List,
|
|
14284
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
14285
|
+
callback: BodyResponseCallback<Readable>
|
|
14286
|
+
): void;
|
|
14287
|
+
list(
|
|
14288
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$List,
|
|
14289
|
+
options:
|
|
14290
|
+
| MethodOptions
|
|
14291
|
+
| BodyResponseCallback<Schema$ListTransformationsResponse>,
|
|
14292
|
+
callback: BodyResponseCallback<Schema$ListTransformationsResponse>
|
|
14293
|
+
): void;
|
|
14294
|
+
list(
|
|
14295
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$List,
|
|
14296
|
+
callback: BodyResponseCallback<Schema$ListTransformationsResponse>
|
|
14297
|
+
): void;
|
|
14298
|
+
list(
|
|
14299
|
+
callback: BodyResponseCallback<Schema$ListTransformationsResponse>
|
|
14300
|
+
): void;
|
|
14301
|
+
list(
|
|
14302
|
+
paramsOrCallback?:
|
|
14303
|
+
| Params$Resource$Accounts$Containers$Workspaces$Transformations$List
|
|
14304
|
+
| BodyResponseCallback<Schema$ListTransformationsResponse>
|
|
14305
|
+
| BodyResponseCallback<Readable>,
|
|
14306
|
+
optionsOrCallback?:
|
|
14307
|
+
| MethodOptions
|
|
14308
|
+
| StreamMethodOptions
|
|
14309
|
+
| BodyResponseCallback<Schema$ListTransformationsResponse>
|
|
14310
|
+
| BodyResponseCallback<Readable>,
|
|
14311
|
+
callback?:
|
|
14312
|
+
| BodyResponseCallback<Schema$ListTransformationsResponse>
|
|
14313
|
+
| BodyResponseCallback<Readable>
|
|
14314
|
+
):
|
|
14315
|
+
| void
|
|
14316
|
+
| GaxiosPromise<Schema$ListTransformationsResponse>
|
|
14317
|
+
| GaxiosPromise<Readable> {
|
|
14318
|
+
let params = (paramsOrCallback ||
|
|
14319
|
+
{}) as Params$Resource$Accounts$Containers$Workspaces$Transformations$List;
|
|
14320
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
14321
|
+
|
|
14322
|
+
if (typeof paramsOrCallback === 'function') {
|
|
14323
|
+
callback = paramsOrCallback;
|
|
14324
|
+
params =
|
|
14325
|
+
{} as Params$Resource$Accounts$Containers$Workspaces$Transformations$List;
|
|
14326
|
+
options = {};
|
|
14327
|
+
}
|
|
14328
|
+
|
|
14329
|
+
if (typeof optionsOrCallback === 'function') {
|
|
14330
|
+
callback = optionsOrCallback;
|
|
14331
|
+
options = {};
|
|
14332
|
+
}
|
|
14333
|
+
|
|
14334
|
+
const rootUrl = options.rootUrl || 'https://tagmanager.googleapis.com/';
|
|
14335
|
+
const parameters = {
|
|
14336
|
+
options: Object.assign(
|
|
14337
|
+
{
|
|
14338
|
+
url: (rootUrl + '/tagmanager/v2/{+parent}/transformations').replace(
|
|
14339
|
+
/([^:]\/)\/+/g,
|
|
14340
|
+
'$1'
|
|
14341
|
+
),
|
|
14342
|
+
method: 'GET',
|
|
14343
|
+
},
|
|
14344
|
+
options
|
|
14345
|
+
),
|
|
14346
|
+
params,
|
|
14347
|
+
requiredParams: ['parent'],
|
|
14348
|
+
pathParams: ['parent'],
|
|
14349
|
+
context: this.context,
|
|
14350
|
+
};
|
|
14351
|
+
if (callback) {
|
|
14352
|
+
createAPIRequest<Schema$ListTransformationsResponse>(
|
|
14353
|
+
parameters,
|
|
14354
|
+
callback as BodyResponseCallback<unknown>
|
|
14355
|
+
);
|
|
14356
|
+
} else {
|
|
14357
|
+
return createAPIRequest<Schema$ListTransformationsResponse>(parameters);
|
|
14358
|
+
}
|
|
14359
|
+
}
|
|
14360
|
+
|
|
14361
|
+
/**
|
|
14362
|
+
* Reverts changes to a GTM Transformation in a GTM Workspace.
|
|
14363
|
+
* @example
|
|
14364
|
+
* ```js
|
|
14365
|
+
* // Before running the sample:
|
|
14366
|
+
* // - Enable the API at:
|
|
14367
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
14368
|
+
* // - Login into gcloud by running:
|
|
14369
|
+
* // `$ gcloud auth application-default login`
|
|
14370
|
+
* // - Install the npm module by running:
|
|
14371
|
+
* // `$ npm install googleapis`
|
|
14372
|
+
*
|
|
14373
|
+
* const {google} = require('googleapis');
|
|
14374
|
+
* const tagmanager = google.tagmanager('v2');
|
|
14375
|
+
*
|
|
14376
|
+
* async function main() {
|
|
14377
|
+
* const auth = new google.auth.GoogleAuth({
|
|
14378
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
14379
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
14380
|
+
* });
|
|
14381
|
+
*
|
|
14382
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
14383
|
+
* const authClient = await auth.getClient();
|
|
14384
|
+
* google.options({auth: authClient});
|
|
14385
|
+
*
|
|
14386
|
+
* // Do the magic
|
|
14387
|
+
* const res =
|
|
14388
|
+
* await tagmanager.accounts.containers.workspaces.transformations.revert({
|
|
14389
|
+
* // When provided, this fingerprint must match the fingerprint of the transformation in storage.
|
|
14390
|
+
* fingerprint: 'placeholder-value',
|
|
14391
|
+
* // GTM Transformation's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}/transformations/{transformation_id\}
|
|
14392
|
+
* path: 'accounts/my-account/containers/my-container/workspaces/my-workspace/transformations/my-transformation',
|
|
14393
|
+
* });
|
|
14394
|
+
* console.log(res.data);
|
|
14395
|
+
*
|
|
14396
|
+
* // Example response
|
|
14397
|
+
* // {
|
|
14398
|
+
* // "transformation": {}
|
|
14399
|
+
* // }
|
|
14400
|
+
* }
|
|
14401
|
+
*
|
|
14402
|
+
* main().catch(e => {
|
|
14403
|
+
* console.error(e);
|
|
14404
|
+
* throw e;
|
|
14405
|
+
* });
|
|
14406
|
+
*
|
|
14407
|
+
* ```
|
|
14408
|
+
*
|
|
14409
|
+
* @param params - Parameters for request
|
|
14410
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
14411
|
+
* @param callback - Optional callback that handles the response.
|
|
14412
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
14413
|
+
*/
|
|
14414
|
+
revert(
|
|
14415
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Revert,
|
|
14416
|
+
options: StreamMethodOptions
|
|
14417
|
+
): GaxiosPromise<Readable>;
|
|
14418
|
+
revert(
|
|
14419
|
+
params?: Params$Resource$Accounts$Containers$Workspaces$Transformations$Revert,
|
|
14420
|
+
options?: MethodOptions
|
|
14421
|
+
): GaxiosPromise<Schema$RevertTransformationResponse>;
|
|
14422
|
+
revert(
|
|
14423
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Revert,
|
|
14424
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
14425
|
+
callback: BodyResponseCallback<Readable>
|
|
14426
|
+
): void;
|
|
14427
|
+
revert(
|
|
14428
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Revert,
|
|
14429
|
+
options:
|
|
14430
|
+
| MethodOptions
|
|
14431
|
+
| BodyResponseCallback<Schema$RevertTransformationResponse>,
|
|
14432
|
+
callback: BodyResponseCallback<Schema$RevertTransformationResponse>
|
|
14433
|
+
): void;
|
|
14434
|
+
revert(
|
|
14435
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Revert,
|
|
14436
|
+
callback: BodyResponseCallback<Schema$RevertTransformationResponse>
|
|
14437
|
+
): void;
|
|
14438
|
+
revert(
|
|
14439
|
+
callback: BodyResponseCallback<Schema$RevertTransformationResponse>
|
|
14440
|
+
): void;
|
|
14441
|
+
revert(
|
|
14442
|
+
paramsOrCallback?:
|
|
14443
|
+
| Params$Resource$Accounts$Containers$Workspaces$Transformations$Revert
|
|
14444
|
+
| BodyResponseCallback<Schema$RevertTransformationResponse>
|
|
14445
|
+
| BodyResponseCallback<Readable>,
|
|
14446
|
+
optionsOrCallback?:
|
|
14447
|
+
| MethodOptions
|
|
14448
|
+
| StreamMethodOptions
|
|
14449
|
+
| BodyResponseCallback<Schema$RevertTransformationResponse>
|
|
14450
|
+
| BodyResponseCallback<Readable>,
|
|
14451
|
+
callback?:
|
|
14452
|
+
| BodyResponseCallback<Schema$RevertTransformationResponse>
|
|
14453
|
+
| BodyResponseCallback<Readable>
|
|
14454
|
+
):
|
|
14455
|
+
| void
|
|
14456
|
+
| GaxiosPromise<Schema$RevertTransformationResponse>
|
|
14457
|
+
| GaxiosPromise<Readable> {
|
|
14458
|
+
let params = (paramsOrCallback ||
|
|
14459
|
+
{}) as Params$Resource$Accounts$Containers$Workspaces$Transformations$Revert;
|
|
14460
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
14461
|
+
|
|
14462
|
+
if (typeof paramsOrCallback === 'function') {
|
|
14463
|
+
callback = paramsOrCallback;
|
|
14464
|
+
params =
|
|
14465
|
+
{} as Params$Resource$Accounts$Containers$Workspaces$Transformations$Revert;
|
|
14466
|
+
options = {};
|
|
14467
|
+
}
|
|
14468
|
+
|
|
14469
|
+
if (typeof optionsOrCallback === 'function') {
|
|
14470
|
+
callback = optionsOrCallback;
|
|
14471
|
+
options = {};
|
|
14472
|
+
}
|
|
14473
|
+
|
|
14474
|
+
const rootUrl = options.rootUrl || 'https://tagmanager.googleapis.com/';
|
|
14475
|
+
const parameters = {
|
|
14476
|
+
options: Object.assign(
|
|
14477
|
+
{
|
|
14478
|
+
url: (rootUrl + '/tagmanager/v2/{+path}:revert').replace(
|
|
14479
|
+
/([^:]\/)\/+/g,
|
|
14480
|
+
'$1'
|
|
14481
|
+
),
|
|
14482
|
+
method: 'POST',
|
|
14483
|
+
},
|
|
14484
|
+
options
|
|
14485
|
+
),
|
|
14486
|
+
params,
|
|
14487
|
+
requiredParams: ['path'],
|
|
14488
|
+
pathParams: ['path'],
|
|
14489
|
+
context: this.context,
|
|
14490
|
+
};
|
|
14491
|
+
if (callback) {
|
|
14492
|
+
createAPIRequest<Schema$RevertTransformationResponse>(
|
|
14493
|
+
parameters,
|
|
14494
|
+
callback as BodyResponseCallback<unknown>
|
|
14495
|
+
);
|
|
14496
|
+
} else {
|
|
14497
|
+
return createAPIRequest<Schema$RevertTransformationResponse>(
|
|
14498
|
+
parameters
|
|
14499
|
+
);
|
|
14500
|
+
}
|
|
14501
|
+
}
|
|
14502
|
+
|
|
14503
|
+
/**
|
|
14504
|
+
* Updates a GTM Transformation.
|
|
14505
|
+
* @example
|
|
14506
|
+
* ```js
|
|
14507
|
+
* // Before running the sample:
|
|
14508
|
+
* // - Enable the API at:
|
|
14509
|
+
* // https://console.developers.google.com/apis/api/tagmanager.googleapis.com
|
|
14510
|
+
* // - Login into gcloud by running:
|
|
14511
|
+
* // `$ gcloud auth application-default login`
|
|
14512
|
+
* // - Install the npm module by running:
|
|
14513
|
+
* // `$ npm install googleapis`
|
|
14514
|
+
*
|
|
14515
|
+
* const {google} = require('googleapis');
|
|
14516
|
+
* const tagmanager = google.tagmanager('v2');
|
|
14517
|
+
*
|
|
14518
|
+
* async function main() {
|
|
14519
|
+
* const auth = new google.auth.GoogleAuth({
|
|
14520
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
14521
|
+
* scopes: ['https://www.googleapis.com/auth/tagmanager.edit.containers'],
|
|
14522
|
+
* });
|
|
14523
|
+
*
|
|
14524
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
14525
|
+
* const authClient = await auth.getClient();
|
|
14526
|
+
* google.options({auth: authClient});
|
|
14527
|
+
*
|
|
14528
|
+
* // Do the magic
|
|
14529
|
+
* const res =
|
|
14530
|
+
* await tagmanager.accounts.containers.workspaces.transformations.update({
|
|
14531
|
+
* // When provided, this fingerprint must match the fingerprint of the transformation in storage.
|
|
14532
|
+
* fingerprint: 'placeholder-value',
|
|
14533
|
+
* // GTM Transformation's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}/transformations/{transformation_id\}
|
|
14534
|
+
* path: 'accounts/my-account/containers/my-container/workspaces/my-workspace/transformations/my-transformation',
|
|
14535
|
+
*
|
|
14536
|
+
* // Request body metadata
|
|
14537
|
+
* requestBody: {
|
|
14538
|
+
* // request body parameters
|
|
14539
|
+
* // {
|
|
14540
|
+
* // "accountId": "my_accountId",
|
|
14541
|
+
* // "containerId": "my_containerId",
|
|
14542
|
+
* // "fingerprint": "my_fingerprint",
|
|
14543
|
+
* // "name": "my_name",
|
|
14544
|
+
* // "notes": "my_notes",
|
|
14545
|
+
* // "parameter": [],
|
|
14546
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
14547
|
+
* // "path": "my_path",
|
|
14548
|
+
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
14549
|
+
* // "transformationId": "my_transformationId",
|
|
14550
|
+
* // "type": "my_type",
|
|
14551
|
+
* // "workspaceId": "my_workspaceId"
|
|
14552
|
+
* // }
|
|
14553
|
+
* },
|
|
14554
|
+
* });
|
|
14555
|
+
* console.log(res.data);
|
|
14556
|
+
*
|
|
14557
|
+
* // Example response
|
|
14558
|
+
* // {
|
|
14559
|
+
* // "accountId": "my_accountId",
|
|
14560
|
+
* // "containerId": "my_containerId",
|
|
14561
|
+
* // "fingerprint": "my_fingerprint",
|
|
14562
|
+
* // "name": "my_name",
|
|
14563
|
+
* // "notes": "my_notes",
|
|
14564
|
+
* // "parameter": [],
|
|
14565
|
+
* // "parentFolderId": "my_parentFolderId",
|
|
14566
|
+
* // "path": "my_path",
|
|
14567
|
+
* // "tagManagerUrl": "my_tagManagerUrl",
|
|
14568
|
+
* // "transformationId": "my_transformationId",
|
|
14569
|
+
* // "type": "my_type",
|
|
14570
|
+
* // "workspaceId": "my_workspaceId"
|
|
14571
|
+
* // }
|
|
14572
|
+
* }
|
|
14573
|
+
*
|
|
14574
|
+
* main().catch(e => {
|
|
14575
|
+
* console.error(e);
|
|
14576
|
+
* throw e;
|
|
14577
|
+
* });
|
|
14578
|
+
*
|
|
14579
|
+
* ```
|
|
14580
|
+
*
|
|
14581
|
+
* @param params - Parameters for request
|
|
14582
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
14583
|
+
* @param callback - Optional callback that handles the response.
|
|
14584
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
14585
|
+
*/
|
|
14586
|
+
update(
|
|
14587
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Update,
|
|
14588
|
+
options: StreamMethodOptions
|
|
14589
|
+
): GaxiosPromise<Readable>;
|
|
14590
|
+
update(
|
|
14591
|
+
params?: Params$Resource$Accounts$Containers$Workspaces$Transformations$Update,
|
|
14592
|
+
options?: MethodOptions
|
|
14593
|
+
): GaxiosPromise<Schema$Transformation>;
|
|
14594
|
+
update(
|
|
14595
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Update,
|
|
14596
|
+
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
14597
|
+
callback: BodyResponseCallback<Readable>
|
|
14598
|
+
): void;
|
|
14599
|
+
update(
|
|
14600
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Update,
|
|
14601
|
+
options: MethodOptions | BodyResponseCallback<Schema$Transformation>,
|
|
14602
|
+
callback: BodyResponseCallback<Schema$Transformation>
|
|
14603
|
+
): void;
|
|
14604
|
+
update(
|
|
14605
|
+
params: Params$Resource$Accounts$Containers$Workspaces$Transformations$Update,
|
|
14606
|
+
callback: BodyResponseCallback<Schema$Transformation>
|
|
14607
|
+
): void;
|
|
14608
|
+
update(callback: BodyResponseCallback<Schema$Transformation>): void;
|
|
14609
|
+
update(
|
|
14610
|
+
paramsOrCallback?:
|
|
14611
|
+
| Params$Resource$Accounts$Containers$Workspaces$Transformations$Update
|
|
14612
|
+
| BodyResponseCallback<Schema$Transformation>
|
|
14613
|
+
| BodyResponseCallback<Readable>,
|
|
14614
|
+
optionsOrCallback?:
|
|
14615
|
+
| MethodOptions
|
|
14616
|
+
| StreamMethodOptions
|
|
14617
|
+
| BodyResponseCallback<Schema$Transformation>
|
|
14618
|
+
| BodyResponseCallback<Readable>,
|
|
14619
|
+
callback?:
|
|
14620
|
+
| BodyResponseCallback<Schema$Transformation>
|
|
14621
|
+
| BodyResponseCallback<Readable>
|
|
14622
|
+
): void | GaxiosPromise<Schema$Transformation> | GaxiosPromise<Readable> {
|
|
14623
|
+
let params = (paramsOrCallback ||
|
|
14624
|
+
{}) as Params$Resource$Accounts$Containers$Workspaces$Transformations$Update;
|
|
14625
|
+
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
14626
|
+
|
|
14627
|
+
if (typeof paramsOrCallback === 'function') {
|
|
14628
|
+
callback = paramsOrCallback;
|
|
14629
|
+
params =
|
|
14630
|
+
{} as Params$Resource$Accounts$Containers$Workspaces$Transformations$Update;
|
|
14631
|
+
options = {};
|
|
14632
|
+
}
|
|
14633
|
+
|
|
14634
|
+
if (typeof optionsOrCallback === 'function') {
|
|
14635
|
+
callback = optionsOrCallback;
|
|
14636
|
+
options = {};
|
|
14637
|
+
}
|
|
14638
|
+
|
|
14639
|
+
const rootUrl = options.rootUrl || 'https://tagmanager.googleapis.com/';
|
|
14640
|
+
const parameters = {
|
|
14641
|
+
options: Object.assign(
|
|
14642
|
+
{
|
|
14643
|
+
url: (rootUrl + '/tagmanager/v2/{+path}').replace(
|
|
14644
|
+
/([^:]\/)\/+/g,
|
|
14645
|
+
'$1'
|
|
14646
|
+
),
|
|
14647
|
+
method: 'PUT',
|
|
14648
|
+
},
|
|
14649
|
+
options
|
|
14650
|
+
),
|
|
14651
|
+
params,
|
|
14652
|
+
requiredParams: ['path'],
|
|
14653
|
+
pathParams: ['path'],
|
|
14654
|
+
context: this.context,
|
|
14655
|
+
};
|
|
14656
|
+
if (callback) {
|
|
14657
|
+
createAPIRequest<Schema$Transformation>(
|
|
14658
|
+
parameters,
|
|
14659
|
+
callback as BodyResponseCallback<unknown>
|
|
14660
|
+
);
|
|
14661
|
+
} else {
|
|
14662
|
+
return createAPIRequest<Schema$Transformation>(parameters);
|
|
14663
|
+
}
|
|
14664
|
+
}
|
|
14665
|
+
}
|
|
14666
|
+
|
|
14667
|
+
export interface Params$Resource$Accounts$Containers$Workspaces$Transformations$Create
|
|
14668
|
+
extends StandardParameters {
|
|
14669
|
+
/**
|
|
14670
|
+
* GTM Workspace's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}
|
|
14671
|
+
*/
|
|
14672
|
+
parent?: string;
|
|
14673
|
+
|
|
14674
|
+
/**
|
|
14675
|
+
* Request body metadata
|
|
14676
|
+
*/
|
|
14677
|
+
requestBody?: Schema$Transformation;
|
|
14678
|
+
}
|
|
14679
|
+
export interface Params$Resource$Accounts$Containers$Workspaces$Transformations$Delete
|
|
14680
|
+
extends StandardParameters {
|
|
14681
|
+
/**
|
|
14682
|
+
* GTM Transformation's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}/transformations/{transformation_id\}
|
|
14683
|
+
*/
|
|
14684
|
+
path?: string;
|
|
14685
|
+
}
|
|
14686
|
+
export interface Params$Resource$Accounts$Containers$Workspaces$Transformations$Get
|
|
14687
|
+
extends StandardParameters {
|
|
14688
|
+
/**
|
|
14689
|
+
* GTM Transformation's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}/transformations/{transformation_id\}
|
|
14690
|
+
*/
|
|
14691
|
+
path?: string;
|
|
14692
|
+
}
|
|
14693
|
+
export interface Params$Resource$Accounts$Containers$Workspaces$Transformations$List
|
|
14694
|
+
extends StandardParameters {
|
|
14695
|
+
/**
|
|
14696
|
+
* Continuation token for fetching the next page of results.
|
|
14697
|
+
*/
|
|
14698
|
+
pageToken?: string;
|
|
14699
|
+
/**
|
|
14700
|
+
* GTM Workspace's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}
|
|
14701
|
+
*/
|
|
14702
|
+
parent?: string;
|
|
14703
|
+
}
|
|
14704
|
+
export interface Params$Resource$Accounts$Containers$Workspaces$Transformations$Revert
|
|
14705
|
+
extends StandardParameters {
|
|
14706
|
+
/**
|
|
14707
|
+
* When provided, this fingerprint must match the fingerprint of the transformation in storage.
|
|
14708
|
+
*/
|
|
14709
|
+
fingerprint?: string;
|
|
14710
|
+
/**
|
|
14711
|
+
* GTM Transformation's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}/transformations/{transformation_id\}
|
|
14712
|
+
*/
|
|
14713
|
+
path?: string;
|
|
14714
|
+
}
|
|
14715
|
+
export interface Params$Resource$Accounts$Containers$Workspaces$Transformations$Update
|
|
14716
|
+
extends StandardParameters {
|
|
14717
|
+
/**
|
|
14718
|
+
* When provided, this fingerprint must match the fingerprint of the transformation in storage.
|
|
14719
|
+
*/
|
|
14720
|
+
fingerprint?: string;
|
|
14721
|
+
/**
|
|
14722
|
+
* GTM Transformation's API relative path. Example: accounts/{account_id\}/containers/{container_id\}/workspaces/{workspace_id\}/transformations/{transformation_id\}
|
|
14723
|
+
*/
|
|
14724
|
+
path?: string;
|
|
14725
|
+
|
|
14726
|
+
/**
|
|
14727
|
+
* Request body metadata
|
|
14728
|
+
*/
|
|
14729
|
+
requestBody?: Schema$Transformation;
|
|
14730
|
+
}
|
|
14731
|
+
|
|
13683
14732
|
export class Resource$Accounts$Containers$Workspaces$Triggers {
|
|
13684
14733
|
context: APIRequestContext;
|
|
13685
14734
|
constructor(context: APIRequestContext) {
|