@oursprivacy/platform-sdk 1.18.0 → 1.20.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 (71) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +8 -12
  3. package/client.d.mts +14 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +14 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js +12 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +12 -0
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/destination-types.d.mts +146 -0
  13. package/resources/destination-types.d.mts.map +1 -0
  14. package/resources/destination-types.d.ts +146 -0
  15. package/resources/destination-types.d.ts.map +1 -0
  16. package/resources/destination-types.js +28 -0
  17. package/resources/destination-types.js.map +1 -0
  18. package/resources/destination-types.mjs +24 -0
  19. package/resources/destination-types.mjs.map +1 -0
  20. package/resources/destinations.d.mts +67 -52
  21. package/resources/destinations.d.mts.map +1 -1
  22. package/resources/destinations.d.ts +67 -52
  23. package/resources/destinations.d.ts.map +1 -1
  24. package/resources/destinations.js +9 -3
  25. package/resources/destinations.js.map +1 -1
  26. package/resources/destinations.mjs +9 -3
  27. package/resources/destinations.mjs.map +1 -1
  28. package/resources/index.d.mts +5 -1
  29. package/resources/index.d.mts.map +1 -1
  30. package/resources/index.d.ts +5 -1
  31. package/resources/index.d.ts.map +1 -1
  32. package/resources/index.js +9 -1
  33. package/resources/index.js.map +1 -1
  34. package/resources/index.mjs +4 -0
  35. package/resources/index.mjs.map +1 -1
  36. package/resources/locations.d.mts +270 -0
  37. package/resources/locations.d.mts.map +1 -0
  38. package/resources/locations.d.ts +270 -0
  39. package/resources/locations.d.ts.map +1 -0
  40. package/resources/locations.js +48 -0
  41. package/resources/locations.js.map +1 -0
  42. package/resources/locations.mjs +44 -0
  43. package/resources/locations.mjs.map +1 -0
  44. package/resources/web-scanner-rules.d.mts +195 -0
  45. package/resources/web-scanner-rules.d.mts.map +1 -0
  46. package/resources/web-scanner-rules.d.ts +195 -0
  47. package/resources/web-scanner-rules.d.ts.map +1 -0
  48. package/resources/web-scanner-rules.js +48 -0
  49. package/resources/web-scanner-rules.js.map +1 -0
  50. package/resources/web-scanner-rules.mjs +44 -0
  51. package/resources/web-scanner-rules.mjs.map +1 -0
  52. package/resources/web-scanners.d.mts +199 -0
  53. package/resources/web-scanners.d.mts.map +1 -0
  54. package/resources/web-scanners.d.ts +199 -0
  55. package/resources/web-scanners.d.ts.map +1 -0
  56. package/resources/web-scanners.js +67 -0
  57. package/resources/web-scanners.js.map +1 -0
  58. package/resources/web-scanners.mjs +63 -0
  59. package/resources/web-scanners.mjs.map +1 -0
  60. package/src/client.ts +90 -0
  61. package/src/resources/destination-types.ts +373 -0
  62. package/src/resources/destinations.ts +239 -161
  63. package/src/resources/index.ts +39 -0
  64. package/src/resources/locations.ts +463 -0
  65. package/src/resources/web-scanner-rules.ts +304 -0
  66. package/src/resources/web-scanners.ts +333 -0
  67. package/src/version.ts +1 -1
  68. package/version.d.mts +1 -1
  69. package/version.d.ts +1 -1
  70. package/version.js +1 -1
  71. package/version.mjs +1 -1
@@ -0,0 +1,373 @@
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
+ }