@prismicio/client 7.7.3 → 7.7.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.
Files changed (304) hide show
  1. package/README.md +3 -3
  2. package/dist/buildQueryURL.cjs.map +1 -1
  3. package/dist/buildQueryURL.d.ts +1 -1
  4. package/dist/buildQueryURL.js.map +1 -1
  5. package/dist/cookie.cjs.map +1 -1
  6. package/dist/cookie.js.map +1 -1
  7. package/dist/createClient.cjs +31 -31
  8. package/dist/createClient.cjs.map +1 -1
  9. package/dist/createClient.d.ts +35 -35
  10. package/dist/createClient.js +31 -31
  11. package/dist/createClient.js.map +1 -1
  12. package/dist/errors/ForbiddenError.cjs.map +1 -1
  13. package/dist/errors/ForbiddenError.js.map +1 -1
  14. package/dist/errors/NotFoundError.cjs.map +1 -1
  15. package/dist/errors/NotFoundError.js.map +1 -1
  16. package/dist/errors/ParsingError.cjs.map +1 -1
  17. package/dist/errors/ParsingError.js.map +1 -1
  18. package/dist/errors/PreviewTokenExpired.cjs.map +1 -1
  19. package/dist/errors/PreviewTokenExpired.js.map +1 -1
  20. package/dist/errors/PrismicError.cjs.map +1 -1
  21. package/dist/errors/PrismicError.js.map +1 -1
  22. package/dist/errors/PrismicRichTextSerializerError.cjs.map +1 -1
  23. package/dist/errors/PrismicRichTextSerializerError.js.map +1 -1
  24. package/dist/errors/RefExpiredError.cjs.map +1 -1
  25. package/dist/errors/RefExpiredError.js.map +1 -1
  26. package/dist/errors/RefNotFoundError.cjs.map +1 -1
  27. package/dist/errors/RefNotFoundError.js.map +1 -1
  28. package/dist/errors/RepositoryNotFoundError.cjs.map +1 -1
  29. package/dist/errors/RepositoryNotFoundError.js.map +1 -1
  30. package/dist/filter.cjs.map +1 -1
  31. package/dist/filter.js.map +1 -1
  32. package/dist/getGraphQLEndpoint.cjs.map +1 -1
  33. package/dist/getGraphQLEndpoint.js.map +1 -1
  34. package/dist/getRepositoryEndpoint.cjs.map +1 -1
  35. package/dist/getRepositoryEndpoint.js.map +1 -1
  36. package/dist/getRepositoryName.cjs.map +1 -1
  37. package/dist/getRepositoryName.js.map +1 -1
  38. package/dist/getToolbarSrc.cjs.map +1 -1
  39. package/dist/getToolbarSrc.js.map +1 -1
  40. package/dist/helpers/asDate.cjs.map +1 -1
  41. package/dist/helpers/asDate.js.map +1 -1
  42. package/dist/helpers/asHTML.cjs.map +1 -1
  43. package/dist/helpers/asHTML.d.ts +2 -2
  44. package/dist/helpers/asHTML.js.map +1 -1
  45. package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
  46. package/dist/helpers/asImagePixelDensitySrcSet.d.ts +2 -2
  47. package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
  48. package/dist/helpers/asImageSrc.cjs.map +1 -1
  49. package/dist/helpers/asImageSrc.d.ts +2 -2
  50. package/dist/helpers/asImageSrc.js.map +1 -1
  51. package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
  52. package/dist/helpers/asImageWidthSrcSet.d.ts +2 -2
  53. package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
  54. package/dist/helpers/asLink.cjs.map +1 -1
  55. package/dist/helpers/asLink.d.ts +2 -4
  56. package/dist/helpers/asLink.js.map +1 -1
  57. package/dist/helpers/asLinkAttrs.cjs.map +1 -1
  58. package/dist/helpers/asLinkAttrs.d.ts +2 -2
  59. package/dist/helpers/asLinkAttrs.js.map +1 -1
  60. package/dist/helpers/asText.cjs.map +1 -1
  61. package/dist/helpers/asText.d.ts +1 -1
  62. package/dist/helpers/asText.js.map +1 -1
  63. package/dist/helpers/documentToLinkField.cjs.map +1 -1
  64. package/dist/helpers/documentToLinkField.js.map +1 -1
  65. package/dist/helpers/isFilled.cjs.map +1 -1
  66. package/dist/helpers/isFilled.js.map +1 -1
  67. package/dist/helpers/mapSliceZone.cjs.map +1 -1
  68. package/dist/helpers/mapSliceZone.d.ts +1 -1
  69. package/dist/helpers/mapSliceZone.js.map +1 -1
  70. package/dist/helpers/unstable_htmlAsRichText.cjs.map +1 -1
  71. package/dist/helpers/unstable_htmlAsRichText.d.ts +4 -4
  72. package/dist/helpers/unstable_htmlAsRichText.js.map +1 -1
  73. package/dist/helpers/unstable_markdownAsRichText.cjs.map +1 -1
  74. package/dist/helpers/unstable_markdownAsRichText.d.ts +2 -2
  75. package/dist/helpers/unstable_markdownAsRichText.js.map +1 -1
  76. package/dist/index.cjs.map +1 -1
  77. package/dist/index.js.map +1 -1
  78. package/dist/isRepositoryEndpoint.cjs.map +1 -1
  79. package/dist/isRepositoryEndpoint.js.map +1 -1
  80. package/dist/isRepositoryName.cjs.map +1 -1
  81. package/dist/isRepositoryName.js.map +1 -1
  82. package/dist/lib/RichTextFieldBuilder.cjs.map +1 -1
  83. package/dist/lib/RichTextFieldBuilder.d.ts +1 -1
  84. package/dist/lib/RichTextFieldBuilder.js.map +1 -1
  85. package/dist/lib/appendFilters.cjs.map +1 -1
  86. package/dist/lib/appendFilters.js.map +1 -1
  87. package/dist/lib/castArray.cjs.map +1 -1
  88. package/dist/lib/castArray.js.map +1 -1
  89. package/dist/lib/castThunk.cjs.map +1 -1
  90. package/dist/lib/castThunk.js.map +1 -1
  91. package/dist/lib/devMsg.cjs.map +1 -1
  92. package/dist/lib/devMsg.d.ts +1 -1
  93. package/dist/lib/devMsg.js.map +1 -1
  94. package/dist/lib/escapeHTML.cjs.map +1 -1
  95. package/dist/lib/escapeHTML.js.map +1 -1
  96. package/dist/lib/everyTagFilter.cjs.map +1 -1
  97. package/dist/lib/everyTagFilter.js.map +1 -1
  98. package/dist/lib/filterRichTextField.cjs.map +1 -1
  99. package/dist/lib/filterRichTextField.d.ts +3 -3
  100. package/dist/lib/filterRichTextField.js.map +1 -1
  101. package/dist/lib/findMasterRef.cjs.map +1 -1
  102. package/dist/lib/findMasterRef.d.ts +1 -1
  103. package/dist/lib/findMasterRef.js.map +1 -1
  104. package/dist/lib/findRef.cjs.map +1 -1
  105. package/dist/lib/findRef.d.ts +1 -1
  106. package/dist/lib/findRef.js.map +1 -1
  107. package/dist/lib/findRefByID.cjs.map +1 -1
  108. package/dist/lib/findRefByID.d.ts +1 -1
  109. package/dist/lib/findRefByID.js.map +1 -1
  110. package/dist/lib/findRefByLabel.cjs.map +1 -1
  111. package/dist/lib/findRefByLabel.d.ts +1 -1
  112. package/dist/lib/findRefByLabel.js.map +1 -1
  113. package/dist/lib/getPreviewCookie.cjs.map +1 -1
  114. package/dist/lib/getPreviewCookie.js.map +1 -1
  115. package/dist/lib/hastSerializerHelpers.cjs.map +1 -1
  116. package/dist/lib/hastSerializerHelpers.d.ts +3 -3
  117. package/dist/lib/hastSerializerHelpers.js.map +1 -1
  118. package/dist/lib/hastToRichText.cjs +1 -2
  119. package/dist/lib/hastToRichText.cjs.map +1 -1
  120. package/dist/lib/hastToRichText.d.ts +4 -4
  121. package/dist/lib/hastToRichText.js +1 -2
  122. package/dist/lib/hastToRichText.js.map +1 -1
  123. package/dist/lib/isInternalURL.cjs.map +1 -1
  124. package/dist/lib/isInternalURL.js.map +1 -1
  125. package/dist/lib/minifyGraphQLQuery.cjs.map +1 -1
  126. package/dist/lib/minifyGraphQLQuery.js.map +1 -1
  127. package/dist/lib/rehypeRichText.cjs.map +1 -1
  128. package/dist/lib/rehypeRichText.d.ts +5 -5
  129. package/dist/lib/rehypeRichText.js.map +1 -1
  130. package/dist/lib/serializerHelpers.cjs.map +1 -1
  131. package/dist/lib/serializerHelpers.d.ts +2 -2
  132. package/dist/lib/serializerHelpers.js.map +1 -1
  133. package/dist/lib/someTagsFilter.cjs.map +1 -1
  134. package/dist/lib/someTagsFilter.js.map +1 -1
  135. package/dist/lib/typeFilter.cjs.map +1 -1
  136. package/dist/lib/typeFilter.js.map +1 -1
  137. package/dist/package.json.cjs +1 -1
  138. package/dist/package.json.js +1 -1
  139. package/dist/richtext/asText.cjs.map +1 -1
  140. package/dist/richtext/asText.d.ts +1 -1
  141. package/dist/richtext/asText.js.map +1 -1
  142. package/dist/richtext/asTree.cjs.map +1 -1
  143. package/dist/richtext/asTree.d.ts +2 -2
  144. package/dist/richtext/asTree.js.map +1 -1
  145. package/dist/richtext/composeSerializers.cjs.map +1 -1
  146. package/dist/richtext/composeSerializers.d.ts +1 -1
  147. package/dist/richtext/composeSerializers.js.map +1 -1
  148. package/dist/richtext/serialize.cjs.map +1 -1
  149. package/dist/richtext/serialize.d.ts +1 -1
  150. package/dist/richtext/serialize.js.map +1 -1
  151. package/dist/richtext/types.cjs.map +1 -1
  152. package/dist/richtext/types.d.ts +1 -1
  153. package/dist/richtext/types.js.map +1 -1
  154. package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
  155. package/dist/richtext/wrapMapSerializer.d.ts +1 -1
  156. package/dist/richtext/wrapMapSerializer.js.map +1 -1
  157. package/dist/types/api/query.d.ts +1 -1
  158. package/dist/types/api/release.d.ts +1 -1
  159. package/dist/types/api/repository.d.ts +1 -1
  160. package/dist/types/model/customType.d.ts +1 -1
  161. package/dist/types/model/link.cjs.map +1 -1
  162. package/dist/types/model/link.js.map +1 -1
  163. package/dist/types/model/slice.cjs.map +1 -1
  164. package/dist/types/model/slice.js.map +1 -1
  165. package/dist/types/model/sliceZone.cjs.map +1 -1
  166. package/dist/types/model/sliceZone.js.map +1 -1
  167. package/dist/types/model/title.d.ts +1 -1
  168. package/dist/types/model/types.cjs.map +1 -1
  169. package/dist/types/model/types.js.map +1 -1
  170. package/dist/types/value/document.d.ts +4 -4
  171. package/dist/types/value/embed.cjs.map +1 -1
  172. package/dist/types/value/embed.js.map +1 -1
  173. package/dist/types/value/link.cjs.map +1 -1
  174. package/dist/types/value/link.js.map +1 -1
  175. package/dist/types/value/richText.cjs.map +1 -1
  176. package/dist/types/value/richText.js.map +1 -1
  177. package/dist/types/webhook/apiUpdate.d.ts +1 -1
  178. package/dist/types/webhook/testTrigger.d.ts +1 -1
  179. package/dist/types/webhook/types.cjs.map +1 -1
  180. package/dist/types/webhook/types.d.ts +2 -2
  181. package/dist/types/webhook/types.js.map +1 -1
  182. package/package.json +1 -1
  183. package/src/buildQueryURL.ts +51 -51
  184. package/src/cookie.ts +1 -1
  185. package/src/createClient.ts +293 -293
  186. package/src/errors/ForbiddenError.ts +6 -6
  187. package/src/errors/NotFoundError.ts +1 -1
  188. package/src/errors/ParsingError.ts +8 -8
  189. package/src/errors/PreviewTokenExpired.ts +4 -4
  190. package/src/errors/PrismicError.ts +5 -5
  191. package/src/errors/PrismicRichTextSerializerError.ts +1 -1
  192. package/src/errors/RefExpiredError.ts +4 -4
  193. package/src/errors/RefNotFoundError.ts +4 -4
  194. package/src/errors/RepositoryNotFoundError.ts +1 -1
  195. package/src/filter.ts +22 -22
  196. package/src/getGraphQLEndpoint.ts +5 -5
  197. package/src/getRepositoryEndpoint.ts +5 -5
  198. package/src/getRepositoryName.ts +4 -4
  199. package/src/getToolbarSrc.ts +5 -5
  200. package/src/helpers/asDate.ts +7 -7
  201. package/src/helpers/asHTML.ts +54 -56
  202. package/src/helpers/asImagePixelDensitySrcSet.ts +14 -17
  203. package/src/helpers/asImageSrc.ts +9 -8
  204. package/src/helpers/asImageWidthSrcSet.ts +19 -22
  205. package/src/helpers/asLink.ts +26 -27
  206. package/src/helpers/asLinkAttrs.ts +30 -29
  207. package/src/helpers/asText.ts +15 -15
  208. package/src/helpers/documentToLinkField.ts +6 -6
  209. package/src/helpers/isFilled.ts +53 -53
  210. package/src/helpers/mapSliceZone.ts +34 -34
  211. package/src/helpers/unstable_htmlAsRichText.ts +23 -22
  212. package/src/helpers/unstable_markdownAsRichText.ts +14 -13
  213. package/src/index.ts +119 -119
  214. package/src/isRepositoryEndpoint.ts +4 -4
  215. package/src/isRepositoryName.ts +2 -2
  216. package/src/lib/RichTextFieldBuilder.ts +36 -41
  217. package/src/lib/appendFilters.ts +4 -4
  218. package/src/lib/castArray.ts +2 -2
  219. package/src/lib/castThunk.ts +2 -2
  220. package/src/lib/devMsg.ts +4 -4
  221. package/src/lib/escapeHTML.ts +24 -24
  222. package/src/lib/everyTagFilter.ts +4 -4
  223. package/src/lib/filterRichTextField.ts +31 -31
  224. package/src/lib/findMasterRef.ts +4 -4
  225. package/src/lib/findRef.ts +6 -6
  226. package/src/lib/findRefByID.ts +4 -4
  227. package/src/lib/findRefByLabel.ts +4 -4
  228. package/src/lib/getPreviewCookie.ts +11 -11
  229. package/src/lib/hastSerializerHelpers.ts +41 -37
  230. package/src/lib/hastToRichText.ts +74 -73
  231. package/src/lib/isInternalURL.ts +4 -4
  232. package/src/lib/minifyGraphQLQuery.ts +2 -2
  233. package/src/lib/rehypeRichText.ts +42 -41
  234. package/src/lib/serializerHelpers.ts +53 -54
  235. package/src/lib/someTagsFilter.ts +4 -4
  236. package/src/lib/typeFilter.ts +3 -3
  237. package/src/richtext/asText.ts +5 -5
  238. package/src/richtext/asTree.ts +53 -53
  239. package/src/richtext/composeSerializers.ts +6 -6
  240. package/src/richtext/index.ts +7 -7
  241. package/src/richtext/serialize.ts +11 -11
  242. package/src/richtext/types.ts +38 -38
  243. package/src/richtext/wrapMapSerializer.ts +6 -9
  244. package/src/types/api/query.ts +9 -9
  245. package/src/types/api/ref.ts +5 -5
  246. package/src/types/api/release.ts +2 -2
  247. package/src/types/api/repository.ts +24 -24
  248. package/src/types/api/tags.ts +1 -1
  249. package/src/types/model/boolean.ts +7 -7
  250. package/src/types/model/color.ts +5 -5
  251. package/src/types/model/contentRelationship.ts +9 -9
  252. package/src/types/model/customType.ts +9 -9
  253. package/src/types/model/date.ts +6 -6
  254. package/src/types/model/embed.ts +5 -5
  255. package/src/types/model/geoPoint.ts +4 -4
  256. package/src/types/model/group.ts +6 -6
  257. package/src/types/model/image.ts +9 -9
  258. package/src/types/model/integration.ts +6 -6
  259. package/src/types/model/keyText.ts +5 -5
  260. package/src/types/model/link.ts +8 -8
  261. package/src/types/model/linkToMedia.ts +7 -7
  262. package/src/types/model/number.ts +7 -7
  263. package/src/types/model/range.ts +8 -8
  264. package/src/types/model/richText.ts +16 -16
  265. package/src/types/model/select.ts +7 -7
  266. package/src/types/model/separator.ts +4 -4
  267. package/src/types/model/sharedSlice.ts +7 -7
  268. package/src/types/model/sharedSliceVariation.ts +9 -9
  269. package/src/types/model/slice.ts +12 -12
  270. package/src/types/model/sliceZone.ts +11 -11
  271. package/src/types/model/timestamp.ts +6 -6
  272. package/src/types/model/title.ts +2 -2
  273. package/src/types/model/types.ts +26 -26
  274. package/src/types/model/uid.ts +5 -5
  275. package/src/types/value/boolean.ts +1 -1
  276. package/src/types/value/color.ts +2 -2
  277. package/src/types/value/contentRelationship.ts +15 -15
  278. package/src/types/value/date.ts +2 -2
  279. package/src/types/value/document.ts +23 -23
  280. package/src/types/value/embed.ts +33 -33
  281. package/src/types/value/geoPoint.ts +4 -4
  282. package/src/types/value/group.ts +3 -3
  283. package/src/types/value/image.ts +21 -21
  284. package/src/types/value/integration.ts +2 -2
  285. package/src/types/value/keyText.ts +2 -2
  286. package/src/types/value/link.ts +12 -12
  287. package/src/types/value/linkToMedia.ts +11 -11
  288. package/src/types/value/number.ts +2 -2
  289. package/src/types/value/richText.ts +58 -58
  290. package/src/types/value/select.ts +2 -2
  291. package/src/types/value/sharedSlice.ts +5 -5
  292. package/src/types/value/sharedSliceVariation.ts +5 -5
  293. package/src/types/value/slice.ts +6 -6
  294. package/src/types/value/sliceZone.ts +4 -4
  295. package/src/types/value/timestamp.ts +3 -3
  296. package/src/types/value/title.ts +4 -4
  297. package/src/types/value/types.ts +22 -22
  298. package/src/types/webhook/apiUpdate.ts +18 -18
  299. package/src/types/webhook/testTrigger.ts +2 -2
  300. package/src/types/webhook/types.ts +8 -8
  301. package/dist/_node_modules/hast-util-whitespace/lib/index.cjs +0 -11
  302. package/dist/_node_modules/hast-util-whitespace/lib/index.cjs.map +0 -1
  303. package/dist/_node_modules/hast-util-whitespace/lib/index.js +0 -11
  304. package/dist/_node_modules/hast-util-whitespace/lib/index.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * Dimension constraints for an image custom type field.
