@prismicio/client 7.9.0-alpha.1 → 7.9.0-alpha.3

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.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "7.9.0-alpha.1";
3
+ const version = "7.9.0-alpha.3";
4
4
  exports.version = version;
5
5
  //# sourceMappingURL=package.json.cjs.map
@@ -1,4 +1,4 @@
1
- const version = "7.9.0-alpha.1";
1
+ const version = "7.9.0-alpha.3";
2
2
  export {
3
3
  version
4
4
  };
@@ -77,6 +77,10 @@ export interface Language {
77
77
  * The name of the language.
78
78
  */
79
79
  name: string;
80
+ /**
81
+ * Whether or not the language is the default language of the repository.
82
+ */
83
+ is_master: boolean;
80
84
  }
81
85
  /**
82
86
  * A Prismic REST API V2 feature supported by the repository. It contains
@@ -1,5 +1,4 @@
1
1
  import type { CustomTypeModelFieldType } from "./types";
2
- import type { CustomTypeModelKeyTextField } from "./keyText";
3
2
  import type { CustomTypeModelLinkSelectType } from "./link";
4
3
  /**
5
4
  * A content relationship custom type field.
@@ -14,6 +13,5 @@ export interface CustomTypeModelContentRelationshipField<CustomTypeIDs extends s
14
13
  select: typeof CustomTypeModelLinkSelectType.Document;
15
14
  customtypes?: readonly CustomTypeIDs[];
16
15
  tags?: readonly Tags[];
17
- text?: CustomTypeModelKeyTextField;
18
16
  };
19
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"link.cjs","sources":["../../../../src/types/model/link.ts"],"sourcesContent":["import type { CustomTypeModelFieldType } from \"./types\"\n\nimport type { CustomTypeModelKeyTextField } from \"./keyText\"\n\n/**\n * A link custom type field.\n *\n * More details: {@link https://prismic.io/docs/link}\n */\nexport interface CustomTypeModelLinkField {\n\ttype: typeof CustomTypeModelFieldType.Link\n\tconfig?: {\n\t\tlabel?: string | null\n\t\tplaceholder?: string\n\t\tselect?:\n\t\t\t| null\n\t\t\t| (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType]\n\t\ttext?: CustomTypeModelKeyTextField\n\t\tallowTargetBlank?: boolean\n\t}\n}\n\n/**\n * Type of a link custom type field.\n *\n * More details: {@link https://prismic.io/docs/link}\n */\nexport const CustomTypeModelLinkSelectType = {\n\tDocument: \"document\",\n\tMedia: \"media\",\n\tWeb: \"web\",\n} as const\n"],"names":[],"mappings":";;AA2BO,MAAM,gCAAgC;AAAA,EAC5C,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;;;"}
1
+ {"version":3,"file":"link.cjs","sources":["../../../../src/types/model/link.ts"],"sourcesContent":["import type { CustomTypeModelFieldType } from \"./types\"\n\n/**\n * A link custom type field.\n *\n * More details: {@link https://prismic.io/docs/link}\n */\nexport interface CustomTypeModelLinkField {\n\ttype: typeof CustomTypeModelFieldType.Link\n\tconfig?: {\n\t\tlabel?: string | null\n\t\tplaceholder?: string\n\t\tselect?:\n\t\t\t| null\n\t\t\t| (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType]\n\t\tallowText?: boolean\n\t\tallowTargetBlank?: boolean\n\t}\n}\n\n/**\n * Type of a link custom type field.\n *\n * More details: {@link https://prismic.io/docs/link}\n */\nexport const CustomTypeModelLinkSelectType = {\n\tDocument: \"document\",\n\tMedia: \"media\",\n\tWeb: \"web\",\n} as const\n"],"names":[],"mappings":";;AAyBO,MAAM,gCAAgC;AAAA,EAC5C,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;;;"}
@@ -1,5 +1,4 @@
1
1
  import type { CustomTypeModelFieldType } from "./types";
