@prismicio/types-internal 3.7.0 → 3.8.0

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 (33) hide show
  1. package/lib/content/Document.d.ts +114 -42
  2. package/lib/content/fields/RepeatableContent.d.ts +45 -47
  3. package/lib/content/fields/WidgetContent.d.ts +114 -42
  4. package/lib/content/fields/nestable/LinkContent.js +4 -16
  5. package/lib/content/fields/nestable/NestableContent.d.ts +19 -7
  6. package/lib/content/fields/nestable/RichTextContent/TextBlock.d.ts +192 -55
  7. package/lib/content/fields/nestable/RichTextContent/TextBlock.js +10 -10
  8. package/lib/content/fields/nestable/TableContent.d.ts +25 -9
  9. package/lib/content/fields/nestable/TableContent.js +8 -8
  10. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +38 -14
  11. package/lib/content/fields/slices/Slice/RepeatableContent.d.ts +7 -3
  12. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +38 -14
  13. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +19 -7
  14. package/lib/content/fields/slices/Slice/SlicePrimaryContent.d.ts +19 -7
  15. package/lib/content/fields/slices/Slice/index.d.ts +65 -25
  16. package/lib/content/fields/slices/SliceItem.d.ts +65 -25
  17. package/lib/content/fields/slices/SlicesContent.d.ts +95 -35
  18. package/lib/content/utils.d.ts +4 -0
  19. package/lib/content/utils.js +16 -1
  20. package/lib/customtypes/widgets/slices/SliceWidget.d.ts +327 -0
  21. package/lib/customtypes/widgets/slices/SliceWidget.js +8 -0
  22. package/package.json +1 -1
  23. package/src/content/fields/nestable/LinkContent.ts +1 -20
  24. package/src/content/fields/nestable/TableContent.ts +37 -29
  25. package/src/content/utils.ts +20 -0
  26. package/lib/content/fields/nestable/RichTextContent/Block.d.ts +0 -1036
  27. package/lib/content/fields/nestable/RichTextContent/Block.js +0 -31
  28. package/lib/content/fields/nestable/RichTextContent/EmbedBlock.d.ts +0 -60
  29. package/lib/content/fields/nestable/RichTextContent/EmbedBlock.js +0 -53
  30. package/lib/content/fields/nestable/RichTextContent/ImageBlock.d.ts +0 -203
  31. package/lib/content/fields/nestable/RichTextContent/ImageBlock.js +0 -36
  32. package/lib/content/fields/nestable/RichTextContent/TableBlock.d.ts +0 -500
  33. package/lib/content/fields/nestable/RichTextContent/TableBlock.js +0 -21
@@ -431,9 +431,13 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
431
431
  __TYPE__: t.LiteralC<"SeparatorContent">;
