@prismicio/types-internal 2.0.0-alpha.0 → 2.0.0-alpha.2
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/common/WidgetKey.d.ts +1 -1
- package/lib/common/WidgetKey.js +1 -1
- package/lib/common/index.js +1 -1
- package/lib/content/Document.d.ts +4 -4
- package/lib/content/Document.js +1 -1
- package/lib/content/LegacyContentCtx.d.ts +2 -2
- package/lib/content/LegacyContentCtx.js +1 -1
- package/lib/content/fields/EmptyContent.d.ts +1 -1
- package/lib/content/fields/EmptyContent.js +1 -1
- package/lib/content/fields/GroupContent.d.ts +4 -4
- package/lib/content/fields/GroupContent.js +1 -1
- package/lib/content/fields/UIDContent.d.ts +1 -1
- package/lib/content/fields/UIDContent.js +1 -1
- package/lib/content/fields/WidgetContent.d.ts +2 -2
- package/lib/content/fields/WidgetContent.js +1 -1
- package/lib/content/fields/index.js +5 -5
- package/lib/content/fields/nestable/BooleanContent.d.ts +1 -1
- package/lib/content/fields/nestable/BooleanContent.js +1 -1
- package/lib/content/fields/nestable/EmbedContent.d.ts +2 -2
- package/lib/content/fields/nestable/EmbedContent.js +1 -1
- package/lib/content/fields/nestable/FieldContent/ColorContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/ColorContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/DateContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/DateContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/NumberContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/NumberContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/RangeContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/RangeContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/SelectContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/SelectContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/TextContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/TextContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/TimestampContent.d.ts +1 -1
- package/lib/content/fields/nestable/FieldContent/TimestampContent.js +2 -2
- package/lib/content/fields/nestable/FieldContent/index.d.ts +2 -2
- package/lib/content/fields/nestable/FieldContent/index.js +9 -9
- package/lib/content/fields/nestable/GeoPointContent.d.ts +1 -1
- package/lib/content/fields/nestable/GeoPointContent.js +1 -1
- package/lib/content/fields/nestable/ImageContent.d.ts +2 -2
- package/lib/content/fields/nestable/ImageContent.js +1 -1
- package/lib/content/fields/nestable/IntegrationFieldContent.d.ts +1 -1
- package/lib/content/fields/nestable/IntegrationFieldContent.js +1 -1
- package/lib/content/fields/nestable/LinkContent.d.ts +6 -6
- package/lib/content/fields/nestable/LinkContent.js +1 -1
- package/lib/content/fields/nestable/NestableContent.d.ts +2 -2
- package/lib/content/fields/nestable/NestableContent.js +1 -1
- package/lib/content/fields/nestable/RichTextContent/Blocks.d.ts +7 -7
- package/lib/content/fields/nestable/RichTextContent/Blocks.js +2 -2
- package/lib/content/fields/nestable/RichTextContent/index.d.ts +1 -1
- package/lib/content/fields/nestable/RichTextContent/index.js +2 -2
- package/lib/content/fields/nestable/SeparatorContent.d.ts +1 -1
- package/lib/content/fields/nestable/SeparatorContent.js +1 -1
- package/lib/content/fields/nestable/index.js +10 -10
- package/lib/content/fields/slices/Slice/CompositeSliceContent.d.ts +1 -1
- package/lib/content/fields/slices/Slice/CompositeSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/RepeatableContent.js +1 -1
- package/lib/content/fields/slices/Slice/SharedSliceContent.d.ts +1 -1
- package/lib/content/fields/slices/Slice/SharedSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/SimpleSliceContent.d.ts +1 -1
- package/lib/content/fields/slices/Slice/SimpleSliceContent.js +1 -1
- package/lib/content/fields/slices/Slice/index.d.ts +1 -1
- package/lib/content/fields/slices/Slice/index.js +1 -1
- package/lib/content/fields/slices/SliceItem.d.ts +1 -1
- package/lib/content/fields/slices/SliceItem.js +1 -1
- package/lib/content/fields/slices/SlicesContent.d.ts +2 -2
- package/lib/content/fields/slices/SlicesContent.js +1 -1
- package/lib/content/fields/slices/index.js +5 -5
- package/lib/content/index.js +3 -3
- package/lib/content/utils.d.ts +2 -2
- package/lib/content/utils.js +2 -4
- package/lib/customtypes/CustomType.d.ts +2 -2
- package/lib/customtypes/CustomType.js +1 -1
- package/lib/customtypes/Section.d.ts +2 -2
- package/lib/customtypes/Section.js +1 -1
- package/lib/customtypes/diff/Changes.d.ts +4 -4
- package/lib/customtypes/diff/SharedSlice.d.ts +3 -671
- package/lib/customtypes/diff/Variation.d.ts +3 -657
- package/lib/customtypes/diff/index.js +3 -3
- package/lib/customtypes/index.d.ts +1 -1
- package/lib/customtypes/index.js +5 -5
- package/lib/customtypes/widgets/Group.d.ts +1 -1
- package/lib/customtypes/widgets/Group.js +1 -1
- package/lib/customtypes/widgets/UID.d.ts +1 -1
- package/lib/customtypes/widgets/UID.js +1 -1
- package/lib/customtypes/widgets/Widget.d.ts +3 -3
- package/lib/customtypes/widgets/Widget.js +3 -3
- package/lib/customtypes/widgets/index.js +6 -6
- package/lib/customtypes/widgets/nestable/BooleanField.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/BooleanField.js +1 -1
- package/lib/customtypes/widgets/nestable/Color.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Color.js +1 -1
- package/lib/customtypes/widgets/nestable/Date.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Date.js +1 -1
- package/lib/customtypes/widgets/nestable/Embed.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Embed.js +1 -1
- package/lib/customtypes/widgets/nestable/GeoPoint.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/GeoPoint.js +1 -1
- package/lib/customtypes/widgets/nestable/Image.d.ts +3 -3
- package/lib/customtypes/widgets/nestable/Image.js +2 -2
- package/lib/customtypes/widgets/nestable/IntegrationField.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/IntegrationField.js +1 -1
- package/lib/customtypes/widgets/nestable/Link.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Link.js +1 -1
- package/lib/customtypes/widgets/nestable/NestableWidget.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/NestableWidget.js +1 -1
- package/lib/customtypes/widgets/nestable/Number.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Number.js +1 -1
- package/lib/customtypes/widgets/nestable/Range.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Range.js +1 -1
- package/lib/customtypes/widgets/nestable/RichText.d.ts +3 -3
- package/lib/customtypes/widgets/nestable/RichText.js +2 -2
- package/lib/customtypes/widgets/nestable/Select.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Select.js +1 -1
- package/lib/customtypes/widgets/nestable/Separator.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Separator.js +1 -1
- package/lib/customtypes/widgets/nestable/Text.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Text.js +1 -1
- package/lib/customtypes/widgets/nestable/Timestamp.d.ts +2 -2
- package/lib/customtypes/widgets/nestable/Timestamp.js +1 -1
- package/lib/customtypes/widgets/nestable/index.js +16 -16
- package/lib/customtypes/widgets/shared/ImageConstraint.d.ts +1 -1
- package/lib/customtypes/widgets/shared/ImageConstraint.js +1 -1
- package/lib/customtypes/widgets/slices/CompositeSlice.d.ts +1 -1
- package/lib/customtypes/widgets/slices/CompositeSlice.js +1 -1
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +1 -1
- package/lib/customtypes/widgets/slices/LegacySlice.js +2 -2
- package/lib/customtypes/widgets/slices/SharedSlice.d.ts +2 -2
- package/lib/customtypes/widgets/slices/SharedSlice.js +1 -1
- package/lib/customtypes/widgets/slices/SharedSliceRef.d.ts +1 -1
- package/lib/customtypes/widgets/slices/SharedSliceRef.js +1 -1
- package/lib/customtypes/widgets/slices/Slice.d.ts +2 -2
- package/lib/customtypes/widgets/slices/Slices.d.ts +5 -5
- package/lib/customtypes/widgets/slices/Slices.js +4 -4
- package/lib/customtypes/widgets/slices/SlicesTypes.d.ts +1 -1
- package/lib/customtypes/widgets/slices/SlicesTypes.js +1 -1
- package/lib/customtypes/widgets/slices/index.js +6 -6
- package/lib/utils/index.js +2 -2
- package/lib/validators/DateFromString.js +1 -1
- package/lib/validators/DateFromStringOrNumber.js +1 -1
- package/lib/validators/DateFromTsMs.js +1 -1
- package/lib/validators/IntFromNumber.d.ts +2 -2
- package/lib/validators/IntFromNumber.js +1 -1
- package/lib/validators/IntFromPixels.d.ts +2 -2
- package/lib/validators/IntFromPixels.js +1 -1
- package/lib/validators/NonEmptyString.js +1 -1
- package/lib/validators/NonEmptyStringOrNull.js +1 -1
- package/lib/validators/NumberOrNull.js +1 -1
- package/lib/validators/StringFromBoolean.d.ts +2 -2
- package/lib/validators/StringFromBoolean.js +1 -1
- package/lib/validators/StringFromNumber.d.ts +2 -2
- package/lib/validators/StringFromNumber.js +1 -1
- package/lib/validators/StringOrNull.js +1 -1
- package/lib/validators/TrimmedString.d.ts +2 -2
- package/lib/validators/TrimmedString.js +1 -1
- package/lib/validators/function.js +1 -1
- package/lib/validators/index.js +12 -12
- package/package.json +1 -1
- package/src/customtypes/index.ts +1 -1
package/lib/common/WidgetKey.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WidgetKey = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t =
|
|
5
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
6
|
const function_1 = require("../validators/function");
|
|
7
7
|
const widgetKeyRegex = new RegExp("^[^<>]+$");
|
|
8
8
|
exports.WidgetKey = (0, function_1.refineType)(t.string, "WidgetKey", (s) => s.length === 0 || widgetKeyRegex.test(s));
|
package/lib/common/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
2
|
import { WidgetKey } from "../common";
|
|
3
|
-
import { FieldOrSliceType, WithTypes } from "./LegacyContentCtx";
|
|
3
|
+
import { FieldOrSliceType, LegacyContentCtx, WithTypes } from "./LegacyContentCtx";
|
|
4
4
|
export declare const Document: t.RecordC<t.Type<string, string, unknown>, t.UnionC<[t.ExactC<t.TypeC<{
|
|
5
5
|
__TYPE__: t.LiteralC<"GroupContentType">;
|
|
6
6
|
value: t.ArrayC<t.ExactC<t.TypeC<{
|
|
@@ -2504,9 +2504,9 @@ export declare const Document: t.RecordC<t.Type<string, string, unknown>, t.Unio
|
|
|
2504
2504
|
}>>]>]>;
|
|
2505
2505
|
}>>;
|
|
2506
2506
|
}>]>>;
|
|
2507
|
-
export
|
|
2507
|
+
export type Document = t.TypeOf<typeof Document>;
|
|
2508
2508
|
declare const legacyDocReader: t.RecordC<t.Type<string, string, unknown>, t.UnknownC>;
|
|
2509
|
-
|
|
2509
|
+
type DocumentLegacy = t.TypeOf<typeof legacyDocReader>;
|
|
2510
2510
|
declare function extractMetadata(data: {
|
|
2511
2511
|
[p: string]: unknown;
|
|
2512
2512
|
}): {
|
|
@@ -2518,7 +2518,7 @@ declare function extractMetadata(data: {
|
|
|
2518
2518
|
declare function parseLegacyDocument(legacyDoc: unknown): Document | undefined;
|
|
2519
2519
|
declare function encodeToLegacyDocument(document: Document): DocumentLegacy;
|
|
2520
2520
|
export declare const DocumentLegacy: {
|
|
2521
|
-
_codec: (allTypes?:
|
|
2521
|
+
_codec: (allTypes?: LegacyContentCtx["allTypes"]) => t.Type<{
|
|
2522
2522
|
[x: string]: {
|
|
2523
2523
|
__TYPE__: "BooleanContent";
|
|
2524
2524
|
value: boolean;
|
package/lib/content/Document.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.DocumentLegacy = exports.Document = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const common_1 = require("../common");
|
|
9
9
|
const fields_1 = require("./fields");
|
|
10
10
|
const LegacyContentCtx_1 = require("./LegacyContentCtx");
|
|
@@ -23,7 +23,7 @@ export declare const FieldOrSliceType: t.UnionC<[t.KeyofC<{
|
|
|
23
23
|
Slice: null;
|
|
24
24
|
SharedSlice: null;
|
|
25
25
|
}>]>;
|
|
26
|
-
export
|
|
26
|
+
export type FieldOrSliceType = t.TypeOf<typeof FieldOrSliceType>;
|
|
27
27
|
export declare class LegacyContentCtx {
|
|
28
28
|
fieldKey: string;
|
|
29
29
|
prefixedKey: string;
|
|
@@ -35,7 +35,7 @@ export declare class LegacyContentCtx {
|
|
|
35
35
|
}
|
|
36
36
|
export declare function getFieldCtx(fieldKey: string, ctx: LegacyContentCtx, prefixes?: Array<string>): LegacyContentCtx;
|
|
37
37
|
export declare function defaultCtx(key: string, allTypes?: Map<string, FieldOrSliceType>): LegacyContentCtx;
|
|
38
|
-
export
|
|
38
|
+
export type WithTypes<T> = {
|
|
39
39
|
types: Record<string, FieldOrSliceType>;
|
|
40
40
|
content: T;
|
|
41
41
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultCtx = exports.getFieldCtx = exports.LegacyContentCtx = exports.FieldOrSliceType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t =
|
|
5
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
6
|
const widgets_1 = require("../customtypes/widgets");
|
|
7
7
|
exports.FieldOrSliceType = t.union([widgets_1.FieldTypes, widgets_1.SlicesTypes]);
|
|
8
8
|
class LegacyContentCtx {
|
|
@@ -4,7 +4,7 @@ exports.EmptyContent = exports.EmptyLegacy = exports.isEmptyContent = exports.Em
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const utils_1 = require("../utils");
|
|
9
9
|
exports.EmptyContentType = "EmptyContent";
|
|
10
10
|
const isEmptyContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.EmptyContentType;
|
|
@@ -313,9 +313,9 @@ export declare const GroupItemContent: t.ExactC<t.TypeC<{
|
|
|
313
313
|
__TYPE__: t.LiteralC<"SeparatorContent">;
|
|
314
314
|
}>>]>]>>;
|
|
315
315
|
}>>;
|
|
316
|
-
export
|
|
316
|
+
export type GroupItemContent = t.TypeOf<typeof GroupItemContent>;
|
|
317
317
|
declare const itemLegacyReader: t.ArrayC<t.TupleC<[t.StringC, t.UnknownC]>>;
|
|
318
|
-
export
|
|
318
|
+
export type GroupItemLegacy = t.TypeOf<typeof itemLegacyReader>;
|
|
319
319
|
export declare const GroupItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
320
320
|
__TYPE__: "GroupItemContent";
|
|
321
321
|
value: [string, {
|
|
@@ -584,7 +584,7 @@ export declare const GroupItemLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
|
584
584
|
__TYPE__: "SeparatorContent";
|
|
585
585
|
}][];
|
|
586
586
|
}, WithTypes<[string, unknown][]>, unknown>;
|
|
587
|
-
|
|
587
|
+
type GroupLegacy = Array<GroupItemLegacy>;
|
|
588
588
|
export declare const GroupLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
589
589
|
__TYPE__: "GroupContentType";
|
|
590
590
|
value: {
|
|
@@ -1443,5 +1443,5 @@ export declare const GroupContent: t.ExactC<t.TypeC<{
|
|
|
1443
1443
|
}>>]>]>>;
|
|
1444
1444
|
}>>>;
|
|
1445
1445
|
}>>;
|
|
1446
|
-
export
|
|
1446
|
+
export type GroupContent = t.TypeOf<typeof GroupContent>;
|
|
1447
1447
|
export {};
|
|
@@ -4,7 +4,7 @@ exports.GroupContent = exports.isGroupContent = exports.GroupContentType = expor
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const LegacyContentCtx_1 = require("../LegacyContentCtx");
|
|
9
9
|
const utils_1 = require("../utils");
|
|
10
10
|
const nestable_1 = require("./nestable");
|
|
@@ -4,7 +4,7 @@ exports.UIDContent = exports.UIDLegacy = exports.isUIDContent = exports.UIDConte
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const utils_1 = require("../utils");
|
|
9
9
|
exports.UIDContentType = "UIDContent";
|
|
10
10
|
const isUIDContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.UIDContentType;
|
|
@@ -4658,8 +4658,8 @@ export declare const isWidgetContent: (u: unknown) => u is {
|
|
|
4658
4658
|
__TYPE__: "UIDContent";
|
|
4659
4659
|
value: string;
|
|
4660
4660
|
};
|
|
4661
|
-
export
|
|
4662
|
-
export
|
|
4661
|
+
export type WidgetContent = t.TypeOf<typeof WidgetContent>;
|
|
4662
|
+
export type WidgetTypes = WidgetContent["__TYPE__"];
|
|
4663
4663
|
export declare const WidgetLegacy: (ctx: LegacyContentCtx) => {
|
|
4664
4664
|
decode(value: unknown): import("fp-ts/lib/Either").Left<t.Errors> | import("fp-ts/lib/Either").Right<{
|
|
4665
4665
|
__TYPE__: "BooleanContent";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WidgetLegacy = exports.isWidgetContent = exports.WidgetContent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t =
|
|
5
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
6
|
const GroupContent_1 = require("./GroupContent");
|
|
7
7
|
const nestable_1 = require("./nestable");
|
|
8
8
|
const slices_1 = require("./slices");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
tslib_1.__exportStar(require("./GroupContent"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./nestable"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./slices"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./UIDContent"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./WidgetContent"), exports);
|
|
@@ -4,7 +4,7 @@ exports.BooleanContent = exports.BooleanLegacy = exports.isBooleanContent = expo
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
9
|
exports.BooleanContentType = "BooleanContent";
|
|
10
10
|
const isBooleanContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.BooleanContentType;
|
|
@@ -35,7 +35,7 @@ export declare const EmbedContentLegacy: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
35
35
|
thumbnail_height: t.UnionC<[t.Type<number, number, unknown>, t.NullC, t.UndefinedC]>;
|
|
36
36
|
html: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
37
37
|
}>]>>;
|
|
38
|
-
export
|
|
38
|
+
export type EmbedLegacy = t.TypeOf<typeof EmbedContentLegacy>;
|
|
39
39
|
export declare const EmbedLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
40
40
|
embed_url: string;
|
|
41
41
|
type: string;
|
|
@@ -87,4 +87,4 @@ export declare const EmbedContent: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.
|
|
|
87
87
|
}>]>>, t.ExactC<t.TypeC<{
|
|
88
88
|
__TYPE__: t.LiteralC<"EmbedContent">;
|
|
89
89
|
}>>]>;
|
|
90
|
-
export
|
|
90
|
+
export type EmbedContent = t.TypeOf<typeof EmbedContent>;
|
|
@@ -4,7 +4,7 @@ exports.EmbedContent = exports.EmbedLegacy = exports.EmbedContentLegacy = export
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const Objects_1 = require("../../../utils/Objects");
|
|
9
9
|
const validators_1 = require("../../../validators");
|
|
10
10
|
const utils_1 = require("../../utils");
|
|
@@ -15,4 +15,4 @@ export declare const ColorContent: t.ExactC<t.TypeC<{
|
|
|
15
15
|
value: t.Type<string, string, unknown>;
|
|
16
16
|
__TYPE__: t.LiteralC<"FieldContent">;
|
|
17
17
|
}>>;
|
|
18
|
-
export
|
|
18
|
+
export type ColorContent = t.TypeOf<typeof ColorContent>;
|
|
@@ -4,9 +4,9 @@ exports.ColorContent = exports.ColorLegacy = exports.isColorContent = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const widgets_1 = require("../../../../customtypes/widgets");
|
|
9
|
-
const TrimmedString_1 =
|
|
9
|
+
const TrimmedString_1 = tslib_1.__importDefault(require("../../../../validators/TrimmedString"));
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
const isColorContent = (u) => (0, utils_1.hasContentType)(u) &&
|
|
@@ -15,4 +15,4 @@ export declare const DateContent: t.ExactC<t.TypeC<{
|
|
|
15
15
|
value: t.Type<string, string, unknown>;
|
|
16
16
|
__TYPE__: t.LiteralC<"FieldContent">;
|
|
17
17
|
}>>;
|
|
18
|
-
export
|
|
18
|
+
export type DateContent = t.TypeOf<typeof DateContent>;
|
|
@@ -4,9 +4,9 @@ exports.DateContent = exports.DateLegacy = exports.isDateContent = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const widgets_1 = require("../../../../customtypes/widgets");
|
|
9
|
-
const TrimmedString_1 =
|
|
9
|
+
const TrimmedString_1 = tslib_1.__importDefault(require("../../../../validators/TrimmedString"));
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
const isDateContent = (u) => (0, utils_1.hasContentType)(u) &&
|
|
@@ -15,4 +15,4 @@ export declare const NumberContent: t.ExactC<t.TypeC<{
|
|
|
15
15
|
value: t.Type<string, string, unknown>;
|
|
16
16
|
__TYPE__: t.LiteralC<"FieldContent">;
|
|
17
17
|
}>>;
|
|
18
|
-
export
|
|
18
|
+
export type NumberContent = t.TypeOf<typeof NumberContent>;
|
|
@@ -4,9 +4,9 @@ exports.NumberContent = exports.NumberLegacy = exports.isNumberContent = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const widgets_1 = require("../../../../customtypes/widgets");
|
|
9
|
-
const TrimmedString_1 =
|
|
9
|
+
const TrimmedString_1 = tslib_1.__importDefault(require("../../../../validators/TrimmedString"));
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
const isNumberContent = (u) => (0, utils_1.hasContentType)(u) &&
|
|
@@ -15,4 +15,4 @@ export declare const RangeContent: t.ExactC<t.TypeC<{
|
|
|
15
15
|
value: t.Type<string, string, unknown>;
|
|
16
16
|
__TYPE__: t.LiteralC<"FieldContent">;
|
|
17
17
|
}>>;
|
|
18
|
-
export
|
|
18
|
+
export type RangeContent = t.TypeOf<typeof RangeContent>;
|
|
@@ -4,9 +4,9 @@ exports.RangeContent = exports.RangeLegacy = exports.isRangeContent = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const widgets_1 = require("../../../../customtypes/widgets");
|
|
9
|
-
const TrimmedString_1 =
|
|
9
|
+
const TrimmedString_1 = tslib_1.__importDefault(require("../../../../validators/TrimmedString"));
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
const isRangeContent = (u) => (0, utils_1.hasContentType)(u) &&
|
|
@@ -15,4 +15,4 @@ export declare const SelectContent: t.ExactC<t.TypeC<{
|
|
|
15
15
|
value: t.Type<string, string, unknown>;
|
|
16
16
|
__TYPE__: t.LiteralC<"FieldContent">;
|
|
17
17
|
}>>;
|
|
18
|
-
export
|
|
18
|
+
export type SelectContent = t.TypeOf<typeof SelectContent>;
|
|
@@ -4,9 +4,9 @@ exports.SelectContent = exports.SelectLegacy = exports.isSelectContent = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const widgets_1 = require("../../../../customtypes/widgets");
|
|
9
|
-
const TrimmedString_1 =
|
|
9
|
+
const TrimmedString_1 = tslib_1.__importDefault(require("../../../../validators/TrimmedString"));
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
const isSelectContent = (u) => (0, utils_1.hasContentType)(u) &&
|
|
@@ -15,4 +15,4 @@ export declare const TextContent: t.ExactC<t.TypeC<{
|
|
|
15
15
|
value: t.Type<string, string, unknown>;
|
|
16
16
|
__TYPE__: t.LiteralC<"FieldContent">;
|
|
17
17
|
}>>;
|
|
18
|
-
export
|
|
18
|
+
export type TextContent = t.TypeOf<typeof TextContent>;
|
|
@@ -4,9 +4,9 @@ exports.TextContent = exports.TextLegacy = exports.isTextContent = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const widgets_1 = require("../../../../customtypes/widgets");
|
|
9
|
-
const TrimmedString_1 =
|
|
9
|
+
const TrimmedString_1 = tslib_1.__importDefault(require("../../../../validators/TrimmedString"));
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
const isTextContent = (u) => (0, utils_1.hasContentType)(u) &&
|
|
@@ -15,4 +15,4 @@ export declare const TimestampContent: t.ExactC<t.TypeC<{
|
|
|
15
15
|
value: t.Type<string, string, unknown>;
|
|
16
16
|
__TYPE__: t.LiteralC<"FieldContent">;
|
|
17
17
|
}>>;
|
|
18
|
-
export
|
|
18
|
+
export type TimestampContent = t.TypeOf<typeof TimestampContent>;
|
|
@@ -4,9 +4,9 @@ exports.TimestampContent = exports.TimestampLegacy = exports.isTimestampContent
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const widgets_1 = require("../../../../customtypes/widgets");
|
|
9
|
-
const TrimmedString_1 =
|
|
9
|
+
const TrimmedString_1 = tslib_1.__importDefault(require("../../../../validators/TrimmedString"));
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
11
11
|
const common_1 = require("./common");
|
|
12
12
|
const isTimestampContent = (u) => (0, utils_1.hasContentType)(u) &&
|
|
@@ -8,7 +8,7 @@ export declare const FieldType: t.KeyofC<{
|
|
|
8
8
|
Range: null;
|
|
9
9
|
Select: null;
|
|
10
10
|
}>;
|
|
11
|
-
export
|
|
11
|
+
export type FieldType = t.TypeOf<typeof FieldType>;
|
|
12
12
|
export declare const FieldContent: t.UnionC<[t.ExactC<t.TypeC<{
|
|
13
13
|
type: t.LiteralC<"Date">;
|
|
14
14
|
value: t.Type<string, string, unknown>;
|
|
@@ -38,7 +38,7 @@ export declare const FieldContent: t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
38
38
|
value: t.Type<string, string, unknown>;
|
|
39
39
|
__TYPE__: t.LiteralC<"FieldContent">;
|
|
40
40
|
}>>]>;
|
|
41
|
-
export
|
|
41
|
+
export type FieldContent = t.TypeOf<typeof FieldContent>;
|
|
42
42
|
export * from "./ColorContent";
|
|
43
43
|
export * from "./common";
|
|
44
44
|
export * from "./DateContent";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FieldContent = exports.FieldType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t =
|
|
5
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
6
|
const ColorContent_1 = require("./ColorContent");
|
|
7
7
|
const DateContent_1 = require("./DateContent");
|
|
8
8
|
const NumberContent_1 = require("./NumberContent");
|
|
@@ -28,11 +28,11 @@ exports.FieldContent = t.union([
|
|
|
28
28
|
TextContent_1.TextContent,
|
|
29
29
|
TimestampContent_1.TimestampContent,
|
|
30
30
|
]);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
tslib_1.__exportStar(require("./ColorContent"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./common"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./DateContent"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./NumberContent"), exports);
|
|
35
|
+
tslib_1.__exportStar(require("./RangeContent"), exports);
|
|
36
|
+
tslib_1.__exportStar(require("./SelectContent"), exports);
|
|
37
|
+
tslib_1.__exportStar(require("./TextContent"), exports);
|
|
38
|
+
tslib_1.__exportStar(require("./TimestampContent"), exports);
|
|
@@ -30,4 +30,4 @@ export declare const GeoPointContent: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
|
30
30
|
}>>, t.ExactC<t.TypeC<{
|
|
31
31
|
__TYPE__: t.LiteralC<"GeoPointContent">;
|
|
32
32
|
}>>]>;
|
|
33
|
-
export
|
|
33
|
+
export type GeoPointContent = t.TypeOf<typeof GeoPointContent>;
|
|
@@ -4,7 +4,7 @@ exports.GeoPointContent = exports.GeoPointLegacy = exports.isGeoPointContent = e
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
9
|
exports.GeoPointContentType = "GeoPointContent";
|
|
10
10
|
const isGeoPointContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.GeoPointContentType;
|
|
@@ -75,7 +75,7 @@ export declare const ImageContentView: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
75
75
|
alt: t.Type<string | null, string | null, unknown>;
|
|
76
76
|
provider: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
77
77
|
}>]>>;
|
|
78
|
-
export
|
|
78
|
+
export type ImageContentView = t.TypeOf<typeof ImageContentView>;
|
|
79
79
|
export declare const ImageLegacy: (ctx: LegacyContentCtx) => t.Type<{
|
|
80
80
|
origin: {
|
|
81
81
|
id: string;
|
|
@@ -224,4 +224,4 @@ export declare const ImageContent: t.IntersectionC<[t.IntersectionC<[t.ExactC<t.
|
|
|
224
224
|
}>]>, t.ExactC<t.TypeC<{
|
|
225
225
|
__TYPE__: t.LiteralC<"ImageContent">;
|
|
226
226
|
}>>]>;
|
|
227
|
-
export
|
|
227
|
+
export type ImageContent = t.TypeOf<typeof ImageContent>;
|
|
@@ -4,7 +4,7 @@ exports.ImageContent = exports.ImageLegacy = exports.ImageContentView = exports.
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const Objects_1 = require("../../../utils/Objects");
|
|
9
9
|
const validators_1 = require("../../../validators");
|
|
10
10
|
const utils_1 = require("../../utils");
|
|
@@ -13,4 +13,4 @@ export declare const IntegrationFieldContent: t.ExactC<t.TypeC<{
|
|
|
13
13
|
__TYPE__: t.LiteralC<"IntegrationFieldsContent">;
|
|
14
14
|
value: t.StringC;
|
|
15
15
|
}>>;
|
|
16
|
-
export
|
|
16
|
+
export type IntegrationFieldContent = t.TypeOf<typeof IntegrationFieldContent>;
|
|
@@ -4,7 +4,7 @@ exports.IntegrationFieldContent = exports.IntegrationFieldLegacy = exports.isInt
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
9
|
exports.IntegrationFieldContentType = "IntegrationFieldsContent";
|
|
10
10
|
const isIntegrationFieldContent = (u) => (0, utils_1.hasContentType)(u) && u.__TYPE__ === exports.IntegrationFieldContentType;
|
|
@@ -14,7 +14,7 @@ export declare const ImageLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
|
14
14
|
}>, t.PartialC<{
|
|
15
15
|
date: t.UnionC<[t.Type<string, string, unknown>, t.NullC, t.UndefinedC]>;
|
|
16
16
|
}>]>>]>;
|
|
17
|
-
export
|
|
17
|
+
export type ImageLinkContent = t.TypeOf<typeof ImageLinkContent>;
|
|
18
18
|
export declare const FileLinkType = "FileLink";
|
|
19
19
|
export declare const FileLinkContent: t.IntersectionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
20
20
|
id: t.StringC;
|
|
@@ -29,14 +29,14 @@ export declare const FileLinkContent: t.IntersectionC<[t.ExactC<t.IntersectionC<
|
|
|
29
29
|
}>, t.PartialC<{
|
|
30
30
|
size: t.StringC;
|
|
31
31
|
}>]>>]>;
|
|
32
|
-
export
|
|
32
|
+
export type FileLinkContent = t.TypeOf<typeof FileLinkContent>;
|
|
33
33
|
export declare const DocumentLinkType = "DocumentLink";
|
|
34
34
|
export declare const DocumentLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
35
35
|
__TYPE__: t.LiteralC<"DocumentLink">;
|
|
36
36
|
}>>, t.ExactC<t.TypeC<{
|
|
37
37
|
id: t.Type<string, string, unknown>;
|
|
38
38
|
}>>]>;
|
|
39
|
-
export
|
|
39
|
+
export type DocumentLinkContent = t.TypeOf<typeof DocumentLinkContent>;
|
|
40
40
|
export declare const ExternalLinkType = "ExternalLink";
|
|
41
41
|
export declare const ExternalLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
42
42
|
__TYPE__: t.LiteralC<"ExternalLink">;
|
|
@@ -51,7 +51,7 @@ export declare const ExternalLinkContent: t.IntersectionC<[t.ExactC<t.TypeC<{
|
|
|
51
51
|
title?: string;
|
|
52
52
|
}, unknown>, t.NullC, t.UndefinedC]>;
|
|
53
53
|
}>]>>]>;
|
|
54
|
-
export
|
|
54
|
+
export type ExternalLinkContent = t.TypeOf<typeof ExternalLinkContent>;
|
|
55
55
|
export declare const LinkContentType = "LinkContent";
|
|
56
56
|
export declare const isLinkContent: (u: unknown) => u is {
|
|
57
57
|
__TYPE__: "LinkContent";
|
|
@@ -317,5 +317,5 @@ export declare const LinkContent: t.ExactC<t.TypeC<{
|
|
|
317
317
|
}, unknown>, t.NullC, t.UndefinedC]>;
|
|
318
318
|
}>]>>]>]>;
|
|
319
319
|
}>>;
|
|
320
|
-
export
|
|
321
|
-
export
|
|
320
|
+
export type LinkContent = t.TypeOf<typeof LinkContent>;
|
|
321
|
+
export type LinksTypes = LinkContent["__TYPE__"] | LinkContent["value"]["__TYPE__"];
|
|
@@ -4,7 +4,7 @@ exports.LinkContent = exports.Link = exports.LinkContentLegacy = exports.LinkLeg
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fp_ts_1 = require("fp-ts");
|
|
6
6
|
const function_1 = require("fp-ts/lib/function");
|
|
7
|
-
const t =
|
|
7
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
8
8
|
const io_ts_types_1 = require("io-ts-types");
|
|
9
9
|
const validators_1 = require("../../../validators");
|
|
10
10
|
const function_2 = require("../../../validators/function");
|
|
@@ -309,8 +309,8 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
309
309
|
}>>, t.ExactC<t.TypeC<{
|
|
310
310
|
__TYPE__: t.LiteralC<"SeparatorContent">;
|
|
311
311
|
}>>]>;
|
|
312
|
-
export
|
|
313
|
-
export
|
|
312
|
+
export type NestableContent = t.TypeOf<typeof NestableContent>;
|
|
313
|
+
export type NestableContentType = NestableContent["__TYPE__"];
|
|
314
314
|
export declare const isNestableContent: (u: unknown) => u is {
|
|
315
315
|
__TYPE__: "BooleanContent";
|
|
316
316
|
value: boolean;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NestableLegacy = exports.isNestableContent = exports.NestableContent = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const t =
|
|
5
|
+
const t = tslib_1.__importStar(require("io-ts"));
|
|
6
6
|
const EmptyContent_1 = require("../EmptyContent");
|
|
7
7
|
const BooleanContent_1 = require("./BooleanContent");
|
|
8
8
|
const EmbedContent_1 = require("./EmbedContent");
|