@oursprivacy/platform-sdk 1.65.0 → 1.67.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 +14 -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 +0 -36
  10. package/resources/allowed-events.d.mts.map +1 -1
  11. package/resources/allowed-events.d.ts +0 -36
  12. package/resources/allowed-events.d.ts.map +1 -1
  13. package/resources/analytics.d.mts +96 -1
  14. package/resources/analytics.d.mts.map +1 -1
  15. package/resources/analytics.d.ts +96 -1
  16. package/resources/analytics.d.ts.map +1 -1
  17. package/resources/analytics.js +12 -0
  18. package/resources/analytics.js.map +1 -1
  19. package/resources/analytics.mjs +12 -0
  20. package/resources/analytics.mjs.map +1 -1
  21. package/resources/destinations.d.mts +4 -3
  22. package/resources/destinations.d.mts.map +1 -1
  23. package/resources/destinations.d.ts +4 -3
  24. package/resources/destinations.d.ts.map +1 -1
  25. package/resources/experiments.d.mts +3 -3
  26. package/resources/experiments.d.ts +3 -3
  27. package/resources/experiments.js +3 -3
  28. package/resources/experiments.mjs +3 -3
  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/sources.d.mts +6 -46
  36. package/resources/sources.d.mts.map +1 -1
  37. package/resources/sources.d.ts +6 -46
  38. package/resources/sources.d.ts.map +1 -1
  39. package/resources/tag-manager-tags.d.mts +8 -4
  40. package/resources/tag-manager-tags.d.mts.map +1 -1
  41. package/resources/tag-manager-tags.d.ts +8 -4
  42. package/resources/tag-manager-tags.d.ts.map +1 -1
  43. package/resources/test-events.d.mts +37 -0
  44. package/resources/test-events.d.mts.map +1 -1
  45. package/resources/test-events.d.ts +37 -0
  46. package/resources/test-events.d.ts.map +1 -1
  47. package/src/client.ts +2 -0
  48. package/src/resources/allowed-events.ts +0 -42
  49. package/src/resources/analytics.ts +104 -0
  50. package/src/resources/destinations.ts +4 -3
  51. package/src/resources/experiments.ts +3 -3
  52. package/src/resources/index.ts +1 -0
  53. package/src/resources/sources.ts +6 -48
  54. package/src/resources/tag-manager-tags.ts +8 -4
  55. package/src/resources/test-events.ts +45 -0
  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
@@ -27,58 +27,161 @@ export class Analytics extends APIResource {
27
27
  ): APIPromise<AnalyticsPropertySuggestionsResponse> {
28
28
  return this._client.get('/rest/v1/analytics/property-suggestions', { query, ...options });
29
29
  }
30
+
31
+ /**
32
+ * Discover the event names this account has collected in the last 30 days, for
33
+ * Insight metric `eventNames`, the `eventName` of funnel steps and journey flows,
34
+ * or the `eventName` filter of `GET /rest/v1/analytics/property-suggestions`.
35
+ * Returns `{ entities }` in alphabetical order. The list is not paginated: it
36
+ * holds up to the 500 most frequent names, and newly seen events may take a few
37
+ * minutes to appear. Names missing from the list still work when entered exactly.
38
+ * Requires API-key scope or current OAuth user permission: web-analytics:view
39
+ */
40
+ eventNames(options?: RequestOptions): APIPromise<AnalyticsEventNamesResponse> {
41
+ return this._client.get('/rest/v1/analytics/event-names', options);
42
+ }
30
43
  }
31
44
 
32
45
  export interface AnalyticsQueryCatalogResponse {
46
+ /**
47
+ * Fields available to analytics report filters.
48
+ */
33
49
  entries: Array<AnalyticsQueryCatalogResponse.Entry>;
34
50
 
51
+ /**
52
+ * Known limits of analytics filtering.
53
+ */
35
54
  limitations: Array<string>;
36
55
 
56
+ /**
57
+ * Catalog format version.
58
+ */
37
59
  version: 1;
38
60
  }
39
61
 