@@ -6,8 +6,8 @@ import type { CustomTypeModelFieldType } from "./types";
6
6
  * More details: {@link https://prismic.io/docs/image}
7
7
  */
8
8
  export interface CustomTypeModelImageConstraint {
9
- width?: number | null;
10
- height?: number | null;
9
+ width?: number | null
10
+ height?: number | null
11
11
  }
12
12
 
13
13
  /**
@@ -17,7 +17,7 @@ export interface CustomTypeModelImageConstraint {
17
17
  */
18
18
  export interface CustomTypeModelImageThumbnail<Name extends string = string>
19
19
  extends CustomTypeModelImageConstraint {
20
- name: Name;
20
+ name: Name
21
21
  }
22
22
 
23
23
  /**
@@ -28,10 +28,10 @@ export interface CustomTypeModelImageThumbnail<Name extends string = string>
28
28
  export interface CustomTypeModelImageField<
29
29
  ThumbnailNames extends string = string,
30
30
  > {
31
- type: typeof CustomTypeModelFieldType.Image;
31
+ type: typeof CustomTypeModelFieldType.Image
32
32
  config?: {
33
- label?: string | null;
34
- constraint?: CustomTypeModelImageConstraint;
35
- thumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[];
36
- };
33
+ label?: string | null
34
+ constraint?: CustomTypeModelImageConstraint
35
+ thumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[]
36
+ }
37
37
  }
@@ -1,4 +1,4 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * An integration custom type field.
@@ -6,10 +6,10 @@ import type { CustomTypeModelFieldType } from "./types";
6
6
  * More details: {@link https://prismic.io/docs/integration-fields}
7
7
  */
8
8
  export interface CustomTypeModelIntegrationField {
9
- type: typeof CustomTypeModelFieldType.Integration;
9
+ type: typeof CustomTypeModelFieldType.Integration
10
10
  config?: {
11
- label?: string | null;
12
- placeholder?: string;
13
- catalog?: string;
14
- };
11
+ label?: string | null
12
+ placeholder?: string
13
+ catalog?: string
14
+ }
15
15
  }
