@oursprivacy/platform-sdk 1.45.0 → 1.47.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 (178) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +25 -13
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +25 -13
  5. package/client.d.ts.map +1 -1
  6. package/client.js +14 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +14 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/attribution.d.mts +9 -1
  12. package/resources/attribution.d.mts.map +1 -1
  13. package/resources/attribution.d.ts +9 -1
  14. package/resources/attribution.d.ts.map +1 -1
  15. package/resources/consent-settings.d.mts +48 -0
  16. package/resources/consent-settings.d.mts.map +1 -1
  17. package/resources/consent-settings.d.ts +48 -0
  18. package/resources/consent-settings.d.ts.map +1 -1
  19. package/resources/conversion-journey-summaries.d.mts +38 -0
  20. package/resources/conversion-journey-summaries.d.mts.map +1 -1
  21. package/resources/conversion-journey-summaries.d.ts +38 -0
  22. package/resources/conversion-journey-summaries.d.ts.map +1 -1
  23. package/resources/conversion-journey-summaries.js +38 -0
  24. package/resources/conversion-journey-summaries.js.map +1 -1
  25. package/resources/conversion-journey-summaries.mjs +38 -0
  26. package/resources/conversion-journey-summaries.mjs.map +1 -1
  27. package/resources/data-governance.d.mts +5 -5
  28. package/resources/data-governance.d.mts.map +1 -1
  29. package/resources/data-governance.d.ts +5 -5
  30. package/resources/data-governance.d.ts.map +1 -1
  31. package/resources/destinations.d.mts +7 -27
  32. package/resources/destinations.d.mts.map +1 -1
  33. package/resources/destinations.d.ts +7 -27
  34. package/resources/destinations.d.ts.map +1 -1
  35. package/resources/experiment-variants.d.mts +4 -2
  36. package/resources/experiment-variants.d.mts.map +1 -1
  37. package/resources/experiment-variants.d.ts +4 -2
  38. package/resources/experiment-variants.d.ts.map +1 -1
  39. package/resources/experiments.d.mts +677 -102
  40. package/resources/experiments.d.mts.map +1 -1
  41. package/resources/experiments.d.ts +677 -102
  42. package/resources/experiments.d.ts.map +1 -1
  43. package/resources/experiments.js +32 -2
  44. package/resources/experiments.js.map +1 -1
  45. package/resources/experiments.mjs +32 -2
  46. package/resources/experiments.mjs.map +1 -1
  47. package/resources/funnels.d.mts +172 -22
  48. package/resources/funnels.d.mts.map +1 -1
  49. package/resources/funnels.d.ts +172 -22
  50. package/resources/funnels.d.ts.map +1 -1
  51. package/resources/funnels.js +10 -2
  52. package/resources/funnels.js.map +1 -1
  53. package/resources/funnels.mjs +10 -2
  54. package/resources/funnels.mjs.map +1 -1
  55. package/resources/heatmap-pages.d.mts +42 -14
  56. package/resources/heatmap-pages.d.mts.map +1 -1
  57. package/resources/heatmap-pages.d.ts +42 -14
  58. package/resources/heatmap-pages.d.ts.map +1 -1
  59. package/resources/heatmap-pages.js +11 -7
  60. package/resources/heatmap-pages.js.map +1 -1
  61. package/resources/heatmap-pages.mjs +11 -7
  62. package/resources/heatmap-pages.mjs.map +1 -1
  63. package/resources/index.d.mts +10 -6
  64. package/resources/index.d.mts.map +1 -1
  65. package/resources/index.d.ts +10 -6
  66. package/resources/index.d.ts.map +1 -1
  67. package/resources/index.js +9 -1
  68. package/resources/index.js.map +1 -1
  69. package/resources/index.mjs +4 -0
  70. package/resources/index.mjs.map +1 -1
  71. package/resources/mappings.d.mts +2 -2
  72. package/resources/mappings.d.mts.map +1 -1
  73. package/resources/mappings.d.ts +2 -2
  74. package/resources/mappings.d.ts.map +1 -1
  75. package/resources/personalization-properties.d.mts +547 -0
  76. package/resources/personalization-properties.d.mts.map +1 -0
  77. package/resources/personalization-properties.d.ts +547 -0
  78. package/resources/personalization-properties.d.ts.map +1 -0
  79. package/resources/personalization-properties.js +100 -0
  80. package/resources/personalization-properties.js.map +1 -0
  81. package/resources/personalization-properties.mjs +96 -0
  82. package/resources/personalization-properties.mjs.map +1 -0
  83. package/resources/session-replays.d.mts +91 -0
  84. package/resources/session-replays.d.mts.map +1 -0
  85. package/resources/session-replays.d.ts +91 -0
  86. package/resources/session-replays.d.ts.map +1 -0
  87. package/resources/session-replays.js +24 -0
  88. package/resources/session-replays.js.map +1 -0
  89. package/resources/session-replays.mjs +20 -0
  90. package/resources/session-replays.mjs.map +1 -0
  91. package/resources/short-links.d.mts +138 -37
  92. package/resources/short-links.d.mts.map +1 -1
  93. package/resources/short-links.d.ts +138 -37
  94. package/resources/short-links.d.ts.map +1 -1
  95. package/resources/short-links.js +27 -12
  96. package/resources/short-links.js.map +1 -1
  97. package/resources/short-links.mjs +27 -12
  98. package/resources/short-links.mjs.map +1 -1
  99. package/resources/sources.d.mts +10 -6
  100. package/resources/sources.d.mts.map +1 -1
  101. package/resources/sources.d.ts +10 -6
  102. package/resources/sources.d.ts.map +1 -1
  103. package/resources/tag-manager-tags.d.mts +2 -2
  104. package/resources/tag-manager-tags.d.ts +2 -2
  105. package/resources/tag-manager-tags.js +2 -2
  106. package/resources/tag-manager-tags.mjs +2 -2
  107. package/resources/tag-manager-triggers.d.mts +18 -1
  108. package/resources/tag-manager-triggers.d.mts.map +1 -1
  109. package/resources/tag-manager-triggers.d.ts +18 -1
  110. package/resources/tag-manager-triggers.d.ts.map +1 -1
  111. package/resources/translation-widgets.d.mts +62 -0
  112. package/resources/translation-widgets.d.mts.map +1 -0
  113. package/resources/translation-widgets.d.ts +62 -0
  114. package/resources/translation-widgets.d.ts.map +1 -0
  115. package/resources/translation-widgets.js +18 -0
  116. package/resources/translation-widgets.js.map +1 -0
  117. package/resources/translation-widgets.mjs +14 -0
  118. package/resources/translation-widgets.mjs.map +1 -0
  119. package/resources/versions.d.mts +52 -1
  120. package/resources/versions.d.mts.map +1 -1
  121. package/resources/versions.d.ts +52 -1
  122. package/resources/versions.d.ts.map +1 -1
  123. package/resources/versions.js +20 -0
  124. package/resources/versions.js.map +1 -1
  125. package/resources/versions.mjs +20 -0
  126. package/resources/versions.mjs.map +1 -1
  127. package/resources/video-channels.d.mts +17 -17
  128. package/resources/video-channels.d.mts.map +1 -1
  129. package/resources/video-channels.d.ts +17 -17
  130. package/resources/video-channels.d.ts.map +1 -1
  131. package/resources/video-channels.js +17 -16
  132. package/resources/video-channels.js.map +1 -1
  133. package/resources/video-channels.mjs +17 -16
  134. package/resources/video-channels.mjs.map +1 -1
  135. package/resources/web-analytics.d.mts +345 -0
  136. package/resources/web-analytics.d.mts.map +1 -0
  137. package/resources/web-analytics.d.ts +345 -0
  138. package/resources/web-analytics.d.ts.map +1 -0
  139. package/resources/web-analytics.js +61 -0
  140. package/resources/web-analytics.js.map +1 -0
  141. package/resources/web-analytics.mjs +57 -0
  142. package/resources/web-analytics.mjs.map +1 -0
  143. package/resources/web-scanners.d.mts +314 -14
  144. package/resources/web-scanners.d.mts.map +1 -1
  145. package/resources/web-scanners.d.ts +314 -14
  146. package/resources/web-scanners.d.ts.map +1 -1
  147. package/resources/web-scanners.js +139 -13
  148. package/resources/web-scanners.js.map +1 -1
  149. package/resources/web-scanners.mjs +139 -13
  150. package/resources/web-scanners.mjs.map +1 -1
  151. package/src/client.ts +147 -19
  152. package/src/resources/attribution.ts +11 -1
  153. package/src/resources/consent-settings.ts +56 -0
  154. package/src/resources/conversion-journey-summaries.ts +38 -0
  155. package/src/resources/data-governance.ts +5 -5
  156. package/src/resources/destinations.ts +18 -115
  157. package/src/resources/experiment-variants.ts +4 -2
  158. package/src/resources/experiments.ts +812 -101
  159. package/src/resources/funnels.ts +276 -21
  160. package/src/resources/heatmap-pages.ts +49 -14
  161. package/src/resources/index.ts +61 -3
  162. package/src/resources/mappings.ts +2 -2
  163. package/src/resources/personalization-properties.ts +662 -0
  164. package/src/resources/session-replays.ts +138 -0
  165. package/src/resources/short-links.ts +164 -36
  166. package/src/resources/sources.ts +11 -0
  167. package/src/resources/tag-manager-tags.ts +2 -2
  168. package/src/resources/tag-manager-triggers.ts +18 -1
  169. package/src/resources/translation-widgets.ts +97 -0
  170. package/src/resources/versions.ts +95 -0
  171. package/src/resources/video-channels.ts +19 -18
  172. package/src/resources/web-analytics.ts +494 -0
  173. package/src/resources/web-scanners.ts +443 -13
  174. package/src/version.ts +1 -1
  175. package/version.d.mts +1 -1
  176. package/version.d.ts +1 -1
  177. package/version.js +1 -1
  178. package/version.mjs +1 -1
