@uniformdev/context 18.11.1-alpha.4 → 18.11.1-alpha.5

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.
@@ -0,0 +1,331 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ interface paths {
6
+ "/api/v2/manifest": {
7
+ /**
8
+ * Fetches the Intent Manifest for a given project.
9
+ * 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).
10
+ */
11
+ get: {
12
+ parameters: {
13
+ query: {
14
+ preview?: boolean;
15
+ projectId: string;
16
+ };
17
+ };
18
+ responses: {
19
+ /** OK */
20
+ 200: {
21
+ content: {
22
+ "application/json": components["schemas"]["ManifestV2"];
23
+ };
24
+ };
25
+ 400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
26
+ 401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
27
+ 403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
28
+ /** No manifest has ever been published, and the API key does not have preview permissions */
29
+ 404: {
30
+ content: {
31
+ "text/plain": string;
32
+ };
33
+ };
34
+ 429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
35
+ 500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
36
+ };
37
+ };
38
+ /** Handles preflight requests. This endpoint allows CORS. */
39
+ options: {
40
+ responses: {
41
+ /** OK */
42
+ 204: never;
43
+ };
44
+ };
45
+ };
46
+ }
47
+ interface components {
48
+ schemas: {
49
+ ManifestV2: {
50
+ project: {
51
+ /**
52
+ * Format: uuid
53
+ * @description is not present unless getting a preview manifest
54
+ */
55
+ id?: string;
56
+ /** @description is not present unless getting a preview manifest */
57
+ name?: string;
58
+ /** @description is not present unless getting a preview manifest */
59
+ ui_version?: number;
60
+ pz?: components["schemas"]["PersonalizationManifest"];
61
+ /** @description A/B test settings */
62
+ test?: {
63
+ [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Test"];
64
+ };
65
+ };
66
+ };
67
+ PersonalizationManifest: {
68
+ /** @description Map of all signals defined for personalization criteria */
69
+ sig?: {
70
+ [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Signal"];
71
+ };
72
+ /** @description Map of all enrichment categories defined for personalization criteria */
73
+ enr?: {
74
+ [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["EnrichmentCategory"];
75
+ };
76
+ /** @description Map of all aggregate dimensions (intents or audiences) defined for personalization criteria */
77
+ agg?: {
78
+ [key: string]: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimension"];
79
+ };
80
+ /** @description Percentage of visitors that will be used as a personalization control group (not shown any personalization) */
81
+ control?: number;
82
+ };
83
+ };
84
+ }
85
+ interface external {
86
+ "swagger.yml": {
87
+ paths: {};
88
+ components: {
89
+ schemas: {
90
+ Error: {
91
+ /** @description Error message(s) that occurred while processing the request */
92
+ errorMessage?: string[] | string;
93
+ };
94
+ };
95
+ responses: {
96
+ /** Request input validation failed */
97
+ BadRequestError: {
98
+ content: {
99
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
100
+ };
101
+ };
102
+ /** API key or token was not valid */
103
+ UnauthorizedError: {
104
+ content: {
105
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
106
+ };
107
+ };
108
+ /** Permission was denied */
109
+ ForbiddenError: {
110
+ content: {
111
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
112
+ };
113
+ };
114
+ /** Resource not found */
115
+ NotFoundError: {
116
+ content: {
117
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
118
+ };
119
+ };
120
+ /** Too many requests in allowed time period */
121
+ RateLimitError: unknown;
122
+ /** Execution error occurred */
123
+ InternalServerError: unknown;
124
+ };
125
+ };
126
+ operations: {};
127
+ };
128
+ "uniform-context-types.swagger.yml": {
129
+ paths: {};
130
+ components: {
131
+ schemas: {
132
+ EnrichmentCategory: {
133
+ /** @description The maximum visitor score allowed for enrichment keys in this category */
134
+ cap: number;
135
+ };
136
+ PreviewSignal: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["Signal"] & {
137
+ /** @description Friendly name of the signal */
138
+ name: string;
139
+ /** @description Description of the signal */
140
+ description?: string;
141
+ };
142
+ Signal: {
143
+ /** @description The signal strength per activation (each time its criteria are true, this score is added) */
144
+ str: number;
145
+ /** @description The maximum visitor score allowed for this signal */
146
+ cap: number;
147
+ /**
148
+ * @description How long the signal's score should persist
149
+ * 's' = current session (expires after a period of inactivity)
150
+ * 'p' = permanent (expires as far in the future as possible, may be limited by browser security settings)
151
+ * 't' = transient (score tracks the current state of the criteria every time scores are updated)
152
+ *
153
+ * @enum {string}
154
+ */
155
+ dur: "s" | "p" | "t";
156
+ crit: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["RootSignalCriteriaGroup"];
157
+ };
158
+ RootSignalCriteriaGroup: {
159
+ /**
160
+ * @description Criteria type (Group of other criteria)
161
+ * @enum {string}
162
+ */
163
+ type: "G";
164
+ /**
165
+ * @description The logical operator to apply to the criteria groups
166
+ * & = AND
167
+ * | = OR
168
+ *
169
+ * Default is `&` if unspecified.
170
+ *
171
+ * @default &
172
+ * @enum {string}
173
+ */
174
+ op?: "&" | "|";
175
+ /** @description The criteria clauses that make up this grouping of criteria */
176
+ clauses: (external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
177
+ };
178
+ SignalCriteriaGroup: {
179
+ /**
180
+ * @description Criteria type (Group of other criteria)
181
+ * @enum {string}
182
+ */
183
+ type: "G";
184
+ /**
185
+ * @description The logical operator to apply to the criteria groups
186
+ * & = AND
187
+ * | = OR
188
+ *
189
+ * Default is `&` if unspecified.
190
+ *
191
+ * @enum {string}
192
+ */
193
+ op?: "&" | "|";
194
+ /** @description The criteria clauses that make up this grouping of criteria */
195
+ clauses: (external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteriaGroup"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["SignalCriteria"])[];
196
+ };
197
+ SignalCriteria: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["CookieCriteria"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["QueryStringCriteria"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["QuirkCriteria"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["EventCriteria"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["CurrentPageCriteria"] | external["uniform-context-types.swagger.yml"]["components"]["schemas"]["PageViewCountCriteria"];
198
+ /** @description Matches a URL query string parameter value */
199
+ QueryStringCriteria: {
200
+ /** @enum {string} */
201
+ type: "QS";
202
+ /** @description The name of the query string parameter to match */
203
+ queryName: string;
204
+ /** @description The value to match the query string parameter against */
205
+ match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
206
+ };
207
+ /** @description Matches a web cookie value */
208
+ CookieCriteria: {
209
+ /** @enum {string} */
210
+ type: "CK";
211
+ /** @description The name of the cookie to match */
212
+ cookieName: string;
213
+ /** @description The value to match the cookie against */
214
+ match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
215
+ };
216
+ /** @description Matches a visitor quirk key and value */
217
+ QuirkCriteria: {
218
+ /** @enum {string} */
219
+ type: "QK";
220
+ /** @description The name of the quirk key to match */
221
+ key: string;
222
+ /** @description The quirk value to match against */
223
+ match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
224
+ };
225
+ /** @description Matches an analytics event name being fired */
226
+ EventCriteria: {
227
+ /** @enum {string} */
228
+ type: "EVT";
229
+ /** @description How to match the event name */
230
+ event: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
231
+ };
232
+ /**
233
+ * @description Matches the current page's absolute path (i.e. /path/to/page.html)
234
+ * Does not include the query string or protocol and hostname (i.e. NOT https://foo.com/path/to/page.html?query=something)
235
+ */
236
+ CurrentPageCriteria: {
237
+ /** @enum {string} */
238
+ type: "PV";
239
+ /** @description The page/route path to match as a page that has been visited */
240
+ path: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["StringMatch"];
241
+ };
242
+ PageViewCountCriteria: {
243
+ /** @enum {string} */
244
+ type: "PVC";
245
+ /** @description The expression to match the page view count against */
246
+ match: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["NumberMatch"];
247
+ };
248
+ /** @description Describes a match expression on a string */
249
+ StringMatch: {
250
+ /** @description The right hand side of the match expression */
251
+ rhs: string;
252
+ /**
253
+ * @description The match operator
254
+ * '=' = exact match
255
+ * '~' = contains match
256
+ * '//' = regular expression match
257
+ *
258
+ * Any of the above can be prefixed with '!' to invert the match (i.e. != for 'not an exact match')
259
+ *
260
+ * @enum {string}
261
+ */
262
+ op: "=" | "~" | "//" | "!=" | "!~" | "!//";
263
+ /** @description The case sensitivity of the match. Defaults to false if unspecified. */
264
+ cs?: boolean;
265
+ } | {
266
+ /**
267
+ * @description The type of match to perform
268
+ * '*' = exists with any value
269
+ * '!*' = does not exist
270
+ *
271
+ * @enum {string}
272
+ */
273
+ op: "*" | "!*";
274
+ };
275
+ /** @description Describes a match expression on a number */
276
+ NumberMatch: {
277
+ /** @description The right hand side of the match expression */
278
+ rhs: number;
279
+ /**
280
+ * @description The type of match to perform
281
+ * '=' = exact match
282
+ * '!=' = not an exact match
283
+ * '<' = less than match expression
284
+ * '>' = greater than match expression
285
+ *
286
+ * @enum {string}
287
+ */
288
+ op: "=" | "<" | ">" | "!=";
289
+ };
290
+ /** @description Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience. */
291
+ AggregateDimension: {
292
+ /** @description Input dimensions to the aggregate dimension */
293
+ inputs: external["uniform-context-types.swagger.yml"]["components"]["schemas"]["AggregateDimensionInput"][];
294
+ };
295
+ /** @description Defines an input dimension to an aggregate dimension */
296
+ AggregateDimensionInput: {
297
+ /**
298
+ * @description Dimension name to reference as an input.
299
+ * For enrichment inputs, use CATEGORY_KEY as the dimension.
300
+ * Enrichments, signals, and other aggregate dimensions may be referenced.
301
+ *
302
+ * Note that creating a cycle of aggregate dimensions is allowed, however
303
+ * the final score will _ignore_ the cycled aggregate dimension in the result.
304
+ * This can be used to create mutually exclusive aggregates.
305
+ */
306
+ dim: string;
307
+ /**
308
+ * @description The sign of the input dimension controls how it affects the aggregate dimension's final score.
309
+ *
310
+ * '+' = add to the final score
311
+ * '-' = subtract from the final score
312
+ * 'c' = clear the final score (if the input dimension has any score at all, this aggreate will have no score regardless of other inputs)
313
+ *
314
+ * Default if unspecified: '+'
315
+ *
316
+ * @default +
317
+ * @enum {string}
318
+ */
319
+ sign?: "+" | "-" | "c";
320
+ };
321
+ Test: {
322
+ /** @description Winning variation ID - if set, the test will not run and this variation is shown to all visitors (the test is closed) */
323
+ wv?: string;
324
+ };
325
+ };
326
+ };
327
+ operations: {};
328
+ };
329
+ }
330
+
331
+ export { components as c, external as e, paths as p };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context",
3
- "version": "18.11.1-alpha.4+66560ce33",
3
+ "version": "18.11.1-alpha.5+f9e0478f7",
4
4
  "description": "Uniform Context core package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -59,7 +59,7 @@
59
59
  "devDependencies": {
60
60
  "@types/js-cookie": "3.0.2",
61
61
  "@types/yargs": "17.0.22",
62
- "@uniformdev/cli": "18.11.1-alpha.4+66560ce33",
62
+ "@uniformdev/cli": "18.11.1-alpha.5+f9e0478f7",
63
63
  "benny": "3.7.1",
64
64
  "yargs": "17.6.2"
65
65
  },
@@ -76,5 +76,5 @@
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
- "gitHead": "66560ce3318690c0d27110357d13334a63e72d32"
79
+ "gitHead": "f9e0478f758622e7fe503b1490a13ef102f54566"
80
80
  }