@prismicio/types-internal 1.2.0-alpha.1 → 1.2.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 (66) hide show
  1. package/lib/content/fields/GroupContent.d.ts +810 -0
  2. package/lib/content/fields/GroupContent.js +17 -0
  3. package/lib/content/fields/index.d.ts +3 -0
  4. package/lib/content/fields/index.js +6 -0
  5. package/lib/content/fields/nestable/BooleanContent.d.ts +7 -0
  6. package/lib/content/fields/nestable/BooleanContent.js +11 -0
  7. package/lib/content/fields/nestable/EmbedContent.d.ts +70 -0
  8. package/lib/content/fields/nestable/EmbedContent.js +13 -0
  9. package/lib/content/fields/nestable/FieldContent.d.ts +26 -0
  10. package/lib/content/fields/nestable/FieldContent.js +22 -0
  11. package/lib/content/fields/nestable/GeoPointContent.d.ts +18 -0
  12. package/lib/content/fields/nestable/GeoPointContent.js +13 -0
  13. package/lib/content/fields/nestable/Image.d.ts +103 -0
  14. package/lib/content/fields/nestable/Image.js +13 -0
  15. package/lib/content/fields/nestable/ImageContent.d.ts +104 -0
  16. package/lib/content/fields/nestable/ImageContent.js +13 -0
  17. package/lib/content/fields/nestable/IntegrationFieldContent.d.ts +7 -0
  18. package/lib/content/fields/nestable/IntegrationFieldContent.js +11 -0
  19. package/lib/content/fields/nestable/LinkContent.d.ts +159 -0
  20. package/lib/content/fields/nestable/LinkContent.js +48 -0
  21. package/lib/content/fields/nestable/NestableContent.d.ts +400 -0
  22. package/lib/content/fields/nestable/NestableContent.js +25 -0
  23. package/lib/content/fields/nestable/RichTextContent.d.ts +127 -0
  24. package/lib/content/fields/nestable/RichTextContent.js +11 -0
  25. package/lib/content/fields/nestable/SeparatorContent.d.ts +6 -0
  26. package/lib/content/fields/nestable/SeparatorContent.js +10 -0
  27. package/lib/content/fields/nestable/index.d.ts +10 -0
  28. package/lib/content/fields/nestable/index.js +13 -0
  29. package/lib/content/fields/slices/SharedSliceContent.d.ts +806 -0
  30. package/lib/content/fields/slices/SharedSliceContent.js +15 -0
  31. package/lib/content/fields/slices/index.d.ts +1 -0
  32. package/lib/content/fields/slices/index.js +4 -0
  33. package/lib/content/index.d.ts +1 -0
  34. package/lib/content/index.js +4 -0
  35. package/lib/documents/widgets/nestable/EmbedContent.d.ts +1 -2
  36. package/lib/documents/widgets/nestable/EmbedContent.js +5 -5
  37. package/lib/documents/widgets/nestable/Link/FileLink.d.ts +1 -1
  38. package/lib/documents/widgets/nestable/Link/FileLink.js +2 -1
  39. package/lib/documents/widgets/nestable/Link/LinkContent.d.ts +1 -1
  40. package/lib/documents/widgets/nestable/Link/index.d.ts +1 -1
  41. package/lib/documents/widgets/nestable/SeparatorContent.d.ts +4 -0
  42. package/lib/documents/widgets/nestable/SeparatorContent.js +5 -0
  43. package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +2 -2
  44. package/lib/validators/TrimmedString.d.ts +5 -0
  45. package/lib/validators/TrimmedString.js +23 -0
  46. package/package.json +1 -1
  47. package/src/content/fields/GroupContent.ts +21 -0
  48. package/src/content/fields/index.ts +3 -0
  49. package/src/content/fields/nestable/BooleanContent.ts +11 -0
  50. package/src/content/fields/nestable/EmbedContent.ts +16 -0
  51. package/src/content/fields/nestable/FieldContent.ts +25 -0
  52. package/src/content/fields/nestable/GeoPointContent.ts +16 -0
  53. package/src/content/fields/nestable/ImageContent.ts +16 -0
  54. package/src/content/fields/nestable/IntegrationFieldContent.ts +11 -0
  55. package/src/content/fields/nestable/LinkContent.ts +68 -0
  56. package/src/content/fields/nestable/NestableContent.ts +25 -0
  57. package/src/content/fields/nestable/RichTextContent.ts +14 -0
  58. package/src/content/fields/nestable/SeparatorContent.ts +10 -0
  59. package/src/content/fields/nestable/index.ts +10 -0
  60. package/src/content/fields/slices/SharedSliceContent.ts +14 -0
  61. package/src/content/fields/slices/index.ts +1 -0
  62. package/src/content/index.ts +1 -0
  63. package/src/documents/widgets/nestable/EmbedContent.ts +1 -1
  64. package/src/documents/widgets/nestable/Link/FileLink.ts +2 -1
  65. package/src/documents/widgets/nestable/SeparatorContent.ts +5 -0
  66. package/src/validators/TrimmedString.ts +33 -0
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GroupContentType = exports.GroupContent = exports.GroupItemContentType = exports.GroupItemContent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const GroupContent_1 = require("../../documents/widgets/GroupContent");
7
+ const nestable_1 = require("./nestable");
8
+ exports.GroupItemContent = t.strict({
9
+ __TYPE__: t.literal(GroupContent_1.GroupItemContentType),
10
+ value: t.array(t.tuple([t.string, nestable_1.NestableContent])),
11
+ });
12
+ exports.GroupItemContentType = GroupContent_1.GroupItemContentType;
13
+ exports.GroupContent = t.strict({
14
+ __TYPE__: t.literal(GroupContent_1.GroupContentType),
15
+ value: t.array(exports.GroupItemContent),
16
+ });
17
+ exports.GroupContentType = GroupContent_1.GroupContentType;
@@ -0,0 +1,3 @@
1
+ export * from "./GroupContent";
2
+ export * from "./nestable";
3
+ export * from "./slices";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ (0, tslib_1.__exportStar)(require("./GroupContent"), exports);
5
+ (0, tslib_1.__exportStar)(require("./nestable"), exports);
6
+ (0, tslib_1.__exportStar)(require("./slices"), exports);
@@ -0,0 +1,7 @@
1
+ import * as t from "io-ts";
2
+ export declare const BooleanContent: t.ExactC<t.TypeC<{
3
+ __TYPE__: t.LiteralC<"BooleanContent">;
4
+ value: t.BooleanC;
5
+ }>>;
6
+ export declare type BooleanContent = t.TypeOf<typeof BooleanContent>;
7
+ export declare const BooleanContentType = "BooleanContent";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BooleanContentType = exports.BooleanContent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const BooleanContent_1 = require("../../../documents/widgets/nestable/BooleanContent");
7
+ exports.BooleanContent = t.strict({
8
+ __TYPE__: t.literal(BooleanContent_1.BooleanContentType),
9
+ value: t.boolean,
10
+ });
11
+ exports.BooleanContentType = BooleanContent_1.BooleanContentType;
@@ -0,0 +1,70 @@
1
+ import * as t from "io-ts";
2
+ export declare const EmbedContent: t.IntersectionC<[t.Type<{
3
+ embed_url: string;
4
+ type: string;
5
+ } & {
6
+ version?: string | number | null;
7
+ title?: string | null | undefined;
8
+ author_name?: string | null | undefined;
9
+ author_url?: string | null | undefined;
10
+ provider_name?: string | null | undefined;
11
+ provider_url?: string | null | undefined;
12
+ cache_age?: string | number | null;
13
+ thumbnail_url?: string | null | undefined;
14
+ thumbnail_width?: number | null | undefined;
15
+ thumbnail_height?: number | null | undefined;
16
+ html?: string | null | undefined;
17
+ }, {
18
+ embed_url: string;
19
+ type: string;
20
+ } & {
21
+ version?: string | number | null;
22
+ title?: string | null | undefined;
23
+ author_name?: string | null | undefined;
24
+ author_url?: string | null | undefined;
25
+ provider_name?: string | null | undefined;
26
+ provider_url?: string | null | undefined;
27
+ cache_age?: string | number | null;
28
+ thumbnail_url?: string | null | undefined;
29
+ thumbnail_width?: number | null | undefined;
30
+ thumbnail_height?: number | null | undefined;
31
+ html?: string | null | undefined;
32
+ } & {
33
+ __TYPE__: "EmbedContent";
34
+ }, unknown>, t.ExactC<t.TypeC<{
35
+ __TYPE__: t.LiteralC<"EmbedContent">;
36
+ all: t.Type<{
37
+ embed_url: string;
38
+ type: string;
39
+ } & {
40
+ version?: string | number | null;
41
+ title?: string | null | undefined;
42
+ author_name?: string | null | undefined;
43
+ author_url?: string | null | undefined;
44
+ provider_name?: string | null | undefined;
45
+ provider_url?: string | null | undefined;
46
+ cache_age?: string | number | null;
47
+ thumbnail_url?: string | null | undefined;
48
+ thumbnail_width?: number | null | undefined;
49
+ thumbnail_height?: number | null | undefined;
50
+ html?: string | null | undefined;
51
+ }, {
52
+ embed_url: string;
53
+ type: string;
54
+ } & {
55
+ version?: string | number | null;
56
+ title?: string | null | undefined;
57
+ author_name?: string | null | undefined;
58
+ author_url?: string | null | undefined;
59
+ provider_name?: string | null | undefined;
60
+ provider_url?: string | null | undefined;
61
+ cache_age?: string | number | null;
62
+ thumbnail_url?: string | null | undefined;
63
+ thumbnail_width?: number | null | undefined;
64
+ thumbnail_height?: number | null | undefined;
65
+ html?: string | null | undefined;
66
+ } & {
67
+ __TYPE__: "EmbedContent";
68
+ }, unknown>;
69
+ }>>]>;
70
+ export declare type EmbedContent = t.TypeOf<typeof EmbedContent>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmbedContent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const EmbedContent_1 = require("../../../documents/widgets/nestable/EmbedContent");
7
+ exports.EmbedContent = t.intersection([
8
+ EmbedContent_1.EmbedContentC,
9
+ t.strict({
10
+ __TYPE__: t.literal(EmbedContent_1.EmbedContentType),
11
+ all: EmbedContent_1.EmbedContentC,
12
+ }),
13
+ ]);
@@ -0,0 +1,26 @@
1
+ import * as t from "io-ts";
2
+ export declare const FieldType: t.KeyofC<{
3
+ Text: null;
4
+ Date: null;
5
+ Timestamp: null;
6
+ Color: null;
7
+ Number: null;
8
+ Range: null;
9
+ Select: null;
10
+ }>;
11
+ export declare type FieldType = t.TypeOf<typeof FieldType>;
12
+ export declare const FieldContent: t.ExactC<t.TypeC<{
13
+ type: t.KeyofC<{
14
+ Text: null;
15
+ Date: null;
16
+ Timestamp: null;
17
+ Color: null;
18
+ Number: null;
19
+ Range: null;
20
+ Select: null;
21
+ }>;
22
+ value: t.Type<string, string, unknown>;
23
+ __TYPE__: t.LiteralC<"FieldContent">;
24
+ }>>;
25
+ export declare type FieldContent = t.TypeOf<typeof FieldContent>;
26
+ export declare const FieldContentType = "FieldContent";
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldContentType = exports.FieldContent = exports.FieldType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const FieldContent_1 = require("../../../documents/widgets/nestable/FieldContent");
7
+ const TrimmedString_1 = (0, tslib_1.__importDefault)(require("../../../validators/TrimmedString"));
8
+ exports.FieldType = t.keyof({
9
+ Text: null,
10
+ Date: null,
11
+ Timestamp: null,
12
+ Color: null,
13
+ Number: null,
14
+ Range: null,
15
+ Select: null,
16
+ });
17
+ exports.FieldContent = t.strict({
18
+ type: exports.FieldType,
19
+ value: TrimmedString_1.default,
20
+ __TYPE__: t.literal(FieldContent_1.FieldContentType),
21
+ });
22
+ exports.FieldContentType = FieldContent_1.FieldContentType;
@@ -0,0 +1,18 @@
1
+ import * as t from "io-ts";
2
+ export declare const GeoPointContent: t.IntersectionC<[t.Type<{
3
+ position: {
4
+ lat: number;
5
+ lng: number;
6
+ };
7
+ }, {
8
+ position: {
9
+ lat: number;
10
+ lng: number;
11
+ };
12
+ } & {
13
+ __TYPE__: "GeoPointContent";
14
+ }, unknown>, t.ExactC<t.TypeC<{
15
+ __TYPE__: t.LiteralC<"GeoPointContent">;
16
+ }>>]>;
17
+ export declare type GeoPointContent = t.TypeOf<typeof GeoPointContent>;
18
+ export declare const GeoPointContentType = "GeoPointContent";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeoPointContentType = exports.GeoPointContent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const GeoPointContent_1 = require("../../../documents/widgets/nestable/GeoPointContent");
7
+ exports.GeoPointContent = t.intersection([
8
+ GeoPointContent_1.GeoPointContent,
9
+ t.strict({
10
+ __TYPE__: t.literal(GeoPointContent_1.GeoPointContentType),
11
+ }),
12
+ ]);
13
+ exports.GeoPointContentType = GeoPointContent_1.GeoPointContentType;
@@ -0,0 +1,103 @@
1
+ import * as t from 'io-ts';
2
+ export declare const ImageContent: t.IntersectionC<[t.Type<{
3
+ origin: {
4
+ id: string;
5
+ url: string;
6
+ width: number;
7
+ height: number;
8
+ };
9
+ width: number;
10
+ height: number;
11
+ edit: {
12
+ zoom: number;
13
+ crop: {
14
+ x: number;
15
+ y: number;
16
+ };
17
+ background: string;
18
+ };
19
+ } & {
20
+ url?: string;
21
+ credits?: string | null;
22
+ alt?: string | null;
23
+ provider?: string | null | undefined;
24
+ } & {
25
+ thumbnails?: {
26
+ [x: string]: {
27
+ origin: {
28
+ id: string;
29
+ url: string;
30
+ width: number;
31
+ height: number;
32
+ };
33
+ width: number;
34
+ height: number;
35
+ edit: {
36
+ zoom: number;
37
+ crop: {
38
+ x: number;
39
+ y: number;
40
+ };
41
+ background: string;
42
+ };
43
+ } & {
44
+ url?: string;
45
+ credits?: string | null;
46
+ alt?: string | null;
47
+ provider?: string | null | undefined;
48
+ };
49
+ };
50
+ }, {
51
+ origin: {
52
+ id: string;
53
+ url: string;
54
+ width: number;
55
+ height: number;
56
+ };
57
+ width: number;
58
+ height: number;
59
+ edit: {
60
+ zoom: number;
61
+ crop: {
62
+ x: number;
63
+ y: number;
64
+ };
65
+ background: string;
66
+ };
67
+ } & {
68
+ url?: string;
69
+ credits?: string | null;
70
+ alt?: string | null;
71
+ provider?: string | null | undefined;
72
+ } & {
73
+ thumbnails?: {
74
+ [x: string]: {
75
+ origin: {
76
+ id: string;
77
+ url: string;
78
+ width: number;
79
+ height: number;
80
+ };
81
+ width: number;
82
+ height: number;
83
+ edit: {
84
+ zoom: number;
85
+ crop: {
86
+ x: number;
87
+ y: number;
88
+ };
89
+ background: string;
90
+ };
91
+ } & {
92
+ url?: string;
93
+ credits?: string | null;
94
+ alt?: string | null;
95
+ provider?: string | null | undefined;
96
+ };
97
+ };
98
+ } & {
99
+ __TYPE__: "ImageContent";
100
+ }, unknown>, t.ExactC<t.TypeC<{
101
+ __TYPE__: t.LiteralC<"ImageContent">;
102
+ }>>]>;
103
+ export declare type ImageContent = t.TypeOf<typeof ImageContent>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageContent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const nestable_1 = require("../../../documents/widgets/nestable");
7
+ const ImageContent_1 = require("../../../documents/widgets/nestable/ImageContent");
8
+ exports.ImageContent = t.intersection([
9
+ nestable_1.ImageContent,
10
+ t.strict({
11
+ __TYPE__: t.literal(ImageContent_1.ImageContentType)
12
+ })
13
+ ]);
@@ -0,0 +1,104 @@
1
+ import * as t from "io-ts";
2
+ export declare const ImageContent: t.IntersectionC<[t.Type<{
3
+ origin: {
4
+ id: string;
5
+ url: string;
6
+ width: number;
7
+ height: number;
8
+ };
9
+ width: number;
10
+ height: number;
11
+ edit: {
12
+ zoom: number;
13
+ crop: {
14
+ x: number;
15
+ y: number;
16
+ };
17
+ background: string;
18
+ };
19
+ } & {
20
+ url?: string;
21
+ credits?: string | null;
22
+ alt?: string | null;
23
+ provider?: string | null | undefined;
24
+ } & {
25
+ thumbnails?: {
26
+ [x: string]: {
27
+ origin: {
28
+ id: string;
29
+ url: string;
30
+ width: number;
31
+ height: number;
32
+ };
33
+ width: number;
34
+ height: number;
35
+ edit: {
36
+ zoom: number;
37
+ crop: {
38
+ x: number;
39
+ y: number;
40
+ };
41
+ background: string;
42
+ };
43
+ } & {
44
+ url?: string;
45
+ credits?: string | null;
46
+ alt?: string | null;
47
+ provider?: string | null | undefined;
48
+ };
49
+ };
50
+ }, {
51
+ origin: {
52
+ id: string;
53
+ url: string;
54
+ width: number;
55
+ height: number;
56
+ };
57
+ width: number;
58
+ height: number;
59
+ edit: {
60
+ zoom: number;
61
+ crop: {
62
+ x: number;
63
+ y: number;
64
+ };
65
+ background: string;
66
+ };
67
+ } & {
68
+ url?: string;
69
+ credits?: string | null;
70
+ alt?: string | null;
71
+ provider?: string | null | undefined;
72
+ } & {
73
+ thumbnails?: {
74
+ [x: string]: {
75
+ origin: {
76
+ id: string;
77
+ url: string;
78
+ width: number;
79
+ height: number;
80
+ };
81
+ width: number;
82
+ height: number;
83
+ edit: {
84
+ zoom: number;
85
+ crop: {
86
+ x: number;
87
+ y: number;
88
+ };
89
+ background: string;
90
+ };
91
+ } & {
92
+ url?: string;
93
+ credits?: string | null;
94
+ alt?: string | null;
95
+ provider?: string | null | undefined;
96
+ };
97
+ };
98
+ } & {
99
+ __TYPE__: "ImageContent";
100
+ }, unknown>, t.ExactC<t.TypeC<{
101
+ __TYPE__: t.LiteralC<"ImageContent">;
102
+ }>>]>;
103
+ export declare type ImageContent = t.TypeOf<typeof ImageContent>;
104
+ export declare const ImageContentType = "ImageContent";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageContentType = exports.ImageContent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const ImageContent_1 = require("../../../documents/widgets/nestable/ImageContent");
7
+ exports.ImageContent = t.intersection([
8
+ ImageContent_1.ImageContent,
9
+ t.strict({
10
+ __TYPE__: t.literal(ImageContent_1.ImageContentType),
11
+ }),
12
+ ]);
13
+ exports.ImageContentType = ImageContent_1.ImageContentType;
@@ -0,0 +1,7 @@
1
+ import * as t from "io-ts";
2
+ export declare const IntegrationFieldContent: t.ExactC<t.TypeC<{
3
+ __TYPE__: t.LiteralC<"IntegrationFieldsContent">;
4
+ value: t.StringC;
5
+ }>>;
6
+ export declare type IntegrationFieldContent = t.TypeOf<typeof IntegrationFieldContent>;
7
+ export declare const IntegrationFieldsContentType = "IntegrationFieldsContent";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IntegrationFieldsContentType = exports.IntegrationFieldContent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const IntegrationFieldsContent_1 = require("../../../documents/widgets/nestable/IntegrationFieldsContent");
7
+ exports.IntegrationFieldContent = t.strict({
8
+ __TYPE__: t.literal(IntegrationFieldsContent_1.IntegrationFieldsContentType),
9
+ value: t.string,
10
+ });
11
+ exports.IntegrationFieldsContentType = IntegrationFieldsContent_1.IntegrationFieldsContentType;
@@ -0,0 +1,159 @@
1
+ import * as t from "io-ts";
2
+ export declare const ImageLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
3
+ __TYPE__: t.LiteralC<"ImageLink">;
4
+ }>>, t.Type<{
5
+ id: string;
6
+ url: string;
7
+ height: string;
8
+ width: string;
9
+ size: string;
10
+ name: string;
11
+ kind: string;
12
+ } & {
13
+ date?: string | null | undefined;
14
+ }, {
15
+ id: string;
16
+ url: string;
17
+ height: string;
18
+ width: string;
19
+ size: string;
20
+ name: string;
21
+ kind: string;
22
+ } & {
23
+ date?: string | null | undefined;
24
+ } & {
25
+ __TYPE__: "ImageLink";
26
+ }, unknown>]>;
27
+ export declare type ImageLinkContent = t.TypeOf<typeof ImageLinkContent>;
28
+ export declare const ImageLinkType = "ImageLink";
29
+ export declare const FileLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
30
+ __TYPE__: t.LiteralC<"FileLink">;
31
+ }>>, t.Type<{
32
+ id: string;
33
+ url: string;
34
+ name: string;
35
+ kind: string;
36
+ } & {
37
+ date?: string | null | undefined;
38
+ size?: string;
39
+ }, {
40
+ readonly size: string;
41
+ readonly __TYPE__: "FileLink";
42
+ readonly id: string;
43
+ readonly url: string;
44
+ readonly name: string;
45
+ readonly kind: string;
46
+ readonly date?: string | null | undefined;
47
+ }, unknown>]>;
48
+ export declare type FileLinkContent = t.TypeOf<typeof FileLinkContent>;
49
+ export declare const FileLinkType = "FileLink";
50
+ export declare const DocumentLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
51
+ __TYPE__: t.LiteralC<"DocumentLink">;
52
+ }>>, t.Type<{
53
+ id: string;
54
+ }, {
55
+ id: string;
56
+ } & {
57
+ __TYPE__: "DocumentLink";
58
+ }, unknown>]>;
59
+ export declare type DocumentLinkContent = t.TypeOf<typeof DocumentLinkContent>;
60
+ export declare const DocumentLinkType = "DocumentLink";
61
+ export declare const ExternalLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
62
+ __TYPE__: t.LiteralC<"ExternalLink">;
63
+ }>>, t.Type<{
64
+ url: string;
65
+ } & {
66
+ kind?: "web";
67
+ target?: string | null | undefined;
68
+ preview?: {
69
+ title?: string;
70
+ } | null | undefined;
71
+ }, {
72
+ url: string;
73
+ } & {
74
+ kind?: "web";
75
+ target?: string | null | undefined;
76
+ preview?: {
77
+ title?: string;
78
+ } | null | undefined;
79
+ } & {
80
+ __TYPE__: "ExternalLink";
81
+ }, unknown>]>;
82
+ export declare type ExternalLinkContent = t.TypeOf<typeof ExternalLinkContent>;
83
+ export declare const ExternalLinkType = "ExternalLink";
84
+ export declare const LinkContent: t.ExactC<t.TypeC<{
85
+ __TYPE__: t.LiteralC<"LinkContent">;
86
+ value: t.UnionC<[t.IntersectionC<[t.ExactC<t.TypeC<{
87
+ __TYPE__: t.LiteralC<"ImageLink">;
88
+ }>>, t.Type<{
89
+ id: string;
90
+ url: string;
91
+ height: string;
92
+ width: string;
93
+ size: string;
94
+ name: string;
95
+ kind: string;
96
+ } & {
97
+ date?: string | null | undefined;
98
+ }, {
99
+ id: string;
100
+ url: string;
101
+ height: string;
102
+ width: string;
103
+ size: string;
104
+ name: string;
105
+ kind: string;
106
+ } & {
107
+ date?: string | null | undefined;
108
+ } & {
109
+ __TYPE__: "ImageLink";
110
+ }, unknown>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
111
+ __TYPE__: t.LiteralC<"FileLink">;
112
+ }>>, t.Type<{
113
+ id: string;
114
+ url: string;
115
+ name: string;
116
+ kind: string;
117
+ } & {
118
+ date?: string | null | undefined;
119
+ size?: string;
120
+ }, {
121
+ readonly size: string;
122
+ readonly __TYPE__: "FileLink";
123
+ readonly id: string;
124
+ readonly url: string;
125
+ readonly name: string;
126
+ readonly kind: string;
127
+ readonly date?: string | null | undefined;
128
+ }, unknown>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
129
+ __TYPE__: t.LiteralC<"DocumentLink">;
130
+ }>>, t.Type<{
131
+ id: string;
132
+ }, {
133
+ id: string;
134
+ } & {
135
+ __TYPE__: "DocumentLink";
136
+ }, unknown>]>, t.IntersectionC<[t.ExactC<t.TypeC<{
137
+ __TYPE__: t.LiteralC<"ExternalLink">;
138
+ }>>, t.Type<{
139
+ url: string;
140
+ } & {
141
+ kind?: "web";
142
+ target?: string | null | undefined;
143
+ preview?: {
144
+ title?: string;
145
+ } | null | undefined;
146
+ }, {
147
+ url: string;
148
+ } & {
149
+ kind?: "web";
150
+ target?: string | null | undefined;
151
+ preview?: {
152
+ title?: string;
153
+ } | null | undefined;
154
+ } & {
155
+ __TYPE__: "ExternalLink";
156
+ }, unknown>]>]>;
157
+ }>>;
158
+ export declare type LinkContent = t.TypeOf<typeof LinkContent>;
159
+ export declare const LinkContentType = "LinkContent";
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LinkContentType = exports.LinkContent = exports.ExternalLinkType = exports.ExternalLinkContent = exports.DocumentLinkType = exports.DocumentLinkContent = exports.FileLinkType = exports.FileLinkContent = exports.ImageLinkType = exports.ImageLinkContent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const t = (0, tslib_1.__importStar)(require("io-ts"));
6
+ const DocumentLink_1 = require("../../../documents/widgets/nestable/Link/DocumentLink");
7
+ const ExternalLink_1 = require("../../../documents/widgets/nestable/Link/ExternalLink");
8
+ const FileLink_1 = require("../../../documents/widgets/nestable/Link/FileLink");
9
+ const ImageLink_1 = require("../../../documents/widgets/nestable/Link/ImageLink");
10
+ const LinkContent_1 = require("../../../documents/widgets/nestable/Link/LinkContent");
11
+ exports.ImageLinkContent = t.intersection([
12
+ t.strict({
13
+ __TYPE__: t.literal(ImageLink_1.ImageLinkType),
14
+ }),
15
+ ImageLink_1.ImageLink,
16
+ ]);
17
+ exports.ImageLinkType = ImageLink_1.ImageLinkType;
18
+ exports.FileLinkContent = t.intersection([
19
+ t.strict({
20
+ __TYPE__: t.literal(FileLink_1.FileLinkType),
21
+ }),
22
+ FileLink_1.FileLink,
23
+ ]);
24
+ exports.FileLinkType = FileLink_1.FileLinkType;
25
+ exports.DocumentLinkContent = t.intersection([
26
+ t.strict({
27
+ __TYPE__: t.literal(DocumentLink_1.DocumentLinkType),
28
+ }),
29
+ DocumentLink_1.DocumentLink,
30
+ ]);
31
+ exports.DocumentLinkType = DocumentLink_1.DocumentLinkType;
32
+ exports.ExternalLinkContent = t.intersection([
33
+ t.strict({
34
+ __TYPE__: t.literal(ExternalLink_1.ExternalLinkType),
35
+ }),
36
+ ExternalLink_1.ExternalLink,
37
+ ]);
38
+ exports.ExternalLinkType = ExternalLink_1.ExternalLinkType;
39
+ exports.LinkContent = t.strict({
40
+ __TYPE__: t.literal(LinkContent_1.LinkContentType),
41
+ value: t.union([
42
+ exports.ImageLinkContent,
43
+ exports.FileLinkContent,
44
+ exports.DocumentLinkContent,
45
+ exports.ExternalLinkContent,
46
+ ]),
47
+ });
48
+ exports.LinkContentType = LinkContent_1.LinkContentType;