@oursprivacy/platform-sdk 1.10.0 → 1.11.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 (60) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/allowed-events.d.mts +1 -1
  10. package/resources/allowed-events.d.mts.map +1 -1
  11. package/resources/allowed-events.d.ts +1 -1
  12. package/resources/allowed-events.d.ts.map +1 -1
  13. package/resources/consent-settings.d.mts +126 -12
  14. package/resources/consent-settings.d.mts.map +1 -1
  15. package/resources/consent-settings.d.ts +126 -12
  16. package/resources/consent-settings.d.ts.map +1 -1
  17. package/resources/destinations.d.mts +3 -3
  18. package/resources/destinations.d.mts.map +1 -1
  19. package/resources/destinations.d.ts +3 -3
  20. package/resources/destinations.d.ts.map +1 -1
  21. package/resources/global-dispatch-centers.d.mts +221 -7
  22. package/resources/global-dispatch-centers.d.mts.map +1 -1
  23. package/resources/global-dispatch-centers.d.ts +221 -7
  24. package/resources/global-dispatch-centers.d.ts.map +1 -1
  25. package/resources/global-dispatch-centers.js +2 -2
  26. package/resources/global-dispatch-centers.js.map +1 -1
  27. package/resources/global-dispatch-centers.mjs +2 -2
  28. package/resources/global-dispatch-centers.mjs.map +1 -1
  29. package/resources/index.d.mts +1 -1
  30. package/resources/index.d.mts.map +1 -1
  31. package/resources/index.d.ts +1 -1
  32. package/resources/index.d.ts.map +1 -1
  33. package/resources/index.js.map +1 -1
  34. package/resources/index.mjs.map +1 -1
  35. package/resources/replay-settings.d.mts +13 -5
  36. package/resources/replay-settings.d.mts.map +1 -1
  37. package/resources/replay-settings.d.ts +13 -5
  38. package/resources/replay-settings.d.ts.map +1 -1
  39. package/resources/sources.d.mts +6 -6
  40. package/resources/sources.d.mts.map +1 -1
  41. package/resources/sources.d.ts +6 -6
  42. package/resources/sources.d.ts.map +1 -1
  43. package/resources/versions.d.mts +11 -11
  44. package/resources/versions.d.mts.map +1 -1
  45. package/resources/versions.d.ts +11 -11
  46. package/resources/versions.d.ts.map +1 -1
  47. package/src/client.ts +2 -0
  48. package/src/resources/allowed-events.ts +1 -1
  49. package/src/resources/consent-settings.ts +196 -12
  50. package/src/resources/destinations.ts +3 -3
  51. package/src/resources/global-dispatch-centers.ts +251 -7
  52. package/src/resources/index.ts +1 -0
  53. package/src/resources/replay-settings.ts +19 -5
  54. package/src/resources/sources.ts +6 -6
  55. package/src/resources/versions.ts +11 -11
  56. package/src/version.ts +1 -1
  57. package/version.d.mts +1 -1
  58. package/version.d.ts +1 -1
  59. package/version.js +1 -1
  60. package/version.mjs +1 -1
