@oursprivacy/platform-sdk 1.21.0 → 1.22.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 (61) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/client.d.mts +6 -12
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -12
  5. package/client.d.ts.map +1 -1
  6. package/client.js +2 -8
  7. package/client.js.map +1 -1
  8. package/client.mjs +2 -8
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/destinations.d.mts +78 -5
  12. package/resources/destinations.d.mts.map +1 -1
  13. package/resources/destinations.d.ts +78 -5
  14. package/resources/destinations.d.ts.map +1 -1
  15. package/resources/destinations.js +11 -0
  16. package/resources/destinations.js.map +1 -1
  17. package/resources/destinations.mjs +11 -0
  18. package/resources/destinations.mjs.map +1 -1
  19. package/resources/index.d.mts +2 -4
  20. package/resources/index.d.mts.map +1 -1
  21. package/resources/index.d.ts +2 -4
  22. package/resources/index.d.ts.map +1 -1
  23. package/resources/index.js +1 -5
  24. package/resources/index.js.map +1 -1
  25. package/resources/index.mjs +0 -2
  26. package/resources/index.mjs.map +1 -1
  27. package/resources/mappings.d.mts +188 -1
  28. package/resources/mappings.d.mts.map +1 -1
  29. package/resources/mappings.d.ts +188 -1
  30. package/resources/mappings.d.ts.map +1 -1
  31. package/resources/mappings.js +41 -0
  32. package/resources/mappings.js.map +1 -1
  33. package/resources/mappings.mjs +41 -0
  34. package/resources/mappings.mjs.map +1 -1
  35. package/src/client.ts +19 -33
  36. package/src/resources/destinations.ts +189 -4
  37. package/src/resources/index.ts +6 -10
  38. package/src/resources/mappings.ts +343 -0
  39. package/src/version.ts +1 -1
  40. package/version.d.mts +1 -1
  41. package/version.d.ts +1 -1
  42. package/version.js +1 -1
  43. package/version.mjs +1 -1
  44. package/resources/destination-types.d.mts +0 -146
  45. package/resources/destination-types.d.mts.map +0 -1
  46. package/resources/destination-types.d.ts +0 -146
  47. package/resources/destination-types.d.ts.map +0 -1
  48. package/resources/destination-types.js +0 -28
  49. package/resources/destination-types.js.map +0 -1
  50. package/resources/destination-types.mjs +0 -24
  51. package/resources/destination-types.mjs.map +0 -1
  52. package/resources/mapping-templates.d.mts +0 -101
  53. package/resources/mapping-templates.d.mts.map +0 -1
  54. package/resources/mapping-templates.d.ts +0 -101
  55. package/resources/mapping-templates.d.ts.map +0 -1
  56. package/resources/mapping-templates.js +0 -22
  57. package/resources/mapping-templates.js.map +0 -1
  58. package/resources/mapping-templates.mjs +0 -18
  59. package/resources/mapping-templates.mjs.map +0 -1
  60. package/src/resources/destination-types.ts +0 -373
  61. package/src/resources/mapping-templates.ts +0 -203
