@prismicio/types-internal 0.2.0 → 0.2.4
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 +4 -22
- package/lib/customtypes/CustomType.js +17 -27
- package/lib/customtypes/Section.d.ts +4 -31
- package/lib/customtypes/Section.js +2 -20
- package/lib/customtypes/index.js +4 -25
- package/lib/customtypes/widgets/Group.js +4 -25
- package/lib/customtypes/widgets/UID.js +3 -24
- package/lib/customtypes/widgets/Widget.d.ts +4 -31
- package/lib/customtypes/widgets/Widget.js +6 -27
- package/lib/customtypes/widgets/index.js +8 -29
- package/lib/customtypes/widgets/nestable/BooleanField.js +3 -24
- package/lib/customtypes/widgets/nestable/Color.js +3 -24
- package/lib/customtypes/widgets/nestable/Date.js +3 -24
- package/lib/customtypes/widgets/nestable/Embed.js +3 -24
- package/lib/customtypes/widgets/nestable/GeoPoint.js +3 -24
- package/lib/customtypes/widgets/nestable/Image.js +4 -25
- package/lib/customtypes/widgets/nestable/IntegrationField.js +3 -24
- package/lib/customtypes/widgets/nestable/Link.js +5 -24
- package/lib/customtypes/widgets/nestable/NestableWidget.js +17 -38
- package/lib/customtypes/widgets/nestable/Number.js +3 -24
- package/lib/customtypes/widgets/nestable/Range.js +3 -24
- package/lib/customtypes/widgets/nestable/RichText.js +8 -25
- package/lib/customtypes/widgets/nestable/Select.js +3 -24
- package/lib/customtypes/widgets/nestable/Separator.js +3 -24
- package/lib/customtypes/widgets/nestable/Text.js +3 -24
- package/lib/customtypes/widgets/nestable/Timestamp.js +3 -24
- package/lib/customtypes/widgets/shared/ImageConstraint.js +2 -20
- package/lib/customtypes/widgets/slices/CompositeSlice.js +4 -25
- package/lib/customtypes/widgets/slices/LegacySlice.d.ts +1 -10
- package/lib/customtypes/widgets/slices/LegacySlice.js +5 -27
- package/lib/customtypes/widgets/slices/SharedSlice.js +4 -25
- package/lib/customtypes/widgets/slices/SharedSliceRef.js +3 -24
- package/lib/customtypes/widgets/slices/Slice.d.ts +4 -4
- package/lib/customtypes/widgets/slices/Slices.d.ts +6 -60
- package/lib/customtypes/widgets/slices/Slices.js +8 -29
- package/lib/customtypes/widgets/slices/index.js +8 -29
- package/lib/documents/DocumentData.js +2 -20
- package/lib/documents/index.js +3 -24
- package/lib/documents/widgets/GroupContent.js +4 -22
- package/lib/documents/widgets/SimpleWidgetContent.d.ts +2 -2
- package/lib/documents/widgets/SimpleWidgetContent.js +7 -28
- package/lib/documents/widgets/StaticWidgetContent.js +2 -20
- package/lib/documents/widgets/UIDContent.js +2 -20
- package/lib/documents/widgets/index.d.ts +13 -13
- package/lib/documents/widgets/index.js +9 -33
- package/lib/documents/widgets/nestable/BooleanContent.js +2 -20
- package/lib/documents/widgets/nestable/EmbedContent.d.ts +4 -4
- package/lib/documents/widgets/nestable/EmbedContent.js +2 -20
- package/lib/documents/widgets/nestable/FieldContent.js +5 -21
- package/lib/documents/widgets/nestable/GeoPointContent.js +2 -20
- package/lib/documents/widgets/nestable/ImageContent.d.ts +14 -14
- package/lib/documents/widgets/nestable/ImageContent.js +2 -20
- package/lib/documents/widgets/nestable/IntegrationFieldsContent.js +2 -20
- package/lib/documents/widgets/nestable/Link/DocumentLink.js +2 -20
- package/lib/documents/widgets/nestable/Link/ExternalLink.d.ts +4 -4
- package/lib/documents/widgets/nestable/Link/ExternalLink.js +2 -20
- package/lib/documents/widgets/nestable/Link/FileLink.js +2 -20
- package/lib/documents/widgets/nestable/Link/ImageLink.js +2 -20
- package/lib/documents/widgets/nestable/Link/LinkContent.d.ts +2 -2
- package/lib/documents/widgets/nestable/Link/LinkContent.js +2 -20
- package/lib/documents/widgets/nestable/Link/index.d.ts +13 -13
- package/lib/documents/widgets/nestable/Link/index.js +2 -20
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.d.ts +8 -8
- package/lib/documents/widgets/nestable/StructuredTextContent/Block.js +4 -25
- package/lib/documents/widgets/nestable/StructuredTextContent/index.js +3 -21
- package/lib/documents/widgets/nestable/index.d.ts +16 -16
- package/lib/documents/widgets/nestable/index.js +8 -32
- package/lib/documents/widgets/slices/CompositeSliceContent.d.ts +1 -1
- package/lib/documents/widgets/slices/CompositeSliceContent.js +3 -21
- package/lib/documents/widgets/slices/SharedSliceContent.d.ts +1 -1
- package/lib/documents/widgets/slices/SharedSliceContent.js +3 -21
- package/lib/documents/widgets/slices/SimpleSliceContent.js +2 -4
- package/lib/documents/widgets/slices/SliceWidgetContent.d.ts +1 -1
- package/lib/documents/widgets/slices/SliceWidgetContent.js +3 -24
- package/lib/documents/widgets/slices/SlicesContent.js +4 -22
- package/lib/documents/widgets/slices/index.js +6 -15
- package/lib/index.js +4 -22
- package/lib/validators/DateFromString.js +2 -20
- package/lib/validators/DateFromStringOrNumber.js +2 -20
- package/lib/validators/DateFromTsMs.js +2 -20
- package/lib/validators/IntFromNumber.js +2 -20
- package/lib/validators/IntFromPixels.js +5 -24
- package/lib/validators/NonEmptyString.js +2 -20
- package/lib/validators/NonEmptyStringOrNull.js +2 -4
- package/lib/validators/NumberOrNull.js +2 -20
- package/lib/validators/StringFromBoolean.js +2 -20
- package/lib/validators/StringFromNumber.js +2 -20
- package/lib/validators/StringOrNull.js +2 -20
- package/lib/validators/function.js +4 -21
- package/lib/validators/index.js +13 -34
- package/package.json +1 -1
- package/src/customtypes/widgets/slices/LegacySlice.ts +1 -2
- package/src/documents/widgets/nestable/Link/index.ts +1 -1
- package/src/documents/widgets/nestable/index.ts +1 -1
- package/lib/documents/widgets/Widget.d.ts +0 -0
- package/lib/documents/widgets/Widget.js +0 -1
|
@@ -1,38 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.FieldContentType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
23
5
|
const function_1 = require("fp-ts/function");
|
|
24
|
-
const O = __importStar(require("fp-ts/Option"));
|
|
25
|
-
const t = __importStar(require("io-ts"));
|
|
6
|
+
const O = (0, tslib_1.__importStar)(require("fp-ts/Option"));
|
|
7
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
26
8
|
exports.FieldContentType = "FieldContent";
|
|
27
9
|
//we do that instead of idiomatic .trim()
|
|
28
10
|
//because we need to have the exact same behaviour than scala/java .trim()
|
|
29
11
|
//in other world only trim space and not non-breaking space or tab
|
|
30
12
|
function trimScalaStyle(s) {
|
|
31
13
|
let startAt = 0;
|
|
14
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
32
15
|
while (startAt < s.length && s[startAt] <= " ") {
|
|
33
16
|
startAt++;
|
|
34
17
|
}
|
|
35
18
|
let endAt = s.length;
|
|
19
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
36
20
|
while (startAt < endAt && s[endAt - 1] <= " ") {
|
|
37
21
|
endAt--;
|
|
38
22
|
}
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.GeoPointContent = exports.GeoPointContentType = void 0;
|
|
23
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
24
6
|
const function_1 = require("../../../validators/function");
|
|
25
7
|
exports.GeoPointContentType = "GeoPointContent";
|
|
26
8
|
exports.GeoPointContent = (0, function_1.addType)(t.strict({
|
|
@@ -42,9 +42,9 @@ export declare const ImageContent: t.Type<{
|
|
|
42
42
|
background: string;
|
|
43
43
|
};
|
|
44
44
|
} & {
|
|
45
|
-
url?: string
|
|
46
|
-
credits?: string | null
|
|
47
|
-
alt?: string | null
|
|
45
|
+
url?: string;
|
|
46
|
+
credits?: string | null;
|
|
47
|
+
alt?: string | null;
|
|
48
48
|
provider?: string | null | undefined;
|
|
49
49
|
} & {
|
|
50
50
|
thumbnails?: {
|
|
@@ -66,12 +66,12 @@ export declare const ImageContent: t.Type<{
|
|
|
66
66
|
background: string;
|
|
67
67
|
};
|
|
68
68
|
} & {
|
|
69
|
-
url?: string
|
|
70
|
-
credits?: string | null
|
|
71
|
-
alt?: string | null
|
|
69
|
+
url?: string;
|
|
70
|
+
credits?: string | null;
|
|
71
|
+
alt?: string | null;
|
|
72
72
|
provider?: string | null | undefined;
|
|
73
73
|
};
|
|
74
|
-
}
|
|
74
|
+
};
|
|
75
75
|
}, {
|
|
76
76
|
origin: {
|
|
77
77
|
id: string;
|
|
@@ -90,9 +90,9 @@ export declare const ImageContent: t.Type<{
|
|
|
90
90
|
background: string;
|
|
91
91
|
};
|
|
92
92
|
} & {
|
|
93
|
-
url?: string
|
|
94
|
-
credits?: string | null
|
|
95
|
-
alt?: string | null
|
|
93
|
+
url?: string;
|
|
94
|
+
credits?: string | null;
|
|
95
|
+
alt?: string | null;
|
|
96
96
|
provider?: string | null | undefined;
|
|
97
97
|
} & {
|
|
98
98
|
thumbnails?: {
|
|
@@ -114,12 +114,12 @@ export declare const ImageContent: t.Type<{
|
|
|
114
114
|
background: string;
|
|
115
115
|
};
|
|
116
116
|
} & {
|
|
117
|
-
url?: string
|
|
118
|
-
credits?: string | null
|
|
119
|
-
alt?: string | null
|
|
117
|
+
url?: string;
|
|
118
|
+
credits?: string | null;
|
|
119
|
+
alt?: string | null;
|
|
120
120
|
provider?: string | null | undefined;
|
|
121
121
|
};
|
|
122
|
-
}
|
|
122
|
+
};
|
|
123
123
|
} & {
|
|
124
124
|
__TYPE__: "ImageContent";
|
|
125
125
|
}, unknown>;
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.ImageContent = exports.ImageContentType = exports.ImageContentView = void 0;
|
|
23
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
24
6
|
const validators_1 = require("../../../validators");
|
|
25
7
|
const function_1 = require("../../../validators/function");
|
|
26
8
|
const Origin = t.exact(t.type({
|
|
@@ -1,27 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.IntegrationFieldsContentType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
23
5
|
const Either_1 = require("fp-ts/Either");
|
|
24
|
-
const t = __importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
25
7
|
exports.IntegrationFieldsContentType = "IntegrationFieldsContent";
|
|
26
8
|
const IntegrationFieldsContent = new t.Type("IntegrationFieldsContent", (u) => u?.__TYPE__ === exports.IntegrationFieldsContentType, (u, c) => Either_1.Chain.chain(t.string.validate(u, c), (u) => {
|
|
27
9
|
return t.success({
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.isDocumentLink = exports.DocumentLink = exports.DocumentLinkType = void 0;
|
|
23
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
24
6
|
const validators_1 = require("../../../../validators");
|
|
25
7
|
const function_1 = require("../../../../validators/function");
|
|
26
8
|
exports.DocumentLinkType = "DocumentLink";
|
|
@@ -3,18 +3,18 @@ export declare const ExternalLinkType = "ExternalLink";
|
|
|
3
3
|
export declare const ExternalLink: t.Type<{
|
|
4
4
|
url: string;
|
|
5
5
|
} & {
|
|
6
|
-
kind?: "web"
|
|
6
|
+
kind?: "web";
|
|
7
7
|
target?: string | null | undefined;
|
|
8
8
|
preview?: {
|
|
9
|
-
title?: string
|
|
9
|
+
title?: string;
|
|
10
10
|
} | null | undefined;
|
|
11
11
|
}, {
|
|
12
12
|
url: string;
|
|
13
13
|
} & {
|
|
14
|
-
kind?: "web"
|
|
14
|
+
kind?: "web";
|
|
15
15
|
target?: string | null | undefined;
|
|
16
16
|
preview?: {
|
|
17
|
-
title?: string
|
|
17
|
+
title?: string;
|
|
18
18
|
} | null | undefined;
|
|
19
19
|
} & {
|
|
20
20
|
__TYPE__: "ExternalLink";
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.isExternalLink = exports.ExternalLink = exports.ExternalLinkType = void 0;
|
|
23
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
24
6
|
const validators_1 = require("../../../../validators");
|
|
25
7
|
const function_1 = require("../../../../validators/function");
|
|
26
8
|
exports.ExternalLinkType = "ExternalLink";
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.isFileLink = exports.FileLink = exports.FileLinkType = void 0;
|
|
23
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
24
6
|
const mapOutput_1 = require("io-ts-types/lib/mapOutput");
|
|
25
7
|
const function_1 = require("../../../../validators/function");
|
|
26
8
|
exports.FileLinkType = "FileLink";
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.isImageLink = exports.ImageLink = exports.ImageLinkType = void 0;
|
|
23
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
24
6
|
const validators_1 = require("../../../../validators");
|
|
25
7
|
const function_1 = require("../../../../validators/function");
|
|
26
8
|
exports.ImageLinkType = "ImageLink";
|
|
@@ -10,10 +10,10 @@ export declare const LinkContent: t.Type<LinkContent, {
|
|
|
10
10
|
} | ({
|
|
11
11
|
url: string;
|
|
12
12
|
} & {
|
|
13
|
-
kind?: "web"
|
|
13
|
+
kind?: "web";
|
|
14
14
|
target?: string | null | undefined;
|
|
15
15
|
preview?: {
|
|
16
|
-
title?: string
|
|
16
|
+
title?: string;
|
|
17
17
|
} | null | undefined;
|
|
18
18
|
}) | ({
|
|
19
19
|
id: string;
|
|
@@ -1,27 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.LinkContent = exports.LinkContentType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
23
5
|
const Either_1 = require("fp-ts/Either");
|
|
24
|
-
const t = __importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
25
7
|
const index_1 = require("./index");
|
|
26
8
|
exports.LinkContentType = "LinkContent";
|
|
27
9
|
exports.LinkContent = new t.Type("LinkContent", (u) => {
|
|
@@ -50,28 +50,28 @@ export declare const Link: t.UnionC<[t.Type<{
|
|
|
50
50
|
}, unknown>, t.Type<{
|
|
51
51
|
url: string;
|
|
52
52
|
} & {
|
|
53
|
-
kind?: "web"
|
|
53
|
+
kind?: "web";
|
|
54
54
|
target?: string | null | undefined;
|
|
55
55
|
preview?: {
|
|
56
|
-
title?: string
|
|
56
|
+
title?: string;
|
|
57
57
|
} | null | undefined;
|
|
58
58
|
}, {
|
|
59
59
|
url: string;
|
|
60
60
|
} & {
|
|
61
|
-
kind?: "web"
|
|
61
|
+
kind?: "web";
|
|
62
62
|
target?: string | null | undefined;
|
|
63
63
|
preview?: {
|
|
64
|
-
title?: string
|
|
64
|
+
title?: string;
|
|
65
65
|
} | null | undefined;
|
|
66
66
|
} & {
|
|
67
67
|
__TYPE__: "ExternalLink";
|
|
68
68
|
}, unknown>]>;
|
|
69
69
|
export declare type Link = t.TypeOf<typeof Link>;
|
|
70
70
|
export declare type LinkO = t.OutputOf<typeof Link>;
|
|
71
|
-
export {
|
|
72
|
-
export {
|
|
73
|
-
export {
|
|
74
|
-
export {
|
|
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
75
|
export { LinkContent } from "./LinkContent";
|
|
76
76
|
export declare const BROKEN_CUSTOM_TYPE = "broken_type";
|
|
77
77
|
export declare const is: {
|
|
@@ -81,9 +81,9 @@ export declare const is: {
|
|
|
81
81
|
imageLink: typeof isImageLink;
|
|
82
82
|
};
|
|
83
83
|
export declare const LinksTypes: {
|
|
84
|
-
DocumentLink:
|
|
85
|
-
FileLink:
|
|
86
|
-
ExternalLink:
|
|
87
|
-
ImageLink:
|
|
88
|
-
LinkContent:
|
|
84
|
+
readonly DocumentLink: "DocumentLink";
|
|
85
|
+
readonly FileLink: "FileLink";
|
|
86
|
+
readonly ExternalLink: "ExternalLink";
|
|
87
|
+
readonly ImageLink: "ImageLink";
|
|
88
|
+
readonly LinkContent: "LinkContent";
|
|
89
89
|
};
|
|
@@ -1,26 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.LinksTypes = exports.is = exports.BROKEN_CUSTOM_TYPE = exports.LinkContent = exports.ImageLink = exports.FileLink = exports.ExternalLink = exports.DocumentLink = exports.Link = void 0;
|
|
23
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
24
6
|
const DocumentLink_1 = require("./DocumentLink");
|
|
25
7
|
const ExternalLink_1 = require("./ExternalLink");
|
|
26
8
|
const FileLink_1 = require("./FileLink");
|
|
@@ -51,10 +51,10 @@ export declare const ImageBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
51
51
|
} | ({
|
|
52
52
|
url: string;
|
|
53
53
|
} & {
|
|
54
|
-
kind?: "web"
|
|
54
|
+
kind?: "web";
|
|
55
55
|
target?: string | null | undefined;
|
|
56
56
|
preview?: {
|
|
57
|
-
title?: string
|
|
57
|
+
title?: string;
|
|
58
58
|
} | null | undefined;
|
|
59
59
|
}) | ({
|
|
60
60
|
id: string;
|
|
@@ -81,10 +81,10 @@ export declare const ImageBlock: t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
81
81
|
}) | ({
|
|
82
82
|
url: string;
|
|
83
83
|
} & {
|
|
84
|
-
kind?: "web"
|
|
84
|
+
kind?: "web";
|
|
85
85
|
target?: string | null | undefined;
|
|
86
86
|
preview?: {
|
|
87
|
-
title?: string
|
|
87
|
+
title?: string;
|
|
88
88
|
} | null | undefined;
|
|
89
89
|
} & {
|
|
90
90
|
__TYPE__: "ExternalLink";
|
|
@@ -180,10 +180,10 @@ export declare const Block: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
180
180
|
} | ({
|
|
181
181
|
url: string;
|
|
182
182
|
} & {
|
|
183
|
-
kind?: "web"
|
|
183
|
+
kind?: "web";
|
|
184
184
|
target?: string | null | undefined;
|
|
185
185
|
preview?: {
|
|
186
|
-
title?: string
|
|
186
|
+
title?: string;
|
|
187
187
|
} | null | undefined;
|
|
188
188
|
}) | ({
|
|
189
189
|
id: string;
|
|
@@ -210,10 +210,10 @@ export declare const Block: t.UnionC<[t.ExactC<t.IntersectionC<[t.TypeC<{
|
|
|
210
210
|
}) | ({
|
|
211
211
|
url: string;
|
|
212
212
|
} & {
|
|
213
|
-
kind?: "web"
|
|
213
|
+
kind?: "web";
|
|
214
214
|
target?: string | null | undefined;
|
|
215
215
|
preview?: {
|
|
216
|
-
title?: string
|
|
216
|
+
title?: string;
|
|
217
217
|
} | null | undefined;
|
|
218
218
|
} & {
|
|
219
219
|
__TYPE__: "ExternalLink";
|
|
@@ -1,33 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
3
|
exports.Block = exports.TextBlock = exports.checkEmbedBlock = exports.EmbedBlock = exports.EmbedBlockType = exports.checkImageBlock = exports.ImageBlock = exports.ImageBlockType = exports.ValidatedMetas = exports.Meta = void 0;
|
|
26
|
-
const
|
|
27
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const E = (0, tslib_1.__importStar)(require("fp-ts/lib/Either"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
28
7
|
const validators_1 = require("../../../../validators");
|
|
29
8
|
const function_1 = require("../../../../validators/function");
|
|
30
|
-
const EmbedContent_1 = __importDefault(require("../EmbedContent"));
|
|
9
|
+
const EmbedContent_1 = (0, tslib_1.__importDefault)(require("../EmbedContent"));
|
|
31
10
|
const ImageContent_1 = require("../ImageContent");
|
|
32
11
|
const Link_1 = require("../Link");
|
|
33
12
|
exports.Meta = t.exact(t.intersection([
|
|
@@ -1,27 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
3
|
exports.Blocks = exports.StructuredTextContent = exports.StructuredTextContentType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
23
5
|
const Either_1 = require("fp-ts/Either");
|
|
24
|
-
const t = __importStar(require("io-ts"));
|
|
6
|
+
const t = (0, tslib_1.__importStar)(require("io-ts"));
|
|
25
7
|
const Block_1 = require("./Block");
|
|
26
8
|
exports.StructuredTextContentType = "StructuredTextContent";
|
|
27
9
|
exports.StructuredTextContent = new t.Type(exports.StructuredTextContentType, (u) => u?.__TYPE__ === exports.StructuredTextContentType, (u, c) => Either_1.Chain.chain(t.array(Block_1.Block).validate(u, c), (u) => {
|
|
@@ -29,4 +11,4 @@ exports.StructuredTextContent = new t.Type(exports.StructuredTextContentType, (u
|
|
|
29
11
|
}), () => {
|
|
30
12
|
throw new Error("NotImplementedError: Not relevant method");
|
|
31
13
|
});
|
|
32
|
-
exports.Blocks = __importStar(require("./Block"));
|
|
14
|
+
exports.Blocks = (0, tslib_1.__importStar)(require("./Block"));
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
export { default as BooleanContent } from "./BooleanContent";
|
|
2
2
|
export { default as EmbedContent } from "./EmbedContent";
|
|
3
3
|
export { default as FieldContent } from "./FieldContent";
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
4
|
+
export { type GeoPointContentO, GeoPointContent } from "./GeoPointContent";
|
|
5
|
+
export { type ImageContentO, ImageContent, ImageContentView, } from "./ImageContent";
|
|
6
6
|
export { default as IntegrationFieldsContent } from "./IntegrationFieldsContent";
|
|
7
7
|
export * as Links from "./Link";
|
|
8
8
|
export * from "./SeparatorContent";
|
|
9
9
|
export * from "./StructuredTextContent";
|
|
10
10
|
export declare const NestableTypes: {
|
|
11
|
-
Links: {
|
|
12
|
-
DocumentLink:
|
|
13
|
-
FileLink:
|
|
14
|
-
ExternalLink:
|
|
15
|
-
ImageLink:
|
|
16
|
-
LinkContent:
|
|
11
|
+
readonly Links: {
|
|
12
|
+
readonly DocumentLink: "DocumentLink";
|
|
13
|
+
readonly FileLink: "FileLink";
|
|
14
|
+
readonly ExternalLink: "ExternalLink";
|
|
15
|
+
readonly ImageLink: "ImageLink";
|
|
16
|
+
readonly LinkContent: "LinkContent";
|
|
17
17
|
};
|
|
18
|
-
StructuredText:
|
|
19
|
-
Boolean:
|
|
20
|
-
Embed:
|
|
21
|
-
Field:
|
|
22
|
-
GeoPoint:
|
|
23
|
-
Image:
|
|
24
|
-
IntegrationFields:
|
|
25
|
-
Separator:
|
|
18
|
+
readonly StructuredText: "StructuredTextContent";
|
|
19
|
+
readonly Boolean: "BooleanContent";
|
|
20
|
+
readonly Embed: "EmbedContent";
|
|
21
|
+
readonly Field: "FieldContent";
|
|
22
|
+
readonly GeoPoint: "GeoPointContent";
|
|
23
|
+
readonly Image: "ImageContent";
|
|
24
|
+
readonly IntegrationFields: "IntegrationFieldsContent";
|
|
25
|
+
readonly Separator: "SeparatorContent";
|
|
26
26
|
};
|