2
- import type { CustomTypeModelKeyTextField } from "./keyText";
3
2
  /**
4
3
  * A link custom type field.
5
4
  *
@@ -11,7 +10,7 @@ export interface CustomTypeModelLinkField {
11
10
  label?: string | null;
12
11
  placeholder?: string;
13
12
  select?: null | (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType];
14
- text?: CustomTypeModelKeyTextField;
13
+ allowText?: boolean;
15
14
  allowTargetBlank?: boolean;
16
15
  };
17
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sources":["../../../../src/types/model/link.ts"],"sourcesContent":["import type { CustomTypeModelFieldType } from \"./types\"\n\nimport type { CustomTypeModelKeyTextField } from \"./keyText\"\n\n/**\n * A link custom type field.\n *\n * More details: {@link https://prismic.io/docs/link}\n */\nexport interface CustomTypeModelLinkField {\n\ttype: typeof CustomTypeModelFieldType.Link\n\tconfig?: {\n\t\tlabel?: string | null\n\t\tplaceholder?: string\n\t\tselect?:\n\t\t\t| null\n\t\t\t| (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType]\n\t\ttext?: CustomTypeModelKeyTextField\n\t\tallowTargetBlank?: boolean\n\t}\n}\n\n/**\n * Type of a link custom type field.\n *\n * More details: {@link https://prismic.io/docs/link}\n */\nexport const CustomTypeModelLinkSelectType = {\n\tDocument: \"document\",\n\tMedia: \"media\",\n\tWeb: \"web\",\n} as const\n"],"names":[],"mappings":"AA2BO,MAAM,gCAAgC;AAAA,EAC5C,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;;"}
1
+ {"version":3,"file":"link.js","sources":["../../../../src/types/model/link.ts"],"sourcesContent":["import type { CustomTypeModelFieldType } from \"./types\"\n\n/**\n * A link custom type field.\n *\n * More details: {@link https://prismic.io/docs/link}\n */\nexport interface CustomTypeModelLinkField {\n\ttype: typeof CustomTypeModelFieldType.Link\n\tconfig?: {\n\t\tlabel?: string | null\n\t\tplaceholder?: string\n\t\tselect?:\n\t\t\t| null\n\t\t\t| (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType]\n\t\tallowText?: boolean\n\t\tallowTargetBlank?: boolean\n\t}\n}\n\n/**\n * Type of a link custom type field.\n *\n * More details: {@link https://prismic.io/docs/link}\n */\nexport const CustomTypeModelLinkSelectType = {\n\tDocument: \"document\",\n\tMedia: \"media\",\n\tWeb: \"web\",\n} as const\n"],"names":[],"mappings":"AAyBO,MAAM,gCAAgC;AAAA,EAC5C,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;;"}
@@ -1,5 +1,4 @@
1
1
  import type { CustomTypeModelFieldType } from "./types";
2
- import type { CustomTypeModelKeyTextField } from "./keyText";
3
2
  import type { CustomTypeModelLinkSelectType } from "./link";
