@oursprivacy/platform-sdk 1.22.0 → 1.24.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 (95) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +17 -14
  3. package/client.d.mts +12 -9
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +12 -9
  6. package/client.d.ts.map +1 -1
  7. package/client.js +6 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +6 -3
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/allowed-events.d.mts +206 -5
  13. package/resources/allowed-events.d.mts.map +1 -1
  14. package/resources/allowed-events.d.ts +206 -5
  15. package/resources/allowed-events.d.ts.map +1 -1
  16. package/resources/allowed-events.js +48 -4
  17. package/resources/allowed-events.js.map +1 -1
  18. package/resources/allowed-events.mjs +48 -4
  19. package/resources/allowed-events.mjs.map +1 -1
  20. package/resources/consent-analytics.d.mts +57 -0
  21. package/resources/consent-analytics.d.mts.map +1 -0
  22. package/resources/consent-analytics.d.ts +57 -0
  23. package/resources/consent-analytics.d.ts.map +1 -0
  24. package/resources/consent-analytics.js +22 -0
  25. package/resources/consent-analytics.js.map +1 -0
  26. package/resources/consent-analytics.mjs +18 -0
  27. package/resources/consent-analytics.mjs.map +1 -0
  28. package/resources/consent-settings.d.mts +198 -1
  29. package/resources/consent-settings.d.mts.map +1 -1
  30. package/resources/consent-settings.d.ts +198 -1
  31. package/resources/consent-settings.d.ts.map +1 -1
  32. package/resources/consent-settings.js +40 -0
  33. package/resources/consent-settings.js.map +1 -1
  34. package/resources/consent-settings.mjs +40 -0
  35. package/resources/consent-settings.mjs.map +1 -1
  36. package/resources/data-governance.d.mts +793 -0
  37. package/resources/data-governance.d.mts.map +1 -0
  38. package/resources/data-governance.d.ts +793 -0
  39. package/resources/data-governance.d.ts.map +1 -0
  40. package/resources/data-governance.js +70 -0
  41. package/resources/data-governance.js.map +1 -0
  42. package/resources/data-governance.mjs +66 -0
  43. package/resources/data-governance.mjs.map +1 -0
  44. package/resources/default-mappings.d.mts +60 -3
  45. package/resources/default-mappings.d.mts.map +1 -1
  46. package/resources/default-mappings.d.ts +60 -3
  47. package/resources/default-mappings.d.ts.map +1 -1
  48. package/resources/destinations.d.mts +7 -7
  49. package/resources/destinations.d.mts.map +1 -1
  50. package/resources/destinations.d.ts +7 -7
  51. package/resources/destinations.d.ts.map +1 -1
  52. package/resources/index.d.mts +5 -4
  53. package/resources/index.d.mts.map +1 -1
  54. package/resources/index.d.ts +5 -4
  55. package/resources/index.d.ts.map +1 -1
  56. package/resources/index.js +5 -3
  57. package/resources/index.js.map +1 -1
  58. package/resources/index.mjs +2 -1
  59. package/resources/index.mjs.map +1 -1
  60. package/resources/mappings.d.mts +174 -15
  61. package/resources/mappings.d.mts.map +1 -1
  62. package/resources/mappings.d.ts +174 -15
  63. package/resources/mappings.d.ts.map +1 -1
  64. package/resources/sources.d.mts +213 -45
  65. package/resources/sources.d.mts.map +1 -1
  66. package/resources/sources.d.ts +213 -45
  67. package/resources/sources.d.ts.map +1 -1
  68. package/resources/sources.js +18 -7
  69. package/resources/sources.js.map +1 -1
  70. package/resources/sources.mjs +18 -7
  71. package/resources/sources.mjs.map +1 -1
  72. package/src/client.ts +60 -27
  73. package/src/resources/allowed-events.ts +232 -4
  74. package/src/resources/consent-analytics.ts +76 -0
  75. package/src/resources/consent-settings.ts +272 -0
  76. package/src/resources/data-governance.ts +1091 -0
  77. package/src/resources/default-mappings.ts +60 -3
  78. package/src/resources/destinations.ts +9 -2
  79. package/src/resources/index.ts +27 -12
  80. package/src/resources/mappings.ts +174 -15
  81. package/src/resources/sources.ts +337 -88
  82. package/src/version.ts +1 -1
  83. package/version.d.mts +1 -1
  84. package/version.d.ts +1 -1
  85. package/version.js +1 -1
  86. package/version.mjs +1 -1
  87. package/resources/global-dispatch-centers.d.mts +0 -349
  88. package/resources/global-dispatch-centers.d.mts.map +0 -1
  89. package/resources/global-dispatch-centers.d.ts +0 -349
  90. package/resources/global-dispatch-centers.d.ts.map +0 -1
  91. package/resources/global-dispatch-centers.js +0 -43
  92. package/resources/global-dispatch-centers.js.map +0 -1
  93. package/resources/global-dispatch-centers.mjs +0 -39
  94. package/resources/global-dispatch-centers.mjs.map +0 -1
  95. package/src/resources/global-dispatch-centers.ts +0 -458
