@oursprivacy/platform-sdk 1.49.0 → 1.50.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 (57) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +5 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/analytics.d.mts +62 -0
  12. package/resources/analytics.d.mts.map +1 -0
  13. package/resources/analytics.d.ts +62 -0
  14. package/resources/analytics.d.ts.map +1 -0
  15. package/resources/analytics.js +25 -0
  16. package/resources/analytics.js.map +1 -0
  17. package/resources/analytics.mjs +21 -0
  18. package/resources/analytics.mjs.map +1 -0
  19. package/resources/consent-settings.d.mts +9 -0
  20. package/resources/consent-settings.d.mts.map +1 -1
  21. package/resources/consent-settings.d.ts +9 -0
  22. package/resources/consent-settings.d.ts.map +1 -1
  23. package/resources/funnels.d.mts +88 -980
  24. package/resources/funnels.d.mts.map +1 -1
  25. package/resources/funnels.d.ts +88 -980
  26. package/resources/funnels.d.ts.map +1 -1
  27. package/resources/funnels.js +24 -19
  28. package/resources/funnels.js.map +1 -1
  29. package/resources/funnels.mjs +24 -19
  30. package/resources/funnels.mjs.map +1 -1
  31. package/resources/index.d.mts +2 -1
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +2 -1
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +3 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +1 -0
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/web-scanners.d.mts +129 -1
  40. package/resources/web-scanners.d.mts.map +1 -1
  41. package/resources/web-scanners.d.ts +129 -1
  42. package/resources/web-scanners.d.ts.map +1 -1
  43. package/resources/web-scanners.js +40 -0
  44. package/resources/web-scanners.js.map +1 -1
  45. package/resources/web-scanners.mjs +40 -0
  46. package/resources/web-scanners.mjs.map +1 -1
  47. package/src/client.ts +23 -0
  48. package/src/resources/analytics.ts +98 -0
  49. package/src/resources/consent-settings.ts +16 -0
  50. package/src/resources/funnels.ts +114 -1616
  51. package/src/resources/index.ts +10 -0
  52. package/src/resources/web-scanners.ts +220 -0
  53. package/src/version.ts +1 -1
  54. package/version.d.mts +1 -1
  55. package/version.d.ts +1 -1
  56. package/version.js +1 -1
  57. package/version.mjs +1 -1
@@ -0,0 +1,98 @@
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 Analytics extends APIResource {
8
+ /**
9
+ * Discover the filter properties, operators, and providers available to analytics
10
+ * query definitions. Requires scope: web-analytics:view
11
+ */
12
+ queryCatalog(options?: RequestOptions): APIPromise<AnalyticsQueryCatalogResponse> {
13
+ return this._client.get('/rest/v1/analytics/query-catalog', options);
14
+ }
15
+
16
+ /**
17
+ * Discover property paths recently observed in event data. Results are suggestions
18
+ * from a fixed recent 30-day sample and may be incomplete; callers can still use
19
+ * manually entered paths. Use `eventName` and `sourceId` to narrow the
20
+ * suggestions. Requires scope: web-analytics:view
21
+ */
22
+ propertySuggestions(
23
+ query: AnalyticsPropertySuggestionsParams | null | undefined = {},
24
+ options?: RequestOptions,
25
+ ): APIPromise<AnalyticsPropertySuggestionsResponse> {
26
+ return this._client.get('/rest/v1/analytics/property-suggestions', { query, ...options });
27
+ }
28
+ }
29
+
30
+ export interface AnalyticsQueryCatalogResponse {
31
+ entries: Array<AnalyticsQueryCatalogResponse.Entry>;
32
+
33
+ limitations: Array<string>;
34
+
35
+ version: 1;
36
+ }
37
+
38
+ export namespace AnalyticsQueryCatalogResponse {
39
+ export interface Entry {
40
+ id: string;
41
+
42
+ label: string;
43
+
44
+ missingBehavior: string;
45
+
46
+ operators: Array<string>;
47
+
48
+ provider: string;
49
+
50
+ scope: string;
51
+
52
+ type: string;
53
+
54
+ allowedTypes?: Array<string> | null;
55
+
56
+ requiresPath?: boolean | null;
57
+ }
58
+ }
59
+
60
+ export interface AnalyticsPropertySuggestionsResponse {
61
+ entities: Array<AnalyticsPropertySuggestionsResponse.Entity>;
62
+
63
+ from: string;
64
+
65
+ sampled: boolean;
66
+
67
+ to: string;
68
+ }
69
+
70
+ export namespace AnalyticsPropertySuggestionsResponse {
71
+ export interface Entity {
72
+ path: Array<string>;
73
+
74
+ property: 'event.properties' | 'event.visitor_properties';
75
+
76
+ type: 'string' | 'number' | 'boolean';
77
+ }
78
+ }
79
+
80
+ export interface AnalyticsPropertySuggestionsParams {
81
+ /**
82
+ * Optional exact event name to scope the suggestions.
83
+ */
84
+ eventName?: string;
85
+
86
+ /**
87
+ * Optional exact source identifier to scope the suggestions.
88
+ */
89
+ sourceId?: string;
90
+ }
91
+
92
+ export declare namespace Analytics {
93
+ export {
94
+ type AnalyticsQueryCatalogResponse as AnalyticsQueryCatalogResponse,
95
+ type AnalyticsPropertySuggestionsResponse as AnalyticsPropertySuggestionsResponse,
96
+ type AnalyticsPropertySuggestionsParams as AnalyticsPropertySuggestionsParams,
97
+ };
98
+ }
@@ -2772,6 +2772,8 @@ export interface ConsentSettingAnalyticsResponse {
2772
2772
  * time series without gap-handling logic.
2773
2773
  */
2774
2774
  items: Array<ConsentSettingAnalyticsResponse.Item>;
2775
+
2776
+ totals: ConsentSettingAnalyticsResponse.Totals;
2775
2777
  }
2776
2778
 
2777
2779
  export namespace ConsentSettingAnalyticsResponse {
@@ -2810,6 +2812,20 @@ export namespace ConsentSettingAnalyticsResponse {
2810
2812
 
2811
2813
  previousOptOutRate?: number | null;
2812
2814
  }
2815
+
2816
+ export interface Totals {
2817
+ bannerViews: number;
2818
+
2819
+ closeIconClicks: number;
2820
+
2821
+ explicitOptIns: number;
2822
+
2823
+ explicitOptOuts: number;
2824
+
2825
+ optInRate: number;
2826
+
2827
+ optOutRate: number;
2828
+ }
2813
2829
  }
2814
2830
 
2815
2831
  export interface ConsentSettingPageAnalysisResponse {