@@ -0,0 +1,96 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { Cursor } from "../core/pagination.mjs";
4
+ import { path } from "../internal/utils/path.mjs";
5
+ export class PersonalizationProperties extends APIResource {
6
+ /**
7
+ * List personalization properties for one experiment settings record. Requires the
8
+ * `experimentSettingsId` query parameter — properties are always scoped to a
9
+ * single record; list the records with `GET /rest/v1/experiment-settings`.
10
+ * Supports cursor pagination via `limit` and `cursor`; the limit clamp is 1000 so
11
+ * a single request can return the full set. Requires scope:
12
+ * experimentSettings:list
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * // Automatically fetches more pages as needed.
17
+ * for await (const personalizationPropertyListResponse of client.personalizationProperties.list(
18
+ * {
19
+ * experimentSettingsId:
20
+ * '08524dc8-5289-48e8-bf40-b3a7cfa6ca0a',
21
+ * },
22
+ * )) {
23
+ * // ...
24
+ * }
25
+ * ```
26
+ */
27
+ list(query, options) {
28
+ return this._client.getAPIList('/rest/v1/personalization-properties', (Cursor), { query, ...options });
29
+ }
30
+ /**
31
+ * Create a personalization property on an experiment settings record. The new rule
32
+ * is published automatically and starts accumulating from the next matching event
33
+ * — no separate publish call is needed. `propertyKey` must be unique within the
34
+ * parent record. Requires scope: experimentSettings:update
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const personalizationProperty =
39
+ * await client.personalizationProperties.create({
40
+ * accumulator: 'set_true',
41
+ * experimentSettingsId:
42
+ * '08524dc8-5289-48e8-bf40-b3a7cfa6ca0a',
43
+ * propertyKey: 'visited_pricing',
44
+ * triggerEventName: 'page_view',
45
+ * });
46
+ * ```
47
+ */
48
+ create(body, options) {
49
+ return this._client.post('/rest/v1/personalization-properties', { body, ...options });
50
+ }
51
+ /**
52
+ * Find a single personalization property by ID. Returns 404 when no property
53
+ * matches the supplied id. Requires scope: experimentSettings:find
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const personalizationProperty =
58
+ * await client.personalizationProperties.retrieve('id');
59
+ * ```
60
+ */
61
+ retrieve(id, options) {
62
+ return this._client.get(path `/rest/v1/personalization-properties/${id}`, options);
63
+ }
64
+ /**
65
+ * Partially update a personalization property. Only the fields you send are
66
+ * changed, and the update is published automatically. Sending `triggerConditions`
67
+ * replaces the prior list — partial-array merging is not supported. Values already
68
+ * accumulated for visitors are kept; the new rule applies to events from here on.
69
+ * Returns 404 when no property matches the supplied id. Requires scope:
70
+ * experimentSettings:update
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * const personalizationProperty =
75
+ * await client.personalizationProperties.update('id');
76
+ * ```
77
+ */
78
+ update(id, body, options) {
79
+ return this._client.patch(path `/rest/v1/personalization-properties/${id}`, { body, ...options });
80
+ }
81
+ /**
82
+ * Delete a personalization property. The rule stops accumulating immediately;
83
+ * values already recorded for visitors are no longer maintained. Returns 404 when
84
+ * no property matches the supplied id. Requires scope: experimentSettings:update
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * const personalizationProperty =
89
+ * await client.personalizationProperties.delete('id');
90
+ * ```
91
+ */
92
+ delete(id, options) {
93
+ return this._client.delete(path `/rest/v1/personalization-properties/${id}`, options);
94
+ }
95
+ }
96
+ //# sourceMappingURL=personalization-properties.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"personalization-properties.mjs","sourceRoot":"","sources":["../src/resources/personalization-properties.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,MAAM,EAAkC,+BAA2B;AAE5E,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,yBAA0B,SAAQ,WAAW;IACxD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,IAAI,CACF,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,qCAAqC,EACrC,CAAA,MAA2C,CAAA,EAC3C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,IAAyC,EACzC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uCAAuC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,EAAU,EACV,IAAyC,EACzC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,uCAAuC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,uCAAuC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvF,CAAC;CACF"}
@@ -0,0 +1,91 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class SessionReplays extends APIResource {
5
+ /**
6
+ * List recorded sessions for a date range. Filter by event, page, visitor, UTM
7
+ * fields, or an explicit JSON-encoded session ID list. Use `pagination.nextCursor`
8
+ * to retrieve the next page. Requires scope: web-analytics:view
9
+ */
10
+ list(query: SessionReplayListParams, options?: RequestOptions): APIPromise<SessionReplayListResponse>;
11
+ /**
12
+ * Return the total number of replay-bearing sessions and a daily timeseries for
13
+ * the requested date range. Requires scope: web-analytics:view
14
+ */
15
+ overview(query: SessionReplayOverviewParams, options?: RequestOptions): APIPromise<SessionReplayOverviewResponse>;
16
+ }
17
+ export interface SessionReplayListResponse {
18
+ items: Array<SessionReplayListResponse.Item>;
19
+ pagination: SessionReplayListResponse.Pagination;
20
+ }
21
+ export declare namespace SessionReplayListResponse {
22
+ interface Item {
23
+ date: string;
24
+ duration: number | null;
25
+ eventCount: number | null;
26
+ pageCount: number | null;
27
+ sessionId: string;
28
+ startTime: string | null;
29
+ visitorId: string;
30
+ }
31
+ interface Pagination {
32
+ hasMore: boolean;
33
+ nextCursor?: string | null;
34
+ }
35
+ }
36
+ export interface SessionReplayOverviewResponse {
37
+ timeseries: Array<SessionReplayOverviewResponse.Timesery>;
38
+ totalReplays: number;
39
+ }
40
+ export declare namespace SessionReplayOverviewResponse {
41
+ interface Timesery {
42
+ date: string;
43
+ value: number;
44
+ }
45
+ }
46
+ export interface SessionReplayListParams {
47
+ /**
48
+ * Inclusive lower bound of the replay window as `YYYY-MM-DD`.
49
+ */
50
+ from: string;
51
+ /**
52
+ * Inclusive upper bound of the replay window as `YYYY-MM-DD`.
53
+ */
54
+ to: string;
55
+ /**
56
+ * Opaque pagination cursor from pagination.nextCursor in the previous response. Do
57
+ * not decode or modify it. Malformed cursors return 400 Bad Request.
58
+ */
59
+ cursor?: string;
60
+ eventName?: string;
61
+ /**
62
+ * Maximum replay sessions to return. Defaults to the report default.
63
+ */
64
+ limit?: number;
65
+ pathname?: string;
66
+ /**
67
+ * Optional JSON-encoded session ID array. Maximum 100 session IDs.
68
+ */
69
+ sessionIds?: string;
70
+ utmCampaign?: string;
71
+ utmContent?: string;
72
+ utmMedium?: string;
73
+ utmName?: string;
74
+ utmSource?: string;
75
+ utmTerm?: string;
76
+ visitorId?: string;
77
+ }
78
+ export interface SessionReplayOverviewParams {
79
+ /**
80
+ * Inclusive lower bound of the replay window as `YYYY-MM-DD`.
81
+ */
82
+ from: string;
83
+ /**
84
+ * Inclusive upper bound of the replay window as `YYYY-MM-DD`.
85
+ */
86
+ to: string;
87
+ }
88
+ export declare namespace SessionReplays {
89
+ export { type SessionReplayListResponse as SessionReplayListResponse, type SessionReplayOverviewResponse as SessionReplayOverviewResponse, type SessionReplayListParams as SessionReplayListParams, type SessionReplayOverviewParams as SessionReplayOverviewParams, };
90
+ }
91
+ //# sourceMappingURL=session-replays.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-replays.d.mts","sourceRoot":"","sources":["../src/resources/session-replays.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC;IAIrG;;;OAGG;IACH,QAAQ,CACN,KAAK,EAAE,2BAA2B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;CAG7C;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAE7C,UAAU,EAAE,yBAAyB,CAAC,UAAU,CAAC;CAClD;AAED,yBAAiB,yBAAyB,CAAC;IACzC,UAAiB,IAAI;QACnB,IAAI,EAAE,MAAM,CAAC;QAEb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QAExB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAEzB,SAAS,EAAE,MAAM,CAAC;QAElB,SA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D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
@@ -0,0 +1,91 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class SessionReplays extends APIResource {
5
+ /**
6
+ * List recorded sessions for a date range. Filter by event, page, visitor, UTM
7
+ * fields, or an explicit JSON-encoded session ID list. Use `pagination.nextCursor`
8
+ * to retrieve the next page. Requires scope: web-analytics:view
9
+ */
10
+ list(query: SessionReplayListParams, options?: RequestOptions): APIPromise<SessionReplayListResponse>;
11
+ /**
12
+ * Return the total number of replay-bearing sessions and a daily timeseries for
13
+ * the requested date range. Requires scope: web-analytics:view
14
+ */
15
+ overview(query: SessionReplayOverviewParams, options?: RequestOptions): APIPromise<SessionReplayOverviewResponse>;
16
+ }
17
+ export interface SessionReplayListResponse {
18
+ items: Array<SessionReplayListResponse.Item>;
19
+ pagination: SessionReplayListResponse.Pagination;
20
+ }
21
+ export declare namespace SessionReplayListResponse {
22
+ interface Item {
23
+ date: string;
24
+ duration: number | null;
25
+ eventCount: number | null;
26
+ pageCount: number | null;
27
+ sessionId: string;
28
+ startTime: string | null;
29
+ visitorId: string;
30
+ }
31
+ interface Pagination {
32
+ hasMore: boolean;
33
+ nextCursor?: string | null;
34
+ }
35
+ }
36
+ export interface SessionReplayOverviewResponse {
37
+ timeseries: Array<SessionReplayOverviewResponse.Timesery>;
38
+ totalReplays: number;
39
+ }
40
+ export declare namespace SessionReplayOverviewResponse {
41
+ interface Timesery {
42
+ date: string;
43
+ value: number;
44
+ }
45
+ }
46
+ export interface SessionReplayListParams {
47
+ /**
48
+ * Inclusive lower bound of the replay window as `YYYY-MM-DD`.
49
+ */
50
+ from: string;
51
+ /**
52
+ * Inclusive upper bound of the replay window as `YYYY-MM-DD`.
53
+ */
54
+ to: string;
55
+ /**
56
+ * Opaque pagination cursor from pagination.nextCursor in the previous response. Do
57
+ * not decode or modify it. Malformed cursors return 400 Bad Request.
58
+ */
59
+ cursor?: string;
60
+ eventName?: string;
61
+ /**
62
+ * Maximum replay sessions to return. Defaults to the report default.
63
+ */
64
+ limit?: number;
65
+ pathname?: string;
66
+ /**
67
+ * Optional JSON-encoded session ID array. Maximum 100 session IDs.
68
+ */
69
+ sessionIds?: string;
70
+ utmCampaign?: string;
71
+ utmContent?: string;
72
+ utmMedium?: string;
73
+ utmName?: string;
74
+ utmSource?: string;
75
+ utmTerm?: string;
76
+ visitorId?: string;
77
+ }
78
+ export interface SessionReplayOverviewParams {
79
+ /**
80
+ * Inclusive lower bound of the replay window as `YYYY-MM-DD`.
81
+ */
82
+ from: string;
83
+ /**
84
+ * Inclusive upper bound of the replay window as `YYYY-MM-DD`.
85
+ */
86
+ to: string;
87
+ }
88
+ export declare namespace SessionReplays {
89
+ export { type SessionReplayListResponse as SessionReplayListResponse, type SessionReplayOverviewResponse as SessionReplayOverviewResponse, type SessionReplayListParams as SessionReplayListParams, type SessionReplayOverviewParams as SessionReplayOverviewParams, };
90
+ }
91
+ //# sourceMappingURL=session-replays.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-replays.d.ts","sourceRoot":"","sources":["../src/resources/session-replays.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC;IAIrG;;;OAGG;IACH,QAAQ,CACN,KAAK,EAAE,2BAA2B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;CAG7C;A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C,EAAE,MAAM,CAAC;IAEnB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SessionReplays = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ class SessionReplays extends resource_1.APIResource {
7
+ /**
8
+ * List recorded sessions for a date range. Filter by event, page, visitor, UTM
9
+ * fields, or an explicit JSON-encoded session ID list. Use `pagination.nextCursor`
10
+ * to retrieve the next page. Requires scope: web-analytics:view
11
+ */
12
+ list(query, options) {
13
+ return this._client.get('/rest/v1/session-replays', { query, ...options });
14
+ }
15
+ /**
16
+ * Return the total number of replay-bearing sessions and a daily timeseries for
17
+ * the requested date range. Requires scope: web-analytics:view
18
+ */
19
+ overview(query, options) {
20
+ return this._client.get('/rest/v1/session-replays/overview', { query, ...options });
21
+ }
22
+ }
23
+ exports.SessionReplays = SessionReplays;
24
+ //# sourceMappingURL=session-replays.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-replays.js","sourceRoot":"","sources":["../src/resources/session-replays.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;;;OAIG;IACH,IAAI,CAAC,KAA8B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,KAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF;AApBD,wCAoBC"}
@@ -0,0 +1,20 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ export class SessionReplays extends APIResource {
4
+ /**
5
+ * List recorded sessions for a date range. Filter by event, page, visitor, UTM
6
+ * fields, or an explicit JSON-encoded session ID list. Use `pagination.nextCursor`
7
+ * to retrieve the next page. Requires scope: web-analytics:view
8
+ */
9
+ list(query, options) {
10
+ return this._client.get('/rest/v1/session-replays', { query, ...options });
11
+ }
12
+ /**
13
+ * Return the total number of replay-bearing sessions and a daily timeseries for
14
+ * the requested date range. Requires scope: web-analytics:view
15
+ */
16
+ overview(query, options) {
17
+ return this._client.get('/rest/v1/session-replays/overview', { query, ...options });
18
+ }
19
+ }
20
+ //# sourceMappingURL=session-replays.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-replays.mjs","sourceRoot":"","sources":["../src/resources/session-replays.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;;;OAIG;IACH,IAAI,CAAC,KAA8B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,KAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;CACF"}