@growth-labs/cms 0.8.3 → 0.8.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.
Files changed (48) hide show
  1. package/dist/engine/foundry-dispatch.d.ts.map +1 -1
  2. package/dist/engine/foundry-dispatch.js +47 -24
  3. package/dist/engine/foundry-dispatch.js.map +1 -1
  4. package/dist/engine/fronts-publish-intent.d.ts.map +1 -1
  5. package/dist/engine/fronts-publish-intent.js +8 -4
  6. package/dist/engine/fronts-publish-intent.js.map +1 -1
  7. package/dist/engine/fronts-publish.d.ts.map +1 -1
  8. package/dist/engine/fronts-publish.js +29 -6
  9. package/dist/engine/fronts-publish.js.map +1 -1
  10. package/dist/engine/index.d.ts +1 -1
  11. package/dist/engine/index.d.ts.map +1 -1
  12. package/dist/engine/index.js +1 -1
  13. package/dist/engine/index.js.map +1 -1
  14. package/dist/engine/publication-current-guard.d.ts +7 -0
  15. package/dist/engine/publication-current-guard.d.ts.map +1 -1
  16. package/dist/engine/publication-current-guard.js +66 -0
  17. package/dist/engine/publication-current-guard.js.map +1 -1
  18. package/dist/engine/publication.d.ts +30 -0
  19. package/dist/engine/publication.d.ts.map +1 -1
  20. package/dist/engine/publication.js +306 -34
  21. package/dist/engine/publication.js.map +1 -1
  22. package/dist/engine/publisher.d.ts.map +1 -1
  23. package/dist/engine/publisher.js +17 -11
  24. package/dist/engine/publisher.js.map +1 -1
  25. package/dist/routes/content.d.ts.map +1 -1
  26. package/dist/routes/content.js +20 -5
  27. package/dist/routes/content.js.map +1 -1
  28. package/dist/schema/insights-ingest.d.ts +42 -42
  29. package/dist/schema/migrations.d.ts.map +1 -1
  30. package/dist/schema/migrations.js +12 -0
  31. package/dist/schema/migrations.js.map +1 -1
  32. package/dist/schema/types.d.ts +8 -0
  33. package/dist/schema/types.d.ts.map +1 -1
  34. package/dist/schema/types.js.map +1 -1
  35. package/dist/surveys/schema.d.ts +48 -48
  36. package/migrations/0030_media_publication_guard.sql +5 -0
  37. package/migrations/0031_podcast_processing_error.sql +2 -0
  38. package/package.json +1 -1
  39. package/src/engine/foundry-dispatch.ts +93 -35
  40. package/src/engine/fronts-publish-intent.ts +8 -4
  41. package/src/engine/fronts-publish.ts +46 -7
  42. package/src/engine/index.ts +3 -0
  43. package/src/engine/publication-current-guard.ts +86 -0
  44. package/src/engine/publication.ts +411 -59
  45. package/src/engine/publisher.ts +19 -9
  46. package/src/routes/content.ts +23 -5
  47. package/src/schema/migrations.ts +12 -0
  48. package/src/schema/types.ts +8 -0
@@ -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
- kind: "single_choice";
22
21
  id: string;
22
+ kind: "single_choice";
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
- kind: "single_choice";
34
33
  id: string;
34
+ kind: "single_choice";
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
- kind: "multi_choice";
58
57
  id: string;
58
+ kind: "multi_choice";
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
- kind: "multi_choice";
70
69
  id: string;
70
+ kind: "multi_choice";
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
- kind: "scale";
112
111
  id: string;
112
+ kind: "scale";
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
- kind: "scale";
127
126
  id: string;
127
+ kind: "scale";
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
- kind: "text";
159
158
  id: string;
159
+ kind: "text";
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
- kind: "text";
173
172
  id: string;
173
+ kind: "text";
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
- kind: "single_choice";
185
184
  id: string;
185
+ kind: "single_choice";
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
- kind: "multi_choice";
197
196
  id: string;
197
+ kind: "multi_choice";
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
- kind: "scale";
212
211
  id: string;
212
+ kind: "scale";
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
- kind: "text";
226
225
  id: string;
226
+ kind: "text";
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
- kind: "single_choice";
238
237
  id: string;
238
+ kind: "single_choice";
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
- kind: "multi_choice";
250
249
  id: string;
250
+ kind: "multi_choice";
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
- kind: "scale";
265
264
  id: string;
265
+ kind: "scale";
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
- kind: "text";
279
278
  id: string;
279
+ kind: "text";
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
- kind: "single_choice";
321
320
  id: string;
