@prismicio/client 7.0.0 → 7.0.1

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 (127) hide show
  1. package/dist/buildQueryURL.cjs.map +1 -1
  2. package/dist/buildQueryURL.d.ts +11 -10
  3. package/dist/buildQueryURL.js.map +1 -1
  4. package/dist/createClient.cjs +21 -0
  5. package/dist/createClient.cjs.map +1 -1
  6. package/dist/createClient.d.ts +32 -18
  7. package/dist/createClient.js +21 -0
  8. package/dist/createClient.js.map +1 -1
  9. package/dist/filter.cjs +38 -38
  10. package/dist/filter.cjs.map +1 -1
  11. package/dist/filter.d.ts +38 -38
  12. package/dist/filter.js +38 -38
  13. package/dist/filter.js.map +1 -1
  14. package/dist/getGraphQLEndpoint.cjs.map +1 -1
  15. package/dist/getGraphQLEndpoint.d.ts +1 -0
  16. package/dist/getGraphQLEndpoint.js.map +1 -1
  17. package/dist/getRepositoryEndpoint.cjs.map +1 -1
  18. package/dist/getRepositoryEndpoint.d.ts +2 -0
  19. package/dist/getRepositoryEndpoint.js.map +1 -1
  20. package/dist/getRepositoryName.cjs.map +1 -1
  21. package/dist/getRepositoryName.d.ts +1 -0
  22. package/dist/getRepositoryName.js.map +1 -1
  23. package/dist/getToolbarSrc.cjs.map +1 -1
  24. package/dist/getToolbarSrc.d.ts +1 -1
  25. package/dist/getToolbarSrc.js.map +1 -1
  26. package/dist/helpers/asDate.cjs.map +1 -1
  27. package/dist/helpers/asDate.d.ts +1 -0
  28. package/dist/helpers/asDate.js.map +1 -1
  29. package/dist/helpers/asHTML.cjs.map +1 -1
  30. package/dist/helpers/asHTML.d.ts +18 -15
  31. package/dist/helpers/asHTML.js.map +1 -1
  32. package/dist/helpers/asLink.cjs.map +1 -1
  33. package/dist/helpers/asLink.d.ts +21 -15
  34. package/dist/helpers/asLink.js.map +1 -1
  35. package/dist/helpers/asLinkAttrs.cjs.map +1 -1
  36. package/dist/helpers/asLinkAttrs.d.ts +9 -4
  37. package/dist/helpers/asLinkAttrs.js.map +1 -1
  38. package/dist/helpers/asText.cjs.map +1 -1
  39. package/dist/helpers/asText.d.ts +8 -7
  40. package/dist/helpers/asText.js.map +1 -1
  41. package/dist/helpers/documentToLinkField.cjs.map +1 -1
  42. package/dist/helpers/documentToLinkField.d.ts +2 -0
  43. package/dist/helpers/documentToLinkField.js.map +1 -1
  44. package/dist/lib/appendFilters.cjs.map +1 -1
  45. package/dist/lib/appendFilters.d.ts +4 -4
  46. package/dist/lib/appendFilters.js.map +1 -1
  47. package/dist/lib/castArray.cjs.map +1 -1
  48. package/dist/lib/castArray.d.ts +1 -0
  49. package/dist/lib/castArray.js.map +1 -1
  50. package/dist/lib/castThunk.cjs.map +1 -1
  51. package/dist/lib/castThunk.d.ts +1 -0
  52. package/dist/lib/castThunk.js.map +1 -1
  53. package/dist/lib/everyTagFilter.cjs.map +1 -1
  54. package/dist/lib/everyTagFilter.d.ts +2 -2
  55. package/dist/lib/everyTagFilter.js.map +1 -1
  56. package/dist/lib/findMasterRef.cjs.map +1 -1
  57. package/dist/lib/findMasterRef.d.ts +1 -0
  58. package/dist/lib/findMasterRef.js.map +1 -1
  59. package/dist/lib/findRef.cjs.map +1 -1
  60. package/dist/lib/findRef.d.ts +3 -2
  61. package/dist/lib/findRef.js.map +1 -1
  62. package/dist/lib/findRefByID.cjs.map +1 -1
  63. package/dist/lib/findRefByID.d.ts +1 -0
  64. package/dist/lib/findRefByID.js.map +1 -1
  65. package/dist/lib/findRefByLabel.cjs.map +1 -1
  66. package/dist/lib/findRefByLabel.d.ts +1 -0
  67. package/dist/lib/findRefByLabel.js.map +1 -1
  68. package/dist/package.json.cjs +1 -1
  69. package/dist/package.json.js +1 -1
  70. package/dist/types/api/query.d.ts +1 -0
  71. package/dist/types/api/release.d.ts +1 -0
  72. package/dist/types/api/tags.d.ts +1 -0
  73. package/dist/types/model/contentRelationship.d.ts +1 -2
  74. package/dist/types/model/link.cjs.map +1 -1
  75. package/dist/types/model/link.d.ts +2 -4
  76. package/dist/types/model/link.js.map +1 -1
  77. package/dist/types/model/linkToMedia.d.ts +1 -2
  78. package/dist/types/value/color.d.ts +1 -0
  79. package/dist/types/value/date.d.ts +1 -0
  80. package/dist/types/value/embed.cjs.map +1 -1
  81. package/dist/types/value/embed.d.ts +1 -0
  82. package/dist/types/value/embed.js.map +1 -1
  83. package/dist/types/value/geoPoint.d.ts +1 -0
  84. package/dist/types/value/image.d.ts +2 -0
  85. package/dist/types/value/integration.d.ts +1 -0
  86. package/dist/types/value/keyText.d.ts +1 -0
  87. package/dist/types/value/number.d.ts +1 -0
  88. package/dist/types/value/select.d.ts +1 -0
  89. package/dist/types/value/types.d.ts +1 -0
  90. package/package.json +10 -4
  91. package/src/buildQueryURL.ts +11 -10
  92. package/src/createClient.ts +32 -18
  93. package/src/filter.ts +42 -42
  94. package/src/getGraphQLEndpoint.ts +1 -0
  95. package/src/getRepositoryEndpoint.ts +2 -0
  96. package/src/getRepositoryName.ts +1 -0
  97. package/src/getToolbarSrc.ts +1 -1
  98. package/src/helpers/asDate.ts +1 -0
  99. package/src/helpers/asHTML.ts +20 -17
  100. package/src/helpers/asLink.ts +21 -15
  101. package/src/helpers/asLinkAttrs.ts +9 -4
  102. package/src/helpers/asText.ts +8 -7
  103. package/src/helpers/documentToLinkField.ts +2 -0
  104. package/src/lib/appendFilters.ts +4 -4
  105. package/src/lib/castArray.ts +1 -0
  106. package/src/lib/castThunk.ts +1 -0
  107. package/src/lib/everyTagFilter.ts +2 -2
  108. package/src/lib/findMasterRef.ts +1 -0
  109. package/src/lib/findRef.ts +3 -2
  110. package/src/lib/findRefByID.ts +1 -0
  111. package/src/lib/findRefByLabel.ts +1 -0
  112. package/src/types/api/query.ts +1 -0
  113. package/src/types/api/release.ts +1 -0
  114. package/src/types/api/tags.ts +1 -0
  115. package/src/types/model/contentRelationship.ts +1 -2
  116. package/src/types/model/link.ts +2 -4
  117. package/src/types/model/linkToMedia.ts +1 -2
  118. package/src/types/value/color.ts +1 -0
  119. package/src/types/value/date.ts +1 -0
  120. package/src/types/value/embed.ts +1 -0
  121. package/src/types/value/geoPoint.ts +1 -0
  122. package/src/types/value/image.ts +2 -0
  123. package/src/types/value/integration.ts +1 -0
  124. package/src/types/value/keyText.ts +1 -0
  125. package/src/types/value/number.ts +1 -0
  126. package/src/types/value/select.ts +1 -0
  127. package/src/types/value/types.ts +1 -0