@@ -1,4 +1,4 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * A key text custom type field.
@@ -6,9 +6,9 @@ import type { CustomTypeModelFieldType } from "./types";
6
6
  * More details: {@link https://prismic.io/docs/key-text}
7
7
  */
8
8
  export interface CustomTypeModelKeyTextField {
9
- type: typeof CustomTypeModelFieldType.Text;
9
+ type: typeof CustomTypeModelFieldType.Text
10
10
  config?: {
11
- label?: string | null;
12
- placeholder?: string;
13
- };
11
+ label?: string | null
12
+ placeholder?: string
13
+ }
14
14
  }
@@ -1,4 +1,4 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * A link custom type field.
@@ -6,15 +6,15 @@ import type { CustomTypeModelFieldType } from "./types";
6
6
  * More details: {@link https://prismic.io/docs/link}
7
7
  */
8
8
  export interface CustomTypeModelLinkField {
9
- type: typeof CustomTypeModelFieldType.Link;
9
+ type: typeof CustomTypeModelFieldType.Link
10
10
  config?: {
11
- label?: string | null;
12
- placeholder?: string;
11
+ label?: string | null
12
+ placeholder?: string
13
13
  select?:
14
14
  | null
15
- | (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType];
16
- allowTargetBlank?: boolean;
17
- };
15
+ | (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType]
16
+ allowTargetBlank?: boolean
17
+ }
18
18
  }
