@oursprivacy/platform-sdk 1.26.0 → 1.28.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 (142) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/client.d.mts +9 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -6
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -6
  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 +1 -0
  44. package/resources/index.d.mts.map +1 -1
  45. package/resources/index.d.ts +1 -0
  46. package/resources/index.d.ts.map +1 -1
  47. package/resources/index.js +3 -1
  48. package/resources/index.js.map +1 -1
  49. package/resources/index.mjs +1 -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 +6 -5
  64. package/resources/sources.d.mts.map +1 -1
  65. package/resources/sources.d.ts +6 -5
  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-tags.d.mts +33 -49
  80. package/resources/tag-manager-tags.d.mts.map +1 -1
  81. package/resources/tag-manager-tags.d.ts +33 -49
  82. package/resources/tag-manager-tags.d.ts.map +1 -1
  83. package/resources/tag-manager-tags.js +5 -7
  84. package/resources/tag-manager-tags.js.map +1 -1
  85. package/resources/tag-manager-tags.mjs +5 -7
  86. package/resources/tag-manager-tags.mjs.map +1 -1
  87. package/resources/tag-manager-triggers.d.mts +33 -39
  88. package/resources/tag-manager-triggers.d.mts.map +1 -1
  89. package/resources/tag-manager-triggers.d.ts +33 -39
  90. package/resources/tag-manager-triggers.d.ts.map +1 -1
  91. package/resources/tag-manager-triggers.js +2 -1
  92. package/resources/tag-manager-triggers.js.map +1 -1
  93. package/resources/tag-manager-triggers.mjs +2 -1
  94. package/resources/tag-manager-triggers.mjs.map +1 -1
  95. package/resources/tag-manager-variables.d.mts +25 -39
  96. package/resources/tag-manager-variables.d.mts.map +1 -1
  97. package/resources/tag-manager-variables.d.ts +25 -39
  98. package/resources/tag-manager-variables.d.ts.map +1 -1
  99. package/resources/tag-manager-variables.js +2 -1
  100. package/resources/tag-manager-variables.js.map +1 -1
  101. package/resources/tag-manager-variables.mjs +2 -1
  102. package/resources/tag-manager-variables.mjs.map +1 -1
  103. package/resources/tag-managers.d.mts +6 -4
  104. package/resources/tag-managers.d.mts.map +1 -1
  105. package/resources/tag-managers.d.ts +6 -4
  106. package/resources/tag-managers.d.ts.map +1 -1
  107. package/resources/tag-managers.js +5 -3
  108. package/resources/tag-managers.js.map +1 -1
  109. package/resources/tag-managers.mjs +5 -3
  110. package/resources/tag-managers.mjs.map +1 -1
  111. package/resources/web-scanner-rules.d.mts +1 -1
  112. package/resources/web-scanner-rules.d.ts +1 -1
  113. package/resources/web-scanners.d.mts +6 -7
  114. package/resources/web-scanners.d.mts.map +1 -1
  115. package/resources/web-scanners.d.ts +6 -7
  116. package/resources/web-scanners.d.ts.map +1 -1
  117. package/resources/web-scanners.js +5 -6
  118. package/resources/web-scanners.js.map +1 -1
  119. package/resources/web-scanners.mjs +5 -6
  120. package/resources/web-scanners.mjs.map +1 -1
  121. package/src/client.ts +59 -46
  122. package/src/resources/consent-analytics.ts +4 -2
  123. package/src/resources/consent-settings.ts +11 -9
  124. package/src/resources/data-governance.ts +7 -7
  125. package/src/resources/destinations.ts +9 -2
  126. package/src/resources/heatmap-pages.ts +4 -5
  127. package/src/resources/index.ts +5 -0
  128. package/src/resources/locations.ts +3 -3
  129. package/src/resources/mappings.ts +5 -6
  130. package/src/resources/sources.ts +6 -5
  131. package/src/resources/tag-manager-asset-folders.ts +64 -0
  132. package/src/resources/tag-manager-tags.ts +33 -55
  133. package/src/resources/tag-manager-triggers.ts +33 -45
  134. package/src/resources/tag-manager-variables.ts +25 -45
  135. package/src/resources/tag-managers.ts +6 -4
  136. package/src/resources/web-scanner-rules.ts +1 -1
  137. package/src/resources/web-scanners.ts +6 -7
  138. package/src/version.ts +1 -1
  139. package/version.d.mts +1 -1
  140. package/version.d.ts +1 -1
  141. package/version.js +1 -1
  142. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -193,6 +193,11 @@ import {
193
193
  SourceUpdateResponse,
194
194
  Sources,
195
195
  } from './resources/sources';
