@oursprivacy/platform-sdk 1.25.0 → 1.27.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.
Files changed (151) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/client.d.mts +18 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +18 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +18 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +18 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/consent-analytics.d.mts +4 -2
  12. package/resources/consent-analytics.d.mts.map +1 -1
  13. package/resources/consent-analytics.d.ts +4 -2
  14. package/resources/consent-analytics.d.ts.map +1 -1
  15. package/resources/consent-analytics.js +4 -2
  16. package/resources/consent-analytics.js.map +1 -1
  17. package/resources/consent-analytics.mjs +4 -2
  18. package/resources/consent-analytics.mjs.map +1 -1
  19. package/resources/consent-settings.d.mts +11 -9
  20. package/resources/consent-settings.d.mts.map +1 -1
  21. package/resources/consent-settings.d.ts +11 -9
  22. package/resources/consent-settings.d.ts.map +1 -1
  23. package/resources/consent-settings.js +11 -9
  24. package/resources/consent-settings.js.map +1 -1
  25. package/resources/consent-settings.mjs +11 -9
  26. package/resources/consent-settings.mjs.map +1 -1
  27. package/resources/data-governance.d.mts +7 -7
  28. package/resources/data-governance.d.ts +7 -7
  29. package/resources/data-governance.js +6 -6
  30. package/resources/data-governance.mjs +6 -6
  31. package/resources/destinations.d.mts +7 -7
  32. package/resources/destinations.d.mts.map +1 -1
  33. package/resources/destinations.d.ts +7 -7
  34. package/resources/destinations.d.ts.map +1 -1
  35. package/resources/heatmap-pages.d.mts +4 -5
  36. package/resources/heatmap-pages.d.mts.map +1 -1
  37. package/resources/heatmap-pages.d.ts +4 -5
  38. package/resources/heatmap-pages.d.ts.map +1 -1
  39. package/resources/heatmap-pages.js +4 -5
  40. package/resources/heatmap-pages.js.map +1 -1
  41. package/resources/heatmap-pages.mjs +4 -5
  42. package/resources/heatmap-pages.mjs.map +1 -1
  43. package/resources/index.d.mts +6 -0
  44. package/resources/index.d.mts.map +1 -1
  45. package/resources/index.d.ts +6 -0
  46. package/resources/index.d.ts.map +1 -1
  47. package/resources/index.js +13 -1
  48. package/resources/index.js.map +1 -1
  49. package/resources/index.mjs +6 -0
  50. package/resources/index.mjs.map +1 -1
  51. package/resources/locations.d.mts +3 -3
  52. package/resources/locations.d.ts +3 -3
  53. package/resources/locations.js +3 -3
  54. package/resources/locations.mjs +3 -3
  55. package/resources/mappings.d.mts +5 -6
  56. package/resources/mappings.d.mts.map +1 -1
  57. package/resources/mappings.d.ts +5 -6
  58. package/resources/mappings.d.ts.map +1 -1
  59. package/resources/mappings.js +5 -6
  60. package/resources/mappings.js.map +1 -1
  61. package/resources/mappings.mjs +5 -6
  62. package/resources/mappings.mjs.map +1 -1
  63. package/resources/sources.d.mts +8 -7
  64. package/resources/sources.d.mts.map +1 -1
  65. package/resources/sources.d.ts +8 -7
  66. package/resources/sources.d.ts.map +1 -1
  67. package/resources/sources.js +6 -5
  68. package/resources/sources.js.map +1 -1
  69. package/resources/sources.mjs +6 -5
  70. package/resources/sources.mjs.map +1 -1
  71. package/resources/tag-manager-asset-folders.d.mts +42 -0
  72. package/resources/tag-manager-asset-folders.d.mts.map +1 -0
  73. package/resources/tag-manager-asset-folders.d.ts +42 -0
  74. package/resources/tag-manager-asset-folders.d.ts.map +1 -0
  75. package/resources/tag-manager-asset-folders.js +18 -0
  76. package/resources/tag-manager-asset-folders.js.map +1 -0
  77. package/resources/tag-manager-asset-folders.mjs +14 -0
  78. package/resources/tag-manager-asset-folders.mjs.map +1 -0
  79. package/resources/tag-manager-folders.d.mts +100 -0
  80. package/resources/tag-manager-folders.d.mts.map +1 -0
  81. package/resources/tag-manager-folders.d.ts +100 -0
  82. package/resources/tag-manager-folders.d.ts.map +1 -0
  83. package/resources/tag-manager-folders.js +55 -0
  84. package/resources/tag-manager-folders.js.map +1 -0
  85. package/resources/tag-manager-folders.mjs +51 -0
  86. package/resources/tag-manager-folders.mjs.map +1 -0
  87. package/resources/tag-manager-tags.d.mts +414 -0
  88. package/resources/tag-manager-tags.d.mts.map +1 -0
  89. package/resources/tag-manager-tags.d.ts +414 -0
  90. package/resources/tag-manager-tags.d.ts.map +1 -0
  91. package/resources/tag-manager-tags.js +64 -0
  92. package/resources/tag-manager-tags.js.map +1 -0
  93. package/resources/tag-manager-tags.mjs +60 -0
  94. package/resources/tag-manager-tags.mjs.map +1 -0
  95. package/resources/tag-manager-triggers.d.mts +321 -0
  96. package/resources/tag-manager-triggers.d.mts.map +1 -0
  97. package/resources/tag-manager-triggers.d.ts +321 -0
  98. package/resources/tag-manager-triggers.d.ts.map +1 -0
  99. package/resources/tag-manager-triggers.js +62 -0
  100. package/resources/tag-manager-triggers.js.map +1 -0
  101. package/resources/tag-manager-triggers.mjs +58 -0
  102. package/resources/tag-manager-triggers.mjs.map +1 -0
  103. package/resources/tag-manager-variables.d.mts +356 -0
  104. package/resources/tag-manager-variables.d.mts.map +1 -0
  105. package/resources/tag-manager-variables.d.ts +356 -0
  106. package/resources/tag-manager-variables.d.ts.map +1 -0
  107. package/resources/tag-manager-variables.js +64 -0
  108. package/resources/tag-manager-variables.js.map +1 -0
  109. package/resources/tag-manager-variables.mjs +60 -0
  110. package/resources/tag-manager-variables.mjs.map +1 -0
  111. package/resources/tag-managers.d.mts +211 -0
  112. package/resources/tag-managers.d.mts.map +1 -0
  113. package/resources/tag-managers.d.ts +211 -0
  114. package/resources/tag-managers.d.ts.map +1 -0
  115. package/resources/tag-managers.js +55 -0
  116. package/resources/tag-managers.js.map +1 -0
  117. package/resources/tag-managers.mjs +51 -0
  118. package/resources/tag-managers.mjs.map +1 -0
  119. package/resources/web-scanner-rules.d.mts +1 -1
  120. package/resources/web-scanner-rules.d.ts +1 -1
  121. package/resources/web-scanners.d.mts +6 -7
  122. package/resources/web-scanners.d.mts.map +1 -1
  123. package/resources/web-scanners.d.ts +6 -7
  124. package/resources/web-scanners.d.ts.map +1 -1
  125. package/resources/web-scanners.js +5 -6
  126. package/resources/web-scanners.js.map +1 -1
  127. package/resources/web-scanners.mjs +5 -6
  128. package/resources/web-scanners.mjs.map +1 -1
  129. package/src/client.ts +150 -0
  130. package/src/resources/consent-analytics.ts +4 -2
  131. package/src/resources/consent-settings.ts +11 -9
  132. package/src/resources/data-governance.ts +7 -7
  133. package/src/resources/destinations.ts +9 -2
  134. package/src/resources/heatmap-pages.ts +4 -5
  135. package/src/resources/index.ts +66 -0
  136. package/src/resources/locations.ts +3 -3
  137. package/src/resources/mappings.ts +5 -6
  138. package/src/resources/sources.ts +8 -7
  139. package/src/resources/tag-manager-asset-folders.ts +64 -0
  140. package/src/resources/tag-manager-folders.ts +172 -0
  141. package/src/resources/tag-manager-tags.ts +533 -0
  142. package/src/resources/tag-manager-triggers.ts +419 -0
  143. package/src/resources/tag-manager-variables.ts +449 -0
  144. package/src/resources/tag-managers.ts +276 -0
  145. package/src/resources/web-scanner-rules.ts +1 -1
  146. package/src/resources/web-scanners.ts +6 -7
  147. package/src/version.ts +1 -1
  148. package/version.d.mts +1 -1
  149. package/version.d.ts +1 -1
  150. package/version.js +1 -1
  151. package/version.mjs +1 -1
