@oursprivacy/platform-sdk 1.11.0 → 1.13.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 (152) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +31 -0
  3. package/client.d.mts +32 -14
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +32 -14
  6. package/client.d.ts.map +1 -1
  7. package/client.js +26 -4
  8. package/client.js.map +1 -1
  9. package/client.mjs +26 -4
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +60 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +60 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +101 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +95 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +1 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +1 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +3 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +1 -0
  26. package/index.mjs.map +1 -1
  27. package/package.json +11 -1
  28. package/pagination.d.mts +2 -0
  29. package/pagination.d.mts.map +1 -0
  30. package/pagination.d.ts +2 -0
  31. package/pagination.d.ts.map +1 -0
  32. package/pagination.js +6 -0
  33. package/pagination.js.map +1 -0
  34. package/pagination.mjs +2 -0
  35. package/pagination.mjs.map +1 -0
  36. package/resources/allowed-events.d.mts +18 -18
  37. package/resources/allowed-events.d.mts.map +1 -1
  38. package/resources/allowed-events.d.ts +18 -18
  39. package/resources/allowed-events.d.ts.map +1 -1
  40. package/resources/allowed-events.js +7 -7
  41. package/resources/allowed-events.js.map +1 -1
  42. package/resources/allowed-events.mjs +7 -7
  43. package/resources/allowed-events.mjs.map +1 -1
  44. package/resources/consent-settings.d.mts +2568 -124
  45. package/resources/consent-settings.d.mts.map +1 -1
  46. package/resources/consent-settings.d.ts +2568 -124
  47. package/resources/consent-settings.d.ts.map +1 -1
  48. package/resources/consent-settings.js +24 -7
  49. package/resources/consent-settings.js.map +1 -1
  50. package/resources/consent-settings.mjs +24 -7
  51. package/resources/consent-settings.mjs.map +1 -1
  52. package/resources/destinations.d.mts +33 -32
  53. package/resources/destinations.d.mts.map +1 -1
  54. package/resources/destinations.d.ts +33 -32
  55. package/resources/destinations.d.ts.map +1 -1
  56. package/resources/destinations.js +8 -7
  57. package/resources/destinations.js.map +1 -1
  58. package/resources/destinations.mjs +8 -7
  59. package/resources/destinations.mjs.map +1 -1
  60. package/resources/experiment-settings.d.mts +277 -0
  61. package/resources/experiment-settings.d.mts.map +1 -0
  62. package/resources/experiment-settings.d.ts +277 -0
  63. package/resources/experiment-settings.d.ts.map +1 -0
  64. package/resources/experiment-settings.js +77 -0
  65. package/resources/experiment-settings.js.map +1 -0
  66. package/resources/experiment-settings.mjs +73 -0
  67. package/resources/experiment-settings.mjs.map +1 -0
  68. package/resources/experiment-variants.d.mts +659 -0
  69. package/resources/experiment-variants.d.mts.map +1 -0
  70. package/resources/experiment-variants.d.ts +659 -0
  71. package/resources/experiment-variants.d.ts.map +1 -0
  72. package/resources/experiment-variants.js +79 -0
  73. package/resources/experiment-variants.js.map +1 -0
  74. package/resources/experiment-variants.mjs +75 -0
  75. package/resources/experiment-variants.mjs.map +1 -0
  76. package/resources/experiments.d.mts +2002 -0
  77. package/resources/experiments.d.mts.map +1 -0
  78. package/resources/experiments.d.ts +2002 -0
  79. package/resources/experiments.d.ts.map +1 -0
  80. package/resources/experiments.js +166 -0
  81. package/resources/experiments.js.map +1 -0
  82. package/resources/experiments.mjs +162 -0
  83. package/resources/experiments.mjs.map +1 -0
  84. package/resources/global-dispatch-centers.d.mts +125 -58
  85. package/resources/global-dispatch-centers.d.mts.map +1 -1
  86. package/resources/global-dispatch-centers.d.ts +125 -58
  87. package/resources/global-dispatch-centers.d.ts.map +1 -1
  88. package/resources/global-dispatch-centers.js +10 -7
  89. package/resources/global-dispatch-centers.js.map +1 -1
  90. package/resources/global-dispatch-centers.mjs +10 -7
  91. package/resources/global-dispatch-centers.mjs.map +1 -1
  92. package/resources/index.d.mts +11 -7
  93. package/resources/index.d.mts.map +1 -1
  94. package/resources/index.d.ts +11 -7
  95. package/resources/index.d.ts.map +1 -1
  96. package/resources/index.js +9 -1
  97. package/resources/index.js.map +1 -1
  98. package/resources/index.mjs +4 -0
  99. package/resources/index.mjs.map +1 -1
  100. package/resources/mappings.d.mts +136 -0
  101. package/resources/mappings.d.mts.map +1 -0
  102. package/resources/mappings.d.ts +136 -0
  103. package/resources/mappings.d.ts.map +1 -0
  104. package/resources/mappings.js +41 -0
  105. package/resources/mappings.js.map +1 -0
  106. package/resources/mappings.mjs +37 -0
  107. package/resources/mappings.mjs.map +1 -0
  108. package/resources/replay-settings.d.mts +123 -24
  109. package/resources/replay-settings.d.mts.map +1 -1
  110. package/resources/replay-settings.d.ts +123 -24
  111. package/resources/replay-settings.d.ts.map +1 -1
  112. package/resources/replay-settings.js +24 -10
  113. package/resources/replay-settings.js.map +1 -1
  114. package/resources/replay-settings.mjs +24 -10
  115. package/resources/replay-settings.mjs.map +1 -1
  116. package/resources/sources.d.mts +64 -27
  117. package/resources/sources.d.mts.map +1 -1
  118. package/resources/sources.d.ts +64 -27
  119. package/resources/sources.d.ts.map +1 -1
  120. package/resources/sources.js +14 -7
  121. package/resources/sources.js.map +1 -1
  122. package/resources/sources.mjs +14 -7
  123. package/resources/sources.mjs.map +1 -1
  124. package/resources/versions.d.mts +742 -16
  125. package/resources/versions.d.mts.map +1 -1
  126. package/resources/versions.d.ts +742 -16
  127. package/resources/versions.d.ts.map +1 -1
  128. package/resources/versions.js +45 -5
  129. package/resources/versions.js.map +1 -1
  130. package/resources/versions.mjs +45 -5
  131. package/resources/versions.mjs.map +1 -1
  132. package/src/client.ts +206 -29
  133. package/src/core/pagination.ts +165 -0
  134. package/src/index.ts +1 -0
  135. package/src/pagination.ts +2 -0
  136. package/src/resources/allowed-events.ts +27 -27
  137. package/src/resources/consent-settings.ts +3036 -244
  138. package/src/resources/destinations.ts +128 -127
  139. package/src/resources/experiment-settings.ts +367 -0
  140. package/src/resources/experiment-variants.ts +870 -0
  141. package/src/resources/experiments.ts +2446 -0
  142. package/src/resources/global-dispatch-centers.ts +155 -65
  143. package/src/resources/index.ts +75 -7
  144. package/src/resources/mappings.ts +230 -0
  145. package/src/resources/replay-settings.ts +142 -35
  146. package/src/resources/sources.ts +116 -71
  147. package/src/resources/versions.ts +1130 -17
  148. package/src/version.ts +1 -1
  149. package/version.d.mts +1 -1
  150. package/version.d.ts +1 -1
  151. package/version.js +1 -1
  152. package/version.mjs +1 -1