@@ -9,14 +9,17 @@ export class GlobalDispatchCenters extends APIResource {
9
9
  /**
10
10
  * Create a new global dispatch center. Requires scope: globalDispatch:create
11
11
  */
12
- create(options?: RequestOptions): APIPromise<GlobalDispatchCenterCreateResponse> {
13
- return this._client.post('/rest/v1/global-dispatch-centers', options);
12
+ create(
13
+ body: GlobalDispatchCenterCreateParams,
14
+ options?: RequestOptions,
15
+ ): APIPromise<GlobalDispatchCenterCreateResponse> {
16
+ return this._client.post('/rest/v1/global-dispatch-centers', { body, ...options });
14
17
  }
15
18
 
16
19
  /**
17
20
  * Find a single global dispatch center by ID. Requires scope: globalDispatch:find
18
21
  */
19
- retrieve(id: string, options?: RequestOptions): APIPromise<unknown> {
22
+ retrieve(id: string, options?: RequestOptions): APIPromise<GlobalDispatchCenterRetrieveResponse | null> {
20
23
  return this._client.get(path`/rest/v1/global-dispatch-centers/${id}`, options);
21
24
  }
22
25
 
@@ -47,32 +50,141 @@ export class GlobalDispatchCenters extends APIResource {
47
50
  }
48
51
 
49
52
  export interface GlobalDispatchCenterCreateResponse {
53
+ /**
54
+ * Server-assigned UUID for this dispatch center.
55
+ */
50
56
  id: string;
51
57
 
58
+ /**
59
+ * ISO 8601 timestamp when the center was created.
60
+ */
52
61
  createdAt: string;
53
62
 
63
+ /**
64
+ * When false, the dispatch center is configured but does not route events.
65
+ */
54
66
  isEnabled: boolean;
55
67
 
68
+ /**
69
+ * Discriminator for the entity type. Always "globalDispatchCenter".
70
+ */
56
71
  kind: string;
57
72
 
73
+ /**
74
+ * Human-readable name shown in the dashboard.
75
+ */
58
76
  name?: string | null;
59
77
 
78
+ /**
79
+ * ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
80
+ * center; advances on every PATCH.
81
+ */
60
82
  updatedAt?: string | null;
61
83
  }
62
84
 
63
- export type GlobalDispatchCenterRetrieveResponse = unknown;
85
+ export interface GlobalDispatchCenterRetrieveResponse {
86
+ /**
87
+ * Server-assigned UUID for this dispatch center.
88
+ */
89
+ id: string;
90
+
91
+ /**
92
+ * ISO 8601 timestamp when the center was created.
93
+ */
94
+ createdAt: string;
95
+
96
+ /**
97
+ * When false, the dispatch center is configured but does not route events.
98
+ */
99
+ isEnabled: boolean;
100
+
101
+ /**
102
+ * Discriminator for the entity type. Always "globalDispatchCenter".
103
+ */
104
+ kind: string;
105
+
106
+ /**
107
+ * Routing categories in priority order (1..N).
108
+ */
109
+ categories?: Array<GlobalDispatchCenterRetrieveResponse.Category> | null;
110
+
111
+ /**
112
+ * Human-readable name shown in the dashboard.
113
+ */
114
+ name?: string | null;
115
+
116
+ /**
117
+ * Free-form notes for this center.
118
+ */
119
+ notes?: string | null;
120
+
121
+ /**
122
+ * ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
123
+ * center; advances on every PATCH.
124
+ */
125
+ updatedAt?: string | null;
126
+ }
127
+
128
+ export namespace GlobalDispatchCenterRetrieveResponse {
129
+ export interface Category {
130
+ /**
131
+ * Display name for the category.
132
+ */
133
+ name: string;
134
+
135
+ /**
136
+ * 1-indexed sort position. Always equals (sorted index + 1) — see PATCH for
137
+ * details.
138
+ */
139
+ priority: number;
140
+
141
+ /**
142
+ * Optional human-readable description.
143
+ */
144
+ description?: string | null;
145
+
146
+ /**
147
+ * Destinations that receive events matching this category.
148
+ */
149
+ destinationIds?: Array<string> | null;
150
+
151
+ /**
152
+ * Optional condition tree gating which events match this category.
153
+ */
154
+ logic?: unknown | null;
155
+ }
156
+ }
64
157
 
65
158
  export interface GlobalDispatchCenterUpdateResponse {
159
+ /**
160
+ * Server-assigned UUID for this dispatch center.
161
+ */
66
162
  id: string;
67
163
 
164
+ /**
165
+ * ISO 8601 timestamp when the center was created.
166
+ */
68
167
  createdAt: string;
69
168
 
169
+ /**
170
+ * When false, the dispatch center is configured but does not route events.
171
+ */
70
172
  isEnabled: boolean;
71
173
 
174
+ /**
175
+ * Discriminator for the entity type. Always "globalDispatchCenter".
176
+ */
72
177
  kind: string;
73
178
 
179
+ /**
180
+ * Human-readable name shown in the dashboard.
181
+ */
74
182
  name?: string | null;
75
183
 
184
+ /**
185
+ * ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
186
+ * center; advances on every PATCH.
187
+ */
76
188
  updatedAt?: string | null;
77
189
  }
78
190
 
@@ -82,36 +194,167 @@ export interface GlobalDispatchCenterListResponse {
82
194
 
83
195
  export namespace GlobalDispatchCenterListResponse {
84
196
  export interface Entity {
197
+ /**
198
+ * Server-assigned UUID for this dispatch center.
199
+ */
85
200
  id: string;
86
201
 
202
+ /**
203
+ * ISO 8601 timestamp when the center was created.
204
+ */
87
205
  createdAt: string;
88
206
 
207
+ /**
208
+ * When false, the dispatch center is configured but does not route events.
209
+ */
89
210
  isEnabled: boolean;
90
211
 
212
+ /**
213
+ * Discriminator for the entity type. Always "globalDispatchCenter".
214
+ */
91
215
  kind: string;
92
216
 
93
- categories?: Array<unknown> | null;
217
+ /**
218
+ * Routing categories in priority order (1..N).
219
+ */
220
+ categories?: Array<Entity.Category> | null;
94
221
 
222
+ /**
223
+ * Human-readable name shown in the dashboard.
224
+ */
95
225
  name?: string | null;
96
226
 
227
+ /**
228
+ * Free-form notes for this center.
229
+ */
97
230
  notes?: string | null;
98
231
 
232
+ /**
233
+ * ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
234
+ * center; advances on every PATCH.
235
+ */
99
236
  updatedAt?: string | null;
100
237
  }
238
+
239
+ export namespace Entity {
240
+ export interface Category {
241
+ /**
242
+ * Display name for the category.
243
+ */
244
+ name: string;
245
+
246
+ /**
247
+ * 1-indexed sort position. Always equals (sorted index + 1) — see PATCH for
248
+ * details.
249
+ */
250
+ priority: number;
251
+
252
+ /**
253
+ * Optional human-readable description.
254
+ */
255
+ description?: string | null;
256
+
257
+ /**
258
+ * Destinations that receive events matching this category.
259
+ */
260
+ destinationIds?: Array<string> | null;
261
+
262
+ /**
263
+ * Optional condition tree gating which events match this category.
264
+ */
265
+ logic?: unknown | null;
266
+ }
267
+ }
101
268
  }
102
269
 
103
- export type GlobalDispatchCenterDeleteResponse = boolean;
270
+ export interface GlobalDispatchCenterDeleteResponse {
271
+ /**
272
+ * The id of the dispatch center that was deleted.
273
+ */
274
+ id: string;
275
+
276
+ /**
277
+ * True when the underlying mutation succeeded; the entity is gone.
278
+ */
279
+ deleted: boolean;
280
+ }
281
+
282
+ export interface GlobalDispatchCenterCreateParams {
283
+ /**
284
+ * Whether the center starts enabled. Defaults to false — opt in by setting true
285
+ * here or via PATCH later.
286
+ */
287
+ isEnabled?: boolean | null;
288
+
289
+ /**
290
+ * Display name for the new center. Defaults to "Consent Dispatch Center".
291
+ */
292
+ name?: string | null;
293
+
294
+ /**
295
+ * Free-form notes shown in the dashboard. Not used for routing.
296
+ */
297
+ notes?: string | null;
298
+ }
104
299
 
105
300
  export interface GlobalDispatchCenterUpdateParams {
106
- categories?: Array<unknown> | null;
301
+ /**
302
+ * Full replacement of the categories list. Categories are sorted by priority on
303
+ * write and re-stamped 1..N — see the priority field. Omit to leave existing
304
+ * categories untouched.
305
+ */
306
+ categories?: Array<GlobalDispatchCenterUpdateParams.Category> | null;
107
307
 
308
+ /**
309
+ * Toggle the dispatch center on/off without changing any other config.
310
+ */
108
311
  isEnabled?: boolean | null;
109
312
 
313
+ /**
314
+ * New display name for the center.
315
+ */
110
316
  name?: string | null;
111
317
 
318
+ /**
319
+ * Replace the free-form notes.
320
+ */
112
321
  notes?: string | null;
113
322
  }
114
323
 
324
+ export namespace GlobalDispatchCenterUpdateParams {
325
+ export interface Category {
326
+ /**
327
+ * Optional human-readable description shown in the dashboard.
328
+ */
329
+ description?: string | null;
330
+
331
+ /**
332
+ * Destinations that receive events matching this category. Stale IDs (deleted
333
+ * destinations or ones from another account) are silently filtered out at write
334
+ * time.
335
+ */
336
+ destinationIds?: Array<string> | null;
337
+
338
+ /**
339
+ * Optional condition tree. When set, only matching events route to this category.
340
+ */
341
+ logic?: unknown | null;
342
+
343
+ /**
344
+ * Display name for the category. Auto-generated if omitted.
345
+ */
346
+ name?: string | null;
347
+
348
+ /**
349
+ * Used as a sort key on write. The server sorts categories by this value
350
+ * (ascending), then re-stamps priority as (sorted index + 1) on persist. Send any
351
+ * positive number — gaps are ironed out, duplicate values keep input order via
352
+ * stable sort. Omit to fall to the end.
353
+ */
354
+ priority?: number | null;
355
+ }
356
+ }
357
+
115
358
  export declare namespace GlobalDispatchCenters {
116
359
  export {
117
360
  type GlobalDispatchCenterCreateResponse as GlobalDispatchCenterCreateResponse,
@@ -119,6 +362,7 @@ export declare namespace GlobalDispatchCenters {
119
362
  type GlobalDispatchCenterUpdateResponse as GlobalDispatchCenterUpdateResponse,
120
363
  type GlobalDispatchCenterListResponse as GlobalDispatchCenterListResponse,
121
364
  type GlobalDispatchCenterDeleteResponse as GlobalDispatchCenterDeleteResponse,
365
+ type GlobalDispatchCenterCreateParams as GlobalDispatchCenterCreateParams,
122
366
  type GlobalDispatchCenterUpdateParams as GlobalDispatchCenterUpdateParams,
123
367
  };
124
368
  }
@@ -34,6 +34,7 @@ export {
34
34
  type GlobalDispatchCenterUpdateResponse,
35
35
  type GlobalDispatchCenterListResponse,
36
36
  type GlobalDispatchCenterDeleteResponse,
37
+ type GlobalDispatchCenterCreateParams,
37
38
  type GlobalDispatchCenterUpdateParams,
38
39
  } from './global-dispatch-centers';
39
40
  export {
@@ -16,7 +16,7 @@ export class ReplaySettings extends APIResource {
16
16
  /**
17
17
  * Find a single replay setting by ID. Requires scope: replaySettings:find
18
18
  */
19
- retrieve(id: string, options?: RequestOptions): APIPromise<unknown> {
19
+ retrieve(id: string, options?: RequestOptions): APIPromise<ReplaySettingRetrieveResponse | null> {
20
20
  return this._client.get(path`/rest/v1/replay-settings/${id}`, options);
21
21
  }
22
22
 
@@ -54,7 +54,21 @@ export interface ReplaySettingCreateResponse {
54
54
  replaySettings?: unknown | null;
55
55
  }
56
56
 
57
- export type ReplaySettingRetrieveResponse = unknown;
57
+ export interface ReplaySettingRetrieveResponse {
58
+ id: string;
59
+
60
+ createdAt: string;
61
+
62
+ name: string;
63
+
64
+ status: 'Disabled' | 'Enabled';
65
+
66
+ customDomain?: string | null;
67
+
68
+ updatedAt?: string | null;
69
+
70
+ whitelistDomains?: Array<string> | null;
71
+ }
58
72
 
59
73
  export interface ReplaySettingUpdateResponse {
60
74
  isSuccess: boolean;
@@ -82,7 +96,7 @@ export namespace ReplaySettingListResponse {
82
96
 
83
97
  updatedAt?: string | null;
84
98
 
85
- whitelistDomains?: Array<unknown> | null;
99
+ whitelistDomains?: Array<string> | null;
86
100
  }
87
101
  }
88
102
 
@@ -101,7 +115,7 @@ export interface ReplaySettingCreateParams {
101
115
 
102
116
  status?: string | null;
103
117
 
104
- whitelistDomains?: Array<unknown> | null;
118
+ whitelistDomains?: Array<string> | null;
105
119
  }
106
120
 
107
121
  export interface ReplaySettingUpdateParams {
@@ -111,7 +125,7 @@ export interface ReplaySettingUpdateParams {
111
125
 
112
126
  status?: string | null;
113
127
 
114
- whitelistDomains?: Array<unknown> | null;
128
+ whitelistDomains?: Array<string> | null;
115
129
  }
116
130
 
117
131
  export declare namespace ReplaySettings {
@@ -141,9 +141,9 @@ export interface SourceRetrieveResponse {
141
141
 
142
142
  selectedAccountId?: string | null;
143
143
 
144
- whitelistDomains?: Array<unknown> | null;
144
+ whitelistDomains?: Array<string> | null;
145
145
 
146
- whitelistIps?: Array<unknown> | null;
146
+ whitelistIps?: Array<string> | null;
147
147
  }
148
148
 
149
149
  export interface SourceUpdateResponse {
@@ -250,9 +250,9 @@ export namespace SourceListResponse {
250
250
 
251
251
  selectedAccountId?: string | null;
252
252
 
253
- whitelistDomains?: Array<unknown> | null;
253
+ whitelistDomains?: Array<string> | null;
254
254
 
255
- whitelistIps?: Array<unknown> | null;
255
+ whitelistIps?: Array<string> | null;
256
256
  }
257
257
  }
258
258
 
@@ -314,9 +314,9 @@ export interface SourceUpdateParams {
314
314
 
315
315
  selectedAccountId?: string | null;
316
316
 
317
- whitelistDomains?: Array<unknown> | null;
317
+ whitelistDomains?: Array<string> | null;
318
318
 
319
- whitelistIps?: Array<unknown> | null;
319
+ whitelistIps?: Array<string> | null;
320
320
  }
321
321
 
322
322
  export declare namespace Sources {
@@ -92,27 +92,27 @@ export namespace VersionListResponse {
92
92
  }
93
93
 
94
94
  export interface VersionCreateParams {
95
- includeAllowedEvents?: Array<unknown> | null;
95
+ includeAllowedEvents?: Array<string> | null;
96
96
 
97
- includeConsentSettings?: Array<unknown> | null;
97
+ includeConsentSettings?: Array<string> | null;
98
98
 
99
- includeDestinations?: Array<unknown> | null;
99
+ includeDestinations?: Array<string> | null;
100
100
 
101
- includeExternalAllowedEventData?: Array<unknown> | null;
101
+ includeExternalAllowedEventData?: Array<string> | null;
102
102
 
103
- includeGlobalDispatchCenters?: Array<unknown> | null;
103
+ includeGlobalDispatchCenters?: Array<string> | null;
104
104
 
105
- includeMappings?: Array<unknown> | null;
105
+ includeMappings?: Array<string> | null;
106
106
 
107
- includeReplaySettings?: Array<unknown> | null;
107
+ includeReplaySettings?: Array<string> | null;
108
108
 
109
- includeSources?: Array<unknown> | null;
109
+ includeSources?: Array<string> | null;
110
110
 
111
- includeTagManagerTags?: Array<unknown> | null;
111
+ includeTagManagerTags?: Array<string> | null;
112
112
 
113
- includeTagManagerTriggers?: Array<unknown> | null;
113
+ includeTagManagerTriggers?: Array<string> | null;
114
114
 
115
- includeTagManagerVariables?: Array<unknown> | null;
115
+ includeTagManagerVariables?: Array<string> | null;
116
116
 
117
117
  name?: string | null;
118
118
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.10.0'; // x-release-please-version
1
+ export const VERSION = '1.11.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.10.0";
1
+ export declare const VERSION = "1.11.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.10.0";
1
+ export declare const VERSION = "1.11.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.10.0'; // x-release-please-version
4
+ exports.VERSION = '1.11.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.10.0'; // x-release-please-version
1
+ export const VERSION = '1.11.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map