@@ -0,0 +1,449 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class TagManagerVariables extends APIResource {
10
+ /**
11
+ * List variables inside a single tag manager. Requires the `tagManagerId` query
12
+ * parameter — variables are always scoped to one parent container. Supports cursor
13
+ * pagination via `limit` and `cursor`; the limit clamp is 1000 so a single request
14
+ * can return the full set (the web-app workspace renders all variables in one
15
+ * shot). Requires scope: tagManagers:find
16
+ */
17
+ list(
18
+ query: TagManagerVariableListParams,
19
+ options?: RequestOptions,
20
+ ): PagePromise<TagManagerVariableListResponsesCursor, TagManagerVariableListResponse> {
21
+ return this._client.getAPIList('/rest/v1/tag-manager-variables', Cursor<TagManagerVariableListResponse>, {
22
+ query,
23
+ ...options,
24
+ });
25
+ }
26
+
27
+ /**
28
+ * Create a new variable inside a tag manager. `tagManagerId` is required in the
29
+ * body. Known input failures (e.g. duplicate variable name within the tag manager)
30
+ * are returned as HTTP 409 with the reason in the response `error` field. Requires
31
+ * scope: tagManagers:update
32
+ */
33
+ create(
34
+ body: TagManagerVariableCreateParams,
35
+ options?: RequestOptions,
36
+ ): APIPromise<TagManagerVariableCreateResponse> {
37
+ return this._client.post('/rest/v1/tag-manager-variables', { body, ...options });
38
+ }
39
+
40
+ /**
41
+ * Find a single tag manager variable by ID. Requires scope: tagManagers:find
42
+ */
43
+ retrieve(id: string, options?: RequestOptions): APIPromise<TagManagerVariableRetrieveResponse> {
44
+ return this._client.get(path`/rest/v1/tag-manager-variables/${id}`, options);
45
+ }
46
+
47
+ /**
48
+ * Partially update a variable. Only the fields you send are changed. Name
49
+ * collisions with other variables in the same tag manager return 409 with the
50
+ * reason in the response `error` field. To assign a variable to a folder, use
51
+ * `POST /rest/v1/tag-manager-asset-folders`. Requires scope: tagManagers:update
52
+ */
53
+ update(
54
+ id: string,
55
+ body: TagManagerVariableUpdateParams,
56
+ options?: RequestOptions,
57
+ ): APIPromise<TagManagerVariableUpdateResponse> {
58
+ return this._client.patch(path`/rest/v1/tag-manager-variables/${id}`, { body, ...options });
59
+ }
60
+
61
+ /**
62
+ * Delete a tag manager variable. Requires scope: tagManagers:update
63
+ */
64
+ delete(id: string, options?: RequestOptions): APIPromise<TagManagerVariableDeleteResponse> {
65
+ return this._client.delete(path`/rest/v1/tag-manager-variables/${id}`, options);
66
+ }
67
+
68
+ /**
69
+ * Lists every variable template the platform supports — what `type` discriminator
70
+ * to send on create/patch, the shape of the type-specific `parameters` payload,
71
+ * and `supportsVariables` (whether the variable's own parameter fields may
72
+ * reference `{{OtherVariable}}` at runtime). Account-agnostic: the response is the
73
+ * same for every API key. Requires scope: tagManagers:find
74
+ */
75
+ types(options?: RequestOptions): APIPromise<TagManagerVariableTypesResponse> {
76
+ return this._client.get('/rest/v1/tag-manager-variables/types', options);
77
+ }
78
+ }
79
+
80
+ export type TagManagerVariableListResponsesCursor = Cursor<TagManagerVariableListResponse>;
81
+
82
+ export interface TagManagerVariableListResponse {
83
+ id: string;
84
+
85
+ accountId: string;
86
+
87
+ name: string;
88
+
89
+ /**
90
+ * Type-specific configuration.
91
+ */
92
+ parameters: { [key: string]: unknown };
93
+
94
+ tagManagerId: string;
95
+
96
+ /**
97
+ * Variable type discriminator. Examples that exist today: `DataLayer`, `Constant`,
98
+ * `Cookie`, `Url`, `UrlParameter`, `Weekday`, `RandomNumber`. Pick from
99
+ * `GET /tag-manager-variables/types` for the canonical set.
100
+ */
101
+ type: string;
102
+
103
+ createdAt?: string | null;
104
+
105
+ /**
106
+ * Default value returned when no rule matches. JSON value — type depends on
107
+ * `type`.
108
+ */
109
+ defaultValue?: { [key: string]: unknown };
110
+
111
+ enabled?: boolean | null;
112
+
113
+ /**
114
+ * Folder this variable belongs to. Settable via PATCH — send a folder UUID to
115
+ * assign, or `null` to remove from its current folder.
116
+ */
117
+ folderId?: string | null;
118
+
119
+ /**
120
+ * Optional lookup table for `LookUpTable`-style variables. JSON value.
121
+ */
122
+ lookUpTable?: { [key: string]: unknown };
123
+
124
+ updatedAt?: string | null;
125
+ }
126
+
127
+ export interface TagManagerVariableCreateResponse {
128
+ id: string;
129
+
130
+ accountId: string;
131
+
132
+ name: string;
133
+
134
+ /**
135
+ * Type-specific configuration.
136
+ */
137
+ parameters: { [key: string]: unknown };
138
+
139
+ tagManagerId: string;
140
+
141
+ /**
142
+ * Variable type discriminator. Examples that exist today: `DataLayer`, `Constant`,
143
+ * `Cookie`, `Url`, `UrlParameter`, `Weekday`, `RandomNumber`. Pick from
144
+ * `GET /tag-manager-variables/types` for the canonical set.
145
+ */
146
+ type: string;
147
+
148
+ createdAt?: string | null;
149
+
150
+ /**
151
+ * Default value returned when no rule matches. JSON value — type depends on
152
+ * `type`.
153
+ */
154
+ defaultValue?: { [key: string]: unknown };
155
+
156
+ enabled?: boolean | null;
157
+
158
+ /**
159
+ * Folder this variable belongs to. Settable via PATCH — send a folder UUID to
160
+ * assign, or `null` to remove from its current folder.
161
+ */
162
+ folderId?: string | null;
163
+
164
+ /**
165
+ * Optional lookup table for `LookUpTable`-style variables. JSON value.
166
+ */
167
+ lookUpTable?: { [key: string]: unknown };
168
+
169
+ updatedAt?: string | null;
170
+ }
171
+
172
+ export interface TagManagerVariableRetrieveResponse {
173
+ id: string;
174
+
175
+ accountId: string;
176
+
177
+ name: string;
178
+
179
+ /**
180
+ * Type-specific configuration.
181
+ */
182
+ parameters: { [key: string]: unknown };
183
+
184
+ tagManagerId: string;
185
+
186
+ /**
187
+ * Variable type discriminator. Examples that exist today: `DataLayer`, `Constant`,
188
+ * `Cookie`, `Url`, `UrlParameter`, `Weekday`, `RandomNumber`. Pick from
189
+ * `GET /tag-manager-variables/types` for the canonical set.
190
+ */
191
+ type: string;
192
+
193
+ createdAt?: string | null;
194
+
195
+ /**
196
+ * Default value returned when no rule matches. JSON value — type depends on
197
+ * `type`.
198
+ */
199
+ defaultValue?: { [key: string]: unknown };
200
+
201
+ enabled?: boolean | null;
202
+
203
+ /**
204
+ * Folder this variable belongs to. Settable via PATCH — send a folder UUID to
205
+ * assign, or `null` to remove from its current folder.
206
+ */
207
+ folderId?: string | null;
208
+
209
+ /**
210
+ * Optional lookup table for `LookUpTable`-style variables. JSON value.
211
+ */
212
+ lookUpTable?: { [key: string]: unknown };
213
+
214
+ updatedAt?: string | null;
215
+ }
216
+
217
+ export interface TagManagerVariableUpdateResponse {
218
+ id: string;
219
+
220
+ accountId: string;
221
+
222
+ name: string;
223
+
224
+ /**
225
+ * Type-specific configuration.
226
+ */
227
+ parameters: { [key: string]: unknown };
228
+
229
+ tagManagerId: string;
230
+
231
+ /**
232
+ * Variable type discriminator. Examples that exist today: `DataLayer`, `Constant`,
233
+ * `Cookie`, `Url`, `UrlParameter`, `Weekday`, `RandomNumber`. Pick from
234
+ * `GET /tag-manager-variables/types` for the canonical set.
235
+ */
236
+ type: string;
237
+
238
+ createdAt?: string | null;
239
+
240
+ /**
241
+ * Default value returned when no rule matches. JSON value — type depends on
242
+ * `type`.
243
+ */
244
+ defaultValue?: { [key: string]: unknown };
245
+
246
+ enabled?: boolean | null;
247
+
248
+ /**
249
+ * Folder this variable belongs to. Settable via PATCH — send a folder UUID to
250
+ * assign, or `null` to remove from its current folder.
251
+ */
252
+ folderId?: string | null;
253
+
254
+ /**
255
+ * Optional lookup table for `LookUpTable`-style variables. JSON value.
256
+ */
257
+ lookUpTable?: { [key: string]: unknown };
258
+
259
+ updatedAt?: string | null;
260
+ }
261
+
262
+ export interface TagManagerVariableDeleteResponse {
263
+ id: string;
264
+
265
+ deleted: boolean;
266
+ }
267
+
268
+ export interface TagManagerVariableTypesResponse {
269
+ entities: Array<TagManagerVariableTypesResponse.Entity>;
270
+ }
271
+
272
+ export namespace TagManagerVariableTypesResponse {
273
+ export interface Entity {
274
+ /**
275
+ * Type discriminator — pass this as `type` on create/patch.
276
+ */
277
+ id: string;
278
+
279
+ /**
280
+ * Grouping label.
281
+ */
282
+ category: string;
283
+
284
+ fields: Array<Entity.Field>;
285
+
286
+ /**
287
+ * Human-readable display name.
288
+ */
289
+ name: string;
290
+
291
+ description?: string | null;
292
+
293
+ /**
294
+ * When `true`, this variable type's parameter fields can themselves contain
295
+ * `{{OtherVariable}}` references that the SDK resolves at runtime.
296
+ */
297
+ supportsVariables?: boolean | null;
298
+ }
299
+
300
+ export namespace Entity {
301
+ export interface Field {
302
+ /**
303
+ * Parameter key that goes in the `parameters` payload at create/patch.
304
+ */
305
+ id: string;
306
+
307
+ /**
308
+ * Human-readable title for the field.
309
+ */
310
+ title: string;
311
+
312
+ /**
313
+ * Underlying data type of the parameter value.
314
+ */
315
+ type: 'STRING' | 'BOOLEAN' | 'INTEGER' | 'FLOAT' | 'TABLE';
316
+
317
+ /**
318
+ * For TABLE-typed fields, the predefined keys each row may contain.
319
+ */
320
+ allowedKeys?: Array<string> | null;
321
+
322
+ /**
323
+ * When present, the field accepts only one of these values. Send the `value`
324
+ * string in `parameters`; the `label` is for display.
325
+ */
326
+ availableValues?: Array<Field.AvailableValue> | null;
327
+
328
+ /**
329
+ * Default value when the caller omits the parameter on create.
330
+ */
331
+ default?: { [key: string]: unknown };
332
+
333
+ description?: string | null;
334
+
335
+ /**
336
+ * When `true`, omitting or sending an empty value for this parameter on
337
+ * create/patch returns HTTP 400.
338
+ */
339
+ required?: boolean | null;
340
+
341
+ /**
342
+ * Server-enforced rules applied to this field at create and patch.
343
+ */
344
+ validators?: Array<Field.Validator> | null;
345
+ }
346
+
347
+ export namespace Field {
348
+ export interface AvailableValue {
349
+ label: string;
350
+
351
+ value: string;
352
+ }
353
+
354
+ export interface Validator {
355
+ type: 'NotEmpty' | 'CharacterLength' | 'Url' | 'Email' | 'Number' | 'Range';
356
+
357
+ max?: number | null;
358
+
359
+ min?: number | null;
360
+ }
361
+ }
362
+ }
363
+ }
364
+
365
+ export interface TagManagerVariableListParams extends CursorParams {
366
+ /**
367
+ * Parent tag manager whose variables should be returned.
368
+ */
369
+ tagManagerId: string;
370
+ }
371
+
372
+ export interface TagManagerVariableCreateParams {
373
+ name: string;
374
+
375
+ /**
376
+ * Type-specific JSON configuration.
377
+ */
378
+ parameters: { [key: string]: unknown };
379
+
380
+ /**
381
+ * Parent tag manager that will own the new variable.
382
+ */
383
+ tagManagerId: string;
384
+
385
+ /**
386
+ * Variable type discriminator. Pick from `GET /tag-manager-variables/types` for
387
+ * the canonical set (e.g. `DataLayer`, `Constant`, `Cookie`, `Url`).
388
+ */
389
+ type: string;
390
+
391
+ /**
392
+ * Optional default value. JSON value of any type.
393
+ */
394
+ defaultValue?: { [key: string]: unknown } | null;
395
+
396
+ enabled?: boolean | null;
397
+
398
+ /**
399
+ * Optional lookup table for `LookUpTable` variables.
400
+ */
401
+ lookUpTable?: { [key: string]: unknown } | null;
402
+ }
403
+
404
+ export interface TagManagerVariableUpdateParams {
405
+ /**
406
+ * Updated default value. JSON value of any type.
407
+ */
408
+ defaultValue?: { [key: string]: unknown } | null;
409
+
410
+ /**
411
+ * Pause/resume the variable without changing other fields.
412
+ */
413
+ enabled?: boolean | null;
414
+
415
+ /**
416
+ * Updated lookup table payload.
417
+ */
418
+ lookUpTable?: { [key: string]: unknown } | null;
419
+
420
+ /**
421
+ * Updated variable name.
422
+ */
423
+ name?: string;
424
+
425
+ /**
426
+ * Updated type-specific JSON configuration.
427
+ */
428
+ parameters?: { [key: string]: unknown };
429
+
430
+ /**
431
+ * Updated variable type. Pick from `GET /tag-manager-variables/types`.
432
+ */
433
+ type?: string;
434
+ }
435
+
436
+ export declare namespace TagManagerVariables {
437
+ export {
438
+ type TagManagerVariableListResponse as TagManagerVariableListResponse,
439
+ type TagManagerVariableCreateResponse as TagManagerVariableCreateResponse,
440
+ type TagManagerVariableRetrieveResponse as TagManagerVariableRetrieveResponse,
441
+ type TagManagerVariableUpdateResponse as TagManagerVariableUpdateResponse,
442
+ type TagManagerVariableDeleteResponse as TagManagerVariableDeleteResponse,
443
+ type TagManagerVariableTypesResponse as TagManagerVariableTypesResponse,
444
+ type TagManagerVariableListResponsesCursor as TagManagerVariableListResponsesCursor,
445
+ type TagManagerVariableListParams as TagManagerVariableListParams,
446
+ type TagManagerVariableCreateParams as TagManagerVariableCreateParams,
447
+ type TagManagerVariableUpdateParams as TagManagerVariableUpdateParams,
448
+ };
449
+ }
@@ -0,0 +1,276 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { RequestOptions } from '../internal/request-options';
6
+ import { path } from '../internal/utils/path';
7
+
8
+ export class TagManagers extends APIResource {
9
+ /**
10
+ * List every tag manager on this account. Each tag manager is a pixel-scoped
11
+ * container of tags, triggers, variables, and folders. Not paginated — accounts
12
+ * are capped at a small number of tag managers in practice, so the response fits
13
+ * in a single page. Requires scope: tagManagers:list
14
+ */
15
+ list(options?: RequestOptions): APIPromise<TagManagerListResponse> {
16
+ return this._client.get('/rest/v1/tag-managers', options);
17
+ }
18
+
19
+ /**
20
+ * Create a new tag manager. The server seeds three default triggers
21
+ * (`Initialization`, `PageView`, `DomReady`) and one `OursInitTag` so the
22
+ * container is immediately usable — call
23
+ * `GET /tag-manager-triggers?tagManagerId={id}` right after create to grab their
24
+ * server-assigned ids so you can reuse them in `fireTriggerIds` instead of
25
+ * redundantly creating a second `PageView`/`DomReady`/`Initialization`. Returns
26
+ * the bare entity. Accounts have a per-account tag manager limit — exceeding it
27
+ * returns 409 with the reason in the response `error` field. Requires scope:
28
+ * tagManagers:create
29
+ */
30
+ create(body: TagManagerCreateParams, options?: RequestOptions): APIPromise<TagManagerCreateResponse> {
31
+ return this._client.post('/rest/v1/tag-managers', { body, ...options });
32
+ }
33
+
34
+ /**
35
+ * Fetch a single tag manager by id, including its server-assigned `pixel` token
36
+ * used by the install snippet. Requires scope: tagManagers:find
37
+ */
38
+ retrieve(id: string, options?: RequestOptions): APIPromise<TagManagerRetrieveResponse> {
39
+ return this._client.get(path`/rest/v1/tag-managers/${id}`, options);
40
+ }
41
+
42
+ /**
43
+ * Partially update a tag manager. Only the fields you send are changed; omitted
44
+ * fields keep their current value. Send `dataLayerName: null` to clear the
45
+ * override and fall back to the SDK default. Requires scope: tagManagers:update
46
+ */
47
+ update(
48
+ id: string,
49
+ body: TagManagerUpdateParams,
50
+ options?: RequestOptions,
51
+ ): APIPromise<TagManagerUpdateResponse> {
52
+ return this._client.patch(path`/rest/v1/tag-managers/${id}`, { body, ...options });
53
+ }
54
+
55
+ /**
56
+ * Delete a tag manager. Child tags, triggers, variables, and folders are
57
+ * cascade-deleted with the container. Requires scope: tagManagers:delete
58
+ */
59
+ delete(id: string, options?: RequestOptions): APIPromise<TagManagerDeleteResponse> {
60
+ return this._client.delete(path`/rest/v1/tag-managers/${id}`, options);
61
+ }
62
+ }
63
+
64
+ export interface TagManagerListResponse {
65
+ entities: Array<TagManagerListResponse.Entity>;
66
+ }
67
+
68
+ export namespace TagManagerListResponse {
69
+ export interface Entity {
70
+ /**
71
+ * Server-assigned UUID for this tag manager container.
72
+ */
73
+ id: string;
74
+
75
+ /**
76
+ * Account that owns this tag manager.
77
+ */
78
+ accountId: string;
79
+
80
+ /**
81
+ * Human-readable name for the tag manager.
82
+ */
83
+ name: string;
84
+
85
+ /**
86
+ * Server-assigned pixel/container token. Used in the tag-manager install snippet
87
+ * served on customer sites — do not regenerate via the API.
88
+ */
89
+ pixel: string;
90
+
91
+ /**
92
+ * ISO 8601 timestamp when the tag manager was created.
93
+ */
94
+ createdAt?: string | null;
95
+
96
+ /**
97
+ * Window-global name of the customer data layer that triggers and variables read
98
+ * from (e.g. `dataLayer`). Defaults to `null`, which means the SDK falls back to
99
+ * its built-in name.
100
+ */
101
+ dataLayerName?: string | null;
102
+
103
+ /**
104
+ * ISO 8601 timestamp of the last update.
105
+ */
106
+ updatedAt?: string | null;
107
+ }
108
+ }
109
+
110
+ export interface TagManagerCreateResponse {
111
+ /**
112
+ * Server-assigned UUID for this tag manager container.
113
+ */
114
+ id: string;
115
+
116
+ /**
117
+ * Account that owns this tag manager.
118
+ */
119
+ accountId: string;
120
+
121
+ /**
122
+ * Human-readable name for the tag manager.
123
+ */
124
+ name: string;
125
+
126
+ /**
127
+ * Server-assigned pixel/container token. Used in the tag-manager install snippet
128
+ * served on customer sites — do not regenerate via the API.
129
+ */
130
+ pixel: string;
131
+
132
+ /**
133
+ * ISO 8601 timestamp when the tag manager was created.
134
+ */
135
+ createdAt?: string | null;
136
+
137
+ /**
138
+ * Window-global name of the customer data layer that triggers and variables read
139
+ * from (e.g. `dataLayer`). Defaults to `null`, which means the SDK falls back to
140
+ * its built-in name.
141
+ */
142
+ dataLayerName?: string | null;
143
+
144
+ /**
145
+ * ISO 8601 timestamp of the last update.
146
+ */
147
+ updatedAt?: string | null;
148
+ }
149
+
150
+ export interface TagManagerRetrieveResponse {
151
+ /**
152
+ * Server-assigned UUID for this tag manager container.
153
+ */
154
+ id: string;
155
+
156
+ /**
157
+ * Account that owns this tag manager.
158
+ */
159
+ accountId: string;
160
+
161
+ /**
162
+ * Human-readable name for the tag manager.
163
+ */
164
+ name: string;
165
+
166
+ /**
167
+ * Server-assigned pixel/container token. Used in the tag-manager install snippet
168
+ * served on customer sites — do not regenerate via the API.
169
+ */
170
+ pixel: string;
171
+
172
+ /**
173
+ * ISO 8601 timestamp when the tag manager was created.
174
+ */
175
+ createdAt?: string | null;
176
+
177
+ /**
178
+ * Window-global name of the customer data layer that triggers and variables read
179
+ * from (e.g. `dataLayer`). Defaults to `null`, which means the SDK falls back to
180
+ * its built-in name.
181
+ */
182
+ dataLayerName?: string | null;
183
+
184
+ /**
185
+ * ISO 8601 timestamp of the last update.
186
+ */
187
+ updatedAt?: string | null;
188
+ }
189
+
190
+ export interface TagManagerUpdateResponse {
191
+ /**
192
+ * Server-assigned UUID for this tag manager container.
193
+ */
194
+ id: string;
195
+
196
+ /**
197
+ * Account that owns this tag manager.
198
+ */
199
+ accountId: string;
200
+
201
+ /**
202
+ * Human-readable name for the tag manager.
203
+ */
204
+ name: string;
205
+
206
+ /**
207
+ * Server-assigned pixel/container token. Used in the tag-manager install snippet
208
+ * served on customer sites — do not regenerate via the API.
209
+ */
210
+ pixel: string;
211
+
212
+ /**
213
+ * ISO 8601 timestamp when the tag manager was created.
214
+ */
215
+ createdAt?: string | null;
216
+
217
+ /**
218
+ * Window-global name of the customer data layer that triggers and variables read
219
+ * from (e.g. `dataLayer`). Defaults to `null`, which means the SDK falls back to
220
+ * its built-in name.
221
+ */
222
+ dataLayerName?: string | null;
223
+
224
+ /**
225
+ * ISO 8601 timestamp of the last update.
226
+ */
227
+ updatedAt?: string | null;
228
+ }
229
+
230
+ export interface TagManagerDeleteResponse {
231
+ /**
232
+ * The id of the tag manager that was deleted.
233
+ */
234
+ id: string;
235
+
236
+ /**
237
+ * True when the tag manager was deleted.
238
+ */
239
+ deleted: boolean;
240
+ }
241
+
242
+ export interface TagManagerCreateParams {
243
+ /**
244
+ * Human-readable name for the new tag manager.
245
+ */
246
+ name: string;
247
+
248
+ /**
249
+ * Optional global data-layer name (e.g. `dataLayer`). Omit to use the SDK default.
250
+ */
251
+ dataLayerName?: string | null;
252
+ }
253
+
254
+ export interface TagManagerUpdateParams {
255
+ /**
256
+ * New data-layer name. Send `null` to clear and fall back to the SDK default.
257
+ */
258
+ dataLayerName?: string | null;
259
+
260
+ /**
261
+ * New display name.
262
+ */
263
+ name?: string;
264
+ }
265
+
266
+ export declare namespace TagManagers {
267
+ export {
268
+ type TagManagerListResponse as TagManagerListResponse,
269
+ type TagManagerCreateResponse as TagManagerCreateResponse,
270
+ type TagManagerRetrieveResponse as TagManagerRetrieveResponse,
271
+ type TagManagerUpdateResponse as TagManagerUpdateResponse,
272
+ type TagManagerDeleteResponse as TagManagerDeleteResponse,
273
+ type TagManagerCreateParams as TagManagerCreateParams,
274
+ type TagManagerUpdateParams as TagManagerUpdateParams,
275
+ };
276
+ }