4
3
  /**
5
4
  * A link to media custom type field.
@@ -12,6 +11,6 @@ export interface CustomTypeModelLinkToMediaField {
12
11
  label?: string | null;
13
12
  placeholder?: string;
14
13
  select: typeof CustomTypeModelLinkSelectType.Media;
15
- text?: CustomTypeModelKeyTextField;
14
+ allowText?: boolean;
16
15
  };
17
16
  }
@@ -1,6 +1,5 @@
1
1
  import type { AnyRegularField, FieldState } from "./types";
2
2
  import type { GroupField } from "./group";
3
- import type { KeyTextField } from "./keyText";
4
3
  import type { EmptyLinkField, LinkType } from "./link";
5
4
  import type { SliceZone } from "./sliceZone";
6
5
  /**
@@ -27,5 +26,5 @@ export interface FilledContentRelationshipField<TypeEnum = string, LangEnum = st
27
26
  slug?: string;
28
27
  isBroken?: boolean;
29
28
  data?: DataInterface;
30
- text?: KeyTextField;
29
+ text?: string;
31
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"link.cjs","sources":["../../../../src/types/value/link.ts"],"sourcesContent":["import type { AnyRegularField, FieldState } from \"./types\"\n\nimport type { ContentRelationshipField } from \"./contentRelationship\"\nimport type { GroupField } from \"./group\"\nimport type { KeyTextField } from \"./keyText\"\nimport type { LinkToMediaField } from \"./linkToMedia\"\nimport type { SliceZone } from \"./sliceZone\"\n\n/**\n * Link types\n */\nexport const LinkType = {\n\tAny: \"Any\",\n\tDocument: \"Document\",\n\tMedia: \"Media\",\n\tWeb: \"Web\",\n} as const\n\n/**\n * For link fields that haven't been filled\n *\n * @typeParam Type - The type of link.\n */\nexport type EmptyLinkField<\n\tType extends (typeof LinkType)[keyof typeof LinkType] = typeof LinkType.Any,\n> = {\n\tlink_type: Type | string\n}\n\n/**\n * Link that points to external website\n */\nexport interface FilledLinkToWebField {\n\tlink_type: typeof LinkType.Web\n\turl: string\n\ttarget?: string\n\ttext?: KeyTextField\n}\n\n/**\n * A link field.\n *\n * @typeParam TypeEnum - Type API ID of the document.\n * @typeParam LangEnum - Language API ID of the document.\n * @typeParam DataInterface - Data fields for the document (filled in via\n * GraphQuery of `fetchLinks`).\n * @typeParam State - State of the field which determines its shape.\n */\nexport type LinkField<\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n\tState extends FieldState = FieldState,\n> = State extends \"empty\"\n\t? EmptyLinkField<typeof LinkType.Any>\n\t:\n\t\t\t| ContentRelationshipField<TypeEnum, LangEnum, DataInterface, State>\n\t\t\t| FilledLinkToWebField\n\t\t\t| LinkToMediaField<State>\n"],"names":[],"mappings":";;AAWO,MAAM,WAAW;AAAA,EACvB,KAAK;AAAA,EACL,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;;;"}
1
+ {"version":3,"file":"link.cjs","sources":["../../../../src/types/value/link.ts"],"sourcesContent":["import type { AnyRegularField, FieldState } from \"./types\"\n\nimport type { ContentRelationshipField } from \"./contentRelationship\"\nimport type { GroupField } from \"./group\"\nimport type { LinkToMediaField } from \"./linkToMedia\"\nimport type { SliceZone } from \"./sliceZone\"\n\n/**\n * Link types\n */\nexport const LinkType = {\n\tAny: \"Any\",\n\tDocument: \"Document\",\n\tMedia: \"Media\",\n\tWeb: \"Web\",\n} as const\n\n/**\n * For link fields that haven't been filled\n *\n * @typeParam Type - The type of link.\n */\nexport type EmptyLinkField<\n\tType extends (typeof LinkType)[keyof typeof LinkType] = typeof LinkType.Any,\n> = {\n\tlink_type: Type | string\n\ttext?: string\n}\n\n/**\n * Link that points to external website\n */\nexport interface FilledLinkToWebField {\n\tlink_type: typeof LinkType.Web\n\turl: string\n\ttarget?: string\n\ttext?: string\n}\n\n/**\n * A link field.\n *\n * @typeParam TypeEnum - Type API ID of the document.\n * @typeParam LangEnum - Language API ID of the document.\n * @typeParam DataInterface - Data fields for the document (filled in via\n * GraphQuery of `fetchLinks`).\n * @typeParam State - State of the field which determines its shape.\n */\nexport type LinkField<\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n\tState extends FieldState = FieldState,\n> = State extends \"empty\"\n\t? EmptyLinkField<typeof LinkType.Any>\n\t:\n\t\t\t| ContentRelationshipField<TypeEnum, LangEnum, DataInterface, State>\n\t\t\t| FilledLinkToWebField\n\t\t\t| LinkToMediaField<State>\n"],"names":[],"mappings":";;AAUO,MAAM,WAAW;AAAA,EACvB,KAAK;AAAA,EACL,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;;;"}
@@ -1,7 +1,6 @@
1
1
  import type { AnyRegularField, FieldState } from "./types";
2
2
  import type { ContentRelationshipField } from "./contentRelationship";
3
3
  import type { GroupField } from "./group";
4
- import type { KeyTextField } from "./keyText";
5
4
  import type { LinkToMediaField } from "./linkToMedia";
6
5
  import type { SliceZone } from "./sliceZone";
7
6
  /**
@@ -20,6 +19,7 @@ export declare const LinkType: {
20
19
  */
21
20
  export type EmptyLinkField<Type extends (typeof LinkType)[keyof typeof LinkType] = typeof LinkType.Any> = {
22
21
  link_type: Type | string;
22
+ text?: string;
23
23
  };
