@gradial/aci 0.1.24 → 0.1.26
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/bin/aci-darwin-arm64 +0 -0
- package/dist/audience-data-models.d.ts +406 -0
- package/dist/audience-data-models.js +105 -0
- package/dist/block-ref.d.ts +2 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -0
- package/dist/next/config.js +30 -2
- package/dist/next/content-watch.js +1 -1
- package/dist/next/middleware.js +5 -1
- package/dist/react/VideoPlayer.d.ts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/package.json +1 -6
- package/src/cli/verify-next-cdn-routes.mjs +2 -2
- package/templates/astro/template/package.json.tmpl +2 -5
- package/templates/nextjs/template/{next.config.ts → next.config.mjs} +2 -2
- package/templates/nextjs/template/package.json.tmpl +2 -4
package/bin/aci-darwin-arm64
CHANGED
|
Binary file
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const segmentDataModel: import("./index.js").DataModelContract<z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
displayName: z.ZodString;
|
|
5
|
+
status: z.ZodEnum<{
|
|
6
|
+
draft: "draft";
|
|
7
|
+
enabled: "enabled";
|
|
8
|
+
disabled: "disabled";
|
|
9
|
+
}>;
|
|
10
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
description: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>, "segment">;
|
|
13
|
+
export declare const audienceDataModel: import("./index.js").DataModelContract<z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
displayName: z.ZodString;
|
|
16
|
+
status: z.ZodEnum<{
|
|
17
|
+
draft: "draft";
|
|
18
|
+
enabled: "enabled";
|
|
19
|
+
disabled: "disabled";
|
|
20
|
+
}>;
|
|
21
|
+
priority: z.ZodNumber;
|
|
22
|
+
membershipSource: z.ZodEnum<{
|
|
23
|
+
segment: "segment";
|
|
24
|
+
rule: "rule";
|
|
25
|
+
manual: "manual";
|
|
26
|
+
external: "external";
|
|
27
|
+
none: "none";
|
|
28
|
+
}>;
|
|
29
|
+
ruleRef: z.ZodOptional<z.ZodString>;
|
|
30
|
+
segmentRef: z.ZodOptional<z.ZodString>;
|
|
31
|
+
providerRef: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>, "audience">;
|
|
33
|
+
export declare const audienceRuleDataModel: import("./index.js").DataModelContract<z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
status: z.ZodEnum<{
|
|
36
|
+
draft: "draft";
|
|
37
|
+
enabled: "enabled";
|
|
38
|
+
disabled: "disabled";
|
|
39
|
+
}>;
|
|
40
|
+
description: z.ZodOptional<z.ZodString>;
|
|
41
|
+
expression: z.ZodObject<{
|
|
42
|
+
all: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
43
|
+
field: z.ZodString;
|
|
44
|
+
operator: z.ZodEnum<{
|
|
45
|
+
equals: "equals";
|
|
46
|
+
contains: "contains";
|
|
47
|
+
startsWith: "startsWith";
|
|
48
|
+
exists: "exists";
|
|
49
|
+
}>;
|
|
50
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
51
|
+
}, z.core.$strip>>>;
|
|
52
|
+
any: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
53
|
+
field: z.ZodString;
|
|
54
|
+
operator: z.ZodEnum<{
|
|
55
|
+
equals: "equals";
|
|
56
|
+
contains: "contains";
|
|
57
|
+
startsWith: "startsWith";
|
|
58
|
+
exists: "exists";
|
|
59
|
+
}>;
|
|
60
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
61
|
+
}, z.core.$strip>>>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
}, z.core.$strip>, "audience_rule">;
|
|
64
|
+
export declare const visitorProfileDataModel: import("./index.js").DataModelContract<z.ZodObject<{
|
|
65
|
+
visitorId: z.ZodString;
|
|
66
|
+
audienceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
67
|
+
segmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
|
+
traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
69
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
70
|
+
}, z.core.$strip>, "visitor_profile">;
|
|
71
|
+
export declare const goalDataModel: import("./index.js").DataModelContract<z.ZodObject<{
|
|
72
|
+
id: z.ZodString;
|
|
73
|
+
displayName: z.ZodString;
|
|
74
|
+
status: z.ZodEnum<{
|
|
75
|
+
draft: "draft";
|
|
76
|
+
enabled: "enabled";
|
|
77
|
+
disabled: "disabled";
|
|
78
|
+
}>;
|
|
79
|
+
eventName: z.ZodString;
|
|
80
|
+
eventRule: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
all: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
82
|
+
field: z.ZodString;
|
|
83
|
+
operator: z.ZodEnum<{
|
|
84
|
+
equals: "equals";
|
|
85
|
+
contains: "contains";
|
|
86
|
+
startsWith: "startsWith";
|
|
87
|
+
exists: "exists";
|
|
88
|
+
}>;
|
|
89
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
90
|
+
}, z.core.$strip>>>;
|
|
91
|
+
any: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
92
|
+
field: z.ZodString;
|
|
93
|
+
operator: z.ZodEnum<{
|
|
94
|
+
equals: "equals";
|
|
95
|
+
contains: "contains";
|
|
96
|
+
startsWith: "startsWith";
|
|
97
|
+
exists: "exists";
|
|
98
|
+
}>;
|
|
99
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
100
|
+
}, z.core.$strip>>>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
}, z.core.$strip>, "goal">;
|
|
103
|
+
export declare const experimentDataModel: import("./index.js").DataModelContract<z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
displayName: z.ZodString;
|
|
106
|
+
status: z.ZodEnum<{
|
|
107
|
+
draft: "draft";
|
|
108
|
+
running: "running";
|
|
109
|
+
paused: "paused";
|
|
110
|
+
stopped: "stopped";
|
|
111
|
+
promoted: "promoted";
|
|
112
|
+
archived: "archived";
|
|
113
|
+
}>;
|
|
114
|
+
kind: z.ZodEnum<{
|
|
115
|
+
ab: "ab";
|
|
116
|
+
abn: "abn";
|
|
117
|
+
xt: "xt";
|
|
118
|
+
}>;
|
|
119
|
+
priority: z.ZodNumber;
|
|
120
|
+
allocationVersion: z.ZodOptional<z.ZodString>;
|
|
121
|
+
salt: z.ZodOptional<z.ZodString>;
|
|
122
|
+
scope: z.ZodObject<{
|
|
123
|
+
routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
124
|
+
fragments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
primaryGoalRef: z.ZodOptional<z.ZodString>;
|
|
127
|
+
primaryGoalId: z.ZodOptional<z.ZodString>;
|
|
128
|
+
goalRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
129
|
+
goalIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
130
|
+
arms: z.ZodArray<z.ZodObject<{
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
displayName: z.ZodString;
|
|
133
|
+
role: z.ZodEnum<{
|
|
134
|
+
control: "control";
|
|
135
|
+
variant: "variant";
|
|
136
|
+
}>;
|
|
137
|
+
allocationBasisPoints: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
rule: z.ZodOptional<z.ZodObject<{
|
|
139
|
+
all: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
140
|
+
field: z.ZodString;
|
|
141
|
+
operator: z.ZodEnum<{
|
|
142
|
+
equals: "equals";
|
|
143
|
+
contains: "contains";
|
|
144
|
+
startsWith: "startsWith";
|
|
145
|
+
exists: "exists";
|
|
146
|
+
}>;
|
|
147
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
148
|
+
}, z.core.$strip>>>;
|
|
149
|
+
any: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
150
|
+
field: z.ZodString;
|
|
151
|
+
operator: z.ZodEnum<{
|
|
152
|
+
equals: "equals";
|
|
153
|
+
contains: "contains";
|
|
154
|
+
startsWith: "startsWith";
|
|
155
|
+
exists: "exists";
|
|
156
|
+
}>;
|
|
157
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
158
|
+
}, z.core.$strip>>>;
|
|
159
|
+
}, z.core.$strip>>;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
}, z.core.$strip>, "experiment">;
|
|
162
|
+
export declare const experimentationDataModels: (import("./index.js").DataModelContract<z.ZodObject<{
|
|
163
|
+
id: z.ZodString;
|
|
164
|
+
displayName: z.ZodString;
|
|
165
|
+
status: z.ZodEnum<{
|
|
166
|
+
draft: "draft";
|
|
167
|
+
enabled: "enabled";
|
|
168
|
+
disabled: "disabled";
|
|
169
|
+
}>;
|
|
170
|
+
eventName: z.ZodString;
|
|
171
|
+
eventRule: z.ZodOptional<z.ZodObject<{
|
|
172
|
+
all: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
173
|
+
field: z.ZodString;
|
|
174
|
+
operator: z.ZodEnum<{
|
|
175
|
+
equals: "equals";
|
|
176
|
+
contains: "contains";
|
|
177
|
+
startsWith: "startsWith";
|
|
178
|
+
exists: "exists";
|
|
179
|
+
}>;
|
|
180
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
181
|
+
}, z.core.$strip>>>;
|
|
182
|
+
any: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
183
|
+
field: z.ZodString;
|
|
184
|
+
operator: z.ZodEnum<{
|
|
185
|
+
equals: "equals";
|
|
186
|
+
contains: "contains";
|
|
187
|
+
startsWith: "startsWith";
|
|
188
|
+
exists: "exists";
|
|
189
|
+
}>;
|
|
190
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
191
|
+
}, z.core.$strip>>>;
|
|
192
|
+
}, z.core.$strip>>;
|
|
193
|
+
}, z.core.$strip>, "goal"> | import("./index.js").DataModelContract<z.ZodObject<{
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
displayName: z.ZodString;
|
|
196
|
+
status: z.ZodEnum<{
|
|
197
|
+
draft: "draft";
|
|
198
|
+
running: "running";
|
|
199
|
+
paused: "paused";
|
|
200
|
+
stopped: "stopped";
|
|
201
|
+
promoted: "promoted";
|
|
202
|
+
archived: "archived";
|
|
203
|
+
}>;
|
|
204
|
+
kind: z.ZodEnum<{
|
|
205
|
+
ab: "ab";
|
|
206
|
+
abn: "abn";
|
|
207
|
+
xt: "xt";
|
|
208
|
+
}>;
|
|
209
|
+
priority: z.ZodNumber;
|
|
210
|
+
allocationVersion: z.ZodOptional<z.ZodString>;
|
|
211
|
+
salt: z.ZodOptional<z.ZodString>;
|
|
212
|
+
scope: z.ZodObject<{
|
|
213
|
+
routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
|
+
fragments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
215
|
+
}, z.core.$strip>;
|
|
216
|
+
primaryGoalRef: z.ZodOptional<z.ZodString>;
|
|
217
|
+
primaryGoalId: z.ZodOptional<z.ZodString>;
|
|
218
|
+
goalRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
219
|
+
goalIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
220
|
+
arms: z.ZodArray<z.ZodObject<{
|
|
221
|
+
id: z.ZodString;
|
|
222
|
+
displayName: z.ZodString;
|
|
223
|
+
role: z.ZodEnum<{
|
|
224
|
+
control: "control";
|
|
225
|
+
variant: "variant";
|
|
226
|
+
}>;
|
|
227
|
+
allocationBasisPoints: z.ZodOptional<z.ZodNumber>;
|
|
228
|
+
rule: z.ZodOptional<z.ZodObject<{
|
|
229
|
+
all: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
230
|
+
field: z.ZodString;
|
|
231
|
+
operator: z.ZodEnum<{
|
|
232
|
+
equals: "equals";
|
|
233
|
+
contains: "contains";
|
|
234
|
+
startsWith: "startsWith";
|
|
235
|
+
exists: "exists";
|
|
236
|
+
}>;
|
|
237
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
238
|
+
}, z.core.$strip>>>;
|
|
239
|
+
any: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
240
|
+
field: z.ZodString;
|
|
241
|
+
operator: z.ZodEnum<{
|
|
242
|
+
equals: "equals";
|
|
243
|
+
contains: "contains";
|
|
244
|
+
startsWith: "startsWith";
|
|
245
|
+
exists: "exists";
|
|
246
|
+
}>;
|
|
247
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
248
|
+
}, z.core.$strip>>>;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
}, z.core.$strip>>;
|
|
251
|
+
}, z.core.$strip>, "experiment">)[];
|
|
252
|
+
export declare const audienceDataModels: (import("./index.js").DataModelContract<z.ZodObject<{
|
|
253
|
+
id: z.ZodString;
|
|
254
|
+
displayName: z.ZodString;
|
|
255
|
+
status: z.ZodEnum<{
|
|
256
|
+
draft: "draft";
|
|
257
|
+
enabled: "enabled";
|
|
258
|
+
disabled: "disabled";
|
|
259
|
+
}>;
|
|
260
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
261
|
+
description: z.ZodOptional<z.ZodString>;
|
|
262
|
+
}, z.core.$strip>, "segment"> | import("./index.js").DataModelContract<z.ZodObject<{
|
|
263
|
+
id: z.ZodString;
|
|
264
|
+
displayName: z.ZodString;
|
|
265
|
+
status: z.ZodEnum<{
|
|
266
|
+
draft: "draft";
|
|
267
|
+
enabled: "enabled";
|
|
268
|
+
disabled: "disabled";
|
|
269
|
+
}>;
|
|
270
|
+
priority: z.ZodNumber;
|
|
271
|
+
membershipSource: z.ZodEnum<{
|
|
272
|
+
segment: "segment";
|
|
273
|
+
rule: "rule";
|
|
274
|
+
manual: "manual";
|
|
275
|
+
external: "external";
|
|
276
|
+
none: "none";
|
|
277
|
+
}>;
|
|
278
|
+
ruleRef: z.ZodOptional<z.ZodString>;
|
|
279
|
+
segmentRef: z.ZodOptional<z.ZodString>;
|
|
280
|
+
providerRef: z.ZodOptional<z.ZodString>;
|
|
281
|
+
}, z.core.$strip>, "audience"> | import("./index.js").DataModelContract<z.ZodObject<{
|
|
282
|
+
id: z.ZodString;
|
|
283
|
+
status: z.ZodEnum<{
|
|
284
|
+
draft: "draft";
|
|
285
|
+
enabled: "enabled";
|
|
286
|
+
disabled: "disabled";
|
|
287
|
+
}>;
|
|
288
|
+
description: z.ZodOptional<z.ZodString>;
|
|
289
|
+
expression: z.ZodObject<{
|
|
290
|
+
all: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
291
|
+
field: z.ZodString;
|
|
292
|
+
operator: z.ZodEnum<{
|
|
293
|
+
equals: "equals";
|
|
294
|
+
contains: "contains";
|
|
295
|
+
startsWith: "startsWith";
|
|
296
|
+
exists: "exists";
|
|
297
|
+
}>;
|
|
298
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
299
|
+
}, z.core.$strip>>>;
|
|
300
|
+
any: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
301
|
+
field: z.ZodString;
|
|
302
|
+
operator: z.ZodEnum<{
|
|
303
|
+
equals: "equals";
|
|
304
|
+
contains: "contains";
|
|
305
|
+
startsWith: "startsWith";
|
|
306
|
+
exists: "exists";
|
|
307
|
+
}>;
|
|
308
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
309
|
+
}, z.core.$strip>>>;
|
|
310
|
+
}, z.core.$strip>;
|
|
311
|
+
}, z.core.$strip>, "audience_rule"> | import("./index.js").DataModelContract<z.ZodObject<{
|
|
312
|
+
visitorId: z.ZodString;
|
|
313
|
+
audienceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
314
|
+
segmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
315
|
+
traits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
316
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
317
|
+
}, z.core.$strip>, "visitor_profile"> | import("./index.js").DataModelContract<z.ZodObject<{
|
|
318
|
+
id: z.ZodString;
|
|
319
|
+
displayName: z.ZodString;
|
|
320
|
+
status: z.ZodEnum<{
|
|
321
|
+
draft: "draft";
|
|
322
|
+
enabled: "enabled";
|
|
323
|
+
disabled: "disabled";
|
|
324
|
+
}>;
|
|
325
|
+
eventName: z.ZodString;
|
|
326
|
+
eventRule: z.ZodOptional<z.ZodObject<{
|
|
327
|
+
all: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
328
|
+
field: z.ZodString;
|
|
329
|
+
operator: z.ZodEnum<{
|
|
330
|
+
equals: "equals";
|
|
331
|
+
contains: "contains";
|
|
332
|
+
startsWith: "startsWith";
|
|
333
|
+
exists: "exists";
|
|
334
|
+
}>;
|
|
335
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
336
|
+
}, z.core.$strip>>>;
|
|
337
|
+
any: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
338
|
+
field: z.ZodString;
|
|
339
|
+
operator: z.ZodEnum<{
|
|
340
|
+
equals: "equals";
|
|
341
|
+
contains: "contains";
|
|
342
|
+
startsWith: "startsWith";
|
|
343
|
+
exists: "exists";
|
|
344
|
+
}>;
|
|
345
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
346
|
+
}, z.core.$strip>>>;
|
|
347
|
+
}, z.core.$strip>>;
|
|
348
|
+
}, z.core.$strip>, "goal"> | import("./index.js").DataModelContract<z.ZodObject<{
|
|
349
|
+
id: z.ZodString;
|
|
350
|
+
displayName: z.ZodString;
|
|
351
|
+
status: z.ZodEnum<{
|
|
352
|
+
draft: "draft";
|
|
353
|
+
running: "running";
|
|
354
|
+
paused: "paused";
|
|
355
|
+
stopped: "stopped";
|
|
356
|
+
promoted: "promoted";
|
|
357
|
+
archived: "archived";
|
|
358
|
+
}>;
|
|
359
|
+
kind: z.ZodEnum<{
|
|
360
|
+
ab: "ab";
|
|
361
|
+
abn: "abn";
|
|
362
|
+
xt: "xt";
|
|
363
|
+
}>;
|
|
364
|
+
priority: z.ZodNumber;
|
|
365
|
+
allocationVersion: z.ZodOptional<z.ZodString>;
|
|
366
|
+
salt: z.ZodOptional<z.ZodString>;
|
|
367
|
+
scope: z.ZodObject<{
|
|
368
|
+
routes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
369
|
+
fragments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
370
|
+
}, z.core.$strip>;
|
|
371
|
+
primaryGoalRef: z.ZodOptional<z.ZodString>;
|
|
372
|
+
primaryGoalId: z.ZodOptional<z.ZodString>;
|
|
373
|
+
goalRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
374
|
+
goalIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
375
|
+
arms: z.ZodArray<z.ZodObject<{
|
|
376
|
+
id: z.ZodString;
|
|
377
|
+
displayName: z.ZodString;
|
|
378
|
+
role: z.ZodEnum<{
|
|
379
|
+
control: "control";
|
|
380
|
+
variant: "variant";
|
|
381
|
+
}>;
|
|
382
|
+
allocationBasisPoints: z.ZodOptional<z.ZodNumber>;
|
|
383
|
+
rule: z.ZodOptional<z.ZodObject<{
|
|
384
|
+
all: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
385
|
+
field: z.ZodString;
|
|
386
|
+
operator: z.ZodEnum<{
|
|
387
|
+
equals: "equals";
|
|
388
|
+
contains: "contains";
|
|
389
|
+
startsWith: "startsWith";
|
|
390
|
+
exists: "exists";
|
|
391
|
+
}>;
|
|
392
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
393
|
+
}, z.core.$strip>>>;
|
|
394
|
+
any: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
395
|
+
field: z.ZodString;
|
|
396
|
+
operator: z.ZodEnum<{
|
|
397
|
+
equals: "equals";
|
|
398
|
+
contains: "contains";
|
|
399
|
+
startsWith: "startsWith";
|
|
400
|
+
exists: "exists";
|
|
401
|
+
}>;
|
|
402
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
403
|
+
}, z.core.$strip>>>;
|
|
404
|
+
}, z.core.$strip>>;
|
|
405
|
+
}, z.core.$strip>>;
|
|
406
|
+
}, z.core.$strip>, "experiment">)[];
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineDataModel } from './define-data-model.js';
|
|
3
|
+
const resourceStatus = z.enum(['draft', 'enabled', 'disabled']);
|
|
4
|
+
const experimentStatus = z.enum(['draft', 'running', 'paused', 'stopped', 'promoted', 'archived']);
|
|
5
|
+
const experimentKind = z.enum(['ab', 'abn', 'xt']);
|
|
6
|
+
const scalarValue = z.union([z.string(), z.number(), z.boolean()]);
|
|
7
|
+
const requestRuleConditionSchema = z.object({
|
|
8
|
+
field: z.string().min(1),
|
|
9
|
+
operator: z.enum(['equals', 'contains', 'startsWith', 'exists']),
|
|
10
|
+
value: scalarValue.optional(),
|
|
11
|
+
});
|
|
12
|
+
const requestRuleExpressionSchema = z.object({
|
|
13
|
+
all: z.array(requestRuleConditionSchema).optional(),
|
|
14
|
+
any: z.array(requestRuleConditionSchema).optional(),
|
|
15
|
+
});
|
|
16
|
+
export const segmentDataModel = defineDataModel({
|
|
17
|
+
type: 'segment',
|
|
18
|
+
schema: z.object({
|
|
19
|
+
id: z.string().min(1),
|
|
20
|
+
displayName: z.string().min(1),
|
|
21
|
+
status: resourceStatus,
|
|
22
|
+
priority: z.number().int().nonnegative().optional(),
|
|
23
|
+
description: z.string().optional(),
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
export const audienceDataModel = defineDataModel({
|
|
27
|
+
type: 'audience',
|
|
28
|
+
schema: z.object({
|
|
29
|
+
id: z.string().min(1),
|
|
30
|
+
displayName: z.string().min(1),
|
|
31
|
+
status: resourceStatus,
|
|
32
|
+
priority: z.number().int().nonnegative(),
|
|
33
|
+
membershipSource: z.enum(['rule', 'segment', 'manual', 'external', 'none']),
|
|
34
|
+
ruleRef: z.string().optional(),
|
|
35
|
+
segmentRef: z.string().optional(),
|
|
36
|
+
providerRef: z.string().optional(),
|
|
37
|
+
}),
|
|
38
|
+
});
|
|
39
|
+
export const audienceRuleDataModel = defineDataModel({
|
|
40
|
+
type: 'audience_rule',
|
|
41
|
+
schema: z.object({
|
|
42
|
+
id: z.string().min(1),
|
|
43
|
+
status: resourceStatus,
|
|
44
|
+
description: z.string().optional(),
|
|
45
|
+
expression: requestRuleExpressionSchema,
|
|
46
|
+
}),
|
|
47
|
+
});
|
|
48
|
+
export const visitorProfileDataModel = defineDataModel({
|
|
49
|
+
type: 'visitor_profile',
|
|
50
|
+
schema: z.object({
|
|
51
|
+
visitorId: z.string().min(1),
|
|
52
|
+
audienceIds: z.array(z.string().min(1)).optional(),
|
|
53
|
+
segmentIds: z.array(z.string().min(1)).optional(),
|
|
54
|
+
traits: z.record(z.string(), scalarValue).optional(),
|
|
55
|
+
updatedAt: z.string().optional(),
|
|
56
|
+
}),
|
|
57
|
+
});
|
|
58
|
+
export const goalDataModel = defineDataModel({
|
|
59
|
+
type: 'goal',
|
|
60
|
+
schema: z.object({
|
|
61
|
+
id: z.string().min(1),
|
|
62
|
+
displayName: z.string().min(1),
|
|
63
|
+
status: resourceStatus,
|
|
64
|
+
eventName: z.string().min(1),
|
|
65
|
+
eventRule: requestRuleExpressionSchema.optional(),
|
|
66
|
+
}),
|
|
67
|
+
});
|
|
68
|
+
export const experimentDataModel = defineDataModel({
|
|
69
|
+
type: 'experiment',
|
|
70
|
+
schema: z.object({
|
|
71
|
+
id: z.string().min(1),
|
|
72
|
+
displayName: z.string().min(1),
|
|
73
|
+
status: experimentStatus,
|
|
74
|
+
kind: experimentKind,
|
|
75
|
+
priority: z.number().int().nonnegative(),
|
|
76
|
+
allocationVersion: z.string().optional(),
|
|
77
|
+
salt: z.string().optional(),
|
|
78
|
+
scope: z.object({
|
|
79
|
+
routes: z.array(z.string().min(1)).optional(),
|
|
80
|
+
fragments: z.array(z.string().min(1)).optional(),
|
|
81
|
+
}),
|
|
82
|
+
primaryGoalRef: z.string().optional(),
|
|
83
|
+
primaryGoalId: z.string().optional(),
|
|
84
|
+
goalRefs: z.array(z.string().min(1)).optional(),
|
|
85
|
+
goalIds: z.array(z.string().min(1)).optional(),
|
|
86
|
+
arms: z.array(z.object({
|
|
87
|
+
id: z.string().min(1),
|
|
88
|
+
displayName: z.string().min(1),
|
|
89
|
+
role: z.enum(['control', 'variant']),
|
|
90
|
+
allocationBasisPoints: z.number().int().min(0).max(10000).optional(),
|
|
91
|
+
rule: requestRuleExpressionSchema.optional(),
|
|
92
|
+
})).min(1),
|
|
93
|
+
}),
|
|
94
|
+
});
|
|
95
|
+
export const experimentationDataModels = [
|
|
96
|
+
goalDataModel,
|
|
97
|
+
experimentDataModel,
|
|
98
|
+
];
|
|
99
|
+
export const audienceDataModels = [
|
|
100
|
+
segmentDataModel,
|
|
101
|
+
audienceDataModel,
|
|
102
|
+
audienceRuleDataModel,
|
|
103
|
+
visitorProfileDataModel,
|
|
104
|
+
...experimentationDataModels,
|
|
105
|
+
];
|
package/dist/block-ref.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ export interface BlockRefOptions {
|
|
|
27
27
|
*/
|
|
28
28
|
export declare function blockRef(options?: BlockRefOptions): z.ZodObject<{
|
|
29
29
|
id: z.ZodString;
|
|
30
|
-
component: z.ZodEnum<{
|
|
30
|
+
component: z.ZodString | z.ZodEnum<{
|
|
31
31
|
[x: string]: string;
|
|
32
|
-
}
|
|
32
|
+
}>;
|
|
33
33
|
props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
34
34
|
}, z.core.$strip>;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,3 +12,6 @@ export type { Config, RouteConfig, ExternalDependency, DAMConfig, } from './type
|
|
|
12
12
|
export type { Renderer, RenderCapabilities, RenderPageRequest, RenderPageResult, RequestContext, ReleaseContext, RenderFragmentRequest, RenderIslandRequest, RenderResult, IslandDescriptor, CachePolicy, GeoContext, } from './types/renderer.js';
|
|
13
13
|
export type { Asset, } from './types/media.js';
|
|
14
14
|
export { AssetSchema, isImage, isAsset, } from './types/media.js';
|
|
15
|
+
export * from './audience-data-models.js';
|
|
16
|
+
export * from './define-data-model.js';
|
|
17
|
+
export * from './types/index.js';
|
package/dist/index.js
CHANGED
|
@@ -6,3 +6,9 @@ export { ImageSchema, imageAttrs, primaryImageSource, } from './types/image.js';
|
|
|
6
6
|
export { LinkSchema, resolveLink, resolveHref, assertSafeHref, normalizeLinkRel, } from './types/link.js';
|
|
7
7
|
export { HeadingSchema, InlineContentSchema, RichTextValueSchema, } from './types/rich-text.js';
|
|
8
8
|
export { AssetSchema, isImage, isAsset, } from './types/media.js';
|
|
9
|
+
export * from './audience-data-models.js';
|
|
10
|
+
export * from './define-data-model.js';
|
|
11
|
+
export * from './types/index.js';
|
|
12
|
+
// Note: content/ is NOT re-exported here because it imports node:path,
|
|
13
|
+
// making it incompatible with client-side bundlers. Import server-only
|
|
14
|
+
// content utilities from '@gradial/aci/content' explicitly.
|
package/dist/next/config.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import { readdirSync, existsSync } from 'fs';
|
|
2
|
+
import { join, relative } from 'path';
|
|
3
|
+
import { createRequire } from 'module';
|
|
1
4
|
import { createContentWatchWebpackPlugin } from './content-watch.js';
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
2
6
|
export function withAci(nextConfig = {}, options = {}) {
|
|
7
|
+
const publicPaths = collectPublicPaths(join(process.cwd(), 'public'));
|
|
3
8
|
const assetPrefix = options.assetPrefix || '/.gradial-dam';
|
|
4
9
|
const userRewrites = nextConfig.rewrites;
|
|
5
10
|
const userHeaders = nextConfig.headers;
|
|
6
11
|
const userWebpack = nextConfig.webpack;
|
|
7
12
|
return {
|
|
8
13
|
...nextConfig,
|
|
14
|
+
output: 'standalone',
|
|
9
15
|
headers: async () => {
|
|
10
16
|
const gradialHeaders = [
|
|
11
17
|
{
|
|
@@ -48,14 +54,36 @@ export function withAci(nextConfig = {}, options = {}) {
|
|
|
48
54
|
};
|
|
49
55
|
},
|
|
50
56
|
webpack: (config, context) => {
|
|
57
|
+
if (!config.plugins)
|
|
58
|
+
config.plugins = [];
|
|
51
59
|
if (context?.isServer && process.env.NODE_ENV !== 'production') {
|
|
52
|
-
if (!config.plugins)
|
|
53
|
-
config.plugins = [];
|
|
54
60
|
config.plugins.push(createContentWatchWebpackPlugin());
|
|
55
61
|
}
|
|
62
|
+
const webpack = require('webpack');
|
|
63
|
+
config.plugins.push(new webpack.DefinePlugin({
|
|
64
|
+
'__ACI_PUBLIC_PATHS__': JSON.stringify(publicPaths),
|
|
65
|
+
}));
|
|
56
66
|
return typeof userWebpack === 'function'
|
|
57
67
|
? userWebpack(config, context)
|
|
58
68
|
: config;
|
|
59
69
|
},
|
|
60
70
|
};
|
|
61
71
|
}
|
|
72
|
+
function collectPublicPaths(publicDir) {
|
|
73
|
+
if (!existsSync(publicDir))
|
|
74
|
+
return [];
|
|
75
|
+
const paths = [];
|
|
76
|
+
const walk = (dir) => {
|
|
77
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
78
|
+
const full = join(dir, entry.name);
|
|
79
|
+
if (entry.isDirectory()) {
|
|
80
|
+
walk(full);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
paths.push('/' + relative(publicDir, full).split('\\').join('/'));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
walk(publicDir);
|
|
88
|
+
return paths;
|
|
89
|
+
}
|
|
@@ -11,7 +11,7 @@ function compiledContentRoot() {
|
|
|
11
11
|
return path.resolve(process.env.ACI_CONTENT_ROOT || '.aci/compiled');
|
|
12
12
|
}
|
|
13
13
|
function resolveAciBin() {
|
|
14
|
-
return process.env.ACI_BIN || 'aci';
|
|
14
|
+
return process.env.ACI_BIN || 'gradial-aci';
|
|
15
15
|
}
|
|
16
16
|
function recompileContent(reason) {
|
|
17
17
|
const siteDir = process.cwd();
|
package/dist/next/middleware.js
CHANGED
|
@@ -2,6 +2,7 @@ import { NextResponse } from 'next/server.js';
|
|
|
2
2
|
import { getUncachedEdgeConfigValue } from './edge-config.js';
|
|
3
3
|
import { PREVIEW_TOKEN_COOKIE, PREVIEW_RELEASE_COOKIE, extractPreviewToken, resolvePreviewContext, createPreviewCookies, previewSignKey, } from '../preview/core.js';
|
|
4
4
|
const RELEASE_SCOPED_PREFIX = '/__r';
|
|
5
|
+
const PUBLIC_PATHS = new Set(typeof __ACI_PUBLIC_PATHS__ !== 'undefined' ? __ACI_PUBLIC_PATHS__ : []);
|
|
5
6
|
export function createGradialMiddleware(config = {}) {
|
|
6
7
|
return async function middleware(request) {
|
|
7
8
|
const url = request.nextUrl;
|
|
@@ -13,6 +14,9 @@ export function createGradialMiddleware(config = {}) {
|
|
|
13
14
|
response.cookies.delete(PREVIEW_RELEASE_COOKIE);
|
|
14
15
|
return response;
|
|
15
16
|
}
|
|
17
|
+
if (PUBLIC_PATHS.has(url.pathname)) {
|
|
18
|
+
return NextResponse.next();
|
|
19
|
+
}
|
|
16
20
|
// Block direct access to /__r/... — only middleware rewrites may use it.
|
|
17
21
|
if (isReleaseScopedPath(url.pathname, RELEASE_SCOPED_PREFIX)) {
|
|
18
22
|
return new Response('not found', {
|
|
@@ -199,5 +203,5 @@ function edgeKeySegment(value) {
|
|
|
199
203
|
return value.replace(/[^A-Za-z0-9_-]/g, '_');
|
|
200
204
|
}
|
|
201
205
|
export const config = {
|
|
202
|
-
matcher: ['/((?!_next/
|
|
206
|
+
matcher: ['/((?!_next/).*)'],
|
|
203
207
|
};
|
|
@@ -10,8 +10,9 @@ export interface VideoPlayerProps extends Omit<VideoHTMLAttributes<HTMLVideoElem
|
|
|
10
10
|
* - External embeds (type: text/html, e.g. YouTube) → <iframe>
|
|
11
11
|
*/
|
|
12
12
|
export declare function VideoPlayer({ video, ...attrs }: VideoPlayerProps): import("react").DetailedReactHTMLElement<{
|
|
13
|
-
prefix?: string | undefined | undefined;
|
|
14
13
|
id?: string | undefined | undefined;
|
|
14
|
+
role?: import("react").AriaRole | undefined;
|
|
15
|
+
prefix?: string | undefined | undefined;
|
|
15
16
|
title: string;
|
|
16
17
|
rel?: string | undefined | undefined;
|
|
17
18
|
content?: string | undefined | undefined;
|
|
@@ -39,7 +40,6 @@ export declare function VideoPlayer({ video, ...attrs }: VideoPlayerProps): impo
|
|
|
39
40
|
tabIndex?: number | undefined | undefined;
|
|
40
41
|
translate?: "yes" | "no" | undefined | undefined;
|
|
41
42
|
radioGroup?: string | undefined | undefined;
|
|
42
|
-
role?: import("react").AriaRole | undefined;
|
|
43
43
|
about?: string | undefined | undefined;
|
|
44
44
|
datatype?: string | undefined | undefined;
|
|
45
45
|
inlist?: any;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -12,8 +12,9 @@ export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 's
|
|
|
12
12
|
value?: ImageData;
|
|
13
13
|
}
|
|
14
14
|
export declare function Image({ image, value, ...attrs }: ImageProps): import("react").DetailedReactHTMLElement<import("../types/image.js").ImageAttrs, HTMLElement> | import("react").DetailedReactHTMLElement<{
|
|
15
|
-
prefix?: string | undefined | undefined;
|
|
16
15
|
id?: string | undefined | undefined;
|
|
16
|
+
role?: import("react").AriaRole | undefined;
|
|
17
|
+
prefix?: string | undefined | undefined;
|
|
17
18
|
width?: number | string | undefined | undefined;
|
|
18
19
|
height?: number | string | undefined | undefined;
|
|
19
20
|
srcSet?: string | undefined | undefined;
|
|
@@ -50,7 +51,6 @@ export declare function Image({ image, value, ...attrs }: ImageProps): import("r
|
|
|
50
51
|
tabIndex?: number | undefined | undefined;
|
|
51
52
|
translate?: "yes" | "no" | undefined | undefined;
|
|
52
53
|
radioGroup?: string | undefined | undefined;
|
|
53
|
-
role?: import("react").AriaRole | undefined;
|
|
54
54
|
about?: string | undefined | undefined;
|
|
55
55
|
datatype?: string | undefined | undefined;
|
|
56
56
|
inlist?: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradial/aci",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -119,13 +119,8 @@
|
|
|
119
119
|
"@types/markdown-it": "^14.1.2",
|
|
120
120
|
"@types/sanitize-html": "^2.16.0",
|
|
121
121
|
"@types/ws": "^8.18.0",
|
|
122
|
-
"@vercel/edge-config": "^1.4.3",
|
|
123
|
-
"next": "^15.5.6",
|
|
124
|
-
"react": "^19.0.0",
|
|
125
|
-
"react-dom": "^19.0.0",
|
|
126
122
|
"tsx": "^4.20.0",
|
|
127
123
|
"typescript": "^5.9.3",
|
|
128
|
-
"ws": "^8.18.0",
|
|
129
124
|
"zod": "^4.0.0"
|
|
130
125
|
}
|
|
131
126
|
}
|
|
@@ -81,9 +81,9 @@ checkMissing(
|
|
|
81
81
|
|
|
82
82
|
checkFile(
|
|
83
83
|
'next.config uses withAci',
|
|
84
|
-
'next.config.
|
|
84
|
+
'next.config.mjs',
|
|
85
85
|
(content) => content.includes('withAci'),
|
|
86
|
-
'Expected next.config.
|
|
86
|
+
'Expected next.config.mjs to use withAci() from @gradial/aci/next.',
|
|
87
87
|
);
|
|
88
88
|
|
|
89
89
|
for (const line of checks) {
|
|
@@ -16,18 +16,15 @@
|
|
|
16
16
|
"build:storybook": "storybook build"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@astrojs/node": "^10.1.4",
|
|
19
20
|
"@gradial/aci": "0.1.23",
|
|
20
|
-
"
|
|
21
|
-
"marked": "^18.0.3",
|
|
21
|
+
"astro": "^6.1.9",
|
|
22
22
|
"zod": "^4.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@astrojs/check": "^0.9.8",
|
|
26
|
-
"@astrojs/node": "^10.1.4",
|
|
27
26
|
"@tailwindcss/postcss": "^4.2.4",
|
|
28
|
-
"@types/js-yaml": "^4.0.9",
|
|
29
27
|
"@types/node": "^25.8.0",
|
|
30
|
-
"astro": "^6.1.9",
|
|
31
28
|
"tailwindcss": "^4.2.4",
|
|
32
29
|
"tsx": "^4.20.0",
|
|
33
30
|
"typescript": "5.9.3",
|
|
@@ -18,14 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@gradial/aci": "0.1.23",
|
|
21
|
-
"js-yaml": "^4.1.1",
|
|
22
21
|
"next": "^15.1.6",
|
|
23
22
|
"react": "^19.0.0",
|
|
24
|
-
"react-dom": "^19.0.0"
|
|
25
|
-
"zod": "^4.0.0"
|
|
23
|
+
"react-dom": "^19.0.0"
|
|
26
24
|
},
|
|
27
25
|
"devDependencies": {
|
|
28
|
-
"@types/js-yaml": "^4.0.9",
|
|
29
26
|
"@types/node": "^24.10.1",
|
|
30
27
|
"@types/react": "^19.0.0",
|
|
31
28
|
"@types/react-dom": "^19.0.0",
|
|
@@ -38,6 +35,7 @@
|
|
|
38
35
|
"@tailwindcss/postcss": "^4.2.4",
|
|
39
36
|
"tsx": "^4.20.0",
|
|
40
37
|
"typescript": "5.9.3",
|
|
38
|
+
"zod": "^4.0.0",
|
|
41
39
|
"storybook": "^9.0.0",
|
|
42
40
|
"@storybook/nextjs": "^9.0.0",
|
|
43
41
|
"@storybook/addon-docs": "^9.0.0"
|