19
19
 
20
20
  /**
@@ -26,4 +26,4 @@ export const CustomTypeModelLinkSelectType = {
26
26
  Document: "document",
27
27
  Media: "media",
28
28
  Web: "web",
29
- } as const;
29
+ } as const
@@ -1,6 +1,6 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
- import type { CustomTypeModelLinkSelectType } from "./link";
3
+ import type { CustomTypeModelLinkSelectType } from "./link"
4
4
 
5
5
  /**
6
6
  * A link to media custom type field.
@@ -8,10 +8,10 @@ import type { CustomTypeModelLinkSelectType } from "./link";
8
8
  * More details: {@link https://prismic.io/docs/media}
9
9
  */
10
10
  export interface CustomTypeModelLinkToMediaField {
11
- type: typeof CustomTypeModelFieldType.Link;
11
+ type: typeof CustomTypeModelFieldType.Link
12
12
  config?: {
13
- label?: string | null;
14
- placeholder?: string;
15
- select: typeof CustomTypeModelLinkSelectType.Media;
16
- };
13
+ label?: string | null
14
+ placeholder?: string
15
+ select: typeof CustomTypeModelLinkSelectType.Media
16
+ }
17
17
  }
@@ -1,4 +1,4 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * A number custom type field.
@@ -6,11 +6,11 @@ import type { CustomTypeModelFieldType } from "./types";
6
6
  * More details: {@link https://prismic.io/docs/number}
7
7
  */
8
8
  export interface CustomTypeModelNumberField {
9
- type: typeof CustomTypeModelFieldType.Number;
9
+ type: typeof CustomTypeModelFieldType.Number
10
10
  config?: {
11
- label?: string | null;
12
- placeholder?: string;
13
- min?: number;
14
- max?: number;
15
- };
11
+ label?: string | null
12
+ placeholder?: string
13
+ min?: number
14
+ max?: number
15
+ }
16
16
  }