40
62
  export namespace AnalyticsQueryCatalogResponse {
41
63
  export interface Entry {
64
+ /**
65
+ * Catalog identifier for this filterable field.
66
+ */
42
67
  id: string;
43
68
 
69
+ /**
70
+ * Human-readable field name.
71
+ */
44
72
  label: string;
45
73
 
74
+ /**
75
+ * How a filter treats events where the field is absent.
76
+ */
46
77
  missingBehavior: string;
47
78
 
79
+ /**
80
+ * Operators this field accepts in a filter condition.
81
+ */
48
82
  operators: Array<string>;
49
83
 
84
+ /**
85
+ * Data source that supplies the field value.
86
+ */
50
87
  provider: string;
51
88
 
89
+ /**
90
+ * Whether the field belongs to the event or to its session.
91
+ */
52
92
  scope: string;
53
93
 
94
+ /**
95
+ * Value type the filter compares against.
96
+ */
54
97
  type: string;
55
98
 
99
+ /**
100
+ * Value types allowed for a path-based field.
101
+ */
56
102
  allowedTypes?: Array<string> | null;
57
103
 
104
+ /**
105
+ * True when a property path must be supplied, as for custom event properties.
106
+ */
58
107
  requiresPath?: boolean | null;
59
108
  }
60
109
  }
61
110
 
62
111
  export interface AnalyticsPropertySuggestionsResponse {
112
+ /**
113
+ * Property paths and value types observed in a sample of recent events.
114
+ */
63
115
  entities: Array<AnalyticsPropertySuggestionsResponse.Entity>;
64
116
 
117
+ /**
118
+ * Start of the observation window the suggestions were drawn from.
119
+ */
65
120
  from: string;
66
121
 
122
+ /**
123
+ * True when the suggestions come from a sample, so some paths may be missing.
124
+ */
67
125
  sampled: boolean;
68
126
 
127
+ /**
128
+ * End of the observation window the suggestions were drawn from.
129
+ */
69
130
  to: string;
70
131
  }
71
132
 
72
133
  export namespace AnalyticsPropertySuggestionsResponse {
73
134
  export interface Entity {
135
+ /**
136
+ * Property path segments, outermost first.
137
+ */
74
138
  path: Array<string>;
75
139
 
140
+ /**
141
+ * Property bag the path belongs to.
142
+ */
76
143
  property: 'event.properties' | 'event.visitor_properties';
77
144
 
145
+ /**
146
+ * Value type observed at this path.
147
+ */
78
148
  type: 'string' | 'number' | 'boolean';
79
149
  }
80
150
  }
81
151
 
