@oursprivacy/platform-sdk 1.67.0 → 1.69.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 (109) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +8 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +8 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/analytics.d.mts +10 -0
  12. package/resources/analytics.d.mts.map +1 -1
  13. package/resources/analytics.d.ts +10 -0
  14. package/resources/analytics.d.ts.map +1 -1
  15. package/resources/dashboards.d.mts +696 -34
  16. package/resources/dashboards.d.mts.map +1 -1
  17. package/resources/dashboards.d.ts +696 -34
  18. package/resources/dashboards.d.ts.map +1 -1
  19. package/resources/destinations.d.mts +7 -7
  20. package/resources/destinations.d.mts.map +1 -1
  21. package/resources/destinations.d.ts +7 -7
  22. package/resources/destinations.d.ts.map +1 -1
  23. package/resources/funnels.d.mts +255 -9
  24. package/resources/funnels.d.mts.map +1 -1
  25. package/resources/funnels.d.ts +255 -9
  26. package/resources/funnels.d.ts.map +1 -1
  27. package/resources/funnels.js +10 -7
  28. package/resources/funnels.js.map +1 -1
  29. package/resources/funnels.mjs +10 -7
  30. package/resources/funnels.mjs.map +1 -1
  31. package/resources/index.d.mts +3 -1
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +3 -1
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +5 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +2 -0
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/insights.d.mts +178 -57
  40. package/resources/insights.d.mts.map +1 -1
  41. package/resources/insights.d.ts +178 -57
  42. package/resources/insights.d.ts.map +1 -1
  43. package/resources/insights.js +9 -7
  44. package/resources/insights.js.map +1 -1
  45. package/resources/insights.mjs +9 -7
  46. package/resources/insights.mjs.map +1 -1
  47. package/resources/journey-flows.d.mts +242 -18
  48. package/resources/journey-flows.d.mts.map +1 -1
  49. package/resources/journey-flows.d.ts +242 -18
  50. package/resources/journey-flows.d.ts.map +1 -1
  51. package/resources/journey-flows.js +18 -12
  52. package/resources/journey-flows.js.map +1 -1
  53. package/resources/journey-flows.mjs +18 -12
  54. package/resources/journey-flows.mjs.map +1 -1
  55. package/resources/query-events.d.mts +324 -0
  56. package/resources/query-events.d.mts.map +1 -0
  57. package/resources/query-events.d.ts +324 -0
  58. package/resources/query-events.d.ts.map +1 -0
  59. package/resources/query-events.js +64 -0
  60. package/resources/query-events.js.map +1 -0
  61. package/resources/query-events.mjs +60 -0
  62. package/resources/query-events.mjs.map +1 -0
  63. package/resources/query-visitors.d.mts +127 -0
  64. package/resources/query-visitors.d.mts.map +1 -0
  65. package/resources/query-visitors.d.ts +127 -0
  66. package/resources/query-visitors.d.ts.map +1 -0
  67. package/resources/query-visitors.js +35 -0
  68. package/resources/query-visitors.js.map +1 -0
  69. package/resources/query-visitors.mjs +31 -0
  70. package/resources/query-visitors.mjs.map +1 -0
  71. package/resources/report-branding.d.mts +112 -28
  72. package/resources/report-branding.d.mts.map +1 -1
  73. package/resources/report-branding.d.ts +112 -28
  74. package/resources/report-branding.d.ts.map +1 -1
  75. package/resources/report-branding.js +29 -15
  76. package/resources/report-branding.js.map +1 -1
  77. package/resources/report-branding.mjs +29 -15
  78. package/resources/report-branding.mjs.map +1 -1
  79. package/resources/sources.d.mts +6 -6
  80. package/resources/sources.d.mts.map +1 -1
  81. package/resources/sources.d.ts +6 -6
  82. package/resources/sources.d.ts.map +1 -1
  83. package/resources/test-events.d.mts +28 -0
  84. package/resources/test-events.d.mts.map +1 -1
  85. package/resources/test-events.d.ts +28 -0
  86. package/resources/test-events.d.ts.map +1 -1
  87. package/resources/web-analytics.d.mts +25 -1
  88. package/resources/web-analytics.d.mts.map +1 -1
  89. package/resources/web-analytics.d.ts +25 -1
  90. package/resources/web-analytics.d.ts.map +1 -1
  91. package/src/client.ts +54 -0
  92. package/src/resources/analytics.ts +12 -0
  93. package/src/resources/dashboards.ts +939 -47
  94. package/src/resources/destinations.ts +23 -2
  95. package/src/resources/funnels.ts +334 -9
  96. package/src/resources/index.ts +24 -0
  97. package/src/resources/insights.ts +224 -57
  98. package/src/resources/journey-flows.ts +300 -22
  99. package/src/resources/query-events.ts +459 -0
  100. package/src/resources/query-visitors.ts +190 -0
  101. package/src/resources/report-branding.ts +132 -27
  102. package/src/resources/sources.ts +12 -0
  103. package/src/resources/test-events.ts +33 -0
  104. package/src/resources/web-analytics.ts +41 -1
  105. package/src/version.ts +1 -1
  106. package/version.d.mts +1 -1
  107. package/version.d.ts +1 -1
  108. package/version.js +1 -1
  109. package/version.mjs +1 -1
