@tryghost/metafield-types 0.2.0 → 0.4.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/CHANGELOG.md +66 -0
- package/README.md +26 -20
- package/build/index.d.ts +313 -63
- package/build/index.d.ts.map +1 -1
- package/build/index.js +325 -100
- package/build/index.js.map +1 -1
- package/build/shapes.d.ts +185 -0
- package/build/shapes.d.ts.map +1 -0
- package/build/shapes.js +262 -0
- package/build/shapes.js.map +1 -0
- package/build/structure.d.ts +283 -59
- package/build/structure.d.ts.map +1 -1
- package/build/structure.js +179 -59
- package/build/structure.js.map +1 -1
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# @tryghost/metafield-types
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Changed how a write clears a value, and described each field shape's rules once, in the package.
|
|
8
|
+
|
|
9
|
+
- `null` is the only way a write clears. A write of `''` to a text field, `[]` to a list, or `''` to a part of an address is refused by `valueSchemaFor` with a message saying to send `null`. A part of an address named as `null` is cleared; before, `null` for a part was refused.
|
|
10
|
+
- A value never holds nothing: a field holding nothing has no value, rather than an empty one. `ValueOf<T>` and `FieldValue` no longer admit `null` or `''` parts, and a write has its own type, `WriteOf<T>` and `FieldWrite`, which does.
|
|
11
|
+
- `./shapes` is a new entry point, zod-free like `./structure`. `SHAPES` holds each shape's rules (`parse`, `same`, `apply`, `diff`), `LEAVES` each kind of leaf's (its JSON kind, `read`, `fromText`), and `FIELD_READING` how a field reads a held value (`held`, `editable`). `shaped(field)` and `shapedType(type)` pair a field or type with its shape, so a table keyed by shape can be indexed with it without a cast. `heldValue`, `editableValue`, `valueFromText`, `textOfValue`, `heldTextOf`, `formTextOf`, `formShows` and `formWrite` read a held value and work out the write a form makes.
|
|
12
|
+
- `accept(shaped(field), raw)` checks a write against the field's strict rule and returns an `Accepted` value branded with its shape, so code that stores a value can require one that passed the rule.
|
|
13
|
+
- `keysOf(value)` lists an object's keys typed as its type's keys. `LeafValues`, `LeafValue`, `LeafKind` and `WriteOf` are exported from `./structure`.
|
|
14
|
+
|
|
15
|
+
- Changed a repeated list option to be refused on the option that repeats an earlier one, and options to repeat each other whatever their case.
|
|
16
|
+
|
|
17
|
+
- `SetSettingsSchema` refuses a repeat at `options.<index>` of the later option, with "This option already exists.". It used to refuse the list at `options` with "Give each option once.".
|
|
18
|
+
- Two options are the same option when their text matches without regard to case, so a list can't offer both "Podcasts" and "podcasts". It used to compare text exactly.
|
|
19
|
+
- `optionKey(option)` is exported from `./structure`: the text two options are compared by, so a client that tidies a list skips the same repeats the schema refuses.
|
|
20
|
+
|
|
21
|
+
## 0.3.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- Changed the catalog to describe each field type as a composition of building blocks, and to derive each type's rule from them.
|
|
26
|
+
|
|
27
|
+
- `FIELD_STRUCTURES` replaces `FIELD_PARTS`. A type is one leaf, `{ shape: 'scalar', leaf }`, or a record of named leaves, `{ shape: 'record', parts }`.
|
|
28
|
+
- A leaf is text of a size, `text(size)` with `TEXT_SIZES`, or a choice from a list, `choice(from)` with `LIST_SOURCES`. `country` is the choice from the list of countries.
|
|
29
|
+
- A part's type is now its leaf, so `PART_TYPE_IDS`, `PartType` and `partTypesOf` are removed. An address's postal code is `text('code')`, its country is `country`, and its other parts are `text('line')`.
|
|
30
|
+
- `FIELD_KINDS` and `FieldKind` are removed. A scalar's leaf says what it holds.
|
|
31
|
+
- `matchShape(type, { scalar, record })` and `matchLeaf(leaf, { text, choice })` call the handler for a type's shape or a leaf's kind, so a caller has to say what it does with every one. `matchShape` throws for a type the package doesn't know, so check a type from the wire with `isFieldType` first.
|
|
32
|
+
- `isRecordValue` tells whether a value is laid out as a record of parts.
|
|
33
|
+
- `StructureOf`, `ShapeOf`, `FieldTypeOfShape` and `PartsOf` name what a type is composed of, and `ValueOf` names the value it holds.
|
|
34
|
+
- `partsOf` names a record's parts as plain strings. Read one type's parts by name from `FIELD_STRUCTURES[type].parts`, whose keys are typed.
|
|
35
|
+
- `valueSchemaFor(field)` is the rule a value of one field must satisfy, derived from its type's composition. It replaces `FIELD_TYPES`, `FieldTypeDefinition`, `PART_TYPES` and `AddressValue`, which are removed. `FieldValue` and `Address` stay.
|
|
36
|
+
|
|
37
|
+
- Added helpers for editing a list field's answers.
|
|
38
|
+
|
|
39
|
+
- `inOptionOrder(settings, held)` is the answers among `held` that a list offers, in its order, and `editableAnswers(settings, held)` is what a form editing a list's answers starts from: none while a field taking one holds several.
|
|
40
|
+
|
|
41
|
+
- Added the list field type, whose field offers options of its own and takes one or several of them.
|
|
42
|
+
|
|
43
|
+
- `list` is `{ shape: 'set' }`: a value is the text of each option picked, as `string[]`, even when the field takes one. `matchShape` handlers take a `set` branch.
|
|
44
|
+
- A field now carries `settings` beside its `type`. `SettingsOf<T>` is what a type is set up with: `SetSettings` (`options`, in the order shown, and `multiple`) for a list, and nothing for every other type, so a field of another type has no settings. `TypedSettings` pairs a type with its settings. `withTypedSettings(base, settings)` builds what a field holds beside its type with that pair, a variant per shape, from how each shape's settings are held: `WRITTEN_SETTINGS` checks them against the rules, and `READ_SETTINGS` reads them back by `SetSettingsShape` alone, so a rule tightened later never hides a field set up under the old one. `TypedSettingsInputSchema` and `TypedSettingsSchema` are the pair on its own, and `MetafieldDefinitionSchema` is built the same way. `typesOfShape(shape)` lists the types of a shape.
|
|
45
|
+
- `MetafieldDefinitionSchema` reads `settings`, and `MetafieldDefinition` is typed by them, so a list definition always has its options.
|
|
46
|
+
- `valueSchemaFor(field)` takes the field's type and settings. A list's rule accepts only the options its field offers, and at most one when it takes one.
|
|
47
|
+
- `matchField(field, handlers)` calls a handler for the field's shape with the field narrowed, settings included.
|
|
48
|
+
- `optionText` is how an option's text is matched: trimmed, with accents encoded one way. `MIN_OPTIONS`, `MAX_OPTIONS` and `OPTION_SEPARATOR` are a list's limits and the character joining options in one CSV cell, which no option may contain.
|
|
49
|
+
|
|
50
|
+
- Added `SHAPE_SETTINGS`, each field shape's settings in one place: the shape a read is checked against, the rules a write is checked against on top of that shape, and the defaults a field starts with. `WRITTEN_SETTINGS` and `READ_SETTINGS` are now taken from it, and `SetSettingsSchema` is now built on `SetSettingsShape`.
|
|
51
|
+
|
|
52
|
+
- Added `refusedProperty(path)`, which names where a refusal points within what was sent by its path, with parts and positions joined by dots, such as `settings.options.2` for a field's third option. Ghost reports a custom field refusal's `property` this way, and a form can file the problems it finds under the same keys.
|
|
53
|
+
|
|
54
|
+
- Added the shape of a field definition as the Admin and Members APIs return it.
|
|
55
|
+
|
|
56
|
+
- `MetafieldDefinitionSchema` reads a definition (namespace, key, name, type, status, member access and dates) and `MetafieldDefinition` is the type it produces. Ghost writes every definition through it.
|
|
57
|
+
- `FIELD_STATUSES`, `FieldStatusSchema`, `FIELD_STATUS` and `FieldStatus` name whether a field is active or archived.
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- Pointed the README at a guide for Ghost contributors adding a field type.
|
|
62
|
+
|
|
63
|
+
- Updated dependencies
|
|
64
|
+
|
|
65
|
+
- Updated dependencies
|
|
66
|
+
|
|
67
|
+
- Updated dependencies
|
|
68
|
+
|
|
3
69
|
## 0.2.0
|
|
4
70
|
|
|
5
71
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @tryghost/metafield-types
|
|
2
2
|
|
|
3
|
-
The types of member custom field Ghost supports: which types exist,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
The types of member custom field Ghost supports: which types exist, what each type
|
|
4
|
+
is composed of, and how a value of each type is validated. Ghost, its Admin and Portal
|
|
5
|
+
use it, and so can an integration that offers inputs for a site's custom fields, such
|
|
6
|
+
as the Ghost Zapier integration.
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
9
|
npm install @tryghost/metafield-types
|
|
@@ -11,31 +11,37 @@ npm install @tryghost/metafield-types
|
|
|
11
11
|
|
|
12
12
|
## Entry points
|
|
13
13
|
|
|
14
|
-
- `@tryghost/metafield-types/structure`: the type ids
|
|
15
|
-
type of
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
- `@tryghost/metafield-types/structure`: the type ids and what each type is composed
|
|
15
|
+
of. A type is one leaf, a record of named leaves, or a set of options its field
|
|
16
|
+
offers, and a leaf is text of a size or a choice from a list, such as a country. A
|
|
17
|
+
field of a set type is set up with its options, which a field carries as its
|
|
18
|
+
`settings`. It depends on nothing.
|
|
19
|
+
- `@tryghost/metafield-types/countries`: the two-letter country codes the list of
|
|
20
|
+
countries offers. It depends on nothing.
|
|
18
21
|
- `@tryghost/metafield-types/identity`: how a field is named everywhere: its
|
|
19
22
|
namespace, its key, the parts of a record value, and the identity they make
|
|
20
23
|
together (`custom.shipping_address.country`). Each is a type that only its
|
|
21
24
|
check produces. It loads `zod/mini`, a small fraction of zod's size, so a
|
|
22
25
|
browser app can check identities without paying for the rest.
|
|
23
|
-
- `@tryghost/metafield-types`: the structure above, plus
|
|
24
|
-
a value of
|
|
25
|
-
entry point loads all of it, so an
|
|
26
|
-
`./structure` and `./countries`
|
|
26
|
+
- `@tryghost/metafield-types`: the structure above, plus `valueSchemaFor(field)`,
|
|
27
|
+
the rule a value of a field must satisfy given its type and settings. The rules are built on
|
|
28
|
+
[zod](https://zod.dev), and only this entry point loads all of it, so an
|
|
29
|
+
integration that only draws inputs can use `./structure` and `./countries`
|
|
30
|
+
without loading zod at all.
|
|
27
31
|
|
|
28
32
|
## Compatibility
|
|
29
33
|
|
|
30
34
|
An integration using this package talks to sites on many Ghost versions, so a type
|
|
31
|
-
never changes once it has shipped
|
|
32
|
-
|
|
33
|
-
doesn't recognise, which is what happens when a site is on a newer
|
|
34
|
-
package the integration was built with.
|
|
35
|
+
never changes once it has shipped. It keeps what it is composed of: its shape, its
|
|
36
|
+
leaves, and the names of any parts. New structure arrives as a new type. An integration
|
|
37
|
+
should skip a type it doesn't recognise, which is what happens when a site is on a newer
|
|
38
|
+
Ghost than the package the integration was built with.
|
|
35
39
|
|
|
36
40
|
## Develop
|
|
37
41
|
|
|
38
|
-
This is a workspace package in the Ghost monorepo.
|
|
42
|
+
This is a workspace package in the Ghost monorepo. Adding a field type to Ghost is
|
|
43
|
+
covered in [`docs/adding-a-field-type.md`](docs/adding-a-field-type.md). From the repo
|
|
44
|
+
root:
|
|
39
45
|
|
|
40
46
|
```bash
|
|
41
47
|
pnpm --filter @tryghost/metafield-types build # compile to build/ with tsc (ESM)
|
|
@@ -52,9 +58,9 @@ imports in `src/` must carry an explicit extension; write the real `.ts` one —
|
|
|
52
58
|
`import {x} from './x.ts'` — and `tsc` rewrites it to `.js` on emit
|
|
53
59
|
(`rewriteRelativeImportExtensions`).
|
|
54
60
|
|
|
55
|
-
`./structure` is the half of the catalog a renderer needs
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
`./structure` is the half of the catalog a renderer needs, what each field type is
|
|
62
|
+
composed of, and it stands apart from `./index` so that importing it costs a bundle
|
|
63
|
+
almost nothing. The rules in `./index` are built on zod, some
|
|
58
64
|
seventeen kilobytes gzipped that a renderer never runs. Portal imports `./structure`
|
|
59
65
|
and loads on every page view of every themed site, so the difference reaches every
|
|
60
66
|
visitor of every Ghost site.
|
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type FieldType } from './structure.js';
|
|
3
|
-
|
|
2
|
+
import { type FieldType, type FieldShape, type TypedSettings, type ValueOf, type WriteOf } from './structure.js';
|
|
3
|
+
import { type ShapeWrite, type ShapedField } from './shapes.js';
|
|
4
|
+
export { FIELD_READING, LEAVES, SHAPES, editableValue, formShows, formTextOf, heldTextOf, formWrite, heldValue, leafFromText, shaped, shapedType, textOfValue, valueFromText, type AnyLeafValue, type FieldReading, type ShapeRules, type ShapeText, type ShapeValue, type ShapeWrite, type ShapedField, type ShapedType, type ValueKind, type ValueOfKind, } from './shapes.js';
|
|
5
|
+
export { FIELD_STRUCTURES, FIELD_TYPE_IDS, LIST_SOURCES, MAX_OPTIONS, MIN_OPTIONS, OPTION_SEPARATOR, TEXT_SIZES, choice, country, editableAnswers, inOptionOrder, isFieldType, isRecordValue, matchField, matchLeaf, matchShape, partsOf, text, type ChoiceLeaf, type FieldHandlers, type FieldOfShape, type FieldShape, type FieldStructure, type FieldType, type FieldTypeOfShape, type Leaf, type LeafHandlers, type LeafKind, type LeafValue, type LeafValues, type ListSource, type PartsOf, type RecordStructure, type ScalarStructure, type SetSettings, type SetStructure, type SettingsOf, type ShapeHandlers, type ShapeOf, type StructureOf, type TextLeaf, type TextSize, type TypedSettings, type ValueOf, type WriteOf, keysOf, } from './structure.js';
|
|
4
6
|
/**
|
|
5
7
|
* The shared catalog of member metafield types.
|
|
6
8
|
*
|
|
@@ -10,17 +12,18 @@ export { FIELD_KINDS, FIELD_PARTS, FIELD_TYPE_IDS, PART_TYPE_IDS, partTypesOf, p
|
|
|
10
12
|
* last statement lives here and nowhere else, so that Ghost core, which enforces it, and
|
|
11
13
|
* admin, which gives instant feedback against it, cannot disagree about what is valid.
|
|
12
14
|
*
|
|
13
|
-
* A type is
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* part being a record itself.
|
|
15
|
+
* A type is composed of leaves, each one value with its own rule. Most types are a single
|
|
16
|
+
* leaf. An address is a *record*: a set of named parts, each a leaf, from which the whole
|
|
17
|
+
* type's rule is derived. A part is always a leaf, never a record itself.
|
|
17
18
|
*
|
|
18
19
|
* ## What a write may say
|
|
19
20
|
*
|
|
20
|
-
* A value is
|
|
21
|
-
* name it does not mention is left as it was, and a name given
|
|
22
|
-
* cleared. That is why every part accepts
|
|
23
|
-
* a statement about the write, not about the part.
|
|
21
|
+
* A value is a leaf's value, and so is every part of one. A write names what it means to
|
|
22
|
+
* change: a name it does not mention is left as it was, and a name given `null` is being
|
|
23
|
+
* cleared, whatever kind of leaf it holds. That is why every part accepts `null` regardless of
|
|
24
|
+
* its own rule: clearing is a statement about the write, not about the part. A value is never
|
|
25
|
+
* empty, so text of nothing but spaces, or a list picking nothing, is refused rather than being
|
|
26
|
+
* a second way of holding nothing.
|
|
24
27
|
*
|
|
25
28
|
* A name nobody recognizes is an error rather than a silent drop, at both depths. A
|
|
26
29
|
* misspelled field key is refused by the values service, which alone knows which fields a
|
|
@@ -51,12 +54,13 @@ export { FIELD_KINDS, FIELD_PARTS, FIELD_TYPE_IDS, PART_TYPE_IDS, partTypesOf, p
|
|
|
51
54
|
* answer and a disagreement between them is a file that silently stops round-tripping.
|
|
52
55
|
*
|
|
53
56
|
* The line is whether more than one renderer must agree on a string, not presentation
|
|
54
|
-
* against validity — the sentences above are presentation. Admin
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
+
* against validity — the sentences above are presentation. Admin and Portal each label a
|
|
58
|
+
* record's parts in their own words, and each is held against the catalog by a type, so a
|
|
59
|
+
* part added there fails to compile in both until it has a label.
|
|
57
60
|
*/
|
|
58
61
|
export declare const FieldTypeSchema: z.ZodEnum<{
|
|
59
62
|
address: "address";
|
|
63
|
+
list: "list";
|
|
60
64
|
long_text: "long_text";
|
|
61
65
|
short_text: "short_text";
|
|
62
66
|
}>;
|
|
@@ -81,6 +85,268 @@ export declare const MEMBER_ACCESS: {
|
|
|
81
85
|
readonly read: 'read';
|
|
82
86
|
readonly write: 'write';
|
|
83
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* Whether a field is in use. An archived field keeps its definition and the values members
|
|
90
|
+
* hold for it, so it can be restored, but it takes no new values and members no longer see it.
|
|
91
|
+
*/
|
|
92
|
+
export declare const FIELD_STATUSES: readonly ['active', 'archived'];
|
|
93
|
+
export type FieldStatus = (typeof FIELD_STATUSES)[number];
|
|
94
|
+
export declare const FieldStatusSchema: z.ZodEnum<{
|
|
95
|
+
active: "active";
|
|
96
|
+
archived: "archived";
|
|
97
|
+
}>;
|
|
98
|
+
export declare const FIELD_STATUS: {
|
|
99
|
+
readonly active: 'active';
|
|
100
|
+
readonly archived: 'archived';
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* A set field's settings as stored or sent back: their shape alone, which every read checks. A
|
|
104
|
+
* write checks the rules `SetSettingsSchema` layers on top, so a rule tightened later never hides
|
|
105
|
+
* a field set up under the old one, the way a value's rule never hides what a member already holds.
|
|
106
|
+
*/
|
|
107
|
+
export declare const SetSettingsShape: z.ZodObject<{
|
|
108
|
+
options: z.ZodArray<z.ZodString>;
|
|
109
|
+
multiple: z.ZodBoolean;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
/**
|
|
112
|
+
* What a set field is set up with: its shape, with each option's text tidied and the rules a write
|
|
113
|
+
* must meet on top. Options are a set as well, so the same option, compared by `optionKey`, can't
|
|
114
|
+
* be offered twice: the option that repeats an earlier one is refused, so a form shows the problem
|
|
115
|
+
* beside the option to change. They are listed in the order they are shown.
|
|
116
|
+
*/
|
|
117
|
+
export declare const SetSettingsSchema: z.ZodPipe<z.ZodObject<{
|
|
118
|
+
options: z.ZodArray<z.ZodString>;
|
|
119
|
+
multiple: z.ZodBoolean;
|
|
120
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
121
|
+
options: string[];
|
|
122
|
+
multiple: boolean;
|
|
123
|
+
}, {
|
|
124
|
+
options: string[];
|
|
125
|
+
multiple: boolean;
|
|
126
|
+
}>>;
|
|
127
|
+
/**
|
|
128
|
+
* What a field holds beside its type, `base`, with its type and the settings that type's shape
|
|
129
|
+
* takes, held as `settings` says for each shape: a set's options, and nothing for any other shape.
|
|
130
|
+
* One variant per shape, so a field's settings are always read against its type. Writes give the
|
|
131
|
+
* rules, reads the shape alone, and Ghost's table its column.
|
|
132
|
+
*/
|
|
133
|
+
export declare const withTypedSettings: <Base extends z.ZodRawShape, ForScalar extends z.ZodType, ForRecord extends z.ZodType, ForSet extends z.ZodType>(base: Base, settings: {
|
|
134
|
+
scalar: ForScalar;
|
|
135
|
+
record: ForRecord;
|
|
136
|
+
set: ForSet;
|
|
137
|
+
} & { [S in FieldShape]: z.ZodType; }) => z.ZodDiscriminatedUnion<[z.ZodObject<Base & {
|
|
138
|
+
type: z.ZodEnum<{
|
|
139
|
+
long_text: "long_text";
|
|
140
|
+
short_text: "short_text";
|
|
141
|
+
}>;
|
|
142
|
+
settings: ForScalar & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
143
|
+
} extends infer T ? { -readonly [P in keyof T]: T[P]; } : never, z.core.$strip>, z.ZodObject<Base & {
|
|
144
|
+
type: z.ZodEnum<{
|
|
145
|
+
address: "address";
|
|
146
|
+
}>;
|
|
147
|
+
settings: ForRecord & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
148
|
+
} extends infer T_1 ? { -readonly [P in keyof T_1]: T_1[P]; } : never, z.core.$strip>, z.ZodObject<Base & {
|
|
149
|
+
type: z.ZodEnum<{
|
|
150
|
+
list: "list";
|
|
151
|
+
}>;
|
|
152
|
+
settings: ForSet & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
153
|
+
} extends infer T_2 ? { -readonly [P in keyof T_2]: T_2[P]; } : never, z.core.$strip>], "type">;
|
|
154
|
+
/**
|
|
155
|
+
* Each shape's settings in one place: a set's options and whether a member picks several, and
|
|
156
|
+
* nothing for any other shape. A list's defaults have no options, which a list's write rules
|
|
157
|
+
* refuse, so an edit of a list read with its defaults always writes the settings it is given.
|
|
158
|
+
* Keyed by shape, so a shape added to the catalog fails to compile until it has an entry.
|
|
159
|
+
*/
|
|
160
|
+
export declare const SHAPE_SETTINGS: {
|
|
161
|
+
scalar: {
|
|
162
|
+
written: z.ZodOptional<z.ZodUndefined>;
|
|
163
|
+
read: z.ZodOptional<z.ZodUndefined>;
|
|
164
|
+
defaults: undefined;
|
|
165
|
+
};
|
|
166
|
+
record: {
|
|
167
|
+
written: z.ZodOptional<z.ZodUndefined>;
|
|
168
|
+
read: z.ZodOptional<z.ZodUndefined>;
|
|
169
|
+
defaults: undefined;
|
|
170
|
+
};
|
|
171
|
+
set: {
|
|
172
|
+
written: z.ZodPipe<z.ZodObject<{
|
|
173
|
+
options: z.ZodArray<z.ZodString>;
|
|
174
|
+
multiple: z.ZodBoolean;
|
|
175
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
176
|
+
options: string[];
|
|
177
|
+
multiple: boolean;
|
|
178
|
+
}, {
|
|
179
|
+
options: string[];
|
|
180
|
+
multiple: boolean;
|
|
181
|
+
}>>;
|
|
182
|
+
read: z.ZodObject<{
|
|
183
|
+
options: z.ZodArray<z.ZodString>;
|
|
184
|
+
multiple: z.ZodBoolean;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
defaults: {
|
|
187
|
+
options: never[];
|
|
188
|
+
multiple: false;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
/** Each shape's settings as a write states them, checked against the rules. */
|
|
193
|
+
export declare const WRITTEN_SETTINGS: {
|
|
194
|
+
scalar: z.ZodOptional<z.ZodUndefined>;
|
|
195
|
+
record: z.ZodOptional<z.ZodUndefined>;
|
|
196
|
+
set: z.ZodPipe<z.ZodObject<{
|
|
197
|
+
options: z.ZodArray<z.ZodString>;
|
|
198
|
+
multiple: z.ZodBoolean;
|
|
199
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
200
|
+
options: string[];
|
|
201
|
+
multiple: boolean;
|
|
202
|
+
}, {
|
|
203
|
+
options: string[];
|
|
204
|
+
multiple: boolean;
|
|
205
|
+
}>>;
|
|
206
|
+
};
|
|
207
|
+
/** Each shape's settings as they are read back, checked for their shape alone. */
|
|
208
|
+
export declare const READ_SETTINGS: {
|
|
209
|
+
scalar: z.ZodOptional<z.ZodUndefined>;
|
|
210
|
+
record: z.ZodOptional<z.ZodUndefined>;
|
|
211
|
+
set: z.ZodObject<{
|
|
212
|
+
options: z.ZodArray<z.ZodString>;
|
|
213
|
+
multiple: z.ZodBoolean;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Where a refusal points within what was sent: the path to the refused value, with its parts and
|
|
218
|
+
* positions joined by dots, such as `settings.options.2` for a field's third option. Ghost names
|
|
219
|
+
* a refusal's `property` this way, and a form files the problems it finds under the same keys, so
|
|
220
|
+
* each lands beside the input that set the value.
|
|
221
|
+
*/
|
|
222
|
+
export declare function refusedProperty(path: readonly PropertyKey[]): string;
|
|
223
|
+
/**
|
|
224
|
+
* A field's type and settings as a write states them, checked together and against the rules:
|
|
225
|
+
* the settings must be what that type is set up with, so a list carries its options and
|
|
226
|
+
* nothing else carries any.
|
|
227
|
+
*/
|
|
228
|
+
export declare const TypedSettingsInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
229
|
+
type: z.ZodEnum<{
|
|
230
|
+
long_text: "long_text";
|
|
231
|
+
short_text: "short_text";
|
|
232
|
+
}>;
|
|
233
|
+
settings: z.ZodOptional<z.ZodUndefined> & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
235
|
+
type: z.ZodEnum<{
|
|
236
|
+
address: "address";
|
|
237
|
+
}>;
|
|
238
|
+
settings: z.ZodOptional<z.ZodUndefined> & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
239
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
240
|
+
type: z.ZodEnum<{
|
|
241
|
+
list: "list";
|
|
242
|
+
}>;
|
|
243
|
+
settings: z.ZodPipe<z.ZodObject<{
|
|
244
|
+
options: z.ZodArray<z.ZodString>;
|
|
245
|
+
multiple: z.ZodBoolean;
|
|
246
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
247
|
+
options: string[];
|
|
248
|
+
multiple: boolean;
|
|
249
|
+
}, {
|
|
250
|
+
options: string[];
|
|
251
|
+
multiple: boolean;
|
|
252
|
+
}>> & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
253
|
+
}, z.core.$strip>], "type">;
|
|
254
|
+
/** A field's type and settings as they are read back: paired, but checked for their shape alone. */
|
|
255
|
+
export declare const TypedSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
256
|
+
type: z.ZodEnum<{
|
|
257
|
+
long_text: "long_text";
|
|
258
|
+
short_text: "short_text";
|
|
259
|
+
}>;
|
|
260
|
+
settings: z.ZodOptional<z.ZodUndefined> & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
261
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
262
|
+
type: z.ZodEnum<{
|
|
263
|
+
address: "address";
|
|
264
|
+
}>;
|
|
265
|
+
settings: z.ZodOptional<z.ZodUndefined> & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
+
type: z.ZodEnum<{
|
|
268
|
+
list: "list";
|
|
269
|
+
}>;
|
|
270
|
+
settings: z.ZodObject<{
|
|
271
|
+
options: z.ZodArray<z.ZodString>;
|
|
272
|
+
multiple: z.ZodBoolean;
|
|
273
|
+
}, z.core.$strip> & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
274
|
+
}, z.core.$strip>], "type">;
|
|
275
|
+
/**
|
|
276
|
+
* A field definition as the Admin and Members APIs return it. Ghost writes every definition through
|
|
277
|
+
* this and Admin reads every one through it, so both ends are checked against one shape. Portal
|
|
278
|
+
* uses the type without the check, because zod would add to every page view on every site. Dates
|
|
279
|
+
* are ISO strings, as JSON carries them.
|
|
280
|
+
*/
|
|
281
|
+
export declare const MetafieldDefinitionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
282
|
+
type: z.ZodEnum<{
|
|
283
|
+
long_text: "long_text";
|
|
284
|
+
short_text: "short_text";
|
|
285
|
+
}>;
|
|
286
|
+
settings: z.ZodOptional<z.ZodUndefined> & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
287
|
+
namespace: z.core.$ZodBranded<import("zod/mini").ZodMiniString<string>, "Namespace", "out">;
|
|
288
|
+
key: z.core.$ZodBranded<import("zod/mini").ZodMiniString<string>, "Key", "out">;
|
|
289
|
+
name: z.ZodString;
|
|
290
|
+
status: z.ZodEnum<{
|
|
291
|
+
active: "active";
|
|
292
|
+
archived: "archived";
|
|
293
|
+
}>;
|
|
294
|
+
access: z.ZodObject<{
|
|
295
|
+
member: z.ZodEnum<{
|
|
296
|
+
none: "none";
|
|
297
|
+
read: "read";
|
|
298
|
+
write: "write";
|
|
299
|
+
}>;
|
|
300
|
+
}, z.core.$strip>;
|
|
301
|
+
created_at: z.ZodISODateTime;
|
|
302
|
+
updated_at: z.ZodNullable<z.ZodISODateTime>;
|
|
303
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
304
|
+
type: z.ZodEnum<{
|
|
305
|
+
address: "address";
|
|
306
|
+
}>;
|
|
307
|
+
settings: z.ZodOptional<z.ZodUndefined> & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
308
|
+
namespace: z.core.$ZodBranded<import("zod/mini").ZodMiniString<string>, "Namespace", "out">;
|
|
309
|
+
key: z.core.$ZodBranded<import("zod/mini").ZodMiniString<string>, "Key", "out">;
|
|
310
|
+
name: z.ZodString;
|
|
311
|
+
status: z.ZodEnum<{
|
|
312
|
+
active: "active";
|
|
313
|
+
archived: "archived";
|
|
314
|
+
}>;
|
|
315
|
+
access: z.ZodObject<{
|
|
316
|
+
member: z.ZodEnum<{
|
|
317
|
+
none: "none";
|
|
318
|
+
read: "read";
|
|
319
|
+
write: "write";
|
|
320
|
+
}>;
|
|
321
|
+
}, z.core.$strip>;
|
|
322
|
+
created_at: z.ZodISODateTime;
|
|
323
|
+
updated_at: z.ZodNullable<z.ZodISODateTime>;
|
|
324
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
325
|
+
type: z.ZodEnum<{
|
|
326
|
+
list: "list";
|
|
327
|
+
}>;
|
|
328
|
+
settings: z.ZodObject<{
|
|
329
|
+
options: z.ZodArray<z.ZodString>;
|
|
330
|
+
multiple: z.ZodBoolean;
|
|
331
|
+
}, z.core.$strip> & z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
332
|
+
namespace: z.core.$ZodBranded<import("zod/mini").ZodMiniString<string>, "Namespace", "out">;
|
|
333
|
+
key: z.core.$ZodBranded<import("zod/mini").ZodMiniString<string>, "Key", "out">;
|
|
334
|
+
name: z.ZodString;
|
|
335
|
+
status: z.ZodEnum<{
|
|
336
|
+
active: "active";
|
|
337
|
+
archived: "archived";
|
|
338
|
+
}>;
|
|
339
|
+
access: z.ZodObject<{
|
|
340
|
+
member: z.ZodEnum<{
|
|
341
|
+
none: "none";
|
|
342
|
+
read: "read";
|
|
343
|
+
write: "write";
|
|
344
|
+
}>;
|
|
345
|
+
}, z.core.$strip>;
|
|
346
|
+
created_at: z.ZodISODateTime;
|
|
347
|
+
updated_at: z.ZodNullable<z.ZodISODateTime>;
|
|
348
|
+
}, z.core.$strip>], "type">;
|
|
349
|
+
export type MetafieldDefinition = z.output<typeof MetafieldDefinitionSchema>;
|
|
84
350
|
/**
|
|
85
351
|
* Where a change to a member's values was made, as a member's activity feed names it.
|
|
86
352
|
* Shared so a place added on the server is one Admin has to be told how to describe.
|
|
@@ -117,59 +383,43 @@ export interface MetafieldChangeEntry<TDate = string> {
|
|
|
117
383
|
*/
|
|
118
384
|
export declare const MAX_LONG_TEXT_BYTES = 65535;
|
|
119
385
|
/**
|
|
120
|
-
*
|
|
121
|
-
* code and a postal code both store short text, but they are different things — the
|
|
122
|
-
* part's type is what a control or a filter dispatches on, the way a field's own type
|
|
123
|
-
* is for a scalar.
|
|
386
|
+
* A value of any field type, as a caller holding a field of unknown type must accept it.
|
|
124
387
|
*/
|
|
125
|
-
export
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
export
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
value:
|
|
139
|
-
};
|
|
140
|
-
long_text: {
|
|
141
|
-
kind: "text";
|
|
142
|
-
value: z.ZodString;
|
|
143
|
-
};
|
|
144
|
-
address: {
|
|
145
|
-
kind: 'record';
|
|
146
|
-
value: z.ZodObject<{
|
|
147
|
-
line1: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
148
|
-
line2: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
149
|
-
city: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
150
|
-
state: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
151
|
-
postal_code: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
152
|
-
country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
153
|
-
}, z.core.$strict>;
|
|
388
|
+
export type FieldValue = ValueOf<FieldType>;
|
|
389
|
+
/** A write to a field of any type, as a caller holding a field of unknown type must give it. */
|
|
390
|
+
export type FieldWrite = WriteOf<FieldType>;
|
|
391
|
+
export type Address = ValueOf<'address'>;
|
|
392
|
+
/**
|
|
393
|
+
* A value a field's rule accepted for writing, tidied as the rule tidies it. Only `accept` makes
|
|
394
|
+
* one, so a value that skipped the rule can't be handed to code that stores it.
|
|
395
|
+
*/
|
|
396
|
+
export type Accepted<S extends FieldShape> = ShapeWrite[S] & z.core.$brand<'accepted'>;
|
|
397
|
+
/** An accepted value with its shape, so a table keyed by shape can be indexed with it. */
|
|
398
|
+
export type AcceptedValue<S extends FieldShape = FieldShape> = {
|
|
399
|
+
[K in S]: {
|
|
400
|
+
readonly shape: K;
|
|
401
|
+
readonly value: Accepted<K>;
|
|
154
402
|
};
|
|
403
|
+
}[S];
|
|
404
|
+
export type Acceptance<S extends FieldShape = FieldShape> = {
|
|
405
|
+
readonly success: true;
|
|
406
|
+
readonly accepted: AcceptedValue<S>;
|
|
407
|
+
} | {
|
|
408
|
+
readonly success: false;
|
|
409
|
+
readonly issues: readonly z.core.$ZodIssue[];
|
|
155
410
|
};
|
|
156
|
-
/** Named for the admin types built on it, which speak of an address rather than a record. */
|
|
157
|
-
export declare const AddressValue: z.ZodObject<{
|
|
158
|
-
line1: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
159
|
-
line2: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
160
|
-
city: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
161
|
-
state: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
162
|
-
postal_code: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
163
|
-
country: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"">, z.ZodString]>>>;
|
|
164
|
-
}, z.core.$strict>;
|
|
165
|
-
export type Address = z.infer<typeof AddressValue>;
|
|
166
411
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
|
|
412
|
+
* Strict, for a write, under the field's rule today: only options the field offers now, one answer
|
|
413
|
+
* when it takes one, and each part valid under its leaf's rule. What a held value reads as is
|
|
414
|
+
* lenient instead, and is `FIELD_READING`'s to say.
|
|
415
|
+
*/
|
|
416
|
+
export declare function accept<S extends FieldShape>(of: ShapedField<TypedSettings, S>, raw: unknown): Acceptance<S>;
|
|
417
|
+
/**
|
|
418
|
+
* The rule a write to one field must satisfy, which parses to the write it accepts: a record's
|
|
419
|
+
* part named as `null` clears it. It takes the field rather than its type so that a
|
|
420
|
+
* rule depending on the field's own setup, such as the options a list field offers, changes here
|
|
421
|
+
* and nowhere else; such a rule is built from the field rather than kept per type. Throws for a
|
|
422
|
+
* type this build doesn't know.
|
|
171
423
|
*/
|
|
172
|
-
export
|
|
173
|
-
[T in FieldType]: z.infer<(typeof FIELD_TYPES)[T]['value']>;
|
|
174
|
-
}[FieldType];
|
|
424
|
+
export declare function valueSchemaFor(field: TypedSettings): z.ZodType<FieldWrite>;
|
|
175
425
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAQL,KAAK,SAAS,EAMd,KAAK,UAAU,EAKf,KAAK,aAAa,EAClB,KAAK,OAAO,EAEZ,KAAK,OAAO,EACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAU,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAExE,OAAO,EACL,aAAa,EACb,MAAM,EACN,MAAM,EACN,aAAa,EACb,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ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