@@ -1,15 +1,15 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * @deprecated - Legacy field. Use `CustomTypeModelNumberField` instead.
5
5
  */
6
6
  export interface CustomTypeModelRangeField {
7
- type: typeof CustomTypeModelFieldType.Range;
7
+ type: typeof CustomTypeModelFieldType.Range
8
8
  config?: {
9
- label?: string | null;
10
- placeholder?: string;
11
- min?: number;
12
- max?: number;
13
- step?: number;
14
- };
9
+ label?: string | null
10
+ placeholder?: string
11
+ min?: number
12
+ max?: number
13
+ step?: number
14
+ }
15
15
  }
@@ -1,4 +1,4 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * A rich text custom type field.
@@ -7,7 +7,7 @@ import type { CustomTypeModelFieldType } from "./types";
7
7
  */
8
8
  export type CustomTypeModelRichTextField =
9
9
  | CustomTypeModelRichTextMultiField
10
- | CustomTypeModelRichTextSingleField;
10
+ | CustomTypeModelRichTextSingleField
11
11
 
12
12
  /**
13
13
  * A rich text custom type field which supports multiple blocks of content.
@@ -15,15 +15,15 @@ export type CustomTypeModelRichTextField =
15
15
  * More details: {@link https://prismic.io/docs/rich-text-title}
16
16
  */
17
17
  export interface CustomTypeModelRichTextMultiField {
18
- type: typeof CustomTypeModelFieldType.StructuredText;
18
+ type: typeof CustomTypeModelFieldType.StructuredText
19
19
  config?: {
20
- label?: string | null;
21
- placeholder?: string;
22
- allowTargetBlank?: boolean;
23
- multi?: string;
20
+ label?: string | null
21
+ placeholder?: string
22
+ allowTargetBlank?: boolean
23
+ multi?: string
24
24
  // @prismicio/types-internal types `labels` as readonly.
25
- labels?: readonly string[];
26
- };
25
+ labels?: readonly string[]
26
+ }
27
27
  }
28
28
 
29
29
  /**
@@ -32,13 +32,13 @@ export interface CustomTypeModelRichTextMultiField {
32
32
  * More details: {@link https://prismic.io/docs/rich-text-title}
33
33
  */
34
34
  export interface CustomTypeModelRichTextSingleField {
35
- type: typeof CustomTypeModelFieldType.StructuredText;
35
+ type: typeof CustomTypeModelFieldType.StructuredText
36
36
  config?: {
37
- label?: string | null;
38
- placeholder?: string;
39
- allowTargetBlank?: boolean;
40
- single?: string;
37
+ label?: string | null
38
+ placeholder?: string
39
+ allowTargetBlank?: boolean
40
+ single?: string
41
41
  // @prismicio/types-internal types `labels` as readonly.
42
- labels?: readonly string[];
43
- };
42
+ labels?: readonly string[]
43
+ }
44
44
  }
