@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.
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/types/api/repository.d.ts +4 -0
- package/dist/types/model/contentRelationship.d.ts +0 -2
- package/dist/types/model/link.cjs.map +1 -1
- package/dist/types/model/link.d.ts +1 -2
- package/dist/types/model/link.js.map +1 -1
- package/dist/types/model/linkToMedia.d.ts +1 -2
- package/dist/types/value/contentRelationship.d.ts +1 -2
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.d.ts +2 -2
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/linkToMedia.d.ts +1 -2
- package/package.json +1 -1
- package/src/types/api/repository.ts +5 -0
- package/src/types/model/contentRelationship.ts +0 -2
- package/src/types/model/link.ts +1 -3
- package/src/types/model/linkToMedia.ts +1 -2
- package/src/types/value/contentRelationship.ts +1 -2
- package/src/types/value/link.ts +2 -2
- package/src/types/value/linkToMedia.ts +1 -2
package/dist/package.json.cjs
CHANGED
package/dist/package.json.js
CHANGED
|
@@ -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\
|
|
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
|
-
|
|
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\
|
|
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
|
-
|
|
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?:
|
|
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 {
|
|
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?:
|
|
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 {
|
|
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?:
|
|
21
|
+
text?: string;
|
|
23
22
|
}
|
package/package.json
CHANGED
|
@@ -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
|
}
|
package/src/types/model/link.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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?:
|
|
47
|
+
text?: string
|
|
49
48
|
}
|
package/src/types/value/link.ts
CHANGED
|
@@ -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?:
|
|
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?:
|
|
27
|
+
text?: string
|
|
29
28
|
}
|