@@ -1,27 +1,75 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
2
  import { APIPromise } from "../core/api-promise.mjs";
3
+ import { Cursor, type CursorParams, PagePromise } from "../core/pagination.mjs";
3
4
  import { RequestOptions } from "../internal/request-options.mjs";
4
5
  export declare class ReplaySettings extends APIResource {
5
6
  /**
6
- * Create a new replay setting. Requires scope: replaySettings:create
7
+ * List the replay configurations on this account. Supports cursor pagination via
8
+ * `limit` and `cursor`. Replay settings control which domains may capture session
9
+ * replays and where the capture script is hosted. Requires scope:
10
+ * replaySettings:list
11
+ */
12
+ list(query?: ReplaySettingListParams | null | undefined, options?: RequestOptions): PagePromise<ReplaySettingListResponsesCursor, ReplaySettingListResponse>;
13
+ /**
14
+ * Create the replay configuration for this account. Each account is limited to one
15
+ * replay configuration — calls made when one already exists return HTTP 409 with
16
+ * the reason in the response `error` field. Requires scope: replaySettings:create
7
17
  */
8
18
  create(body: ReplaySettingCreateParams, options?: RequestOptions): APIPromise<ReplaySettingCreateResponse>;
9
19
  /**
10
- * Find a single replay setting by ID. Requires scope: replaySettings:find
20
+ * Fetch a single replay configuration by ID, including its whitelisted domains and
21
+ * custom domain. Requires scope: replaySettings:find
11
22
  */
12
23
  retrieve(id: string, options?: RequestOptions): APIPromise<ReplaySettingRetrieveResponse | null>;
13
24
  /**
14
- * Update a replay setting. Requires scope: replaySettings:update
25
+ * Update one or more fields on an existing replay configuration. Only the fields
26
+ * you send are changed; omitted fields keep their current value. Note that
27
+ * `whitelistDomains` is replaced wholesale (not merged with the existing list).
28
+ * Requires scope: replaySettings:update
15
29
  */
16
30
  update(id: string, body: ReplaySettingUpdateParams, options?: RequestOptions): APIPromise<ReplaySettingUpdateResponse>;
17
31
  /**
18
- * List all replay settings. Requires scope: replaySettings:list
32
+ * Delete the replay configuration. Capture stops immediately for all whitelisted
33
+ * domains. Requires scope: replaySettings:delete
19
34
  */
20
- list(options?: RequestOptions): APIPromise<ReplaySettingListResponse>;
35
+ delete(id: string, options?: RequestOptions): APIPromise<ReplaySettingDeleteResponse>;
36
+ }
37
+ export type ReplaySettingListResponsesCursor = Cursor<ReplaySettingListResponse>;
38
+ export interface ReplaySettingListResponse {
21
39
  /**
22
- * Delete a replay setting. Requires scope: replaySettings:delete
40
+ * Stable identifier (UUID) for this replay configuration.
23
41
  */
24
- delete(id: string, options?: RequestOptions): APIPromise<ReplaySettingDeleteResponse>;
42
+ id: string;
43
+ /**
44
+ * ISO-8601 timestamp when this configuration was created.
45
+ */
46
+ createdAt: string;
47
+ /**
48
+ * Human-readable label for this replay configuration. Shown in the dashboard. May
49
+ * be empty.
50
+ */
51
+ name: string;
52
+ /**
53
+ * Whether session replay capture is currently active. Set to "Enabled" to start
54
+ * capturing replays from whitelisted domains, or "Disabled" to pause capture
55
+ * without losing the configuration.
56
+ */
57
+ status: 'Disabled' | 'Enabled';
58
+ /**
59
+ * Optional custom domain (CNAME) for hosting the replay capture script. Leave null
60
+ * to use the default Ours Privacy domain.
61
+ */
62
+ customDomain?: string | null;
63
+ /**
64
+ * ISO-8601 timestamp of the most recent update, or null if never updated.
65
+ */
66
+ updatedAt?: string | null;
67
+ /**
68
+ * Hostnames where session replay capture is permitted. Replays initiated from any
69
+ * host not in this list are dropped. PATCH replaces the list — partial updates are
70
+ * not merged.
71
+ */
72
+ whitelistDomains?: Array<string> | null;
25
73
  }