@@ -1,4 +1,4 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * A select custom type field.
@@ -12,11 +12,11 @@ export interface CustomTypeModelSelectField<
12
12
  Option extends string = string,
13
13
  DefaultValue extends Option = Option,
14
14
  > {
15
- type: typeof CustomTypeModelFieldType.Select;
15
+ type: typeof CustomTypeModelFieldType.Select
16
16
  config?: {
17
- label?: string | null;
18
- placeholder?: string;
19
- options?: readonly Option[];
20
- default_value?: DefaultValue;
21
- };
17
+ label?: string | null
18
+ placeholder?: string
19
+ options?: readonly Option[]
20
+ default_value?: DefaultValue
21
+ }
22
22
  }
@@ -1,11 +1,11 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * @deprecated - Legacy field. Do not use.
5
5
  */
6
6
  export interface CustomTypeModelSeparatorField {
7
- type: typeof CustomTypeModelFieldType.Separator;
7
+ type: typeof CustomTypeModelFieldType.Separator
8
8
  config?: {
9
- label?: string | null;
10
- };
9
+ label?: string | null
10
+ }
11
11
  }
@@ -1,5 +1,5 @@
1
- import type { SharedSliceModelVariation } from "./sharedSliceVariation";
2
- import type { CustomTypeModelSliceType } from "./sliceZone";
1
+ import type { SharedSliceModelVariation } from "./sharedSliceVariation"
2
+ import type { CustomTypeModelSliceType } from "./sliceZone"
3
3
 
4
4
  /**
5
5
  * A Prismic shared Slice model.
@@ -12,9 +12,9 @@ export interface SharedSliceModel<
12
12
  ID extends string = string,
13
13
  Variation extends SharedSliceModelVariation = SharedSliceModelVariation,
14
14
  > {
15
- type: typeof CustomTypeModelSliceType.SharedSlice;
16
- id: ID;
17
- name: string;
18
- description?: string;
19
- variations: readonly Variation[];
15
+ type: typeof CustomTypeModelSliceType.SharedSlice
16
+ id: ID
17
+ name: string
18
+ description?: string
19
+ variations: readonly Variation[]
20
20
  }
@@ -1,7 +1,7 @@
1
1
  import type {
2
2
  CustomTypeModelFieldForNestedGroup,
3
3
  CustomTypeModelFieldForSlicePrimary,
4
- } from "./types";
4
+ } from "./types"
5
5
 
6
6
  /**
7
7
  * A shared Slice variation.
@@ -22,12 +22,12 @@ export interface SharedSliceModelVariation<
22
22
  CustomTypeModelFieldForNestedGroup
23
23
  > = Record<string, CustomTypeModelFieldForNestedGroup>,
24
24
  > {
25
- id: ID;
26
- name: string;
27
- docURL: string;
28
- version: string;
29
- description: string;
30
- primary?: PrimaryFields;
31
- items?: ItemFields;
32
- imageUrl: string;
25
+ id: ID
26
+ name: string
27
+ docURL: string
28
+ version: string
29
+ description: string
30
+ primary?: PrimaryFields
31
+ items?: ItemFields
32
+ imageUrl: string
33
33
  }
@@ -1,7 +1,7 @@
1
- import type { CustomTypeModelFieldForNestedGroup } from "./types";
1
+ import type { CustomTypeModelFieldForNestedGroup } from "./types"
2
2
 
3
- import type { CustomTypeModelNestedGroupField } from "./group";
4
- import type { CustomTypeModelSliceType } from "./sliceZone";
3
+ import type { CustomTypeModelNestedGroupField } from "./group"
4
+ import type { CustomTypeModelSliceType } from "./sliceZone"
5
5
 
6
6
  /**
7
7
  * A Slice for a custom type.
@@ -21,15 +21,15 @@ export interface CustomTypeModelSlice<
21
21
  CustomTypeModelFieldForNestedGroup
22
22
  > = Record<string, CustomTypeModelFieldForNestedGroup>,
23
23
  > {
24
- type: typeof CustomTypeModelSliceType.Slice;
25
- fieldset?: string | null;
26
- description?: string;
27
- icon?: string;
24
+ type: typeof CustomTypeModelSliceType.Slice
25
+ fieldset?: string | null
26
+ description?: string
27
+ icon?: string
28
28
  display?:
29
29
  | (typeof CustomTypeModelSliceDisplay)[keyof typeof CustomTypeModelSliceDisplay]
30
- | string;
31
- "non-repeat"?: NonRepeatFields;
32
- repeat?: RepeatFields;
30
+ | string
31
+ "non-repeat"?: NonRepeatFields
32
+ repeat?: RepeatFields
33
33
  }
34
34
 
35
35
  /**
@@ -40,11 +40,11 @@ export interface CustomTypeModelSlice<
40
40
  export const CustomTypeModelSliceDisplay = {
41
41
  List: "list",
42
42
  Grid: "grid",
43
- } as const;
43
+ } as const
44
44
 
45
45
  /**
46
46
  * @deprecated - Legacy slice type. Do not use.
47
47
  */
48
48
  export type CustomTypeModelLegacySlice =
49
49
  | CustomTypeModelNestedGroupField
50
- | CustomTypeModelFieldForNestedGroup;
50
+ | CustomTypeModelFieldForNestedGroup
@@ -1,6 +1,6 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
- import type { CustomTypeModelLegacySlice, CustomTypeModelSlice } from "./slice";
3
+ import type { CustomTypeModelLegacySlice, CustomTypeModelSlice } from "./slice"
4
4
 
