@prismicio/types-internal 2.0.0-alpha.1 → 2.0.0-alpha.3

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 (258) hide show
  1. package/lib/common/WidgetKey.d.ts +1 -1
  2. package/lib/common/WidgetKey.js +1 -1
  3. package/lib/common/index.js +1 -1
  4. package/lib/content/Document.d.ts +4 -4
  5. package/lib/content/Document.js +1 -1
  6. package/lib/content/LegacyContentCtx.d.ts +2 -2
  7. package/lib/content/LegacyContentCtx.js +1 -1
  8. package/lib/content/fields/EmptyContent.d.ts +1 -1
  9. package/lib/content/fields/EmptyContent.js +1 -1
  10. package/lib/content/fields/GroupContent.d.ts +4 -4
  11. package/lib/content/fields/GroupContent.js +1 -1
  12. package/lib/content/fields/UIDContent.d.ts +1 -1
  13. package/lib/content/fields/UIDContent.js +1 -1
  14. package/lib/content/fields/WidgetContent.d.ts +2 -2
  15. package/lib/content/fields/WidgetContent.js +1 -1
  16. package/lib/content/fields/index.js +5 -5
  17. package/lib/content/fields/nestable/BooleanContent.d.ts +1 -1
  18. package/lib/content/fields/nestable/BooleanContent.js +1 -1
  19. package/lib/content/fields/nestable/EmbedContent.d.ts +2 -2
  20. package/lib/content/fields/nestable/EmbedContent.js +1 -1
  21. package/lib/content/fields/nestable/FieldContent/ColorContent.d.ts +1 -1
  22. package/lib/content/fields/nestable/FieldContent/ColorContent.js +2 -2
  23. package/lib/content/fields/nestable/FieldContent/DateContent.d.ts +1 -1
  24. package/lib/content/fields/nestable/FieldContent/DateContent.js +2 -2
  25. package/lib/content/fields/nestable/FieldContent/NumberContent.d.ts +1 -1
  26. package/lib/content/fields/nestable/FieldContent/NumberContent.js +2 -2
  27. package/lib/content/fields/nestable/FieldContent/RangeContent.d.ts +1 -1
  28. package/lib/content/fields/nestable/FieldContent/RangeContent.js +2 -2
  29. package/lib/content/fields/nestable/FieldContent/SelectContent.d.ts +1 -1
  30. package/lib/content/fields/nestable/FieldContent/SelectContent.js +2 -2
  31. package/lib/content/fields/nestable/FieldContent/TextContent.d.ts +1 -1
  32. package/lib/content/fields/nestable/FieldContent/TextContent.js +2 -2
  33. package/lib/content/fields/nestable/FieldContent/TimestampContent.d.ts +1 -1
  34. package/lib/content/fields/nestable/FieldContent/TimestampContent.js +2 -2
  35. package/lib/content/fields/nestable/FieldContent/index.d.ts +2 -2
  36. package/lib/content/fields/nestable/FieldContent/index.js +9 -9
  37. package/lib/content/fields/nestable/GeoPointContent.d.ts +1 -1
  38. package/lib/content/fields/nestable/GeoPointContent.js +1 -1
  39. package/lib/content/fields/nestable/ImageContent.d.ts +2 -2
  40. package/lib/content/fields/nestable/ImageContent.js +1 -1
  41. package/lib/content/fields/nestable/IntegrationFieldContent.d.ts +1 -1
  42. package/lib/content/fields/nestable/IntegrationFieldContent.js +1 -1
  43. package/lib/content/fields/nestable/LinkContent.d.ts +6 -6
  44. package/lib/content/fields/nestable/LinkContent.js +1 -1
  45. package/lib/content/fields/nestable/NestableContent.d.ts +2 -2
  46. package/lib/content/fields/nestable/NestableContent.js +1 -1
  47. package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +7 -7
  48. package/lib/content/fields/nestable/RichTextContent/Blocks.js +2 -2
  49. package/lib/content/fields/nestable/RichTextContent/index.d.ts +1 -1
  50. package/lib/content/fields/nestable/RichTextContent/index.js +2 -2
  51. package/lib/content/fields/nestable/SeparatorContent.d.ts +1 -1
  52. package/lib/content/fields/nestable/SeparatorContent.js +1 -1
  53. package/lib/content/fields/nestable/index.js +10 -10
  54. package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +1 -1
  55. package/lib/content/fields/slices/Slice/CompositeSliceContent.js +1 -1
  56. package/lib/content/fields/slices/Slice/RepeatableContent.js +1 -1
  57. package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +1 -1
  58. package/lib/content/fields/slices/Slice/SharedSliceContent.js +1 -1
  59. package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +1 -1
  60. package/lib/content/fields/slices/Slice/SimpleSliceContent.js +1 -1
  61. package/lib/content/fields/slices/Slice/index.d.ts +1 -1
  62. package/lib/content/fields/slices/Slice/index.js +1 -1
  63. package/lib/content/fields/slices/SliceItem.d.ts +1 -1
  64. package/lib/content/fields/slices/SliceItem.js +1 -1
  65. package/lib/content/fields/slices/SlicesContent.d.ts +2 -2
  66. package/lib/content/fields/slices/SlicesContent.js +1 -1
  67. package/lib/content/fields/slices/index.js +5 -5
  68. package/lib/content/index.js +3 -3
  69. package/lib/content/utils.d.ts +2 -2
  70. package/lib/content/utils.js +2 -4
  71. package/lib/customtypes/CustomType.d.ts +2 -2
  72. package/lib/customtypes/CustomType.js +1 -1
  73. package/lib/customtypes/Section.d.ts +2 -2
  74. package/lib/customtypes/Section.js +1 -1
  75. package/lib/customtypes/diff/Changes.d.ts +4 -4
  76. package/lib/customtypes/diff/SharedSlice.d.ts +3 -671
  77. package/lib/customtypes/diff/Variation.d.ts +3 -657
  78. package/lib/customtypes/diff/index.js +3 -3
  79. package/lib/customtypes/index.js +4 -4
  80. package/lib/customtypes/widgets/Group.d.ts +1 -1
  81. package/lib/customtypes/widgets/Group.js +1 -1
  82. package/lib/customtypes/widgets/UID.d.ts +1 -1
  83. package/lib/customtypes/widgets/UID.js +1 -1
  84. package/lib/customtypes/widgets/Widget.d.ts +3 -3
  85. package/lib/customtypes/widgets/Widget.js +3 -3
  86. package/lib/customtypes/widgets/index.js +6 -6
  87. package/lib/customtypes/widgets/nestable/BooleanField.d.ts +2 -2
  88. package/lib/customtypes/widgets/nestable/BooleanField.js +1 -1
  89. package/lib/customtypes/widgets/nestable/Color.d.ts +2 -2
  90. package/lib/customtypes/widgets/nestable/Color.js +1 -1
  91. package/lib/customtypes/widgets/nestable/Date.d.ts +2 -2
  92. package/lib/customtypes/widgets/nestable/Date.js +1 -1
  93. package/lib/customtypes/widgets/nestable/Embed.d.ts +2 -2
  94. package/lib/customtypes/widgets/nestable/Embed.js +1 -1
  95. package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +2 -2
  96. package/lib/customtypes/widgets/nestable/GeoPoint.js +1 -1
  97. package/lib/customtypes/widgets/nestable/Image.d.ts +3 -3
  98. package/lib/customtypes/widgets/nestable/Image.js +2 -2
  99. package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +2 -2
  100. package/lib/customtypes/widgets/nestable/IntegrationField.js +1 -1
  101. package/lib/customtypes/widgets/nestable/Link.d.ts +2 -2
  102. package/lib/customtypes/widgets/nestable/Link.js +1 -1
  103. package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +2 -2
  104. package/lib/customtypes/widgets/nestable/NestableWidget.js +1 -1
  105. package/lib/customtypes/widgets/nestable/Number.d.ts +2 -2
  106. package/lib/customtypes/widgets/nestable/Number.js +1 -1
  107. package/lib/customtypes/widgets/nestable/Range.d.ts +2 -2
  108. package/lib/customtypes/widgets/nestable/Range.js +1 -1
  109. package/lib/customtypes/widgets/nestable/RichText.d.ts +3 -3
  110. package/lib/customtypes/widgets/nestable/RichText.js +2 -2
  111. package/lib/customtypes/widgets/nestable/Select.d.ts +2 -2
  112. package/lib/customtypes/widgets/nestable/Select.js +1 -1
  113. package/lib/customtypes/widgets/nestable/Separator.d.ts +2 -2
  114. package/lib/customtypes/widgets/nestable/Separator.js +1 -1
  115. package/lib/customtypes/widgets/nestable/Text.d.ts +2 -2
  116. package/lib/customtypes/widgets/nestable/Text.js +1 -1
  117. package/lib/customtypes/widgets/nestable/Timestamp.d.ts +2 -2
  118. package/lib/customtypes/widgets/nestable/Timestamp.js +1 -1
  119. package/lib/customtypes/widgets/nestable/index.js +16 -16
  120. package/lib/customtypes/widgets/shared/ImageConstraint.d.ts +1 -1
  121. package/lib/customtypes/widgets/shared/ImageConstraint.js +1 -1
  122. package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +1 -1
  123. package/lib/customtypes/widgets/slices/CompositeSlice.js +1 -1
  124. package/lib/customtypes/widgets/slices/LegacySlice.d.ts +1 -1
  125. package/lib/customtypes/widgets/slices/LegacySlice.js +2 -2
  126. package/lib/customtypes/widgets/slices/SharedSlice.d.ts +2 -2
  127. package/lib/customtypes/widgets/slices/SharedSlice.js +1 -1
  128. package/lib/customtypes/widgets/slices/SharedSliceRef.d.ts +1 -1
  129. package/lib/customtypes/widgets/slices/SharedSliceRef.js +1 -1
  130. package/lib/customtypes/widgets/slices/Slice.d.ts +2 -2
  131. package/lib/customtypes/widgets/slices/Slices.d.ts +5 -5
  132. package/lib/customtypes/widgets/slices/Slices.js +4 -4
  133. package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +1 -1
  134. package/lib/customtypes/widgets/slices/SlicesTypes.js +1 -1
  135. package/lib/customtypes/widgets/slices/index.js +6 -6
  136. package/lib/utils/index.js +2 -2
  137. package/lib/validators/DateFromString.js +1 -1
  138. package/lib/validators/DateFromStringOrNumber.js +1 -1
  139. package/lib/validators/DateFromTsMs.js +1 -1
  140. package/lib/validators/IntFromNumber.d.ts +2 -2
  141. package/lib/validators/IntFromNumber.js +1 -1
  142. package/lib/validators/IntFromPixels.d.ts +2 -2
  143. package/lib/validators/IntFromPixels.js +1 -1
  144. package/lib/validators/NonEmptyString.js +1 -1
  145. package/lib/validators/NonEmptyStringOrNull.js +1 -1
  146. package/lib/validators/NumberOrNull.js +1 -1
  147. package/lib/validators/StringFromBoolean.d.ts +2 -2
  148. package/lib/validators/StringFromBoolean.js +1 -1
  149. package/lib/validators/StringFromNumber.d.ts +2 -2
  150. package/lib/validators/StringFromNumber.js +1 -1
  151. package/lib/validators/StringOrNull.js +1 -1
  152. package/lib/validators/TrimmedString.d.ts +2 -2
  153. package/lib/validators/TrimmedString.js +1 -1
  154. package/lib/validators/function.js +1 -1
  155. package/lib/validators/index.js +12 -12
  156. package/package.json +1 -1
  157. package/lib/content/CustomType.d.ts +0 -2972
  158. package/lib/content/CustomType.js +0 -15
  159. package/lib/content/fields/nestable/FieldContent.d.ts +0 -32
  160. package/lib/content/fields/nestable/FieldContent.js +0 -37
  161. package/lib/content/fields/nestable/Image.d.ts +0 -103
  162. package/lib/content/fields/nestable/Image.js +0 -13
  163. package/lib/content/fields/nestable/RichTextContent.d.ts +0 -376
  164. package/lib/content/fields/nestable/RichTextContent.js +0 -16
  165. package/lib/content/fields/slices/CompositeSliceContent.d.ts +0 -677
  166. package/lib/content/fields/slices/CompositeSliceContent.js +0 -14
  167. package/lib/content/fields/slices/RepeatableContent.d.ts +0 -338
  168. package/lib/content/fields/slices/RepeatableContent.js +0 -16
  169. package/lib/content/fields/slices/SharedSliceContent.d.ts +0 -678
  170. package/lib/content/fields/slices/SharedSliceContent.js +0 -15
  171. package/lib/content/fields/slices/SimpleSliceContent.d.ts +0 -675
  172. package/lib/content/fields/slices/SimpleSliceContent.js +0 -8
  173. package/lib/customtypes/Comparators/Changes.d.ts +0 -17
  174. package/lib/customtypes/Comparators/Changes.js +0 -9
  175. package/lib/customtypes/Comparators/SharedSlice.d.ts +0 -679
  176. package/lib/customtypes/Comparators/SharedSlice.js +0 -55
  177. package/lib/customtypes/Comparators/Variation.d.ts +0 -662
  178. package/lib/customtypes/Comparators/Variation.js +0 -75
  179. package/lib/customtypes/Comparators/index.d.ts +0 -3
  180. package/lib/customtypes/Comparators/index.js +0 -6
  181. package/lib/customtypes/Format.d.ts +0 -4
  182. package/lib/customtypes/Format.js +0 -8
  183. package/lib/customtypes/comp/Changes.d.ts +0 -17
  184. package/lib/customtypes/comp/Changes.js +0 -9
  185. package/lib/customtypes/comp/SharedSlice.d.ts +0 -679
  186. package/lib/customtypes/comp/SharedSlice.js +0 -55
  187. package/lib/customtypes/comp/Variation.d.ts +0 -662
  188. package/lib/customtypes/comp/Variation.js +0 -76
  189. package/lib/customtypes/comp/index.d.ts +0 -3
  190. package/lib/customtypes/comp/index.js +0 -6
  191. package/lib/customtypes/utils/Comparator.d.ts +0 -1353
  192. package/lib/customtypes/utils/Comparator.js +0 -59
  193. package/lib/customtypes/utils/index.d.ts +0 -1
  194. package/lib/customtypes/utils/index.js +0 -4
  195. package/lib/customtypes/widgets/WidgetTypes.d.ts +0 -22
  196. package/lib/customtypes/widgets/WidgetTypes.js +0 -25
  197. package/lib/documents/DocumentData.d.ts +0 -6
  198. package/lib/documents/DocumentData.js +0 -15
  199. package/lib/documents/index.d.ts +0 -2
  200. package/lib/documents/index.js +0 -7
  201. package/lib/documents/widgets/EmptyContent.d.ts +0 -8
  202. package/lib/documents/widgets/EmptyContent.js +0 -9
  203. package/lib/documents/widgets/GroupContent.d.ts +0 -16
  204. package/lib/documents/widgets/GroupContent.js +0 -60
  205. package/lib/documents/widgets/SimpleWidgetContent.d.ts +0 -20
  206. package/lib/documents/widgets/SimpleWidgetContent.js +0 -75
  207. package/lib/documents/widgets/StaticWidgetContent.d.ts +0 -10
  208. package/lib/documents/widgets/StaticWidgetContent.js +0 -26
  209. package/lib/documents/widgets/UIDContent.d.ts +0 -7
  210. package/lib/documents/widgets/UIDContent.js +0 -10
  211. package/lib/documents/widgets/index.d.ts +0 -38
  212. package/lib/documents/widgets/index.js +0 -40
  213. package/lib/documents/widgets/nestable/BooleanContent.d.ts +0 -8
  214. package/lib/documents/widgets/nestable/BooleanContent.js +0 -11
  215. package/lib/documents/widgets/nestable/EmbedContent.d.ts +0 -42
  216. package/lib/documents/widgets/nestable/EmbedContent.js +0 -35
  217. package/lib/documents/widgets/nestable/FieldContent.d.ts +0 -13
  218. package/lib/documents/widgets/nestable/FieldContent.js +0 -37
  219. package/lib/documents/widgets/nestable/GeoPointContent.d.ts +0 -17
  220. package/lib/documents/widgets/nestable/GeoPointContent.js +0 -13
  221. package/lib/documents/widgets/nestable/ImageContent.d.ts +0 -127
  222. package/lib/documents/widgets/nestable/ImageContent.js +0 -41
  223. package/lib/documents/widgets/nestable/IntegrationFieldsContent.d.ts +0 -8
  224. package/lib/documents/widgets/nestable/IntegrationFieldsContent.js +0 -16
  225. package/lib/documents/widgets/nestable/Link/DocumentLink.d.ts +0 -12
  226. package/lib/documents/widgets/nestable/Link/DocumentLink.js +0 -13
  227. package/lib/documents/widgets/nestable/Link/ExternalLink.d.ts +0 -24
  228. package/lib/documents/widgets/nestable/Link/ExternalLink.js +0 -24
  229. package/lib/documents/widgets/nestable/Link/FileLink.d.ts +0 -22
  230. package/lib/documents/widgets/nestable/Link/FileLink.js +0 -25
  231. package/lib/documents/widgets/nestable/Link/ImageLink.d.ts +0 -28
  232. package/lib/documents/widgets/nestable/Link/ImageLink.js +0 -26
  233. package/lib/documents/widgets/nestable/Link/LinkContent.d.ts +0 -42
  234. package/lib/documents/widgets/nestable/Link/LinkContent.js +0 -17
  235. package/lib/documents/widgets/nestable/Link/index.d.ts +0 -90
  236. package/lib/documents/widgets/nestable/Link/index.js +0 -35
  237. package/lib/documents/widgets/nestable/SeparatorContent.d.ts +0 -11
  238. package/lib/documents/widgets/nestable/SeparatorContent.js +0 -15
  239. package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +0 -314
  240. package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +0 -98
  241. package/lib/documents/widgets/nestable/StructuredTextContent/index.d.ts +0 -9
  242. package/lib/documents/widgets/nestable/StructuredTextContent/index.js +0 -14
  243. package/lib/documents/widgets/nestable/index.d.ts +0 -26
  244. package/lib/documents/widgets/nestable/index.js +0 -39
  245. package/lib/documents/widgets/slices/CompositeSliceContent.d.ts +0 -14
  246. package/lib/documents/widgets/slices/CompositeSliceContent.js +0 -52
  247. package/lib/documents/widgets/slices/SharedSliceContent.d.ts +0 -15
  248. package/lib/documents/widgets/slices/SharedSliceContent.js +0 -63
  249. package/lib/documents/widgets/slices/SimpleSliceContent.d.ts +0 -6
  250. package/lib/documents/widgets/slices/SimpleSliceContent.js +0 -6
  251. package/lib/documents/widgets/slices/SliceWidgetContent.d.ts +0 -8
  252. package/lib/documents/widgets/slices/SliceWidgetContent.js +0 -26
  253. package/lib/documents/widgets/slices/SlicesContent.d.ts +0 -17
  254. package/lib/documents/widgets/slices/SlicesContent.js +0 -52
  255. package/lib/documents/widgets/slices/index.d.ts +0 -5
  256. package/lib/documents/widgets/slices/index.js +0 -8
  257. package/lib/index.d.ts +0 -3
  258. package/lib/index.js +0 -7