@@ -6,9 +6,11 @@ import { isRepositoryName } from "./isRepositoryName";
6
6
  * Get a repository's Prismic Rest API V2 endpoint.
7
7
  *
8
8
  * @typeParam RepositoryName - Name of the Prismic repository.
9
+ *
9
10
  * @param repositoryName - Name of the repository.
10
11
  *
11
12
  * @returns The repository's Prismic Rest API V2 endpoint
13
+ *
12
14
  * @throws {@link Error} Thrown if an invalid repository name is provided.
13
15
  */
14
16
  export const getRepositoryEndpoint = <RepositoryName extends string>(
@@ -9,6 +9,7 @@ import { PrismicError } from "./errors/PrismicError";
9
9
  * @param repositoryEndpoint - Prismic Rest API V2 endpoint for the repository.
10
10
  *
11
11
  * @returns The Prismic repository's name.
12
+ *
12
13
  * @throws {@link Error} Thrown if an invalid Prismic Rest API V2 endpoint is
13
14
  * provided.
14
15
  */
@@ -12,7 +12,7 @@ import { isRepositoryName } from "./isRepositoryName";
12
12
  * // In Next.js apps, use `next/script` in your `app/layout.tsx` file.
13
13
  *
14
14
  * import Script from "next/script";
15
- * import * as prismic from '@prismicio/client'
15
+ * import * as prismic from "@prismicio/client";
16
16
  *
17
17
  * export default function RootLayout({
18
18
  * children,
@@ -14,6 +14,7 @@ type AsDateReturnType<
14
14
  * @param dateOrTimestampField - A date or timestamp field from Prismic
15
15
  *
16
16
  * @returns A Date object, null if provided date is falsy
17
+ *
17
18
  * @see Templating date field from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#date-and-timestamp}
18
19
  */
19
20
  export const asDate = <
@@ -106,7 +106,8 @@ type ExtractTextTypeGeneric<T> = T extends RichTextMapSerializerFunction<
106
106
  : never;
107
107
 
108
108
  /**
109
- * Serializes a node from a rich text or title field with a map or a function to HTML
109
+ * Serializes a node from a rich text or title field with a map or a function to
110
+ * HTML
110
111
  *
111
112
  * @see {@link HTMLRichTextMapSerializer} and {@link HTMLRichTextFunctionSerializer}
112
113
  * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title}
@@ -116,8 +117,8 @@ export type HTMLRichTextSerializer =
116
117
  | HTMLRichTextFunctionSerializer;
117
118
 
118
119
  /**
119
- * Creates a default HTML rich text serializer with a given link resolver providing
120
- * sensible and safe defaults for every node type
120
+ * Creates a default HTML rich text serializer with a given link resolver
121
+ * providing sensible and safe defaults for every node type
121
122
  *
122
123
  * @internal
123
124
  */
@@ -205,13 +206,14 @@ const wrapMapSerializerWithStringChildren = (
205
206
  */
206
207
  type AsHTMLConfig = {
207
208
  /**
208
- * An optional link resolver function to resolve links.
209
- * Without it you're expected to use the `routes` options from the API.
209
+ * An optional link resolver function to resolve links. Without it you're
210
+ * expected to use the `routes` options from the API.
210
211
  */
211
212
  linkResolver?: LinkResolverFunction | null;
212
213
 
213
214
  /**
214
- * An optional rich text serializer, unhandled cases will fallback to the default serializer
215
+ * An optional rich text serializer, unhandled cases will fallback to the
216
+ * default serializer
215
217
  */
216
218
  serializer?: HTMLRichTextSerializer | null;
217
219
  };
@@ -240,6 +242,7 @@ export const asHTML: {
240
242
  * @param config - Configuration that determines the output of `asHTML()`
241
243
  *
242
244
  * @returns HTML equivalent of the provided rich text or title field
245
+ *
243
246
  * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title}
244
247
  */
245
248
  <Field extends RichTextField | null | undefined>(
@@ -250,23 +253,23 @@ export const asHTML: {
250
253
  /**
251
254
  * Serializes a rich text or title field to an HTML string.
252
255
  *
256
+ * @deprecated Use object-style configuration instead.
257
+ *
258
+ * ```ts
259
+ * asHTML(field);
260
+ * asHTML(field, { linkResolver });
261
+ * asHTML(field, { serializer });
262
+ * asHTML(field, { linkResolver, serializer });
263
+ * ```
253
264
  * @param richTextField - A rich text or title field from Prismic
254
265
  * @param linkResolver - An optional link resolver function to resolve links,
255
266
  * without it you're expected to use the `routes` options from the API
256
- * @param serializer - An optional rich text serializer, unhandled cases will fallback
257
- * to the default serializer
267
+ * @param serializer - An optional rich text serializer, unhandled cases will
268
+ * fallback to the default serializer
258
269
  *
259
270
  * @returns HTML equivalent of the provided rich text or title field
260
- * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title}
261
271
  *
262
- * @deprecated Use object-style configuration instead.
263
- *
264
- * ```ts
265
- * asHTML(field);
266
- * asHTML(field, { linkResolver });
267
- * asHTML(field, { serializer });
268
- * asHTML(field, { linkResolver, serializer });
269
- * ```
272
+ * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title}
270
273
  */
271
274
  <Field extends RichTextField | null | undefined>(
272
275
  richTextField: Field,
@@ -13,6 +13,7 @@ import { documentToLinkField } from "./documentToLinkField";
13
13
  * @param linkToDocumentField - A document link field to resolve
14
14
  *
15
15
  * @returns Resolved URL
16
+ *
16
17
  * @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver}
17
18
  */
18
19
  export type LinkResolverFunction<ReturnType = string | null | undefined> = (
@@ -25,8 +26,8 @@ export type LinkResolverFunction<ReturnType = string | null | undefined> = (
25
26
  type AsLinkConfig<LinkResolverFunctionReturnType = string | null | undefined> =
26
27
  {
27
28
  /**
28
- * An optional link resolver function. Without it, you are
29
- * expected to use the `routes` options from the API.
29
+ * An optional link resolver function. Without it, you are expected to use
30
+ * the `routes` options from the API.
30
31
  */
31
32
  linkResolver?: LinkResolverFunction<LinkResolverFunctionReturnType> | null;
32
33
  };
@@ -67,10 +68,13 @@ export const asLink: {
67
68
  * @typeParam LinkResolverFunctionReturnType - link resolver function return
68
69
  * type
69
70
  * @typeParam Field - Link field or Prismic document to resolve to a URL
70
- * @param linkFieldOrDocument - Any kind of link field or a document to resolve
71
+ *
72
+ * @param linkFieldOrDocument - Any kind of link field or a document to
73
+ * resolve
71
74
  * @param config - Configuration that determines the output of `asLink()`
72
75
  *
73
- * @returns Resolved URL or, if the provided link field or document is empty, `null`
76
+ * @returns Resolved URL or, if the provided link field or document is empty,
77
+ * `null`
74
78
  * @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver}
75
79
  * @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver}
76
80
  */
@@ -89,23 +93,25 @@ export const asLink: {
89
93
  /**
90
94
  * Resolves any type of link field or Prismic document to a URL.
91
95
  *
96
+ * @deprecated Use object-style configuration instead.
97
+ *
98
+ * ```ts
99
+ * asLink(field);
100
+ * asLink(field, { linkResolver });
101
+ * ```
92
102
  * @typeParam LinkResolverFunctionReturnType - link resolver function return
93
103
  * type
94
104
  * @typeParam Field - Link field or Prismic document to resolve to a URL
95
- * @param linkFieldOrDocument - Any kind of link field or a document to resolve
96
- * @param linkResolver - An optional link resolver function. Without it, you are
97
- * expected to use the `routes` options from the API
98
105
  *
99
- * @returns Resolved URL or, if the provided link field or document is empty, `null`
106
+ * @param linkFieldOrDocument - Any kind of link field or a document to
107
+ * resolve
108
+ * @param linkResolver - An optional link resolver function. Without it, you
109
+ * are expected to use the `routes` options from the API
110
+ *
111
+ * @returns Resolved URL or, if the provided link field or document is empty,
112
+ * `null`
100
113
  * @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver}
101
114
  * @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver}
102
- *
103
- * @deprecated Use object-style configuration instead.
104
- *
105
- * ```ts
106
- * asLink(field);
107
- * asLink(field, { linkResolver });
108
- * ```
109
115
  */
110
116
  <
111
117
  LinkResolverFunctionReturnType = string | null | undefined,
@@ -66,17 +66,22 @@ type AsLinkAttrsReturnType<
66
66
  };
67
67
 
68
68
  /**
69
- * Resolves any type of link field or Prismic document to a set of link attributes. The attributes are designed to be passed to link HTML elements, like `<a>`.
69
+ * Resolves any type of link field or Prismic document to a set of link
70
+ * attributes. The attributes are designed to be passed to link HTML elements,
71
+ * like `<a>`.
70
72
  *
71
- * If a resolved URL is external (i.e. starts with a protocol like `https://`), `rel` is returned as `"noreferrer"`.
73
+ * If a resolved URL is external (i.e. starts with a protocol like `https://`),
74
+ * `rel` is returned as `"noreferrer"`.
72
75
  *
73
76
  * @typeParam LinkResolverFunctionReturnType - link resolver function return
74
77
  * type
75
- * @typeParam Field - Link field or Prismic document to resolve to link attributes
78
+ * @typeParam Field - Link field or Prismic document to resolve to link
79
+ * attributes
76
80
  * @param linkFieldOrDocument - Any kind of link field or a document to resolve
77
81
  * @param config - Configuration that determines the output of `asLinkAttrs()`
78
82
  *
79
- * @returns Resolved set of link attributes or, if the provided link field or document is empty, and empty object
83
+ * @returns Resolved set of link attributes or, if the provided link field or
84
+ * document is empty, and empty object
80
85
  * @see Prismic link resolver documentation: {@link https://prismic.io/docs/route-resolver#link-resolver}
81
86
  * @see Prismic API `routes` options documentation: {@link https://prismic.io/docs/route-resolver}
82
87
  */
@@ -34,6 +34,7 @@ export const asText: {
34
34
  * @param config - Configuration that determines the output of `asText()`
35
35
  *
36
36
  * @returns Plain text equivalent of the provided rich text or title field
37
+ *
37
38
  * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title}
38
39
  */
39
40
  <Field extends RichTextField | null | undefined>(
@@ -44,18 +45,18 @@ export const asText: {
44
45
  /**
45
46
  * Serializes a rich text or title field to a plain text string.
46
47
  *
48
+ * @deprecated Use object-style configuration instead.
49
+ *
50
+ * ```ts
51
+ * asText(field);
52
+ * asText(field, { separator });
53
+ * ```
47
54
  * @param richTextField - A rich text or title field from Prismic
48
55
  * @param separator - Separator used to join each element, defaults to a space
49
56
  *
50
57
  * @returns Plain text equivalent of the provided rich text or title field
51
- * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title}
52
58
  *
53
- * @deprecated Use object-style configuration instead.
54
- *
55
- * ```ts
56
- * asText(field);
57
- * asText(field, { separator });
58
- * ```
59
+ * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/template-content-vanilla-javascript#rich-text-and-title}
59
60
  */
60
61
  <Field extends RichTextField | null | undefined>(
61
62
  richTextField: Field,
@@ -10,9 +10,11 @@ type SetOptional<T, Keys extends keyof T> = Omit<T, Keys> &
10
10
  * for document links
11
11
  *
12
12
  * @typeParam TDocument - Specific interface of the provided document
13
+ *
13
14
  * @param prismicDocument - A document coming from Prismic
14
15
  *
15
16
  * @returns The equivalent link field to use with `asLink()`
17
+ *
16
18
  * @internal
17
19
  */
18
20
  export const documentToLinkField = <
@@ -5,12 +5,12 @@ interface WithFilters {
5
5
  }
6
6
 
7
7
  /**
8
- * Adds one or more filters to an object with a `filters` property.
9
- * Appended filters are added to the end of the existing list.
8
+ * Adds one or more filters to an object with a `filters` property. Appended
9
+ * filters are added to the end of the existing list.
10
10
  *
11
11
  * @typeParam T - Object to which filters will be append.
12
- * @param objWithFilters - Object to append filters on the `filters`
13
- * property.
12
+ *
13
+ * @param objWithFilters - Object to append filters on the `filters` property.
14
14
  * @param filters - One or more filters to append.
15
15
  *
16
16
  * @returns The object with the appended filters.
@@ -4,6 +4,7 @@
4
4
  * only element.
5
5
  *
6
6
  * @typeParam A - Element of the array.
7
+ *
7
8
  * @param a - Value to ensure is an array.
8
9
  *
9
10
  * @returns `a` as an array.
@@ -3,6 +3,7 @@
3
3
  * is. If it is not a thunk, it is converted to a thunk.
4
4
  *
5
5
  * @typeParam A - Value returned by the thunk.
6
+ *
6
7
  * @param a - Value to ensure is a thunk.
7
8
  *
8
9
  * @returns `a` as a a thunk.
@@ -3,8 +3,8 @@ import { filter } from "../filter";
3
3
  import { castArray } from "./castArray";
4
4
 
5
5
  /**
6
- * Creates a filter to filter content by document tags. All tags are required
7
- * on the document.
6
+ * Creates a filter to filter content by document tags. All tags are required on
7
+ * the document.
8
8
  *
9
9
  * @param tags - Document tags to filter queried content.
10
10
  *
@@ -8,6 +8,7 @@ import { findRef } from "./findRef";
8
8
  * @param refs - A list of refs to search.
9
9
  *
10
10
  * @returns The master ref from the list.
11
+ *
11
12
  * @throws If a matching ref cannot be found.
12
13
  */
13
14
  export const findMasterRef = (refs: Ref[]): Ref => {
@@ -7,10 +7,11 @@ import { PrismicError } from "../errors/PrismicError";
7
7
  * returns true).
8
8
  *
9
9
  * @param refs - A list of refs to search.
10
- * @param filter - A function that determines if a ref from the list matches
11
- * the criteria.
10
+ * @param filter - A function that determines if a ref from the list matches the
11
+ * criteria.
12
12
  *
13
13
  * @returns The first matching ref.
14
+ *
14
15
  * @throws If a matching ref cannot be found.
15
16
  */
16
17
  export const findRef = (refs: Ref[], filter: (ref: Ref) => boolean): Ref => {
@@ -9,6 +9,7 @@ import { findRef } from "./findRef";
9
9
  * @param id - The ID of the ref to find.
10
10
  *
11
11
  * @returns The ref with a matching ID from the list.
12
+ *
12
13
  * @throws If a matching ref cannot be found.
13
14
  */
14
15
  export const findRefByID = (refs: Ref[], id: string): Ref => {
@@ -9,6 +9,7 @@ import { findRef } from "./findRef";
9
9
  * @param id - The label of the ref to find.
10
10
  *
11
11
  * @returns The ref with a matching label from the list.
12
+ *
12
13
  * @throws If a matching ref cannot be found.
13
14
  */
14
15
  export const findRefByLabel = (refs: Ref[], label: string): Ref => {
@@ -5,6 +5,7 @@ import { PrismicDocument } from "../value/document";
5
5
  * paginated metadata and a list of matching results for the query.
6
6
  *
7
7
  * @typeParam Document - The type(s) of Prismic document that can be returned.
8
+ *
8
9
  * @see More details on querying: {@link https://prismic.io/docs/api}
9
10
  */
10
11
  export interface Query<Document extends PrismicDocument = PrismicDocument> {
@@ -5,6 +5,7 @@ import { Ref } from "./ref";
5
5
  *
6
6
  * @remarks
7
7
  * This is an alias for `Ref`.
8
+ *
8
9
  * @see {@link Ref}
9
10
  * @see More details on Releases: {@link https://prismic.io/docs/guides/draft-plan-and-schedule-content#releases}
10
11
  */
@@ -3,6 +3,7 @@
3
3
  * sending a `GET` request to a repository's `/api/tags` endpoint.
4
4
  *
5
5
  * @typeParam Tag - Tags that are returned by the Tags API.
6
+ *
6
7
  * @see More details on the Tags API: {@link https://prismic.io/docs/tags-api-technical-reference}
7
8
  */
8
9
  export type Tags<Tag extends string = string> = Tag[];
@@ -5,8 +5,7 @@ import type { CustomTypeModelLinkSelectType } from "./link";
5
5
  /**
6
6
  * A content relationship custom type field.
7
7
  *
8
- * More details:
9
- * {@link https://prismic.io/docs/content-relationship}
8
+ * More details: {@link https://prismic.io/docs/content-relationship}
10
9
  */
11
10
  export interface CustomTypeModelContentRelationshipField<
12
11
  CustomTypeIDs extends string = string,
@@ -3,8 +3,7 @@ import type { CustomTypeModelFieldType } from "./types";
3
3
  /**
4
4
  * A link custom type field.
5
5
  *
6
- * More details:
7
- * {@link https://prismic.io/docs/link}
6
+ * More details: {@link https://prismic.io/docs/link}
8
7
  */
9
8
  export interface CustomTypeModelLinkField {
10
9
  type: typeof CustomTypeModelFieldType.Link;
@@ -21,8 +20,7 @@ export interface CustomTypeModelLinkField {
21
20
  /**
22
21
  * Type of a link custom type field.
23
22
  *
24
- * More details:
25
- * {@link https://prismic.io/docs/link}
23
+ * More details: {@link https://prismic.io/docs/link}
26
24
  */
27
25
  export const CustomTypeModelLinkSelectType = {
28
26
  Document: "document",
@@ -5,8 +5,7 @@ import type { CustomTypeModelLinkSelectType } from "./link";
5
5
  /**
6
6
  * A link to media custom type field.
7
7
  *
8
- * More details:
9
- * {@link https://prismic.io/docs/media}
8
+ * More details: {@link https://prismic.io/docs/media}
10
9
  */
11
10
  export interface CustomTypeModelLinkToMediaField {
12
11
  type: typeof CustomTypeModelFieldType.Link;
@@ -4,6 +4,7 @@ import type { FieldState } from "./types";
4
4
  * A color field.
5
5
  *
6
6
  * @typeParam State - State of the field which determines its shape.
7
+ *
7
8
  * @see More details: {@link https://prismic.io/docs/color}
8
9
  */
9
10
  export type ColorField<State extends FieldState = FieldState> =
@@ -4,6 +4,7 @@ import type { FieldState } from "./types";
4
4
  * A date field.
5
5
  *
6
6
  * @typeParam State - State of the field which determines its shape.
7
+ *
7
8
  * @see More details: {@link https://prismic.io/docs/date}
8
9
  */
9
10
  export type DateField<State extends FieldState = FieldState> =
@@ -183,6 +183,7 @@ export type AnyOEmbed = PhotoOEmbed | VideoOEmbed | LinkOEmbed | RichOEmbed;
183
183
  *
184
184
  * @typeParam Data - Data provided by the URL's oEmbed provider.
185
185
  * @typeParam State - State of the field which determines its shape.
186
+ *
186
187
  * @see More details: {@link https://prismic.io/docs/embed}
187
188
  */
188
189
  export type EmbedField<
@@ -4,6 +4,7 @@ import type { EmptyObjectField, FieldState } from "./types";
4
4
  * A geopoint field.
5
5
  *
6
6
  * @typeParam State - State of the field which determines its shape.
7
+ *
7
8
  * @see More details: {@link https://prismic.io/docs/geopoint}
8
9
  */
9
10
  export type GeoPointField<State extends FieldState = FieldState> =
@@ -5,6 +5,7 @@ import type { FieldState, Simplify } from "./types";
5
5
  * uses this type.
6
6
  *
7
7
  * @typeParam State - State of the field which determines its shape.
8
+ *
8
9
  * @see {@link ImageField} for a full image field type.
9
10
  */
10
11
  export type ImageFieldImage<State extends FieldState = FieldState> =
@@ -36,6 +37,7 @@ export interface EmptyImageFieldImage {
36
37
  * @typeParam ThumbnailNames - Names of thumbnails. If the field does not
37
38
  * contain thumbnails, `never` can be used to "disable" thumbnail fields.
38
39
  * @typeParam State - State of the field which determines its shape.
40
+ *
39
41
  * @see Image field documentation: {@link https://prismic.io/docs/image}
40
42
  */
41
43
  export type ImageField<
@@ -5,6 +5,7 @@ import type { FieldState } from "./types";
5
5
  *
6
6
  * @typeParam Data - Data from the integrated API.
7
7
  * @typeParam State - State of the field which determines its shape.
8
+ *
8
9
  * @see More details: {@link https://prismic.io/docs/integration-fields}
9
10
  */
10
11
  export type IntegrationField<
@@ -4,6 +4,7 @@ import type { FieldState } from "./types";
4
4
  * A key text field
5
5
  *
6
6
  * @typeParam State - State of the field which determines its shape.
7
+ *
7
8
  * @see More details: {@link https://prismic.io/docs/key-text}
8
9
  */
9
10
  export type KeyTextField<State extends FieldState = FieldState> =
@@ -4,6 +4,7 @@ import type { FieldState } from "./types";
4
4
  * A number field.
5
5
  *
6
6
  * @typeParam State - State of the field which determines its shape.
7
+ *
7
8
  * @see More details: {@link https://prismic.io/docs/number}
8
9
  */
9
10
  export type NumberField<State extends FieldState = FieldState> =
@@ -5,6 +5,7 @@ import type { FieldState } from "./types";
5
5
  *
6
6
  * @typeParam Enum - Selectable options for the field.
7
7
  * @typeParam State - State of the field which determines its shape.
8
+ *
8
9
  * @see More details: {@link https://prismic.io/docs/select}
9
10
  */
10
11
  export type SelectField<
@@ -53,6 +53,7 @@ export type AnyRegularField =
53
53
  * Taken from the `type-fest` package.
54
54
  *
55
55
  * @typeParam T - The type to simplify.
56
+ *
56
57
  * @see https://github.com/sindresorhus/type-fest/blob/cbd7ec510bd136ac045bbc74e391ee686b8a9a2f/source/simplify.d.ts
57
58
  */
58
59
  export type Simplify<T> = { [P in keyof T]: T[P] };