26
74
  export interface ReplaySettingCreateResponse {
27
75
  isSuccess: boolean;
@@ -29,12 +77,39 @@ export interface ReplaySettingCreateResponse {
29
77
  replaySettings?: unknown | null;
30
78
  }
31
79
  export interface ReplaySettingRetrieveResponse {
80
+ /**
81
+ * Stable identifier (UUID) for this replay configuration.
82
+ */
32
83
  id: string;
84
+ /**
85
+ * ISO-8601 timestamp when this configuration was created.
86
+ */
33
87
  createdAt: string;
88
+ /**
89
+ * Human-readable label for this replay configuration. Shown in the dashboard. May
90
+ * be empty.
91
+ */
34
92
  name: string;
93
+ /**
94
+ * Whether session replay capture is currently active. Set to "Enabled" to start
95
+ * capturing replays from whitelisted domains, or "Disabled" to pause capture
96
+ * without losing the configuration.
97
+ */
35
98
  status: 'Disabled' | 'Enabled';
99
+ /**
100
+ * Optional custom domain (CNAME) for hosting the replay capture script. Leave null
101
+ * to use the default Ours Privacy domain.
102
+ */
36
103
  customDomain?: string | null;
104
+ /**
105
+ * ISO-8601 timestamp of the most recent update, or null if never updated.
106
+ */
37
107
  updatedAt?: string | null;
108
+ /**
109
+ * Hostnames where session replay capture is permitted. Replays initiated from any
110
+ * host not in this list are dropped. PATCH replaces the list — partial updates are
111
+ * not merged.
112
+ */
38
113
  whitelistDomains?: Array<string> | null;
39
114
  }
40
115
  export interface ReplaySettingUpdateResponse {
@@ -42,38 +117,62 @@ export interface ReplaySettingUpdateResponse {
42
117
  cause?: string | null;
43
118
  replaySettings?: unknown | null;
44
119
  }
45
- export interface ReplaySettingListResponse {
46
- entities: Array<ReplaySettingListResponse.Entity>;
47
- }
48
- export declare namespace ReplaySettingListResponse {
49
- interface Entity {
50
- id: string;
51
- createdAt: string;
52
- name: string;
53
- status: 'Disabled' | 'Enabled';
54
- customDomain?: string | null;
55
- updatedAt?: string | null;
56
- whitelistDomains?: Array<string> | null;
57
- }
58
- }
59
120
  export interface ReplaySettingDeleteResponse {
60
121
  isSuccess: boolean;
61
122
  cause?: string | null;
62
123
  replaySettings?: unknown | null;
63
124
  }
125
+ export interface ReplaySettingListParams extends CursorParams {
126
+ }
64
127
  export interface ReplaySettingCreateParams {
128
+ /**
129
+ * Optional custom domain (CNAME) for hosting the replay capture script. Leave null
130
+ * to use the default Ours Privacy domain.
131
+ */
65
132
  customDomain?: string | null;
133
+ /**
134
+ * Human-readable label for this replay configuration. Shown in the dashboard. May
135
+ * be empty.
136
+ */
66
137
  name?: string | null;
67
- status?: string | null;
138
+ /**
139
+ * Whether session replay capture is currently active. Set to "Enabled" to start
140
+ * capturing replays from whitelisted domains, or "Disabled" to pause capture
141
+ * without losing the configuration.
142
+ */
143
+ status?: 'Disabled' | 'Enabled' | null;
144
+ /**
145
+ * Hostnames where session replay capture is permitted. Replays initiated from any
146
+ * host not in this list are dropped. PATCH replaces the list — partial updates are
147
+ * not merged.
148
+ */
68
149
  whitelistDomains?: Array<string> | null;
69
150
  }
70
151
  export interface ReplaySettingUpdateParams {
152
+ /**
153
+ * Optional custom domain (CNAME) for hosting the replay capture script. Leave null
154
+ * to use the default Ours Privacy domain.
155
+ */
71
156
  customDomain?: string | null;
157
+ /**
158
+ * Human-readable label for this replay configuration. Shown in the dashboard. May
159
+ * be empty.
160
+ */
72
161
  name?: string | null;
73
- status?: string | null;
162
+ /**
163
+ * Whether session replay capture is currently active. Set to "Enabled" to start
164
+ * capturing replays from whitelisted domains, or "Disabled" to pause capture
165
+ * without losing the configuration.
166
+ */
167
+ status?: 'Disabled' | 'Enabled' | null;
168
+ /**
169
+ * Hostnames where session replay capture is permitted. Replays initiated from any
170
+ * host not in this list are dropped. PATCH replaces the list — partial updates are
171
+ * not merged.
172
+ */
74
173
  whitelistDomains?: Array<string> | null;
75
174
  }
76
175
  export declare namespace ReplaySettings {
77
- export { type ReplaySettingCreateResponse as ReplaySettingCreateResponse, type ReplaySettingRetrieveResponse as ReplaySettingRetrieveResponse, type ReplaySettingUpdateResponse as ReplaySettingUpdateResponse, type ReplaySettingListResponse as ReplaySettingListResponse, type ReplaySettingDeleteResponse as ReplaySettingDeleteResponse, type ReplaySettingCreateParams as ReplaySettingCreateParams, type ReplaySettingUpdateParams as ReplaySettingUpdateParams, };
176
+ export { type ReplaySettingListResponse as ReplaySettingListResponse, type ReplaySettingCreateResponse as ReplaySettingCreateResponse, type ReplaySettingRetrieveResponse as ReplaySettingRetrieveResponse, type ReplaySettingUpdateResponse as ReplaySettingUpdateResponse, type ReplaySettingDeleteResponse as ReplaySettingDeleteResponse, type ReplaySettingListResponsesCursor as ReplaySettingListResponsesCursor, type ReplaySettingListParams as ReplaySettingListParams, type ReplaySettingCreateParams as ReplaySettingCreateParams, type ReplaySettingUpdateParams as ReplaySettingUpdateParams, };
78
177
  }
79
178
  //# sourceMappingURL=replay-settings.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"replay-settings.d.mts","sourceRoot":"","sources":["../src/resources/replay-settings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;IAI1G;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,GAAG,IAAI,CAAC;IAIhG;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;IAI1C;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC;IAIrE;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC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AAC,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;IAEvC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CACzC;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -1,27 +1,75 @@
1
1
  import { APIResource } from "../core/resource.js";
2
2
  import { APIPromise } from "../core/api-promise.js";
3
+ import { Cursor, type CursorParams, PagePromise } from "../core/pagination.js";
3
4
  import { RequestOptions } from "../internal/request-options.js";
4
5
  export declare class ReplaySettings extends APIResource {
5
6
  /**
6
- * Create a new replay setting. Requires scope: replaySettings:create
7
+ * List the replay configurations on this account. Supports cursor pagination via
8
+ * `limit` and `cursor`. Replay settings control which domains may capture session
9
+ * replays and where the capture script is hosted. Requires scope:
10
+ * replaySettings:list
11
+ */
12
+ list(query?: ReplaySettingListParams | null | undefined, options?: RequestOptions): PagePromise<ReplaySettingListResponsesCursor, ReplaySettingListResponse>;
13
+ /**
14
+ * Create the replay configuration for this account. Each account is limited to one
15
+ * replay configuration — calls made when one already exists return HTTP 409 with
16
+ * the reason in the response `error` field. Requires scope: replaySettings:create
7
17
  */
8
18
  create(body: ReplaySettingCreateParams, options?: RequestOptions): APIPromise<ReplaySettingCreateResponse>;
9
19
  /**
10
- * Find a single replay setting by ID. Requires scope: replaySettings:find
20
+ * Fetch a single replay configuration by ID, including its whitelisted domains and
21
+ * custom domain. Requires scope: replaySettings:find
11
22
  */
12
23
  retrieve(id: string, options?: RequestOptions): APIPromise<ReplaySettingRetrieveResponse | null>;
13
24
  /**
14
- * Update a replay setting. Requires scope: replaySettings:update
25
+ * Update one or more fields on an existing replay configuration. Only the fields
26
+ * you send are changed; omitted fields keep their current value. Note that
27
+ * `whitelistDomains` is replaced wholesale (not merged with the existing list).
28
+ * Requires scope: replaySettings:update
15
29
  */
16
30
  update(id: string, body: ReplaySettingUpdateParams, options?: RequestOptions): APIPromise<ReplaySettingUpdateResponse>;
17
31
  /**
18
- * List all replay settings. Requires scope: replaySettings:list
32
+ * Delete the replay configuration. Capture stops immediately for all whitelisted
33
+ * domains. Requires scope: replaySettings:delete
19
34
  */
20
- list(options?: RequestOptions): APIPromise<ReplaySettingListResponse>;
35
+ delete(id: string, options?: RequestOptions): APIPromise<ReplaySettingDeleteResponse>;
36
+ }
37
+ export type ReplaySettingListResponsesCursor = Cursor<ReplaySettingListResponse>;
38
+ export interface ReplaySettingListResponse {
21
39
  /**
22
- * Delete a replay setting. Requires scope: replaySettings:delete
40
+ * Stable identifier (UUID) for this replay configuration.
23
41
  */
24
- delete(id: string, options?: RequestOptions): APIPromise<ReplaySettingDeleteResponse>;
42
+ id: string;
43
+ /**
44
+ * ISO-8601 timestamp when this configuration was created.
45
+ */
46
+ createdAt: string;
47
+ /**
48
+ * Human-readable label for this replay configuration. Shown in the dashboard. May
49
+ * be empty.
50
+ */
51
+ name: string;
52
+ /**
53
+ * Whether session replay capture is currently active. Set to "Enabled" to start
54
+ * capturing replays from whitelisted domains, or "Disabled" to pause capture
55
+ * without losing the configuration.
56
+ */
57
+ status: 'Disabled' | 'Enabled';
58
+ /**
59
+ * Optional custom domain (CNAME) for hosting the replay capture script. Leave null
60
+ * to use the default Ours Privacy domain.
61
+ */
62
+ customDomain?: string | null;
63
+ /**
64
+ * ISO-8601 timestamp of the most recent update, or null if never updated.
65
+ */
66
+ updatedAt?: string | null;
67
+ /**
68
+ * Hostnames where session replay capture is permitted. Replays initiated from any
69
+ * host not in this list are dropped. PATCH replaces the list — partial updates are
70
+ * not merged.
71
+ */
72
+ whitelistDomains?: Array<string> | null;
25
73
  }
26
74
  export interface ReplaySettingCreateResponse {
27
75
  isSuccess: boolean;
@@ -29,12 +77,39 @@ export interface ReplaySettingCreateResponse {
29
77
  replaySettings?: unknown | null;
30
78
  }
31
79
  export interface ReplaySettingRetrieveResponse {
80
+ /**
81
+ * Stable identifier (UUID) for this replay configuration.
82
+ */
32
83
  id: string;
84
+ /**
85
+ * ISO-8601 timestamp when this configuration was created.
86
+ */
33
87
  createdAt: string;
88
+ /**
89
+ * Human-readable label for this replay configuration. Shown in the dashboard. May
90
+ * be empty.
91
+ */
34
92
  name: string;
93
+ /**
94
+ * Whether session replay capture is currently active. Set to "Enabled" to start
95
+ * capturing replays from whitelisted domains, or "Disabled" to pause capture
96
+ * without losing the configuration.
97
+ */
35
98
  status: 'Disabled' | 'Enabled';
99
+ /**
100
+ * Optional custom domain (CNAME) for hosting the replay capture script. Leave null
101
+ * to use the default Ours Privacy domain.
102
+ */
36
103
  customDomain?: string | null;
104
+ /**
105
+ * ISO-8601 timestamp of the most recent update, or null if never updated.
106
+ */
37
107
  updatedAt?: string | null;
108
+ /**
109
+ * Hostnames where session replay capture is permitted. Replays initiated from any
110
+ * host not in this list are dropped. PATCH replaces the list — partial updates are
111
+ * not merged.
112
+ */
38
113
  whitelistDomains?: Array<string> | null;
39
114
  }
40
115
  export interface ReplaySettingUpdateResponse {
@@ -42,38 +117,62 @@ export interface ReplaySettingUpdateResponse {
42
117
  cause?: string | null;
43
118
  replaySettings?: unknown | null;
44
119
  }
45
- export interface ReplaySettingListResponse {
46
- entities: Array<ReplaySettingListResponse.Entity>;
47
- }
48
- export declare namespace ReplaySettingListResponse {
49
- interface Entity {
50
- id: string;
51
- createdAt: string;
52
- name: string;
53
- status: 'Disabled' | 'Enabled';
54
- customDomain?: string | null;
55
- updatedAt?: string | null;
56
- whitelistDomains?: Array<string> | null;
57
- }
58
- }
59
120
  export interface ReplaySettingDeleteResponse {
60
121
  isSuccess: boolean;
61
122
  cause?: string | null;
62
123
  replaySettings?: unknown | null;
63
124
  }
125
+ export interface ReplaySettingListParams extends CursorParams {
126
+ }
64
127
  export interface ReplaySettingCreateParams {
128
+ /**
129
+ * Optional custom domain (CNAME) for hosting the replay capture script. Leave null
130
+ * to use the default Ours Privacy domain.
131
+ */
65
132
  customDomain?: string | null;
133
+ /**
134
+ * Human-readable label for this replay configuration. Shown in the dashboard. May
135
+ * be empty.
136
+ */
66
137
  name?: string | null;
67
- status?: string | null;
138
+ /**
139
+ * Whether session replay capture is currently active. Set to "Enabled" to start
140
+ * capturing replays from whitelisted domains, or "Disabled" to pause capture
141
+ * without losing the configuration.
142
+ */
143
+ status?: 'Disabled' | 'Enabled' | null;
144
+ /**
145
+ * Hostnames where session replay capture is permitted. Replays initiated from any
146
+ * host not in this list are dropped. PATCH replaces the list — partial updates are
147
+ * not merged.
148
+ */
68
149
  whitelistDomains?: Array<string> | null;
69
150
  }
70
151
  export interface ReplaySettingUpdateParams {
152
+ /**
153
+ * Optional custom domain (CNAME) for hosting the replay capture script. Leave null
154
+ * to use the default Ours Privacy domain.
155
+ */
71
156
  customDomain?: string | null;
157
+ /**
158
+ * Human-readable label for this replay configuration. Shown in the dashboard. May
159
+ * be empty.
160
+ */
72
161
  name?: string | null;
73
- status?: string | null;
162
+ /**
163
+ * Whether session replay capture is currently active. Set to "Enabled" to start
164
+ * capturing replays from whitelisted domains, or "Disabled" to pause capture
165
+ * without losing the configuration.
166
+ */
167
+ status?: 'Disabled' | 'Enabled' | null;
168
+ /**
169
+ * Hostnames where session replay capture is permitted. Replays initiated from any
170
+ * host not in this list are dropped. PATCH replaces the list — partial updates are
171
+ * not merged.
172
+ */
74
173
  whitelistDomains?: Array<string> | null;
75
174
  }
76
175
  export declare namespace ReplaySettings {
77
- export { type ReplaySettingCreateResponse as ReplaySettingCreateResponse, type ReplaySettingRetrieveResponse as ReplaySettingRetrieveResponse, type ReplaySettingUpdateResponse as ReplaySettingUpdateResponse, type ReplaySettingListResponse as ReplaySettingListResponse, type ReplaySettingDeleteResponse as ReplaySettingDeleteResponse, type ReplaySettingCreateParams as ReplaySettingCreateParams, type ReplaySettingUpdateParams as ReplaySettingUpdateParams, };
176
+ export { type ReplaySettingListResponse as ReplaySettingListResponse, type ReplaySettingCreateResponse as ReplaySettingCreateResponse, type ReplaySettingRetrieveResponse as ReplaySettingRetrieveResponse, type ReplaySettingUpdateResponse as ReplaySettingUpdateResponse, type ReplaySettingDeleteResponse as ReplaySettingDeleteResponse, type ReplaySettingListResponsesCursor as ReplaySettingListResponsesCursor, type ReplaySettingListParams as ReplaySettingListParams, type ReplaySettingCreateParams as ReplaySettingCreateParams, type ReplaySettingUpdateParams as ReplaySettingUpdateParams, };
78
177
  }
79
178
  //# sourceMappingURL=replay-settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"replay-settings.d.ts","sourceRoot":"","sources":["../src/resources/replay-settings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;IAI1G;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,GAAG,IAAI,CAAC;IAIhG;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;IAI1C;;OAEG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC;I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,GAAG,IAAI,CAAC;IAE7B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;IAEvC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CACzC;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
@@ -3,34 +3,48 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.ReplaySettings = void 0;
5
5
  const resource_1 = require("../core/resource.js");
6
+ const pagination_1 = require("../core/pagination.js");
6
7
  const path_1 = require("../internal/utils/path.js");
7
8
  class ReplaySettings extends resource_1.APIResource {
8
9
  /**
9
- * Create a new replay setting. Requires scope: replaySettings:create
10
+ * List the replay configurations on this account. Supports cursor pagination via
11
+ * `limit` and `cursor`. Replay settings control which domains may capture session
12
+ * replays and where the capture script is hosted. Requires scope:
13
+ * replaySettings:list
14
+ */
15
+ list(query = {}, options) {
16
+ return this._client.getAPIList('/rest/v1/replay-settings', (pagination_1.Cursor), {
17
+ query,
18
+ ...options,
19
+ });
20
+ }
21
+ /**
22
+ * Create the replay configuration for this account. Each account is limited to one
23
+ * replay configuration — calls made when one already exists return HTTP 409 with
24
+ * the reason in the response `error` field. Requires scope: replaySettings:create
10
25
  */
11
26
  create(body, options) {
12
27
  return this._client.post('/rest/v1/replay-settings', { body, ...options });
13
28
  }
14
29
  /**
15
- * Find a single replay setting by ID. Requires scope: replaySettings:find
30
+ * Fetch a single replay configuration by ID, including its whitelisted domains and
31
+ * custom domain. Requires scope: replaySettings:find
16
32
  */
17
33
  retrieve(id, options) {
18
34
  return this._client.get((0, path_1.path) `/rest/v1/replay-settings/${id}`, options);
19
35
  }
20
36
  /**
21
- * Update a replay setting. Requires scope: replaySettings:update
37
+ * Update one or more fields on an existing replay configuration. Only the fields
38
+ * you send are changed; omitted fields keep their current value. Note that
39
+ * `whitelistDomains` is replaced wholesale (not merged with the existing list).
40
+ * Requires scope: replaySettings:update
22
41
  */
23
42
  update(id, body, options) {
24
43
  return this._client.patch((0, path_1.path) `/rest/v1/replay-settings/${id}`, { body, ...options });
25
44
  }
26
45
  /**
27
- * List all replay settings. Requires scope: replaySettings:list
28
- */
29
- list(options) {
30
- return this._client.get('/rest/v1/replay-settings', options);
31
- }
32
- /**
33
- * Delete a replay setting. Requires scope: replaySettings:delete
46
+ * Delete the replay configuration. Capture stops immediately for all whitelisted
47
+ * domains. Requires scope: replaySettings:delete
34
48
  */
35
49
  delete(id, options) {
36
50
  return this._client.delete((0, path_1.path) `/rest/v1/replay-settings/${id}`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"replay-settings.js","sourceRoot":"","sources":["../src/resources/replay-settings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;OAEG;IACH,MAAM,CAAC,IAA+B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAA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AAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,4BAA4B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;;;;OAKG;IACH,MAAM,CACJ,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,4BAA4B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,4BAA4B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF;AAvDD,wCAuDC"}
@@ -1,33 +1,47 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../core/resource.mjs";
3
+ import { Cursor } from "../core/pagination.mjs";
3
4
  import { path } from "../internal/utils/path.mjs";
4
5
  export class ReplaySettings extends APIResource {
5
6
  /**
6
- * Create a new replay setting. Requires scope: replaySettings:create
7
+ * List the replay configurations on this account. Supports cursor pagination via
8
+ * `limit` and `cursor`. Replay settings control which domains may capture session
9
+ * replays and where the capture script is hosted. Requires scope:
10
+ * replaySettings:list
11
+ */
12
+ list(query = {}, options) {
13
+ return this._client.getAPIList('/rest/v1/replay-settings', (Cursor), {
14
+ query,
15
+ ...options,
16
+ });
17
+ }
18
+ /**
19
+ * Create the replay configuration for this account. Each account is limited to one
20
+ * replay configuration — calls made when one already exists return HTTP 409 with
21
+ * the reason in the response `error` field. Requires scope: replaySettings:create
7
22
  */
8
23
  create(body, options) {
9
24
  return this._client.post('/rest/v1/replay-settings', { body, ...options });
10
25
  }
11
26
  /**
12
- * Find a single replay setting by ID. Requires scope: replaySettings:find
27
+ * Fetch a single replay configuration by ID, including its whitelisted domains and
28
+ * custom domain. Requires scope: replaySettings:find
13
29
  */
14
30
  retrieve(id, options) {
15
31
  return this._client.get(path `/rest/v1/replay-settings/${id}`, options);
16
32
  }
17
33
  /**
18
- * Update a replay setting. Requires scope: replaySettings:update
34
+ * Update one or more fields on an existing replay configuration. Only the fields
35
+ * you send are changed; omitted fields keep their current value. Note that
36
+ * `whitelistDomains` is replaced wholesale (not merged with the existing list).
37
+ * Requires scope: replaySettings:update
19
38
  */
20
39
  update(id, body, options) {
21
40
  return this._client.patch(path `/rest/v1/replay-settings/${id}`, { body, ...options });
22
41
  }
23
42
  /**
24
- * List all replay settings. Requires scope: replaySettings:list
25
- */
26
- list(options) {
27
- return this._client.get('/rest/v1/replay-settings', options);
28
- }
29
- /**
30
- * Delete a replay setting. Requires scope: replaySettings:delete
43
+ * Delete the replay configuration. Capture stops immediately for all whitelisted
44
+ * domains. Requires scope: replaySettings:delete
31
45
  */
32
46
  delete(id, options) {
33
47
  return this._client.delete(path `/rest/v1/replay-settings/${id}`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"replay-settings.mjs","sourceRoot":"","sources":["../src/resources/replay-settings.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;OAEG;IACH,MAAM,CAAC,IAA+B,EAAE,OAAwB;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,4BAA4B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,EAAU,EACV,IAA+B,EAC/B,OAAwB;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