@oursprivacy/platform-sdk 1.0.0 → 1.2.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 (82) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +5 -5
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +5 -5
  6. package/client.d.ts.map +1 -1
  7. package/client.js +8 -17
  8. package/client.js.map +1 -1
  9. package/client.mjs +8 -17
  10. package/client.mjs.map +1 -1
  11. package/internal/utils/query.d.mts +5 -0
  12. package/internal/utils/query.d.mts.map +1 -0
  13. package/internal/utils/query.d.ts +5 -0
  14. package/internal/utils/query.d.ts.map +1 -0
  15. package/internal/utils/query.js +23 -0
  16. package/internal/utils/query.js.map +1 -0
  17. package/internal/utils/query.mjs +20 -0
  18. package/internal/utils/query.mjs.map +1 -0
  19. package/internal/utils.d.mts +1 -0
  20. package/internal/utils.d.ts +1 -0
  21. package/internal/utils.js +1 -0
  22. package/internal/utils.js.map +1 -1
  23. package/internal/utils.mjs +1 -0
  24. package/package.json +1 -1
  25. package/resources/allowed-events.d.mts +22 -5
  26. package/resources/allowed-events.d.mts.map +1 -1
  27. package/resources/allowed-events.d.ts +22 -5
  28. package/resources/allowed-events.d.ts.map +1 -1
  29. package/resources/consent-settings.d.mts +64 -10
  30. package/resources/consent-settings.d.mts.map +1 -1
  31. package/resources/consent-settings.d.ts +64 -10
  32. package/resources/consent-settings.d.ts.map +1 -1
  33. package/resources/consent-settings.js +2 -2
  34. package/resources/consent-settings.js.map +1 -1
  35. package/resources/consent-settings.mjs +2 -2
  36. package/resources/consent-settings.mjs.map +1 -1
  37. package/resources/destinations.d.mts +48 -6
  38. package/resources/destinations.d.mts.map +1 -1
  39. package/resources/destinations.d.ts +48 -6
  40. package/resources/destinations.d.ts.map +1 -1
  41. package/resources/global-dispatch-centers.d.mts +45 -11
  42. package/resources/global-dispatch-centers.d.mts.map +1 -1
  43. package/resources/global-dispatch-centers.d.ts +45 -11
  44. package/resources/global-dispatch-centers.d.ts.map +1 -1
  45. package/resources/global-dispatch-centers.js +2 -2
  46. package/resources/global-dispatch-centers.js.map +1 -1
  47. package/resources/global-dispatch-centers.mjs +2 -2
  48. package/resources/global-dispatch-centers.mjs.map +1 -1
  49. package/resources/index.d.mts +2 -2
  50. package/resources/index.d.mts.map +1 -1
  51. package/resources/index.d.ts +2 -2
  52. package/resources/index.d.ts.map +1 -1
  53. package/resources/index.js.map +1 -1
  54. package/resources/index.mjs.map +1 -1
  55. package/resources/replay-settings.d.mts +60 -6
  56. package/resources/replay-settings.d.mts.map +1 -1
  57. package/resources/replay-settings.d.ts +60 -6
  58. package/resources/replay-settings.d.ts.map +1 -1
  59. package/resources/sources.d.mts +45 -6
  60. package/resources/sources.d.mts.map +1 -1
  61. package/resources/sources.d.ts +45 -6
  62. package/resources/sources.d.ts.map +1 -1
  63. package/resources/versions.d.mts +41 -5
  64. package/resources/versions.d.mts.map +1 -1
  65. package/resources/versions.d.ts +41 -5
  66. package/resources/versions.d.ts.map +1 -1
  67. package/src/client.ts +11 -26
  68. package/src/internal/utils/query.ts +23 -0
  69. package/src/internal/utils.ts +1 -0
  70. package/src/resources/allowed-events.ts +38 -6
  71. package/src/resources/consent-settings.ts +108 -14
  72. package/src/resources/destinations.ts +416 -8
  73. package/src/resources/global-dispatch-centers.ts +75 -15
  74. package/src/resources/index.ts +0 -2
  75. package/src/resources/replay-settings.ts +100 -8
  76. package/src/resources/sources.ts +235 -8
  77. package/src/resources/versions.ts +77 -7
  78. package/src/version.ts +1 -1
  79. package/version.d.mts +1 -1
  80. package/version.d.ts +1 -1
  81. package/version.js +1 -1
  82. package/version.mjs +1 -1