321
+ kind: "single_choice";
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
- kind: "single_choice";
333
332
  id: string;
333
+ kind: "single_choice";
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
- kind: "multi_choice";
357
356
  id: string;
357
+ kind: "multi_choice";
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
- kind: "multi_choice";
369
368
  id: string;
369
+ kind: "multi_choice";
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
- kind: "scale";
411
410
  id: string;
411
+ kind: "scale";
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
- kind: "scale";
426
425
  id: string;
426
+ kind: "scale";
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
- kind: "text";
458
457
  id: string;
458
+ kind: "text";
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
- kind: "text";
472
471
  id: string;
472
+ kind: "text";
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
- kind: "single_choice";
484
483
  id: string;
484
+ kind: "single_choice";
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
- kind: "multi_choice";
496
495
  id: string;
496
+ kind: "multi_choice";
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
- kind: "scale";
511
510
  id: string;
511
+ kind: "scale";
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
- kind: "text";
525
524
  id: string;
525
+ kind: "text";
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
- kind: "single_choice";
537
536
  id: string;
537
+ kind: "single_choice";
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
- kind: "multi_choice";
549
548
  id: string;
549
+ kind: "multi_choice";
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
- kind: "scale";
564
563
  id: string;
564
+ kind: "scale";
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
- kind: "text";
578
577
  id: string;
578
+ kind: "text";
579
579
  counts: null;
580
580
  average: null;
581
581
  distribution: null;
@@ -668,8 +668,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
668
668
  };
669
669
  questions: ({
670
670
  options: string[];
671
- kind: "single_choice";
672
671
  id: string;
672
+ kind: "single_choice";
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
- kind: "multi_choice";
684
683
  id: string;
684
+ kind: "multi_choice";
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
- kind: "scale";
699
698
  id: string;
699
+ kind: "scale";
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
- kind: "text";
713
712
  id: string;
713
+ kind: "text";
714
714
  counts: null;
715
715
  average: null;
716
716
  distribution: null;
@@ -751,8 +751,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
751
751
  };
752
752
  questions: ({
753
753
  options: string[];
754
- kind: "single_choice";
755
754
  id: string;
755
+ kind: "single_choice";
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
- kind: "multi_choice";
767
766
  id: string;
767
+ kind: "multi_choice";
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
- kind: "scale";
782
781
  id: string;
782
+ kind: "scale";
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
- kind: "text";
796
795
  id: string;
796
+ kind: "text";
797
797
  counts: null;
798
798
  average: null;
799
799
  distribution: null;
@@ -834,8 +834,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
834
834
  };
835
835
  questions: ({
836
836
  options: string[];
837
- kind: "single_choice";
838
837
  id: string;
838
+ kind: "single_choice";
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
- kind: "multi_choice";
850
849
  id: string;
850
+ kind: "multi_choice";
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
- kind: "scale";
865
864
  id: string;
865
+ kind: "scale";
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
- kind: "text";
879
878
  id: string;
879
+ kind: "text";
880
880
  counts: null;
881
881
  average: null;
882
882
  distribution: null;
@@ -917,8 +917,8 @@ export declare const SurveyResultsSchema: z.ZodEffects<z.ZodObject<{
917
917
  };
918
918
  questions: ({
919
919
  options: string[];
920
- kind: "single_choice";
921
920
  id: string;
921
+ kind: "single_choice";
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
- kind: "multi_choice";
933
932
  id: string;
933
+ kind: "multi_choice";
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
- kind: "scale";
948
947
  id: string;
948
+ kind: "scale";
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
- kind: "text";
962
961
  id: string;
962
+ kind: "text";
963
963
  counts: null;
964
964
  average: null;
965
965
  distribution: null;
@@ -0,0 +1,5 @@
1
+ -- Capture-time authorization for replacing media in an existing publication.
2
+ -- Historical captures remain unauthorized; only a new explicit capture fills it.
3
+ ALTER TABLE video_content ADD COLUMN processing_publication_guard TEXT;
4
+ ALTER TABLE podcast_content ADD COLUMN processing_publication_guard TEXT;
5
+ ALTER TABLE podcast_content ADD COLUMN processing_state TEXT CHECK (processing_state IS NULL OR processing_state IN ('pending','queued','fetching','transcribing','transcoding','ready','failed'));
@@ -0,0 +1,2 @@
1
+ -- Preserve the current preparation failure cause for the existing editor status.
2
+ ALTER TABLE podcast_content ADD COLUMN processing_error TEXT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@growth-labs/cms",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "growth-labs-cms-migrations": "./dist/cli/migrations.js"