@@ -1,373 +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 { RequestOptions } from '../internal/request-options';
6
- import { path } from '../internal/utils/path';
7
-
8
- export class DestinationTypes extends APIResource {
9
- /**
10
- * Lists every destination type the platform supports, with its human-readable
11
- * label, capability flags (oauth, listsAccounts, supportsRenamedEvents), and the
12
- * settings descriptor used to configure a destination of that type.
13
- * Account-agnostic — the response is the same for every API key. Requires scope:
14
- * destination:list
15
- */
16
- list(options?: RequestOptions): APIPromise<DestinationTypeListResponse> {
17
- return this._client.get('/rest/v1/destination-types', options);
18
- }
19
-
20
- /**
21
- * Fetch the descriptor for a single destination type by its identifier (e.g.
22
- * `Klaviyo`, `Facebook`, `GoogleDataManagerEventIngest`). Returns 404 if the
23
- * identifier is unknown. Requires scope: destination:list
24
- */
25
- retrieve(id: string, options?: RequestOptions): APIPromise<DestinationTypeRetrieveResponse> {
26
- return this._client.get(path`/rest/v1/destination-types/${id}`, options);
27
- }
28
- }
29
-
30
- export interface DestinationTypeListResponse {
31
- entities: Array<DestinationTypeListResponse.Entity>;
32
- }
33
-
34
- export namespace DestinationTypeListResponse {
35
- export interface Entity {
36
- id:
37
- | 'Audiohook'
38
- | 'BasisPostback'
39
- | 'OursSyntheticData'
40
- | 'FullContact'
41
- | 'ZoomInfo'
42
- | 'TheTradeDesk'
43
- | 'Braze'
44
- | 'LiveIntent'
45
- | 'ConvertABTestingEvent'
46
- | 'Customerio'
47
- | 'BingAds'
48
- | 'BingAdsWeb'
49
- | 'HTTPDestination'
50
- | 'Woopra'
51
- | 'HTTPCustomRequest'
52
- | 'Google'
53
- | 'GoogleAdsServerContainer'
54
- | 'G4Analytics'
55
- | 'GA4ServerProxy'
56
- | 'GA4MeasurementProtocol'
57
- | 'GoogleAds360'
58
- | 'Facebook'
59
- | 'Mixpanel'
60
- | 'Amplitude'
61
- | 'TikTok'
62
- | 'Reddit'
63
- | 'Podscribe'
64
- | 'Pinterest'
65
- | 'Mailchimp'
66
- | 'AWSKinesis'
67
- | 'AWSLambda'
68
- | 'GooglePubSub'
69
- | 'LinkedInAdsCAPI'
70
- | 'ActiveCampaignApi'
71
- | 'StackAdaptAPI'
72
- | 'Hubspot'
73
- | 'Klaviyo'
74
- | 'XAds'
75
- | 'QuoraAds'
76
- | 'SnapchatAdsCapi'
77
- | 'Partnerize'
78
- | 'NextdoorAds'
79
- | 'Tatari'
80
- | 'Viant'
81
- | 'Impact'
82
- | 'Spotify'
83
- | 'Taboola'
84
- | 'AmazonDSP'
85
- | 'AppLovin'
86
- | 'IHeartMediaMagellan'
87
- | 'Vibe'
88
- | 'GoogleDataManagerEventIngest'
89
- | 'Zendesk'
90
- | 'Iterable'
91
- | 'ArtsAI'
92
- | 'QuantcastCAPI'
93
- | 'FloodlightSGTM'
94
- | 'VWO'
95
- | 'Attentive'
96
- | 'Admitad'
97
- | 'Plausible'
98
- | 'PostHog'
99
- | 'RokuCAPI'
100
- | 'Everflow'
101
- | 'BeeswaxPostback'
102
- | 'AdobeAnalytics';
103
-
104
- capabilities: Entity.Capabilities;
105
-
106
- label: string;
107
-
108
- settings: Array<
109
- | Entity.UnionMember0
110
- | Entity.UnionMember1
111
- | Entity.UnionMember2
112
- | Entity.UnionMember3
113
- | Entity.UnionMember4
114
- >;
115
-
116
- status: 'deprecated' | 'ga';
117
- }
118
-
119
- export namespace Entity {
120
- export interface Capabilities {
121
- listsAccounts: boolean;
122
-
123
- oauth: boolean;
124
-
125
- supportsRenamedEvents: boolean;
126
- }
127
-
128
- export interface UnionMember0 {
129
- key: string;
130
-
131
- /**
132
- * Informational display message only. Do not send this key in POST or PATCH
133
- * settings.
134
- */
135
- label: string;
136
-
137
- type: 'Alert';
138
- }
139
-
140
- export interface UnionMember1 {
141
- key: string;
142
-
143
- label: string;
144
-
145
- options: Array<UnionMember1.Option>;
146
-
147
- type: 'Select';
148
-
149
- required?: boolean | null;
150
-
151
- sublabel?: string | null;
152
- }
153
-
154
- export namespace UnionMember1 {
155
- export interface Option {
156
- label: string;
157
-
158
- value: string;
159
- }
160
- }
161
-
162
- export interface UnionMember2 {
163
- key: string;
164
-
165
- label: string;
166
-
167
- type: 'Switch';
168
-
169
- defaultValue?: boolean | null;
170
-
171
- required?: boolean | null;
172
-
173
- sublabel?: string | null;
174
- }
175
-
176
- export interface UnionMember3 {
177
- key: string;
178
-
179
- label: string;
180
-
181
- type: 'GenericOauth';
182
-
183
- sublabel?: string | null;
184
- }
185
-
186
- export interface UnionMember4 {
187
- key: string;
188
-
189
- label: string;
190
-
191
- placeholder: string;
192
-
193
- type: 'Text' | 'Secret';
194
-
195
- required?: boolean | null;
196
-
197
- sublabel?: string | null;
198
- }
199
- }
200
- }
201
-
202
- export interface DestinationTypeRetrieveResponse {
203
- id:
204
- | 'Audiohook'
205
- | 'BasisPostback'
206
- | 'OursSyntheticData'
207
- | 'FullContact'
208
- | 'ZoomInfo'
209
- | 'TheTradeDesk'
210
- | 'Braze'
211
- | 'LiveIntent'
212
- | 'ConvertABTestingEvent'
213
- | 'Customerio'
214
- | 'BingAds'
215
- | 'BingAdsWeb'
216
- | 'HTTPDestination'
217
- | 'Woopra'
218
- | 'HTTPCustomRequest'
219
- | 'Google'
220
- | 'GoogleAdsServerContainer'
221
- | 'G4Analytics'
222
- | 'GA4ServerProxy'
223
- | 'GA4MeasurementProtocol'
224
- | 'GoogleAds360'
225
- | 'Facebook'
226
- | 'Mixpanel'
227
- | 'Amplitude'
228
- | 'TikTok'
229
- | 'Reddit'
230
- | 'Podscribe'
231
- | 'Pinterest'
232
- | 'Mailchimp'
233
- | 'AWSKinesis'
234
- | 'AWSLambda'
235
- | 'GooglePubSub'
236
- | 'LinkedInAdsCAPI'
237
- | 'ActiveCampaignApi'
238
- | 'StackAdaptAPI'
239
- | 'Hubspot'
240
- | 'Klaviyo'
241
- | 'XAds'
242
- | 'QuoraAds'
243
- | 'SnapchatAdsCapi'
244
- | 'Partnerize'
245
- | 'NextdoorAds'
246
- | 'Tatari'
247
- | 'Viant'
248
- | 'Impact'
249
- | 'Spotify'
250
- | 'Taboola'
251
- | 'AmazonDSP'
252
- | 'AppLovin'
253
- | 'IHeartMediaMagellan'
254
- | 'Vibe'
255
- | 'GoogleDataManagerEventIngest'
256
- | 'Zendesk'
257
- | 'Iterable'
258
- | 'ArtsAI'
259
- | 'QuantcastCAPI'
260
- | 'FloodlightSGTM'
261
- | 'VWO'
262
- | 'Attentive'
263
- | 'Admitad'
264
- | 'Plausible'
265
- | 'PostHog'
266
- | 'RokuCAPI'
267
- | 'Everflow'
268
- | 'BeeswaxPostback'
269
- | 'AdobeAnalytics';
270
-
271
- capabilities: DestinationTypeRetrieveResponse.Capabilities;
272
-
273
- label: string;
274
-
275
- settings: Array<
276
- | DestinationTypeRetrieveResponse.UnionMember0
277
- | DestinationTypeRetrieveResponse.UnionMember1
278
- | DestinationTypeRetrieveResponse.UnionMember2
279
- | DestinationTypeRetrieveResponse.UnionMember3
280
- | DestinationTypeRetrieveResponse.UnionMember4
281
- >;
282
-
283
- status: 'deprecated' | 'ga';
284
- }
285
-
286
- export namespace DestinationTypeRetrieveResponse {
287
- export interface Capabilities {
288
- listsAccounts: boolean;
289
-
290
- oauth: boolean;
291
-
292
- supportsRenamedEvents: boolean;
293
- }
294
-
295
- export interface UnionMember0 {
296
- key: string;
297
-
298
- /**
299
- * Informational display message only. Do not send this key in POST or PATCH
300
- * settings.
301
- */
302
- label: string;
303
-
304
- type: 'Alert';
305
- }
306
-
307
- export interface UnionMember1 {
308
- key: string;
309
-
310
- label: string;
311
-
312
- options: Array<UnionMember1.Option>;
313
-
314
- type: 'Select';
315
-
316
- required?: boolean | null;
317
-
318
- sublabel?: string | null;
319
- }
320
-
321
- export namespace UnionMember1 {
322
- export interface Option {
323
- label: string;
324
-
325
- value: string;
326
- }
327
- }
328
-
329
- export interface UnionMember2 {
330
- key: string;
331
-
332
- label: string;
333
-
334
- type: 'Switch';
335
-
336
- defaultValue?: boolean | null;
337
-
338
- required?: boolean | null;
339
-
340
- sublabel?: string | null;
341
- }
342
-
343
- export interface UnionMember3 {
344
- key: string;
345
-
346
- label: string;
347
-
348
- type: 'GenericOauth';
349
-
350
- sublabel?: string | null;
351
- }
352
-
353
- export interface UnionMember4 {
354
- key: string;
355
-
356
- label: string;
357
-
358
- placeholder: string;
359
-
360
- type: 'Text' | 'Secret';
361
-
362
- required?: boolean | null;
363
-
364
- sublabel?: string | null;
365
- }
366
- }
367
-
368
- export declare namespace DestinationTypes {
369
- export {
370
- type DestinationTypeListResponse as DestinationTypeListResponse,
371
- type DestinationTypeRetrieveResponse as DestinationTypeRetrieveResponse,
372
- };
373
- }
@@ -1,203 +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 { RequestOptions } from '../internal/request-options';
6
-
7
- export class MappingTemplates extends APIResource {
8
- /**
9
- * Discover every mapping template available for a destination or source, with full
10
- * property descriptors inlined. Use the returned `id` as `templateId` when calling
11
- * `POST /rest/v1/mappings` (template fat-create variant), and use each entry under
12
- * `mappings[]` to learn the valid `property`, `kind`, `modificationOptions`, and
13
- * any enforced `options`. The `isDefault: true` entry is the destination's
14
- * built-in default template (the one stored at `MAPPER#{destinationId}` when
15
- * configured via `PUT /rest/v1/default-mappings/{destinationId}`). Requires scope:
16
- * mapping:find
17
- */
18
- list(query: MappingTemplateListParams, options?: RequestOptions): APIPromise<MappingTemplateListResponse> {
19
- return this._client.get('/rest/v1/mapping-templates', { query, ...options });
20
- }
21
- }
22
-
23
- export interface MappingTemplateListResponse {
24
- entities: Array<MappingTemplateListResponse.Entity>;
25
- }
26
-
27
- export namespace MappingTemplateListResponse {
28
- export interface Entity {
29
- /**
30
- * Template identifier — pass to `POST /rest/v1/mappings` as `templateId`.
31
- */
32
- id: string;
33
-
34
- /**
35
- * True for the destination's built-in default template (the one stored at
36
- * `MAPPER#{destinationId}` when configured). Sources only have one template; it is
37
- * always default.
38
- */
39
- isDefault: boolean;
40
-
41
- mappings: Array<Entity.Mapping>;
42
-
43
- name: string;
44
-
45
- description?: string | null;
46
- }
47
-
48
- export namespace Entity {
49
- export interface Mapping {
50
- /**
51
- * Long-form description / tooltip for this property.
52
- */
53
- description: string | null;
54
-
55
- isPII: boolean;
56
-
57
- /**
58
- * Type information for SDK validation (Text, Integer, Email, Url, IP, Object,
59
- * KnownObject, Date, DateTime, Array, Boolean, JSON).
60
- */
61
- kind:
62
- | 'Array'
63
- | 'Boolean'
64
- | 'Date'
65
- | 'DateTime'
66
- | 'Email'
67
- | 'IP'
68
- | 'Integer'
69
- | 'JSON'
70
- | 'KnownObject'
71
- | 'Object'
72
- | 'Text'
73
- | 'Url';
74
-
75
- /**
76
- * Human-readable label (e.g. "Email", "Event Name").
77
- */
78
- label: string;
79
-
80
- /**
81
- * The template default source expression, e.g. `{{visitor.email}}`.
82
- */
83
- map: string;
84
-
85
- /**
86
- * The value to send as `mappings[].property` when creating or patching a mapping.
87
- */
88
- property: string;
89
-
90
- required: boolean;
91
-
92
- /**
93
- * The template default modification (hashing / case / URL truncation).
94
- */
95
- modification?:
96
- | 'CamelCase'
97
- | 'DmaIP'
98
- | 'DomainOnly'
99
- | 'DomainPathOnly'
100
- | 'DomainPathUTMs'
101
- | 'DomainUTMs'
102
- | 'FakeDomain'
103
- | 'FakeDomainRealPath'
104
- | 'FakeIP'
105
- | 'FullUrl'
106
- | 'Hash'
107
- | 'HashMD5'
108
- | 'HashedCountry'
109
- | 'HashedDateOfBirth'
110
- | 'HashedGender'
111
- | 'HashedNormalized'
112
- | 'HashedNormalizedNoSpecialChars'
113
- | 'HashedPhone'
114
- | 'HashedState'
115
- | 'HashedZip'
116
- | 'KebabCase'
117
- | 'LowerCase'
118
- | 'None'
119
- | 'Null'
120
- | 'Redacted'
121
- | 'RegionalIP'
122
- | 'SnakeCase'
123
- | 'StartCase'
124
- | 'UpperCase'
125
- | null;
126
-
127
- /**
128
- * Suggested modification options for this property. Not a whitelist.
129
- */
130
- modificationOptions?: Array<
131
- | 'CamelCase'
132
- | 'DmaIP'
133
- | 'DomainOnly'
134
- | 'DomainPathOnly'
135
- | 'DomainPathUTMs'
136
- | 'DomainUTMs'
137
- | 'FakeDomain'
138
- | 'FakeDomainRealPath'
139
- | 'FakeIP'
140
- | 'FullUrl'
141
- | 'Hash'
142
- | 'HashMD5'
143
- | 'HashedCountry'
144
- | 'HashedDateOfBirth'
145
- | 'HashedGender'
146
- | 'HashedNormalized'
147
- | 'HashedNormalizedNoSpecialChars'
148
- | 'HashedPhone'
149
- | 'HashedState'
150
- | 'HashedZip'
151
- | 'KebabCase'
152
- | 'LowerCase'
153
- | 'None'
154
- | 'Null'
155
- | 'Redacted'
156
- | 'RegionalIP'
157
- | 'SnakeCase'
158
- | 'StartCase'
159
- | 'UpperCase'
160
- > | null;
161
-
162
- /**
163
- * When set, the ONLY valid `map` values for this property. Typically used for
164
- * enum-shaped destinations.
165
- */
166
- options?: Array<Mapping.Option> | null;
167
-
168
- /**
169
- * Non-binding suggestions for the `map` value (e.g. common event names a customer
170
- * might want to use).
171
- */
172
- suggestedOptions?: Array<Mapping.SuggestedOption> | null;
173
- }
174
-
175
- export namespace Mapping {
176
- export interface Option {
177
- label: string;
178
-
179
- value: string;
180
- }
181
-
182
- export interface SuggestedOption {
183
- label: string;
184
-
185
- value: string;
186
- }
187
- }
188
- }
189
- }
190
-
191
- export interface MappingTemplateListParams {
192
- /**
193
- * Destination or source id. Required.
194
- */
195
- entityId: string;
196
- }
197
-
198
- export declare namespace MappingTemplates {
199
- export {
200
- type MappingTemplateListResponse as MappingTemplateListResponse,
201
- type MappingTemplateListParams as MappingTemplateListParams,
202
- };
203
- }