@prismicio/client 7.12.0-alpha.0 → 7.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Client.cjs +47 -7
- package/dist/Client.cjs.map +1 -1
- package/dist/Client.d.ts +20 -2
- package/dist/Client.js +47 -7
- package/dist/Client.js.map +1 -1
- package/dist/helpers/asLink.cjs +7 -9
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.js +7 -9
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/isFilled.cjs +0 -3
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.d.ts +1 -2
- package/dist/helpers/isFilled.js +0 -3
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.cjs +1 -6
- package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.js +1 -6
- package/dist/lib/resolveMigrationDocumentData.js.map +1 -1
- package/dist/lib/serializerHelpers.cjs +3 -0
- package/dist/lib/serializerHelpers.cjs.map +1 -1
- package/dist/lib/serializerHelpers.js +3 -0
- package/dist/lib/serializerHelpers.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/types/migration/Asset.cjs.map +1 -1
- package/dist/types/migration/Asset.d.ts +3 -3
- package/dist/types/migration/Asset.js.map +1 -1
- package/dist/types/model/contentRelationship.d.ts +0 -1
- package/dist/types/model/link.cjs.map +1 -1
- package/dist/types/model/link.d.ts +0 -1
- package/dist/types/model/link.js.map +1 -1
- package/dist/types/model/linkToMedia.d.ts +0 -1
- package/dist/types/value/contentRelationship.d.ts +1 -24
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.d.ts +3 -26
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/linkToMedia.d.ts +1 -13
- package/package.json +9 -9
- package/src/Client.ts +74 -7
- package/src/helpers/asLink.ts +8 -11
- package/src/helpers/isFilled.ts +1 -6
- package/src/index.ts +0 -1
- package/src/lib/resolveMigrationDocumentData.ts +3 -10
- package/src/lib/serializerHelpers.ts +5 -0
- package/src/types/migration/Asset.ts +4 -7
- package/src/types/model/contentRelationship.ts +0 -1
- package/src/types/model/link.ts +0 -1
- package/src/types/model/linkToMedia.ts +0 -1
- package/src/types/value/contentRelationship.ts +2 -45
- package/src/types/value/link.ts +6 -49
- package/src/types/value/linkToMedia.ts +2 -21
|
@@ -3,34 +3,15 @@ import type { FieldState } from "./types"
|
|
|
3
3
|
import type { EmptyLinkField, LinkType } from "./link"
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* A
|
|
6
|
+
* A link field that points to media.
|
|
7
7
|
*
|
|
8
8
|
* @typeParam State - State of the field which determines its shape.
|
|
9
9
|
*/
|
|
10
|
-
export type
|
|
10
|
+
export type LinkToMediaField<State extends FieldState = FieldState> =
|
|
11
11
|
State extends "empty"
|
|
12
12
|
? EmptyLinkField<typeof LinkType.Media>
|
|
13
13
|
: FilledLinkToMediaField
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* Repeatable link field values that point to media.
|
|
17
|
-
*
|
|
18
|
-
* @typeParam State - State of the field which determines its shape.
|
|
19
|
-
*/
|
|
20
|
-
export type RepeatableLinkToMediaField<State extends FieldState = FieldState> =
|
|
21
|
-
State extends "empty"
|
|
22
|
-
? []
|
|
23
|
-
: [SingleLinkToMediaField, ...SingleLinkToMediaField[]]
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* A link field that points to media.
|
|
27
|
-
*
|
|
28
|
-
* @typeParam State - State of the field which determines its shape.
|
|
29
|
-
*/
|
|
30
|
-
export type LinkToMediaField<State extends FieldState = FieldState> =
|
|
31
|
-
| SingleLinkToMediaField<State>
|
|
32
|
-
| RepeatableLinkToMediaField<State>
|
|
33
|
-
|
|
34
15
|
/**
|
|
35
16
|
* A link that points to media.
|
|
36
17
|
*/
|