@prismicio/types-internal 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/content/fields/GroupContent.d.ts +2 -66
- package/lib/content/fields/nestable/EmbedContent.d.ts +1 -33
- package/lib/content/fields/nestable/EmbedContent.js +1 -1
- package/lib/content/fields/nestable/NestableContent.d.ts +1 -33
- package/lib/content/fields/slices/SharedSliceContent.d.ts +2 -66
- package/lib/documents/widgets/nestable/Link/LinkContent.d.ts +2 -2
- package/lib/documents/widgets/nestable/Link/LinkContent.js +4 -1
- package/package.json +1 -1
- package/src/content/fields/nestable/EmbedContent.ts +1 -1
- package/src/documents/widgets/nestable/Link/LinkContent.ts +6 -3
|
@@ -38,39 +38,7 @@ export declare const GroupItemContent: t.ExactC<t.TypeC<{
|
|
|
38
38
|
__TYPE__: "EmbedContent";
|
|
39
39
|
}, unknown>, t.ExactC<t.TypeC<{
|
|
40
40
|
__TYPE__: t.LiteralC<"EmbedContent">;
|
|
41
|
-
all: t.
|
|
42
|
-
embed_url: string;
|
|
43
|
-
type: string;
|
|
44
|
-
} & {
|
|
45
|
-
version?: string | number | null;
|
|
46
|
-
title?: string | null | undefined;
|
|
47
|
-
author_name?: string | null | undefined;
|
|
48
|
-
author_url?: string | null | undefined;
|
|
49
|
-
provider_name?: string | null | undefined;
|
|
50
|
-
provider_url?: string | null | undefined;
|
|
51
|
-
cache_age?: string | number | null;
|
|
52
|
-
thumbnail_url?: string | null | undefined;
|
|
53
|
-
thumbnail_width?: number | null | undefined;
|
|
54
|
-
thumbnail_height?: number | null | undefined;
|
|
55
|
-
html?: string | null | undefined;
|
|
56
|
-
}, {
|
|
57
|
-
embed_url: string;
|
|
58
|
-
type: string;
|
|
59
|
-
} & {
|
|
60
|
-
version?: string | number | null;
|
|
61
|
-
title?: string | null | undefined;
|
|
62
|
-
author_name?: string | null | undefined;
|
|
63
|
-
author_url?: string | null | undefined;
|
|
64
|
-
provider_name?: string | null | undefined;
|
|
65
|
-
provider_url?: string | null | undefined;
|
|
66
|
-
cache_age?: string | number | null;
|
|
67
|
-
thumbnail_url?: string | null | undefined;
|
|
68
|
-
thumbnail_width?: number | null | undefined;
|
|
69
|
-
thumbnail_height?: number | null | undefined;
|
|
70
|
-
html?: string | null | undefined;
|
|
71
|
-
} & {
|
|
72
|
-
__TYPE__: "EmbedContent";
|
|
73
|
-
}, unknown>;
|
|
41
|
+
all: t.UnknownC;
|
|
74
42
|
}>>]>, t.ExactC<t.TypeC<{
|
|
75
43
|
type: t.KeyofC<{
|
|
76
44
|
Text: null;
|
|
@@ -443,39 +411,7 @@ export declare const GroupContent: t.ExactC<t.TypeC<{
|
|
|
443
411
|
__TYPE__: "EmbedContent";
|
|
444
412
|
}, unknown>, t.ExactC<t.TypeC<{
|
|
445
413
|
__TYPE__: t.LiteralC<"EmbedContent">;
|
|
446
|
-
all: t.
|
|
447
|
-
embed_url: string;
|
|
448
|
-
type: string;
|
|
449
|
-
} & {
|
|
450
|
-
version?: string | number | null;
|
|
451
|
-
title?: string | null | undefined;
|
|
452
|
-
author_name?: string | null | undefined;
|
|
453
|
-
author_url?: string | null | undefined;
|
|
454
|
-
provider_name?: string | null | undefined;
|
|
455
|
-
provider_url?: string | null | undefined;
|
|
456
|
-
cache_age?: string | number | null;
|
|
457
|
-
thumbnail_url?: string | null | undefined;
|
|
458
|
-
thumbnail_width?: number | null | undefined;
|
|
459
|
-
thumbnail_height?: number | null | undefined;
|
|
460
|
-
html?: string | null | undefined;
|
|
461
|
-
}, {
|
|
462
|
-
embed_url: string;
|
|
463
|
-
type: string;
|
|
464
|
-
} & {
|
|
465
|
-
version?: string | number | null;
|
|
466
|
-
title?: string | null | undefined;
|
|
467
|
-
author_name?: string | null | undefined;
|
|
468
|
-
author_url?: string | null | undefined;
|
|
469
|
-
provider_name?: string | null | undefined;
|
|
470
|
-
provider_url?: string | null | undefined;
|
|
471
|
-
cache_age?: string | number | null;
|
|
472
|
-
thumbnail_url?: string | null | undefined;
|
|
473
|
-
thumbnail_width?: number | null | undefined;
|
|
474
|
-
thumbnail_height?: number | null | undefined;
|
|
475
|
-
html?: string | null | undefined;
|
|
476
|
-
} & {
|
|
477
|
-
__TYPE__: "EmbedContent";
|
|
478
|
-
}, unknown>;
|
|
414
|
+
all: t.UnknownC;
|
|
479
415
|
}>>]>, t.ExactC<t.TypeC<{
|
|
480
416
|
type: t.KeyofC<{
|
|
481
417
|
Text: null;
|
|
@@ -33,38 +33,6 @@ export declare const EmbedContent: t.IntersectionC<[t.Type<{
|
|
|
33
33
|
__TYPE__: "EmbedContent";
|
|
34
34
|
}, unknown>, t.ExactC<t.TypeC<{
|
|
35
35
|
__TYPE__: t.LiteralC<"EmbedContent">;
|
|
36
|
-
all: t.
|
|
37
|
-
embed_url: string;
|
|
38
|
-
type: string;
|
|
39
|
-
} & {
|
|
40
|
-
version?: string | number | null;
|
|
41
|
-
title?: string | null | undefined;
|
|
42
|
-
author_name?: string | null | undefined;
|
|
43
|
-
author_url?: string | null | undefined;
|
|
44
|
-
provider_name?: string | null | undefined;
|
|
45
|
-
provider_url?: string | null | undefined;
|
|
46
|
-
cache_age?: string | number | null;
|
|
47
|
-
thumbnail_url?: string | null | undefined;
|
|
48
|
-
thumbnail_width?: number | null | undefined;
|
|
49
|
-
thumbnail_height?: number | null | undefined;
|
|
50
|
-
html?: string | null | undefined;
|
|
51
|
-
}, {
|
|
52
|
-
embed_url: string;
|
|
53
|
-
type: string;
|
|
54
|
-
} & {
|
|
55
|
-
version?: string | number | null;
|
|
56
|
-
title?: string | null | undefined;
|
|
57
|
-
author_name?: string | null | undefined;
|
|
58
|
-
author_url?: string | null | undefined;
|
|
59
|
-
provider_name?: string | null | undefined;
|
|
60
|
-
provider_url?: string | null | undefined;
|
|
61
|
-
cache_age?: string | number | null;
|
|
62
|
-
thumbnail_url?: string | null | undefined;
|
|
63
|
-
thumbnail_width?: number | null | undefined;
|
|
64
|
-
thumbnail_height?: number | null | undefined;
|
|
65
|
-
html?: string | null | undefined;
|
|
66
|
-
} & {
|
|
67
|
-
__TYPE__: "EmbedContent";
|
|
68
|
-
}, unknown>;
|
|
36
|
+
all: t.UnknownC;
|
|
69
37
|
}>>]>;
|
|
70
38
|
export declare type EmbedContent = t.TypeOf<typeof EmbedContent>;
|
|
@@ -36,39 +36,7 @@ export declare const NestableContent: t.UnionC<[t.ExactC<t.TypeC<{
|
|
|
36
36
|
__TYPE__: "EmbedContent";
|
|
37
37
|
}, unknown>, t.ExactC<t.TypeC<{
|
|
38
38
|
__TYPE__: t.LiteralC<"EmbedContent">;
|
|
39
|
-
all: t.
|
|
40
|
-
embed_url: string;
|
|
41
|
-
type: string;
|
|
42
|
-
} & {
|
|
43
|
-
version?: string | number | null;
|
|
44
|
-
title?: string | null | undefined;
|
|
45
|
-
author_name?: string | null | undefined;
|
|
46
|
-
author_url?: string | null | undefined;
|
|
47
|
-
provider_name?: string | null | undefined;
|
|
48
|
-
provider_url?: string | null | undefined;
|
|
49
|
-
cache_age?: string | number | null;
|
|
50
|
-
thumbnail_url?: string | null | undefined;
|
|
51
|
-
thumbnail_width?: number | null | undefined;
|
|
52
|
-
thumbnail_height?: number | null | undefined;
|
|
53
|
-
html?: string | null | undefined;
|
|
54
|
-
}, {
|
|
55
|
-
embed_url: string;
|
|
56
|
-
type: string;
|
|
57
|
-
} & {
|
|
58
|
-
version?: string | number | null;
|
|
59
|
-
title?: string | null | undefined;
|
|
60
|
-
author_name?: string | null | undefined;
|
|
61
|
-
author_url?: string | null | undefined;
|
|
62
|
-
provider_name?: string | null | undefined;
|
|
63
|
-
provider_url?: string | null | undefined;
|
|
64
|
-
cache_age?: string | number | null;
|
|
65
|
-
thumbnail_url?: string | null | undefined;
|
|
66
|
-
thumbnail_width?: number | null | undefined;
|
|
67
|
-
thumbnail_height?: number | null | undefined;
|
|
68
|
-
html?: string | null | undefined;
|
|
69
|
-
} & {
|
|
70
|
-
__TYPE__: "EmbedContent";
|
|
71
|
-
}, unknown>;
|
|
39
|
+
all: t.UnknownC;
|
|
72
40
|
}>>]>, t.ExactC<t.TypeC<{
|
|
73
41
|
type: t.KeyofC<{
|
|
74
42
|
Text: null;
|
|
@@ -39,39 +39,7 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
|
|
|
39
39
|
__TYPE__: "EmbedContent";
|
|
40
40
|
}, unknown>, t.ExactC<t.TypeC<{
|
|
41
41
|
__TYPE__: t.LiteralC<"EmbedContent">;
|
|
42
|
-
all: t.
|
|
43
|
-
embed_url: string;
|
|
44
|
-
type: string;
|
|
45
|
-
} & {
|
|
46
|
-
version?: string | number | null;
|
|
47
|
-
title?: string | null | undefined;
|
|
48
|
-
author_name?: string | null | undefined;
|
|
49
|
-
author_url?: string | null | undefined;
|
|
50
|
-
provider_name?: string | null | undefined;
|
|
51
|
-
provider_url?: string | null | undefined;
|
|
52
|
-
cache_age?: string | number | null;
|
|
53
|
-
thumbnail_url?: string | null | undefined;
|
|
54
|
-
thumbnail_width?: number | null | undefined;
|
|
55
|
-
thumbnail_height?: number | null | undefined;
|
|
56
|
-
html?: string | null | undefined;
|
|
57
|
-
}, {
|
|
58
|
-
embed_url: string;
|
|
59
|
-
type: string;
|
|
60
|
-
} & {
|
|
61
|
-
version?: string | number | null;
|
|
62
|
-
title?: string | null | undefined;
|
|
63
|
-
author_name?: string | null | undefined;
|
|
64
|
-
author_url?: string | null | undefined;
|
|
65
|
-
provider_name?: string | null | undefined;
|
|
66
|
-
provider_url?: string | null | undefined;
|
|
67
|
-
cache_age?: string | number | null;
|
|
68
|
-
thumbnail_url?: string | null | undefined;
|
|
69
|
-
thumbnail_width?: number | null | undefined;
|
|
70
|
-
thumbnail_height?: number | null | undefined;
|
|
71
|
-
html?: string | null | undefined;
|
|
72
|
-
} & {
|
|
73
|
-
__TYPE__: "EmbedContent";
|
|
74
|
-
}, unknown>;
|
|
42
|
+
all: t.UnknownC;
|
|
75
43
|
}>>]>, t.ExactC<t.TypeC<{
|
|
76
44
|
type: t.KeyofC<{
|
|
77
45
|
Text: null;
|
|
@@ -439,39 +407,7 @@ export declare const SharedSliceContent: t.ExactC<t.TypeC<{
|
|
|
439
407
|
__TYPE__: "EmbedContent";
|
|
440
408
|
}, unknown>, t.ExactC<t.TypeC<{
|
|
441
409
|
__TYPE__: t.LiteralC<"EmbedContent">;
|
|
442
|
-
all: t.
|
|
443
|
-
embed_url: string;
|
|
444
|
-
type: string;
|
|
445
|
-
} & {
|
|
446
|
-
version?: string | number | null;
|
|
447
|
-
title?: string | null | undefined;
|
|
448
|
-
author_name?: string | null | undefined;
|
|
449
|
-
author_url?: string | null | undefined;
|
|
450
|
-
provider_name?: string | null | undefined;
|
|
451
|
-
provider_url?: string | null | undefined;
|
|
452
|
-
cache_age?: string | number | null;
|
|
453
|
-
thumbnail_url?: string | null | undefined;
|
|
454
|
-
thumbnail_width?: number | null | undefined;
|
|
455
|
-
thumbnail_height?: number | null | undefined;
|
|
456
|
-
html?: string | null | undefined;
|
|
457
|
-
}, {
|
|
458
|
-
embed_url: string;
|
|
459
|
-
type: string;
|
|
460
|
-
} & {
|
|
461
|
-
version?: string | number | null;
|
|
462
|
-
title?: string | null | undefined;
|
|
463
|
-
author_name?: string | null | undefined;
|
|
464
|
-
author_url?: string | null | undefined;
|
|
465
|
-
provider_name?: string | null | undefined;
|
|
466
|
-
provider_url?: string | null | undefined;
|
|
467
|
-
cache_age?: string | number | null;
|
|
468
|
-
thumbnail_url?: string | null | undefined;
|
|
469
|
-
thumbnail_width?: number | null | undefined;
|
|
470
|
-
thumbnail_height?: number | null | undefined;
|
|
471
|
-
html?: string | null | undefined;
|
|
472
|
-
} & {
|
|
473
|
-
__TYPE__: "EmbedContent";
|
|
474
|
-
}, unknown>;
|
|
410
|
+
all: t.UnknownC;
|
|
475
411
|
}>>]>, t.ExactC<t.TypeC<{
|
|
476
412
|
type: t.KeyofC<{
|
|
477
413
|
Text: null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as t from "io-ts";
|
|
2
|
-
import {
|
|
2
|
+
import { LinkO } from "./index";
|
|
3
3
|
export declare type LinkContent = {
|
|
4
4
|
__TYPE__: "LinkContent";
|
|
5
|
-
value:
|
|
5
|
+
value: LinkO;
|
|
6
6
|
};
|
|
7
7
|
export declare const LinkContentType = "LinkContent";
|
|
8
8
|
export declare const LinkContent: t.Type<LinkContent, {
|
|
@@ -10,5 +10,8 @@ exports.LinkContent = new t.Type("LinkContent", (u) => {
|
|
|
10
10
|
var _a;
|
|
11
11
|
return index_1.Link.is((_a = u) === null || _a === void 0 ? void 0 : _a.value);
|
|
12
12
|
}, (u, c) => Either_1.Chain.chain(index_1.Link.validate(u, c), (u) => {
|
|
13
|
-
return t.success({
|
|
13
|
+
return t.success({
|
|
14
|
+
value: index_1.Link.encode(u),
|
|
15
|
+
__TYPE__: exports.LinkContentType,
|
|
16
|
+
});
|
|
14
17
|
}), (linkContent) => index_1.Link.encode(linkContent.value));
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Chain } from "fp-ts/Either"
|
|
2
2
|
import * as t from "io-ts"
|
|
3
3
|
|
|
4
|
-
import { Link } from "./index"
|
|
4
|
+
import { Link, LinkO } from "./index"
|
|
5
5
|
|
|
6
6
|
export type LinkContent = {
|
|
7
7
|
__TYPE__: "LinkContent"
|
|
8
|
-
value:
|
|
8
|
+
value: LinkO
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const LinkContentType = "LinkContent"
|
|
@@ -16,7 +16,10 @@ export const LinkContent = new t.Type<LinkContent, Link>(
|
|
|
16
16
|
},
|
|
17
17
|
(u, c) =>
|
|
18
18
|
Chain.chain(Link.validate(u, c), (u) => {
|
|
19
|
-
return t.success({
|
|
19
|
+
return t.success({
|
|
20
|
+
value: Link.encode(u),
|
|
21
|
+
__TYPE__: LinkContentType,
|
|
22
|
+
} as const)
|
|
20
23
|
}),
|
|
21
24
|
(linkContent) => Link.encode(linkContent.value),
|
|
22
25
|
)
|