@@ -6,11 +6,13 @@ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class ReportBranding extends APIResource {
8
8
  /**
9
- * Get the organization logo shown on Dashboards and Dashboard PDFs. Returns {
10
- * logo: null } when no logo is set. Pass includeDataUrl=false to omit the image
11
- * data and read only its format, dimensions, size, and update time. Requires
12
- * Analytics Suite access. Requires API-key scope or current OAuth user permission:
13
- * web-analytics:view
9
+ * Get the organization report branding: the logo shown on Dashboards,
10
+ * presentations, and PDF reports, and the brand color printed on PDF reports.
11
+ * Returns logo null when no logo is set and brandColor null when PDFs use the
12
+ * default navy. Pass includeDataUrl=false to omit the image data and read only its
13
+ * format, dimensions, size, and update time. Change the color with PATCH
14
+ * /rest/v1/report-branding/colors. Requires API-key scope or current OAuth user
15
+ * permission: web-analytics:view or organization:manage-report-branding
14
16
  */
15
17
  retrieve(
16
18
  query: ReportBrandingRetrieveParams | null | undefined = {},
@@ -20,12 +22,12 @@ export class ReportBranding extends APIResource {
20
22
  }
21
23
 
22
24
  /**
23
- * Replace the organization logo used on Dashboards and Dashboard PDFs. Send
24
- * contentType and base64 data for a PNG, JPEG, or WebP image of at most 524288
25
- * bytes and 4096 pixels in each dimension. The bytes must match contentType; SVG
26
- * is not accepted, so rasterize vector logos first. Requires Analytics Suite
27
- * access and organization:manage-report-branding. Requires API-key scope or
28
- * current OAuth user permission: organization:manage-report-branding
25
+ * Replace the organization logo used on Dashboards, presentations, and PDF
26
+ * reports. Send contentType and base64 data for a PNG, JPEG, or WebP image of at
27
+ * most 524288 bytes and 4096 pixels in each dimension. The bytes must match
28
+ * contentType; SVG is not accepted, so rasterize vector logos first. The brand
29
+ * color is unchanged. Requires API-key scope or current OAuth user permission:
30
+ * organization:manage-report-branding
29
31
  */
30
32
  replace(
31
33
  body: ReportBrandingReplaceParams,
@@ -35,28 +37,52 @@ export class ReportBranding extends APIResource {
35
37
  }
36
38
 
37
39
  /**
38
- * Remove the organization logo from Dashboards and Dashboard PDFs. Succeeds when
39
- * no logo is set. Requires Analytics Suite access and
40
- * organization:manage-report-branding. Requires API-key scope or current OAuth
41
- * user permission: organization:manage-report-branding
40
+ * Remove the organization logo from Dashboards, presentations, and PDF reports.
41
+ * Succeeds when no logo is set. The brand color is kept; clear it with PATCH
42
+ * /rest/v1/report-branding/colors and brandColor null. Requires API-key scope or
43
+ * current OAuth user permission: organization:manage-report-branding
42
44
  */
43
45
  delete(options?: RequestOptions): APIPromise<ReportBrandingDeleteResponse> {
44
46
  return this._client.delete('/rest/v1/report-branding/logo', options);
45
47
  }
48
+
49
+ /**
50
+ * Set the brand color printed on PDF reports for the header rule, table headers,
51
+ * summary band, and (when dark enough for text) headings. Send brandColor as
52
+ * #RRGGBB in either case (it is stored and returned lowercase), or null to return
53
+ * to the Ours Privacy default navy; the logo is unchanged. New PDFs use the color
54
+ * right away. Read it back with GET /rest/v1/report-branding/logo. Requires
55
+ * API-key scope or current OAuth user permission:
56
+ * organization:manage-report-branding
57
+ */
58
+ update(
59
+ body: ReportBrandingUpdateParams,
60
+ options?: RequestOptions,
61
+ ): APIPromise<ReportBrandingUpdateResponse> {
62
+ return this._client.patch('/rest/v1/report-branding/colors', { body, ...options });
63
+ }
46
64
  }
47
65
 
48
66
  export interface ReportBrandingRetrieveResponse {
49
67
  /**
50
- * Organization logo shown on Dashboards and Dashboard PDFs, or null when none is
51
- * set.
68
+ * Brand color as lowercase #rrggbb, printed on PDF reports for the header rule,
69
+ * table headers, summary band, and (when dark enough for text) headings, or null
70
+ * when PDFs use the Ours Privacy default navy. Independent of the logo: removing
71
+ * the logo keeps it.
72
+ */
73
+ brandColor: string | null;
74
+
75
+ /**
76
+ * Organization logo shown on Dashboards, presentations, and PDF reports, or null
77
+ * when none is set.
52
78
  */
53
79
  logo: ReportBrandingRetrieveResponse.Logo | null;
54
80
  }
55
81
 
56
82
  export namespace ReportBrandingRetrieveResponse {
57
83
  /**
58
- * Organization logo shown on Dashboards and Dashboard PDFs, or null when none is
59
- * set.
84
+ * Organization logo shown on Dashboards, presentations, and PDF reports, or null
85
+ * when none is set.
60
86
  */
61
87
  export interface Logo {
62
88
  /**
@@ -90,16 +116,24 @@ export namespace ReportBrandingRetrieveResponse {
90
116
 
91
117
  export interface ReportBrandingReplaceResponse {
92
118
  /**
93
- * Organization logo shown on Dashboards and Dashboard PDFs, or null when none is
94
- * set.
119
+ * Brand color as lowercase #rrggbb, printed on PDF reports for the header rule,
120
+ * table headers, summary band, and (when dark enough for text) headings, or null
121
+ * when PDFs use the Ours Privacy default navy. Independent of the logo: removing
122
+ * the logo keeps it.
123
+ */
124
+ brandColor: string | null;
125
+
126
+ /**
127
+ * Organization logo shown on Dashboards, presentations, and PDF reports, or null
128
+ * when none is set.
95
129
  */
96
130
  logo: ReportBrandingReplaceResponse.Logo | null;
97
131
  }
98
132
 
99
133
  export namespace ReportBrandingReplaceResponse {
100
134
  /**
101
- * Organization logo shown on Dashboards and Dashboard PDFs, or null when none is
102
- * set.
135
+ * Organization logo shown on Dashboards, presentations, and PDF reports, or null
136
+ * when none is set.
103
137
  */
104
138
  export interface Logo {
105
139
  /**
@@ -133,16 +167,75 @@ export namespace ReportBrandingReplaceResponse {
133
167
 
134
168
  export interface ReportBrandingDeleteResponse {
135
169
  /**
136
- * Organization logo shown on Dashboards and Dashboard PDFs, or null when none is
137
- * set.
170
+ * Brand color as lowercase #rrggbb, printed on PDF reports for the header rule,
171
+ * table headers, summary band, and (when dark enough for text) headings, or null
172
+ * when PDFs use the Ours Privacy default navy. Independent of the logo: removing
173
+ * the logo keeps it.
174
+ */
175
+ brandColor: string | null;
176
+
177
+ /**
178
+ * Organization logo shown on Dashboards, presentations, and PDF reports, or null
179
+ * when none is set.
138
180
  */
139
181
  logo: ReportBrandingDeleteResponse.Logo | null;
140
182
  }
141
183
 
142
184
  export namespace ReportBrandingDeleteResponse {
143
185
  /**
144
- * Organization logo shown on Dashboards and Dashboard PDFs, or null when none is
145
- * set.
186
+ * Organization logo shown on Dashboards, presentations, and PDF reports, or null
187
+ * when none is set.
188
+ */
189
+ export interface Logo {
190
+ /**
191
+ * Decoded image size in bytes.
192
+ */
193
+ byteSize: number;
194
+
195
+ contentType: 'image/png' | 'image/jpeg' | 'image/webp';
196
+
197
+ /**
198
+ * Image height in pixels.
199
+ */
200
+ height: number;
201
+
202
+ updatedAt: string;
203
+
204
+ updatedByUserId: string;
205
+
206
+ /**
207
+ * Image width in pixels.
208
+ */
209
+ width: number;
210
+
211
+ /**
212
+ * data: URL containing the base64 image. Returned by GET unless includeDataUrl is
213
+ * false; omitted from write responses.
214
+ */
215
+ dataUrl?: string;
216
+ }
217
+ }
218
+
219
+ export interface ReportBrandingUpdateResponse {
220
+ /**
221
+ * Brand color as lowercase #rrggbb, printed on PDF reports for the header rule,
222
+ * table headers, summary band, and (when dark enough for text) headings, or null
223
+ * when PDFs use the Ours Privacy default navy. Independent of the logo: removing
224
+ * the logo keeps it.
225
+ */
226
+ brandColor: string | null;
227
+
228
+ /**
229
+ * Organization logo shown on Dashboards, presentations, and PDF reports, or null
230
+ * when none is set.
231
+ */
232
+ logo: ReportBrandingUpdateResponse.Logo | null;
233
+ }
234
+
235
+ export namespace ReportBrandingUpdateResponse {
236
+ /**
237
+ * Organization logo shown on Dashboards, presentations, and PDF reports, or null
238
+ * when none is set.
146
239
  */
147
240
  export interface Logo {
148
241
  /**
@@ -196,12 +289,24 @@ export interface ReportBrandingReplaceParams {
196
289
  data: string;
197
290
  }
198
291
 
292
+ export interface ReportBrandingUpdateParams {
293
+ /**
294
+ * Brand color as #RRGGBB in either case; it is stored and returned lowercase.
295
+ * Needs at least 3:1 contrast against white so it stays readable on the page;
296
+ * lighter colors are rejected. Send null to return to the Ours Privacy default
297
+ * navy; omit it to leave the color unchanged.
298
+ */
299
+ brandColor?: string | null;
300
+ }
301
+
199
302
  export declare namespace ReportBranding {
200
303
  export {
201
304
  type ReportBrandingRetrieveResponse as ReportBrandingRetrieveResponse,
202
305
  type ReportBrandingReplaceResponse as ReportBrandingReplaceResponse,
203
306
  type ReportBrandingDeleteResponse as ReportBrandingDeleteResponse,
307
+ type ReportBrandingUpdateResponse as ReportBrandingUpdateResponse,
204
308
  type ReportBrandingRetrieveParams as ReportBrandingRetrieveParams,
205
309
  type ReportBrandingReplaceParams as ReportBrandingReplaceParams,
310
+ type ReportBrandingUpdateParams as ReportBrandingUpdateParams,
206
311
  };
207
312
  }
@@ -113,6 +113,8 @@ export interface SourceListResponse {
113
113
  | 'HubspotFormWebhook'
114
114
  | 'JotFormWebhooks'
115
115
  | 'KotlinApi'
116
+ | 'Liine'
117
+ | 'Moonfall'
116
118
  | 'NodejsApi'
117
119
  | 'PHPApi'
118
120
  | 'PixelImage'
@@ -216,6 +218,8 @@ export interface SourceCreateResponse {
216
218
  | 'HubspotFormWebhook'
217
219
  | 'JotFormWebhooks'
218
220
  | 'KotlinApi'
221
+ | 'Liine'
222
+ | 'Moonfall'
219
223
  | 'NodejsApi'
220
224
  | 'PHPApi'
221
225
  | 'PixelImage'
@@ -319,6 +323,8 @@ export interface SourceRetrieveResponse {
319
323
  | 'HubspotFormWebhook'
320
324
  | 'JotFormWebhooks'
321
325
  | 'KotlinApi'
326
+ | 'Liine'
327
+ | 'Moonfall'
322
328
  | 'NodejsApi'
323
329
  | 'PHPApi'
324
330
  | 'PixelImage'
@@ -422,6 +428,8 @@ export interface SourceUpdateResponse {
422
428
  | 'HubspotFormWebhook'
423
429
  | 'JotFormWebhooks'
424
430
  | 'KotlinApi'
431
+ | 'Liine'
432
+ | 'Moonfall'
425
433
  | 'NodejsApi'
426
434
  | 'PHPApi'
427
435
  | 'PixelImage'
@@ -603,6 +611,8 @@ export interface SourceListParams extends CursorParams {
603
611
  | 'HubspotFormWebhook'
604
612
  | 'JotFormWebhooks'
605
613
  | 'KotlinApi'
614
+ | 'Liine'
615
+ | 'Moonfall'
606
616
  | 'NodejsApi'
607
617
  | 'PHPApi'
608
618
  | 'PixelImage'
@@ -641,6 +651,8 @@ export interface SourceCreateParams {
641
651
  | 'HubspotFormWebhook'
642
652
  | 'JotFormWebhooks'
643
653
  | 'KotlinApi'
654
+ | 'Liine'
655
+ | 'Moonfall'
644
656
  | 'NodejsApi'
645
657
  | 'PHPApi'
646
658
  | 'PixelImage'
@@ -524,6 +524,13 @@ export namespace TestEventCreateParams {
524
524
  */
525
525
  gbraid?: string | null;
526
526
 
527
+ /**
528
+ * The Growth Channel tracking ID, captured from the `gc_ref_id` URL parameter.
529
+ * Advertisers add `?gc_ref_id={TRACKING_ID}` to their Growth Channel landing URLs.
530
+ * Sent as `ref_id` on Growth Channel postbacks. Ex: gc_ref_abc123
531
+ */
532
+ gc_ref_id?: string | null;
533
+
527
534
  /**
528
535
  * The Google Click ID. Ex: gclid123
529
536
  */
@@ -574,6 +581,26 @@ export namespace TestEventCreateParams {
574
581
  */
575
582
  is_bot?: boolean | null;
576
583
 
584
+ /**
585
+ * The Katalys offer ID. The Web SDK stores the `offer_id` landing-page parameter
586
+ * under this name only when the link also carries `publisher_id`. Ex: 1001
587
+ */
588
+ katalys_offer_id?: string | null;
589
+
590
+ /**
591
+ * The Katalys publisher (affiliate) ID, captured from the `publisher_id`
592
+ * landing-page parameter on Katalys links. Sent to Katalys as `aff_id`. Ex: 2002
593
+ */
594
+ katalys_publisher_id?: string | null;
595
+
596
+ /**
597
+ * The Katalys click (transaction) ID. The Web SDK stores the `transaction_id`
598
+ * landing-page parameter under this name only when the link also carries
599
+ * `publisher_id`, so another network's `transaction_id` is not captured. Ex:
600
+ * ka_tx_abc123
601
+ */
602
+ katalys_transaction_id?: string | null;
603
+
577
604
  /**
578
605
  * The LinkedIn Click ID. Ex: li_fat_id123
579
606
  */
@@ -659,6 +686,12 @@ export namespace TestEventCreateParams {
659
686
  */
660
687
  referring_domain?: string | null;
661
688
 
689
+ /**
690
+ * The Renshu click ID. The Web SDK stores the `uid` landing-page parameter under
691
+ * this name. Sent as `uid` on Renshu postbacks. Ex: rs_click_abc123
692
+ */
693
+ renshu_uid?: string | null;
694
+
662
695
  /**
663
696
  * The StackAdapt Tracking ID. Ex: sacid123
664
697
  */
@@ -137,7 +137,7 @@ export namespace WebAnalyticsOverviewInsightResponse {
137
137
 
138
138
  from: string;
139
139
 
140
- interval: 'day' | 'week' | 'month';
140
+ interval: 'hour' | 'day' | 'week' | 'month';
141
141
 
142
142
  sourceCompleteness: 'unknown';
143
143
 
@@ -145,10 +145,36 @@ export namespace WebAnalyticsOverviewInsightResponse {
145
145
 
146
146
  to: string;
147
147
 
148
+ breakdown?: Scope.Breakdown | null;
149
+
148
150
  comparison?: Scope.Comparison | null;
149
151
  }
150
152
 
151
153
  export namespace Scope {
154
+ export interface Breakdown {
155
+ atAnchorId: string | null;
156
+
157
+ limit: number;
158
+
159
+ property: Breakdown.Property;
160
+
161
+ stepNumber: number | null;
162
+
163
+ truncated: boolean;
164
+
165
+ valueCount: number;
166
+ }
167
+
168
+ export namespace Breakdown {
169
+ export interface Property {
170
+ property: string;
171
+
172
+ type: 'string' | 'number' | 'boolean';
173
+
174
+ path?: Array<string>;
175
+ }
176
+ }
177
+
152
178
  export interface Comparison {
153
179
  from: string;
154
180
 
@@ -174,6 +200,8 @@ export namespace WebAnalyticsOverviewInsightResponse {
174
200
  points: Array<Series.Point>;
175
201
 
176
202
  rangeValue: number | null;
203
+
204
+ segment?: Series.Segment | null;
177
205
  }
178
206
 
179
207
  export namespace Series {
@@ -196,6 +224,18 @@ export namespace WebAnalyticsOverviewInsightResponse {
196
224
 
197
225
  smoothed: number | null;
198
226
  }
227
+
228
+ export interface Segment {
229
+ key: string;
230
+
231
+ kind: 'value' | 'other' | 'not_set';
232
+
233
+ label: string;
234
+
235
+ rank: number;
236
+
237
+ value: string | null;
238
+ }
199
239
  }
200
240
  }
201
241
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.67.0'; // x-release-please-version
1
+ export const VERSION = '1.69.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.67.0";
1
+ export declare const VERSION = "1.69.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.67.0";
1
+ export declare const VERSION = "1.69.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.67.0'; // x-release-please-version
4
+ exports.VERSION = '1.69.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.67.0'; // x-release-please-version
1
+ export const VERSION = '1.69.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map