@@ -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<ReplaySettingRetrieveResponse> {
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
 
@@ -47,28 +47,120 @@ export class ReplaySettings extends APIResource {
47
47
  }
48
48
 
49
49
  export interface ReplaySettingCreateResponse {
50
- data?: unknown;
50
+ isSuccess: boolean;
51
+
52
+ cause?: string | null;
53
+
54
+ replaySettings?: ReplaySettingCreateResponse.ReplaySettings | null;
55
+ }
56
+
57
+ export namespace ReplaySettingCreateResponse {
58
+ export interface ReplaySettings {
59
+ id: string;
60
+
61
+ createdAt: string;
62
+
63
+ name: string;
64
+
65
+ status: 'Disabled' | 'Enabled';
66
+
67
+ updatedAt?: string | null;
68
+ }
51
69
  }
52
70
 
53
71
  export interface ReplaySettingRetrieveResponse {
54
- data?: unknown;
72
+ id: string;
73
+
74
+ createdAt: string;
75
+
76
+ name: string;
77
+
78
+ status: 'Disabled' | 'Enabled';
79
+
80
+ updatedAt?: string | null;
55
81
  }
56
82
 
57
83
  export interface ReplaySettingUpdateResponse {
58
- data?: unknown;
84
+ isSuccess: boolean;
85
+
86
+ cause?: string | null;
87
+
88
+ replaySettings?: ReplaySettingUpdateResponse.ReplaySettings | null;
89
+ }
90
+
91
+ export namespace ReplaySettingUpdateResponse {
92
+ export interface ReplaySettings {
93
+ id: string;
94
+
95
+ createdAt: string;
96
+
97
+ name: string;
98
+
99
+ status: 'Disabled' | 'Enabled';
100
+
101
+ updatedAt?: string | null;
102
+ }
59
103
  }
60
104
 
61
105
  export interface ReplaySettingListResponse {
62
- data?: unknown;
106
+ entities: Array<ReplaySettingListResponse.Entity>;
107
+ }
108
+
109
+ export namespace ReplaySettingListResponse {
110
+ export interface Entity {
111
+ id: string;
112
+
113
+ createdAt: string;
114
+
115
+ name: string;
116
+
117
+ status: 'Disabled' | 'Enabled';
118
+
119
+ updatedAt?: string | null;
120
+ }
63
121
  }
64
122
 
65
123
  export interface ReplaySettingDeleteResponse {
66
- data?: unknown;
124
+ isSuccess: boolean;
125
+
126
+ cause?: string | null;
127
+
128
+ replaySettings?: ReplaySettingDeleteResponse.ReplaySettings | null;
67
129
  }
68
130
 
69
- export interface ReplaySettingCreateParams {}
131
+ export namespace ReplaySettingDeleteResponse {
132
+ export interface ReplaySettings {
133
+ id: string;
134
+
135
+ createdAt: string;
70
136
 
71
- export interface ReplaySettingUpdateParams {}
137
+ name: string;
138
+
139
+ status: 'Disabled' | 'Enabled';
140
+
141
+ updatedAt?: string | null;
142
+ }
143
+ }
144
+
145
+ export interface ReplaySettingCreateParams {
146
+ customDomain?: string | null;
147
+
148
+ name?: string | null;
149
+
150
+ status?: 'Disabled' | 'Enabled' | null;
151
+
152
+ whitelistDomains?: Array<string> | null;
153
+ }
154
+
155
+ export interface ReplaySettingUpdateParams {
156
+ customDomain?: string | null;
157
+
158
+ name?: string | null;
159
+
160
+ status?: 'Disabled' | 'Enabled' | null;
161
+
162
+ whitelistDomains?: Array<string> | null;
163
+ }
72
164
 
73
165
  export declare namespace ReplaySettings {
74
166
  export {
@@ -43,28 +43,255 @@ export class Sources extends APIResource {
43
43
  }
44
44
 
45
45
  export interface SourceCreateResponse {
46
- data?: unknown;
46
+ id: string;
47
+
48
+ createdAt: string;
49
+
50
+ status: 'Disabled' | 'Enabled';
51
+
52
+ type:
53
+ | 'AlchemerWebhook'
54
+ | 'AndroidNativeApi'
55
+ | 'CSharpApi'
56
+ | 'CalComWebhooks'
57
+ | 'CalendlyWebhook'
58
+ | 'CallRail'
59
+ | 'CallTrackingMetrics'
60
+ | 'DotNetApi'
61
+ | 'FacebookLeadAds'
62
+ | 'FormsortWebhooks'
63
+ | 'Formstack'
64
+ | 'GoLangApi'
65
+ | 'HTTPApiSource'
66
+ | 'Healthie'
67
+ | 'HubspotAppActions'
68
+ | 'HubspotFormWebhook'
69
+ | 'JotFormWebhooks'
70
+ | 'KotlinApi'
71
+ | 'NodejsApi'
72
+ | 'PHPApi'
73
+ | 'PixelImage'
74
+ | 'PythonApi'
75
+ | 'ReactNativeApi'
76
+ | 'RedirectSource'
77
+ | 'RubyApi'
78
+ | 'SegmentWebPlugin'
79
+ | 'TypeformWebhooks'
80
+ | 'WebSource'
81
+ | 'Webhook'
82
+ | 'WhatConverts'
83
+ | 'iOSNativeApi';
84
+
85
+ name?: string | null;
47
86
  }
48
87
 
49
88
  export interface SourceRetrieveResponse {
50
- data?: unknown;
89
+ id: string;
90
+
91
+ createdAt: string;
92
+
93
+ status: 'Disabled' | 'Enabled';
94
+
95
+ type:
96
+ | 'AlchemerWebhook'
97
+ | 'AndroidNativeApi'
98
+ | 'CSharpApi'
99
+ | 'CalComWebhooks'
100
+ | 'CalendlyWebhook'
101
+ | 'CallRail'
102
+ | 'CallTrackingMetrics'
103
+ | 'DotNetApi'
104
+ | 'FacebookLeadAds'
105
+ | 'FormsortWebhooks'
106
+ | 'Formstack'
107
+ | 'GoLangApi'
108
+ | 'HTTPApiSource'
109
+ | 'Healthie'
110
+ | 'HubspotAppActions'
111
+ | 'HubspotFormWebhook'
112
+ | 'JotFormWebhooks'
113
+ | 'KotlinApi'
114
+ | 'NodejsApi'
115
+ | 'PHPApi'
116
+ | 'PixelImage'
117
+ | 'PythonApi'
118
+ | 'ReactNativeApi'
119
+ | 'RedirectSource'
120
+ | 'RubyApi'
121
+ | 'SegmentWebPlugin'
122
+ | 'TypeformWebhooks'
123
+ | 'WebSource'
124
+ | 'Webhook'
125
+ | 'WhatConverts'
126
+ | 'iOSNativeApi';
127
+
128
+ name?: string | null;
51
129
  }
52
130
 
53
131
  export interface SourceUpdateResponse {
54
- data?: unknown;
132
+ id: string;
133
+
134
+ createdAt: string;
135
+
136
+ status: 'Disabled' | 'Enabled';
137
+
138
+ type:
139
+ | 'AlchemerWebhook'
140
+ | 'AndroidNativeApi'
141
+ | 'CSharpApi'
142
+ | 'CalComWebhooks'
143
+ | 'CalendlyWebhook'
144
+ | 'CallRail'
145
+ | 'CallTrackingMetrics'
146
+ | 'DotNetApi'
147
+ | 'FacebookLeadAds'
148
+ | 'FormsortWebhooks'
149
+ | 'Formstack'
150
+ | 'GoLangApi'
151
+ | 'HTTPApiSource'
152
+ | 'Healthie'
153
+ | 'HubspotAppActions'
154
+ | 'HubspotFormWebhook'
155
+ | 'JotFormWebhooks'
156
+ | 'KotlinApi'
157
+ | 'NodejsApi'
158
+ | 'PHPApi'
159
+ | 'PixelImage'
160
+ | 'PythonApi'
161
+ | 'ReactNativeApi'
162
+ | 'RedirectSource'
163
+ | 'RubyApi'
164
+ | 'SegmentWebPlugin'
165
+ | 'TypeformWebhooks'
166
+ | 'WebSource'
167
+ | 'Webhook'
168
+ | 'WhatConverts'
169
+ | 'iOSNativeApi';
170
+
171
+ name?: string | null;
55
172
  }
56
173
 
57
174
  export interface SourceListResponse {
58
- data?: unknown;
175
+ entities: Array<SourceListResponse.Entity>;
176
+ }
177
+
178
+ export namespace SourceListResponse {
179
+ export interface Entity {
180
+ id: string;
181
+
182
+ createdAt: string;
183
+
184
+ status: 'Disabled' | 'Enabled';
185
+
186
+ type:
187
+ | 'AlchemerWebhook'
188
+ | 'AndroidNativeApi'
189
+ | 'CSharpApi'
190
+ | 'CalComWebhooks'
191
+ | 'CalendlyWebhook'
192
+ | 'CallRail'
193
+ | 'CallTrackingMetrics'
194
+ | 'DotNetApi'
195
+ | 'FacebookLeadAds'
196
+ | 'FormsortWebhooks'
197
+ | 'Formstack'
198
+ | 'GoLangApi'
199
+ | 'HTTPApiSource'
200
+ | 'Healthie'
201
+ | 'HubspotAppActions'
202
+ | 'HubspotFormWebhook'
203
+ | 'JotFormWebhooks'
204
+ | 'KotlinApi'
205
+ | 'NodejsApi'
206
+ | 'PHPApi'
207
+ | 'PixelImage'
208
+ | 'PythonApi'
209
+ | 'ReactNativeApi'
210
+ | 'RedirectSource'
211
+ | 'RubyApi'
212
+ | 'SegmentWebPlugin'
213
+ | 'TypeformWebhooks'
214
+ | 'WebSource'
215
+ | 'Webhook'
216
+ | 'WhatConverts'
217
+ | 'iOSNativeApi';
218
+
219
+ name?: string | null;
220
+ }
221
+ }
222
+
223
+ export type SourceDeleteResponse = boolean;
224
+
225
+ export interface SourceCreateParams {
226
+ type:
227
+ | 'AlchemerWebhook'
228
+ | 'AndroidNativeApi'
229
+ | 'CSharpApi'
230
+ | 'CalComWebhooks'
231
+ | 'CalendlyWebhook'
232
+ | 'CallRail'
233
+ | 'CallTrackingMetrics'
234
+ | 'DotNetApi'
235
+ | 'FacebookLeadAds'
236
+ | 'FormsortWebhooks'
237
+ | 'Formstack'
238
+ | 'GoLangApi'
239
+ | 'HTTPApiSource'
240
+ | 'Healthie'
241
+ | 'HubspotAppActions'
242
+ | 'HubspotFormWebhook'
243
+ | 'JotFormWebhooks'
244
+ | 'KotlinApi'
245
+ | 'NodejsApi'
246
+ | 'PHPApi'
247
+ | 'PixelImage'
248
+ | 'PythonApi'
249
+ | 'ReactNativeApi'
250
+ | 'RedirectSource'
251
+ | 'RubyApi'
252
+ | 'SegmentWebPlugin'
253
+ | 'TypeformWebhooks'
254
+ | 'WebSource'
255
+ | 'Webhook'
256
+ | 'WhatConverts'
257
+ | 'iOSNativeApi';
258
+
259
+ name?: string | null;
59
260
  }
60
261
 
61
- export interface SourceDeleteResponse {
62
- data?: unknown;
262
+ export interface SourceUpdateParams {
263
+ status: 'Disabled' | 'Enabled';
264
+
265
+ botControlMode?: 'Allow' | 'Block' | 'Threshold' | null;
266
+
267
+ botScoreThreshold?: number | null;
268
+
269
+ excludeRequestContext?: boolean | null;
270
+
271
+ name?: string | null;
272
+
273
+ probabilisticIdentity?: SourceUpdateParams.ProbabilisticIdentity | null;
274
+
275
+ projectAPIKey?: string | null;
276
+
277
+ redirectUrl?: string | null;
278
+
279
+ selectedAccountId?: string | null;
280
+
281
+ whitelistDomains?: Array<unknown> | null;
282
+
283
+ whitelistIps?: Array<string> | null;
63
284
  }
64
285
 
65
- export interface SourceCreateParams {}
286
+ export namespace SourceUpdateParams {
287
+ export interface ProbabilisticIdentity {
288
+ enabled: boolean;
289
+
290
+ matchWindowMinutes?: number | null;
66
291
 
67
- export interface SourceUpdateParams {}
292
+ maxMatchesPerIp?: number | null;
293
+ }
294
+ }
68
295
 
69
296
  export declare namespace Sources {
70
297
  export {
@@ -36,24 +36,94 @@ export class Versions extends APIResource {
36
36
  }
37
37
 
38
38
  export interface VersionCreateResponse {
39
- data?: unknown;
39
+ success: boolean;
40
+
41
+ error?: string | null;
40
42
  }
41
43
 
42
44
  export interface VersionRetrieveResponse {
43
- data?: unknown;
45
+ id: string;
46
+
47
+ createdAt: string;
48
+
49
+ isPublished: boolean;
50
+
51
+ versionNumber: number;
52
+
53
+ name?: string | null;
54
+
55
+ notes?: string | null;
56
+
57
+ publishedAt?: string | null;
44
58
  }
45
59
 
46
60
  export interface VersionUpdateResponse {
47
- data?: unknown;
61
+ id: string;
62
+
63
+ createdAt: string;
64
+
65
+ isPublished: boolean;
66
+
67
+ versionNumber: number;
68
+
69
+ name?: string | null;
70
+
71
+ notes?: string | null;
72
+
73
+ publishedAt?: string | null;
48
74
  }
49
75
 
50
- export interface VersionListResponse {
51
- data?: unknown;
76
+ export type VersionListResponse = Array<VersionListResponse.VersionListResponseItem>;
77
+
78
+ export namespace VersionListResponse {
79
+ export interface VersionListResponseItem {
80
+ id: string;
81
+
82
+ createdAt: string;
83
+
84
+ isPublished: boolean;
85
+
86
+ versionNumber: number;
87
+
88
+ name?: string | null;
89
+
90
+ publishedAt?: string | null;
91
+ }
52
92
  }
53
93
 
54
- export interface VersionCreateParams {}
94
+ export interface VersionCreateParams {
95
+ includeAllowedEvents?: Array<string> | null;
96
+
97
+ includeConsentSettings?: Array<string> | null;
98
+
99
+ includeDestinations?: Array<string> | null;
100
+
101
+ includeExternalAllowedEventData?: Array<string> | null;
102
+
103
+ includeGlobalDispatchCenters?: Array<string> | null;
104
+
105
+ includeMappings?: Array<string> | null;
106
+
107
+ includeReplaySettings?: Array<string> | null;
108
+
109
+ includeSources?: Array<string> | null;
55
110
 
56
- export interface VersionUpdateParams {}
111
+ includeTagManagerTags?: Array<string> | null;
112
+
113
+ includeTagManagerTriggers?: Array<string> | null;
114
+
115
+ includeTagManagerVariables?: Array<string> | null;
116
+
117
+ name?: string | null;
118
+
119
+ notes?: string | null;
120
+ }
121
+
122
+ export interface VersionUpdateParams {
123
+ name?: string | null;
124
+
125
+ notes?: string | null;
126
+ }
57
127
 
58
128
  export declare namespace Versions {
59
129
  export {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.0.0'; // x-release-please-version
1
+ export const VERSION = '1.2.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.0";
1
+ export declare const VERSION = "1.2.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.0";
1
+ export declare const VERSION = "1.2.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.0.0'; // x-release-please-version
4
+ exports.VERSION = '1.2.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.0.0'; // x-release-please-version
1
+ export const VERSION = '1.2.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map