@growth-labs/cms 0.5.30 → 0.5.31
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/engine/foundry-dispatch.d.ts +7 -2
- package/dist/engine/foundry-dispatch.d.ts.map +1 -1
- package/dist/engine/foundry-dispatch.js +24 -6
- package/dist/engine/foundry-dispatch.js.map +1 -1
- package/dist/engine/fronts-publish-intent.d.ts +174 -0
- package/dist/engine/fronts-publish-intent.d.ts.map +1 -0
- package/dist/engine/fronts-publish-intent.js +352 -0
- package/dist/engine/fronts-publish-intent.js.map +1 -0
- package/dist/engine/fronts-publish.d.ts +80 -0
- package/dist/engine/fronts-publish.d.ts.map +1 -0
- package/dist/engine/fronts-publish.js +286 -0
- package/dist/engine/fronts-publish.js.map +1 -0
- package/dist/engine/index.d.ts +2 -0
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +5 -0
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/publisher.d.ts.map +1 -1
- package/dist/engine/publisher.js +21 -1
- package/dist/engine/publisher.js.map +1 -1
- package/dist/integration/index.d.ts.map +1 -1
- package/dist/integration/index.js +10 -0
- package/dist/integration/index.js.map +1 -1
- package/dist/routes/fronts-publish.d.ts +10 -0
- package/dist/routes/fronts-publish.d.ts.map +1 -0
- package/dist/routes/fronts-publish.js +250 -0
- package/dist/routes/fronts-publish.js.map +1 -0
- package/dist/routes/index.d.ts +3 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +4 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/schema/layout.d.ts +2 -2
- package/dist/schema/migrations.d.ts.map +1 -1
- package/dist/schema/migrations.js +36 -0
- package/dist/schema/migrations.js.map +1 -1
- package/dist/schema/portable-text.d.ts +2 -2
- package/dist/schema/tables.d.ts +1 -1
- package/dist/schema/tables.d.ts.map +1 -1
- package/dist/schema/tables.js +2 -0
- package/dist/schema/tables.js.map +1 -1
- package/dist/schema/types.d.ts +59 -0
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js.map +1 -1
- package/dist/surveys/schema.d.ts +54 -54
- package/dist/ui/api/fronts/publish-callback.d.ts +3 -0
- package/dist/ui/api/fronts/publish-callback.d.ts.map +1 -0
- package/dist/ui/api/fronts/publish-callback.js +8 -0
- package/dist/ui/api/fronts/publish-callback.js.map +1 -0
- package/dist/ui/api/fronts/schedule.d.ts +3 -0
- package/dist/ui/api/fronts/schedule.d.ts.map +1 -0
- package/dist/ui/api/fronts/schedule.js +8 -0
- package/dist/ui/api/fronts/schedule.js.map +1 -0
- package/migrations/0026_fronts_publish.sql +31 -0
- package/migrations/0027_fronts_publish_intent.sql +44 -0
- package/package.json +1 -1
- package/src/engine/foundry-dispatch.ts +22 -6
- package/src/engine/fronts-publish-intent.ts +676 -0
- package/src/engine/fronts-publish.ts +417 -0
- package/src/engine/index.ts +27 -0
- package/src/engine/publisher.ts +21 -1
- package/src/integration/index.ts +10 -0
- package/src/routes/fronts-publish.ts +292 -0
- package/src/routes/index.ts +8 -0
- package/src/schema/migrations.ts +36 -0
- package/src/schema/tables.ts +2 -0
- package/src/schema/types.ts +61 -0
- package/src/ui/api/fronts/publish-callback.ts +18 -0
- package/src/ui/api/fronts/schedule.ts +18 -0
package/dist/surveys/schema.d.ts
CHANGED
|
@@ -18,8 +18,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
18
18
|
answerCount: z.ZodNumber;
|
|
19
19
|
}, "strict", z.ZodTypeAny, {
|
|
20
20
|
options: string[];
|
|
21
|
-
id: string;
|
|
22
21
|
kind: "single_choice";
|
|
22
|
+
id: string;
|
|
23
23
|
counts: Record<string, number>;
|
|
24
24
|
average: null;
|
|
25
25
|
distribution: null;
|
|
@@ -30,8 +30,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
30
30
|
answerCount: number;
|
|
31
31
|
}, {
|
|
32
32
|
options: string[];
|
|
33
|
-
id: string;
|
|
34
33
|
kind: "single_choice";
|
|
34
|
+
id: string;
|
|
35
35
|
counts: Record<string, number>;
|
|
36
36
|
average: null;
|
|
37
37
|
distribution: null;
|
|
@@ -54,8 +54,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
54
54
|
answerCount: z.ZodNumber;
|
|
55
55
|
}, "strict", z.ZodTypeAny, {
|
|
56
56
|
options: string[];
|
|
57
|
-
id: string;
|
|
58
57
|
kind: "multi_choice";
|
|
58
|
+
id: string;
|
|
59
59
|
counts: Record<string, number>;
|
|
60
60
|
average: null;
|
|
61
61
|
distribution: null;
|
|
@@ -66,8 +66,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
66
66
|
answerCount: number;
|
|
67
67
|
}, {
|
|
68
68
|
options: string[];
|
|
69
|
-
id: string;
|
|
70
69
|
kind: "multi_choice";
|
|
70
|
+
id: string;
|
|
71
71
|
counts: Record<string, number>;
|
|
72
72
|
average: null;
|
|
73
73
|
distribution: null;
|
|
@@ -108,8 +108,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
108
108
|
min: number;
|
|
109
109
|
max: number;
|
|
110
110
|
};
|
|
111
|
-
id: string;
|
|
112
111
|
kind: "scale";
|
|
112
|
+
id: string;
|
|
113
113
|
counts: null;
|
|
114
114
|
average: number | null;
|
|
115
115
|
distribution: Record<string, number>;
|
|
@@ -123,8 +123,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
123
123
|
min: number;
|
|
124
124
|
max: number;
|
|
125
125
|
};
|
|
126
|
-
id: string;
|
|
127
126
|
kind: "scale";
|
|
127
|
+
id: string;
|
|
128
128
|
counts: null;
|
|
129
129
|
average: number | null;
|
|
130
130
|
distribution: Record<string, number>;
|
|
@@ -155,8 +155,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
155
155
|
options: {
|
|
156
156
|
max_length: number;
|
|
157
157
|
};
|
|
158
|
-
id: string;
|
|
159
158
|
kind: "text";
|
|
159
|
+
id: string;
|
|
160
160
|
counts: null;
|
|
161
161
|
average: null;
|
|
162
162
|
distribution: null;
|
|
@@ -169,8 +169,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
169
169
|
options: {
|
|
170
170
|
max_length: number;
|
|
171
171
|
};
|
|
172
|
-
id: string;
|
|
173
172
|
kind: "text";
|
|
173
|
+
id: string;
|
|
174
174
|
counts: null;
|
|
175
175
|
average: null;
|
|
176
176
|
distribution: null;
|
|
@@ -181,8 +181,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
181
181
|
answerCount: number;
|
|
182
182
|
}>]>, {
|
|
183
183
|
options: string[];
|
|
184
|
-
id: string;
|
|
185
184
|
kind: "single_choice";
|
|
185
|
+
id: string;
|
|
186
186
|
counts: Record<string, number>;
|
|
187
187
|
average: null;
|
|
188
188
|
distribution: null;
|
|
@@ -193,8 +193,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
193
193
|
answerCount: number;
|
|
194
194
|
} | {
|
|
195
195
|
options: string[];
|
|
196
|
-
id: string;
|
|
197
196
|
kind: "multi_choice";
|
|
197
|
+
id: string;
|
|
198
198
|
counts: Record<string, number>;
|
|
199
199
|
average: null;
|
|
200
200
|
distribution: null;
|
|
@@ -208,8 +208,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
208
208
|
min: number;
|
|
209
209
|
max: number;
|
|
210
210
|
};
|
|
211
|
-
id: string;
|
|
212
211
|
kind: "scale";
|
|
212
|
+
id: string;
|
|
213
213
|
counts: null;
|
|
214
214
|
average: number | null;
|
|
215
215
|
distribution: Record<string, number>;
|
|
@@ -222,8 +222,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
222
222
|
options: {
|
|
223
223
|
max_length: number;
|
|
224
224
|
};
|
|
225
|
-
id: string;
|
|
226
225
|
kind: "text";
|
|
226
|
+
id: string;
|
|
227
227
|
counts: null;
|
|
228
228
|
average: null;
|
|
229
229
|
distribution: null;
|
|
@@ -234,8 +234,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
234
234
|
answerCount: number;
|
|
235
235
|
}, {
|
|
236
236
|
options: string[];
|
|
237
|
-
id: string;
|
|
238
237
|
kind: "single_choice";
|
|
238
|
+
id: string;
|
|
239
239
|
counts: Record<string, number>;
|
|
240
240
|
average: null;
|
|
241
241
|
distribution: null;
|
|
@@ -246,8 +246,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
246
246
|
answerCount: number;
|
|
247
247
|
} | {
|
|
248
248
|
options: string[];
|
|
249
|
-
id: string;
|
|
250
249
|
kind: "multi_choice";
|
|
250
|
+
id: string;
|
|
251
251
|
counts: Record<string, number>;
|
|
252
252
|
average: null;
|
|
253
253
|
distribution: null;
|
|
@@ -261,8 +261,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
261
261
|
min: number;
|
|
262
262
|
max: number;
|
|
263
263
|
};
|
|
264
|
-
id: string;
|
|
265
264
|
kind: "scale";
|
|
265
|
+
id: string;
|
|
266
266
|
counts: null;
|
|
267
267
|
average: number | null;
|
|
268
268
|
distribution: Record<string, number>;
|
|
@@ -275,8 +275,8 @@ export declare const SurveyQuestionSchema: z.ZodEffects<z.ZodDiscriminatedUnion<
|
|
|
275
275
|
options: {
|
|
276
276
|
max_length: number;
|
|
277
277
|
};
|
|
278
|
-
id: string;
|
|
279
278
|
kind: "text";
|
|
279
|
+
id: string;
|
|
280
280
|
counts: null;
|
|
281
281
|
average: null;
|
|
282
282
|
distribution: null;
|
|
@@ -317,8 +317,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
317
317
|
answerCount: z.ZodNumber;
|
|
318
318
|
}, "strict", z.ZodTypeAny, {
|
|
319
319
|
options: string[];
|
|
320
|
-
id: string;
|
|
321
320
|
kind: "single_choice";
|
|
321
|
+
id: string;
|
|
322
322
|
counts: Record<string, number>;
|
|
323
323
|
average: null;
|
|
324
324
|
distribution: null;
|
|
@@ -329,8 +329,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
329
329
|
answerCount: number;
|
|
330
330
|
}, {
|
|
331
331
|
options: string[];
|
|
332
|
-
id: string;
|
|
333
332
|
kind: "single_choice";
|
|
333
|
+
id: string;
|
|
334
334
|
counts: Record<string, number>;
|
|
335
335
|
average: null;
|
|
336
336
|
distribution: null;
|
|
@@ -353,8 +353,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
353
353
|
answerCount: z.ZodNumber;
|
|
354
354
|
}, "strict", z.ZodTypeAny, {
|
|
355
355
|
options: string[];
|
|
356
|
-
id: string;
|
|
357
356
|
kind: "multi_choice";
|
|
357
|
+
id: string;
|
|
358
358
|
counts: Record<string, number>;
|
|
359
359
|
average: null;
|
|
360
360
|
distribution: null;
|
|
@@ -365,8 +365,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
365
365
|
answerCount: number;
|
|
366
366
|
}, {
|
|
367
367
|
options: string[];
|
|
368
|
-
id: string;
|
|
369
368
|
kind: "multi_choice";
|
|
369
|
+
id: string;
|
|
370
370
|
counts: Record<string, number>;
|
|
371
371
|
average: null;
|
|
372
372
|
distribution: null;
|
|
@@ -407,8 +407,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
407
407
|
min: number;
|
|
408
408
|
max: number;
|
|
409
409
|
};
|
|
410
|
-
id: string;
|
|
411
410
|
kind: "scale";
|
|
411
|
+
id: string;
|
|
412
412
|
counts: null;
|
|
413
413
|
average: number | null;
|
|
414
414
|
distribution: Record<string, number>;
|
|
@@ -422,8 +422,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
422
422
|
min: number;
|
|
423
423
|
max: number;
|
|
424
424
|
};
|
|
425
|
-
id: string;
|
|
426
425
|
kind: "scale";
|
|
426
|
+
id: string;
|
|
427
427
|
counts: null;
|
|
428
428
|
average: number | null;
|
|
429
429
|
distribution: Record<string, number>;
|
|
@@ -454,8 +454,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
454
454
|
options: {
|
|
455
455
|
max_length: number;
|
|
456
456
|
};
|
|
457
|
-
id: string;
|
|
458
457
|
kind: "text";
|
|
458
|
+
id: string;
|
|
459
459
|
counts: null;
|
|
460
460
|
average: null;
|
|
461
461
|
distribution: null;
|
|
@@ -468,8 +468,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
468
468
|
options: {
|
|
469
469
|
max_length: number;
|
|
470
470
|
};
|
|
471
|
-
id: string;
|
|
472
471
|
kind: "text";
|
|
472
|
+
id: string;
|
|
473
473
|
counts: null;
|
|
474
474
|
average: null;
|
|
475
475
|
distribution: null;
|
|
@@ -480,8 +480,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
480
480
|
answerCount: number;
|
|
481
481
|
}>]>, {
|
|
482
482
|
options: string[];
|
|
483
|
-
id: string;
|
|
484
483
|
kind: "single_choice";
|
|
484
|
+
id: string;
|
|
485
485
|
counts: Record<string, number>;
|
|
486
486
|
average: null;
|
|
487
487
|
distribution: null;
|
|
@@ -492,8 +492,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
492
492
|
answerCount: number;
|
|
493
493
|
} | {
|
|
494
494
|
options: string[];
|
|
495
|
-
id: string;
|
|
496
495
|
kind: "multi_choice";
|
|
496
|
+
id: string;
|
|
497
497
|
counts: Record<string, number>;
|
|
498
498
|
average: null;
|
|
499
499
|
distribution: null;
|
|
@@ -507,8 +507,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
507
507
|
min: number;
|
|
508
508
|
max: number;
|
|
509
509
|
};
|
|
510
|
-
id: string;
|
|
511
510
|
kind: "scale";
|
|
511
|
+
id: string;
|
|
512
512
|
counts: null;
|
|
513
513
|
average: number | null;
|
|
514
514
|
distribution: Record<string, number>;
|
|
@@ -521,8 +521,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
521
521
|
options: {
|
|
522
522
|
max_length: number;
|
|
523
523
|
};
|
|
524
|
-
id: string;
|
|
525
524
|
kind: "text";
|
|
525
|
+
id: string;
|
|
526
526
|
counts: null;
|
|
527
527
|
average: null;
|
|
528
528
|
distribution: null;
|
|
@@ -533,8 +533,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
533
533
|
answerCount: number;
|
|
534
534
|
}, {
|
|
535
535
|
options: string[];
|
|
536
|
-
id: string;
|
|
537
536
|
kind: "single_choice";
|
|
537
|
+
id: string;
|
|
538
538
|
counts: Record<string, number>;
|
|
539
539
|
average: null;
|
|
540
540
|
distribution: null;
|
|
@@ -545,8 +545,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
545
545
|
answerCount: number;
|
|
546
546
|
} | {
|
|
547
547
|
options: string[];
|
|
548
|
-
id: string;
|
|
549
548
|
kind: "multi_choice";
|
|
549
|
+
id: string;
|
|
550
550
|
counts: Record<string, number>;
|
|
551
551
|
average: null;
|
|
552
552
|
distribution: null;
|
|
@@ -560,8 +560,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
560
560
|
min: number;
|
|
561
561
|
max: number;
|
|
562
562
|
};
|
|
563
|
-
id: string;
|
|
564
563
|
kind: "scale";
|
|
564
|
+
id: string;
|
|
565
565
|
counts: null;
|
|
566
566
|
average: number | null;
|
|
567
567
|
distribution: Record<string, number>;
|
|
@@ -574,8 +574,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
574
574
|
options: {
|
|
575
575
|
max_length: number;
|
|
576
576
|
};
|
|
577
|
-
id: string;
|
|
578
577
|
kind: "text";
|
|
578
|
+
id: string;
|
|
579
579
|
counts: null;
|
|
580
580
|
average: null;
|
|
581
581
|
distribution: null;
|
|
@@ -613,8 +613,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
613
613
|
questionId: string;
|
|
614
614
|
}>, "many">>;
|
|
615
615
|
}, "strict", z.ZodTypeAny, {
|
|
616
|
-
id: string;
|
|
617
616
|
channel: "email" | "site" | "direct";
|
|
617
|
+
id: string;
|
|
618
618
|
submittedAt: string;
|
|
619
619
|
respondentSegment: "member" | "non_member" | "unknown";
|
|
620
620
|
anonymous: boolean;
|
|
@@ -628,8 +628,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
628
628
|
questionId: string;
|
|
629
629
|
}[] | undefined;
|
|
630
630
|
}, {
|
|
631
|
-
id: string;
|
|
632
631
|
channel: "email" | "site" | "direct";
|
|
632
|
+
id: string;
|
|
633
633
|
submittedAt: string;
|
|
634
634
|
respondentSegment: "member" | "non_member" | "unknown";
|
|
635
635
|
anonymous: boolean;
|
|
@@ -668,8 +668,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
668
668
|
};
|
|
669
669
|
questions: ({
|
|
670
670
|
options: string[];
|
|
671
|
-
id: string;
|
|
672
671
|
kind: "single_choice";
|
|
672
|
+
id: string;
|
|
673
673
|
counts: Record<string, number>;
|
|
674
674
|
average: null;
|
|
675
675
|
distribution: null;
|
|
@@ -680,8 +680,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
680
680
|
answerCount: number;
|
|
681
681
|
} | {
|
|
682
682
|
options: string[];
|
|
683
|
-
id: string;
|
|
684
683
|
kind: "multi_choice";
|
|
684
|
+
id: string;
|
|
685
685
|
counts: Record<string, number>;
|
|
686
686
|
average: null;
|
|
687
687
|
distribution: null;
|
|
@@ -695,8 +695,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
695
695
|
min: number;
|
|
696
696
|
max: number;
|
|
697
697
|
};
|
|
698
|
-
id: string;
|
|
699
698
|
kind: "scale";
|
|
699
|
+
id: string;
|
|
700
700
|
counts: null;
|
|
701
701
|
average: number | null;
|
|
702
702
|
distribution: Record<string, number>;
|
|
@@ -709,8 +709,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
709
709
|
options: {
|
|
710
710
|
max_length: number;
|
|
711
711
|
};
|
|
712
|
-
id: string;
|
|
713
712
|
kind: "text";
|
|
713
|
+
id: string;
|
|
714
714
|
counts: null;
|
|
715
715
|
average: null;
|
|
716
716
|
distribution: null;
|
|
@@ -721,8 +721,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
721
721
|
answerCount: number;
|
|
722
722
|
})[];
|
|
723
723
|
responses: {
|
|
724
|
-
id: string;
|
|
725
724
|
channel: "email" | "site" | "direct";
|
|
725
|
+
id: string;
|
|
726
726
|
submittedAt: string;
|
|
727
727
|
respondentSegment: "member" | "non_member" | "unknown";
|
|
728
728
|
anonymous: boolean;
|
|
@@ -751,8 +751,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
751
751
|
};
|
|
752
752
|
questions: ({
|
|
753
753
|
options: string[];
|
|
754
|
-
id: string;
|
|
755
754
|
kind: "single_choice";
|
|
755
|
+
id: string;
|
|
756
756
|
counts: Record<string, number>;
|
|
757
757
|
average: null;
|
|
758
758
|
distribution: null;
|
|
@@ -763,8 +763,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
763
763
|
answerCount: number;
|
|
764
764
|
} | {
|
|
765
765
|
options: string[];
|
|
766
|
-
id: string;
|
|
767
766
|
kind: "multi_choice";
|
|
767
|
+
id: string;
|
|
768
768
|
counts: Record<string, number>;
|
|
769
769
|
average: null;
|
|
770
770
|
distribution: null;
|
|
@@ -778,8 +778,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
778
778
|
min: number;
|
|
779
779
|
max: number;
|
|
780
780
|
};
|
|
781
|
-
id: string;
|
|
782
781
|
kind: "scale";
|
|
782
|
+
id: string;
|
|
783
783
|
counts: null;
|
|
784
784
|
average: number | null;
|
|
785
785
|
distribution: Record<string, number>;
|
|
@@ -792,8 +792,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
792
792
|
options: {
|
|
793
793
|
max_length: number;
|
|
794
794
|
};
|
|
795
|
-
id: string;
|
|
796
795
|
kind: "text";
|
|
796
|
+
id: string;
|
|
797
797
|
counts: null;
|
|
798
798
|
average: null;
|
|
799
799
|
distribution: null;
|
|
@@ -804,8 +804,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
804
804
|
answerCount: number;
|
|
805
805
|
})[];
|
|
806
806
|
responses: {
|
|
807
|
-
id: string;
|
|
808
807
|
channel: "email" | "site" | "direct";
|
|
808
|
+
id: string;
|
|
809
809
|
submittedAt: string;
|
|
810
810
|
respondentSegment: "member" | "non_member" | "unknown";
|
|
811
811
|
anonymous: boolean;
|
|
@@ -834,8 +834,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
834
834
|
};
|
|
835
835
|
questions: ({
|
|
836
836
|
options: string[];
|
|
837
|
-
id: string;
|
|
838
837
|
kind: "single_choice";
|
|
838
|
+
id: string;
|
|
839
839
|
counts: Record<string, number>;
|
|
840
840
|
average: null;
|
|
841
841
|
distribution: null;
|
|
@@ -846,8 +846,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
846
846
|
answerCount: number;
|
|
847
847
|
} | {
|
|
848
848
|
options: string[];
|
|
849
|
-
id: string;
|
|
850
849
|
kind: "multi_choice";
|
|
850
|
+
id: string;
|
|
851
851
|
counts: Record<string, number>;
|
|
852
852
|
average: null;
|
|
853
853
|
distribution: null;
|
|
@@ -861,8 +861,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
861
861
|
min: number;
|
|
862
862
|
max: number;
|
|
863
863
|
};
|
|
864
|
-
id: string;
|
|
865
864
|
kind: "scale";
|
|
865
|
+
id: string;
|
|
866
866
|
counts: null;
|
|
867
867
|
average: number | null;
|
|
868
868
|
distribution: Record<string, number>;
|
|
@@ -875,8 +875,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
875
875
|
options: {
|
|
876
876
|
max_length: number;
|
|
877
877
|
};
|
|
878
|
-
id: string;
|
|
879
878
|
kind: "text";
|
|
879
|
+
id: string;
|
|
880
880
|
counts: null;
|
|
881
881
|
average: null;
|
|
882
882
|
distribution: null;
|
|
@@ -887,8 +887,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
887
887
|
answerCount: number;
|
|
888
888
|
})[];
|
|
889
889
|
responses: {
|
|
890
|
-
id: string;
|
|
891
890
|
channel: "email" | "site" | "direct";
|
|
891
|
+
id: string;
|
|
892
892
|
submittedAt: string;
|
|
893
893
|
respondentSegment: "member" | "non_member" | "unknown";
|
|
894
894
|
anonymous: boolean;
|
|
@@ -917,8 +917,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
917
917
|
};
|
|
918
918
|
questions: ({
|
|
919
919
|
options: string[];
|
|
920
|
-
id: string;
|
|
921
920
|
kind: "single_choice";
|
|
921
|
+
id: string;
|
|
922
922
|
counts: Record<string, number>;
|
|
923
923
|
average: null;
|
|
924
924
|
distribution: null;
|
|
@@ -929,8 +929,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
929
929
|
answerCount: number;
|
|
930
930
|
} | {
|
|
931
931
|
options: string[];
|
|
932
|
-
id: string;
|
|
933
932
|
kind: "multi_choice";
|
|
933
|
+
id: string;
|
|
934
934
|
counts: Record<string, number>;
|
|
935
935
|
average: null;
|
|
936
936
|
distribution: null;
|
|
@@ -944,8 +944,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
944
944
|
min: number;
|
|
945
945
|
max: number;
|
|
946
946
|
};
|
|
947
|
-
id: string;
|
|
948
947
|
kind: "scale";
|
|
948
|
+
id: string;
|
|
949
949
|
counts: null;
|
|
950
950
|
average: number | null;
|
|
951
951
|
distribution: Record<string, number>;
|
|
@@ -958,8 +958,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
958
958
|
options: {
|
|
959
959
|
max_length: number;
|
|
960
960
|
};
|
|
961
|
-
id: string;
|
|
962
961
|
kind: "text";
|
|
962
|
+
id: string;
|
|
963
963
|
counts: null;
|
|
964
964
|
average: null;
|
|
965
965
|
distribution: null;
|
|
@@ -970,8 +970,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
|
|
|
970
970
|
answerCount: number;
|
|
971
971
|
})[];
|
|
972
972
|
responses: {
|
|
973
|
-
id: string;
|
|
974
973
|
channel: "email" | "site" | "direct";
|
|
974
|
+
id: string;
|
|
975
975
|
submittedAt: string;
|
|
976
976
|
respondentSegment: "member" | "non_member" | "unknown";
|
|
977
977
|
anonymous: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-callback.d.ts","sourceRoot":"","sources":["../../../../src/ui/api/fronts/publish-callback.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAUvC,eAAO,MAAM,IAAI,GAAI,GAAG,UAAU,sBACgD,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createFrontsPublishRoutes } from '../../../routes/fronts-publish.js';
|
|
2
|
+
import { buildSiteAuthz } from '../_authz.js';
|
|
3
|
+
function toCtx(c) {
|
|
4
|
+
const env = c.locals.cmsEnv ?? {};
|
|
5
|
+
return { request: c.request, params: {}, db: env.SITE_DB, env };
|
|
6
|
+
}
|
|
7
|
+
export const POST = (c) => createFrontsPublishRoutes({ authz: buildSiteAuthz(c) }).publishCallback(toCtx(c));
|
|
8
|
+
//# sourceMappingURL=publish-callback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-callback.js","sourceRoot":"","sources":["../../../../src/ui/api/fronts/publish-callback.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,SAAS,KAAK,CAAC,CAAa;IAC3B,MAAM,GAAG,GAAI,CAAC,CAAC,MAA+C,CAAC,MAAM,IAAI,EAAE,CAAA;IAC3E,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,OAA6B,EAAE,GAAG,EAAE,CAAA;AACtF,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAa,EAAE,EAAE,CACrC,yBAAyB,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../../src/ui/api/fronts/schedule.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAUvC,eAAO,MAAM,GAAG,GAAI,GAAG,UAAU,sBAC0C,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createFrontsPublishRoutes } from '../../../routes/fronts-publish.js';
|
|
2
|
+
import { buildSiteAuthz } from '../_authz.js';
|
|
3
|
+
function toCtx(c) {
|
|
4
|
+
const env = c.locals.cmsEnv ?? {};
|
|
5
|
+
return { request: c.request, params: {}, db: env.SITE_DB, env };
|
|
6
|
+
}
|
|
7
|
+
export const GET = (c) => createFrontsPublishRoutes({ authz: buildSiteAuthz(c) }).schedule(toCtx(c));
|
|
8
|
+
//# sourceMappingURL=schedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../../src/ui/api/fronts/schedule.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,SAAS,KAAK,CAAC,CAAa;IAC3B,MAAM,GAAG,GAAI,CAAC,CAAC,MAA+C,CAAC,MAAM,IAAI,EAAE,CAAA;IAC3E,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,OAA6B,EAAE,GAAG,EAAE,CAAA;AACtF,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAa,EAAE,EAAE,CACpC,yBAAyB,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
-- 0026_fronts_publish: additive, flag-gated Fronts publish path (foundryd).
|
|
2
|
+
--
|
|
3
|
+
-- Adds the item-level lifecycle marker driven by foundryd's outbound
|
|
4
|
+
-- publish-callbacks, and a durable, event_id-keyed receiver log for those
|
|
5
|
+
-- callbacks (idempotency + receipt audit). The legacy D1 cron publish path
|
|
6
|
+
-- (content_items.status='scheduled' -> 'published') is UNTOUCHED and remains
|
|
7
|
+
-- the rollback lever. Only a confirmed `live` callback (with a receipt) drives
|
|
8
|
+
-- the item to published, through the existing content_publication_attempts 2PC
|
|
9
|
+
-- ledger.
|
|
10
|
+
|
|
11
|
+
ALTER TABLE content_items
|
|
12
|
+
ADD COLUMN fronts_publish_status TEXT
|
|
13
|
+
CHECK (fronts_publish_status IS NULL OR fronts_publish_status IN ('queued','publishing','live','late','failed'));
|
|
14
|
+
|
|
15
|
+
CREATE TABLE fronts_publish_events (
|
|
16
|
+
event_id TEXT PRIMARY KEY,
|
|
17
|
+
intent_id TEXT,
|
|
18
|
+
content_id TEXT NOT NULL,
|
|
19
|
+
version INTEGER,
|
|
20
|
+
correlation_id TEXT,
|
|
21
|
+
status TEXT NOT NULL CHECK (status IN ('queued','publishing','live','late','failed')),
|
|
22
|
+
occurred_at INTEGER,
|
|
23
|
+
receipt_json TEXT,
|
|
24
|
+
error TEXT,
|
|
25
|
+
published INTEGER NOT NULL DEFAULT 0,
|
|
26
|
+
attempt_id TEXT,
|
|
27
|
+
received_at INTEGER NOT NULL DEFAULT (unixepoch()),
|
|
28
|
+
FOREIGN KEY (content_id) REFERENCES content_items(id) ON DELETE CASCADE
|
|
29
|
+
);
|
|
30
|
+
CREATE INDEX idx_fronts_publish_events_content ON fronts_publish_events(content_id, received_at DESC);
|
|
31
|
+
CREATE INDEX idx_fronts_publish_events_intent ON fronts_publish_events(intent_id);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
-- 0027_fronts_publish_intent: the CMS-owned canonical values a pull consumer
|
|
2
|
+
-- needs to build a complete Fronts publish intent (packages#500).
|
|
3
|
+
--
|
|
4
|
+
-- The 0026 schedule poll returned only presentation columns (id/type/slug/
|
|
5
|
+
-- title/channel/publish_at/status), so a consumer could not construct
|
|
6
|
+
-- `intent_id = masthead:<content_id>:<version>` or resolve publish targets and
|
|
7
|
+
-- media without inventing values. These three columns are the authoritative
|
|
8
|
+
-- CMS storage for the three values that had no source at all.
|
|
9
|
+
--
|
|
10
|
+
-- canonical_version Monotonic integer revision of the item's
|
|
11
|
+
-- canonical content. Starts at 1 on create and
|
|
12
|
+
-- is advanced by exactly one seam
|
|
13
|
+
-- (updateContentItem's base content_items
|
|
14
|
+
-- UPDATE). Deliberately NOT advanced by
|
|
15
|
+
-- fronts_publish_status marker writes or by
|
|
16
|
+
-- polling, so an intent identity is stable for
|
|
17
|
+
-- as long as the canonical content is.
|
|
18
|
+
--
|
|
19
|
+
-- fronts_channel_targets JSON array of publish target slugs for the
|
|
20
|
+
-- out-of-process publish path. NULL means "not
|
|
21
|
+
-- armed": hydration fails loudly rather than
|
|
22
|
+
-- emitting an empty target list that would read
|
|
23
|
+
-- as a complete intent with nothing to publish.
|
|
24
|
+
-- This is NOT content_items.channel, which is
|
|
25
|
+
-- the single editorial Fronts channel slug.
|
|
26
|
+
--
|
|
27
|
+
-- fronts_publish_trigger_token Raw CMS-owned per-item publish trigger token,
|
|
28
|
+
-- secret at rest exactly like
|
|
29
|
+
-- video_content.processing_trigger_token
|
|
30
|
+
-- (migration 0006). The read contract NEVER
|
|
31
|
+
-- returns it; it returns only
|
|
32
|
+
-- `sha256:<hex>` computed from it.
|
|
33
|
+
--
|
|
34
|
+
-- Additive and backwards compatible: every existing row keeps working on the
|
|
35
|
+
-- untouched legacy D1 cron publish path, which remains the rollback lever.
|
|
36
|
+
|
|
37
|
+
ALTER TABLE content_items
|
|
38
|
+
ADD COLUMN canonical_version INTEGER NOT NULL DEFAULT 1;
|
|
39
|
+
|
|
40
|
+
ALTER TABLE content_items
|
|
41
|
+
ADD COLUMN fronts_channel_targets TEXT;
|
|
42
|
+
|
|
43
|
+
ALTER TABLE content_items
|
|
44
|
+
ADD COLUMN fronts_publish_trigger_token TEXT;
|