@oursprivacy/platform-sdk 1.12.0 → 1.14.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.
- package/CHANGELOG.md +24 -0
- package/README.md +35 -0
- package/client.d.mts +32 -14
- package/client.d.mts.map +1 -1
- package/client.d.ts +32 -14
- package/client.d.ts.map +1 -1
- package/client.js +26 -4
- package/client.js.map +1 -1
- package/client.mjs +26 -4
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +60 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +60 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +101 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +95 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/allowed-events.d.mts +18 -18
- package/resources/allowed-events.d.mts.map +1 -1
- package/resources/allowed-events.d.ts +18 -18
- package/resources/allowed-events.d.ts.map +1 -1
- package/resources/allowed-events.js +7 -7
- package/resources/allowed-events.js.map +1 -1
- package/resources/allowed-events.mjs +7 -7
- package/resources/allowed-events.mjs.map +1 -1
- package/resources/consent-settings.d.mts +2568 -124
- package/resources/consent-settings.d.mts.map +1 -1
- package/resources/consent-settings.d.ts +2568 -124
- package/resources/consent-settings.d.ts.map +1 -1
- package/resources/consent-settings.js +24 -7
- package/resources/consent-settings.js.map +1 -1
- package/resources/consent-settings.mjs +24 -7
- package/resources/consent-settings.mjs.map +1 -1
- package/resources/destinations.d.mts +33 -32
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +33 -32
- package/resources/destinations.d.ts.map +1 -1
- package/resources/destinations.js +8 -7
- package/resources/destinations.js.map +1 -1
- package/resources/destinations.mjs +8 -7
- package/resources/destinations.mjs.map +1 -1
- package/resources/experiment-settings.d.mts +277 -0
- package/resources/experiment-settings.d.mts.map +1 -0
- package/resources/experiment-settings.d.ts +277 -0
- package/resources/experiment-settings.d.ts.map +1 -0
- package/resources/experiment-settings.js +77 -0
- package/resources/experiment-settings.js.map +1 -0
- package/resources/experiment-settings.mjs +73 -0
- package/resources/experiment-settings.mjs.map +1 -0
- package/resources/experiment-variants.d.mts +653 -0
- package/resources/experiment-variants.d.mts.map +1 -0
- package/resources/experiment-variants.d.ts +653 -0
- package/resources/experiment-variants.d.ts.map +1 -0
- package/resources/experiment-variants.js +86 -0
- package/resources/experiment-variants.js.map +1 -0
- package/resources/experiment-variants.mjs +82 -0
- package/resources/experiment-variants.mjs.map +1 -0
- package/resources/experiments.d.mts +2002 -0
- package/resources/experiments.d.mts.map +1 -0
- package/resources/experiments.d.ts +2002 -0
- package/resources/experiments.d.ts.map +1 -0
- package/resources/experiments.js +166 -0
- package/resources/experiments.js.map +1 -0
- package/resources/experiments.mjs +162 -0
- package/resources/experiments.mjs.map +1 -0
- package/resources/global-dispatch-centers.d.mts +125 -58
- package/resources/global-dispatch-centers.d.mts.map +1 -1
- package/resources/global-dispatch-centers.d.ts +125 -58
- package/resources/global-dispatch-centers.d.ts.map +1 -1
- package/resources/global-dispatch-centers.js +10 -7
- package/resources/global-dispatch-centers.js.map +1 -1
- package/resources/global-dispatch-centers.mjs +10 -7
- package/resources/global-dispatch-centers.mjs.map +1 -1
- package/resources/index.d.mts +11 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/mappings.d.mts +138 -0
- package/resources/mappings.d.mts.map +1 -0
- package/resources/mappings.d.ts +138 -0
- package/resources/mappings.d.ts.map +1 -0
- package/resources/mappings.js +45 -0
- package/resources/mappings.js.map +1 -0
- package/resources/mappings.mjs +41 -0
- package/resources/mappings.mjs.map +1 -0
- package/resources/replay-settings.d.mts +48 -48
- package/resources/replay-settings.d.mts.map +1 -1
- package/resources/replay-settings.d.ts +48 -48
- package/resources/replay-settings.d.ts.map +1 -1
- package/resources/replay-settings.js +13 -8
- package/resources/replay-settings.js.map +1 -1
- package/resources/replay-settings.mjs +13 -8
- package/resources/replay-settings.mjs.map +1 -1
- package/resources/sources.d.mts +64 -27
- package/resources/sources.d.mts.map +1 -1
- package/resources/sources.d.ts +64 -27
- package/resources/sources.d.ts.map +1 -1
- package/resources/sources.js +14 -7
- package/resources/sources.js.map +1 -1
- package/resources/sources.mjs +14 -7
- package/resources/sources.mjs.map +1 -1
- package/resources/versions.d.mts +742 -16
- package/resources/versions.d.mts.map +1 -1
- package/resources/versions.d.ts +742 -16
- package/resources/versions.d.ts.map +1 -1
- package/resources/versions.js +45 -5
- package/resources/versions.js.map +1 -1
- package/resources/versions.mjs +45 -5
- package/resources/versions.mjs.map +1 -1
- package/src/client.ts +210 -29
- package/src/core/pagination.ts +165 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/allowed-events.ts +27 -27
- package/src/resources/consent-settings.ts +3036 -244
- package/src/resources/destinations.ts +128 -127
- package/src/resources/experiment-settings.ts +367 -0
- package/src/resources/experiment-variants.ts +868 -0
- package/src/resources/experiments.ts +2446 -0
- package/src/resources/global-dispatch-centers.ts +155 -65
- package/src/resources/index.ts +77 -7
- package/src/resources/mappings.ts +236 -0
- package/src/resources/replay-settings.ts +67 -59
- package/src/resources/sources.ts +116 -71
- package/src/resources/versions.ts +1130 -17
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,236 @@
|
|
|
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 { Cursor, type CursorParams, PagePromise } from '../core/pagination';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Mappings extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* List mappings for an entity (a source or destination). Requires the `entityId`
|
|
12
|
+
* query parameter. Supports cursor pagination via `limit` and `cursor`. Sorted by
|
|
13
|
+
* `priority` ascending, then by `id` for deterministic pagination. Requires scope:
|
|
14
|
+
* mapping:list
|
|
15
|
+
*/
|
|
16
|
+
list(
|
|
17
|
+
query: MappingListParams,
|
|
18
|
+
options?: RequestOptions,
|
|
19
|
+
): PagePromise<MappingListResponsesCursor, MappingListResponse> {
|
|
20
|
+
return this._client.getAPIList('/rest/v1/mappings', Cursor<MappingListResponse>, { query, ...options });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Create a new mapping. Requires scope: mapping:create
|
|
25
|
+
*/
|
|
26
|
+
create(body: MappingCreateParams, options?: RequestOptions): APIPromise<MappingCreateResponse> {
|
|
27
|
+
return this._client.post('/rest/v1/mappings', { body, ...options });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Find a single mapping by ID. Requires scope: mapping:find
|
|
32
|
+
*/
|
|
33
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<MappingRetrieveResponse> {
|
|
34
|
+
return this._client.get(path`/rest/v1/mappings/${id}`, options);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Partially update a mapping. Only the fields you send are changed. Requires
|
|
39
|
+
* scope: mapping:update
|
|
40
|
+
*/
|
|
41
|
+
update(id: string, body: MappingUpdateParams, options?: RequestOptions): APIPromise<MappingUpdateResponse> {
|
|
42
|
+
return this._client.patch(path`/rest/v1/mappings/${id}`, { body, ...options });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Delete a mapping. Requires scope: mapping:delete
|
|
47
|
+
*/
|
|
48
|
+
delete(id: string, options?: RequestOptions): APIPromise<MappingDeleteResponse> {
|
|
49
|
+
return this._client.delete(path`/rest/v1/mappings/${id}`, options);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type MappingListResponsesCursor = Cursor<MappingListResponse>;
|
|
54
|
+
|
|
55
|
+
export interface MappingListResponse {
|
|
56
|
+
id: string;
|
|
57
|
+
|
|
58
|
+
isEnabled: boolean;
|
|
59
|
+
|
|
60
|
+
mappings: Array<MappingListResponse.Mapping>;
|
|
61
|
+
|
|
62
|
+
destinationId?: string | null;
|
|
63
|
+
|
|
64
|
+
isDefaultMapping?: boolean | null;
|
|
65
|
+
|
|
66
|
+
name?: string | null;
|
|
67
|
+
|
|
68
|
+
priority?: number | null;
|
|
69
|
+
|
|
70
|
+
sourceId?: string | null;
|
|
71
|
+
|
|
72
|
+
templateId?: string | null;
|
|
73
|
+
|
|
74
|
+
templateName?: string | null;
|
|
75
|
+
|
|
76
|
+
updatedAt?: string | null;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export namespace MappingListResponse {
|
|
80
|
+
export interface Mapping {
|
|
81
|
+
map: string;
|
|
82
|
+
|
|
83
|
+
property: string;
|
|
84
|
+
|
|
85
|
+
modification?: string | null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface MappingCreateResponse {
|
|
90
|
+
id: string;
|
|
91
|
+
|
|
92
|
+
isEnabled: boolean;
|
|
93
|
+
|
|
94
|
+
mappings: Array<MappingCreateResponse.Mapping>;
|
|
95
|
+
|
|
96
|
+
destinationId?: string | null;
|
|
97
|
+
|
|
98
|
+
isDefaultMapping?: boolean | null;
|
|
99
|
+
|
|
100
|
+
name?: string | null;
|
|
101
|
+
|
|
102
|
+
priority?: number | null;
|
|
103
|
+
|
|
104
|
+
sourceId?: string | null;
|
|
105
|
+
|
|
106
|
+
templateId?: string | null;
|
|
107
|
+
|
|
108
|
+
templateName?: string | null;
|
|
109
|
+
|
|
110
|
+
updatedAt?: string | null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export namespace MappingCreateResponse {
|
|
114
|
+
export interface Mapping {
|
|
115
|
+
map: string;
|
|
116
|
+
|
|
117
|
+
property: string;
|
|
118
|
+
|
|
119
|
+
modification?: string | null;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface MappingRetrieveResponse {
|
|
124
|
+
id: string;
|
|
125
|
+
|
|
126
|
+
isEnabled: boolean;
|
|
127
|
+
|
|
128
|
+
mappings: Array<MappingRetrieveResponse.Mapping>;
|
|
129
|
+
|
|
130
|
+
destinationId?: string | null;
|
|
131
|
+
|
|
132
|
+
isDefaultMapping?: boolean | null;
|
|
133
|
+
|
|
134
|
+
name?: string | null;
|
|
135
|
+
|
|
136
|
+
priority?: number | null;
|
|
137
|
+
|
|
138
|
+
sourceId?: string | null;
|
|
139
|
+
|
|
140
|
+
templateId?: string | null;
|
|
141
|
+
|
|
142
|
+
templateName?: string | null;
|
|
143
|
+
|
|
144
|
+
updatedAt?: string | null;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export namespace MappingRetrieveResponse {
|
|
148
|
+
export interface Mapping {
|
|
149
|
+
map: string;
|
|
150
|
+
|
|
151
|
+
property: string;
|
|
152
|
+
|
|
153
|
+
modification?: string | null;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface MappingUpdateResponse {
|
|
158
|
+
id: string;
|
|
159
|
+
|
|
160
|
+
isEnabled: boolean;
|
|
161
|
+
|
|
162
|
+
mappings: Array<MappingUpdateResponse.Mapping>;
|
|
163
|
+
|
|
164
|
+
destinationId?: string | null;
|
|
165
|
+
|
|
166
|
+
isDefaultMapping?: boolean | null;
|
|
167
|
+
|
|
168
|
+
name?: string | null;
|
|
169
|
+
|
|
170
|
+
priority?: number | null;
|
|
171
|
+
|
|
172
|
+
sourceId?: string | null;
|
|
173
|
+
|
|
174
|
+
templateId?: string | null;
|
|
175
|
+
|
|
176
|
+
templateName?: string | null;
|
|
177
|
+
|
|
178
|
+
updatedAt?: string | null;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export namespace MappingUpdateResponse {
|
|
182
|
+
export interface Mapping {
|
|
183
|
+
map: string;
|
|
184
|
+
|
|
185
|
+
property: string;
|
|
186
|
+
|
|
187
|
+
modification?: string | null;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export type MappingDeleteResponse = boolean;
|
|
192
|
+
|
|
193
|
+
export interface MappingListParams extends CursorParams {
|
|
194
|
+
/**
|
|
195
|
+
* Filter mappings by their parent entity id (for example an allowed event id).
|
|
196
|
+
*/
|
|
197
|
+
entityId: string;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export interface MappingCreateParams {
|
|
201
|
+
allowedEventId: string;
|
|
202
|
+
|
|
203
|
+
destinationId: string;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface MappingUpdateParams {
|
|
207
|
+
logic?: unknown;
|
|
208
|
+
|
|
209
|
+
mappings?: Array<MappingUpdateParams.Mapping>;
|
|
210
|
+
|
|
211
|
+
name?: string | null;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export namespace MappingUpdateParams {
|
|
215
|
+
export interface Mapping {
|
|
216
|
+
map: string;
|
|
217
|
+
|
|
218
|
+
property: string;
|
|
219
|
+
|
|
220
|
+
modification?: string | null;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export declare namespace Mappings {
|
|
225
|
+
export {
|
|
226
|
+
type MappingListResponse as MappingListResponse,
|
|
227
|
+
type MappingCreateResponse as MappingCreateResponse,
|
|
228
|
+
type MappingRetrieveResponse as MappingRetrieveResponse,
|
|
229
|
+
type MappingUpdateResponse as MappingUpdateResponse,
|
|
230
|
+
type MappingDeleteResponse as MappingDeleteResponse,
|
|
231
|
+
type MappingListResponsesCursor as MappingListResponsesCursor,
|
|
232
|
+
type MappingListParams as MappingListParams,
|
|
233
|
+
type MappingCreateParams as MappingCreateParams,
|
|
234
|
+
type MappingUpdateParams as MappingUpdateParams,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
@@ -2,10 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { Cursor, type CursorParams, PagePromise } from '../core/pagination';
|
|
5
6
|
import { RequestOptions } from '../internal/request-options';
|
|
6
7
|
import { path } from '../internal/utils/path';
|
|
7
8
|
|
|
8
9
|
export class ReplaySettings extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* List the replay configurations on this account. Supports cursor pagination via
|
|
12
|
+
* `limit` and `cursor`. Replay settings control which domains may capture session
|
|
13
|
+
* replays and where the capture script is hosted. Requires scope:
|
|
14
|
+
* replaySettings:list
|
|
15
|
+
*/
|
|
16
|
+
list(
|
|
17
|
+
query: ReplaySettingListParams | null | undefined = {},
|
|
18
|
+
options?: RequestOptions,
|
|
19
|
+
): PagePromise<ReplaySettingListResponsesCursor, ReplaySettingListResponse> {
|
|
20
|
+
return this._client.getAPIList('/rest/v1/replay-settings', Cursor<ReplaySettingListResponse>, {
|
|
21
|
+
query,
|
|
22
|
+
...options,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
9
26
|
/**
|
|
10
27
|
* Create the replay configuration for this account. Each account is limited to one
|
|
11
28
|
* replay configuration — calls made when one already exists return HTTP 409 with
|
|
@@ -37,15 +54,6 @@ export class ReplaySettings extends APIResource {
|
|
|
37
54
|
return this._client.patch(path`/rest/v1/replay-settings/${id}`, { body, ...options });
|
|
38
55
|
}
|
|
39
56
|
|
|
40
|
-
/**
|
|
41
|
-
* List the replay configurations on this account. Replay settings control which
|
|
42
|
-
* domains may capture session replays and where the capture script is hosted.
|
|
43
|
-
* Requires scope: replaySettings:list
|
|
44
|
-
*/
|
|
45
|
-
list(options?: RequestOptions): APIPromise<ReplaySettingListResponse> {
|
|
46
|
-
return this._client.get('/rest/v1/replay-settings', options);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
57
|
/**
|
|
50
58
|
* Delete the replay configuration. Capture stops immediately for all whitelisted
|
|
51
59
|
* domains. Requires scope: replaySettings:delete
|
|
@@ -55,6 +63,51 @@ export class ReplaySettings extends APIResource {
|
|
|
55
63
|
}
|
|
56
64
|
}
|
|
57
65
|
|
|
66
|
+
export type ReplaySettingListResponsesCursor = Cursor<ReplaySettingListResponse>;
|
|
67
|
+
|
|
68
|
+
export interface ReplaySettingListResponse {
|
|
69
|
+
/**
|
|
70
|
+
* Stable identifier (UUID) for this replay configuration.
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* ISO-8601 timestamp when this configuration was created.
|
|
76
|
+
*/
|
|
77
|
+
createdAt: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Human-readable label for this replay configuration. Shown in the dashboard. May
|
|
81
|
+
* be empty.
|
|
82
|
+
*/
|
|
83
|
+
name: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Whether session replay capture is currently active. Set to "Enabled" to start
|
|
87
|
+
* capturing replays from whitelisted domains, or "Disabled" to pause capture
|
|
88
|
+
* without losing the configuration.
|
|
89
|
+
*/
|
|
90
|
+
status: 'Disabled' | 'Enabled';
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Optional custom domain (CNAME) for hosting the replay capture script. Leave null
|
|
94
|
+
* to use the default Ours Privacy domain.
|
|
95
|
+
*/
|
|
96
|
+
customDomain?: string | null;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* ISO-8601 timestamp of the most recent update, or null if never updated.
|
|
100
|
+
*/
|
|
101
|
+
updatedAt?: string | null;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Hostnames where session replay capture is permitted. Replays initiated from any
|
|
105
|
+
* host not in this list are dropped. PATCH replaces the list — partial updates are
|
|
106
|
+
* not merged.
|
|
107
|
+
*/
|
|
108
|
+
whitelistDomains?: Array<string> | null;
|
|
109
|
+
}
|
|
110
|
+
|
|
58
111
|
export interface ReplaySettingCreateResponse {
|
|
59
112
|
isSuccess: boolean;
|
|
60
113
|
|
|
@@ -114,55 +167,6 @@ export interface ReplaySettingUpdateResponse {
|
|
|
114
167
|
replaySettings?: unknown | null;
|
|
115
168
|
}
|
|
116
169
|
|
|
117
|
-
export interface ReplaySettingListResponse {
|
|
118
|
-
entities: Array<ReplaySettingListResponse.Entity>;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export namespace ReplaySettingListResponse {
|
|
122
|
-
export interface Entity {
|
|
123
|
-
/**
|
|
124
|
-
* Stable identifier (UUID) for this replay configuration.
|
|
125
|
-
*/
|
|
126
|
-
id: string;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* ISO-8601 timestamp when this configuration was created.
|
|
130
|
-
*/
|
|
131
|
-
createdAt: string;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Human-readable label for this replay configuration. Shown in the dashboard. May
|
|
135
|
-
* be empty.
|
|
136
|
-
*/
|
|
137
|
-
name: string;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Whether session replay capture is currently active. Set to "Enabled" to start
|
|
141
|
-
* capturing replays from whitelisted domains, or "Disabled" to pause capture
|
|
142
|
-
* without losing the configuration.
|
|
143
|
-
*/
|
|
144
|
-
status: 'Disabled' | 'Enabled';
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Optional custom domain (CNAME) for hosting the replay capture script. Leave null
|
|
148
|
-
* to use the default Ours Privacy domain.
|
|
149
|
-
*/
|
|
150
|
-
customDomain?: string | null;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* ISO-8601 timestamp of the most recent update, or null if never updated.
|
|
154
|
-
*/
|
|
155
|
-
updatedAt?: string | null;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Hostnames where session replay capture is permitted. Replays initiated from any
|
|
159
|
-
* host not in this list are dropped. PATCH replaces the list — partial updates are
|
|
160
|
-
* not merged.
|
|
161
|
-
*/
|
|
162
|
-
whitelistDomains?: Array<string> | null;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
170
|
export interface ReplaySettingDeleteResponse {
|
|
167
171
|
isSuccess: boolean;
|
|
168
172
|
|
|
@@ -171,6 +175,8 @@ export interface ReplaySettingDeleteResponse {
|
|
|
171
175
|
replaySettings?: unknown | null;
|
|
172
176
|
}
|
|
173
177
|
|
|
178
|
+
export interface ReplaySettingListParams extends CursorParams {}
|
|
179
|
+
|
|
174
180
|
export interface ReplaySettingCreateParams {
|
|
175
181
|
/**
|
|
176
182
|
* Optional custom domain (CNAME) for hosting the replay capture script. Leave null
|
|
@@ -229,11 +235,13 @@ export interface ReplaySettingUpdateParams {
|
|
|
229
235
|
|
|
230
236
|
export declare namespace ReplaySettings {
|
|
231
237
|
export {
|
|
238
|
+
type ReplaySettingListResponse as ReplaySettingListResponse,
|
|
232
239
|
type ReplaySettingCreateResponse as ReplaySettingCreateResponse,
|
|
233
240
|
type ReplaySettingRetrieveResponse as ReplaySettingRetrieveResponse,
|
|
234
241
|
type ReplaySettingUpdateResponse as ReplaySettingUpdateResponse,
|
|
235
|
-
type ReplaySettingListResponse as ReplaySettingListResponse,
|
|
236
242
|
type ReplaySettingDeleteResponse as ReplaySettingDeleteResponse,
|
|
243
|
+
type ReplaySettingListResponsesCursor as ReplaySettingListResponsesCursor,
|
|
244
|
+
type ReplaySettingListParams as ReplaySettingListParams,
|
|
237
245
|
type ReplaySettingCreateParams as ReplaySettingCreateParams,
|
|
238
246
|
type ReplaySettingUpdateParams as ReplaySettingUpdateParams,
|
|
239
247
|
};
|
package/src/resources/sources.ts
CHANGED
|
@@ -6,6 +6,13 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
6
6
|
import { path } from '../internal/utils/path';
|
|
7
7
|
|
|
8
8
|
export class Sources extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List all sources. Requires scope: source:list
|
|
11
|
+
*/
|
|
12
|
+
list(options?: RequestOptions): APIPromise<SourceListResponse> {
|
|
13
|
+
return this._client.get('/rest/v1/sources', options);
|
|
14
|
+
}
|
|
15
|
+
|
|
9
16
|
/**
|
|
10
17
|
* Create a new source. Requires scope: source:create
|
|
11
18
|
*/
|
|
@@ -21,24 +28,98 @@ export class Sources extends APIResource {
|
|
|
21
28
|
}
|
|
22
29
|
|
|
23
30
|
/**
|
|
24
|
-
*
|
|
31
|
+
* Partially update a source. Only the fields you send are changed. Requires scope:
|
|
32
|
+
* source:update
|
|
25
33
|
*/
|
|
26
34
|
update(id: string, body: SourceUpdateParams, options?: RequestOptions): APIPromise<SourceUpdateResponse> {
|
|
27
35
|
return this._client.patch(path`/rest/v1/sources/${id}`, { body, ...options });
|
|
28
36
|
}
|
|
29
37
|
|
|
30
38
|
/**
|
|
31
|
-
*
|
|
39
|
+
* Delete a source. Requires scope: source:delete
|
|
32
40
|
*/
|
|
33
|
-
|
|
34
|
-
return this._client.
|
|
41
|
+
delete(id: string, options?: RequestOptions): APIPromise<SourceDeleteResponse> {
|
|
42
|
+
return this._client.delete(path`/rest/v1/sources/${id}`, options);
|
|
35
43
|
}
|
|
36
44
|
|
|
37
45
|
/**
|
|
38
|
-
*
|
|
46
|
+
* Fetch install tokens and snippets for a source. Requires scope: source:view
|
|
39
47
|
*/
|
|
40
|
-
|
|
41
|
-
return this._client.
|
|
48
|
+
tokens(id: string, options?: RequestOptions): APIPromise<SourceTokensResponse> {
|
|
49
|
+
return this._client.get(path`/rest/v1/sources/${id}/tokens`, options);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface SourceListResponse {
|
|
54
|
+
entities: Array<SourceListResponse.Entity>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export namespace SourceListResponse {
|
|
58
|
+
export interface Entity {
|
|
59
|
+
id: string;
|
|
60
|
+
|
|
61
|
+
createdAt: string;
|
|
62
|
+
|
|
63
|
+
status: 'Disabled' | 'Enabled';
|
|
64
|
+
|
|
65
|
+
type:
|
|
66
|
+
| 'AlchemerWebhook'
|
|
67
|
+
| 'AndroidNativeApi'
|
|
68
|
+
| 'CSharpApi'
|
|
69
|
+
| 'CalComWebhooks'
|
|
70
|
+
| 'CalendlyWebhook'
|
|
71
|
+
| 'CallRail'
|
|
72
|
+
| 'CallTrackingMetrics'
|
|
73
|
+
| 'DotNetApi'
|
|
74
|
+
| 'FacebookLeadAds'
|
|
75
|
+
| 'FormsortWebhooks'
|
|
76
|
+
| 'Formstack'
|
|
77
|
+
| 'GoLangApi'
|
|
78
|
+
| 'HTTPApiSource'
|
|
79
|
+
| 'Healthie'
|
|
80
|
+
| 'HubspotAppActions'
|
|
81
|
+
| 'HubspotFormWebhook'
|
|
82
|
+
| 'JotFormWebhooks'
|
|
83
|
+
| 'KotlinApi'
|
|
84
|
+
| 'NodejsApi'
|
|
85
|
+
| 'PHPApi'
|
|
86
|
+
| 'PixelImage'
|
|
87
|
+
| 'PythonApi'
|
|
88
|
+
| 'ReactNativeApi'
|
|
89
|
+
| 'RedirectSource'
|
|
90
|
+
| 'RubyApi'
|
|
91
|
+
| 'SegmentWebPlugin'
|
|
92
|
+
| 'TypeformWebhooks'
|
|
93
|
+
| 'WebSource'
|
|
94
|
+
| 'Webhook'
|
|
95
|
+
| 'WhatConverts'
|
|
96
|
+
| 'iOSNativeApi';
|
|
97
|
+
|
|
98
|
+
botControlMode?: string | null;
|
|
99
|
+
|
|
100
|
+
botScoreThreshold?: number | null;
|
|
101
|
+
|
|
102
|
+
excludeRequestContext?: boolean | null;
|
|
103
|
+
|
|
104
|
+
name?: string | null;
|
|
105
|
+
|
|
106
|
+
probabilisticIdentity?: unknown | null;
|
|
107
|
+
|
|
108
|
+
projectAPIKey?: string | null;
|
|
109
|
+
|
|
110
|
+
redirectUrl?: string | null;
|
|
111
|
+
|
|
112
|
+
selectedAccountId?: string | null;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Optional domain allowlist for source event ingestion. When set, only requests
|
|
116
|
+
* from these domains are accepted for this source. This is separate from
|
|
117
|
+
* experimentation settings `whitelistDomains`, which gates experiment SDK
|
|
118
|
+
* delivery.
|
|
119
|
+
*/
|
|
120
|
+
whitelistDomains?: Array<string> | null;
|
|
121
|
+
|
|
122
|
+
whitelistIps?: Array<string> | null;
|
|
42
123
|
}
|
|
43
124
|
}
|
|
44
125
|
|
|
@@ -141,6 +222,12 @@ export interface SourceRetrieveResponse {
|
|
|
141
222
|
|
|
142
223
|
selectedAccountId?: string | null;
|
|
143
224
|
|
|
225
|
+
/**
|
|
226
|
+
* Optional domain allowlist for source event ingestion. When set, only requests
|
|
227
|
+
* from these domains are accepted for this source. This is separate from
|
|
228
|
+
* experimentation settings `whitelistDomains`, which gates experiment SDK
|
|
229
|
+
* delivery.
|
|
230
|
+
*/
|
|
144
231
|
whitelistDomains?: Array<string> | null;
|
|
145
232
|
|
|
146
233
|
whitelistIps?: Array<string> | null;
|
|
@@ -189,75 +276,32 @@ export interface SourceUpdateResponse {
|
|
|
189
276
|
name?: string | null;
|
|
190
277
|
}
|
|
191
278
|
|
|
192
|
-
export
|
|
193
|
-
entities: Array<SourceListResponse.Entity>;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export namespace SourceListResponse {
|
|
197
|
-
export interface Entity {
|
|
198
|
-
id: string;
|
|
199
|
-
|
|
200
|
-
createdAt: string;
|
|
201
|
-
|
|
202
|
-
status: 'Disabled' | 'Enabled';
|
|
203
|
-
|
|
204
|
-
type:
|
|
205
|
-
| 'AlchemerWebhook'
|
|
206
|
-
| 'AndroidNativeApi'
|
|
207
|
-
| 'CSharpApi'
|
|
208
|
-
| 'CalComWebhooks'
|
|
209
|
-
| 'CalendlyWebhook'
|
|
210
|
-
| 'CallRail'
|
|
211
|
-
| 'CallTrackingMetrics'
|
|
212
|
-
| 'DotNetApi'
|
|
213
|
-
| 'FacebookLeadAds'
|
|
214
|
-
| 'FormsortWebhooks'
|
|
215
|
-
| 'Formstack'
|
|
216
|
-
| 'GoLangApi'
|
|
217
|
-
| 'HTTPApiSource'
|
|
218
|
-
| 'Healthie'
|
|
219
|
-
| 'HubspotAppActions'
|
|
220
|
-
| 'HubspotFormWebhook'
|
|
221
|
-
| 'JotFormWebhooks'
|
|
222
|
-
| 'KotlinApi'
|
|
223
|
-
| 'NodejsApi'
|
|
224
|
-
| 'PHPApi'
|
|
225
|
-
| 'PixelImage'
|
|
226
|
-
| 'PythonApi'
|
|
227
|
-
| 'ReactNativeApi'
|
|
228
|
-
| 'RedirectSource'
|
|
229
|
-
| 'RubyApi'
|
|
230
|
-
| 'SegmentWebPlugin'
|
|
231
|
-
| 'TypeformWebhooks'
|
|
232
|
-
| 'WebSource'
|
|
233
|
-
| 'Webhook'
|
|
234
|
-
| 'WhatConverts'
|
|
235
|
-
| 'iOSNativeApi';
|
|
236
|
-
|
|
237
|
-
botControlMode?: string | null;
|
|
238
|
-
|
|
239
|
-
botScoreThreshold?: number | null;
|
|
240
|
-
|
|
241
|
-
excludeRequestContext?: boolean | null;
|
|
242
|
-
|
|
243
|
-
name?: string | null;
|
|
244
|
-
|
|
245
|
-
probabilisticIdentity?: unknown | null;
|
|
246
|
-
|
|
247
|
-
projectAPIKey?: string | null;
|
|
279
|
+
export type SourceDeleteResponse = boolean;
|
|
248
280
|
|
|
249
|
-
|
|
281
|
+
export interface SourceTokensResponse {
|
|
282
|
+
/**
|
|
283
|
+
* Install token for the source.
|
|
284
|
+
*/
|
|
285
|
+
token: string;
|
|
250
286
|
|
|
251
|
-
|
|
287
|
+
/**
|
|
288
|
+
* Ready-to-paste install snippet for the production token, including linked
|
|
289
|
+
* runtime tokens for supported modules.
|
|
290
|
+
*/
|
|
291
|
+
installScript: string;
|
|
252
292
|
|
|
253
|
-
|
|
293
|
+
/**
|
|
294
|
+
* Ready-to-paste install snippet for the test token, suitable for validation
|
|
295
|
+
* before a live install.
|
|
296
|
+
*/
|
|
297
|
+
testInstallScript: string;
|
|
254
298
|
|
|
255
|
-
|
|
256
|
-
|
|
299
|
+
/**
|
|
300
|
+
* Test-mode token derived from `token`.
|
|
301
|
+
*/
|
|
302
|
+
testToken: string;
|
|
257
303
|
}
|
|
258
304
|
|
|
259
|
-
export type SourceDeleteResponse = boolean;
|
|
260
|
-
|
|
261
305
|
export interface SourceCreateParams {
|
|
262
306
|
type:
|
|
263
307
|
| 'AlchemerWebhook'
|
|
@@ -321,11 +365,12 @@ export interface SourceUpdateParams {
|
|
|
321
365
|
|
|
322
366
|
export declare namespace Sources {
|
|
323
367
|
export {
|
|
368
|
+
type SourceListResponse as SourceListResponse,
|
|
324
369
|
type SourceCreateResponse as SourceCreateResponse,
|
|
325
370
|
type SourceRetrieveResponse as SourceRetrieveResponse,
|
|
326
371
|
type SourceUpdateResponse as SourceUpdateResponse,
|
|
327
|
-
type SourceListResponse as SourceListResponse,
|
|
328
372
|
type SourceDeleteResponse as SourceDeleteResponse,
|
|
373
|
+
type SourceTokensResponse as SourceTokensResponse,
|
|
329
374
|
type SourceCreateParams as SourceCreateParams,
|
|
330
375
|
type SourceUpdateParams as SourceUpdateParams,
|
|
331
376
|
};
|