5
5
  /**
6
6
  * A Slice Zone custom type field.
@@ -22,12 +22,12 @@ export interface CustomTypeModelSliceZoneField<
22
22
  > {
23
23
  type:
24
24
  | typeof CustomTypeModelFieldType.Slices
25
- | typeof CustomTypeModelFieldType.LegacySlices;
26
- fieldset?: string | null;
25
+ | typeof CustomTypeModelFieldType.LegacySlices
26
+ fieldset?: string | null
27
27
  config?: {
28
- labels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null;
29
- choices?: Slices;
30
- };
28
+ labels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null
29
+ choices?: Slices
30
+ }
31
31
  }
32
32
 
33
33
  /**
@@ -36,8 +36,8 @@ export interface CustomTypeModelSliceZoneField<
36
36
  * More details: {@link https://prismic.io/docs/slice}
37
37
  */
38
38
  export interface CustomTypeModelSliceLabel {
39
- name: string;
40
- display?: string;
39
+ name: string
40
+ display?: string
41
41
  }
42
42
 
43
43
  /**
@@ -48,7 +48,7 @@ export interface CustomTypeModelSliceLabel {
48
48
  export const CustomTypeModelSliceType = {
49
49
  Slice: "Slice",
50
50
  SharedSlice: "SharedSlice",
51
- } as const;
51
+ } as const
52
52
 
53
53
  /**
54
54
  * A shared Slice for a custom type.
@@ -56,5 +56,5 @@ export const CustomTypeModelSliceType = {
56
56
  * More details: {@link https://prismic.io/docs/slice}
57
57
  */
58
58
  export interface CustomTypeModelSharedSlice {
59
- type: typeof CustomTypeModelSliceType.SharedSlice;
59
+ type: typeof CustomTypeModelSliceType.SharedSlice
60
60
  }
@@ -1,4 +1,4 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * A timestamp custom type field.
@@ -6,10 +6,10 @@ import type { CustomTypeModelFieldType } from "./types";
6
6
  * More details: {@link https://prismic.io/docs/timestamp}
7
7
  */
8
8
  export interface CustomTypeModelTimestampField {
9
- type: typeof CustomTypeModelFieldType.Timestamp;
9
+ type: typeof CustomTypeModelFieldType.Timestamp
10
10
  config?: {
11
- label?: string | null;
12
- placeholder?: string;
13
- default?: string;
14
- };
11
+ label?: string | null
12
+ placeholder?: string
13
+ default?: string
14
+ }
15
15
  }
@@ -1,8 +1,8 @@
1
- import { CustomTypeModelRichTextSingleField } from "./richText";
1
+ import type { CustomTypeModelRichTextSingleField } from "./richText"
2
2
 
3
3
  /**
4
4
  * A title custom type field.
5
5
  *
6
6
  * More details: {@link https://prismic.io/docs/rich-text-title}
7
7
  */
8
- export type CustomTypeModelTitleField = CustomTypeModelRichTextSingleField;
8
+ export type CustomTypeModelTitleField = CustomTypeModelRichTextSingleField
@@ -1,27 +1,27 @@
1
- import type { CustomTypeModelBooleanField } from "./boolean";
2
- import type { CustomTypeModelColorField } from "./color";
3
- import type { CustomTypeModelContentRelationshipField } from "./contentRelationship";
4
- import type { CustomTypeModelDateField } from "./date";
5
- import type { CustomTypeModelEmbedField } from "./embed";
6
- import type { CustomTypeModelGeoPointField } from "./geoPoint";
1
+ import type { CustomTypeModelBooleanField } from "./boolean"
2
+ import type { CustomTypeModelColorField } from "./color"
3
+ import type { CustomTypeModelContentRelationshipField } from "./contentRelationship"
4
+ import type { CustomTypeModelDateField } from "./date"
5
+ import type { CustomTypeModelEmbedField } from "./embed"
6
+ import type { CustomTypeModelGeoPointField } from "./geoPoint"
7
7
  import type {
8
8
  CustomTypeModelGroupField,
9
9
  CustomTypeModelNestedGroupField,
10
- } from "./group";
11
- import type { CustomTypeModelImageField } from "./image";
12
- import type { CustomTypeModelIntegrationField } from "./integration";
13
- import type { CustomTypeModelKeyTextField } from "./keyText";
14
- import type { CustomTypeModelLinkField } from "./link";
15
- import type { CustomTypeModelLinkToMediaField } from "./linkToMedia";
16
- import type { CustomTypeModelNumberField } from "./number";
17
- import type { CustomTypeModelRangeField } from "./range";
18
- import type { CustomTypeModelRichTextField } from "./richText";
19
- import type { CustomTypeModelSelectField } from "./select";
20
- import type { CustomTypeModelSeparatorField } from "./separator";
21
- import type { CustomTypeModelSliceZoneField } from "./sliceZone";
22
- import type { CustomTypeModelTimestampField } from "./timestamp";
23
- import type { CustomTypeModelTitleField } from "./title";
24
- import type { CustomTypeModelUIDField } from "./uid";
10
+ } from "./group"
11
+ import type { CustomTypeModelImageField } from "./image"
12
+ import type { CustomTypeModelIntegrationField } from "./integration"
13
+ import type { CustomTypeModelKeyTextField } from "./keyText"
14
+ import type { CustomTypeModelLinkField } from "./link"
15
+ import type { CustomTypeModelLinkToMediaField } from "./linkToMedia"
16
+ import type { CustomTypeModelNumberField } from "./number"
17
+ import type { CustomTypeModelRangeField } from "./range"
18
+ import type { CustomTypeModelRichTextField } from "./richText"
19
+ import type { CustomTypeModelSelectField } from "./select"
20
+ import type { CustomTypeModelSeparatorField } from "./separator"
21
+ import type { CustomTypeModelSliceZoneField } from "./sliceZone"
22
+ import type { CustomTypeModelTimestampField } from "./timestamp"
23
+ import type { CustomTypeModelTitleField } from "./title"
24
+ import type { CustomTypeModelUIDField } from "./uid"
25
25
 
