@oursprivacy/platform-sdk 1.15.1 → 1.17.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 +17 -0
- package/client.d.mts +5 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -2
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/destinations.d.mts +5 -5
- package/resources/destinations.d.mts.map +1 -1
- package/resources/destinations.d.ts +5 -5
- package/resources/destinations.d.ts.map +1 -1
- package/resources/experiment-settings.d.mts +35 -21
- package/resources/experiment-settings.d.mts.map +1 -1
- package/resources/experiment-settings.d.ts +35 -21
- package/resources/experiment-settings.d.ts.map +1 -1
- package/resources/experiment-variants.d.mts +28 -7
- package/resources/experiment-variants.d.mts.map +1 -1
- package/resources/experiment-variants.d.ts +28 -7
- package/resources/experiment-variants.d.ts.map +1 -1
- package/resources/experiments.d.mts +160 -17
- package/resources/experiments.d.mts.map +1 -1
- package/resources/experiments.d.ts +160 -17
- package/resources/experiments.d.ts.map +1 -1
- package/resources/experiments.js +25 -2
- package/resources/experiments.js.map +1 -1
- package/resources/experiments.mjs +25 -2
- package/resources/experiments.mjs.map +1 -1
- package/resources/heatmap-pages.d.mts +193 -0
- package/resources/heatmap-pages.d.mts.map +1 -0
- package/resources/heatmap-pages.d.ts +193 -0
- package/resources/heatmap-pages.d.ts.map +1 -0
- package/resources/heatmap-pages.js +41 -0
- package/resources/heatmap-pages.js.map +1 -0
- package/resources/heatmap-pages.mjs +37 -0
- package/resources/heatmap-pages.mjs.map +1 -0
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/sources.d.mts +6 -8
- package/resources/sources.d.mts.map +1 -1
- package/resources/sources.d.ts +6 -8
- package/resources/sources.d.ts.map +1 -1
- package/resources/versions.d.mts +24 -8
- package/resources/versions.d.mts.map +1 -1
- package/resources/versions.d.ts +24 -8
- package/resources/versions.d.ts.map +1 -1
- package/resources/versions.js +24 -8
- package/resources/versions.js.map +1 -1
- package/resources/versions.mjs +24 -8
- package/resources/versions.mjs.map +1 -1
- package/src/client.ts +23 -0
- package/src/resources/destinations.ts +5 -0
- package/src/resources/experiment-settings.ts +35 -21
- package/src/resources/experiment-variants.ts +28 -7
- package/src/resources/experiments.ts +182 -16
- package/src/resources/heatmap-pages.ts +259 -0
- package/src/resources/index.ts +10 -0
- package/src/resources/sources.ts +6 -8
- package/src/resources/versions.ts +24 -8
- 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
package/src/client.ts
CHANGED
|
@@ -86,6 +86,8 @@ import {
|
|
|
86
86
|
ExperimentResumeParams,
|
|
87
87
|
ExperimentResumeResponse,
|
|
88
88
|
ExperimentRetrieveResponse,
|
|
89
|
+
ExperimentSessionReplaysParams,
|
|
90
|
+
ExperimentSessionReplaysResponse,
|
|
89
91
|
ExperimentStartParams,
|
|
90
92
|
ExperimentStartResponse,
|
|
91
93
|
ExperimentStopParams,
|
|
@@ -106,6 +108,14 @@ import {
|
|
|
106
108
|
GlobalDispatchCenterUpdateResponse,
|
|
107
109
|
GlobalDispatchCenters,
|
|
108
110
|
} from './resources/global-dispatch-centers';
|
|
111
|
+
import {
|
|
112
|
+
HeatmapPageListParams,
|
|
113
|
+
HeatmapPageListResponse,
|
|
114
|
+
HeatmapPageListResponsesCursor,
|
|
115
|
+
HeatmapPageSummaryParams,
|
|
116
|
+
HeatmapPageSummaryResponse,
|
|
117
|
+
HeatmapPages,
|
|
118
|
+
} from './resources/heatmap-pages';
|
|
109
119
|
import {
|
|
110
120
|
MappingCreateParams,
|
|
111
121
|
MappingCreateResponse,
|
|
@@ -899,6 +909,7 @@ export class OursPrivacyPlatform {
|
|
|
899
909
|
experimentVariants: API.ExperimentVariants = new API.ExperimentVariants(this);
|
|
900
910
|
experiments: API.Experiments = new API.Experiments(this);
|
|
901
911
|
globalDispatchCenters: API.GlobalDispatchCenters = new API.GlobalDispatchCenters(this);
|
|
912
|
+
heatmapPages: API.HeatmapPages = new API.HeatmapPages(this);
|
|
902
913
|
mappings: API.Mappings = new API.Mappings(this);
|
|
903
914
|
replaySettings: API.ReplaySettings = new API.ReplaySettings(this);
|
|
904
915
|
sources: API.Sources = new API.Sources(this);
|
|
@@ -912,6 +923,7 @@ OursPrivacyPlatform.ExperimentSettings = ExperimentSettings;
|
|
|
912
923
|
OursPrivacyPlatform.ExperimentVariants = ExperimentVariants;
|
|
913
924
|
OursPrivacyPlatform.Experiments = Experiments;
|
|
914
925
|
OursPrivacyPlatform.GlobalDispatchCenters = GlobalDispatchCenters;
|
|
926
|
+
OursPrivacyPlatform.HeatmapPages = HeatmapPages;
|
|
915
927
|
OursPrivacyPlatform.Mappings = Mappings;
|
|
916
928
|
OursPrivacyPlatform.ReplaySettings = ReplaySettings;
|
|
917
929
|
OursPrivacyPlatform.Sources = Sources;
|
|
@@ -992,6 +1004,7 @@ export declare namespace OursPrivacyPlatform {
|
|
|
992
1004
|
type ExperimentResumeResponse as ExperimentResumeResponse,
|
|
993
1005
|
type ExperimentResultsResponse as ExperimentResultsResponse,
|
|
994
1006
|
type ExperimentResultsTimeSeriesResponse as ExperimentResultsTimeSeriesResponse,
|
|
1007
|
+
type ExperimentSessionReplaysResponse as ExperimentSessionReplaysResponse,
|
|
995
1008
|
type ExperimentListResponsesCursor as ExperimentListResponsesCursor,
|
|
996
1009
|
type ExperimentListParams as ExperimentListParams,
|
|
997
1010
|
type ExperimentCreateParams as ExperimentCreateParams,
|
|
@@ -1002,6 +1015,7 @@ export declare namespace OursPrivacyPlatform {
|
|
|
1002
1015
|
type ExperimentResumeParams as ExperimentResumeParams,
|
|
1003
1016
|
type ExperimentResultsParams as ExperimentResultsParams,
|
|
1004
1017
|
type ExperimentResultsTimeSeriesParams as ExperimentResultsTimeSeriesParams,
|
|
1018
|
+
type ExperimentSessionReplaysParams as ExperimentSessionReplaysParams,
|
|
1005
1019
|
};
|
|
1006
1020
|
|
|
1007
1021
|
export {
|
|
@@ -1017,6 +1031,15 @@ export declare namespace OursPrivacyPlatform {
|
|
|
1017
1031
|
type GlobalDispatchCenterUpdateParams as GlobalDispatchCenterUpdateParams,
|
|
1018
1032
|
};
|
|
1019
1033
|
|
|
1034
|
+
export {
|
|
1035
|
+
HeatmapPages as HeatmapPages,
|
|
1036
|
+
type HeatmapPageListResponse as HeatmapPageListResponse,
|
|
1037
|
+
type HeatmapPageSummaryResponse as HeatmapPageSummaryResponse,
|
|
1038
|
+
type HeatmapPageListResponsesCursor as HeatmapPageListResponsesCursor,
|
|
1039
|
+
type HeatmapPageListParams as HeatmapPageListParams,
|
|
1040
|
+
type HeatmapPageSummaryParams as HeatmapPageSummaryParams,
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1020
1043
|
export {
|
|
1021
1044
|
Mappings as Mappings,
|
|
1022
1045
|
type MappingListResponse as MappingListResponse,
|
|
@@ -81,6 +81,7 @@ export namespace DestinationListResponse {
|
|
|
81
81
|
| 'ConvertABTestingEvent'
|
|
82
82
|
| 'Customerio'
|
|
83
83
|
| 'DomoWarehouse'
|
|
84
|
+
| 'Everflow'
|
|
84
85
|
| 'Facebook'
|
|
85
86
|
| 'FloodlightSGTM'
|
|
86
87
|
| 'FullContact'
|
|
@@ -194,6 +195,7 @@ export interface DestinationCreateResponse {
|
|
|
194
195
|
| 'ConvertABTestingEvent'
|
|
195
196
|
| 'Customerio'
|
|
196
197
|
| 'DomoWarehouse'
|
|
198
|
+
| 'Everflow'
|
|
197
199
|
| 'Facebook'
|
|
198
200
|
| 'FloodlightSGTM'
|
|
199
201
|
| 'FullContact'
|
|
@@ -280,6 +282,7 @@ export interface DestinationRetrieveResponse {
|
|
|
280
282
|
| 'ConvertABTestingEvent'
|
|
281
283
|
| 'Customerio'
|
|
282
284
|
| 'DomoWarehouse'
|
|
285
|
+
| 'Everflow'
|
|
283
286
|
| 'Facebook'
|
|
284
287
|
| 'FloodlightSGTM'
|
|
285
288
|
| 'FullContact'
|
|
@@ -392,6 +395,7 @@ export interface DestinationUpdateResponse {
|
|
|
392
395
|
| 'ConvertABTestingEvent'
|
|
393
396
|
| 'Customerio'
|
|
394
397
|
| 'DomoWarehouse'
|
|
398
|
+
| 'Everflow'
|
|
395
399
|
| 'Facebook'
|
|
396
400
|
| 'FloodlightSGTM'
|
|
397
401
|
| 'FullContact'
|
|
@@ -474,6 +478,7 @@ export interface DestinationCreateParams {
|
|
|
474
478
|
| 'ConvertABTestingEvent'
|
|
475
479
|
| 'Customerio'
|
|
476
480
|
| 'DomoWarehouse'
|
|
481
|
+
| 'Everflow'
|
|
477
482
|
| 'Facebook'
|
|
478
483
|
| 'FloodlightSGTM'
|
|
479
484
|
| 'FullContact'
|
|
@@ -132,9 +132,11 @@ export namespace ExperimentSettingListResponse {
|
|
|
132
132
|
updatedByUserId?: string | null;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
135
|
+
* Limits which domains can load your experiments. When set, experiments using this
|
|
136
|
+
* settings record are only served on these domains; the SDK refuses to load
|
|
137
|
+
* anywhere else and your experiments never run on those hosts. Separate from
|
|
138
|
+
* source `whitelistDomains`, which limits which domains can send events to the
|
|
139
|
+
* CDP.
|
|
138
140
|
*/
|
|
139
141
|
whitelistDomains?: Array<string> | null;
|
|
140
142
|
}
|
|
@@ -176,9 +178,11 @@ export interface ExperimentSettingCreateResponse {
|
|
|
176
178
|
updatedByUserId?: string | null;
|
|
177
179
|
|
|
178
180
|
/**
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
181
|
+
* Limits which domains can load your experiments. When set, experiments using this
|
|
182
|
+
* settings record are only served on these domains; the SDK refuses to load
|
|
183
|
+
* anywhere else and your experiments never run on those hosts. Separate from
|
|
184
|
+
* source `whitelistDomains`, which limits which domains can send events to the
|
|
185
|
+
* CDP.
|
|
182
186
|
*/
|
|
183
187
|
whitelistDomains?: Array<string> | null;
|
|
184
188
|
}
|
|
@@ -219,9 +223,11 @@ export interface ExperimentSettingRetrieveResponse {
|
|
|
219
223
|
updatedByUserId?: string | null;
|
|
220
224
|
|
|
221
225
|
/**
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
226
|
+
* Limits which domains can load your experiments. When set, experiments using this
|
|
227
|
+
* settings record are only served on these domains; the SDK refuses to load
|
|
228
|
+
* anywhere else and your experiments never run on those hosts. Separate from
|
|
229
|
+
* source `whitelistDomains`, which limits which domains can send events to the
|
|
230
|
+
* CDP.
|
|
225
231
|
*/
|
|
226
232
|
whitelistDomains?: Array<string> | null;
|
|
227
233
|
}
|
|
@@ -262,9 +268,11 @@ export interface ExperimentSettingUpdateResponse {
|
|
|
262
268
|
updatedByUserId?: string | null;
|
|
263
269
|
|
|
264
270
|
/**
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
271
|
+
* Limits which domains can load your experiments. When set, experiments using this
|
|
272
|
+
* settings record are only served on these domains; the SDK refuses to load
|
|
273
|
+
* anywhere else and your experiments never run on those hosts. Separate from
|
|
274
|
+
* source `whitelistDomains`, which limits which domains can send events to the
|
|
275
|
+
* CDP.
|
|
268
276
|
*/
|
|
269
277
|
whitelistDomains?: Array<string> | null;
|
|
270
278
|
}
|
|
@@ -305,9 +313,11 @@ export interface ExperimentSettingDeleteResponse {
|
|
|
305
313
|
updatedByUserId?: string | null;
|
|
306
314
|
|
|
307
315
|
/**
|
|
308
|
-
*
|
|
309
|
-
*
|
|
310
|
-
*
|
|
316
|
+
* Limits which domains can load your experiments. When set, experiments using this
|
|
317
|
+
* settings record are only served on these domains; the SDK refuses to load
|
|
318
|
+
* anywhere else and your experiments never run on those hosts. Separate from
|
|
319
|
+
* source `whitelistDomains`, which limits which domains can send events to the
|
|
320
|
+
* CDP.
|
|
311
321
|
*/
|
|
312
322
|
whitelistDomains?: Array<string> | null;
|
|
313
323
|
}
|
|
@@ -326,9 +336,11 @@ export interface ExperimentSettingCreateParams {
|
|
|
326
336
|
name?: string | null;
|
|
327
337
|
|
|
328
338
|
/**
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
339
|
+
* Limits which domains can load your experiments. When set, experiments using this
|
|
340
|
+
* settings record are only served on these domains; the SDK refuses to load
|
|
341
|
+
* anywhere else and your experiments never run on those hosts. Separate from
|
|
342
|
+
* source `whitelistDomains`, which limits which domains can send events to the
|
|
343
|
+
* CDP.
|
|
332
344
|
*/
|
|
333
345
|
whitelistDomains?: Array<string> | null;
|
|
334
346
|
}
|
|
@@ -347,9 +359,11 @@ export interface ExperimentSettingUpdateParams {
|
|
|
347
359
|
name?: string | null;
|
|
348
360
|
|
|
349
361
|
/**
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
362
|
+
* Limits which domains can load your experiments. When set, experiments using this
|
|
363
|
+
* settings record are only served on these domains; the SDK refuses to load
|
|
364
|
+
* anywhere else and your experiments never run on those hosts. Separate from
|
|
365
|
+
* source `whitelistDomains`, which limits which domains can send events to the
|
|
366
|
+
* CDP.
|
|
353
367
|
*/
|
|
354
368
|
whitelistDomains?: Array<string> | null;
|
|
355
369
|
}
|
|
@@ -689,8 +689,14 @@ export interface ExperimentVariantCreateParams {
|
|
|
689
689
|
redirectUrl?: string | null;
|
|
690
690
|
|
|
691
691
|
/**
|
|
692
|
-
* Variant
|
|
693
|
-
* for
|
|
692
|
+
* Variant delivery mechanism. `dom_modifications` mutates the current page
|
|
693
|
+
* in-place at SDK runtime — use it for copy/style/image/HTML changes that keep
|
|
694
|
+
* visitors on the same URL (headline copy tests, button color, hero image swap).
|
|
695
|
+
* `redirect` routes the visitor to a different URL entirely — use it for
|
|
696
|
+
* landing-page A/B tests, alternate pricing pages, or any test where the _page
|
|
697
|
+
* itself_ is the variable. They are not interchangeable: a redirect variant cannot
|
|
698
|
+
* also tweak DOM, and a dom_modifications variant cannot send the visitor
|
|
699
|
+
* elsewhere.
|
|
694
700
|
*/
|
|
695
701
|
variantType?: 'dom_modifications' | 'redirect' | null;
|
|
696
702
|
}
|
|
@@ -713,7 +719,14 @@ export namespace ExperimentVariantCreateParams {
|
|
|
713
719
|
| 'setText';
|
|
714
720
|
|
|
715
721
|
/**
|
|
716
|
-
* CSS selector
|
|
722
|
+
* CSS selector for the element to modify at runtime. PREFER specific selectors
|
|
723
|
+
* that match exactly one element: an `id` (`#hero-headline`), a stable `data-*`
|
|
724
|
+
* attribute (`[data-testid="hero-headline"]`), or a unique class/structural chain
|
|
725
|
+
* (`section.hero > h1.headline`). AVOID bare tag selectors like `h1`, `button`, or
|
|
726
|
+
* `img` — modern pages usually contain several, and the runtime applies the
|
|
727
|
+
* mutation to ONLY THE FIRST match, which silently picks the wrong element. If you
|
|
728
|
+
* only have a tag name, scope it with the nearest unique ancestor (e.g. `main h1`,
|
|
729
|
+
* `header nav a:first-of-type`).
|
|
717
730
|
*/
|
|
718
731
|
selector: string;
|
|
719
732
|
|
|
@@ -781,9 +794,10 @@ export interface ExperimentVariantUpdateParams {
|
|
|
781
794
|
redirectUrl?: string | null;
|
|
782
795
|
|
|
783
796
|
/**
|
|
784
|
-
* Updated variant
|
|
785
|
-
*
|
|
786
|
-
*
|
|
797
|
+
* Updated variant delivery mechanism. `dom_modifications` mutates the current page
|
|
798
|
+
* in-place; `redirect` sends the visitor to a different URL — pick based on
|
|
799
|
+
* whether the _page_ or the _content_ is the variable. Changing this also requires
|
|
800
|
+
* updating the matching payload field (`redirectUrl` or `domModifications`).
|
|
787
801
|
*/
|
|
788
802
|
variantType?: 'dom_modifications' | 'redirect' | null;
|
|
789
803
|
|
|
@@ -812,7 +826,14 @@ export namespace ExperimentVariantUpdateParams {
|
|
|
812
826
|
| 'setText';
|
|
813
827
|
|
|
814
828
|
/**
|
|
815
|
-
* CSS selector
|
|
829
|
+
* CSS selector for the element to modify at runtime. PREFER specific selectors
|
|
830
|
+
* that match exactly one element: an `id` (`#hero-headline`), a stable `data-*`
|
|
831
|
+
* attribute (`[data-testid="hero-headline"]`), or a unique class/structural chain
|
|
832
|
+
* (`section.hero > h1.headline`). AVOID bare tag selectors like `h1`, `button`, or
|
|
833
|
+
* `img` — modern pages usually contain several, and the runtime applies the
|
|
834
|
+
* mutation to ONLY THE FIRST match, which silently picks the wrong element. If you
|
|
835
|
+
* only have a tag name, scope it with the nearest unique ancestor (e.g. `main h1`,
|
|
836
|
+
* `header nav a:first-of-type`).
|
|
816
837
|
*/
|
|
817
838
|
selector: string;
|
|
818
839
|
|
|
@@ -93,8 +93,13 @@ export class Experiments extends APIResource {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* Start an experiment.
|
|
97
|
-
*
|
|
96
|
+
* Start an experiment. By default also publishes the experiment and its variants
|
|
97
|
+
* atomically as a new version, making them live for end users — this is the
|
|
98
|
+
* canonical publish path for experiment changes. They do NOT flow through
|
|
99
|
+
* `POST /rest/v1/versions`. Pass `{ "publishAfterStart": false }` only if a
|
|
100
|
+
* separate publish is desired (e.g. bundling with non-experiment edits via a
|
|
101
|
+
* manual `POST /rest/v1/versions` afterwards). The request body is optional — send
|
|
102
|
+
* `{}` to use defaults. Requires scope: experiment:start
|
|
98
103
|
*
|
|
99
104
|
* @example
|
|
100
105
|
* ```ts
|
|
@@ -203,6 +208,29 @@ export class Experiments extends APIResource {
|
|
|
203
208
|
): APIPromise<ExperimentResultsTimeSeriesResponse> {
|
|
204
209
|
return this._client.get(path`/rest/v1/experiments/${id}/results-time-series`, { query, ...options });
|
|
205
210
|
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* List session replays for sessions in which the `$experiment_impression` event
|
|
214
|
+
* fired for this experiment. Each row is one session with the variant the visitor
|
|
215
|
+
* was assigned for that impression. Sessions are ordered newest first by session
|
|
216
|
+
* start. Filter to one variant with `variant_id`. Cursor pagination via `limit`
|
|
217
|
+
* (1–100, default 25) and `cursor`; malformed cursors return 400. Requires scope:
|
|
218
|
+
* experiment:find
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```ts
|
|
222
|
+
* const response = await client.experiments.sessionReplays(
|
|
223
|
+
* 'id',
|
|
224
|
+
* );
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
227
|
+
sessionReplays(
|
|
228
|
+
id: string,
|
|
229
|
+
query: ExperimentSessionReplaysParams | null | undefined = {},
|
|
230
|
+
options?: RequestOptions,
|
|
231
|
+
): APIPromise<ExperimentSessionReplaysResponse> {
|
|
232
|
+
return this._client.get(path`/rest/v1/experiments/${id}/session-replays`, { query, ...options });
|
|
233
|
+
}
|
|
206
234
|
}
|
|
207
235
|
|
|
208
236
|
export type ExperimentListResponsesCursor = Cursor<ExperimentListResponse>;
|
|
@@ -336,7 +364,12 @@ export namespace ExperimentListResponse {
|
|
|
336
364
|
/**
|
|
337
365
|
* Glob-style URL patterns that must match for the experiment to be eligible. Up to
|
|
338
366
|
* 200 patterns; each pattern up to 2000 characters. An empty array (or omitting
|
|
339
|
-
* the field) matches all URLs — equivalent to `[
|
|
367
|
+
* the field) matches all URLs — equivalent to `['**']`. The host(s) targeted here
|
|
368
|
+
* must also appear in the parent experiment settings' `whitelistDomains` — that
|
|
369
|
+
* allowlist is what limits which domains can load your experiments (see
|
|
370
|
+
* `GET /experiment-settings`). If the host is missing, the SDK refuses to load
|
|
371
|
+
* there and the experiment never runs, even after `POST /experiments/{id}/start`
|
|
372
|
+
* succeeds.
|
|
340
373
|
*/
|
|
341
374
|
urlPatterns: Array<string>;
|
|
342
375
|
|
|
@@ -629,7 +662,12 @@ export namespace ExperimentCreateResponse {
|
|
|
629
662
|
/**
|
|
630
663
|
* Glob-style URL patterns that must match for the experiment to be eligible. Up to
|
|
631
664
|
* 200 patterns; each pattern up to 2000 characters. An empty array (or omitting
|
|
632
|
-
* the field) matches all URLs — equivalent to `[
|
|
665
|
+
* the field) matches all URLs — equivalent to `['**']`. The host(s) targeted here
|
|
666
|
+
* must also appear in the parent experiment settings' `whitelistDomains` — that
|
|
667
|
+
* allowlist is what limits which domains can load your experiments (see
|
|
668
|
+
* `GET /experiment-settings`). If the host is missing, the SDK refuses to load
|
|
669
|
+
* there and the experiment never runs, even after `POST /experiments/{id}/start`
|
|
670
|
+
* succeeds.
|
|
633
671
|
*/
|
|
634
672
|
urlPatterns: Array<string>;
|
|
635
673
|
|
|
@@ -922,7 +960,12 @@ export namespace ExperimentRetrieveResponse {
|
|
|
922
960
|
/**
|
|
923
961
|
* Glob-style URL patterns that must match for the experiment to be eligible. Up to
|
|
924
962
|
* 200 patterns; each pattern up to 2000 characters. An empty array (or omitting
|
|
925
|
-
* the field) matches all URLs — equivalent to `[
|
|
963
|
+
* the field) matches all URLs — equivalent to `['**']`. The host(s) targeted here
|
|
964
|
+
* must also appear in the parent experiment settings' `whitelistDomains` — that
|
|
965
|
+
* allowlist is what limits which domains can load your experiments (see
|
|
966
|
+
* `GET /experiment-settings`). If the host is missing, the SDK refuses to load
|
|
967
|
+
* there and the experiment never runs, even after `POST /experiments/{id}/start`
|
|
968
|
+
* succeeds.
|
|
926
969
|
*/
|
|
927
970
|
urlPatterns: Array<string>;
|
|
928
971
|
|
|
@@ -1100,7 +1143,12 @@ export namespace ExperimentUpdateResponse {
|
|
|
1100
1143
|
/**
|
|
1101
1144
|
* Glob-style URL patterns that must match for the experiment to be eligible. Up to
|
|
1102
1145
|
* 200 patterns; each pattern up to 2000 characters. An empty array (or omitting
|
|
1103
|
-
* the field) matches all URLs — equivalent to `[
|
|
1146
|
+
* the field) matches all URLs — equivalent to `['**']`. The host(s) targeted here
|
|
1147
|
+
* must also appear in the parent experiment settings' `whitelistDomains` — that
|
|
1148
|
+
* allowlist is what limits which domains can load your experiments (see
|
|
1149
|
+
* `GET /experiment-settings`). If the host is missing, the SDK refuses to load
|
|
1150
|
+
* there and the experiment never runs, even after `POST /experiments/{id}/start`
|
|
1151
|
+
* succeeds.
|
|
1104
1152
|
*/
|
|
1105
1153
|
urlPatterns: Array<string>;
|
|
1106
1154
|
|
|
@@ -1301,7 +1349,12 @@ export namespace ExperimentStartResponse {
|
|
|
1301
1349
|
/**
|
|
1302
1350
|
* Glob-style URL patterns that must match for the experiment to be eligible. Up to
|
|
1303
1351
|
* 200 patterns; each pattern up to 2000 characters. An empty array (or omitting
|
|
1304
|
-
* the field) matches all URLs — equivalent to `[
|
|
1352
|
+
* the field) matches all URLs — equivalent to `['**']`. The host(s) targeted here
|
|
1353
|
+
* must also appear in the parent experiment settings' `whitelistDomains` — that
|
|
1354
|
+
* allowlist is what limits which domains can load your experiments (see
|
|
1355
|
+
* `GET /experiment-settings`). If the host is missing, the SDK refuses to load
|
|
1356
|
+
* there and the experiment never runs, even after `POST /experiments/{id}/start`
|
|
1357
|
+
* succeeds.
|
|
1305
1358
|
*/
|
|
1306
1359
|
urlPatterns: Array<string>;
|
|
1307
1360
|
|
|
@@ -1498,7 +1551,12 @@ export namespace ExperimentStopResponse {
|
|
|
1498
1551
|
/**
|
|
1499
1552
|
* Glob-style URL patterns that must match for the experiment to be eligible. Up to
|
|
1500
1553
|
* 200 patterns; each pattern up to 2000 characters. An empty array (or omitting
|
|
1501
|
-
* the field) matches all URLs — equivalent to `[
|
|
1554
|
+
* the field) matches all URLs — equivalent to `['**']`. The host(s) targeted here
|
|
1555
|
+
* must also appear in the parent experiment settings' `whitelistDomains` — that
|
|
1556
|
+
* allowlist is what limits which domains can load your experiments (see
|
|
1557
|
+
* `GET /experiment-settings`). If the host is missing, the SDK refuses to load
|
|
1558
|
+
* there and the experiment never runs, even after `POST /experiments/{id}/start`
|
|
1559
|
+
* succeeds.
|
|
1502
1560
|
*/
|
|
1503
1561
|
urlPatterns: Array<string>;
|
|
1504
1562
|
|
|
@@ -1695,7 +1753,12 @@ export namespace ExperimentPauseResponse {
|
|
|
1695
1753
|
/**
|
|
1696
1754
|
* Glob-style URL patterns that must match for the experiment to be eligible. Up to
|
|
1697
1755
|
* 200 patterns; each pattern up to 2000 characters. An empty array (or omitting
|
|
1698
|
-
* the field) matches all URLs — equivalent to `[
|
|
1756
|
+
* the field) matches all URLs — equivalent to `['**']`. The host(s) targeted here
|
|
1757
|
+
* must also appear in the parent experiment settings' `whitelistDomains` — that
|
|
1758
|
+
* allowlist is what limits which domains can load your experiments (see
|
|
1759
|
+
* `GET /experiment-settings`). If the host is missing, the SDK refuses to load
|
|
1760
|
+
* there and the experiment never runs, even after `POST /experiments/{id}/start`
|
|
1761
|
+
* succeeds.
|
|
1699
1762
|
*/
|
|
1700
1763
|
urlPatterns: Array<string>;
|
|
1701
1764
|
|
|
@@ -1892,7 +1955,12 @@ export namespace ExperimentResumeResponse {
|
|
|
1892
1955
|
/**
|
|
1893
1956
|
* Glob-style URL patterns that must match for the experiment to be eligible. Up to
|
|
1894
1957
|
* 200 patterns; each pattern up to 2000 characters. An empty array (or omitting
|
|
1895
|
-
* the field) matches all URLs — equivalent to `[
|
|
1958
|
+
* the field) matches all URLs — equivalent to `['**']`. The host(s) targeted here
|
|
1959
|
+
* must also appear in the parent experiment settings' `whitelistDomains` — that
|
|
1960
|
+
* allowlist is what limits which domains can load your experiments (see
|
|
1961
|
+
* `GET /experiment-settings`). If the host is missing, the SDK refuses to load
|
|
1962
|
+
* there and the experiment never runs, even after `POST /experiments/{id}/start`
|
|
1963
|
+
* succeeds.
|
|
1896
1964
|
*/
|
|
1897
1965
|
urlPatterns: Array<string>;
|
|
1898
1966
|
|
|
@@ -2024,6 +2092,69 @@ export namespace ExperimentResultsTimeSeriesResponse {
|
|
|
2024
2092
|
}
|
|
2025
2093
|
}
|
|
2026
2094
|
|
|
2095
|
+
export interface ExperimentSessionReplaysResponse {
|
|
2096
|
+
/**
|
|
2097
|
+
* Sessions in which a `$experiment_impression` event for this experiment was
|
|
2098
|
+
* recorded, ordered newest first by session start time.
|
|
2099
|
+
*/
|
|
2100
|
+
entities: Array<ExperimentSessionReplaysResponse.Entity>;
|
|
2101
|
+
|
|
2102
|
+
pagination: ExperimentSessionReplaysResponse.Pagination;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
export namespace ExperimentSessionReplaysResponse {
|
|
2106
|
+
export interface Entity {
|
|
2107
|
+
/**
|
|
2108
|
+
* Time between the first and last events recorded for this session, in whole
|
|
2109
|
+
* seconds.
|
|
2110
|
+
*/
|
|
2111
|
+
durationSeconds: number;
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* Number of distinct page paths visited during this session.
|
|
2115
|
+
*/
|
|
2116
|
+
pageCount: number;
|
|
2117
|
+
|
|
2118
|
+
/**
|
|
2119
|
+
* Deep link to the in-app replay viewer for this session. Requires an
|
|
2120
|
+
* authenticated session in the Ours Privacy app for an account that owns this
|
|
2121
|
+
* experiment — not embeddable in customer-facing emails.
|
|
2122
|
+
*/
|
|
2123
|
+
replayUrl: string;
|
|
2124
|
+
|
|
2125
|
+
/**
|
|
2126
|
+
* Session identifier (`dp_sid`). Combine with `visitorId` and the `YYYY-MM-DD`
|
|
2127
|
+
* date of `startTime` to deep-link to a replay outside of the response
|
|
2128
|
+
* `replayUrl`.
|
|
2129
|
+
*/
|
|
2130
|
+
sessionId: string;
|
|
2131
|
+
|
|
2132
|
+
/**
|
|
2133
|
+
* ISO-8601 timestamp of the first event recorded in this session. Sessions are
|
|
2134
|
+
* ordered newest first by this field.
|
|
2135
|
+
*/
|
|
2136
|
+
startTime: string;
|
|
2137
|
+
|
|
2138
|
+
/**
|
|
2139
|
+
* Human-readable name of the variant the visitor was assigned for the recorded
|
|
2140
|
+
* impression. May be empty if the variant has been deleted since the impression
|
|
2141
|
+
* fired.
|
|
2142
|
+
*/
|
|
2143
|
+
variantName: string;
|
|
2144
|
+
|
|
2145
|
+
/**
|
|
2146
|
+
* Visitor identifier whose session is recorded here.
|
|
2147
|
+
*/
|
|
2148
|
+
visitorId: string;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
export interface Pagination {
|
|
2152
|
+
hasMore: boolean;
|
|
2153
|
+
|
|
2154
|
+
nextCursor?: string | null;
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2027
2158
|
export interface ExperimentListParams extends CursorParams {
|
|
2028
2159
|
/**
|
|
2029
2160
|
* Optional case-insensitive text search matched against experiment ID, name, and
|
|
@@ -2155,7 +2286,12 @@ export namespace ExperimentCreateParams {
|
|
|
2155
2286
|
/**
|
|
2156
2287
|
* Glob-style URL patterns that must match for the experiment to be eligible. Up to
|
|
2157
2288
|
* 200 patterns; each pattern up to 2000 characters. An empty array (or omitting
|
|
2158
|
-
* the field) matches all URLs — equivalent to `[
|
|
2289
|
+
* the field) matches all URLs — equivalent to `['**']`. The host(s) targeted here
|
|
2290
|
+
* must also appear in the parent experiment settings' `whitelistDomains` — that
|
|
2291
|
+
* allowlist is what limits which domains can load your experiments (see
|
|
2292
|
+
* `GET /experiment-settings`). If the host is missing, the SDK refuses to load
|
|
2293
|
+
* there and the experiment never runs, even after `POST /experiments/{id}/start`
|
|
2294
|
+
* succeeds.
|
|
2159
2295
|
*/
|
|
2160
2296
|
urlPatterns: Array<string>;
|
|
2161
2297
|
|
|
@@ -2302,7 +2438,12 @@ export namespace ExperimentUpdateParams {
|
|
|
2302
2438
|
/**
|
|
2303
2439
|
* Glob-style URL patterns that must match for the experiment to be eligible. Up to
|
|
2304
2440
|
* 200 patterns; each pattern up to 2000 characters. An empty array (or omitting
|
|
2305
|
-
* the field) matches all URLs — equivalent to `[
|
|
2441
|
+
* the field) matches all URLs — equivalent to `['**']`. The host(s) targeted here
|
|
2442
|
+
* must also appear in the parent experiment settings' `whitelistDomains` — that
|
|
2443
|
+
* allowlist is what limits which domains can load your experiments (see
|
|
2444
|
+
* `GET /experiment-settings`). If the host is missing, the SDK refuses to load
|
|
2445
|
+
* there and the experiment never runs, even after `POST /experiments/{id}/start`
|
|
2446
|
+
* succeeds.
|
|
2306
2447
|
*/
|
|
2307
2448
|
urlPatterns: Array<string>;
|
|
2308
2449
|
|
|
@@ -2353,10 +2494,13 @@ export namespace ExperimentUpdateParams {
|
|
|
2353
2494
|
|
|
2354
2495
|
export interface ExperimentStartParams {
|
|
2355
2496
|
/**
|
|
2356
|
-
* When true (
|
|
2357
|
-
*
|
|
2358
|
-
*
|
|
2359
|
-
*
|
|
2497
|
+
* When true (the default), atomically publish the experiment and its variants as a
|
|
2498
|
+
* new version after starting — this is the canonical publish path for experiment
|
|
2499
|
+
* changes. Any other unpublished non-experiment changes (destinations, mappings,
|
|
2500
|
+
* settings, etc.) currently in draft are included in the same publish. Pass
|
|
2501
|
+
* `false` explicitly to stage the change without publishing; the response will
|
|
2502
|
+
* report `pending_publish` and a separate `POST /rest/v1/versions` call is then
|
|
2503
|
+
* required.
|
|
2360
2504
|
*/
|
|
2361
2505
|
publishAfterStart?: boolean;
|
|
2362
2506
|
}
|
|
@@ -2419,6 +2563,26 @@ export interface ExperimentResultsTimeSeriesParams {
|
|
|
2419
2563
|
startDate?: string;
|
|
2420
2564
|
}
|
|
2421
2565
|
|
|
2566
|
+
export interface ExperimentSessionReplaysParams {
|
|
2567
|
+
/**
|
|
2568
|
+
* Opaque pagination cursor from pagination.nextCursor in the previous response. Do
|
|
2569
|
+
* not decode or modify it. Malformed cursors return 400 Bad Request.
|
|
2570
|
+
*/
|
|
2571
|
+
cursor?: string;
|
|
2572
|
+
|
|
2573
|
+
/**
|
|
2574
|
+
* Maximum number of items to return. Defaults to 25; values below 1 are clamped to
|
|
2575
|
+
* 1 and values above 100 are clamped to 100.
|
|
2576
|
+
*/
|
|
2577
|
+
limit?: number | null;
|
|
2578
|
+
|
|
2579
|
+
/**
|
|
2580
|
+
* Optional filter to a single variant ID. Returns sessions for all variants when
|
|
2581
|
+
* omitted.
|
|
2582
|
+
*/
|
|
2583
|
+
variant_id?: string;
|
|
2584
|
+
}
|
|
2585
|
+
|
|
2422
2586
|
export declare namespace Experiments {
|
|
2423
2587
|
export {
|
|
2424
2588
|
type ExperimentListResponse as ExperimentListResponse,
|
|
@@ -2432,6 +2596,7 @@ export declare namespace Experiments {
|
|
|
2432
2596
|
type ExperimentResumeResponse as ExperimentResumeResponse,
|
|
2433
2597
|
type ExperimentResultsResponse as ExperimentResultsResponse,
|
|
2434
2598
|
type ExperimentResultsTimeSeriesResponse as ExperimentResultsTimeSeriesResponse,
|
|
2599
|
+
type ExperimentSessionReplaysResponse as ExperimentSessionReplaysResponse,
|
|
2435
2600
|
type ExperimentListResponsesCursor as ExperimentListResponsesCursor,
|
|
2436
2601
|
type ExperimentListParams as ExperimentListParams,
|
|
2437
2602
|
type ExperimentCreateParams as ExperimentCreateParams,
|
|
@@ -2442,5 +2607,6 @@ export declare namespace Experiments {
|
|
|
2442
2607
|
type ExperimentResumeParams as ExperimentResumeParams,
|
|
2443
2608
|
type ExperimentResultsParams as ExperimentResultsParams,
|
|
2444
2609
|
type ExperimentResultsTimeSeriesParams as ExperimentResultsTimeSeriesParams,
|
|
2610
|
+
type ExperimentSessionReplaysParams as ExperimentSessionReplaysParams,
|
|
2445
2611
|
};
|
|
2446
2612
|
}
|