@prismicio/types-internal 0.3.3 → 1.0.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.
- package/lib/customtypes/CustomType.d.ts +309 -311
- package/lib/customtypes/CustomType.js +6 -6
- package/lib/customtypes/Format.d.ts +4 -0
- package/lib/customtypes/Format.js +8 -0
- package/lib/customtypes/Section.d.ts +309 -309
- package/lib/customtypes/widgets/Group.d.ts +22 -23
- package/lib/customtypes/widgets/Group.js +2 -2
- package/lib/customtypes/widgets/UID.d.ts +1 -2
- package/lib/customtypes/widgets/UID.js +2 -2
- package/lib/customtypes/widgets/Widget.d.ts +353 -354
- package/lib/customtypes/widgets/Widget.js +3 -3
- package/lib/customtypes/widgets/WidgetTypes.d.ts +22 -22
- package/lib/customtypes/widgets/WidgetTypes.js +22 -23
- package/lib/customtypes/widgets/index.d.ts +1 -1
- package/lib/customtypes/widgets/index.js +1 -1
- package/lib/customtypes/widgets/nestable/BooleanField.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/BooleanField.js +2 -2
- package/lib/customtypes/widgets/nestable/Color.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/Color.js +2 -2
- package/lib/customtypes/widgets/nestable/Date.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/Date.js +2 -2
- package/lib/customtypes/widgets/nestable/Embed.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/Embed.js +2 -2
- package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/GeoPoint.js +2 -2
- package/lib/customtypes/widgets/nestable/Image.d.ts +2 -3
- package/lib/customtypes/widgets/nestable/Image.js +3 -3
- package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/IntegrationField.js +2 -2
- package/lib/customtypes/widgets/nestable/Link.d.ts +4 -5
- package/lib/customtypes/widgets/nestable/Link.js +3 -3
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +21 -21
- package/lib/customtypes/widgets/nestable/Number.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/Number.js +2 -2
- package/lib/customtypes/widgets/nestable/Range.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/Range.js +2 -2
- package/lib/customtypes/widgets/nestable/RichText.d.ts +22 -22
- package/lib/customtypes/widgets/nestable/RichText.js +38 -39
- package/lib/customtypes/widgets/nestable/Select.d.ts +2 -3
- package/lib/customtypes/widgets/nestable/Select.js +3 -3
- package/lib/customtypes/widgets/nestable/Separator.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/Separator.js +2 -2
- package/lib/customtypes/widgets/nestable/Text.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/Text.js +2 -2
- package/lib/customtypes/widgets/nestable/Timestamp.d.ts +1 -2
- package/lib/customtypes/widgets/nestable/Timestamp.js +2 -2
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +43 -44
- package/lib/customtypes/widgets/slices/CompositeSlice.js +2 -2
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +43 -43
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +86 -87
- package/lib/customtypes/widgets/slices/SharedSlice.js +3 -3
- package/lib/customtypes/widgets/slices/SharedSliceRef.d.ts +1 -2
- package/lib/customtypes/widgets/slices/SharedSliceRef.js +2 -2
- package/lib/customtypes/widgets/slices/Slices.d.ts +529 -531
- package/lib/customtypes/widgets/slices/Slices.js +6 -6
- package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +5 -5
- package/lib/customtypes/widgets/slices/SlicesTypes.js +5 -6
- package/lib/customtypes/widgets/slices/index.d.ts +1 -1
- package/lib/customtypes/widgets/slices/index.js +1 -1
- package/lib/documents/widgets/index.d.ts +1 -0
- package/lib/documents/widgets/nestable/Link/index.d.ts +1 -0
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +16 -17
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +1 -1
- package/package.json +1 -1
- package/src/customtypes/CustomType.ts +2 -2
- package/src/customtypes/widgets/Group.ts +1 -1
- package/src/customtypes/widgets/UID.ts +1 -1
- package/src/customtypes/widgets/Widget.ts +1 -1
- package/src/customtypes/widgets/WidgetTypes.ts +22 -22
- package/src/customtypes/widgets/index.ts +1 -1
- package/src/customtypes/widgets/nestable/BooleanField.ts +1 -1
- package/src/customtypes/widgets/nestable/Color.ts +1 -1
- package/src/customtypes/widgets/nestable/Date.ts +1 -1
- package/src/customtypes/widgets/nestable/Embed.ts +1 -1
- package/src/customtypes/widgets/nestable/GeoPoint.ts +1 -1
- package/src/customtypes/widgets/nestable/Image.ts +2 -2
- package/src/customtypes/widgets/nestable/IntegrationField.ts +1 -1
- package/src/customtypes/widgets/nestable/Link.ts +4 -4
- package/src/customtypes/widgets/nestable/Number.ts +1 -1
- package/src/customtypes/widgets/nestable/Range.ts +1 -1
- package/src/customtypes/widgets/nestable/RichText.ts +37 -35
- package/src/customtypes/widgets/nestable/Select.ts +4 -2
- package/src/customtypes/widgets/nestable/Separator.ts +1 -1
- package/src/customtypes/widgets/nestable/Text.ts +1 -1
- package/src/customtypes/widgets/nestable/Timestamp.ts +1 -1
- package/src/customtypes/widgets/slices/CompositeSlice.ts +1 -1
- package/src/customtypes/widgets/slices/SharedSlice.ts +2 -2
- package/src/customtypes/widgets/slices/SharedSliceRef.ts +1 -1
- package/src/customtypes/widgets/slices/Slices.ts +3 -3
- package/src/customtypes/widgets/slices/SlicesTypes.ts +5 -5
- package/src/customtypes/widgets/slices/index.ts +1 -1
- package/src/documents/widgets/index.ts +1 -5
- package/src/documents/widgets/nestable/Link/index.ts +2 -0
- package/src/documents/widgets/nestable/StructuredTextContent/Block.ts +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
-
import WidgetTypes from "./WidgetTypes";
|
|
3
2
|
declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
|
-
type: t.LiteralC<
|
|
3
|
+
type: t.LiteralC<"Group">;
|
|
5
4
|
}>, t.PartialC<{
|
|
6
5
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
7
6
|
icon: t.StringC;
|
|
@@ -10,7 +9,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
10
9
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
11
10
|
repeat: t.BooleanC;
|
|
12
11
|
fields: t.RecordC<t.StringC, t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
13
|
-
type: t.LiteralC<
|
|
12
|
+
type: t.LiteralC<"Color">;
|
|
14
13
|
}>, t.PartialC<{
|
|
15
14
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
16
15
|
config: t.ExactC<t.PartialC<{
|
|
@@ -18,7 +17,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
18
17
|
placeholder: t.StringC;
|
|
19
18
|
}>>;
|
|
20
19
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
21
|
-
type: t.LiteralC<
|
|
20
|
+
type: t.LiteralC<"Boolean">;
|
|
22
21
|
}>, t.PartialC<{
|
|
23
22
|
config: t.ExactC<t.PartialC<{
|
|
24
23
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
@@ -27,7 +26,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
27
26
|
placeholder_false: t.StringC;
|
|
28
27
|
}>>;
|
|
29
28
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
30
|
-
type: t.LiteralC<
|
|
29
|
+
type: t.LiteralC<"Embed">;
|
|
31
30
|
}>, t.PartialC<{
|
|
32
31
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
33
32
|
config: t.ExactC<t.PartialC<{
|
|
@@ -36,14 +35,14 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
36
35
|
useAsTitle: t.BooleanC;
|
|
37
36
|
}>>;
|
|
38
37
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
39
|
-
type: t.LiteralC<
|
|
38
|
+
type: t.LiteralC<"GeoPoint">;
|
|
40
39
|
}>, t.PartialC<{
|
|
41
40
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
42
41
|
config: t.ExactC<t.PartialC<{
|
|
43
42
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
44
43
|
}>>;
|
|
45
44
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
46
|
-
type: t.LiteralC<
|
|
45
|
+
type: t.LiteralC<"Date">;
|
|
47
46
|
}>, t.PartialC<{
|
|
48
47
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
49
48
|
config: t.ExactC<t.PartialC<{
|
|
@@ -52,7 +51,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
52
51
|
default: t.StringC;
|
|
53
52
|
}>>;
|
|
54
53
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
55
|
-
type: t.LiteralC<
|
|
54
|
+
type: t.LiteralC<"Number">;
|
|
56
55
|
}>, t.PartialC<{
|
|
57
56
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
58
57
|
config: t.ExactC<t.PartialC<{
|
|
@@ -63,7 +62,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
63
62
|
step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
64
63
|
}>>;
|
|
65
64
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
66
|
-
type: t.LiteralC<
|
|
65
|
+
type: t.LiteralC<"Range">;
|
|
67
66
|
}>, t.PartialC<{
|
|
68
67
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
69
68
|
config: t.ExactC<t.PartialC<{
|
|
@@ -74,7 +73,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
74
73
|
step: t.UnionC<[t.NumberC, import("io-ts-types").NumberFromStringC]>;
|
|
75
74
|
}>>;
|
|
76
75
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
77
|
-
type: t.LiteralC<
|
|
76
|
+
type: t.LiteralC<"StructuredText">;
|
|
78
77
|
}>, t.PartialC<{
|
|
79
78
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
80
79
|
config: t.ExactC<t.PartialC<{
|
|
@@ -87,27 +86,27 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
87
86
|
width: t.Type<number | null, unknown, unknown>;
|
|
88
87
|
height: t.Type<number | null, unknown, unknown>;
|
|
89
88
|
}>;
|
|
90
|
-
labels: t.Type<string[], object, unknown>;
|
|
89
|
+
labels: t.Type<readonly string[], object, unknown>;
|
|
91
90
|
allowTargetBlank: t.BooleanC;
|
|
92
91
|
}>>;
|
|
93
92
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
94
|
-
type: t.LiteralC<
|
|
93
|
+
type: t.LiteralC<"Select">;
|
|
95
94
|
}>, t.PartialC<{
|
|
96
95
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
97
96
|
config: t.ExactC<t.PartialC<{
|
|
98
97
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
99
98
|
placeholder: t.StringC;
|
|
100
99
|
default_value: t.StringC;
|
|
101
|
-
options: t.
|
|
100
|
+
options: t.ReadonlyArrayC<t.UnionC<[t.StringC, t.Type<string, string, unknown>, t.Type<string, string, unknown>]>>;
|
|
102
101
|
}>>;
|
|
103
102
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
104
|
-
type: t.LiteralC<
|
|
103
|
+
type: t.LiteralC<"Separator">;
|
|
105
104
|
}>, t.PartialC<{
|
|
106
105
|
config: t.ExactC<t.PartialC<{
|
|
107
106
|
label: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
108
107
|
}>>;
|
|
109
108
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
110
|
-
type: t.LiteralC<
|
|
109
|
+
type: t.LiteralC<"Text">;
|
|
111
110
|
}>, t.PartialC<{
|
|
112
111
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
113
112
|
config: t.ExactC<t.PartialC<{
|
|
@@ -116,7 +115,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
116
115
|
placeholder: t.StringC;
|
|
117
116
|
}>>;
|
|
118
117
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
119
|
-
type: t.LiteralC<
|
|
118
|
+
type: t.LiteralC<"Timestamp">;
|
|
120
119
|
}>, t.PartialC<{
|
|
121
120
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
122
121
|
config: t.ExactC<t.PartialC<{
|
|
@@ -125,7 +124,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
125
124
|
default: t.StringC;
|
|
126
125
|
}>>;
|
|
127
126
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
128
|
-
type: t.LiteralC<
|
|
127
|
+
type: t.LiteralC<"Link">;
|
|
129
128
|
}>, t.PartialC<{
|
|
130
129
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
131
130
|
config: t.ExactC<t.PartialC<{
|
|
@@ -133,13 +132,13 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
133
132
|
useAsTitle: t.BooleanC;
|
|
134
133
|
placeholder: t.StringC;
|
|
135
134
|
select: t.UnionC<[t.LiteralC<"media">, t.LiteralC<"document">, t.LiteralC<"web">, t.NullC]>;
|
|
136
|
-
customtypes: t.
|
|
137
|
-
masks: t.Type<string[], object, unknown>;
|
|
138
|
-
tags: t.Type<string[], object, unknown>;
|
|
135
|
+
customtypes: t.ReadonlyArrayC<t.StringC>;
|
|
136
|
+
masks: t.Type<readonly string[], object, unknown>;
|
|
137
|
+
tags: t.Type<readonly string[], object, unknown>;
|
|
139
138
|
allowTargetBlank: t.BooleanC;
|
|
140
139
|
}>>;
|
|
141
140
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
142
|
-
type: t.LiteralC<
|
|
141
|
+
type: t.LiteralC<"Image">;
|
|
143
142
|
}>, t.PartialC<{
|
|
144
143
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
145
144
|
config: t.ExactC<t.PartialC<{
|
|
@@ -149,7 +148,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
149
148
|
width: t.Type<number | null, unknown, unknown>;
|
|
150
149
|
height: t.Type<number | null, unknown, unknown>;
|
|
151
150
|
}>;
|
|
152
|
-
thumbnails: t.
|
|
151
|
+
thumbnails: t.ReadonlyArrayC<t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
153
152
|
name: t.StringC;
|
|
154
153
|
}>, t.PartialC<{
|
|
155
154
|
width: t.Type<number | null, unknown, unknown>;
|
|
@@ -157,7 +156,7 @@ declare const Group: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
157
156
|
}>]>>>;
|
|
158
157
|
}>>;
|
|
159
158
|
}>]>>, t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
160
|
-
type: t.LiteralC<
|
|
159
|
+
type: t.LiteralC<"IntegrationFields">;
|
|
161
160
|
}>, t.PartialC<{
|
|
162
161
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
163
162
|
config: t.ExactC<t.PartialC<{
|
|
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
5
|
const validators_1 = require("../../validators");
|
|
6
6
|
const NestableWidget_1 = (0, tslib_1.__importDefault)(require("./nestable/NestableWidget"));
|
|
7
|
-
const WidgetTypes_1 =
|
|
7
|
+
const WidgetTypes_1 = require("./WidgetTypes");
|
|
8
8
|
const GroupConfig = t.exact(t.partial({
|
|
9
9
|
label: validators_1.StringOrNull,
|
|
10
10
|
repeat: t.boolean,
|
|
@@ -12,7 +12,7 @@ const GroupConfig = t.exact(t.partial({
|
|
|
12
12
|
}));
|
|
13
13
|
const Group = t.exact(t.intersection([
|
|
14
14
|
t.type({
|
|
15
|
-
type: t.literal(WidgetTypes_1.
|
|
15
|
+
type: t.literal(WidgetTypes_1.WidgetTypes.Group),
|
|
16
16
|
}),
|
|
17
17
|
t.partial({
|
|
18
18
|
fieldset: validators_1.StringOrNull,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
-
import WidgetTypes from "./WidgetTypes";
|
|
3
2
|
declare const UID: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
4
|
-
type: t.LiteralC<
|
|
3
|
+
type: t.LiteralC<"UID">;
|
|
5
4
|
}>, t.PartialC<{
|
|
6
5
|
fieldset: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
7
6
|
config: t.ExactC<t.PartialC<{
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
5
5
|
const validators_1 = require("../../validators");
|
|
6
|
-
const WidgetTypes_1 =
|
|
6
|
+
const WidgetTypes_1 = require("./WidgetTypes");
|
|
7
7
|
const UIDConfig = t.exact(t.partial({
|
|
8
8
|
label: validators_1.StringOrNull,
|
|
9
9
|
useAsTitle: t.boolean,
|
|
@@ -11,7 +11,7 @@ const UIDConfig = t.exact(t.partial({
|
|
|
11
11
|
}));
|
|
12
12
|
const UID = t.exact(t.intersection([
|
|
13
13
|
t.type({
|
|
14
|
-
type: t.literal(WidgetTypes_1.
|
|
14
|
+
type: t.literal(WidgetTypes_1.WidgetTypes.UID),
|
|
15
15
|
}),
|
|
16
16
|
t.partial({
|
|
17
17
|
fieldset: validators_1.StringOrNull,
|