26
26
  /**
27
27
  * Type identifier for a custom type field.
@@ -59,7 +59,7 @@ export const CustomTypeModelFieldType = {
59
59
  * @deprecated - Legacy field type. Use `Slices` instead.
60
60
  */
61
61
  LegacySlices: "Choice",
62
- } as const;
62
+ } as const
63
63
 
64
64
  /**
65
65
  * A custom type field.
@@ -68,21 +68,21 @@ export type CustomTypeModelField =
68
68
  | CustomTypeModelUIDField
69
69
  | CustomTypeModelGroupField
70
70
  | CustomTypeModelSliceZoneField
71
- | CustomTypeModelFieldForNestedGroup;
71
+ | CustomTypeModelFieldForNestedGroup
72
72
 
73
73
  /**
74
74
  * Any custom type field that is valid for a slice's primary section.
75
75
  */
76
76
  export type CustomTypeModelFieldForSlicePrimary =
77
77
  | CustomTypeModelGroupField
78
- | CustomTypeModelFieldForNestedGroup;
78
+ | CustomTypeModelFieldForNestedGroup
79
79
 
80
80
  /**
81
81
  * Any custom type field that is valid for a group field.
82
82
  */
83
83
  export type CustomTypeModelFieldForGroup =
84
84
  | CustomTypeModelNestedGroupField
85
- | CustomTypeModelFieldForNestedGroup;
85
+ | CustomTypeModelFieldForNestedGroup
86
86
 
87
87
  /**
88
88
  * Any custom type field that is valid for a nested group field.
@@ -105,4 +105,4 @@ export type CustomTypeModelFieldForNestedGroup =
105
105
  | CustomTypeModelTitleField
106
106
  | CustomTypeModelKeyTextField
107
107
  | CustomTypeModelTimestampField
108
- | CustomTypeModelSeparatorField;
108
+ | CustomTypeModelSeparatorField
@@ -1,4 +1,4 @@
1
- import type { CustomTypeModelFieldType } from "./types";
1
+ import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
3
  /**
4
4
  * A UID custom type field.
@@ -6,9 +6,9 @@ import type { CustomTypeModelFieldType } from "./types";
6
6
  * More details: {@link https://prismic.io/docs/uid}
7
7
  */
8
8
  export interface CustomTypeModelUIDField {
9
- type: typeof CustomTypeModelFieldType.UID;
9
+ type: typeof CustomTypeModelFieldType.UID
10
10
  config?: {
11
- label?: string | null;
12
- placeholder?: string;
13
- };
11
+ label?: string | null
12
+ placeholder?: string
13
+ }
14
14
  }
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * @see More details: {@link https://prismic.io/docs/boolean}
5
5
  */
6
- export type BooleanField = boolean;
6
+ export type BooleanField = boolean
@@ -1,4 +1,4 @@
1
- import type { FieldState } from "./types";
1
+ import type { FieldState } from "./types"
2
2
 
3
3
  /**
4
4
  * A color field.
@@ -8,4 +8,4 @@ import type { FieldState } from "./types";
8
8
  * @see More details: {@link https://prismic.io/docs/color}
9
9
  */
10
10
  export type ColorField<State extends FieldState = FieldState> =
11
- State extends "empty" ? null : `#${string}`;
11
+ State extends "empty" ? null : `#${string}`
@@ -1,8 +1,8 @@
1
- import type { AnyRegularField, FieldState } from "./types";
1
+ import type { AnyRegularField, FieldState } from "./types"
2
2
 
3
- import type { GroupField } from "./group";
4
- import type { EmptyLinkField, LinkType } from "./link";
5
- import type { SliceZone } from "./sliceZone";
3
+ import type { GroupField } from "./group"
4
+ import type { EmptyLinkField, LinkType } from "./link"
5
+ import type { SliceZone } from "./sliceZone"
6
6
 
7
7
  /**
8
8
  * Field for related documents
@@ -22,7 +22,7 @@ export type ContentRelationshipField<
22
22
  State extends FieldState = FieldState,
23
23
  > = State extends "empty"
24
24
  ? EmptyLinkField<typeof LinkType.Document>
25
- : FilledContentRelationshipField<TypeEnum, LangEnum, DataInterface>;
25
+ : FilledContentRelationshipField<TypeEnum, LangEnum, DataInterface>
26
26
 
27
27
  /**
28
28
  * Links that refer to documents
@@ -34,14 +34,14 @@ export interface FilledContentRelationshipField<
34
34
  | Record<string, AnyRegularField | GroupField | SliceZone>
35
35
  | unknown = unknown,
36
36
  > {
37
- link_type: typeof LinkType.Document;
38
- id: string;
39
- uid?: string;
40
- type: TypeEnum;
41
- tags: string[];
42
- lang: LangEnum;
43
- url?: string;
44
- slug?: string;
45
- isBroken?: boolean;
46
- data?: DataInterface;
37
+ link_type: typeof LinkType.Document
38
+ id: string
39
+ uid?: string
40
+ type: TypeEnum
41
+ tags: string[]
42
+ lang: LangEnum
43
+ url?: string
44
+ slug?: string
45
+ isBroken?: boolean
46
+ data?: DataInterface
47
47
  }