24
24
  /**
25
25
  * Link that points to external website
@@ -28,7 +28,7 @@ export interface FilledLinkToWebField {
28
28
  link_type: typeof LinkType.Web;
29
29
  url: string;
30
30
  target?: string;
31
- text?: KeyTextField;
31
+ text?: string;
32
32
  }
33
33
  /**
34
34
  * A link field.
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sources":["../../../../src/types/value/link.ts"],"sourcesContent":["import type { AnyRegularField, FieldState } from \"./types\"\n\nimport type { ContentRelationshipField } from \"./contentRelationship\"\nimport type { GroupField } from \"./group\"\nimport type { KeyTextField } from \"./keyText\"\nimport type { LinkToMediaField } from \"./linkToMedia\"\nimport type { SliceZone } from \"./sliceZone\"\n\n/**\n * Link types\n */\nexport const LinkType = {\n\tAny: \"Any\",\n\tDocument: \"Document\",\n\tMedia: \"Media\",\n\tWeb: \"Web\",\n} as const\n\n/**\n * For link fields that haven't been filled\n *\n * @typeParam Type - The type of link.\n */\nexport type EmptyLinkField<\n\tType extends (typeof LinkType)[keyof typeof LinkType] = typeof LinkType.Any,\n> = {\n\tlink_type: Type | string\n}\n\n/**\n * Link that points to external website\n */\nexport interface FilledLinkToWebField {\n\tlink_type: typeof LinkType.Web\n\turl: string\n\ttarget?: string\n\ttext?: KeyTextField\n}\n\n/**\n * A link field.\n *\n * @typeParam TypeEnum - Type API ID of the document.\n * @typeParam LangEnum - Language API ID of the document.\n * @typeParam DataInterface - Data fields for the document (filled in via\n * GraphQuery of `fetchLinks`).\n * @typeParam State - State of the field which determines its shape.\n */\nexport type LinkField<\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n\tState extends FieldState = FieldState,\n> = State extends \"empty\"\n\t? EmptyLinkField<typeof LinkType.Any>\n\t:\n\t\t\t| ContentRelationshipField<TypeEnum, LangEnum, DataInterface, State>\n\t\t\t| FilledLinkToWebField\n\t\t\t| LinkToMediaField<State>\n"],"names":[],"mappings":"AAWO,MAAM,WAAW;AAAA,EACvB,KAAK;AAAA,EACL,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;;"}
1
+ {"version":3,"file":"link.js","sources":["../../../../src/types/value/link.ts"],"sourcesContent":["import type { AnyRegularField, FieldState } from \"./types\"\n\nimport type { ContentRelationshipField } from \"./contentRelationship\"\nimport type { GroupField } from \"./group\"\nimport type { LinkToMediaField } from \"./linkToMedia\"\nimport type { SliceZone } from \"./sliceZone\"\n\n/**\n * Link types\n */\nexport const LinkType = {\n\tAny: \"Any\",\n\tDocument: \"Document\",\n\tMedia: \"Media\",\n\tWeb: \"Web\",\n} as const\n\n/**\n * For link fields that haven't been filled\n *\n * @typeParam Type - The type of link.\n */\nexport type EmptyLinkField<\n\tType extends (typeof LinkType)[keyof typeof LinkType] = typeof LinkType.Any,\n> = {\n\tlink_type: Type | string\n\ttext?: string\n}\n\n/**\n * Link that points to external website\n */\nexport interface FilledLinkToWebField {\n\tlink_type: typeof LinkType.Web\n\turl: string\n\ttarget?: string\n\ttext?: string\n}\n\n/**\n * A link field.\n *\n * @typeParam TypeEnum - Type API ID of the document.\n * @typeParam LangEnum - Language API ID of the document.\n * @typeParam DataInterface - Data fields for the document (filled in via\n * GraphQuery of `fetchLinks`).\n * @typeParam State - State of the field which determines its shape.\n */\nexport type LinkField<\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n\tState extends FieldState = FieldState,\n> = State extends \"empty\"\n\t? EmptyLinkField<typeof LinkType.Any>\n\t:\n\t\t\t| ContentRelationshipField<TypeEnum, LangEnum, DataInterface, State>\n\t\t\t| FilledLinkToWebField\n\t\t\t| LinkToMediaField<State>\n"],"names":[],"mappings":"AAUO,MAAM,WAAW;AAAA,EACvB,KAAK;AAAA,EACL,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;;"}
@@ -1,5 +1,4 @@
1
1
  import type { FieldState } from "./types";
2
- import type { KeyTextField } from "./keyText";
3
2
  import type { EmptyLinkField, LinkType } from "./link";
4
3
  /**
5
4
  * A link field that points to media.
@@ -19,5 +18,5 @@ export interface FilledLinkToMediaField {
19
18
  size: string;
20
19
  height?: string | null;
21
20
  width?: string | null;
22
- text?: KeyTextField;
21
+ text?: string;
23
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/client",
3
- "version": "7.9.0-alpha.1",
3
+ "version": "7.9.0-alpha.3",
4
4
  "description": "The official JavaScript + TypeScript client library for Prismic",
5
5
  "keywords": [
6
6
  "typescript",
@@ -91,6 +91,11 @@ export interface Language {
91
91
  * The name of the language.
92
92
  */