152
+ export interface AnalyticsEventNamesResponse {
153
+ /**
154
+ * Distinct event names seen in the last 30 days, alphabetical. Not paginated: the
155
+ * list holds up to the 500 most frequent names.
156
+ */
157
+ entities: Array<AnalyticsEventNamesResponse.Entity>;
158
+
159
+ /**
160
+ * Start of the observation window the suggestions were drawn from.
161
+ */
162
+ from: string;
163
+
164
+ /**
165
+ * True when rare names may be missing from the list. Missing names still work when
166
+ * entered exactly.
167
+ */
168
+ sampled: boolean;
169
+
170
+ /**
171
+ * End of the observation window the suggestions were drawn from.
172
+ */
173
+ to: string;
174
+ }
175
+
176
+ export namespace AnalyticsEventNamesResponse {
177
+ export interface Entity {
178
+ /**
179
+ * Event name exactly as collected, including `$`-prefixed system events.
180
+ */
181
+ name: string;
182
+ }
183
+ }
184
+
82
185
  export interface AnalyticsPropertySuggestionsParams {
83
186
  /**
84
187
  * Optional exact event name to scope the suggestions.
@@ -95,6 +198,7 @@ export declare namespace Analytics {
95
198
  export {
96
199
  type AnalyticsQueryCatalogResponse as AnalyticsQueryCatalogResponse,
97
200
  type AnalyticsPropertySuggestionsResponse as AnalyticsPropertySuggestionsResponse,
201
+ type AnalyticsEventNamesResponse as AnalyticsEventNamesResponse,
98
202
  type AnalyticsPropertySuggestionsParams as AnalyticsPropertySuggestionsParams,
99
203
  };
100
204
  }
@@ -825,7 +825,8 @@ export interface DestinationHealthResponse {
825
825
  windowStart: string;
826
826
 
827
827
  /**
828
- * Timestamp of the most recent dispatch attempt to this destination, if any.
828
+ * ISO 8601 timestamp of the most recent successful dispatch to this destination
829
+ * within the health window. Null when none succeeded in the window.
829
830
  */
830
831
  lastDispatchedAt?: string | null;
831
832
 
@@ -1067,8 +1068,8 @@ export interface DestinationCreateParams {
1067
1068
  settings?: { [key: string]: string | null | number | boolean } | null;
1068
1069
 
1069
1070
  /**
1070
- * Initial status. Omit or send `null` for `Enabled`; send `Disabled` to create
1071
- * paused.
1071
+ * Initial status. Omit or send `null` for `Disabled`; send `Enabled` to create
1072
+ * active.
1072
1073
  */
1073
1074
  status?: 'Enabled' | 'Disabled' | null;
1074
1075
  }
@@ -306,9 +306,9 @@ export class Experiments extends APIResource {
306
306
  * inclusive) to set the window; both default to the full experiment runtime when
307
307
  * omitted, so the no-arg call returns every day from start to today (or to
308
308
  * `stoppedAt` for completed experiments). The response orders days oldest-first
309
- * and omits days with no impressions, so an empty `days` array means there was no
310
- * measured traffic in the window. Requires API-key scope or current OAuth user
311
- * permission: experiment:find
309
+ * and omits days with neither impressions nor goal events, so an empty `days`
310
+ * array means there was no measured traffic in the window. Requires API-key scope
311
+ * or current OAuth user permission: experiment:find
312
312
  *
313
313
  * @example
314
314
  * ```ts
@@ -14,6 +14,7 @@ export {
14
14
  Analytics,
15
15
  type AnalyticsQueryCatalogResponse,
16
16
  type AnalyticsPropertySuggestionsResponse,
17
+ type AnalyticsEventNamesResponse,
17
18
  type AnalyticsPropertySuggestionsParams,
18
19
  } from './analytics';
19
20
  export {
@@ -102,6 +102,7 @@ export interface SourceListResponse {
102
102
  | 'CallTrackingMetrics'
103
103
  | 'DotNetApi'
104
104
  | 'FacebookLeadAds'
105
+ | 'FlutterApi'
105
106
  | 'FormsortWebhooks'
106
107
  | 'Formstack'
107
108
  | 'GoLangApi'
@@ -138,18 +139,6 @@ export interface SourceListResponse {
138
139
  */
139
140
  isPublished?: boolean | null;
140
141
 
141
- /**
142
- * ISO-8601 timestamp of the most recent event from this source successfully
143
- * dispatched to a destination.
144
- */
145
- lastDispatchedAt?: string | null;
146
-
147
- /**
148
- * ISO-8601 timestamp of the most recent inbound request received by this source.
149
- * Useful for debugging "is my webhook even reaching us?"
150
- */
151
- lastTriggeredAt?: string | null;
152
-
153
142
  name?: string | null;
154
143
 
155
144
  probabilisticIdentity?: SourceListResponse.ProbabilisticIdentity | null;
@@ -216,6 +205,7 @@ export interface SourceCreateResponse {
216
205
  | 'CallTrackingMetrics'
217
206
  | 'DotNetApi'
218
207
  | 'FacebookLeadAds'
208
+ | 'FlutterApi'
219
209
  | 'FormsortWebhooks'
220
210
  | 'Formstack'
221
211
  | 'GoLangApi'
@@ -252,18 +242,6 @@ export interface SourceCreateResponse {
252
242
  */
253
243
  isPublished?: boolean | null;
254
244
 
255
- /**
256
- * ISO-8601 timestamp of the most recent event from this source successfully
257
- * dispatched to a destination.
258
- */
259
- lastDispatchedAt?: string | null;
260
-
261
- /**
262
- * ISO-8601 timestamp of the most recent inbound request received by this source.
263
- * Useful for debugging "is my webhook even reaching us?"
264
- */
265
- lastTriggeredAt?: string | null;
266
-
267
245
  name?: string | null;
268
246
 
269
247
  probabilisticIdentity?: SourceCreateResponse.ProbabilisticIdentity | null;
@@ -330,6 +308,7 @@ export interface SourceRetrieveResponse {
330
308
  | 'CallTrackingMetrics'
331
309
  | 'DotNetApi'
332
310
  | 'FacebookLeadAds'
311
+ | 'FlutterApi'
333
312
  | 'FormsortWebhooks'
334
313
  | 'Formstack'
335
314
  | 'GoLangApi'
@@ -366,18 +345,6 @@ export interface SourceRetrieveResponse {
366
345
  */
367
346
  isPublished?: boolean | null;
368
347
 
369
- /**
370
- * ISO-8601 timestamp of the most recent event from this source successfully
371
- * dispatched to a destination.
372
- */
373
- lastDispatchedAt?: string | null;
374
-
375
- /**
376
- * ISO-8601 timestamp of the most recent inbound request received by this source.
377
- * Useful for debugging "is my webhook even reaching us?"
378
- */
379
- lastTriggeredAt?: string | null;
380
-
381
348
  name?: string | null;
382
349
 
383
350
  probabilisticIdentity?: SourceRetrieveResponse.ProbabilisticIdentity | null;
@@ -444,6 +411,7 @@ export interface SourceUpdateResponse {
444
411
  | 'CallTrackingMetrics'
445
412
  | 'DotNetApi'
446
413
  | 'FacebookLeadAds'
414
+ | 'FlutterApi'
447
415
  | 'FormsortWebhooks'
448
416
  | 'Formstack'
449
417
  | 'GoLangApi'
@@ -480,18 +448,6 @@ export interface SourceUpdateResponse {
480
448
  */
481
449
  isPublished?: boolean | null;
482
450
 
483
- /**
484
- * ISO-8601 timestamp of the most recent event from this source successfully
485
- * dispatched to a destination.
486
- */
487
- lastDispatchedAt?: string | null;
488
-
489
- /**
490
- * ISO-8601 timestamp of the most recent inbound request received by this source.
491
- * Useful for debugging "is my webhook even reaching us?"
492
- */
493
- lastTriggeredAt?: string | null;
494
-
495
451
  name?: string | null;
496
452
 
497
453
  probabilisticIdentity?: SourceUpdateResponse.ProbabilisticIdentity | null;
@@ -636,6 +592,7 @@ export interface SourceListParams extends CursorParams {
636
592
  | 'CallTrackingMetrics'
637
593
  | 'DotNetApi'
638
594
  | 'FacebookLeadAds'
595
+ | 'FlutterApi'
639
596
  | 'FormsortWebhooks'
640
597
  | 'Formstack'
641
598
  | 'GoLangApi'
@@ -673,6 +630,7 @@ export interface SourceCreateParams {
673
630
  | 'CallTrackingMetrics'
674
631
  | 'DotNetApi'
675
632
  | 'FacebookLeadAds'
633
+ | 'FlutterApi'
676
634
  | 'FormsortWebhooks'
677
635
  | 'Formstack'
678
636
  | 'GoLangApi'
@@ -119,7 +119,8 @@ export interface TagManagerTagListResponse {
119
119
  type: string;
120
120
 
121
121
  /**
122
- * Triggers that suppress this tag when they match — evaluated after fire triggers.
122
+ * Exception triggers: the tag does not fire on an event one of these matches, like
123
+ * GTM exceptions.
123
124
  */
124
125
  blockTriggerIds?: Array<string> | null;
125
126
 
@@ -183,7 +184,8 @@ export interface TagManagerTagCreateResponse {
183
184
  type: string;
184
185
 
185
186
  /**
186
- * Triggers that suppress this tag when they match — evaluated after fire triggers.
187
+ * Exception triggers: the tag does not fire on an event one of these matches, like
188
+ * GTM exceptions.
187
189
  */
188
190
  blockTriggerIds?: Array<string> | null;
189
191
 
@@ -247,7 +249,8 @@ export interface TagManagerTagRetrieveResponse {
247
249
  type: string;
248
250
 
249
251
  /**
250
- * Triggers that suppress this tag when they match — evaluated after fire triggers.
252
+ * Exception triggers: the tag does not fire on an event one of these matches, like
253
+ * GTM exceptions.
251
254
  */
252
255
  blockTriggerIds?: Array<string> | null;
253
256
 
@@ -311,7 +314,8 @@ export interface TagManagerTagUpdateResponse {
311
314
  type: string;
312
315
 
313
316
  /**
314
- * Triggers that suppress this tag when they match — evaluated after fire triggers.
317
+ * Exception triggers: the tag does not fire on an event one of these matches, like
318
+ * GTM exceptions.
315
319
  */
316
320
  blockTriggerIds?: Array<string> | null;
317
321
 
@@ -321,6 +321,34 @@ export namespace TestEventCreateParams {
321
321
  */
322
322
  ad_id?: string | null;
323
323
 
324
+ /**
325
+ * The platform ad id resolved by the Ours server for this event. Ex: 120212
326
+ */
327
+ ad_touch_ad_id?: string | null;
328
+
329
+ /**
330
+ * The platform ad set or ad group id resolved by the Ours server for this event.
331
+ * Ex: 120211
332
+ */
333
+ ad_touch_adset_id?: string | null;
334
+
335
+ /**
336
+ * The platform campaign id resolved by the Ours server for this event. Ex: 120210
337
+ */
338
+ ad_touch_campaign_id?: string | null;
339
+
340
+ /**
341
+ * The ad platform resolved by the Ours server from the ad tag, ad ids, and click
342
+ * ids on this event. Ex: meta, google
343
+ */
344
+ ad_touch_platform?: string | null;
345
+
346
+ /**
347
+ * Which signal the Ours server used to resolve the ad touch: ours_ad, url_ids,
348
+ * gad_campaignid, utm_id, or click_id.
349
+ */
350
+ ad_touch_source?: string | null;
351
+
324
352
  /**
325
353
  * The AdRoll Click ID (adct) from the landing URL. Ex: adct123
326
354
  */
@@ -480,6 +508,12 @@ export namespace TestEventCreateParams {
480
508
  */
481
509
  fv?: boolean | null;
482
510
 
511
+ /**
512
+ * The Google Ads campaign id that Google auto-tagging appends to ad clicks. Ex:
513
+ * 21780011223
514
+ */
515
+ gad_campaignid?: string | null;
516
+
483
517
  /**
484
518
  * The Google Ad Source. Ex: google
485
519
  */
@@ -584,6 +618,12 @@ export namespace TestEventCreateParams {
584
618
  */
585
619
  os_version?: string | null;
586
620
 
621
+ /**
622
+ * The Ours ad tag from the ours_ad query parameter, as platform.campaign.adset.ad.
623
+ * Ex: meta.120210.120211.120212
624
+ */
625
+ ours_ad?: string | null;
626
+
587
627
  /**
588
628
  * A random set of numbers for the page load
589
629
  */
@@ -698,6 +738,11 @@ export namespace TestEventCreateParams {
698
738
  */
699
739
  utm_content?: string | null;
700
740
 
741
+ /**
742
+ * The UTM ID. The web SDK automatically captures this from the query params.
743
+ */
744
+ utm_id?: string | null;
745
+
701
746
  /**
702
747
  * The UTM Medium. The web SDK automatically captures this from the query params.
703
748
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.65.0'; // x-release-please-version
1
+ export const VERSION = '1.67.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.65.0";
1
+ export declare const VERSION = "1.67.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.65.0";
1
+ export declare const VERSION = "1.67.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.65.0'; // x-release-please-version
4
+ exports.VERSION = '1.67.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.65.0'; // x-release-please-version
1
+ export const VERSION = '1.67.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map