196
+ import {
197
+ TagManagerAssetFolderCreateParams,
198
+ TagManagerAssetFolderCreateResponse,
199
+ TagManagerAssetFolders,
200
+ } from './resources/tag-manager-asset-folders';
196
201
  import {
197
202
  TagManagerFolderCreateParams,
198
203
  TagManagerFolderCreateResponse,
@@ -1041,14 +1046,15 @@ export class OursPrivacyPlatform {
1041
1046
  mappings: API.Mappings = new API.Mappings(this);
1042
1047
  replaySettings: API.ReplaySettings = new API.ReplaySettings(this);
1043
1048
  sources: API.Sources = new API.Sources(this);
1044
- versions: API.Versions = new API.Versions(this);
1045
- webScannerRules: API.WebScannerRules = new API.WebScannerRules(this);
1046
- webScanners: API.WebScanners = new API.WebScanners(this);
1047
1049
  tagManagers: API.TagManagers = new API.TagManagers(this);
1048
1050
  tagManagerTags: API.TagManagerTags = new API.TagManagerTags(this);
1049
1051
  tagManagerTriggers: API.TagManagerTriggers = new API.TagManagerTriggers(this);
1050
1052
  tagManagerVariables: API.TagManagerVariables = new API.TagManagerVariables(this);
1051
1053
  tagManagerFolders: API.TagManagerFolders = new API.TagManagerFolders(this);
1054
+ tagManagerAssetFolders: API.TagManagerAssetFolders = new API.TagManagerAssetFolders(this);
1055
+ versions: API.Versions = new API.Versions(this);
1056
+ webScannerRules: API.WebScannerRules = new API.WebScannerRules(this);
1057
+ webScanners: API.WebScanners = new API.WebScanners(this);
1052
1058
  }
1053
1059
 
1054
1060
  OursPrivacyPlatform.AllowedEvents = AllowedEvents;
@@ -1065,14 +1071,15 @@ OursPrivacyPlatform.Locations = Locations;
1065
1071
  OursPrivacyPlatform.Mappings = Mappings;
1066
1072
  OursPrivacyPlatform.ReplaySettings = ReplaySettings;
1067
1073
  OursPrivacyPlatform.Sources = Sources;
1068
- OursPrivacyPlatform.Versions = Versions;
1069
- OursPrivacyPlatform.WebScannerRules = WebScannerRules;
1070
- OursPrivacyPlatform.WebScanners = WebScanners;
1071
1074
  OursPrivacyPlatform.TagManagers = TagManagers;
1072
1075
  OursPrivacyPlatform.TagManagerTags = TagManagerTags;
1073
1076
  OursPrivacyPlatform.TagManagerTriggers = TagManagerTriggers;
1074
1077
  OursPrivacyPlatform.TagManagerVariables = TagManagerVariables;
1075
1078
  OursPrivacyPlatform.TagManagerFolders = TagManagerFolders;
1079
+ OursPrivacyPlatform.TagManagerAssetFolders = TagManagerAssetFolders;
1080
+ OursPrivacyPlatform.Versions = Versions;
1081
+ OursPrivacyPlatform.WebScannerRules = WebScannerRules;
1082
+ OursPrivacyPlatform.WebScanners = WebScanners;
1076
1083
 
1077
1084
  export declare namespace OursPrivacyPlatform {
1078
1085
  export type RequestOptions = Opts.RequestOptions;
@@ -1268,46 +1275,6 @@ export declare namespace OursPrivacyPlatform {
1268
1275
  type SourceUpdateParams as SourceUpdateParams,
1269
1276
  };
1270
1277
 
1271
- export {
1272
- Versions as Versions,
1273
- type VersionListResponse as VersionListResponse,
1274
- type VersionCreateResponse as VersionCreateResponse,
1275
- type VersionRetrieveResponse as VersionRetrieveResponse,
1276
- type VersionUpdateResponse as VersionUpdateResponse,
1277
- type VersionPublishResponse as VersionPublishResponse,
1278
- type VersionSnapshotResponse as VersionSnapshotResponse,
1279
- type VersionDiffResponse as VersionDiffResponse,
1280
- type VersionListResponsesCursor as VersionListResponsesCursor,
1281
- type VersionListParams as VersionListParams,
1282
- type VersionCreateParams as VersionCreateParams,
1283
- type VersionUpdateParams as VersionUpdateParams,
1284
- type VersionDiffParams as VersionDiffParams,
1285
- };
1286
-
1287
- export {
1288
- WebScannerRules as WebScannerRules,
1289
- type WebScannerRuleListResponse as WebScannerRuleListResponse,
1290
- type WebScannerRuleCreateResponse as WebScannerRuleCreateResponse,
1291
- type WebScannerRuleRetrieveResponse as WebScannerRuleRetrieveResponse,
1292
- type WebScannerRuleUpdateResponse as WebScannerRuleUpdateResponse,
1293
- type WebScannerRuleDeleteResponse as WebScannerRuleDeleteResponse,
1294
- type WebScannerRuleListParams as WebScannerRuleListParams,
1295
- type WebScannerRuleCreateParams as WebScannerRuleCreateParams,
1296
- type WebScannerRuleUpdateParams as WebScannerRuleUpdateParams,
1297
- };
1298
-
1299
- export {
1300
- WebScanners as WebScanners,
1301
- type WebScannerListResponse as WebScannerListResponse,
1302
- type WebScannerCreateResponse as WebScannerCreateResponse,
1303
- type WebScannerRetrieveResponse as WebScannerRetrieveResponse,
1304
- type WebScannerUpdateResponse as WebScannerUpdateResponse,
1305
- type WebScannerDeleteResponse as WebScannerDeleteResponse,
1306
- type WebScannerTriggerResponse as WebScannerTriggerResponse,
1307
- type WebScannerCreateParams as WebScannerCreateParams,
1308
- type WebScannerUpdateParams as WebScannerUpdateParams,
1309
- };
1310
-
1311
1278
  export {
1312
1279
  TagManagers as TagManagers,
1313
1280
  type TagManagerListResponse as TagManagerListResponse,
@@ -1373,4 +1340,50 @@ export declare namespace OursPrivacyPlatform {
1373
1340
  type TagManagerFolderCreateParams as TagManagerFolderCreateParams,
1374
1341
  type TagManagerFolderUpdateParams as TagManagerFolderUpdateParams,
1375
1342
  };
1343
+
1344
+ export {
1345
+ TagManagerAssetFolders as TagManagerAssetFolders,
1346
+ type TagManagerAssetFolderCreateResponse as TagManagerAssetFolderCreateResponse,
1347
+ type TagManagerAssetFolderCreateParams as TagManagerAssetFolderCreateParams,
1348
+ };
1349
+
1350
+ export {
1351
+ Versions as Versions,
1352
+ type VersionListResponse as VersionListResponse,
1353
+ type VersionCreateResponse as VersionCreateResponse,
1354
+ type VersionRetrieveResponse as VersionRetrieveResponse,
1355
+ type VersionUpdateResponse as VersionUpdateResponse,
1356
+ type VersionPublishResponse as VersionPublishResponse,
1357
+ type VersionSnapshotResponse as VersionSnapshotResponse,
1358
+ type VersionDiffResponse as VersionDiffResponse,
1359
+ type VersionListResponsesCursor as VersionListResponsesCursor,
1360
+ type VersionListParams as VersionListParams,
1361
+ type VersionCreateParams as VersionCreateParams,
1362
+ type VersionUpdateParams as VersionUpdateParams,
1363
+ type VersionDiffParams as VersionDiffParams,
1364
+ };
1365
+
1366
+ export {
1367
+ WebScannerRules as WebScannerRules,
1368
+ type WebScannerRuleListResponse as WebScannerRuleListResponse,
1369
+ type WebScannerRuleCreateResponse as WebScannerRuleCreateResponse,
1370
+ type WebScannerRuleRetrieveResponse as WebScannerRuleRetrieveResponse,
1371
+ type WebScannerRuleUpdateResponse as WebScannerRuleUpdateResponse,
1372
+ type WebScannerRuleDeleteResponse as WebScannerRuleDeleteResponse,
1373
+ type WebScannerRuleListParams as WebScannerRuleListParams,
1374
+ type WebScannerRuleCreateParams as WebScannerRuleCreateParams,
1375
+ type WebScannerRuleUpdateParams as WebScannerRuleUpdateParams,
1376
+ };
1377
+
1378
+ export {
1379
+ WebScanners as WebScanners,
1380
+ type WebScannerListResponse as WebScannerListResponse,
1381
+ type WebScannerCreateResponse as WebScannerCreateResponse,
1382
+ type WebScannerRetrieveResponse as WebScannerRetrieveResponse,
1383
+ type WebScannerUpdateResponse as WebScannerUpdateResponse,
1384
+ type WebScannerDeleteResponse as WebScannerDeleteResponse,
1385
+ type WebScannerTriggerResponse as WebScannerTriggerResponse,
1386
+ type WebScannerCreateParams as WebScannerCreateParams,
1387
+ type WebScannerUpdateParams as WebScannerUpdateParams,
1388
+ };
1376
1389
  }
@@ -12,8 +12,10 @@ export class ConsentAnalytics extends APIResource {
12
12
  * Not scoped to a single consent settings record — this aggregates across every
13
13
  * destination in the account. The endpoint is identified by query params rather
14
14
  * than a path id because the report is account-scoped; this is a documented
15
- * derived-read exception. Reuses the API-key scope `consentSettings:list` because
16
- * the report crosses every consent setting. Requires scope: consentSettings:list
15
+ * derived-read exception. Requires the API-key scope
16
+ * `report:global-consent-center-analytics` (this is the account-wide consent
17
+ * analytics report and is gated separately from consent-settings list). Requires
18
+ * scope: report:global-consent-center-analytics
17
19
  */
18
20
  list(
19
21
  query: ConsentAnalyticsListParams,
@@ -75,9 +75,10 @@ export class ConsentSettings extends APIResource {
75
75
  * (`COUNT(DISTINCT visitor_id)`). Use the optional `pagePath` and `region` filters
76
76
  * to scope to one page or one visitor region; use `compareWithPreviousPeriod=true`
77
77
  * to also receive the matching prior window. `DAILY` allows a 90-day window;
78
- * `HOURLY` is capped at 14 days. Reuses the API-key scope `consentSettings:find`
79
- * because the endpoint is identified by a consent settings `id`. Requires scope:
80
- * consentSettings:find
78
+ * `HOURLY` is capped at 14 days. Requires the API-key scope
79
+ * `report:consent-analytics` (this endpoint returns consent analytics report data,
80
+ * which is PHI-bearing and gated separately from consent-settings management).
81
+ * Requires scope: report:consent-analytics
81
82
  */
82
83
  analytics(
83
84
  id: string,
@@ -91,10 +92,10 @@ export class ConsentSettings extends APIResource {
91
92
  * Per-page consent breakdown for one consent settings record, ranked by opt-outs
92
93
  * (descending). Each row bundles banner views, opt-outs, close-icon clicks, and
93
94
  * the derived opt-out rate. Documented exception to the cursor-pagination
94
- * standard: this is a derived read whose underlying GraphQL contract is
95
- * offset/limit-based; cursors are not used. `search` is a substring match against
96
- * `pathname`; `region` filters to one visitor region. Reuses the API-key scope
97
- * `consentSettings:find`. Requires scope: consentSettings:find
95
+ * standard: this endpoint paginates with `limit` and `offset` rather than
96
+ * `cursor`. `search` is a substring match against `pathname`; `region` filters to
97
+ * one visitor region. Requires the API-key scope `report:consent-page-analysis`
98
+ * (PHI-bearing report data). Requires scope: report:consent-page-analysis
98
99
  */
99
100
  pageAnalysis(
100
101
  id: string,
@@ -111,8 +112,9 @@ export class ConsentSettings extends APIResource {
111
112
  * traffic, IP geo failure) are bucketed under the literal `Unknown` so per-region
112
113
  * counts always sum to the global totals. Use this to discover the region names
113
114
  * you can later pass to the `region` filter on
114
- * `GET /rest/v1/consent-settings/{id}/analytics`. Reuses the API-key scope
115
- * `consentSettings:find`. Requires scope: consentSettings:find
115
+ * `GET /rest/v1/consent-settings/{id}/analytics`. Requires the API-key scope
116
+ * `report:consent-analytics` (PHI-bearing report data). Requires scope:
117
+ * report:consent-analytics
116
118
  */
117
119
  analyticsByRegion(
118
120
  id: string,
@@ -57,12 +57,12 @@ export class DataGovernance extends APIResource {
57
57
  * wholesale**. There is no partial-merge for individual categories. To change one
58
58
  * category, fetch the current record, modify the array, and PATCH it back.
59
59
  *
60
- * On write, categories are sorted ascending by the `priority` field you supplied
61
- * (a sort key, not a stored value), then re-stamped `1..N` so the persisted
62
- * `priority` is always sequential with no gaps. Stale `destinationIds` (deleted
63
- * destinations or destinations on another account) are silently filtered out — the
64
- * response echoes the filtered list, so a follow-up GET is not required to see
65
- * what was saved. Requires scope: globalDispatch:update
60
+ * Categories are sorted ascending by the `priority` you supplied and then
61
+ * renumbered `1..N` in the response, so the returned `priority` values are always
62
+ * sequential with no gaps. Stale `destinationIds` (deleted destinations or
63
+ * destinations on another account) are silently filtered out — the response echoes
64
+ * the filtered list, so a follow-up GET is not required to see what was saved.
65
+ * Requires scope: globalDispatch:update
66
66
  */
67
67
  update(
68
68
  id: string,
@@ -871,7 +871,7 @@ export interface DataGovernanceDeleteResponse {
871
871
  id: string;
872
872
 
873
873
  /**
874
- * True when the underlying mutation succeeded; the entity is gone.
874
+ * True when the record was deleted.
875
875
  */
876
876
  deleted: boolean;
877
877
  }
@@ -133,6 +133,7 @@ export interface DestinationListResponse {
133
133
  | 'Mailchimp'
134
134
  | 'Mixpanel'
135
135
  | 'NextdoorAds'
136
+ | 'OpenAIAds'
136
137
  | 'OursSyntheticData'
137
138
  | 'Partnerize'
138
139
  | 'Pinterest'
@@ -234,6 +235,7 @@ export interface DestinationCreateResponse {
234
235
  | 'Mailchimp'
235
236
  | 'Mixpanel'
236
237
  | 'NextdoorAds'
238
+ | 'OpenAIAds'
237
239
  | 'OursSyntheticData'
238
240
  | 'Partnerize'
239
241
  | 'Pinterest'
@@ -335,6 +337,7 @@ export interface DestinationRetrieveResponse {
335
337
  | 'Mailchimp'
336
338
  | 'Mixpanel'
337
339
  | 'NextdoorAds'
340
+ | 'OpenAIAds'
338
341
  | 'OursSyntheticData'
339
342
  | 'Partnerize'
340
343
  | 'Pinterest'
@@ -436,6 +439,7 @@ export interface DestinationUpdateResponse {
436
439
  | 'Mailchimp'
437
440
  | 'Mixpanel'
438
441
  | 'NextdoorAds'
442
+ | 'OpenAIAds'
439
443
  | 'OursSyntheticData'
440
444
  | 'Partnerize'
441
445
  | 'Pinterest'
@@ -550,7 +554,8 @@ export namespace DestinationTypesResponse {
550
554
  | 'Everflow'
551
555
  | 'BeeswaxPostback'
552
556
  | 'AdobeAnalytics'
553
- | 'UniversalAds';
557
+ | 'UniversalAds'
558
+ | 'OpenAIAds';
554
559
 
555
560
  capabilities: Entity.Capabilities;
556
561
 
@@ -711,6 +716,7 @@ export interface DestinationListParams extends CursorParams {
711
716
  | 'Mailchimp'
712
717
  | 'Mixpanel'
713
718
  | 'NextdoorAds'
719
+ | 'OpenAIAds'
714
720
  | 'OursSyntheticData'
715
721
  | 'Partnerize'
716
722
  | 'Pinterest'
@@ -813,7 +819,8 @@ export interface DestinationCreateParams {
813
819
  | 'Everflow'
814
820
  | 'BeeswaxPostback'
815
821
  | 'AdobeAnalytics'
816
- | 'UniversalAds';
822
+ | 'UniversalAds'
823
+ | 'OpenAIAds';
817
824
 
818
825
  name?: string | null;
819
826
 
@@ -10,11 +10,10 @@ export class HeatmapPages extends APIResource {
10
10
  * List pages with heatmap coverage in a date window, ranked for triage. Each
11
11
  * entity is identified by `pageKey` (origin + pathname, query string stripped);
12
12
  * use that value to drill into `GET /rest/v1/heatmap-pages/summary`. Supports
13
- * cursor pagination — the underlying store uses offset internally, so cursors are
14
- * bounded to roughly 10,000 entries deep; if you need pages beyond that, narrow
15
- * `from`/`to` or add filters rather than paginating further. `from`/`to` are UTC
16
- * calendar days in `YYYY-MM-DD`; the window must be 60 days or fewer. Requires
17
- * scope: web-analytics:view
13
+ * cursor pagination, with cursor depth capped at roughly 10,000 entries; if you
14
+ * need pages beyond that, narrow `from`/`to` or add filters rather than paginating
15
+ * further. `from`/`to` are UTC calendar days in `YYYY-MM-DD`; the window must be
16
+ * 60 days or fewer. Requires scope: web-analytics:view
18
17
  */
19
18
  list(
20
19
  query: HeatmapPageListParams,
@@ -174,6 +174,11 @@ export {
174
174
  type SourceUpdateParams,
175
175
  type SourceListResponsesCursor,
176
176
  } from './sources';
177
+ export {
178
+ TagManagerAssetFolders,
179
+ type TagManagerAssetFolderCreateResponse,
180
+ type TagManagerAssetFolderCreateParams,
181
+ } from './tag-manager-asset-folders';
177
182
  export {
178
183
  TagManagerFolders,
179
184
  type TagManagerFolderListResponse,
@@ -42,9 +42,9 @@ export class Locations extends APIResource {
42
42
  /**
43
43
  * Generate the paste-ready HTML embed snippet for a location. The response is a
44
44
  * single self-contained HTML string (a `<style>` block + `<div>` wrapping an
45
- * `<iframe>` pointed at the maps CDN for the current stage, plus an optional
46
- * JSON-LD `<script>`). Customize the render with the optional query params
47
- * (`color`, `theme`, `colorScheme`, `mapStyle`, `includeAddressBox`, `zoom`,
45
+ * `<iframe>` pointed at the Ours Privacy maps CDN, plus an optional JSON-LD
46
+ * `<script>`). Customize the render with the optional query params (`color`,
47
+ * `theme`, `colorScheme`, `mapStyle`, `includeAddressBox`, `zoom`,
48
48
  * `includeControls`, `includeSEOSchema`); all have sane defaults. Requires scope:
49
49
  * maps:find
50
50
  */
@@ -79,9 +79,8 @@ export class Mappings extends APIResource {
79
79
  * `POST /rest/v1/mappings` (template fat-create variant), and use each entry under
80
80
  * `mappings[]` to learn the valid `property`, `kind`, `modificationOptions`, and
81
81
  * any enforced `options`. The `isDefault: true` entry is the destination's
82
- * built-in default template (the one stored at `MAPPER#{destinationId}` when
83
- * configured via `PUT /rest/v1/default-mappings/{destinationId}`). Requires scope:
84
- * mapping:find
82
+ * built-in default template, configured via
83
+ * `PUT /rest/v1/default-mappings/{destinationId}`. Requires scope: mapping:find
85
84
  */
86
85
  templates(query: MappingTemplatesParams, options?: RequestOptions): APIPromise<MappingTemplatesResponse> {
87
86
  return this._client.get('/rest/v1/mappings/templates', { query, ...options });
@@ -100,9 +99,9 @@ export class Mappings extends APIResource {
100
99
  /**
101
100
  * Lists the custom variables observed in this account’s recent event stream (last
102
101
  * 14 days). These are dot-paths under `event.event_properties.*` that callers can
103
- * target in mapping `value` fields. The result is cached for 10 minutes; an empty
104
- * list means no custom properties have been seen yet for this account. Requires
105
- * scope: variables:find-custom
102
+ * target in mapping `value` fields. Newly seen properties may take a few minutes
103
+ * to appear; an empty list means no custom properties have been observed yet for
104
+ * this account. Requires scope: variables:find-custom
106
105
  */
107
106
  customVariables(options?: RequestOptions): APIPromise<MappingCustomVariablesResponse> {
108
107
  return this._client.get('/rest/v1/mappings/custom-variables', options);
@@ -52,12 +52,13 @@ export class Sources extends APIResource {
52
52
  }
53
53
 
54
54
  /**
55
- * Returns the install or ingest tokens for a source. Pixel sources (WebSource,
56
- * PixelImage, HTTPApiSource) return
57
- * `{ sourceType: "pixel", token, testToken, installScript, testInstallScript }`.
58
- * Webhook sources (Webhook, CallRail, Formstack, Healthie, etc.) return
55
+ * Returns the install or ingest tokens for a source. The response is a
56
+ * discriminated union on `sourceType`: pixel sources return
57
+ * `{ sourceType: "pixel", token, testToken, installScript, testInstallScript }`,
58
+ * and webhook sources return
59
59
  * `{ sourceType: "webhook", token, testToken, ingestUrl, testIngestUrl, sampleCurl }`.
60
- * Requires scope: source:view
60
+ * Inspect the source's `type` field (`GET /rest/v1/sources/{id}`) to know which
61
+ * variant to expect. Requires scope: source:view
61
62
  */
62
63
  tokens(id: string, options?: RequestOptions): APIPromise<SourceTokensResponse> {
63
64
  return this._client.get(path`/rest/v1/sources/${id}/tokens`, options);
@@ -0,0 +1,64 @@
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
+
7
+ export class TagManagerAssetFolders extends APIResource {
8
+ /**
9
+ * Assign a tag, trigger, or variable to a folder within its tag manager, or send
10
+ * `folderId: null` to remove the asset from its current folder. The assignment is
11
+ * a full replace — calling it again with a different `folderId` silently moves the
12
+ * asset. Requires scope: tagManagers:update
13
+ */
14
+ create(
15
+ body: TagManagerAssetFolderCreateParams,
16
+ options?: RequestOptions,
17
+ ): APIPromise<TagManagerAssetFolderCreateResponse> {
18
+ return this._client.post('/rest/v1/tag-manager-asset-folders', { body, ...options });
19
+ }
20
+ }
21
+
22
+ export interface TagManagerAssetFolderCreateResponse {
23
+ id: string;
24
+
25
+ accountId: string;
26
+
27
+ assetId: string;
28
+
29
+ assetType: 'tagManagerTag' | 'tagManagerTrigger' | 'tagManagerVariable';
30
+
31
+ tagManagerId: string;
32
+
33
+ createdAt?: string | null;
34
+
35
+ folderId?: string | null;
36
+
37
+ updatedAt?: string | null;
38
+ }
39
+
40
+ export interface TagManagerAssetFolderCreateParams {
41
+ /**
42
+ * UUID of the tag, trigger, or variable to assign.
43
+ */
44
+ assetId: string;
45
+
46
+ /**
47
+ * Asset type to assign. Must be one of `tagManagerTag`, `tagManagerTrigger`, or
48
+ * `tagManagerVariable`.
49
+ */
50
+ assetType: 'tagManagerTag' | 'tagManagerTrigger' | 'tagManagerVariable';
51
+
52
+ /**
53
+ * Folder UUID to assign to. Send `null` to remove the asset from its current
54
+ * folder.
55
+ */
56
+ folderId: string | null;
57
+ }
58
+
59
+ export declare namespace TagManagerAssetFolders {
60
+ export {
61
+ type TagManagerAssetFolderCreateResponse as TagManagerAssetFolderCreateResponse,
62
+ type TagManagerAssetFolderCreateParams as TagManagerAssetFolderCreateParams,
63
+ };
64
+ }
@@ -26,9 +26,8 @@ export class TagManagerTags extends APIResource {
26
26
 
27
27
  /**
28
28
  * Create a new tag inside a tag manager. `tagManagerId` is required in the body.
29
- * Newly created tags are not assigned to any folder — use the GraphQL
30
- * `assignTagManagerAssetToFolder` mutation to place them. Requires scope:
31
- * tagManagers:update
29
+ * Newly created tags are not assigned to any folder — assign after creation via
30
+ * PATCH with `folderId`. Requires scope: tagManagers:update
32
31
  */
33
32
  create(body: TagManagerTagCreateParams, options?: RequestOptions): APIPromise<TagManagerTagCreateResponse> {
34
33
  return this._client.post('/rest/v1/tag-manager-tags', { body, ...options });
@@ -43,10 +42,9 @@ export class TagManagerTags extends APIResource {
43
42
  }
44
43
 
45
44
  /**
46
- * Partially update a tag. Only the fields you send are changed. `folderId` is
47
- * read-only here; change folder membership via the GraphQL
48
- * `assignTagManagerAssetToFolder` mutation. Tags cannot be moved between tag
49
- * managers (omit `tagManagerId` on patch). Requires scope: tagManagers:update
45
+ * Partially update a tag. Only the fields you send are changed. Tags cannot be
46
+ * moved between tag managers. To assign a tag to a folder, use
47
+ * `POST /rest/v1/tag-manager-asset-folders`. Requires scope: tagManagers:update
50
48
  */
51
49
  update(
52
50
  id: string,
@@ -103,19 +101,16 @@ export interface TagManagerTagListResponse {
103
101
  */
104
102
  parameters: { [key: string]: unknown };
105
103
 
106
- /**
107
- * Tag implementation identifier — usually matches `type` but kept distinct for
108
- * legacy tags whose implementation diverged from the type label.
109
- */
110
- Tag: string;
111
-
112
104
  /**
113
105
  * Parent tag manager that owns this tag.
114
106
  */
115
107
  tagManagerId: string;
116
108
 
117
109
  /**
118
- * Tag type discriminator (e.g. `GA4Event`, `MetaPixel`, `OursInitTag`).
110
+ * Tag type discriminator. Examples that exist today: `OursTrackTag`,
111
+ * `OursInitTag`, `OursIdentifyTag`, `CustomHtmlTag`. Pick from
112
+ * `GET /tag-manager-tags/types` for the canonical set — names like `GA4Event` are
113
+ * not valid ids.
119
114
  */
120
115
  type: string;
121
116
 
@@ -132,8 +127,8 @@ export interface TagManagerTagListResponse {
132
127
  enabled?: boolean | null;
133
128
 
134
129
  /**
135
- * Folder this tag belongs to in the dashboard. Read-only on this endpoint — change
136
- * folder membership via the GraphQL `assignTagManagerAssetToFolder` mutation.
130
+ * Folder this tag belongs to in the dashboard. Settable via PATCH — send a folder
131
+ * UUID to assign, or `null` to remove from its current folder.
137
132
  */
138
133
  folderId?: string | null;
139
134
 
@@ -170,19 +165,16 @@ export interface TagManagerTagCreateResponse {
170
165
  */
171
166
  parameters: { [key: string]: unknown };
172
167
 
173
- /**
174
- * Tag implementation identifier — usually matches `type` but kept distinct for
175
- * legacy tags whose implementation diverged from the type label.
176
- */
177
- Tag: string;
178
-
179
168
  /**
180
169
  * Parent tag manager that owns this tag.
181
170
  */
182
171
  tagManagerId: string;
183
172
 
184
173
  /**
185
- * Tag type discriminator (e.g. `GA4Event`, `MetaPixel`, `OursInitTag`).
174
+ * Tag type discriminator. Examples that exist today: `OursTrackTag`,
175
+ * `OursInitTag`, `OursIdentifyTag`, `CustomHtmlTag`. Pick from
176
+ * `GET /tag-manager-tags/types` for the canonical set — names like `GA4Event` are
177
+ * not valid ids.
186
178
  */
187
179
  type: string;
188
180
 
@@ -199,8 +191,8 @@ export interface TagManagerTagCreateResponse {
199
191
  enabled?: boolean | null;
200
192
 
201
193
  /**
202
- * Folder this tag belongs to in the dashboard. Read-only on this endpoint — change
203
- * folder membership via the GraphQL `assignTagManagerAssetToFolder` mutation.
194
+ * Folder this tag belongs to in the dashboard. Settable via PATCH — send a folder
195
+ * UUID to assign, or `null` to remove from its current folder.
204
196
  */
205
197
  folderId?: string | null;
206
198
 
@@ -237,19 +229,16 @@ export interface TagManagerTagRetrieveResponse {
237
229
  */
238
230
  parameters: { [key: string]: unknown };
239
231
 
240
- /**
241
- * Tag implementation identifier — usually matches `type` but kept distinct for
242
- * legacy tags whose implementation diverged from the type label.
243
- */
244
- Tag: string;
245
-
246
232
  /**
247
233
  * Parent tag manager that owns this tag.
248
234
  */
249
235
  tagManagerId: string;
250
236
 
251
237
  /**
252
- * Tag type discriminator (e.g. `GA4Event`, `MetaPixel`, `OursInitTag`).
238
+ * Tag type discriminator. Examples that exist today: `OursTrackTag`,
239
+ * `OursInitTag`, `OursIdentifyTag`, `CustomHtmlTag`. Pick from
240
+ * `GET /tag-manager-tags/types` for the canonical set — names like `GA4Event` are
241
+ * not valid ids.
253
242
  */
254
243
  type: string;
255
244
 
@@ -266,8 +255,8 @@ export interface TagManagerTagRetrieveResponse {
266
255
  enabled?: boolean | null;
267
256
 
268
257
  /**
269
- * Folder this tag belongs to in the dashboard. Read-only on this endpoint — change
270
- * folder membership via the GraphQL `assignTagManagerAssetToFolder` mutation.
258
+ * Folder this tag belongs to in the dashboard. Settable via PATCH — send a folder
259
+ * UUID to assign, or `null` to remove from its current folder.
271
260
  */
272
261
  folderId?: string | null;
273
262
 
@@ -304,19 +293,16 @@ export interface TagManagerTagUpdateResponse {
304
293
  */
305
294
  parameters: { [key: string]: unknown };
306
295
 
307
- /**
308
- * Tag implementation identifier — usually matches `type` but kept distinct for
309
- * legacy tags whose implementation diverged from the type label.
310
- */
311
- Tag: string;
312
-
313
296
  /**
314
297
  * Parent tag manager that owns this tag.
315
298
  */
316
299
  tagManagerId: string;
317
300
 
318
301
  /**
319
- * Tag type discriminator (e.g. `GA4Event`, `MetaPixel`, `OursInitTag`).
302
+ * Tag type discriminator. Examples that exist today: `OursTrackTag`,
303
+ * `OursInitTag`, `OursIdentifyTag`, `CustomHtmlTag`. Pick from
304
+ * `GET /tag-manager-tags/types` for the canonical set — names like `GA4Event` are
305
+ * not valid ids.
320
306
  */
321
307
  type: string;
322
308
 
@@ -333,8 +319,8 @@ export interface TagManagerTagUpdateResponse {
333
319
  enabled?: boolean | null;
334
320
 
335
321
  /**
336
- * Folder this tag belongs to in the dashboard. Read-only on this endpoint — change
337
- * folder membership via the GraphQL `assignTagManagerAssetToFolder` mutation.
322
+ * Folder this tag belongs to in the dashboard. Settable via PATCH — send a folder
323
+ * UUID to assign, or `null` to remove from its current folder.
338
324
  */
339
325
  folderId?: string | null;
340
326
 
@@ -466,18 +452,15 @@ export interface TagManagerTagCreateParams {
466
452
  */
467
453
  parameters: { [key: string]: unknown };
468
454
 
469
- /**
470
- * Tag implementation identifier (typically equals `type`).
471
- */
472
- Tag: string;
473
-
474
455
  /**
475
456
  * Parent tag manager that will own the new tag.
476
457
  */
477
458
  tagManagerId: string;
478
459
 
479
460
  /**
480
- * Tag type discriminator (e.g. `GA4Event`).
461
+ * Tag type discriminator. Pick from `GET /tag-manager-tags/types` for the
462
+ * canonical set (e.g. `OursTrackTag`, `OursInitTag`, `CustomHtmlTag`). Names like
463
+ * `GA4Event` are not valid ids.
481
464
  */
482
465
  type: string;
483
466
 
@@ -529,12 +512,7 @@ export interface TagManagerTagUpdateParams {
529
512
  priority?: number | null;
530
513
 
531
514
  /**
532
- * Updated tag implementation identifier.
533
- */
534
- Tag?: string;
535
-
536
- /**
537
- * Updated tag type.
515
+ * Updated tag type. Pick from `GET /tag-manager-tags/types`.
538
516
  */
539
517
  type?: string;
540
518
  }