93
93
  name: string
94
+
95
+ /**
96
+ * Whether or not the language is the default language of the repository.
97
+ */
98
+ is_master: boolean
94
99
  }
95
100
 
96
101
  /**
@@ -1,6 +1,5 @@
1
1
  import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
- import type { CustomTypeModelKeyTextField } from "./keyText"
4
3
  import type { CustomTypeModelLinkSelectType } from "./link"
5
4
 
6
5
  /**
@@ -19,6 +18,5 @@ export interface CustomTypeModelContentRelationshipField<
19
18
  select: typeof CustomTypeModelLinkSelectType.Document
20
19
  customtypes?: readonly CustomTypeIDs[]
21
20
  tags?: readonly Tags[]
22
- text?: CustomTypeModelKeyTextField
23
21
  }
24
22
  }
@@ -1,7 +1,5 @@
1
1
  import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
- import type { CustomTypeModelKeyTextField } from "./keyText"
4
-
5
3
  /**
6
4
  * A link custom type field.
7
5
  *
@@ -15,7 +13,7 @@ export interface CustomTypeModelLinkField {
15
13
  select?:
16
14
  | null
17
15
  | (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType]
18
- text?: CustomTypeModelKeyTextField
16
+ allowText?: boolean
19
17
  allowTargetBlank?: boolean
20
18
  }
21
19
  }
@@ -1,6 +1,5 @@
1
1
  import type { CustomTypeModelFieldType } from "./types"
2
2
 
3
- import type { CustomTypeModelKeyTextField } from "./keyText"
4
3
  import type { CustomTypeModelLinkSelectType } from "./link"
5
4
 
6
5
  /**
@@ -14,6 +13,6 @@ export interface CustomTypeModelLinkToMediaField {
14
13
  label?: string | null
15
14
  placeholder?: string
16
15
  select: typeof CustomTypeModelLinkSelectType.Media
17
- text?: CustomTypeModelKeyTextField
16
+ allowText?: boolean
18
17
  }
19
18
  }
@@ -1,7 +1,6 @@
1
1
  import type { AnyRegularField, FieldState } from "./types"
2
2
 
3
3
  import type { GroupField } from "./group"
4
- import type { KeyTextField } from "./keyText"
5
4
  import type { EmptyLinkField, LinkType } from "./link"
6
5
  import type { SliceZone } from "./sliceZone"
7
6
 
@@ -45,5 +44,5 @@ export interface FilledContentRelationshipField<
45
44
  slug?: string
46
45
  isBroken?: boolean
47
46
  data?: DataInterface
48
- text?: KeyTextField
47
+ text?: string
49
48
  }
@@ -2,7 +2,6 @@ import type { AnyRegularField, FieldState } from "./types"
2
2
 
3
3
  import type { ContentRelationshipField } from "./contentRelationship"
4
4
  import type { GroupField } from "./group"
5
- import type { KeyTextField } from "./keyText"
6
5
  import type { LinkToMediaField } from "./linkToMedia"
7
6
  import type { SliceZone } from "./sliceZone"
8
7
 
@@ -25,6 +24,7 @@ export type EmptyLinkField<
25
24
  Type extends (typeof LinkType)[keyof typeof LinkType] = typeof LinkType.Any,
26
25
  > = {
27
26
  link_type: Type | string
27
+ text?: string
28
28
  }
29
29
 
30
30
  /**
@@ -34,7 +34,7 @@ export interface FilledLinkToWebField {
34
34
  link_type: typeof LinkType.Web
35
35
  url: string
36
36
  target?: string
37
- text?: KeyTextField
37
+ text?: string
38
38
  }
39
39
 
40
40
  /**
@@ -1,6 +1,5 @@
1
1
  import type { FieldState } from "./types"
2
2
 
3
- import type { KeyTextField } from "./keyText"
4
3
  import type { EmptyLinkField, LinkType } from "./link"
5
4
 
6
5
  /**
@@ -25,5 +24,5 @@ export interface FilledLinkToMediaField {
25
24
  size: string
26
25
  height?: string | null
27
26
  width?: string | null
28
- text?: KeyTextField
27
+ text?: string
29
28
  }