@uniformdev/context 16.0.1-nuxt.166 → 16.0.1-nuxt.187

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