@@ -1,458 +0,0 @@
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 GlobalDispatchCenters extends APIResource {
10
- /**
11
- * List global dispatch centers for this account. Supports cursor pagination via
12
- * `limit` and `cursor`. Requires scope: globalDispatch:list
13
- */
14
- list(
15
- query: GlobalDispatchCenterListParams | null | undefined = {},
16
- options?: RequestOptions,
17
- ): PagePromise<GlobalDispatchCenterListResponsesCursor, GlobalDispatchCenterListResponse> {
18
- return this._client.getAPIList(
19
- '/rest/v1/global-dispatch-centers',
20
- Cursor<GlobalDispatchCenterListResponse>,
21
- { query, ...options },
22
- );
23
- }
24
-
25
- /**
26
- * Create a new global dispatch center. Requires scope: globalDispatch:create
27
- */
28
- create(
29
- body: GlobalDispatchCenterCreateParams,
30
- options?: RequestOptions,
31
- ): APIPromise<GlobalDispatchCenterCreateResponse> {
32
- return this._client.post('/rest/v1/global-dispatch-centers', { body, ...options });
33
- }
34
-
35
- /**
36
- * Find a single global dispatch center by ID. Requires scope: globalDispatch:find
37
- */
38
- retrieve(id: string, options?: RequestOptions): APIPromise<GlobalDispatchCenterRetrieveResponse | null> {
39
- return this._client.get(path`/rest/v1/global-dispatch-centers/${id}`, options);
40
- }
41
-
42
- /**
43
- * Partially update a global dispatch center. Only the fields you send are changed.
44
- * Requires scope: globalDispatch:update
45
- */
46
- update(
47
- id: string,
48
- body: GlobalDispatchCenterUpdateParams,
49
- options?: RequestOptions,
50
- ): APIPromise<GlobalDispatchCenterUpdateResponse> {
51
- return this._client.patch(path`/rest/v1/global-dispatch-centers/${id}`, { body, ...options });
52
- }
53
-
54
- /**
55
- * Delete a global dispatch center. Requires scope: globalDispatch:delete
56
- */
57
- delete(id: string, options?: RequestOptions): APIPromise<GlobalDispatchCenterDeleteResponse> {
58
- return this._client.delete(path`/rest/v1/global-dispatch-centers/${id}`, options);
59
- }
60
- }
61
-
62
- export type GlobalDispatchCenterListResponsesCursor = Cursor<GlobalDispatchCenterListResponse>;
63
-
64
- export interface GlobalDispatchCenterListResponse {
65
- /**
66
- * Server-assigned UUID for this dispatch center.
67
- */
68
- id: string;
69
-
70
- /**
71
- * ISO 8601 timestamp when the center was created.
72
- */
73
- createdAt: string;
74
-
75
- /**
76
- * When false, the dispatch center is configured but does not route events.
77
- */
78
- isEnabled: boolean;
79
-
80
- /**
81
- * Discriminator for the entity type. Always "globalDispatchCenter".
82
- */
83
- kind: string;
84
-
85
- /**
86
- * Routing categories in priority order (1..N).
87
- */
88
- categories?: Array<GlobalDispatchCenterListResponse.Category> | null;
89
-
90
- /**
91
- * Human-readable name shown in the dashboard.
92
- */
93
- name?: string | null;
94
-
95
- /**
96
- * Free-form notes for this center.
97
- */
98
- notes?: string | null;
99
-
100
- /**
101
- * ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
102
- * center; advances on every PATCH.
103
- */
104
- updatedAt?: string | null;
105
- }
106
-
107
- export namespace GlobalDispatchCenterListResponse {
108
- export interface Category {
109
- /**
110
- * Display name for the category.
111
- */
112
- name: string;
113
-
114
- /**
115
- * 1-indexed sort position. Always equals (sorted index + 1) — see PATCH for
116
- * details.
117
- */
118
- priority: number;
119
-
120
- /**
121
- * Optional human-readable description.
122
- */
123
- description?: string | null;
124
-
125
- /**
126
- * Destinations that receive events matching this category.
127
- */
128
- destinationIds?: Array<string> | null;
129
-
130
- /**
131
- * Optional condition tree gating which events match this category.
132
- */
133
- logic?: unknown | null;
134
- }
135
- }
136
-
137
- export interface GlobalDispatchCenterCreateResponse {
138
- /**
139
- * Server-assigned UUID for this dispatch center.
140
- */
141
- id: string;
142
-
143
- /**
144
- * ISO 8601 timestamp when the center was created.
145
- */
146
- createdAt: string;
147
-
148
- /**
149
- * When false, the dispatch center is configured but does not route events.
150
- */
151
- isEnabled: boolean;
152
-
153
- /**
154
- * Discriminator for the entity type. Always "globalDispatchCenter".
155
- */
156
- kind: string;
157
-
158
- /**
159
- * Routing categories in priority order (1..N).
160
- */
161
- categories?: Array<GlobalDispatchCenterCreateResponse.Category> | null;
162
-
163
- /**
164
- * Human-readable name shown in the dashboard.
165
- */
166
- name?: string | null;
167
-
168
- /**
169
- * Free-form notes for this center.
170
- */
171
- notes?: string | null;
172
-
173
- /**
174
- * ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
175
- * center; advances on every PATCH.
176
- */
177
- updatedAt?: string | null;
178
- }
179
-
180
- export namespace GlobalDispatchCenterCreateResponse {
181
- export interface Category {
182
- /**
183
- * Display name for the category.
184
- */
185
- name: string;
186
-
187
- /**
188
- * 1-indexed sort position. Always equals (sorted index + 1) — see PATCH for
189
- * details.
190
- */
191
- priority: number;
192
-
193
- /**
194
- * Optional human-readable description.
195
- */
196
- description?: string | null;
197
-
198
- /**
199
- * Destinations that receive events matching this category.
200
- */
201
- destinationIds?: Array<string> | null;
202
-
203
- /**
204
- * Optional condition tree gating which events match this category.
205
- */
206
- logic?: unknown | null;
207
- }
208
- }
209
-
210
- export interface GlobalDispatchCenterRetrieveResponse {
211
- /**
212
- * Server-assigned UUID for this dispatch center.
213
- */
214
- id: string;
215
-
216
- /**
217
- * ISO 8601 timestamp when the center was created.
218
- */
219
- createdAt: string;
220
-
221
- /**
222
- * When false, the dispatch center is configured but does not route events.
223
- */
224
- isEnabled: boolean;
225
-
226
- /**
227
- * Discriminator for the entity type. Always "globalDispatchCenter".
228
- */
229
- kind: string;
230
-
231
- /**
232
- * Routing categories in priority order (1..N).
233
- */
234
- categories?: Array<GlobalDispatchCenterRetrieveResponse.Category> | null;
235
-
236
- /**
237
- * Human-readable name shown in the dashboard.
238
- */
239
- name?: string | null;
240
-
241
- /**
242
- * Free-form notes for this center.
243
- */
244
- notes?: string | null;
245
-
246
- /**
247
- * ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
248
- * center; advances on every PATCH.
249
- */
250
- updatedAt?: string | null;
251
- }
252
-
253
- export namespace GlobalDispatchCenterRetrieveResponse {
254
- export interface Category {
255
- /**
256
- * Display name for the category.
257
- */
258
- name: string;
259
-
260
- /**
261
- * 1-indexed sort position. Always equals (sorted index + 1) — see PATCH for
262
- * details.
263
- */
264
- priority: number;
265
-
266
- /**
267
- * Optional human-readable description.
268
- */
269
- description?: string | null;
270
-
271
- /**
272
- * Destinations that receive events matching this category.
273
- */
274
- destinationIds?: Array<string> | null;
275
-
276
- /**
277
- * Optional condition tree gating which events match this category.
278
- */
279
- logic?: unknown | null;
280
- }
281
- }
282
-
283
- export interface GlobalDispatchCenterUpdateResponse {
284
- /**
285
- * Server-assigned UUID for this dispatch center.
286
- */
287
- id: string;
288
-
289
- /**
290
- * ISO 8601 timestamp when the center was created.
291
- */
292
- createdAt: string;
293
-
294
- /**
295
- * When false, the dispatch center is configured but does not route events.
296
- */
297
- isEnabled: boolean;
298
-
299
- /**
300
- * Discriminator for the entity type. Always "globalDispatchCenter".
301
- */
302
- kind: string;
303
-
304
- /**
305
- * Routing categories in priority order (1..N).
306
- */
307
- categories?: Array<GlobalDispatchCenterUpdateResponse.Category> | null;
308
-
309
- /**
310
- * Human-readable name shown in the dashboard.
311
- */
312
- name?: string | null;
313
-
314
- /**
315
- * Free-form notes for this center.
316
- */
317
- notes?: string | null;
318
-
319
- /**
320
- * ISO 8601 timestamp of the last write. Equal to createdAt on a freshly created
321
- * center; advances on every PATCH.
322
- */
323
- updatedAt?: string | null;
324
- }
325
-
326
- export namespace GlobalDispatchCenterUpdateResponse {
327
- export interface Category {
328
- /**
329
- * Display name for the category.
330
- */
331
- name: string;
332
-
333
- /**
334
- * 1-indexed sort position. Always equals (sorted index + 1) — see PATCH for
335
- * details.
336
- */
337
- priority: number;
338
-
339
- /**
340
- * Optional human-readable description.
341
- */
342
- description?: string | null;
343
-
344
- /**
345
- * Destinations that receive events matching this category.
346
- */
347
- destinationIds?: Array<string> | null;
348
-
349
- /**
350
- * Optional condition tree gating which events match this category.
351
- */
352
- logic?: unknown | null;
353
- }
354
- }
355
-
356
- export interface GlobalDispatchCenterDeleteResponse {
357
- /**
358
- * The id of the dispatch center that was deleted.
359
- */
360
- id: string;
361
-
362
- /**
363
- * True when the underlying mutation succeeded; the entity is gone.
364
- */
365
- deleted: boolean;
366
- }
367
-
368
- export interface GlobalDispatchCenterListParams extends CursorParams {}
369
-
370
- export interface GlobalDispatchCenterCreateParams {
371
- /**
372
- * Whether the center starts enabled. Defaults to false — opt in by setting true
373
- * here or via PATCH later.
374
- */
375
- isEnabled?: boolean | null;
376
-
377
- /**
378
- * Display name for the new center. Defaults to "Consent Dispatch Center".
379
- */
380
- name?: string | null;
381
-
382
- /**
383
- * Free-form notes shown in the dashboard. Not used for routing.
384
- */
385
- notes?: string | null;
386
- }
387
-
388
- export interface GlobalDispatchCenterUpdateParams {
389
- /**
390
- * Full replacement of the categories list. Categories are sorted by priority on
391
- * write and re-stamped 1..N — see the priority field. Omit to leave existing
392
- * categories untouched.
393
- */
394
- categories?: Array<GlobalDispatchCenterUpdateParams.Category> | null;
395
-
396
- /**
397
- * Toggle the dispatch center on/off without changing any other config.
398
- */
399
- isEnabled?: boolean | null;
400
-
401
- /**
402
- * New display name for the center.
403
- */
404
- name?: string | null;
405
-
406
- /**
407
- * Replace the free-form notes.
408
- */
409
- notes?: string | null;
410
- }
411
-
412
- export namespace GlobalDispatchCenterUpdateParams {
413
- export interface Category {
414
- /**
415
- * Optional human-readable description shown in the dashboard.
416
- */
417
- description?: string | null;
418
-
419
- /**
420
- * Destinations that receive events matching this category. Stale IDs (deleted
421
- * destinations or ones from another account) are silently filtered out at write
422
- * time.
423
- */
424
- destinationIds?: Array<string> | null;
425
-
426
- /**
427
- * Optional condition tree. When set, only matching events route to this category.
428
- */
429
- logic?: unknown | null;
430
-
431
- /**
432
- * Display name for the category. Auto-generated if omitted.
433
- */
434
- name?: string | null;
435
-
436
- /**
437
- * Used as a sort key on write. The server sorts categories by this value
438
- * (ascending), then re-stamps priority as (sorted index + 1) on persist. Send any
439
- * positive number — gaps are ironed out, duplicate values keep input order via
440
- * stable sort. Omit to fall to the end.
441
- */
442
- priority?: number | null;
443
- }
444
- }
445
-
446
- export declare namespace GlobalDispatchCenters {
447
- export {
448
- type GlobalDispatchCenterListResponse as GlobalDispatchCenterListResponse,
449
- type GlobalDispatchCenterCreateResponse as GlobalDispatchCenterCreateResponse,
450
- type GlobalDispatchCenterRetrieveResponse as GlobalDispatchCenterRetrieveResponse,
451
- type GlobalDispatchCenterUpdateResponse as GlobalDispatchCenterUpdateResponse,
452
- type GlobalDispatchCenterDeleteResponse as GlobalDispatchCenterDeleteResponse,
453
- type GlobalDispatchCenterListResponsesCursor as GlobalDispatchCenterListResponsesCursor,
454
- type GlobalDispatchCenterListParams as GlobalDispatchCenterListParams,
455
- type GlobalDispatchCenterCreateParams as GlobalDispatchCenterCreateParams,
456
- type GlobalDispatchCenterUpdateParams as GlobalDispatchCenterUpdateParams,
457
- };
458
- }