@@ -1,17 +0,0 @@
1
- import * as t from "io-ts";
2
- export declare const GeoPointContentType = "GeoPointContent";
3
- export declare const GeoPointContent: t.Type<{
4
- position: {
5
- lat: number;
6
- lng: number;
7
- };
8
- }, {
9
- position: {
10
- lat: number;
11
- lng: number;
12
- };
13
- } & {
14
- __TYPE__: "GeoPointContent";
15
- }, unknown>;
16
- export declare type GeoPointContent = t.TypeOf<typeof GeoPointContent>;
17
- export declare type GeoPointContentO = t.OutputOf<typeof GeoPointContent>;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GeoPointContent = exports.GeoPointContentType = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- const function_1 = require("../../../validators/function");
7
- exports.GeoPointContentType = "GeoPointContent";
8
- exports.GeoPointContent = (0, function_1.addType)(t.strict({
9
- position: t.strict({
10
- lat: t.number,
11
- lng: t.number,
12
- }),
13
- }), exports.GeoPointContentType);
@@ -1,127 +0,0 @@
1
- import * as t from "io-ts";
2
- export declare const ImageContentType = "ImageContent";
3
- export declare const ImageContentView: t.ExactC<t.IntersectionC<[t.TypeC<{
4
- origin: t.ExactC<t.TypeC<{
5
- id: t.StringC;
6
- url: t.StringC;
7
- width: t.NumberC;
8
- height: t.NumberC;
9
- }>>;
10
- width: t.NumberC;
11
- height: t.NumberC;
12
- edit: t.TypeC<{
13
- zoom: t.NumberC;
14
- crop: t.TypeC<{
15
- x: t.NumberC;
16
- y: t.NumberC;
17
- }>;
18
- background: t.StringC;
19
- }>;
20
- }>, t.PartialC<{
21
- url: t.StringC;
22
- credits: t.Type<string | null, string | null, unknown>;
23
- alt: t.Type<string | null, string | null, unknown>;
24
- provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
25
- }>]>>;
26
- export declare type ImageContentView = t.TypeOf<typeof ImageContentView>;
27
- export declare const ImageContent: t.Type<{
28
- origin: {
29
- id: string;
30
- url: string;
31
- width: number;
32
- height: number;
33
- };
34
- width: number;
35
- height: number;
36
- edit: {
37
- zoom: number;
38
- crop: {
39
- x: number;
40
- y: number;
41
- };
42
- background: string;
43
- };
44
- } & {
45
- url?: string;
46
- credits?: string | null;
47
- alt?: string | null;
48
- provider?: string | null | undefined;
49
- } & {
50
- thumbnails?: {
51
- [x: string]: {
52
- origin: {
53
- id: string;
54
- url: string;
55
- width: number;
56
- height: number;
57
- };
58
- width: number;
59
- height: number;
60
- edit: {
61
- zoom: number;
62
- crop: {
63
- x: number;
64
- y: number;
65
- };
66
- background: string;
67
- };
68
- } & {
69
- url?: string;
70
- credits?: string | null;
71
- alt?: string | null;
72
- provider?: string | null | undefined;
73
- };
74
- };
75
- }, {
76
- origin: {
77
- id: string;
78
- url: string;
79
- width: number;
80
- height: number;
81
- };
82
- width: number;
83
- height: number;
84
- edit: {
85
- zoom: number;
86
- crop: {
87
- x: number;
88
- y: number;
89
- };
90
- background: string;
91
- };
92
- } & {
93
- url?: string;
94
- credits?: string | null;
95
- alt?: string | null;
96
- provider?: string | null | undefined;
97
- } & {
98
- thumbnails?: {
99
- [x: string]: {
100
- origin: {
101
- id: string;
102
- url: string;
103
- width: number;
104
- height: number;
105
- };
106
- width: number;
107
- height: number;
108
- edit: {
109
- zoom: number;
110
- crop: {
111
- x: number;
112
- y: number;
113
- };
114
- background: string;
115
- };
116
- } & {
117
- url?: string;
118
- credits?: string | null;
119
- alt?: string | null;
120
- provider?: string | null | undefined;
121
- };
122
- };
123
- } & {
124
- __TYPE__: "ImageContent";
125
- }, unknown>;
126
- export declare type ImageContent = t.TypeOf<typeof ImageContent>;
127
- export declare type ImageContentO = t.OutputOf<typeof ImageContent>;
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ImageContent = exports.ImageContentView = exports.ImageContentType = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- const validators_1 = require("../../../validators");
7
- const function_1 = require("../../../validators/function");
8
- exports.ImageContentType = "ImageContent";
9
- const Origin = t.exact(t.type({
10
- id: t.string,
11
- url: t.string,
12
- width: t.number,
13
- height: t.number,
14
- }));
15
- exports.ImageContentView = t.exact(t.intersection([
16
- t.type({
17
- origin: Origin,
18
- width: t.number,
19
- height: t.number,
20
- edit: t.type({
21
- zoom: t.number,
22
- crop: t.type({
23
- x: t.number,
24
- y: t.number,
25
- }),
26
- background: t.string,
27
- }),
28
- }),
29
- t.partial({
30
- url: t.string,
31
- credits: validators_1.NonEmptyStringOrNull,
32
- alt: validators_1.NonEmptyStringOrNull,
33
- provider: validators_1.StringOrNull,
34
- }),
35
- ]));
36
- exports.ImageContent = (0, function_1.addType)(t.intersection([
37
- exports.ImageContentView,
38
- t.partial({
39
- thumbnails: t.record(t.string, exports.ImageContentView),
40
- }),
41
- ]), exports.ImageContentType);
@@ -1,8 +0,0 @@
1
- import * as t from "io-ts";
2
- declare type IntegrationFieldsContent = {
3
- __TYPE__: "IntegrationFieldsContent";
4
- value: string;
5
- };
6
- export declare const IntegrationFieldsContentType = "IntegrationFieldsContent";
7
- declare const IntegrationFieldsContent: t.Type<IntegrationFieldsContent, IntegrationFieldsContent, unknown>;
8
- export default IntegrationFieldsContent;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IntegrationFieldsContentType = void 0;
4
- const tslib_1 = require("tslib");
5
- const Either_1 = require("fp-ts/Either");
6
- const t = (0, tslib_1.__importStar)(require("io-ts"));
7
- exports.IntegrationFieldsContentType = "IntegrationFieldsContent";
8
- const IntegrationFieldsContent = new t.Type("IntegrationFieldsContent", (u) => { var _a; return ((_a = u) === null || _a === void 0 ? void 0 : _a.__TYPE__) === exports.IntegrationFieldsContentType; }, (u, c) => Either_1.Chain.chain(t.string.validate(u, c), (u) => {
9
- return t.success({
10
- value: u,
11
- __TYPE__: exports.IntegrationFieldsContentType,
12
- });
13
- }), () => {
14
- throw new Error("Not implemented - Not used - Not relevant");
15
- });
16
- exports.default = IntegrationFieldsContent;
@@ -1,12 +0,0 @@
1
- import * as t from "io-ts";
2
- export declare const DocumentLinkType = "DocumentLink";
3
- export declare const DocumentLink: t.Type<{
4
- id: string;
5
- }, {
6
- id: string;
7
- } & {
8
- __TYPE__: "DocumentLink";
9
- }, unknown>;
10
- export declare type DocumentLink = t.TypeOf<typeof DocumentLink>;
11
- export declare type DocumentLinkO = t.OutputOf<typeof DocumentLink>;
12
- export declare function isDocumentLink(u: unknown): u is DocumentLinkO;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isDocumentLink = exports.DocumentLink = exports.DocumentLinkType = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- const validators_1 = require("../../../../validators");
7
- const function_1 = require("../../../../validators/function");
8
- exports.DocumentLinkType = "DocumentLink";
9
- exports.DocumentLink = (0, function_1.addType)(t.strict({ id: validators_1.NonEmptyString }), exports.DocumentLinkType);
10
- function isDocumentLink(u) {
11
- return u.__TYPE__ === exports.DocumentLinkType;
12
- }
13
- exports.isDocumentLink = isDocumentLink;
@@ -1,24 +0,0 @@
1
- import * as t from "io-ts";
2
- export declare const ExternalLinkType = "ExternalLink";
3
- export declare const ExternalLink: t.Type<{
4
- url: string;
5
- } & {
6
- kind?: "web";
7
- target?: string | null | undefined;
8
- preview?: {
9
- title?: string;
10
- } | null | undefined;
11
- }, {
12
- url: string;
13
- } & {
14
- kind?: "web";
15
- target?: string | null | undefined;
16
- preview?: {
17
- title?: string;
18
- } | null | undefined;
19
- } & {
20
- __TYPE__: "ExternalLink";
21
- }, unknown>;
22
- export declare type ExternalLink = t.TypeOf<typeof ExternalLink>;
23
- export declare type ExternalLinkO = t.OutputOf<typeof ExternalLink>;
24
- export declare function isExternalLink(u: unknown): u is ExternalLinkO;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isExternalLink = exports.ExternalLink = exports.ExternalLinkType = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- const validators_1 = require("../../../../validators");
7
- const function_1 = require("../../../../validators/function");
8
- exports.ExternalLinkType = "ExternalLink";
9
- exports.ExternalLink = (0, function_1.addType)(t.exact(t.intersection([
10
- t.type({
11
- url: t.string,
12
- }),
13
- t.partial({
14
- kind: t.literal("web"),
15
- target: validators_1.StringOrNull,
16
- preview: (0, function_1.nullable)(t.partial({
17
- title: t.string,
18
- })),
19
- }),
20
- ])), exports.ExternalLinkType);
21
- function isExternalLink(u) {
22
- return u.__TYPE__ === exports.ExternalLinkType;
23
- }
24
- exports.isExternalLink = isExternalLink;
@@ -1,22 +0,0 @@
1
- import * as t from "io-ts";
2
- export declare const FileLinkType = "FileLink";
3
- export declare const FileLink: t.Type<{
4
- id: string;
5
- url: string;
6
- name: string;
7
- kind: string;
8
- } & {
9
- date?: string | null | undefined;
10
- size?: string;
11
- }, {
12
- readonly size: string;
13
- readonly __TYPE__: "FileLink";
14
- readonly id: string;
15
- readonly url: string;
16
- readonly name: string;
17
- readonly kind: string;
18
- readonly date?: string | null | undefined;
19
- }, unknown>;
20
- export declare type FileLink = t.TypeOf<typeof FileLink>;
21
- export declare type FileLinkO = t.OutputOf<typeof FileLink>;
22
- export declare function isFileLink(u: unknown): u is FileLinkO;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isFileLink = exports.FileLink = exports.FileLinkType = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- const io_ts_types_1 = require("io-ts-types");
7
- const mapOutput_1 = require("io-ts-types/lib/mapOutput");
8
- const function_1 = require("../../../../validators/function");
9
- exports.FileLinkType = "FileLink";
10
- exports.FileLink = (0, mapOutput_1.mapOutput)(t.exact(t.intersection([
11
- t.type({
12
- id: t.string,
13
- url: t.string,
14
- name: t.string,
15
- kind: t.string,
16
- }),
17
- t.partial({
18
- date: (0, function_1.nullable)(t.string),
19
- size: (0, io_ts_types_1.withFallback)(t.string, "0"),
20
- }),
21
- ])), (o) => ({ ...o, size: o.size || "0", __TYPE__: exports.FileLinkType }));
22
- function isFileLink(u) {
23
- return u.__TYPE__ === exports.FileLinkType;
24
- }
25
- exports.isFileLink = isFileLink;
@@ -1,28 +0,0 @@
1
- import * as t from "io-ts";
2
- export declare const ImageLinkType = "ImageLink";
3
- export declare const ImageLink: t.Type<{
4
- id: string;
5
- url: string;
6
- height: string;
7
- width: string;
8
- size: string;
9
- name: string;
10
- kind: string;
11
- } & {
12
- date?: string | null | undefined;
13
- }, {
14
- id: string;
15
- url: string;
16
- height: string;
17
- width: string;
18
- size: string;
19
- name: string;
20
- kind: string;
21
- } & {
22
- date?: string | null | undefined;
23
- } & {
24
- __TYPE__: "ImageLink";
25
- }, unknown>;
26
- export declare type ImageLink = t.TypeOf<typeof ImageLink>;
27
- export declare type ImageLinkO = t.OutputOf<typeof ImageLink>;
28
- export declare function isImageLink(u: unknown): u is ImageLinkO;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isImageLink = exports.ImageLink = exports.ImageLinkType = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- const validators_1 = require("../../../../validators");
7
- const function_1 = require("../../../../validators/function");
8
- exports.ImageLinkType = "ImageLink";
9
- exports.ImageLink = (0, function_1.addType)(t.exact(t.intersection([
10
- t.type({
11
- id: t.string,
12
- url: t.string,
13
- height: t.string,
14
- width: t.string,
15
- size: t.string,
16
- name: t.string,
17
- kind: t.string,
18
- }),
19
- t.partial({
20
- date: validators_1.StringOrNull,
21
- }),
22
- ])), exports.ImageLinkType);
23
- function isImageLink(u) {
24
- return u.__TYPE__ === exports.ImageLinkType;
25
- }
26
- exports.isImageLink = isImageLink;
@@ -1,42 +0,0 @@
1
- import * as t from "io-ts";
2
- import { LinkO } from "./index";
3
- export declare type LinkContent = {
4
- __TYPE__: "LinkContent";
5
- value: LinkO;
6
- };
7
- export declare const LinkContentType = "LinkContent";
8
- export declare const LinkContent: t.Type<LinkContent, ({
9
- id: string;
10
- } & {
11
- __TYPE__: "DocumentLink";
12
- }) | ({
13
- url: string;
14
- } & {
15
- kind?: "web";
16
- target?: string | null | undefined;
17
- preview?: {
18
- title?: string;
19
- } | null | undefined;
20
- } & {
21
- __TYPE__: "ExternalLink";
22
- }) | {
23
- readonly size: string;
24
- readonly __TYPE__: "FileLink";
25
- readonly id: string;
26
- readonly url: string;
27
- readonly name: string;
28
- readonly kind: string;
29
- readonly date?: string | null | undefined;
30
- } | ({
31
- id: string;
32
- url: string;
33
- height: string;
34
- width: string;
35
- size: string;
36
- name: string;
37
- kind: string;
38
- } & {
39
- date?: string | null | undefined;
40
- } & {
41
- __TYPE__: "ImageLink";
42
- }), unknown>;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LinkContent = exports.LinkContentType = void 0;
4
- const tslib_1 = require("tslib");
5
- const Either_1 = require("fp-ts/Either");
6
- const t = (0, tslib_1.__importStar)(require("io-ts"));
7
- const index_1 = require("./index");
8
- exports.LinkContentType = "LinkContent";
9
- exports.LinkContent = new t.Type("LinkContent", (u) => {
10
- var _a;
11
- return index_1.Link.is((_a = u) === null || _a === void 0 ? void 0 : _a.value);
12
- }, (u, c) => Either_1.Chain.chain(index_1.Link.validate(u, c), (u) => {
13
- return t.success({
14
- value: index_1.Link.encode(u),
15
- __TYPE__: exports.LinkContentType,
16
- });
17
- }), (linkContent) => index_1.Link.encode(linkContent.value));
@@ -1,90 +0,0 @@
1
- import * as t from "io-ts";
2
- import { isDocumentLink } from "./DocumentLink";
3
- import { isExternalLink } from "./ExternalLink";
4
- import { isFileLink } from "./FileLink";
5
- import { isImageLink } from "./ImageLink";
6
- export declare const Link: t.UnionC<[t.Type<{
7
- id: string;
8
- url: string;
9
- height: string;
10
- width: string;
11
- size: string;
12
- name: string;
13
- kind: string;
14
- } & {
15
- date?: string | null | undefined;
16
- }, {
17
- id: string;
18
- url: string;
19
- height: string;
20
- width: string;
21
- size: string;
22
- name: string;
23
- kind: string;
24
- } & {
25
- date?: string | null | undefined;
26
- } & {
27
- __TYPE__: "ImageLink";
28
- }, unknown>, t.Type<{
29
- id: string;
30
- url: string;
31
- name: string;
32
- kind: string;
33
- } & {
34
- date?: string | null | undefined;
35
- size?: string;
36
- }, {
37
- readonly size: string;
38
- readonly __TYPE__: "FileLink";
39
- readonly id: string;
40
- readonly url: string;
41
- readonly name: string;
42
- readonly kind: string;
43
- readonly date?: string | null | undefined;
44
- }, unknown>, t.Type<{
45
- id: string;
46
- }, {
47
- id: string;
48
- } & {
49
- __TYPE__: "DocumentLink";
50
- }, unknown>, t.Type<{
51
- url: string;
52
- } & {
53
- kind?: "web";
54
- target?: string | null | undefined;
55
- preview?: {
56
- title?: string;
57
- } | null | undefined;
58
- }, {
59
- url: string;
60
- } & {
61
- kind?: "web";
62
- target?: string | null | undefined;
63
- preview?: {
64
- title?: string;
65
- } | null | undefined;
66
- } & {
67
- __TYPE__: "ExternalLink";
68
- }, unknown>]>;
69
- export declare type Link = t.TypeOf<typeof Link>;
70
- export declare type LinkO = t.OutputOf<typeof Link>;
71
- export { type DocumentLinkO, DocumentLink } from "./DocumentLink";
72
- export { type ExternalLinkO, ExternalLink } from "./ExternalLink";
73
- export { type FileLinkO, FileLink } from "./FileLink";
74
- export { type ImageLinkO, ImageLink } from "./ImageLink";
75
- export { LinkContent } from "./LinkContent";
76
- export declare const BROKEN_CUSTOM_TYPE = "broken_type";
77
- export declare const is: {
78
- documentLink: typeof isDocumentLink;
79
- fileLink: typeof isFileLink;
80
- externalLink: typeof isExternalLink;
81
- imageLink: typeof isImageLink;
82
- };
83
- export declare const LinksTypes: {
84
- readonly DocumentLink: "DocumentLink";
85
- readonly FileLink: "FileLink";
86
- readonly ExternalLink: "ExternalLink";
87
- readonly ImageLink: "ImageLink";
88
- readonly LinkContent: "LinkContent";
89
- };
90
- export declare type LinksTypes = typeof LinksTypes[keyof typeof LinksTypes];
@@ -1,35 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LinksTypes = exports.is = exports.BROKEN_CUSTOM_TYPE = exports.LinkContent = exports.ImageLink = exports.FileLink = exports.ExternalLink = exports.DocumentLink = exports.Link = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- const DocumentLink_1 = require("./DocumentLink");
7
- const ExternalLink_1 = require("./ExternalLink");
8
- const FileLink_1 = require("./FileLink");
9
- const ImageLink_1 = require("./ImageLink");
10
- const LinkContent_1 = require("./LinkContent");
11
- exports.Link = t.union([ImageLink_1.ImageLink, FileLink_1.FileLink, DocumentLink_1.DocumentLink, ExternalLink_1.ExternalLink]);
12
- var DocumentLink_2 = require("./DocumentLink");
13
- Object.defineProperty(exports, "DocumentLink", { enumerable: true, get: function () { return DocumentLink_2.DocumentLink; } });
14
- var ExternalLink_2 = require("./ExternalLink");
15
- Object.defineProperty(exports, "ExternalLink", { enumerable: true, get: function () { return ExternalLink_2.ExternalLink; } });
16
- var FileLink_2 = require("./FileLink");
17
- Object.defineProperty(exports, "FileLink", { enumerable: true, get: function () { return FileLink_2.FileLink; } });
18
- var ImageLink_2 = require("./ImageLink");
19
- Object.defineProperty(exports, "ImageLink", { enumerable: true, get: function () { return ImageLink_2.ImageLink; } });
20
- var LinkContent_2 = require("./LinkContent");
21
- Object.defineProperty(exports, "LinkContent", { enumerable: true, get: function () { return LinkContent_2.LinkContent; } });
22
- exports.BROKEN_CUSTOM_TYPE = "broken_type";
23
- exports.is = {
24
- documentLink: DocumentLink_1.isDocumentLink,
25
- fileLink: FileLink_1.isFileLink,
26
- externalLink: ExternalLink_1.isExternalLink,
27
- imageLink: ImageLink_1.isImageLink,
28
- };
29
- exports.LinksTypes = {
30
- DocumentLink: DocumentLink_1.DocumentLinkType,
31
- FileLink: FileLink_1.FileLinkType,
32
- ExternalLink: ExternalLink_1.ExternalLinkType,
33
- ImageLink: ImageLink_1.ImageLinkType,
34
- LinkContent: LinkContent_1.LinkContentType,
35
- };
@@ -1,11 +0,0 @@
1
- import * as t from "io-ts";
2
- export declare const SeparatorContentType = "SeparatorContent";
3
- export declare type SeparatorContent = {
4
- __TYPE__: typeof SeparatorContentType;
5
- };
6
- export declare const SeparatorContent: {
7
- codec: t.ExactC<t.TypeC<{
8
- __TYPE__: t.LiteralC<"SeparatorContent">;
9
- }>>;
10
- is(value: unknown): value is SeparatorContent;
11
- };
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SeparatorContent = exports.SeparatorContentType = void 0;
4
- const tslib_1 = require("tslib");
5
- const t = (0, tslib_1.__importStar)(require("io-ts"));
6
- exports.SeparatorContentType = "SeparatorContent";
7
- exports.SeparatorContent = {
8
- codec: t.strict({
9
- __TYPE__: t.literal(exports.SeparatorContentType),
10
- }),
11
- is(value) {
12
- const asFieldContent = value;
13
- return asFieldContent.__TYPE__ === "SeparatorContent";
14
- },
15
- };