@uniformdev/context 20.75.1-alpha.16 → 20.76.2
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/dist/api/api.d.mts +216 -216
- package/dist/api/api.d.ts +216 -216
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +6 -6
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -6
- package/dist/{types-C0Mthca3.d.mts → types-DovaM4gV.d.mts} +85 -85
- package/dist/{types-C0Mthca3.d.ts → types-DovaM4gV.d.ts} +85 -85
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@ interface paths {
|
|
|
10
10
|
cookie?: never;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Fetches the optimization Manifest for a given project.
|
|
14
14
|
* If no manifest has ever been published, and an API key is used that has preview manifest permissions then the current preview manifest will be returned (in delivery format).
|
|
15
15
|
*/
|
|
16
16
|
get: {
|
|
@@ -25,7 +25,7 @@ interface paths {
|
|
|
25
25
|
};
|
|
26
26
|
requestBody?: never;
|
|
27
27
|
responses: {
|
|
28
|
-
/**
|
|
28
|
+
/** OK */
|
|
29
29
|
200: {
|
|
30
30
|
headers: {
|
|
31
31
|
[name: string]: unknown;
|
|
@@ -37,7 +37,7 @@ interface paths {
|
|
|
37
37
|
400: components["responses"]["BadRequestError"];
|
|
38
38
|
401: components["responses"]["UnauthorizedError"];
|
|
39
39
|
403: components["responses"]["ForbiddenError"];
|
|
40
|
-
/**
|
|
40
|
+
/** No manifest has ever been published, and the API key does not have preview permissions */
|
|
41
41
|
404: {
|
|
42
42
|
headers: {
|
|
43
43
|
[name: string]: unknown;
|
|
@@ -53,7 +53,7 @@ interface paths {
|
|
|
53
53
|
put?: never;
|
|
54
54
|
post?: never;
|
|
55
55
|
delete?: never;
|
|
56
|
-
/**
|
|
56
|
+
/** Handles preflight requests. This endpoint allows CORS. */
|
|
57
57
|
options: {
|
|
58
58
|
parameters: {
|
|
59
59
|
query?: never;
|
|
@@ -63,7 +63,7 @@ interface paths {
|
|
|
63
63
|
};
|
|
64
64
|
requestBody?: never;
|
|
65
65
|
responses: {
|
|
66
|
-
/**
|
|
66
|
+
/** OK */
|
|
67
67
|
204: {
|
|
68
68
|
headers: {
|
|
69
69
|
[name: string]: unknown;
|
|
@@ -83,194 +83,194 @@ interface components {
|
|
|
83
83
|
project: {
|
|
84
84
|
/**
|
|
85
85
|
* Format: uuid
|
|
86
|
-
*
|
|
86
|
+
* is not present unless getting a preview manifest
|
|
87
87
|
*/
|
|
88
88
|
id?: string;
|
|
89
|
-
/**
|
|
89
|
+
/** is not present unless getting a preview manifest */
|
|
90
90
|
name?: string;
|
|
91
|
-
/**
|
|
91
|
+
/** is not present unless getting a preview manifest */
|
|
92
92
|
ui_version?: number;
|
|
93
93
|
pz?: components["schemas"]["PersonalizationManifest"];
|
|
94
|
-
/**
|
|
94
|
+
/** A/B test settings */
|
|
95
95
|
test?: {
|
|
96
96
|
[key: string]: components["schemas"]["Test"];
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
PersonalizationManifest: {
|
|
101
|
-
/**
|
|
101
|
+
/** Map of all signals defined for personalization criteria */
|
|
102
102
|
sig?: {
|
|
103
103
|
[key: string]: components["schemas"]["Signal"];
|
|
104
104
|
};
|
|
105
|
-
/**
|
|
105
|
+
/** Map of all enrichment categories defined for personalization criteria */
|
|
106
106
|
enr?: {
|
|
107
107
|
[key: string]: components["schemas"]["EnrichmentCategory"];
|
|
108
108
|
};
|
|
109
|
-
/**
|
|
109
|
+
/** Map of all aggregate dimensions (intents or audiences) defined for personalization criteria */
|
|
110
110
|
agg?: {
|
|
111
111
|
[key: string]: components["schemas"]["AggregateDimension"];
|
|
112
112
|
};
|
|
113
|
-
/**
|
|
113
|
+
/** Percentage of visitors that will be used as a personalization control group (not shown any personalization) */
|
|
114
114
|
control?: number;
|
|
115
115
|
};
|
|
116
116
|
SignalCriteriaGroup: {
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
119
|
-
|
|
118
|
+
* Criteria type (Group of other criteria)
|
|
119
|
+
|
|
120
120
|
*/
|
|
121
121
|
type: "G";
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
* The logical operator to apply to the criteria groups
|
|
124
124
|
* & = AND
|
|
125
125
|
* | = OR
|
|
126
126
|
*
|
|
127
127
|
* Default is `&` if unspecified
|
|
128
|
-
|
|
128
|
+
|
|
129
129
|
*/
|
|
130
130
|
op?: "&" | "|";
|
|
131
|
-
/**
|
|
131
|
+
/** The criteria clauses that make up this grouping of criteria */
|
|
132
132
|
clauses: (components["schemas"]["SignalCriteriaGroup"] | components["schemas"]["SignalCriteria"])[];
|
|
133
133
|
};
|
|
134
|
-
/**
|
|
134
|
+
/** Describes a match expression on a string */
|
|
135
135
|
StringMatch: {
|
|
136
|
-
/**
|
|
136
|
+
/** The right-hand side of the match expression */
|
|
137
137
|
rhs: string;
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* The match operator
|
|
140
140
|
* '=' = exact match
|
|
141
141
|
* '~' = contains match
|
|
142
142
|
* '//' = regular expression match
|
|
143
143
|
*
|
|
144
144
|
* Any of the above can be prefixed with '!' to invert the match (i.e. != for 'not an exact match')
|
|
145
|
-
|
|
145
|
+
|
|
146
146
|
*/
|
|
147
147
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
148
|
-
/**
|
|
148
|
+
/** The case sensitivity of the match. Defaults to false if unspecified */
|
|
149
149
|
cs?: boolean;
|
|
150
150
|
} | {
|
|
151
151
|
/**
|
|
152
|
-
*
|
|
152
|
+
* The type of match to perform
|
|
153
153
|
* '*' = exists with any value
|
|
154
154
|
* '!*' = does not exist
|
|
155
|
-
|
|
155
|
+
|
|
156
156
|
*/
|
|
157
157
|
op: "*" | "!*";
|
|
158
158
|
};
|
|
159
|
-
/**
|
|
159
|
+
/** Matches a web cookie value */
|
|
160
160
|
CookieCriteria: {
|
|
161
161
|
/** @enum {string} */
|
|
162
162
|
type: "CK";
|
|
163
|
-
/**
|
|
163
|
+
/** The name of the cookie to match */
|
|
164
164
|
cookieName: string;
|
|
165
|
-
/**
|
|
165
|
+
/** The value to match the cookie against */
|
|
166
166
|
match: components["schemas"]["StringMatch"];
|
|
167
167
|
};
|
|
168
|
-
/**
|
|
168
|
+
/** Matches a URL query string parameter value */
|
|
169
169
|
QueryStringCriteria: {
|
|
170
170
|
/** @enum {string} */
|
|
171
171
|
type: "QS";
|
|
172
|
-
/**
|
|
172
|
+
/** The name of the query string parameter to match */
|
|
173
173
|
queryName: string;
|
|
174
|
-
/**
|
|
174
|
+
/** The value to match the query string parameter against */
|
|
175
175
|
match: components["schemas"]["StringMatch"];
|
|
176
176
|
};
|
|
177
|
-
/**
|
|
177
|
+
/** Matches a visitor quirk key and value */
|
|
178
178
|
QuirkCriteria: {
|
|
179
179
|
/** @enum {string} */
|
|
180
180
|
type: "QK";
|
|
181
|
-
/**
|
|
181
|
+
/** The name of the quirk key to match */
|
|
182
182
|
key: string;
|
|
183
|
-
/**
|
|
183
|
+
/** The quirk value to match against */
|
|
184
184
|
match: components["schemas"]["StringMatch"];
|
|
185
185
|
};
|
|
186
|
-
/**
|
|
186
|
+
/** Matches an analytics event name being fired */
|
|
187
187
|
EventCriteria: {
|
|
188
188
|
/** @enum {string} */
|
|
189
189
|
type: "EVT";
|
|
190
|
-
/**
|
|
190
|
+
/** How to match the event name */
|
|
191
191
|
event: components["schemas"]["StringMatch"];
|
|
192
192
|
};
|
|
193
193
|
/**
|
|
194
|
-
*
|
|
194
|
+
* Matches the current page's absolute path (i.e. /path/to/page.html)
|
|
195
195
|
* Does not include the query string or protocol and hostname (i.e. NOT https://foo.com/path/to/page.html?query=something)
|
|
196
196
|
*/
|
|
197
197
|
CurrentPageCriteria: {
|
|
198
198
|
/** @enum {string} */
|
|
199
199
|
type: "PV";
|
|
200
|
-
/**
|
|
200
|
+
/** The page/route path to match as a page that has been visited */
|
|
201
201
|
path: components["schemas"]["StringMatch"];
|
|
202
202
|
};
|
|
203
|
-
/**
|
|
203
|
+
/** Describes a match expression on a number */
|
|
204
204
|
NumberMatch: {
|
|
205
|
-
/**
|
|
205
|
+
/** The right-hand side of the match expression */
|
|
206
206
|
rhs: number;
|
|
207
207
|
/**
|
|
208
|
-
*
|
|
208
|
+
* The type of match to perform
|
|
209
209
|
* '=' = exact match
|
|
210
210
|
* '!=' = not an exact match
|
|
211
211
|
* '<' = less than match expression
|
|
212
212
|
* '>' = greater than match expression
|
|
213
|
-
|
|
213
|
+
|
|
214
214
|
*/
|
|
215
215
|
op: "=" | "<" | ">" | "!=";
|
|
216
216
|
};
|
|
217
217
|
PageViewCountCriteria: {
|
|
218
218
|
/** @enum {string} */
|
|
219
219
|
type: "PVC";
|
|
220
|
-
/**
|
|
220
|
+
/** The expression to match the page view count against */
|
|
221
221
|
match: components["schemas"]["NumberMatch"];
|
|
222
222
|
};
|
|
223
223
|
SignalCriteria: components["schemas"]["CookieCriteria"] | components["schemas"]["QueryStringCriteria"] | components["schemas"]["QuirkCriteria"] | components["schemas"]["EventCriteria"] | components["schemas"]["CurrentPageCriteria"] | components["schemas"]["PageViewCountCriteria"];
|
|
224
224
|
RootSignalCriteriaGroup: {
|
|
225
225
|
/**
|
|
226
|
-
*
|
|
227
|
-
|
|
226
|
+
* Criteria type (Group of other criteria)
|
|
227
|
+
|
|
228
228
|
*/
|
|
229
229
|
type: "G";
|
|
230
230
|
/**
|
|
231
|
-
*
|
|
231
|
+
* The logical operator to apply to the criteria groups
|
|
232
232
|
* & = AND
|
|
233
233
|
* | = OR
|
|
234
234
|
*
|
|
235
235
|
* Default is `&` if unspecified
|
|
236
|
-
* @
|
|
237
|
-
|
|
236
|
+
* @defaultValue &
|
|
237
|
+
|
|
238
238
|
*/
|
|
239
239
|
op?: "&" | "|";
|
|
240
|
-
/**
|
|
240
|
+
/** The criteria clauses that make up this grouping of criteria */
|
|
241
241
|
clauses: (components["schemas"]["SignalCriteriaGroup"] | components["schemas"]["SignalCriteria"])[];
|
|
242
242
|
};
|
|
243
243
|
Conversion: {
|
|
244
244
|
/**
|
|
245
|
-
*
|
|
246
|
-
|
|
245
|
+
* The frequency of the conversion event
|
|
246
|
+
|
|
247
247
|
*/
|
|
248
248
|
freq: "O";
|
|
249
249
|
};
|
|
250
250
|
Signal: {
|
|
251
|
-
/**
|
|
251
|
+
/** The signal strength per activation (each time its criteria are true, this score is added) */
|
|
252
252
|
str: number;
|
|
253
|
-
/**
|
|
253
|
+
/** The maximum visitor score allowed for this signal */
|
|
254
254
|
cap: number;
|
|
255
255
|
/**
|
|
256
|
-
*
|
|
256
|
+
* How long the signal's score should persist
|
|
257
257
|
* 's' = current session (expires after a period of inactivity)
|
|
258
258
|
* 'p' = permanent (expires as far in the future as possible, may be limited by browser security settings)
|
|
259
259
|
* 't' = transient (score tracks the current state of the criteria every time scores are updated)
|
|
260
|
-
|
|
260
|
+
|
|
261
261
|
*/
|
|
262
262
|
dur: "s" | "p" | "t";
|
|
263
263
|
crit: components["schemas"]["RootSignalCriteriaGroup"];
|
|
264
264
|
conversion?: components["schemas"]["Conversion"] | null;
|
|
265
265
|
};
|
|
266
266
|
EnrichmentCategory: {
|
|
267
|
-
/**
|
|
267
|
+
/** The maximum visitor score allowed for enrichment keys in this category */
|
|
268
268
|
cap: number;
|
|
269
269
|
};
|
|
270
|
-
/**
|
|
270
|
+
/** Defines an input dimension to an aggregate dimension */
|
|
271
271
|
AggregateDimensionInput: {
|
|
272
272
|
/**
|
|
273
|
-
*
|
|
273
|
+
* Dimension name to reference as an input.
|
|
274
274
|
* For enrichment inputs, use CATEGORY_KEY as the dimension.
|
|
275
275
|
* Enrichments, signals, and other aggregate dimensions may be referenced.
|
|
276
276
|
*
|
|
@@ -280,34 +280,34 @@ interface components {
|
|
|
280
280
|
*/
|
|
281
281
|
dim: string;
|
|
282
282
|
/**
|
|
283
|
-
*
|
|
283
|
+
* The sign of the input dimension controls how it affects the aggregate dimension's final score.
|
|
284
284
|
*
|
|
285
285
|
* '+' = add to the final score
|
|
286
286
|
* '-' = subtract from the final score
|
|
287
287
|
* 'c' = clear the final score (if the input dimension has any score at all, this aggregate will have no score regardless of other inputs)
|
|
288
288
|
*
|
|
289
289
|
* Default if unspecified: '+'
|
|
290
|
-
* @
|
|
291
|
-
|
|
290
|
+
* @defaultValue +
|
|
291
|
+
|
|
292
292
|
*/
|
|
293
293
|
sign?: "+" | "-" | "c";
|
|
294
294
|
};
|
|
295
|
-
/**
|
|
295
|
+
/** Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience */
|
|
296
296
|
AggregateDimension: {
|
|
297
|
-
/**
|
|
297
|
+
/** Input dimensions to the aggregate dimension */
|
|
298
298
|
inputs: components["schemas"]["AggregateDimensionInput"][];
|
|
299
299
|
};
|
|
300
300
|
Test: {
|
|
301
|
-
/**
|
|
301
|
+
/** Winning variation ID - if set, the test will not run and this variation is shown to all visitors (the test is closed) */
|
|
302
302
|
wv?: string;
|
|
303
303
|
};
|
|
304
304
|
Error: {
|
|
305
|
-
/**
|
|
305
|
+
/** Error message(s) that occurred while processing the request */
|
|
306
306
|
errorMessage?: string[] | string;
|
|
307
307
|
};
|
|
308
308
|
};
|
|
309
309
|
responses: {
|
|
310
|
-
/**
|
|
310
|
+
/** Request input validation failed */
|
|
311
311
|
BadRequestError: {
|
|
312
312
|
headers: {
|
|
313
313
|
[name: string]: unknown;
|
|
@@ -316,7 +316,7 @@ interface components {
|
|
|
316
316
|
"application/json": components["schemas"]["Error"];
|
|
317
317
|
};
|
|
318
318
|
};
|
|
319
|
-
/**
|
|
319
|
+
/** API key or token was not valid */
|
|
320
320
|
UnauthorizedError: {
|
|
321
321
|
headers: {
|
|
322
322
|
[name: string]: unknown;
|
|
@@ -325,7 +325,7 @@ interface components {
|
|
|
325
325
|
"application/json": components["schemas"]["Error"];
|
|
326
326
|
};
|
|
327
327
|
};
|
|
328
|
-
/**
|
|
328
|
+
/** Permission was denied */
|
|
329
329
|
ForbiddenError: {
|
|
330
330
|
headers: {
|
|
331
331
|
[name: string]: unknown;
|
|
@@ -334,14 +334,14 @@ interface components {
|
|
|
334
334
|
"application/json": components["schemas"]["Error"];
|
|
335
335
|
};
|
|
336
336
|
};
|
|
337
|
-
/**
|
|
337
|
+
/** Too many requests in allowed time period */
|
|
338
338
|
RateLimitError: {
|
|
339
339
|
headers: {
|
|
340
340
|
[name: string]: unknown;
|
|
341
341
|
};
|
|
342
342
|
content?: never;
|
|
343
343
|
};
|
|
344
|
-
/**
|
|
344
|
+
/** Execution error occurred */
|
|
345
345
|
InternalServerError: {
|
|
346
346
|
headers: {
|
|
347
347
|
[name: string]: unknown;
|
|
@@ -585,8 +585,8 @@ declare abstract class TransitionDataStore {
|
|
|
585
585
|
};
|
|
586
586
|
/**
|
|
587
587
|
* Updates data in the transition storage.
|
|
588
|
-
* @param commands Commands to execute against existing stored value (event based stores)
|
|
589
|
-
* @param computedValue Pre-computed new value against existing value (object based stores)
|
|
588
|
+
* @param commands - Commands to execute against existing stored value (event based stores)
|
|
589
|
+
* @param computedValue - Pre-computed new value against existing value (object based stores)
|
|
590
590
|
* @returns Resolved promise when the data has been updated
|
|
591
591
|
*/
|
|
592
592
|
updateData(commands: StorageCommands[], computedValue: VisitorData): Promise<void>;
|
|
@@ -647,7 +647,7 @@ type VisitorDataStoreOptions = {
|
|
|
647
647
|
/**
|
|
648
648
|
* Sets the default value of storage consent for new unknown visitors.
|
|
649
649
|
* If storage consent is not given, only in-memory data will be stored which is lost when the browser leaves the page.
|
|
650
|
-
* @
|
|
650
|
+
* @defaultValue false - consent is not given for new visitors until they explicitly give it with an update command
|
|
651
651
|
*/
|
|
652
652
|
defaultConsent?: boolean;
|
|
653
653
|
/**
|
|
@@ -726,7 +726,7 @@ declare class VisitorDataStore {
|
|
|
726
726
|
/**
|
|
727
727
|
* Deletes visitor data (forgetting them)
|
|
728
728
|
* In most cases you should use forget() on the Context instead of this function, which also clears the Context state.
|
|
729
|
-
* @param fromAllDevices for an identified user, whether to delete all their data (for the entire account) - true, or data for this device (sign out) - false
|
|
729
|
+
* @param fromAllDevices - for an identified user, whether to delete all their data (for the entire account) - true, or data for this device (sign out) - false
|
|
730
730
|
*/
|
|
731
731
|
delete(fromAllDevices: boolean): Promise<void>;
|
|
732
732
|
}
|
|
@@ -961,12 +961,12 @@ type DimensionMatch = {
|
|
|
961
961
|
* -: `l` is the weakest dimension in the score vector. This does not match if the dimension has no score at all.
|
|
962
962
|
*
|
|
963
963
|
* Comparison operators:
|
|
964
|
-
*
|
|
965
|
-
*
|
|
966
|
-
*
|
|
967
|
-
*
|
|
968
|
-
*
|
|
969
|
-
*
|
|
964
|
+
* `>: l` is greater than the right hand side expression
|
|
965
|
+
* `>= : l` is greater than or equal to the right hand side expression
|
|
966
|
+
* `<: l` is less than the right hand side expression
|
|
967
|
+
* `<=: l` is less than or equal to the right hand side expression
|
|
968
|
+
* `=: l` is equal to the right hand side expression
|
|
969
|
+
* `!=: l` is not equal to the right hand side expression
|
|
970
970
|
*/
|
|
971
971
|
op: '+' | '-' | '>' | '>=' | '<' | '<=' | '=' | '!=' | '^';
|
|
972
972
|
/**
|
|
@@ -1236,9 +1236,9 @@ interface ContextInstance {
|
|
|
1236
1236
|
on: Emitter<ContextEvents>['on'];
|
|
1237
1237
|
off: Emitter<ContextEvents>['off'];
|
|
1238
1238
|
};
|
|
1239
|
-
/** @deprecated */
|
|
1239
|
+
/** @deprecated Internal API for test event processing; not for public use. */
|
|
1240
1240
|
internal_processTestEvent(event: TestEvent): void;
|
|
1241
|
-
/** @deprecated */
|
|
1241
|
+
/** @deprecated Internal API for personalization event processing; not for public use. */
|
|
1242
1242
|
internal_processPersonalizationEvent(event: PersonalizationEvent): void;
|
|
1243
1243
|
/**
|
|
1244
1244
|
* Gets the current canvas data
|
|
@@ -1304,7 +1304,7 @@ declare class Context implements ContextInstance {
|
|
|
1304
1304
|
personalize<TVariant extends PersonalizedVariant<any>>(options: PersonalizeOptions<TVariant>): PersonalizedResult<TVariant>;
|
|
1305
1305
|
/**
|
|
1306
1306
|
* Forgets the visitor's data and resets the Context to its initial state.
|
|
1307
|
-
* @param fromAllDevices for an identified user, whether to delete all their data (for the entire account) - true, or data for this device (sign out) - false
|
|
1307
|
+
* @param fromAllDevices - for an identified user, whether to delete all their data (for the entire account) - true, or data for this device (sign out) - false
|
|
1308
1308
|
*/
|
|
1309
1309
|
forget(fromAllDevices: boolean): Promise<void>;
|
|
1310
1310
|
/**
|
|
@@ -1313,9 +1313,9 @@ declare class Context implements ContextInstance {
|
|
|
1313
1313
|
* Removes state from server-to-client if it came in initial state (cookies) to avoid double tracking on the client.
|
|
1314
1314
|
*/
|
|
1315
1315
|
getServerToClientTransitionState(): ServerToClientTransitionState;
|
|
1316
|
-
/** @deprecated */
|
|
1316
|
+
/** @deprecated Internal API for test event processing; not for public use. */
|
|
1317
1317
|
internal_processTestEvent(event: TestEvent): void;
|
|
1318
|
-
/** @deprecated */
|
|
1318
|
+
/** @deprecated Internal API for personalization event processing; not for public use. */
|
|
1319
1319
|
internal_processPersonalizationEvent(event: PersonalizationEvent): void;
|
|
1320
1320
|
/**
|
|
1321
1321
|
* Gets the current canvas data
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/context",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.76.2",
|
|
4
4
|
"description": "Uniform Context core package",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "d977f0afc2aa754b18053d9455e007712e712dbb"
|
|
74
74
|
}
|