432
432
  }>>, t.ExactC<t.TypeC<{
433
433
  __TYPE__: t.LiteralC<"TableContent">;
434
- content: t.ArrayC<t.ExactC<t.TypeC<{
434
+ content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
435
+ key: t.Type<string, string, unknown>;
436
+ }>>, t.ExactC<t.TypeC<{
435
437
  type: t.LiteralC<"tableRow">;
436
438
  content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
439
+ key: t.Type<string, string, unknown>;
440
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
437
441
  type: t.UnionC<[t.LiteralC<"tableHeader">, t.LiteralC<"tableCell">]>;
438
442
  content: t.ExactC<t.TypeC<{
439
443
  __TYPE__: t.LiteralC<"StructuredTextContent">;
@@ -677,8 +681,8 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
677
681
  }>>;
678
682
  }>>, t.ExactC<t.PartialC<{
679
683
  columnWidth: t.NumberC;
680
- }>>]>>;
681
- }>>>;
684
+ }>>]>]>>;
685
+ }>>]>>;
682
686
  }>>, t.ExactC<t.TypeC<{
683
687
  __TYPE__: t.LiteralC<"RepeatableContent">;
684
688
  type: t.LiteralC<"Link">;
@@ -1201,9 +1205,13 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
1201
1205
  __TYPE__: t.LiteralC<"SeparatorContent">;
1202
1206
  }>>, t.ExactC<t.TypeC<{
1203
1207
  __TYPE__: t.LiteralC<"TableContent">;
1204
- content: t.ArrayC<t.ExactC<t.TypeC<{
1208
+ content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
1209
+ key: t.Type<string, string, unknown>;
1210
+ }>>, t.ExactC<t.TypeC<{
1205
1211
  type: t.LiteralC<"tableRow">;
1206
1212
  content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
1213
+ key: t.Type<string, string, unknown>;
1214
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
1207
1215
  type: t.UnionC<[t.LiteralC<"tableHeader">, t.LiteralC<"tableCell">]>;
1208
1216
  content: t.ExactC<t.TypeC<{
1209
1217
  __TYPE__: t.LiteralC<"StructuredTextContent">;
@@ -1447,8 +1455,8 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
1447
1455
  }>>;
1448
1456
  }>>, t.ExactC<t.PartialC<{
1449
1457
  columnWidth: t.NumberC;
1450
- }>>]>>;
1451
- }>>>;
1458
+ }>>]>]>>;
1459
+ }>>]>>;
1452
1460
  }>>, t.ExactC<t.TypeC<{
1453
1461
  __TYPE__: t.LiteralC<"RepeatableContent">;
1454
1462
  type: t.LiteralC<"Link">;
@@ -1963,9 +1971,13 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
1963
1971
  __TYPE__: t.LiteralC<"SeparatorContent">;
1964
1972
  }>>, t.ExactC<t.TypeC<{
1965
1973
  __TYPE__: t.LiteralC<"TableContent">;
1966
- content: t.ArrayC<t.ExactC<t.TypeC<{
1974
+ content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
1975
+ key: t.Type<string, string, unknown>;
1976
+ }>>, t.ExactC<t.TypeC<{
1967
1977
  type: t.LiteralC<"tableRow">;
1968
1978
  content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
1979
+ key: t.Type<string, string, unknown>;
1980
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
1969
1981
  type: t.UnionC<[t.LiteralC<"tableHeader">, t.LiteralC<"tableCell">]>;
1970
1982
  content: t.ExactC<t.TypeC<{
1971
1983
  __TYPE__: t.LiteralC<"StructuredTextContent">;
@@ -2209,8 +2221,8 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
2209
2221
  }>>;
2210
2222
  }>>, t.ExactC<t.PartialC<{
2211
2223
  columnWidth: t.NumberC;
2212
- }>>]>>;
2213
- }>>>;
2224
+ }>>]>]>>;
2225
+ }>>]>>;
2214
2226
  }>>, t.ExactC<t.TypeC<{
2215
2227
  __TYPE__: t.LiteralC<"RepeatableContent">;
2216
2228
  type: t.LiteralC<"Link">;
@@ -2727,9 +2739,13 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
2727
2739
  __TYPE__: t.LiteralC<"SeparatorContent">;
2728
2740
  }>>, t.ExactC<t.TypeC<{
2729
2741
  __TYPE__: t.LiteralC<"TableContent">;
2730
- content: t.ArrayC<t.ExactC<t.TypeC<{
2742
+ content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
2743
+ key: t.Type<string, string, unknown>;
2744
+ }>>, t.ExactC<t.TypeC<{
2731
2745
  type: t.LiteralC<"tableRow">;
2732
2746
  content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
2747
+ key: t.Type<string, string, unknown>;
2748
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
2733
2749
  type: t.UnionC<[t.LiteralC<"tableHeader">, t.LiteralC<"tableCell">]>;
2734
2750
  content: t.ExactC<t.TypeC<{
2735
2751
  __TYPE__: t.LiteralC<"StructuredTextContent">;
@@ -2973,8 +2989,8 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
2973
2989
  }>>;
2974
2990
  }>>, t.ExactC<t.PartialC<{
2975
2991
  columnWidth: t.NumberC;
2976
- }>>]>>;
2977
- }>>>;
2992
+ }>>]>]>>;
2993
+ }>>]>>;
2978
2994
  }>>, t.ExactC<t.TypeC<{
2979
2995
  __TYPE__: t.LiteralC<"RepeatableContent">;
2980
2996
  type: t.LiteralC<"Link">;
@@ -3489,9 +3505,13 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
3489
3505
  __TYPE__: t.LiteralC<"SeparatorContent">;
3490
3506
  }>>, t.ExactC<t.TypeC<{
3491
3507
  __TYPE__: t.LiteralC<"TableContent">;
3492
- content: t.ArrayC<t.ExactC<t.TypeC<{
3508
+ content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
3509
+ key: t.Type<string, string, unknown>;
3510
+ }>>, t.ExactC<t.TypeC<{
3493
3511
  type: t.LiteralC<"tableRow">;
3494
3512
  content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
3513
+ key: t.Type<string, string, unknown>;
3514
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
3495
3515
  type: t.UnionC<[t.LiteralC<"tableHeader">, t.LiteralC<"tableCell">]>;
3496
3516
  content: t.ExactC<t.TypeC<{
3497
3517
  __TYPE__: t.LiteralC<"StructuredTextContent">;
@@ -3735,8 +3755,8 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
3735
3755
  }>>;
3736
3756
  }>>, t.ExactC<t.PartialC<{
3737
3757
  columnWidth: t.NumberC;
3738
- }>>]>>;
3739
- }>>>;
3758
+ }>>]>]>>;
3759
+ }>>]>>;
3740
3760
  }>>, t.ExactC<t.TypeC<{
3741
3761
  __TYPE__: t.LiteralC<"RepeatableContent">;
3742
3762
  type: t.LiteralC<"Link">;
@@ -4250,9 +4270,13 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
4250
4270
  __TYPE__: t.LiteralC<"SeparatorContent">;
4251
4271
  }>>, t.ExactC<t.TypeC<{
4252
4272
  __TYPE__: t.LiteralC<"TableContent">;
4253
- content: t.ArrayC<t.ExactC<t.TypeC<{
4273
+ content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
4274
+ key: t.Type<string, string, unknown>;
4275
+ }>>, t.ExactC<t.TypeC<{
4254
4276
  type: t.LiteralC<"tableRow">;
4255
4277
  content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
4278
+ key: t.Type<string, string, unknown>;
4279
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
4256
4280
  type: t.UnionC<[t.LiteralC<"tableHeader">, t.LiteralC<"tableCell">]>;
4257
4281
  content: t.ExactC<t.TypeC<{
4258
4282
  __TYPE__: t.LiteralC<"StructuredTextContent">;
@@ -4496,8 +4520,8 @@ export declare const WidgetContent: t.UnionC<[t.Type<GroupContent, GroupContent,
4496
4520
  }>>;
4497
4521
  }>>, t.ExactC<t.PartialC<{
4498
4522
  columnWidth: t.NumberC;
4499
- }>>]>>;
4500
- }>>>;
4523
+ }>>]>]>>;
4524
+ }>>]>>;
4501
4525
  }>>, t.ExactC<t.TypeC<{
4502
4526
  __TYPE__: t.LiteralC<"RepeatableContent">;
4503
4527
  type: t.LiteralC<"Link">;
@@ -5005,9 +5029,13 @@ export declare const isWidgetContent: (u: unknown) => u is {
5005
5029
  __TYPE__: "SeparatorContent";
5006
5030
  } | {
5007
5031
  __TYPE__: "TableContent";
5008
- content: {
5032
+ content: ({
5033
+ key: string;
5034
+ } & {
5009
5035
  type: "tableRow";
5010
5036
  content: ({
5037
+ key: string;
5038
+ } & {
5011
5039
  type: "tableHeader" | "tableCell";
5012
5040
  content: {
5013
5041
  __TYPE__: "StructuredTextContent";
@@ -5166,7 +5194,7 @@ export declare const isWidgetContent: (u: unknown) => u is {
5166
5194
  } & {
5167
5195
  columnWidth?: number;
5168
5196
  })[];
5169
- }[];
5197
+ })[];
5170
5198
  } | {
5171
5199
  __TYPE__: "UIDContent";
5172
5200
  value: string;
@@ -5599,9 +5627,13 @@ export declare const isWidgetContent: (u: unknown) => u is {
5599
5627
  __TYPE__: "SeparatorContent";
5600
5628
  } | {
5601
5629
  __TYPE__: "TableContent";
5602
- content: {
5630
+ content: ({
5631
+ key: string;
5632
+ } & {
5603
5633
  type: "tableRow";
5604
5634
  content: ({
5635
+ key: string;
5636
+ } & {
5605
5637
  type: "tableHeader" | "tableCell";
5606
5638
  content: {
5607
5639
  __TYPE__: "StructuredTextContent";
@@ -5760,7 +5792,7 @@ export declare const isWidgetContent: (u: unknown) => u is {
5760
5792
  } & {
5761
5793
  columnWidth?: number;
5762
5794
  })[];
5763
- }[];
5795
+ })[];
5764
5796
  } | {
5765
5797
  __TYPE__: "CompositeSliceContent";
5766
5798
  nonRepeat: {
@@ -6187,9 +6219,13 @@ export declare const isWidgetContent: (u: unknown) => u is {
6187
6219
  __TYPE__: "SeparatorContent";
6188
6220
  } | {
6189
6221
  __TYPE__: "TableContent";
6190
- content: {
6222
+ content: ({
6223
+ key: string;
6224
+ } & {
6191
6225
  type: "tableRow";
6192
6226
  content: ({
6227
+ key: string;
6228
+ } & {
6193
6229
  type: "tableHeader" | "tableCell";
6194
6230
  content: {
6195
6231
  __TYPE__: "StructuredTextContent";
@@ -6348,7 +6384,7 @@ export declare const isWidgetContent: (u: unknown) => u is {
6348
6384
  } & {
6349
6385
  columnWidth?: number;
6350
6386
  })[];
6351
- }[];
6387
+ })[];
6352
6388
  };
6353
6389
  };
6354
6390
  repeat: {
@@ -6776,9 +6812,13 @@ export declare const isWidgetContent: (u: unknown) => u is {
6776
6812
  __TYPE__: "SeparatorContent";
6777
6813
  } | {
6778
6814
  __TYPE__: "TableContent";
6779
- content: {
6815
+ content: ({
6816
+ key: string;
6817
+ } & {
6780
6818
  type: "tableRow";
6781
6819
  content: ({
6820
+ key: string;
6821
+ } & {
6782
6822
  type: "tableHeader" | "tableCell";
6783
6823
  content: {
6784
6824
  __TYPE__: "StructuredTextContent";
@@ -6937,7 +6977,7 @@ export declare const isWidgetContent: (u: unknown) => u is {
6937
6977
  } & {
6938
6978
  columnWidth?: number;
6939
6979
  })[];
6940
- }[];
6980
+ })[];
6941
6981
  }][];
6942
6982
  }[];
6943
6983
  } | {
@@ -7367,9 +7407,13 @@ export declare const isWidgetContent: (u: unknown) => u is {
7367
7407
  __TYPE__: "SeparatorContent";
7368
7408
  } | {
7369
7409
  __TYPE__: "TableContent";
7370
- content: {
7410
+ content: ({
7411
+ key: string;
7412
+ } & {
7371
7413
  type: "tableRow";
7372
7414
  content: ({
7415
+ key: string;
7416
+ } & {
7373
7417
  type: "tableHeader" | "tableCell";
7374
7418
  content: {
7375
7419
  __TYPE__: "StructuredTextContent";
@@ -7528,7 +7572,7 @@ export declare const isWidgetContent: (u: unknown) => u is {
7528
7572
  } & {
7529
7573
  columnWidth?: number;
7530
7574
  })[];
7531
- }[];
7575
+ })[];
7532
7576
  };
7533
7577
  };
7534
7578
  items: {
@@ -7956,9 +8000,13 @@ export declare const isWidgetContent: (u: unknown) => u is {
7956
8000
  __TYPE__: "SeparatorContent";
7957
8001
  } | {
7958
8002
  __TYPE__: "TableContent";
7959
- content: {
8003
+ content: ({
8004
+ key: string;
8005
+ } & {
7960
8006
  type: "tableRow";
7961
8007
  content: ({
8008
+ key: string;
8009
+ } & {
7962
8010
  type: "tableHeader" | "tableCell";
7963
8011
  content: {
7964
8012
  __TYPE__: "StructuredTextContent";
@@ -8117,7 +8165,7 @@ export declare const isWidgetContent: (u: unknown) => u is {
8117
8165
  } & {
8118
8166
  columnWidth?: number;
8119
8167
  })[];
8120
- }[];
8168
+ })[];
8121
8169
  }][];
8122
8170
  }[];
8123
8171
  };
@@ -8549,9 +8597,13 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
8549
8597
  __TYPE__: "SeparatorContent";
8550
8598
  }> | import("fp-ts/lib/Either").Right<{
8551
8599
  __TYPE__: "TableContent";
8552
- content: {
8600
+ content: ({
8601
+ key: string;
8602
+ } & {
8553
8603
  type: "tableRow";
8554
8604
  content: ({
8605
+ key: string;
8606
+ } & {
8555
8607
  type: "tableHeader" | "tableCell";
8556
8608
  content: {
8557
8609
  __TYPE__: "StructuredTextContent";
@@ -8710,7 +8762,7 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
8710
8762
  } & {
8711
8763
  columnWidth?: number;
8712
8764
  })[];
8713
- }[];
8765
+ })[];
8714
8766
  }> | import("fp-ts/lib/Either").Right<{
8715
8767
  __TYPE__: "UIDContent";
8716
8768
  value: string;
@@ -9143,9 +9195,13 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
9143
9195
  __TYPE__: "SeparatorContent";
9144
9196
  } | {
9145
9197
  __TYPE__: "TableContent";
9146
- content: {
9198
+ content: ({
9199
+ key: string;
9200
+ } & {
9147
9201
  type: "tableRow";
9148
9202
  content: ({
9203
+ key: string;
9204
+ } & {
9149
9205
  type: "tableHeader" | "tableCell";
9150
9206
  content: {
9151
9207
  __TYPE__: "StructuredTextContent";
@@ -9304,7 +9360,7 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
9304
9360
  } & {
9305
9361
  columnWidth?: number;
9306
9362
  })[];
9307
- }[];
9363
+ })[];
9308
9364
  } | {
9309
9365
  __TYPE__: "CompositeSliceContent";
9310
9366
  nonRepeat: {
@@ -9731,9 +9787,13 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
9731
9787
  __TYPE__: "SeparatorContent";
9732
9788
  } | {
9733
9789
  __TYPE__: "TableContent";
9734
- content: {
9790
+ content: ({
9791
+ key: string;
9792
+ } & {
9735
9793
  type: "tableRow";
9736
9794
  content: ({
9795
+ key: string;
9796
+ } & {
9737
9797
  type: "tableHeader" | "tableCell";
9738
9798
  content: {
9739
9799
  __TYPE__: "StructuredTextContent";
@@ -9892,7 +9952,7 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
9892
9952
  } & {
9893
9953
  columnWidth?: number;
9894
9954
  })[];
9895
- }[];
9955
+ })[];
9896
9956
  };
9897
9957
  };
9898
9958
  repeat: {
@@ -10320,9 +10380,13 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
10320
10380
  __TYPE__: "SeparatorContent";
10321
10381
  } | {
10322
10382
  __TYPE__: "TableContent";
10323
- content: {
10383
+ content: ({
10384
+ key: string;
10385
+ } & {
10324
10386
  type: "tableRow";
10325
10387
  content: ({
10388
+ key: string;
10389
+ } & {
10326
10390
  type: "tableHeader" | "tableCell";
10327
10391
  content: {
10328
10392
  __TYPE__: "StructuredTextContent";
@@ -10481,7 +10545,7 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
10481
10545
  } & {
10482
10546
  columnWidth?: number;
10483
10547
  })[];
10484
- }[];
10548
+ })[];
10485
10549
  }][];
10486
10550
  }[];
10487
10551
  } | {
@@ -10911,9 +10975,13 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
10911
10975
  __TYPE__: "SeparatorContent";
10912
10976
  } | {
10913
10977
  __TYPE__: "TableContent";
10914
- content: {
10978
+ content: ({
10979
+ key: string;
10980
+ } & {
10915
10981
  type: "tableRow";
10916
10982
  content: ({
10983
+ key: string;
10984
+ } & {
10917
10985
  type: "tableHeader" | "tableCell";
10918
10986
  content: {
10919
10987
  __TYPE__: "StructuredTextContent";
@@ -11072,7 +11140,7 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
11072
11140
  } & {
11073
11141
  columnWidth?: number;
11074
11142
  })[];
11075
- }[];
11143
+ })[];
11076
11144
  };
11077
11145
  };
11078
11146
  items: {
@@ -11500,9 +11568,13 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
11500
11568
  __TYPE__: "SeparatorContent";
11501
11569
  } | {
11502
11570
  __TYPE__: "TableContent";
11503
- content: {
11571
+ content: ({
11572
+ key: string;
11573
+ } & {
11504
11574
  type: "tableRow";
11505
11575
  content: ({
11576
+ key: string;
11577
+ } & {
11506
11578
  type: "tableHeader" | "tableCell";
11507
11579
  content: {
11508
11580
  __TYPE__: "StructuredTextContent";
@@ -11661,7 +11733,7 @@ export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
11661
11733
  } & {
11662
11734
  columnWidth?: number;
11663
11735
  })[];
11664
- }[];
11736
+ })[];
11665
11737
  }][];
11666
11738
  }[];
11667
11739
  };
@@ -29,21 +29,9 @@ const fp_ts_1 = require("fp-ts");
29
29
  const function_1 = require("fp-ts/lib/function");
30
30
  const t = (0, tslib_1.__importStar)(require("io-ts"));
31
31
  const io_ts_types_1 = require("io-ts-types");
32
- const uuid_1 = require("uuid");
33
32
  const validators_1 = require("../../../validators");
34
33
  const function_2 = require("../../../validators/function");
35
34
  const utils_1 = require("../../utils");
36
- const isUuid = (input) => typeof input === "string" && (0, uuid_1.validate)(input);
37
- const uuidWithFallback = new t.Type("UUID", isUuid, (u, c) => {
38
- if (typeof u === "undefined")
39
- return t.success((0, uuid_1.v4)());
40
- if (isUuid(u))
41
- return t.success(u);
42
- return t.failure(u, c);
43
- }, t.identity);
44
- function withKey(codec) {
45
- return t.intersection([t.strict({ key: uuidWithFallback }), codec]);
46
- }
47
35
  // ImageLink.
48
36
  exports.ImageLinkType = "ImageLink";
49
37
  const isImageLinkKind = (input) => typeof input === "string";
@@ -333,7 +321,7 @@ exports.AnyLinkContent = t.intersection([
333
321
  exports.LinkContentType = "LinkContent";
334
322
  const isLinkContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.LinkContentType;
335
323
  exports.isLinkContent = isLinkContent;
336
- exports.LinkLegacy = withKey(t.union([
324
+ exports.LinkLegacy = (0, utils_1.withKey)(t.union([
337
325
  ImageLinkLegacy,
338
326
  FileLinkLegacy,
339
327
  DocumentLinkLegacy,
@@ -365,7 +353,7 @@ exports.Link = t.union([
365
353
  exports.MediaLinkContent,
366
354
  exports.AnyLinkContent,
367
355
  ]);
368
- exports.LinkContent = withKey(t.strict({
356
+ exports.LinkContent = (0, utils_1.withKey)(t.strict({
369
357
  __TYPE__: t.literal(exports.LinkContentType),
370
358
  value: exports.Link,
371
359
  }));
@@ -379,7 +367,7 @@ exports.FilledLinkLegacy = t.union([
379
367
  FilledExternalLinkLegacy,
380
368
  ]);
381
369
  const FilledLinkContentLegacy = (ctx) => {
382
- const FilledLinkLegacyWithKey = withKey(exports.FilledLinkLegacy);
370
+ const FilledLinkLegacyWithKey = (0, utils_1.withKey)(exports.FilledLinkLegacy);
383
371
  return new t.Type("FilledLinkLegacy", exports.isFilledLinkContent, (u) => {
384
372
  return (0, function_1.pipe)(FilledLinkLegacyWithKey.decode(u), fp_ts_1.either.map(({ key, ...value }) => exports.FilledLinkContent.encode({
385
373
  __TYPE__: "LinkContent",
@@ -403,7 +391,7 @@ exports.FilledLink = t.union([
403
391
  exports.FilledDocumentLinkContent,
404
392
  exports.FilledExternalLinkContent,
405
393
  ]);
406
- exports.FilledLinkContent = withKey(t.strict({
394
+ exports.FilledLinkContent = (0, utils_1.withKey)(t.strict({
407
395
  __TYPE__: t.literal(exports.LinkContentType),
408
396
  value: exports.FilledLink,
409
397
  }));
@@ -431,9 +431,13 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
431
431
  __TYPE__: t.LiteralC<"SeparatorContent">;
432
432
  }>>, t.ExactC<t.TypeC<{
433
433
  __TYPE__: t.LiteralC<"TableContent">;
434
- content: t.ArrayC<t.ExactC<t.TypeC<{
434
+ content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
435
+ key: t.Type<string, string, unknown>;
436
+ }>>, t.ExactC<t.TypeC<{
435
437
  type: t.LiteralC<"tableRow">;
436
438
  content: t.ArrayC<t.IntersectionC<[t.ExactC<t.TypeC<{
439
+ key: t.Type<string, string, unknown>;
440
+ }>>, t.IntersectionC<[t.ExactC<t.TypeC<{
437
441
  type: t.UnionC<[t.LiteralC<"tableHeader">, t.LiteralC<"tableCell">]>;
438
442
  content: t.ExactC<t.TypeC<{
439
443
  __TYPE__: t.LiteralC<"StructuredTextContent">;
@@ -677,8 +681,8 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
677
681
  }>>;
678
682
  }>>, t.ExactC<t.PartialC<{
679
683
  columnWidth: t.NumberC;
680
- }>>]>>;
681
- }>>>;
684
+ }>>]>]>>;
685
+ }>>]>>;
682
686
  }>>, t.ExactC<t.TypeC<{
683
687
  __TYPE__: t.LiteralC<"RepeatableContent">;
684
688
  type: t.LiteralC<"Link">;
@@ -1187,9 +1191,13 @@ export declare const isNestableContent: (u: unknown) => u is {
1187
1191
  __TYPE__: "SeparatorContent";
1188
1192
  } | {
1189
1193
  __TYPE__: "TableContent";
1190
- content: {
1194
+ content: ({
1195
+ key: string;
1196
+ } & {
1191
1197
  type: "tableRow";
1192
1198
  content: ({
1199
+ key: string;
1200
+ } & {
1193
1201
  type: "tableHeader" | "tableCell";
1194
1202
  content: {
1195
1203
  __TYPE__: "StructuredTextContent";
@@ -1348,7 +1356,7 @@ export declare const isNestableContent: (u: unknown) => u is {
1348
1356
  } & {
1349
1357
  columnWidth?: number;
1350
1358
  })[];
1351
- }[];
1359
+ })[];
1352
1360
  };
1353
1361
  export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
1354
1362
  decode(value: unknown): import("fp-ts/lib/Either").Left<t.Errors> | import("fp-ts/lib/Either").Right<{
@@ -1774,9 +1782,13 @@ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
1774
1782
  __TYPE__: "SeparatorContent";
1775
1783
  }> | import("fp-ts/lib/Either").Right<{
1776
1784
  __TYPE__: "TableContent";
1777
- content: {
1785
+ content: ({
1786
+ key: string;
1787
+ } & {
1778
1788
  type: "tableRow";
1779
1789
  content: ({
1790
+ key: string;
1791
+ } & {
1780
1792
  type: "tableHeader" | "tableCell";
1781
1793
  content: {
1782
1794
  __TYPE__: "StructuredTextContent";
@@ -1935,7 +1947,7 @@ export declare const NestableLegacy: (ctx: LegacyContentCtx) => {
1935
1947
  } & {
1936
1948
  columnWidth?: number;
1937
1949
  })[];
1938
- }[];
1950
+ })[];
1939
1951
  }> | undefined;
1940
1952
  encode(value: NestableContent): import("../../LegacyContentCtx").WithTypes<unknown> | undefined;
1941
1953
  };