@prismicio/types-internal 2.7.0 → 2.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/types-internal",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Prismic types for Custom Types and Prismic Data",
5
5
  "keywords": [
6
6
  "typescript",
@@ -12,21 +12,9 @@ import { hasContentType } from "../../utils"
12
12
 
13
13
  export const ImageLinkType = "ImageLink"
14
14
 
15
- const isImageLinkKind = (input: unknown) => typeof input === "string"
16
-
17
- const ImageLinkKind = new t.Type<"image">(
18
- "ImageLinkKind",
19
- (input): input is "image" => isImageLinkKind(input),
20
- (input, context) =>
21
- isImageLinkKind(input)
22
- ? t.success("image" as const)
23
- : t.failure(input, context),
24
- () => "image" as const,
25
- )
26
-
27
15
  const filledImageLinkLegacyCodec = t.intersection([
28
16
  t.strict({
29
- kind: ImageLinkKind,
17
+ kind: t.string,
30
18
  id: t.string,
31
19
  url: t.string,
32
20
  height: t.string,
@@ -117,22 +105,10 @@ export type ImageLinkContent = t.TypeOf<typeof ImageLinkContent>
117
105
 
118
106
  export const FileLinkType = "FileLink"
119
107
 
120
- const isFileLinkKind = (input: unknown) => typeof input === "string"
121
-
122
- const FileLinkKind = new t.Type<"file">(
123
- "FileLinkKind",
124
- (input): input is "file" => isFileLinkKind(input),
125
- (input, context) =>
126
- isFileLinkKind(input)
127
- ? t.success("file" as const)
128
- : t.failure(input, context),
129
- () => "file" as const,
130
- )
131
-
132
108
  const filledFileLinkLegacyCodec = t.exact(
133
109
  t.intersection([
134
110
  t.type({
135
- kind: FileLinkKind,
111
+ kind: t.string,
136
112
  id: t.string,
137
113
  url: t.string,
138
114
  name: t.string,