@haddowg/json-api-client 1.29.0 → 1.31.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/ajv.cjs +1 -1
- package/dist/ajv.d.cts +1 -1
- package/dist/ajv.d.mts +1 -1
- package/dist/ajv.mjs +1 -1
- package/dist/index.cjs +156 -19
- package/dist/index.d.cts +91 -7
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +91 -7
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +153 -20
- package/dist/index.mjs.map +1 -1
- package/dist/{validate-B2Dtn9dI.cjs → validate-B9cyfO3p.cjs} +20 -4
- package/dist/{validate-CtXB1MGk.mjs → validate-BuPAPJMi.mjs} +16 -6
- package/dist/validate-BuPAPJMi.mjs.map +1 -0
- package/dist/{validate-DF5kzZp9.d.mts → validate-CCLqE_2J.d.cts} +257 -38
- package/dist/validate-CCLqE_2J.d.cts.map +1 -0
- package/dist/{validate-DF5kzZp9.d.cts → validate-CCLqE_2J.d.mts} +257 -38
- package/dist/validate-CCLqE_2J.d.mts.map +1 -0
- package/package.json +1 -1
- package/dist/validate-CtXB1MGk.mjs.map +0 -1
- package/dist/validate-DF5kzZp9.d.cts.map +0 -1
- package/dist/validate-DF5kzZp9.d.mts.map +0 -1
|
@@ -117,6 +117,13 @@ interface RelationDescriptor {
|
|
|
117
117
|
pivotFields?: Readonly<Record<string, string>>;
|
|
118
118
|
/** The `meta.pivot` a response renders on each member (`<Type><Rel>Pivot`). */
|
|
119
119
|
readPivot?: PivotDescriptor;
|
|
120
|
+
/**
|
|
121
|
+
* `true` when a response renders `meta.pivot` on every member of the relation's linkage, as its
|
|
122
|
+
* response identifiers require `meta` and its `pivot`. A linkage member's `$pivot` and `$edge`
|
|
123
|
+
* are then always present. Absent means a member may come without them. A request never has to
|
|
124
|
+
* send a pivot.
|
|
125
|
+
*/
|
|
126
|
+
pivotRendered?: boolean;
|
|
120
127
|
/**
|
|
121
128
|
* The `meta.pivot` a request may send on each member (`<Type><Rel>WritePivot`): a create,
|
|
122
129
|
* update or atomic body, or a relationship mutation.
|
|
@@ -133,6 +140,25 @@ interface RelationDescriptor {
|
|
|
133
140
|
* on write inputs and is left out of the read view, `fields` and the relationship reads.
|
|
134
141
|
*/
|
|
135
142
|
writeOnly?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* `true` when a create must send this relation, as the create request's
|
|
145
|
+
* `relationships.required` lists it. A create input then requires it. Absent means optional,
|
|
146
|
+
* as every relation is on an update.
|
|
147
|
+
*/
|
|
148
|
+
requiredOnCreate?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* The writes that refuse `null` for this to-one, as a required relation that is not nullable
|
|
151
|
+
* does: `create`, `update` or both. A write input in one of them takes a reference, never
|
|
152
|
+
* `null`. Absent means every write takes `null`, which clears the relation.
|
|
153
|
+
*/
|
|
154
|
+
nonNullOn?: readonly ('create' | 'update')[];
|
|
155
|
+
/**
|
|
156
|
+
* The writes that refuse an empty linkage for this to-many, as a required relation's do, or
|
|
157
|
+
* one bounded by `minItems` of 1 or more: `create`, `update` or both. A write input in one of
|
|
158
|
+
* them takes a non-empty list. A create also takes one for a relation {@link requiredOnCreate}
|
|
159
|
+
* marks. Absent means every write takes `[]`.
|
|
160
|
+
*/
|
|
161
|
+
nonEmptyOn?: readonly ('create' | 'update')[];
|
|
136
162
|
/**
|
|
137
163
|
* The relation's segment in its related and relationship paths, when it differs from the
|
|
138
164
|
* relation's name (`/articles/{id}/published-by` for `publisher`). Absent means the name.
|
|
@@ -1240,6 +1266,76 @@ declare function relatedPaginator(relation: RelationDescriptor | undefined, ctx:
|
|
|
1240
1266
|
/** The kind a relation's related read answers with when it sends no `page`. See {@link relatedPaginator}. */
|
|
1241
1267
|
declare function relatedPaginatorKind(relation: RelationDescriptor | undefined, ctx: MaterialiseContext): PaginatorKind;
|
|
1242
1268
|
//#endregion
|
|
1269
|
+
//#region src/input-validation.d.ts
|
|
1270
|
+
/**
|
|
1271
|
+
* The parts of the Standard Schema interface (standardschema.dev) the client calls. Zod, Valibot
|
|
1272
|
+
* and ArkType schemas implement it.
|
|
1273
|
+
*/
|
|
1274
|
+
interface StandardSchema<Input = unknown> {
|
|
1275
|
+
readonly '~standard': {
|
|
1276
|
+
readonly version: 1;
|
|
1277
|
+
readonly vendor: string;
|
|
1278
|
+
readonly validate: (value: unknown) => StandardSchemaResult | Promise<StandardSchemaResult>;
|
|
1279
|
+
readonly types?: {
|
|
1280
|
+
readonly input: Input;
|
|
1281
|
+
} | undefined;
|
|
1282
|
+
};
|
|
1283
|
+
}
|
|
1284
|
+
/** What a Standard Schema's `validate` returns. */
|
|
1285
|
+
type StandardSchemaResult = {
|
|
1286
|
+
readonly value: unknown;
|
|
1287
|
+
readonly issues?: undefined;
|
|
1288
|
+
} | {
|
|
1289
|
+
readonly issues: readonly StandardSchemaIssue[];
|
|
1290
|
+
};
|
|
1291
|
+
/** One problem a Standard Schema found. */
|
|
1292
|
+
interface StandardSchemaIssue {
|
|
1293
|
+
readonly message: string;
|
|
1294
|
+
readonly path?: readonly (PropertyKey | {
|
|
1295
|
+
readonly key: PropertyKey;
|
|
1296
|
+
})[] | undefined;
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* The schemas `createClient({ validateInput })` checks a write's input against before sending it,
|
|
1300
|
+
* by wire type: `{ albums: { create: albumsCreateSchema, update: albumsUpdateSchema } }`. A type or
|
|
1301
|
+
* a write with no schema is sent unchecked. `json-api-codegen --zod` generates this map.
|
|
1302
|
+
*/
|
|
1303
|
+
type InputSchemas = Readonly<Record<string, {
|
|
1304
|
+
readonly create?: StandardSchema;
|
|
1305
|
+
readonly update?: StandardSchema;
|
|
1306
|
+
}>>;
|
|
1307
|
+
/**
|
|
1308
|
+
* Thrown by a create or update whose input fails the schema `validateInput` holds for it, before
|
|
1309
|
+
* any request is sent. `fieldErrors(error)` takes it as it takes a server's 422.
|
|
1310
|
+
*/
|
|
1311
|
+
declare class InputValidationError extends Error {
|
|
1312
|
+
readonly type: string;
|
|
1313
|
+
readonly operation: 'create' | 'update';
|
|
1314
|
+
readonly issues: readonly StandardSchemaIssue[];
|
|
1315
|
+
/** The failing operation's index in an atomic batch. */
|
|
1316
|
+
readonly opIndex?: number;
|
|
1317
|
+
constructor(type: string, operation: 'create' | 'update', issues: readonly StandardSchemaIssue[], opIndex?: number);
|
|
1318
|
+
}
|
|
1319
|
+
/** One write's input, as `validateInput` checks it. */
|
|
1320
|
+
interface InputCheck {
|
|
1321
|
+
readonly type: string;
|
|
1322
|
+
readonly operation: 'create' | 'update';
|
|
1323
|
+
readonly input: unknown;
|
|
1324
|
+
readonly opIndex?: number;
|
|
1325
|
+
}
|
|
1326
|
+
/**
|
|
1327
|
+
* The {@link InputValidationError} `check`'s input fails its schema in `schemas` with, or
|
|
1328
|
+
* `undefined` when it passes or has no schema. A Promise only for a schema that validates
|
|
1329
|
+
* asynchronously.
|
|
1330
|
+
*/
|
|
1331
|
+
declare function inputFailure(schemas: InputSchemas | undefined, check: InputCheck): InputValidationError | undefined | Promise<InputValidationError | undefined>;
|
|
1332
|
+
/**
|
|
1333
|
+
* Run `write` once `check`'s input passes its schema, else reject with the
|
|
1334
|
+
* {@link InputValidationError}. A write with no schema, or a schema that validates synchronously,
|
|
1335
|
+
* starts in this tick.
|
|
1336
|
+
*/
|
|
1337
|
+
declare function withInputCheck<T>(schemas: InputSchemas | undefined, check: InputCheck, write: () => Promise<T>): Promise<T>;
|
|
1338
|
+
//#endregion
|
|
1243
1339
|
//#region src/atomic.d.ts
|
|
1244
1340
|
/**
|
|
1245
1341
|
* A reference to a resource for an `update`/`remove` op: a bare identifier (or a materialised
|
|
@@ -1417,7 +1513,7 @@ type AtomicResults<D extends ApiDescriptor, A, Ops extends readonly AtomicHandle
|
|
|
1417
1513
|
* A thrown {@link JsonApiError} has each error's pointer remapped to `(opIndex, flatPath)` (the
|
|
1418
1514
|
* failing op's type drives the flat-path inversion) before it propagates.
|
|
1419
1515
|
*/
|
|
1420
|
-
declare function runAtomic<D extends ApiDescriptor, A, W, const Ops>(request: JsonApiContext, materialiseCtx: MaterialiseContext, descriptor: D, path: string, build: (tx: AtomicRecorder<D, W>) => Ops): Promise<Ops extends readonly AtomicHandle[] ? AtomicResults<D, A, Ops> : AtomicResult[]>;
|
|
1516
|
+
declare function runAtomic<D extends ApiDescriptor, A, W, const Ops>(request: JsonApiContext, materialiseCtx: MaterialiseContext, descriptor: D, path: string, build: (tx: AtomicRecorder<D, W>) => Ops, inputSchemas?: InputSchemas): Promise<Ops extends readonly AtomicHandle[] ? AtomicResults<D, A, Ops> : AtomicResult[]>;
|
|
1421
1517
|
//#endregion
|
|
1422
1518
|
//#region src/location.d.ts
|
|
1423
1519
|
/**
|
|
@@ -1483,16 +1579,40 @@ type RelationCollection<T, P = Page> = Collection<T, P> & RelationArrayEnvelope;
|
|
|
1483
1579
|
* `$edge` (this membership's edge meta/links) and `$pivot` (typed sugar over
|
|
1484
1580
|
* `$edge.meta.pivot`). `$pivot` is graceful: present iff the endpoint rendered
|
|
1485
1581
|
* `meta.pivot` (relationship/related endpoints), `undefined` otherwise. `Meta` types
|
|
1486
|
-
* `$edge.meta` where the linkage renders the relation's declared identifier meta.
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1582
|
+
* `$edge.meta` where the linkage renders the relation's declared identifier meta. `Rendered` is
|
|
1583
|
+
* `true` for a member of a linkage that renders `meta.pivot` on every member, whose `$edge`,
|
|
1584
|
+
* `$edge.meta` and `$pivot` are then always present.
|
|
1585
|
+
*
|
|
1586
|
+
* `Pending` is the pivot and edge meta a pending optimistic member carries, when they differ from
|
|
1587
|
+
* a confirmed one's: such a member holds only the pivot values its write sent, so every field the
|
|
1588
|
+
* write pivot doesn't require is optional. The type is then a union on `$optimistic`, and checking that it
|
|
1589
|
+
* isn't `'pending'` gives the confirmed member's types.
|
|
1590
|
+
*/
|
|
1591
|
+
type EdgeMembers<Pivot = Record<string, unknown>, Meta extends Record<string, unknown> = Record<string, unknown>, Rendered extends boolean = false, Pending extends PendingEdge = never> = [Pending] extends [never] ? EdgeAccessors<Pivot, Meta, Rendered, 'pending' | undefined> : EdgeAccessors<Pivot, Meta, Rendered, undefined> | EdgeAccessors<Pending['pivot'], Pending['meta'], Rendered, 'pending'>;
|
|
1592
|
+
/** The pivot and edge meta of a pending optimistic member, as {@link EdgeMembers} takes them. */
|
|
1593
|
+
interface PendingEdge {
|
|
1594
|
+
readonly pivot: unknown;
|
|
1595
|
+
readonly meta: Record<string, unknown>;
|
|
1596
|
+
}
|
|
1597
|
+
/** The accessors {@link EdgeMembers} describes, for one value of `$optimistic`. */
|
|
1598
|
+
type EdgeAccessors<Pivot, Meta extends Record<string, unknown>, Rendered extends boolean, Optimistic extends 'pending' | undefined> = {
|
|
1599
|
+
readonly $edge: Rendered extends true ? Edge<Meta> & {
|
|
1600
|
+
readonly meta: Meta;
|
|
1601
|
+
} : Edge<Meta> | undefined;
|
|
1602
|
+
readonly $pivot: Rendered extends true ? Pivot : Pivot | undefined;
|
|
1603
|
+
} & ([Optimistic] extends ['pending'] ? PendingMarker : OptimisticMarker<Optimistic>);
|
|
1604
|
+
/** The `$optimistic` of a member a pending write holds. */
|
|
1605
|
+
interface PendingMarker {
|
|
1606
|
+
/** `'pending'`: a cache layer holds an unconfirmed change to this member. */
|
|
1607
|
+
readonly $optimistic: 'pending';
|
|
1608
|
+
}
|
|
1609
|
+
/** The `$optimistic` of a member that may or may not be pending. */
|
|
1610
|
+
interface OptimisticMarker<Optimistic extends 'pending' | undefined> {
|
|
1491
1611
|
/**
|
|
1492
1612
|
* `'pending'` while a cache layer (an optimistic draft in `@haddowg/json-api-query`) holds an
|
|
1493
1613
|
* unconfirmed change to this member, else `undefined`.
|
|
1494
1614
|
*/
|
|
1495
|
-
readonly $optimistic?:
|
|
1615
|
+
readonly $optimistic?: Optimistic;
|
|
1496
1616
|
}
|
|
1497
1617
|
/**
|
|
1498
1618
|
* The resource-level `$`-accessors on a materialised resource object. `Links` types `$links`: the
|
|
@@ -1637,22 +1757,29 @@ type RelationPage<D extends ApiDescriptor, T extends TypeName<D>, R extends Rela
|
|
|
1637
1757
|
/**
|
|
1638
1758
|
* The bare resource-identifier shape a non-included (but linked) relation takes,
|
|
1639
1759
|
* carrying the per-edge `$edge`/`$pivot` accessors the runtime attaches to every
|
|
1640
|
-
* materialised related value.
|
|
1760
|
+
* materialised related value. `Rendered` marks them always present, as {@link EdgeMembers} says.
|
|
1641
1761
|
*/
|
|
1642
|
-
type IdentifierMember<TType extends string, Pivot = Record<string, unknown>, Meta extends Record<string, unknown> = Record<string, unknown
|
|
1762
|
+
type IdentifierMember<TType extends string, Pivot = Record<string, unknown>, Meta extends Record<string, unknown> = Record<string, unknown>, Rendered extends boolean = false, Pending extends PendingEdge = never> = ResourceIdentifier<TType> & EdgeMembers<Pivot, Meta, Rendered, Pending>;
|
|
1643
1763
|
/**
|
|
1644
1764
|
* A hydrated related resource: a per-edge VIEW — the full `ResourceObjectView` of the
|
|
1645
1765
|
* related node plus this membership's `$edge`/`$pivot`. Relations one hop deep stay as
|
|
1646
1766
|
* identifiers (no nested-include narrowing in the read API today). The fieldset map `F`
|
|
1647
1767
|
* threads through so a sparse fieldset on the included type narrows its attributes/relations.
|
|
1648
1768
|
* `Pivot` types the per-edge `$pivot` (a `belongsToMany` relation's `meta.pivot`), and `Meta` the
|
|
1649
|
-
* per-edge `$edge.meta`.
|
|
1769
|
+
* per-edge `$edge.meta`. `Rendered` marks them always present, as {@link EdgeMembers} says.
|
|
1650
1770
|
*/
|
|
1651
|
-
type HydratedMember<D extends ApiDescriptor, A, TType extends TypeName<D>, F = unknown, Pivot = Record<string, unknown>, Meta extends Record<string, unknown> = Record<string, unknown
|
|
1771
|
+
type HydratedMember<D extends ApiDescriptor, A, TType extends TypeName<D>, F = unknown, Pivot = Record<string, unknown>, Meta extends Record<string, unknown> = Record<string, unknown>, Rendered extends boolean = false, Pending extends PendingEdge = never> = ResourceObjectView<D, A, TType, never, F> & EdgeMembers<Pivot, Meta, Rendered, Pending>;
|
|
1652
1772
|
/** A hydrated related value distributes over a polymorphic union of related types. */
|
|
1653
|
-
type Hydrated<D extends ApiDescriptor, A, TType extends TypeName<D>, F = unknown, Pivot = Record<string, unknown>, Meta extends Record<string, unknown> = Record<string, unknown
|
|
1773
|
+
type Hydrated<D extends ApiDescriptor, A, TType extends TypeName<D>, F = unknown, Pivot = Record<string, unknown>, Meta extends Record<string, unknown> = Record<string, unknown>, Rendered extends boolean = false, Pending extends PendingEdge = never> = TType extends TypeName<D> ? HydratedMember<D, A, TType, F, Pivot, Meta, Rendered, Pending> : never;
|
|
1654
1774
|
/** An identifier related value distributes over a polymorphic union of related types. */
|
|
1655
|
-
type Identifier<TType extends string, Pivot = Record<string, unknown>, Meta extends Record<string, unknown> = Record<string, unknown
|
|
1775
|
+
type Identifier<TType extends string, Pivot = Record<string, unknown>, Meta extends Record<string, unknown> = Record<string, unknown>, Rendered extends boolean = false, Pending extends PendingEdge = never> = TType extends string ? IdentifierMember<TType, Pivot, Meta, Rendered, Pending> : never;
|
|
1776
|
+
/**
|
|
1777
|
+
* `true` when relation `R` renders `meta.pivot` on every member of its linkage, as the
|
|
1778
|
+
* descriptor's `pivotRendered` says.
|
|
1779
|
+
*/
|
|
1780
|
+
type PivotRendered<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>> = D[T]['relations'][R] extends {
|
|
1781
|
+
pivotRendered: true;
|
|
1782
|
+
} ? true : false;
|
|
1656
1783
|
/**
|
|
1657
1784
|
* The static value of one relation slot, resolved by cardinality and whether the
|
|
1658
1785
|
* relation name is present in the read's `include` tuple `Inc`:
|
|
@@ -1665,8 +1792,10 @@ type Identifier<TType extends string, Pivot = Record<string, unknown>, Meta exte
|
|
|
1665
1792
|
*
|
|
1666
1793
|
* (Excluded to-many stays a `Collection`: linkage may still be present, and a lazy
|
|
1667
1794
|
* to-many materialises as an augmented array regardless — only its members differ.)
|
|
1795
|
+
*
|
|
1796
|
+
* Each member's `$pivot` is typed from the relation's `readPivot`, as on the relationship endpoint.
|
|
1668
1797
|
*/
|
|
1669
|
-
type RelationValue<D extends ApiDescriptor, A, T extends TypeName<D>, R extends RelationName<D, T>, Inc, F = unknown> = R extends Inc ? IsMany<D, T, R> extends true ? RelationCollection<Hydrated<D, A, RelatedType<D, T, R>, F,
|
|
1798
|
+
type RelationValue<D extends ApiDescriptor, A, T extends TypeName<D>, R extends RelationName<D, T>, Inc, F = unknown> = R extends Inc ? IsMany<D, T, R> extends true ? RelationCollection<Hydrated<D, A, RelatedType<D, T, R>, F, PivotFieldsOf<D, T, R>, EdgeMetaOf<D, T, R>, PivotRendered<D, T, R>, PendingEdgeOf<D, T, R>>, RelationPage<D, T, R>> : Hydrated<D, A, RelatedType<D, T, R>, F, PivotFieldsOf<D, T, R>, EdgeMetaOf<D, T, R>, PivotRendered<D, T, R>, PendingEdgeOf<D, T, R>> | null : IsMany<D, T, R> extends true ? RelationCollection<Identifier<RelatedType<D, T, R>, PivotFieldsOf<D, T, R>, EdgeMetaOf<D, T, R>, PivotRendered<D, T, R>, PendingEdgeOf<D, T, R>>, RelationPage<D, T, R>> : Identifier<RelatedType<D, T, R>, PivotFieldsOf<D, T, R>, EdgeMetaOf<D, T, R>, PivotRendered<D, T, R>, PendingEdgeOf<D, T, R>> | null | undefined;
|
|
1670
1799
|
/**
|
|
1671
1800
|
* The relation slots of type `T`, each typed by cardinality and include-presence, then
|
|
1672
1801
|
* narrowed to the fieldset selection for `T` (relations are sparse-fieldset members too — an
|
|
@@ -2135,21 +2264,62 @@ type PivotFieldsOf<D extends ApiDescriptor, T extends TypeName<D>, R extends Rel
|
|
|
2135
2264
|
* `identifierMeta` declares, typed like a pivot, with the relation's `pivot` beside them. An
|
|
2136
2265
|
* identifier meta that says whether it is open takes only those, and the undeclared members it
|
|
2137
2266
|
* opens to; one that doesn't say is an open record. A relation declaring none keeps the open
|
|
2138
|
-
* record.
|
|
2267
|
+
* record, with its typed `pivot` where it renders one on every member.
|
|
2139
2268
|
*/
|
|
2140
|
-
type EdgeMetaOf<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>> = D[T]['relations'][R] extends {
|
|
2269
|
+
type EdgeMetaOf<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>, Pivot = PivotFieldsOf<D, T, R>> = D[T]['relations'][R] extends {
|
|
2141
2270
|
identifierMeta: infer P;
|
|
2142
2271
|
} ? P extends {
|
|
2143
2272
|
additional: false | {
|
|
2144
2273
|
format: unknown;
|
|
2145
2274
|
};
|
|
2146
|
-
} ? PivotObject<P> & EdgePivot<D, T, R> & AdditionalMembers<P,
|
|
2147
|
-
|
|
2148
|
-
|
|
2275
|
+
} ? PivotObject<P> & EdgePivot<D, T, R, Pivot> & AdditionalMembers<P, Pivot> : PivotObject<P> & Record<string, unknown> : D[T]['relations'][R] extends {
|
|
2276
|
+
pivotRendered: true;
|
|
2277
|
+
} ? Record<string, unknown> & EdgePivot<D, T, R, Pivot> : Record<string, unknown>;
|
|
2278
|
+
/**
|
|
2279
|
+
* The `pivot` a pivot relation's identifier meta carries beside its declared members, always
|
|
2280
|
+
* present where the relation renders it on every member.
|
|
2281
|
+
*/
|
|
2282
|
+
type EdgePivot<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>, Pivot = PivotFieldsOf<D, T, R>> = D[T]['relations'][R] extends {
|
|
2283
|
+
pivotRendered: true;
|
|
2284
|
+
} ? {
|
|
2285
|
+
readonly pivot: Pivot;
|
|
2286
|
+
} : D[T]['relations'][R] extends {
|
|
2149
2287
|
pivot: true;
|
|
2150
2288
|
} ? {
|
|
2151
|
-
readonly pivot?:
|
|
2289
|
+
readonly pivot?: Pivot;
|
|
2152
2290
|
} : unknown;
|
|
2291
|
+
/** The fields relation `R`'s `writePivot` requires every write to send. */
|
|
2292
|
+
type WriteRequiredPivotField<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>> = D[T]['relations'][R] extends {
|
|
2293
|
+
writePivot: infer W;
|
|
2294
|
+
} ? RequiredPivotField<W> : never;
|
|
2295
|
+
/**
|
|
2296
|
+
* The fields of relation `R`'s read pivot that every response renders but a write needn't send:
|
|
2297
|
+
* the ones only the server sets, such as a timestamp it stamps on attach, and the ones a write
|
|
2298
|
+
* may leave out.
|
|
2299
|
+
*/
|
|
2300
|
+
type UnsentPivotField<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>> = D[T]['relations'][R] extends {
|
|
2301
|
+
readPivot: infer P;
|
|
2302
|
+
} ? Exclude<RequiredPivotField<P>, WriteRequiredPivotField<D, T, R>> : never;
|
|
2303
|
+
/**
|
|
2304
|
+
* The typed `meta.pivot` a pending optimistic member of relation `R` carries. It holds only what
|
|
2305
|
+
* the write sent, so a field is required only where the read renders it and the write pivot
|
|
2306
|
+
* requires it, and every other field is optional. Equal to {@link PivotFieldsOf} where the write
|
|
2307
|
+
* pivot requires every field the read requires.
|
|
2308
|
+
*/
|
|
2309
|
+
type PendingPivotOf<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>> = D[T]['relations'][R] extends {
|
|
2310
|
+
readPivot: infer P;
|
|
2311
|
+
} ? { readonly [K in PivotFieldNames<P> as K extends UnsentPivotField<D, T, R> ? never : K extends RequiredPivotField<P> ? K : never]: PivotValue<P, K> } & { readonly [K in PivotFieldNames<P> as K extends UnsentPivotField<D, T, R> ? K : K extends RequiredPivotField<P> ? never : K]?: PivotValue<P, K> } & AdditionalMembers<P> : PivotFieldsOf<D, T, R>;
|
|
2312
|
+
/**
|
|
2313
|
+
* The {@link PendingEdge} of the linkage members of relation `R`, where the relation renders its
|
|
2314
|
+
* pivot on every member and requires a field of it that the write pivot doesn't. `never` otherwise:
|
|
2315
|
+
* a pending member then types like a confirmed one.
|
|
2316
|
+
*/
|
|
2317
|
+
type PendingEdgeOf<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>> = D[T]['relations'][R] extends {
|
|
2318
|
+
pivotRendered: true;
|
|
2319
|
+
} ? [UnsentPivotField<D, T, R>] extends [never] ? never : {
|
|
2320
|
+
readonly pivot: PendingPivotOf<D, T, R>;
|
|
2321
|
+
readonly meta: EdgeMetaOf<D, T, R, PendingPivotOf<D, T, R>>;
|
|
2322
|
+
} : never;
|
|
2153
2323
|
/**
|
|
2154
2324
|
* The typed `meta.pivot` a request may send on each member of relation `R`, from the descriptor's
|
|
2155
2325
|
* `writePivot` (only writable fields, optional unless required). Falls back like
|
|
@@ -2307,9 +2477,10 @@ type RelatedValue<D extends ApiDescriptor, A, T extends TypeName<D>, R extends R
|
|
|
2307
2477
|
* A linkage VALUE for relation `R` (the `/relationships/{rel}` endpoint, identifiers only):
|
|
2308
2478
|
* a `Collection` of identifier members for to-many, a single identifier (or `null`) for to-one.
|
|
2309
2479
|
* Each member's `$pivot` is typed from the relation's `readPivot`, and its `$edge.meta` from its
|
|
2310
|
-
* `identifierMeta`.
|
|
2480
|
+
* `identifierMeta`. `Settled` is `true` for linkage no cache layer can hold pending, such as an
|
|
2481
|
+
* atomic result, whose members are typed only as confirmed.
|
|
2311
2482
|
*/
|
|
2312
|
-
type LinkageValue<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>, Q = undefined> = IsMany<D, T, R> extends true ? Collection<Identifier<RelatedType<D, T, R>, PivotFieldsOf<D, T, R>, EdgeMetaOf<D, T, R>>, RelationPage<D, T, R, Q>> : Identifier<RelatedType<D, T, R>, PivotFieldsOf<D, T, R>, EdgeMetaOf<D, T, R>> | null;
|
|
2483
|
+
type LinkageValue<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>, Q = undefined, Settled extends boolean = false> = IsMany<D, T, R> extends true ? Collection<Identifier<RelatedType<D, T, R>, PivotFieldsOf<D, T, R>, EdgeMetaOf<D, T, R>, PivotRendered<D, T, R>, Settled extends true ? never : PendingEdgeOf<D, T, R>>, RelationPage<D, T, R, Q>> : Identifier<RelatedType<D, T, R>, PivotFieldsOf<D, T, R>, EdgeMetaOf<D, T, R>, PivotRendered<D, T, R>, Settled extends true ? never : PendingEdgeOf<D, T, R>> | null;
|
|
2313
2484
|
/**
|
|
2314
2485
|
* The query relation `R`'s relationship read takes, its `sort` and `filter` narrowed to what the
|
|
2315
2486
|
* relation declares and its `page` of type `Pg`. It takes no `relatedQuery`.
|
|
@@ -2440,17 +2611,39 @@ type LinkageRef<TType extends string> = (ResourceIdentifier<TType> & {
|
|
|
2440
2611
|
});
|
|
2441
2612
|
/** A linkage ref distributed over a (possibly polymorphic) union of related types. */
|
|
2442
2613
|
type LinkageRefOf<TType extends string> = TType extends string ? LinkageRef<TType> : never;
|
|
2614
|
+
/** A create or an update, the writes a relation's `requiredOnCreate` and `nonNullOn` name. */
|
|
2615
|
+
type WriteContext = 'create' | 'update';
|
|
2616
|
+
/** Whether relation `R` of type `T` refuses `null` in write `C`, per its `nonNullOn`. */
|
|
2617
|
+
type RefusesNull<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>, C extends WriteContext> = D[T]['relations'][R] extends {
|
|
2618
|
+
nonNullOn: readonly (infer On)[];
|
|
2619
|
+
} ? C extends On ? true : false : false;
|
|
2620
|
+
/**
|
|
2621
|
+
* Whether to-many relation `R` of type `T` refuses an empty linkage in write `C`: per its
|
|
2622
|
+
* `nonEmptyOn`, or on a create for a relation a create must send.
|
|
2623
|
+
*/
|
|
2624
|
+
type RefusesEmpty<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>, C extends WriteContext> = D[T]['relations'][R] extends {
|
|
2625
|
+
nonEmptyOn: readonly (infer On)[];
|
|
2626
|
+
} ? C extends On ? true : RequiredOnCreate<D, T, R, C> : RequiredOnCreate<D, T, R, C>;
|
|
2627
|
+
type RequiredOnCreate<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>, C extends WriteContext> = C extends 'create' ? D[T]['relations'][R] extends {
|
|
2628
|
+
requiredOnCreate: true;
|
|
2629
|
+
} ? true : false : false;
|
|
2443
2630
|
/**
|
|
2444
2631
|
* The relationship VALUE accepted in a create/update input slot, by cardinality:
|
|
2445
|
-
* to-one accepts a single ref or `null` (clear)
|
|
2446
|
-
*
|
|
2632
|
+
* to-one accepts a single ref or `null` (clear), unless the relation refuses `null` in write
|
|
2633
|
+
* `C`; to-many accepts an array of refs, non-empty where the relation refuses an empty one in
|
|
2634
|
+
* write `C`, each with an optional `$pivot` typed from the relation's `writePivot`.
|
|
2447
2635
|
*/
|
|
2448
|
-
type RelationInput<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T
|
|
2636
|
+
type RelationInput<D extends ApiDescriptor, T extends TypeName<D>, R extends RelationName<D, T>, C extends WriteContext> = IsMany<D, T, R> extends true ? RefusesEmpty<D, T, R, C> extends true ? readonly [WriteRef<D, T, R>, ...WriteRef<D, T, R>[]] : readonly WriteRef<D, T, R>[] : RefusesNull<D, T, R, C> extends true ? LinkageRefOf<RelatedType<D, T, R>> : LinkageRefOf<RelatedType<D, T, R>> | null;
|
|
2637
|
+
/** Whether write `C` must send relation `R`: only a create, and only one `requiredOnCreate`. */
|
|
2638
|
+
type RequiresRelation<D extends ApiDescriptor, T extends TypeName<D>, R, C extends WriteContext> = C extends 'create' ? D[T]['relations'][R & keyof D[T]['relations']] extends {
|
|
2639
|
+
requiredOnCreate: true;
|
|
2640
|
+
} ? R : never : never;
|
|
2449
2641
|
/**
|
|
2450
|
-
* The relationship slots of type `T` as
|
|
2451
|
-
* write-only ones included)
|
|
2642
|
+
* The relationship slots of type `T` as write input keys for write `C` (one per declared
|
|
2643
|
+
* relation, write-only ones included): required for a relation the write must send, optional
|
|
2644
|
+
* otherwise.
|
|
2452
2645
|
*/
|
|
2453
|
-
type RelationInputs<D extends ApiDescriptor, T extends TypeName<D
|
|
2646
|
+
type RelationInputs<D extends ApiDescriptor, T extends TypeName<D>, C extends WriteContext> = { -readonly [R in keyof D[T]['relations'] as Extract<RequiresRelation<D, T, R, C>, string>]-?: RelationInput<D, T, Extract<R, string>, C> } & { -readonly [R in keyof D[T]['relations'] as Exclude<Extract<R, string>, RequiresRelation<D, T, R, C>>]?: RelationInput<D, T, Extract<R, string>, C> };
|
|
2454
2647
|
/** The `{ create; update }` write-attribute pair for type `T` (or an open pair when `T` is absent from `W`). */
|
|
2455
2648
|
type WritePair<W, T> = T extends keyof W ? W[T] : {
|
|
2456
2649
|
create: Record<string, unknown>;
|
|
@@ -2480,14 +2673,14 @@ type CreateId<D extends ApiDescriptor, T extends TypeName<D>> = D[T]['clientId']
|
|
|
2480
2673
|
* slots, plus an `id` keyed by the client-id policy. The runtime builds the JSON:API
|
|
2481
2674
|
* envelope (routing keys to attributes/relationships via the descriptor).
|
|
2482
2675
|
*/
|
|
2483
|
-
type CreateInput<D extends ApiDescriptor, W, T extends TypeName<D>, Op extends 'create' | 'atomicCreate' = 'create'> = CreateAttributesOf<W, T> & RelationInputs<D, T> & CreateId<D, T> & {
|
|
2676
|
+
type CreateInput<D extends ApiDescriptor, W, T extends TypeName<D>, Op extends 'create' | 'atomicCreate' = 'create'> = CreateAttributesOf<W, T> & RelationInputs<D, T, 'create'> & CreateId<D, T> & {
|
|
2484
2677
|
/** The resource object's `meta`, sent as `data.meta`. */$meta?: ResourceWriteMeta<D, T, Op>;
|
|
2485
2678
|
};
|
|
2486
2679
|
/**
|
|
2487
2680
|
* The flat input to `client.<type>.id(id).update(patch)`: the type's update attributes (all
|
|
2488
2681
|
* optional) + relation slots. The id rides the handle, never the input.
|
|
2489
2682
|
*/
|
|
2490
|
-
type UpdateInput<D extends ApiDescriptor, W, T extends TypeName<D>, Op extends 'update' | 'atomicUpdate' = 'update'> = UpdateAttributesOf<W, T> & RelationInputs<D, T> & {
|
|
2683
|
+
type UpdateInput<D extends ApiDescriptor, W, T extends TypeName<D>, Op extends 'update' | 'atomicUpdate' = 'update'> = UpdateAttributesOf<W, T> & RelationInputs<D, T, 'update'> & {
|
|
2491
2684
|
/** The resource object's `meta`, sent as `data.meta`. */$meta?: ResourceWriteMeta<D, T, Op>;
|
|
2492
2685
|
};
|
|
2493
2686
|
/**
|
|
@@ -2584,13 +2777,14 @@ type UpdateMethod<D extends ApiDescriptor, A, W, T extends TypeName<D>, I = Upda
|
|
|
2584
2777
|
* `meta`);
|
|
2585
2778
|
* - an {@link AtomicDeleteHandle} -> `undefined` (a remove carries no data);
|
|
2586
2779
|
* - an {@link AtomicRelationshipHandle} for relation `R` of `T` -> the `AtomicResult` wrapping the
|
|
2587
|
-
* linkage the server answered with, as the relationship
|
|
2588
|
-
* `undefined` data when it answered with an empty
|
|
2780
|
+
* linkage the server answered with, typed as the relationship endpoint's (a pivot the relation
|
|
2781
|
+
* renders on every member is present), or `undefined` data when it answered with an empty
|
|
2782
|
+
* result. A result comes straight from the server, so no member of it is pending.
|
|
2589
2783
|
*
|
|
2590
2784
|
* Drives the per-op positional typing of {@link AtomicResults} (the callback's returned tuple of
|
|
2591
2785
|
* handles maps to a tuple of these).
|
|
2592
2786
|
*/
|
|
2593
|
-
type AtomicResultOf<D extends ApiDescriptor, A, Handle> = Handle extends AtomicDeleteHandle ? undefined : Handle extends AtomicRelationshipHandle<infer T, infer R> ? T extends TypeName<D> ? R extends RelationName<D, T> ? AtomicResult<LinkageValue<D, T, R> | undefined> : never : never : Handle extends AtomicCreateHandle<infer T> ? T extends TypeName<D> ? AtomicResult<ResourceObjectView<D, A, T>> : never : Handle extends AtomicUpdateHandle<infer T> ? T extends TypeName<D> ? AtomicResult<ResourceObjectView<D, A, T>> : never : never;
|
|
2787
|
+
type AtomicResultOf<D extends ApiDescriptor, A, Handle> = Handle extends AtomicDeleteHandle ? undefined : Handle extends AtomicRelationshipHandle<infer T, infer R> ? T extends TypeName<D> ? R extends RelationName<D, T> ? AtomicResult<LinkageValue<D, T, R, undefined, true> | undefined> : never : never : Handle extends AtomicCreateHandle<infer T> ? T extends TypeName<D> ? AtomicResult<ResourceObjectView<D, A, T>> : never : Handle extends AtomicUpdateHandle<infer T> ? T extends TypeName<D> ? AtomicResult<ResourceObjectView<D, A, T>> : never : never;
|
|
2594
2788
|
/** The custom actions declared on type `T` (the descriptor's `actions` block, or `{}`). */
|
|
2595
2789
|
type ActionsOf<D extends ApiDescriptor, T extends TypeName<D>> = D[T] extends {
|
|
2596
2790
|
actions: infer Acts;
|
|
@@ -2975,9 +3169,10 @@ interface TypeAccessor<D extends ApiDescriptor, A, W, T extends TypeName<D>, Act
|
|
|
2975
3169
|
* generated `WriteAttributes` map (per-type `{ create; update }` attribute pairs) and `Act`
|
|
2976
3170
|
* the generated per-action body-type map; both thread through to the write/action surfaces and
|
|
2977
3171
|
* default so read-only / codegen-less callers compile. `E` is the server's documented
|
|
2978
|
-
* error-code union
|
|
3172
|
+
* error-code union and `O` the codes each operation raises, keyed by operation id, both carried
|
|
3173
|
+
* at the type level only (read them back with `ErrorCodeOf` and `OperationErrorCodeOf`).
|
|
2979
3174
|
*/
|
|
2980
|
-
type Client<D extends ApiDescriptor, A = DefaultAttributes<D>, W = DefaultWriteAttributes<D>, Act = DefaultActionTypes, E extends string = string, L = Record<never, never>> = { -readonly [T in keyof D as Extract<T, string>]: D[T] extends {
|
|
3175
|
+
type Client<D extends ApiDescriptor, A = DefaultAttributes<D>, W = DefaultWriteAttributes<D>, Act = DefaultActionTypes, E extends string = string, L = Record<never, never>, O = Record<never, never>> = { -readonly [T in keyof D as Extract<T, string>]: D[T] extends {
|
|
2981
3176
|
singleton: true;
|
|
2982
3177
|
} ? SingletonAccessor<D, WithLinks<A, L>, W, Extract<T, string>, Act> : TypeAccessor<D, WithLinks<A, L>, W, Extract<T, string>, Act> } & {
|
|
2983
3178
|
/**
|
|
@@ -2998,12 +3193,30 @@ type Client<D extends ApiDescriptor, A = DefaultAttributes<D>, W = DefaultWriteA
|
|
|
2998
3193
|
*/
|
|
2999
3194
|
atomic<const Ops>(build: (tx: AtomicRecorder<D, W>) => Ops): Promise<Ops extends readonly AtomicHandle[] ? AtomicResults<D, WithLinks<A, L>, Ops> : AtomicResult[]>;
|
|
3000
3195
|
readonly [errorCodes]?: E;
|
|
3196
|
+
readonly '~errorCodesByOperation'?: O;
|
|
3001
3197
|
};
|
|
3002
3198
|
declare const errorCodes: unique symbol;
|
|
3199
|
+
/**
|
|
3200
|
+
* The type-only members a client carries its error codes in: `E`, every documented code, and
|
|
3201
|
+
* `O`, the codes each operation raises. Intersect it into a type that stands in for a client.
|
|
3202
|
+
*/
|
|
3203
|
+
interface ErrorCodeCarrier<E extends string = string, O = Record<never, never>> {
|
|
3204
|
+
readonly [errorCodes]?: E;
|
|
3205
|
+
readonly '~errorCodesByOperation'?: O;
|
|
3206
|
+
}
|
|
3003
3207
|
/** The error-code union a client type carries, or `string` for one that carries none. */
|
|
3004
3208
|
type ErrorCodeOf<T> = T extends {
|
|
3005
3209
|
readonly [errorCodes]?: infer C extends string;
|
|
3006
3210
|
} ? C : string;
|
|
3211
|
+
/**
|
|
3212
|
+
* The codes operation `Op` raises on a client type, such as `'create.albums'`. Every code the
|
|
3213
|
+
* client carries when it lists none for `Op`.
|
|
3214
|
+
*/
|
|
3215
|
+
type OperationErrorCodeOf<T, Op extends string> = T extends {
|
|
3216
|
+
readonly '~errorCodesByOperation'?: infer O;
|
|
3217
|
+
} ? OperationCodes<ErrorCodeOf<T>, O, Op> : ErrorCodeOf<T>;
|
|
3218
|
+
/** The codes operation `Op` raises per `O`, a generated `ErrorCodeByOperation`, else `C`. */
|
|
3219
|
+
type OperationCodes<C extends string, O, Op extends string> = Op extends keyof O ? Extract<O[Op], string> : C;
|
|
3007
3220
|
/**
|
|
3008
3221
|
* The fallback attribute map when a caller doesn't supply the generated `Attributes`
|
|
3009
3222
|
* (direct `createClient` users without codegen): every type's attributes are an open
|
|
@@ -3105,6 +3318,12 @@ interface ClientOptions {
|
|
|
3105
3318
|
* validation engine (e.g. ajv) is brought by the caller; the client never depends on one.
|
|
3106
3319
|
*/
|
|
3107
3320
|
validate?: ValidationOption;
|
|
3321
|
+
/**
|
|
3322
|
+
* Schemas to check each create's and update's input against before sending it, by wire type.
|
|
3323
|
+
* An input that fails rejects with an {@link InputValidationError} and sends nothing. Pass the
|
|
3324
|
+
* `inputSchemas` that `json-api-codegen --zod` generates, or your own Standard Schemas.
|
|
3325
|
+
*/
|
|
3326
|
+
validateInput?: InputSchemas;
|
|
3108
3327
|
}
|
|
3109
3328
|
/**
|
|
3110
3329
|
* The reserved members on a {@link ResourceHandle} — names the Proxy resolves itself, so a
|
|
@@ -3121,7 +3340,7 @@ declare const HANDLE_RESERVED: ReadonlySet<string>;
|
|
|
3121
3340
|
* (`$next()`/`$prev()`, related links) is wired through `materialise`'s `navigate` seam,
|
|
3122
3341
|
* which resolves the server's link against `baseUrl`, executes it and re-materialises.
|
|
3123
3342
|
*/
|
|
3124
|
-
declare function createClient<D extends ApiDescriptor, A = DefaultAttributes<D>, W = DefaultWriteAttributes<D>, Act = DefaultActionTypes, E extends string = string, L = Record<never, never>>(descriptor: D, options: ClientOptions): Client<D, A, W, Act, E, L>;
|
|
3343
|
+
declare function createClient<D extends ApiDescriptor, A = DefaultAttributes<D>, W = DefaultWriteAttributes<D>, Act = DefaultActionTypes, E extends string = string, L = Record<never, never>, O = Record<never, never>>(descriptor: D, options: ClientOptions): Client<D, A, W, Act, E, L, O>;
|
|
3125
3344
|
//#endregion
|
|
3126
3345
|
//#region src/request.d.ts
|
|
3127
3346
|
/**
|
|
@@ -3360,5 +3579,5 @@ declare function assertJsonApiDocument(body: unknown): asserts body is Document;
|
|
|
3360
3579
|
*/
|
|
3361
3580
|
declare function validateDocument(body: Document, validator: ResolvedValidator, fields?: Readonly<Record<string, readonly string[]>>): void;
|
|
3362
3581
|
//#endregion
|
|
3363
|
-
export { DeleteResult as $,
|
|
3364
|
-
//# sourceMappingURL=validate-
|
|
3582
|
+
export { DeleteResult as $, InputValidationError as $n, PollOptions as $r, RelationSortQuery as $t, TransportResponse as A, PivotDescriptor as Ai, WriteOptions as An, ATOMIC_MEDIA_TYPE as Ar, OptionsArg as At, Client as B, ResourceExamples as Bi, AtomicOperationArgs as Bn, Page as Br, RelatedMeta as Bt, ClientOptions as C, MenuDescriptor as Ci, UpdateMethod as Cn, identifierViewOf as Cr, MetaOption as Ct, JsonApiTransport as D, PaginatorKind as Di, WithDocumentMeta as Dn, relatedPaginatorKind as Dr, OperationCodes as Dt, createClient as E, PaginatorDescriptor as Ei, WaitedWriteResult as En, relatedPaginator as Er, NestedFieldsetMember as Et, ActionCallOptions as F, RelationDescriptor as Fi, readActionLocation as Fn, mediaType as Fr, ReadAttributesOf as Ft, CountedRelationName as G, AtomicRelationshipRecorder as Gn, PageParams as Gr, RelatedReadRelatedQuery as Gt, CollectionMeta as H, SortFamilyDescriptor as Hi, AtomicRef as Hn, PageLinks as Hr, RelatedQueryEntry as Ht, ActionsAccessor as I, RelationMutations as Ii, AtomicCreateHandle as In, NestedFieldset as Ir, ReadResult as It, CreateMethod as J, AtomicUpdateHandle as Jn, TypedPage as Jr, RelationName as Jt, CreateAttributesOf as K, AtomicResult as Kn, PageParamsOf as Kr, RelationCollection as Kt, AtomicResultOf as L, RequestMetaOperation as Li, AtomicCreateInput as Ln, nestedFieldset as Lr, ReadableRelationName as Lt, AcceptedJob as M, RawOutputMedia as Mi, WriteResult as Mn, LocalIdentifier as Mr, PendingPivotOf as Mt, AcceptedMeta as N, RelatedQueryDescriptor as Ni, ActionLocation as Nn, MediaTypeParams as Nr, PivotFieldsOf as Nt, TransportRawBody as O, PaginatorRole as Oi, WithLinks as On, setMaterialisedOverlay as Or, OperationErrorCodeOf as Ot, AcceptedOf as P, RelatedQueryOperation as Pi, isActionLocation as Pn, ResourceIdentifier as Pr, PivotInput as Pt, DeleteArgs as Q, InputSchemas as Qn, Accepted as Qr, RelationRequestMetaOf as Qt, BinaryBody as R, ResourceCountOperation as Ri, AtomicDeleteHandle as Rn, CANONICAL_PAGE_KEYS as Rr, RelatedIncludedResource as Rt, serializeQuery as S, MediaExamples as Si, UpdateInput as Sn, edgeViewOf as Sr, MetaObject as St, HeadersInit as T, OperationExamples as Ti, WaitValue as Tn, materialise as Tr, MutationVerb as Tt, CountAccessor as U, StrategyDescriptor as Ui, AtomicRelationshipArgs as Un, PageMeta as Ur, RelatedQueryParam as Ut, Collection as V, ResourceMetaDescriptor as Vi, AtomicRecorder as Vn, PageKeys as Vr, RelatedQuery as Vt, CountToken as W, isPolymorphic as Wi, AtomicRelationshipHandle as Wn, PageOf as Wr, RelatedQueryRelation as Wt, DefaultAttributes as X, runAtomic as Xn, prevPageParams as Xr, RelationPaginator as Xt, DefaultActionTypes as Y, AtomicUpdateInput as Yn, nextPageParams as Yr, RelationPageParams as Yt, DefaultWriteAttributes as Z, InputCheck as Zn, resolvePaginator as Zr, RelationReadQuery as Zt, RawResponseType as _, DocumentMetaDescriptor as _i, TypeAccessor as _n, PendingPlacement as _r, ListPageParams as _t, ValidationOption as a, ActionDescriptor as ai, ResourceCountToken as an, ArrayEnvelope as ar, FieldsMap as at, executeRaw as b, InputMedia as bi, TypedRelatedReadQuery as bn, ResourceEnvelope as br, MemberName as bt, assertJsonApiDocument as c, ActionOutput as ci, ResourceObjectView as cn, EdgeEnvelope as cr, HydratedMember as ct, sparseSchemas as d, ApiDescriptor as di, SingleReadQuery as dn, LinkObject as dr, IncludedRelations as dt, PollTimeoutError as ei, RelationshipAccessor as en, StandardSchema as er, DocumentMeta as et, validateDocument as f, ApiExamples as fi, SingletonAccessor as fn, MaterialiseContext as fr, IncludedResource as ft, JsonApiRequest as g, CountableDescriptor as gi, TakesVerb as gn, PendingMember as gr, ListFilterMember as gt, JsonApiContext as h, ClientIdPolicy as hi, SortToken as hn, PendingCreate as hr, LinkageRef as ht, ValidationContext as i, AcceptedOperation as ii, ResourceAccessors as in, withInputCheck as ir, FieldSelectionMap as it, fetchTransport as j, RawMediaKind as ji, WritePivotOf as jn, JSON_API_MEDIA_TYPE as jr, PendingEdge as jt, TransportRequest as k, PaginatorStrategy as ki, WritableRelationName as kn, ATOMIC_EXT as kr, OperationMeta as kt, resolveValidator as l, ActionScope as li, ResourceWriteMeta as ln, EdgeMember as lr, IdentifierMember as lt, ExecutedResponse as m, Cardinality as mi, SortQuery as mn, NavigateOptions as mr, IsSingleton as mt, SchemaMap as n, parseRetryAfter as ni, RequestMetaOf as nn, StandardSchemaResult as nr, ErrorCodeCarrier as nt, Validator as o, ActionInput as oi, ResourceHandle as on, DocumentEnvelope as or, FilterKey as ot, Document as p, AtomicDescriptor as pi, SingletonUpdateInput as pn, MaterialisedOverlay as pr, IncludedType as pt, CreateInput as q, AtomicResults as qn, ResolvedPaginator as qr, RelationFilterQuery as qt, ValidationConfig as r, AcceptedDescriptor as ri, RequiresRequestMeta as rn, inputFailure as rr, ErrorCodeOf as rt, WireResource as s, ActionLocationDescriptor as si, ResourceMetaOf as sn, Edge as sr, FilterQuery as st, ResolvedValidator as t, isAccepted as ti, RelationshipMembers as tn, StandardSchemaIssue as tr, EdgeMembers as tt, sparseSchema as u, AdditionalMembersDescriptor as ui, ResourceWriteOperation as un, Link as ur, IncludePath as ut, ReadQuery as v, DocumentMetaOperation as vi, TypeName as vn, RelationArrayEnvelope as vr, LooseRelatedQuery as vt, HANDLE_RESERVED as w, MetaLiteral as wi, WaitOptions as wn, isMaterialised as wr, MutationMetaOf as wt, executeResponse as x, InputMediaKind as xi, TypedRelationReadQuery as xn, ResourceLinks as xr, MemberTypeOf as xt, execute as y, FilterFamilyDescriptor as yi, TypedReadQuery as yn, RelationView as yr, LooseRelatedQueryEntry as yt, BinaryResponseType as z, ResourceDescriptor as zi, AtomicHandle as zn, ExactPageParams as zr, RelatedIncludedType as zt };
|
|
3583
|
+
//# sourceMappingURL=validate-CCLqE_2J.d.cts.map
|