@haddowg/json-api-client 1.30.0 → 1.32.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 +338 -28
- package/dist/index.d.cts +109 -7
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +109 -7
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +330 -29
- 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-ugcQVpb0.d.mts → validate-DyNfTJ52.d.cts} +334 -50
- package/dist/validate-DyNfTJ52.d.cts.map +1 -0
- package/dist/{validate-ugcQVpb0.d.cts → validate-DyNfTJ52.d.mts} +334 -50
- package/dist/validate-DyNfTJ52.d.mts.map +1 -0
- package/package.json +1 -1
- package/dist/validate-CtXB1MGk.mjs.map +0 -1
- package/dist/validate-ugcQVpb0.d.cts.map +0 -1
- package/dist/validate-ugcQVpb0.d.mts.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as DeleteArgs, $n as AtomicResults, $r as PageParams, $t as RelationPageParams, A as TransportResponse, Ai as MediaExamples, An as WaitOptions, Ar as isMaterialised, At as OperationCodes, B as Client, Bi as RawOutputMedia, Bn as isActionLocation, Br as LocalIdentifier, Bt as ReadResult, C as ClientOptions, Ci as ClientIdPolicy, Cn as TypeAccessor, Cr as PendingPlacement, Ct as MemberName, D as JsonApiTransport, Di as FilterFamilyDescriptor, Dn as TypedRelationReadQuery, Dr as ResourceLinks, Dt as MutationMetaOf, E as createClient, Ei as DocumentMetaOperation, En as TypedRelatedReadQuery, Er as ResourceEnvelope, Et as MetaOption, F as ActionCallOptions, Fi as PaginatorKind, Fn as WritableRelationName, Fr as relationWritten, Ft as PendingEdgeMethods, G as CountToken, Gi as RequestMetaOperation, Gn as AtomicHandle, Gr as nestedFieldset, Gt as RelatedQuery, H as Collection, Hi as RelatedQueryOperation, Hn as AtomicCreateHandle, Hr as ResourceIdentifier, Ht as RelatedIncludedResource, I as ActionsAccessor, Ii as PaginatorRole, In as WriteOptions, Ir as setMaterialisedOverlay, It as PendingPivotOf, J as CreateInput, Ji as ResourceExamples, Jn as AtomicRef, Jr as Page, Jt as RelatedQueryRelation, K as CountedRelationName, Ki as ResourceCountOperation, Kn as AtomicOperationArgs, Kr as CANONICAL_PAGE_KEYS, Kt as RelatedQueryEntry, L as AtomicResultOf, Li as PaginatorStrategy, Ln as WritePivotOf, Lr as ATOMIC_EXT, Lt as PivotFieldsOf, M as AcceptedJob, Mi as MetaLiteral, Mn as WaitedWriteResult, Mr as materialise, Mt as OperationMeta, N as AcceptedMeta, Ni as OperationExamples, Nn as WithDocumentMeta, Nr as relatedPaginator, Nt as OptionsArg, O as TransportRawBody, Oi as InputMedia, On as UpdateInput, Or as edgeViewOf, Ot as MutationVerb, P as AcceptedOf, Pi as PaginatorDescriptor, Pn as WithLinks, Pr as relatedPaginatorKind, Pt as PendingEdge, Q as DefaultWriteAttributes, Qi as isPolymorphic, Qn as AtomicResult, Qr as PageOf, Qt as RelationName, R as BinaryBody, Ri as PivotDescriptor, Rn as WriteResult, Rr as ATOMIC_MEDIA_TYPE, Rt as PivotInput, S as serializeQuery, Si as Cardinality, Sn as TakesVerb, Sr as PendingMember, St as LooseRelatedQueryEntry, T as HeadersInit, Ti as DocumentMetaDescriptor, Tn as TypedReadQuery, Tr as RelationView, Tt as MetaObject, U as CollectionMeta, Ui as RelationDescriptor, Un as AtomicCreateInput, Ur as mediaType, Ut as RelatedIncludedType, V as ClientTypes, Vi as RelatedQueryDescriptor, Vn as readActionLocation, Vr as MediaTypeParams, Vt as ReadableRelationName, W as CountAccessor, Wi as RelationMutations, Wn as AtomicDeleteHandle, Wr as NestedFieldset, Wt as RelatedMeta, X as DefaultActionTypes, Xi as SortFamilyDescriptor, Xn as AtomicRelationshipHandle, Xr as PageLinks, Xt as RelationCollection, Y as CreateMethod, Yi as ResourceMetaDescriptor, Yn as AtomicRelationshipArgs, Yr as PageKeys, Yt as RelatedReadRelatedQuery, Z as DefaultAttributes, Zi as StrategyDescriptor, Zn as AtomicRelationshipRecorder, Zr as PageMeta, Zt as RelationFilterQuery, _ as RawResponseType, _i as ActionScope, _n as SingleReadQuery, _r as LinkObject, _t as LinkageRef, a as ValidationOption, ai as resolvePaginator, an as RelationshipMembers, ar as InputValidationError, at as ErrorCodeOf, b as executeRaw, bi as ApiExamples, bn as SortQuery, br as NavigateOptions, bt as ListPageParams, c as assertJsonApiDocument, ci as PollTimeoutError, cn as ResourceAccessors, cr as StandardSchemaResult, ct as FilterKey, d as sparseSchemas, di as AcceptedDescriptor, dn as ResourceHandle, dr as ArrayEnvelope, dt as IdentifierMember, ei as PageParamsOf, en as RelationPaginator, er as AtomicUpdateHandle, et as DeleteResult, f as validateDocument, fi as AcceptedOperation, fn as ResourceMetaOf, fr as DocumentEnvelope, ft as IncludePath, g as JsonApiRequest, gi as ActionOutput, gn as ResourceWriteOperation, gr as Link, gt as IsSingleton, h as JsonApiContext, hi as ActionLocationDescriptor, hn as ResourceWriteMeta, hr as EdgeMember, ht as IncludedType, i as ValidationContext, ii as prevPageParams, in as RelationshipAccessor, ir as InputSchemas, it as ErrorCodeCarrier, j as fetchTransport, ji as MenuDescriptor, jn as WaitValue, jr as lateRelationsOf, jt as OperationErrorCodeOf, k as TransportRequest, ki as InputMediaKind, kn as UpdateMethod, kr as identifierViewOf, kt as NestedFieldsetMember, l as resolveValidator, li as isAccepted, ln as ResourceCountToken, lr as inputFailure, lt as FilterQuery, m as ExecutedResponse, mi as ActionInput, mn as ResourceObjectView, mr as EdgeEnvelope, mt as IncludedResource, n as SchemaMap, ni as TypedPage, nn as RelationRequestMetaOf, nr as runAtomic, nt as EdgeMembers, o as Validator, oi as Accepted, on as RequestMetaOf, or as StandardSchema, ot as FieldSelectionMap, p as Document, pi as ActionDescriptor, pn as ResourceMethods, pr as Edge, pt as IncludedRelations, q as CreateAttributesOf, qi as ResourceDescriptor, qn as AtomicRecorder, qr as ExactPageParams, qt as RelatedQueryParam, r as ValidationConfig, ri as nextPageParams, rn as RelationSortQuery, rr as InputCheck, rt as EdgeMethods, s as WireResource, si as PollOptions, sn as RequiresRequestMeta, sr as StandardSchemaIssue, st as FieldsMap, t as ResolvedValidator, ti as ResolvedPaginator, tn as RelationReadQuery, tr as AtomicUpdateInput, tt as DocumentMeta, u as sparseSchema, ui as parseRetryAfter, un as ResourceDataOf, ur as withInputCheck, ut as HydratedMember, v as ReadQuery, vi as AdditionalMembersDescriptor, vn as SingletonAccessor, vr as MaterialiseContext, vt as ListFilterMember, w as HANDLE_RESERVED, wi as CountableDescriptor, wn as TypeName, wr as RelationArrayEnvelope, wt as MemberTypeOf, x as executeResponse, xi as AtomicDescriptor, xn as SortToken, xr as PendingCreate, xt as LooseRelatedQuery, y as execute, yi as ApiDescriptor, yn as SingletonUpdateInput, yr as MaterialisedOverlay, yt as ListMethods, z as BinaryResponseType, zi as RawMediaKind, zn as ActionLocation, zr as JSON_API_MEDIA_TYPE, zt as ReadAttributesOf } from "./validate-DyNfTJ52.cjs";
|
|
2
2
|
|
|
3
|
+
//#region src/error-shared.d.ts
|
|
4
|
+
/** The {@link JsonApiError} members of `E`, read without distributing over a union such as a query's error. */
|
|
5
|
+
type JsonApiErrorOf<E> = Extract<NonNullable<E>, JsonApiError<string>>;
|
|
6
|
+
/** The codes `E`'s {@link JsonApiError} carries, else `Fallback`. */
|
|
7
|
+
type CodesOf<E, Fallback extends string = string> = [JsonApiErrorOf<E>] extends [never] ? Fallback : JsonApiErrorOf<E> extends JsonApiError<infer C> ? C : Fallback;
|
|
8
|
+
//#endregion
|
|
3
9
|
//#region src/errors.d.ts
|
|
4
10
|
/**
|
|
5
11
|
* A single JSON:API error object (spec: error objects).
|
|
@@ -83,11 +89,20 @@ declare class JsonApiError<C extends string = string> extends Error {
|
|
|
83
89
|
*/
|
|
84
90
|
declare function hasErrorCode(err: unknown, code: string): err is JsonApiError;
|
|
85
91
|
/**
|
|
86
|
-
*
|
|
92
|
+
* The codes `hasErrorCode` and `findError` take for an error typed `E`: the codes of the
|
|
93
|
+
* {@link JsonApiError} it holds, such as a query's `error` typed by the operation that raised it,
|
|
94
|
+
* else `C`, every code the server documents.
|
|
95
|
+
*/
|
|
96
|
+
type ErrorCodesFor<E, C extends string> = string extends CodesOf<E, C> ? C : CodesOf<E, C>;
|
|
97
|
+
/**
|
|
98
|
+
* {@link hasErrorCode} restricted to one server's documented codes, or to the codes `err`'s type
|
|
99
|
+
* carries. A generated client binds it:
|
|
87
100
|
* `export const hasErrorCode = hasErrorCodeRuntime as ErrorCodeGuard<ErrorCode>`. The cast is
|
|
88
101
|
* needed because `JsonApiError<string>` doesn't assign to `JsonApiError<ErrorCode>`.
|
|
89
102
|
*/
|
|
90
|
-
type ErrorCodeGuard<C extends string> = (err:
|
|
103
|
+
type ErrorCodeGuard<C extends string> = <E>(err: E, code: ErrorCodesFor<E, C>) => err is E & GuardedError<E, ErrorCodesFor<E, C>>;
|
|
104
|
+
/** What a matched guard narrows `E` to: its {@link JsonApiError} members, or one carrying `K`. */
|
|
105
|
+
type GuardedError<E, K extends string> = [JsonApiErrorOf<E>] extends [never] ? JsonApiError<K> : JsonApiErrorOf<E>;
|
|
91
106
|
/**
|
|
92
107
|
* An error object carrying the documented code `K`, its `meta` typed when the server declares
|
|
93
108
|
* one for the code. `M` is a generated client's `ErrorMetaByCode`; a code it does not list
|
|
@@ -105,11 +120,80 @@ type CodedErrorObject<K extends string, M = {}> = JsonApiErrorObject<K> & {
|
|
|
105
120
|
*/
|
|
106
121
|
declare function findError(err: unknown, code: string): JsonApiErrorObject | undefined;
|
|
107
122
|
/**
|
|
108
|
-
* {@link findError} restricted to one server's documented codes
|
|
109
|
-
* `
|
|
123
|
+
* {@link findError} restricted to one server's documented codes and their declared `meta`, or to
|
|
124
|
+
* the codes `err`'s type carries. A generated client binds it:
|
|
110
125
|
* `export const findError = findErrorRuntime as ErrorFinder<ErrorCode, ErrorMetaByCode>`.
|
|
111
126
|
*/
|
|
112
|
-
type ErrorFinder<C extends string, M = {}> = <K extends C
|
|
127
|
+
type ErrorFinder<C extends string, M = {}> = <E, K extends ErrorCodesFor<E, C>>(err: E, code: K) => CodedErrorObject<K, M> | undefined;
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/field-errors.d.ts
|
|
130
|
+
/** One segment of a Standard Schema issue path: a key, or an array index. */
|
|
131
|
+
type PathSegment = string | number;
|
|
132
|
+
/**
|
|
133
|
+
* One error shaped as a Standard Schema issue (`message` plus `path` segments), so a form library
|
|
134
|
+
* that takes Standard Schema issues takes it as is.
|
|
135
|
+
*/
|
|
136
|
+
interface FieldError<C extends string = string> {
|
|
137
|
+
/** The error's `detail`, else its `title`, else its `code`. */
|
|
138
|
+
readonly message: string;
|
|
139
|
+
/** The input path as segments: `orderedTracks[0].$pivot.position` is `['orderedTracks', 0, '$pivot', 'position']`. Empty for a form-level error. */
|
|
140
|
+
readonly path: readonly PathSegment[];
|
|
141
|
+
/** The input path as the runtime keys it, `''` for a form-level error. */
|
|
142
|
+
readonly key: string;
|
|
143
|
+
readonly code?: C | (string & {});
|
|
144
|
+
/** The failing operation's index in an atomic batch. */
|
|
145
|
+
readonly opIndex?: number;
|
|
146
|
+
/** The error object as the server sent it, with its remapped `path`. Absent for an {@link InputValidationError}'s issue. */
|
|
147
|
+
readonly error?: JsonApiErrorObject<C>;
|
|
148
|
+
}
|
|
149
|
+
/** A write's errors for a form, split into the inputs they point at and the rest. */
|
|
150
|
+
interface FieldErrors<I = unknown, C extends string = string> {
|
|
151
|
+
/** Errors on an input, grouped by its path. */
|
|
152
|
+
readonly fields: Readonly<Record<string, readonly FieldError<C>[]>>;
|
|
153
|
+
/** Errors that point at no input: no `source`, a `source.parameter` or `source.header`, or a pointer the client owns, such as `/data/type`. */
|
|
154
|
+
readonly form: readonly FieldError<C>[];
|
|
155
|
+
/** Every error, in the order the server sent them. */
|
|
156
|
+
readonly issues: readonly FieldError<C>[];
|
|
157
|
+
/** The first message on the input at `path`. */
|
|
158
|
+
first(path: InputPath<I>): string | undefined;
|
|
159
|
+
/** Every message on the input at `path`. */
|
|
160
|
+
messages(path: InputPath<I>): string[];
|
|
161
|
+
/** Only the errors of the atomic operation at `index`. */
|
|
162
|
+
op(index: number): FieldErrors<unknown, C>;
|
|
163
|
+
}
|
|
164
|
+
declare const writeInput: unique symbol;
|
|
165
|
+
/**
|
|
166
|
+
* A {@link JsonApiError} tagged with the input of the write that raised it, at the type level
|
|
167
|
+
* only, so {@link fieldErrors} types its paths without a type argument.
|
|
168
|
+
*/
|
|
169
|
+
type WriteError<C extends string = string, I = unknown> = JsonApiError<C> & {
|
|
170
|
+
readonly [writeInput]?: I;
|
|
171
|
+
};
|
|
172
|
+
type InputOf<E> = [JsonApiErrorOf<E>] extends [never] ? unknown : JsonApiErrorOf<E> extends {
|
|
173
|
+
readonly [writeInput]?: infer I;
|
|
174
|
+
} ? I : unknown;
|
|
175
|
+
type Scalar = string | number | boolean | bigint | symbol | Date;
|
|
176
|
+
/** The next depth down; the paths stop at four levels of nesting. */
|
|
177
|
+
type Deeper = [never, 0, 1, 2, 3];
|
|
178
|
+
/**
|
|
179
|
+
* Every path the runtime can key an error on for write input `I`: attribute keys, nested map
|
|
180
|
+
* keys joined with `.`, to-many members as `[n]` with their `$pivot` fields, `$meta` members, and
|
|
181
|
+
* `$documentMeta` members. A union-typed value contributes only the keys its members share. Any
|
|
182
|
+
* string when `I` is unknown.
|
|
183
|
+
*/
|
|
184
|
+
type InputPath<I> = unknown extends I ? string : KeyPaths<I, 4> | `$documentMeta.${string}`;
|
|
185
|
+
type KeyPaths<T, D extends number> = [D] extends [never] ? never : [T] extends [object] ? { [K in keyof T & string]-?: K | `${K}${SubPaths<NonNullable<T[K]>, D>}` }[keyof T & string] : never;
|
|
186
|
+
type SubPaths<V, D extends number> = [V] extends [never] ? never : [V] extends [readonly (infer M)[]] ? `[${number}]` | `[${number}]${MemberPaths<NonNullable<M>, D>}` : MemberPaths<V, D>;
|
|
187
|
+
type MemberPaths<V, D extends number> = [V] extends [Scalar] ? never : 'type' extends keyof V ? [V] extends [{
|
|
188
|
+
$pivot?: infer P;
|
|
189
|
+
}] ? P extends object ? '.$pivot' | `.$pivot.${keyof P & string}` : never : never : `.${KeyPaths<V, Deeper[D]>}`;
|
|
190
|
+
/**
|
|
191
|
+
* The 4xx `error`'s errors keyed by the write input they point at, or `undefined` when `error`
|
|
192
|
+
* is not a 4xx {@link JsonApiError} or none of its errors points at an input. An
|
|
193
|
+
* {@link InputValidationError} gives its issues the same way. Pass the input type when `error`
|
|
194
|
+
* carries none: `fieldErrors<Parameters<typeof client.albums.create>[0]>(caught)`.
|
|
195
|
+
*/
|
|
196
|
+
declare function fieldErrors<I = never, E = unknown>(error: E): FieldErrors<[I] extends [never] ? InputOf<E> : I, CodesOf<E>> | undefined;
|
|
113
197
|
//#endregion
|
|
114
198
|
//#region src/filters.d.ts
|
|
115
199
|
/** The filter vocabulary {@link listFilterMatcher} reads: a type's, or a collection action's. */
|
|
@@ -146,6 +230,24 @@ interface LoadAllOptions {
|
|
|
146
230
|
*/
|
|
147
231
|
declare function loadAll<T>(first: Collection<T> | PromiseLike<Collection<T>>, options?: LoadAllOptions): Promise<T[]>;
|
|
148
232
|
//#endregion
|
|
233
|
+
//#region src/mock.d.ts
|
|
234
|
+
/** One resource as plain data: `type`, `id`, attributes, and relation values by name. */
|
|
235
|
+
interface MockData {
|
|
236
|
+
readonly type: string;
|
|
237
|
+
readonly id: string;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Build a materialised resource from its plain data, as a read returns it: the relations the data
|
|
241
|
+
* nests hydrate, the identifiers stay identifiers, and each member's `$pivot` lands on its linkage
|
|
242
|
+
* `meta.pivot`, so `$pivot`, `$edge`, `$rel` and `$count` all work. For tests and stories; the
|
|
243
|
+
* generated client binds it to its descriptor and types it.
|
|
244
|
+
*/
|
|
245
|
+
declare function mockResource(descriptor: ApiDescriptor, data: MockData): object;
|
|
246
|
+
/** {@link mockResource} for a collection of type `type`, as a list read returns it. */
|
|
247
|
+
declare function mockCollection(descriptor: ApiDescriptor, type: string, data: readonly MockData[]): object;
|
|
248
|
+
/** The JSON:API document plain data stands for: the primary data, and every nested resource in `included`. */
|
|
249
|
+
declare function mockDocument(descriptor: ApiDescriptor, data: MockData | readonly MockData[]): Document;
|
|
250
|
+
//#endregion
|
|
149
251
|
//#region src/request-stamp.d.ts
|
|
150
252
|
/**
|
|
151
253
|
* Request stamps: when the request behind a result started, relative to every other request made in
|
|
@@ -332,5 +434,5 @@ declare function withRemappedAtomicPaths(error: JsonApiError, descriptor: ApiDes
|
|
|
332
434
|
hasPivot: boolean;
|
|
333
435
|
} | undefined): JsonApiError;
|
|
334
436
|
//#endregion
|
|
335
|
-
export { ATOMIC_EXT, ATOMIC_MEDIA_TYPE, type Accepted, AcceptedDescriptor, AcceptedJob, AcceptedMeta, AcceptedOf, AcceptedOperation, ActionCallOptions, ActionDescriptor, ActionInput, ActionLocation, ActionLocationDescriptor, ActionOutput, ActionScope, ActionsAccessor, AdditionalMembersDescriptor, ApiDescriptor, ApiExamples, ArrayEnvelope, AtomicCreateHandle, AtomicCreateInput, AtomicDeleteHandle, AtomicDescriptor, AtomicHandle, AtomicOperationArgs, AtomicRecorder, AtomicRef, AtomicRelationshipArgs, AtomicRelationshipHandle, AtomicRelationshipRecorder, AtomicResult, AtomicResultOf, AtomicResults, AtomicUpdateHandle, AtomicUpdateInput, BinaryBody, BinaryResponseType, CANONICAL_PAGE_KEYS, Cardinality, Client, ClientIdPolicy, ClientOptions, CodedErrorObject, Collection, CollectionMeta, CountAccessor, CountToken, CountableDescriptor, CountedRelationName, CreateAttributesOf, CreateInput, CreateMethod, DefaultActionTypes, DefaultAttributes, DefaultWriteAttributes, DeleteArgs, DeleteResult, Document, DocumentEnvelope, DocumentMeta, DocumentMetaDescriptor, DocumentMetaOperation, Edge, EdgeEnvelope, EdgeMember, EdgeMembers, ErrorCodeGuard, ErrorCodeOf, ErrorFinder, ExactPageParams, ExecutedResponse, FieldSelectionMap, FieldsMap, FilterFamilyDescriptor, FilterKey, FilterQuery, FilterSpec, HANDLE_RESERVED, HeadersInit, HydratedMember, IdentifierMember, IncludePath, IncludedRelations, IncludedResource, IncludedType, InputMedia, InputMediaKind, IsSingleton, JSON_API_MEDIA_TYPE, JsonApiContext, JsonApiError, JsonApiErrorObject, JsonApiRequest, JsonApiTransport, Link, LinkObject, LinkageRef, ListFilterMember, ListPageParams, LoadAllOptions, LocalIdentifier, LooseRelatedQuery, LooseRelatedQueryEntry, MaterialiseContext, MaterialisedOverlay, MediaExamples, MediaTypeParams, MemberName, MemberTypeOf, MenuDescriptor, MetaLiteral, MetaObject, MetaOption, MutationMetaOf, MutationVerb, NavigateOptions, type NestedFieldset, NestedFieldsetMember, OperationExamples, OperationMeta, OptionsArg, Page, PageKeys, PageLinks, PageMeta, PageOf, PageParams, PageParamsOf, PaginatorDescriptor, PaginatorKind, PaginatorRole, PaginatorStrategy, PendingCreate, PendingMember, PendingPlacement, PivotDescriptor, PivotFieldsOf, PivotInput, type PollOptions, PollTimeoutError, RawMediaKind, RawOutputMedia, RawResponseType, ReadAttributesOf, ReadQuery, ReadResult, ReadableRelationName, RelatedIncludedResource, RelatedIncludedType, RelatedMeta, RelatedQuery, RelatedQueryDescriptor, RelatedQueryEntry, RelatedQueryOperation, RelatedQueryParam, RelatedQueryRelation, RelatedReadRelatedQuery, RelationArrayEnvelope, RelationCollection, RelationDescriptor, RelationFilterQuery, RelationMutations, RelationName, RelationPageParams, RelationPaginator, RelationReadQuery, RelationRequestMetaOf, RelationSortQuery, RelationView, RelationshipAccessor, RelationshipDocument, RelationshipMembers, RequestMetaOf, RequestMetaOperation, RequiresRequestMeta, ResolvedPaginator, ResolvedValidator, ResourceAccessors, ResourceCountOperation, ResourceCountToken, ResourceDescriptor, ResourceEnvelope, ResourceExamples, ResourceHandle, ResourceIdentifier, ResourceLinks, ResourceMetaDescriptor, ResourceMetaOf, ResourceObjectView, ResourceWriteMeta, ResourceWriteOperation, SchemaMap, SingleReadQuery, SingletonAccessor, SingletonUpdateInput, SortFamilyDescriptor, SortQuery, SortToken, StrategyDescriptor, StructuralGuardError, TakesVerb, ToDocumentOptions, TransportRawBody, TransportRequest, TransportResponse, TypeAccessor, TypeName, TypedPage, TypedReadQuery, TypedRelatedReadQuery, TypedRelationReadQuery, UpdateInput, UpdateMethod, ValidationConfig, ValidationContext, ValidationOption, Validator, WaitOptions, WaitValue, WaitedWriteResult, WireResource, WithDocumentMeta, WithLinks, WritableRelationName, WriteDocument, WriteOptions, WritePivotOf, WriteResult, assertJsonApiDocument, createClient, edgeViewOf, execute, executeRaw, executeResponse, fetchTransport, findError, hasErrorCode, identifierViewOf, isAccepted, isActionLocation, isMaterialised, isPolymorphic, listFilterMatcher, loadAll, materialise, mediaType, nestedFieldset, nextPageParams, nextRequestStamp, parseRetryAfter, prevPageParams, readActionLocation, relatedPaginator, relatedPaginatorKind, remapPointer, remapRelationshipPointer, requestStampOf, resolvePaginator, resolveValidator, runAtomic, serializeQuery, setMaterialisedOverlay, sparseSchema, sparseSchemas, toDocument, toRelationshipDocument, validateDocument, withRemappedAtomicPaths, withRemappedDocumentMetaPaths, withRemappedPaths, withRemappedRelationshipPaths, withTopLevelMeta };
|
|
437
|
+
export { ATOMIC_EXT, ATOMIC_MEDIA_TYPE, type Accepted, AcceptedDescriptor, AcceptedJob, AcceptedMeta, AcceptedOf, AcceptedOperation, ActionCallOptions, ActionDescriptor, ActionInput, ActionLocation, ActionLocationDescriptor, ActionOutput, ActionScope, ActionsAccessor, AdditionalMembersDescriptor, ApiDescriptor, ApiExamples, ArrayEnvelope, AtomicCreateHandle, AtomicCreateInput, AtomicDeleteHandle, AtomicDescriptor, AtomicHandle, AtomicOperationArgs, AtomicRecorder, AtomicRef, AtomicRelationshipArgs, AtomicRelationshipHandle, AtomicRelationshipRecorder, AtomicResult, AtomicResultOf, AtomicResults, AtomicUpdateHandle, AtomicUpdateInput, BinaryBody, BinaryResponseType, CANONICAL_PAGE_KEYS, Cardinality, Client, ClientIdPolicy, ClientOptions, ClientTypes, CodedErrorObject, Collection, CollectionMeta, CountAccessor, CountToken, CountableDescriptor, CountedRelationName, CreateAttributesOf, CreateInput, CreateMethod, DefaultActionTypes, DefaultAttributes, DefaultWriteAttributes, DeleteArgs, DeleteResult, Document, DocumentEnvelope, DocumentMeta, DocumentMetaDescriptor, DocumentMetaOperation, Edge, EdgeEnvelope, EdgeMember, EdgeMembers, EdgeMethods, ErrorCodeCarrier, ErrorCodeGuard, ErrorCodeOf, ErrorCodesFor, ErrorFinder, ExactPageParams, ExecutedResponse, FieldError, FieldErrors, FieldSelectionMap, FieldsMap, FilterFamilyDescriptor, FilterKey, FilterQuery, FilterSpec, HANDLE_RESERVED, HeadersInit, HydratedMember, IdentifierMember, IncludePath, IncludedRelations, IncludedResource, IncludedType, InputCheck, InputMedia, InputMediaKind, InputPath, InputSchemas, InputValidationError, IsSingleton, JSON_API_MEDIA_TYPE, JsonApiContext, JsonApiError, JsonApiErrorObject, JsonApiRequest, JsonApiTransport, Link, LinkObject, LinkageRef, ListFilterMember, ListMethods, ListPageParams, LoadAllOptions, LocalIdentifier, LooseRelatedQuery, LooseRelatedQueryEntry, MaterialiseContext, MaterialisedOverlay, MediaExamples, MediaTypeParams, MemberName, MemberTypeOf, MenuDescriptor, MetaLiteral, MetaObject, MetaOption, MockData, MutationMetaOf, MutationVerb, NavigateOptions, type NestedFieldset, NestedFieldsetMember, OperationCodes, OperationErrorCodeOf, OperationExamples, OperationMeta, OptionsArg, Page, PageKeys, PageLinks, PageMeta, PageOf, PageParams, PageParamsOf, PaginatorDescriptor, PaginatorKind, PaginatorRole, PaginatorStrategy, PathSegment, PendingCreate, PendingEdge, PendingEdgeMethods, PendingMember, PendingPivotOf, PendingPlacement, PivotDescriptor, PivotFieldsOf, PivotInput, type PollOptions, PollTimeoutError, RawMediaKind, RawOutputMedia, RawResponseType, ReadAttributesOf, ReadQuery, ReadResult, ReadableRelationName, RelatedIncludedResource, RelatedIncludedType, RelatedMeta, RelatedQuery, RelatedQueryDescriptor, RelatedQueryEntry, RelatedQueryOperation, RelatedQueryParam, RelatedQueryRelation, RelatedReadRelatedQuery, RelationArrayEnvelope, RelationCollection, RelationDescriptor, RelationFilterQuery, RelationMutations, RelationName, RelationPageParams, RelationPaginator, RelationReadQuery, RelationRequestMetaOf, RelationSortQuery, RelationView, RelationshipAccessor, RelationshipDocument, RelationshipMembers, RequestMetaOf, RequestMetaOperation, RequiresRequestMeta, ResolvedPaginator, ResolvedValidator, ResourceAccessors, ResourceCountOperation, ResourceCountToken, ResourceDataOf, ResourceDescriptor, ResourceEnvelope, ResourceExamples, ResourceHandle, ResourceIdentifier, ResourceLinks, ResourceMetaDescriptor, ResourceMetaOf, ResourceMethods, ResourceObjectView, ResourceWriteMeta, ResourceWriteOperation, SchemaMap, SingleReadQuery, SingletonAccessor, SingletonUpdateInput, SortFamilyDescriptor, SortQuery, SortToken, StandardSchema, StandardSchemaIssue, StandardSchemaResult, StrategyDescriptor, StructuralGuardError, TakesVerb, ToDocumentOptions, TransportRawBody, TransportRequest, TransportResponse, TypeAccessor, TypeName, TypedPage, TypedReadQuery, TypedRelatedReadQuery, TypedRelationReadQuery, UpdateInput, UpdateMethod, ValidationConfig, ValidationContext, ValidationOption, Validator, WaitOptions, WaitValue, WaitedWriteResult, WireResource, WithDocumentMeta, WithLinks, WritableRelationName, WriteDocument, WriteError, WriteOptions, WritePivotOf, WriteResult, assertJsonApiDocument, createClient, edgeViewOf, execute, executeRaw, executeResponse, fetchTransport, fieldErrors, findError, hasErrorCode, identifierViewOf, inputFailure, isAccepted, isActionLocation, isMaterialised, isPolymorphic, lateRelationsOf, listFilterMatcher, loadAll, materialise, mediaType, mockCollection, mockDocument, mockResource, nestedFieldset, nextPageParams, nextRequestStamp, parseRetryAfter, prevPageParams, readActionLocation, relatedPaginator, relatedPaginatorKind, relationWritten, remapPointer, remapRelationshipPointer, requestStampOf, resolvePaginator, resolveValidator, runAtomic, serializeQuery, setMaterialisedOverlay, sparseSchema, sparseSchemas, toDocument, toRelationshipDocument, validateDocument, withInputCheck, withRemappedAtomicPaths, withRemappedDocumentMetaPaths, withRemappedPaths, withRemappedRelationshipPaths, withTopLevelMeta };
|
|
336
438
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/errors.ts","../src/filters.ts","../src/load-all.ts","../src/request-stamp.ts","../src/serialize-write.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/error-shared.ts","../src/errors.ts","../src/field-errors.ts","../src/filters.ts","../src/load-all.ts","../src/mock.ts","../src/request-stamp.ts","../src/serialize-write.ts"],"mappings":";;;;KAGY,cAAA,MAAoB,OAAA,CAAQ,WAAA,CAAY,CAAA,GAAI,YAAA;AAAxD;AAAA,KAGY,OAAA,yCAAgD,cAAA,CAAe,CAAA,qBACvE,QAAA,GACA,cAAA,CAAe,CAAA,UAAW,YAAA,YACxB,CAAA,GACA,QAAA;;;;;AAPN;;;;;UCMiB,kBAAA;EACf,EAAA;EACA,MAAA;EACA,IAAA,GAAO,CAAA;EACP,KAAA;EACA,MAAA;EACA,MAAA;IAAW,OAAA;IAAkB,SAAA;IAAoB,MAAA;EAAA;EACjD,IAAA,GAAO,MAAM;EDVI;;;;;ECgBjB,IAAA;EDdE;;;;;ECoBF,OAAA;AAAA;;;;;;;;cAUW,oBAAA,SAA6B,KAAK;cAC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CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as DeleteArgs, $n as AtomicResults, $r as PageParams, $t as RelationPageParams, A as TransportResponse, Ai as MediaExamples, An as WaitOptions, Ar as isMaterialised, At as OperationCodes, B as Client, Bi as RawOutputMedia, Bn as isActionLocation, Br as LocalIdentifier, Bt as ReadResult, C as ClientOptions, Ci as ClientIdPolicy, Cn as TypeAccessor, Cr as PendingPlacement, Ct as MemberName, D as JsonApiTransport, Di as FilterFamilyDescriptor, Dn as TypedRelationReadQuery, Dr as ResourceLinks, Dt as MutationMetaOf, E as createClient, Ei as DocumentMetaOperation, En as TypedRelatedReadQuery, Er as ResourceEnvelope, Et as MetaOption, F as ActionCallOptions, Fi as PaginatorKind, Fn as WritableRelationName, Fr as relationWritten, Ft as PendingEdgeMethods, G as CountToken, Gi as RequestMetaOperation, Gn as AtomicHandle, Gr as nestedFieldset, Gt as RelatedQuery, H as Collection, Hi as RelatedQueryOperation, Hn as AtomicCreateHandle, Hr as ResourceIdentifier, Ht as RelatedIncludedResource, I as ActionsAccessor, Ii as PaginatorRole, In as WriteOptions, Ir as setMaterialisedOverlay, It as PendingPivotOf, J as CreateInput, Ji as ResourceExamples, Jn as AtomicRef, Jr as Page, Jt as RelatedQueryRelation, K as CountedRelationName, Ki as ResourceCountOperation, Kn as AtomicOperationArgs, Kr as CANONICAL_PAGE_KEYS, Kt as RelatedQueryEntry, L as AtomicResultOf, Li as PaginatorStrategy, Ln as WritePivotOf, Lr as ATOMIC_EXT, Lt as PivotFieldsOf, M as AcceptedJob, Mi as MetaLiteral, Mn as WaitedWriteResult, Mr as materialise, Mt as OperationMeta, N as AcceptedMeta, Ni as OperationExamples, Nn as WithDocumentMeta, Nr as relatedPaginator, Nt as OptionsArg, O as TransportRawBody, Oi as InputMedia, On as UpdateInput, Or as edgeViewOf, Ot as MutationVerb, P as AcceptedOf, Pi as PaginatorDescriptor, Pn as WithLinks, Pr as relatedPaginatorKind, Pt as PendingEdge, Q as DefaultWriteAttributes, Qi as isPolymorphic, Qn as AtomicResult, Qr as PageOf, Qt as RelationName, R as BinaryBody, Ri as PivotDescriptor, Rn as WriteResult, Rr as ATOMIC_MEDIA_TYPE, Rt as PivotInput, S as serializeQuery, Si as Cardinality, Sn as TakesVerb, Sr as PendingMember, St as LooseRelatedQueryEntry, T as HeadersInit, Ti as DocumentMetaDescriptor, Tn as TypedReadQuery, Tr as RelationView, Tt as MetaObject, U as CollectionMeta, Ui as RelationDescriptor, Un as AtomicCreateInput, Ur as mediaType, Ut as RelatedIncludedType, V as ClientTypes, Vi as RelatedQueryDescriptor, Vn as readActionLocation, Vr as MediaTypeParams, Vt as ReadableRelationName, W as CountAccessor, Wi as RelationMutations, Wn as AtomicDeleteHandle, Wr as NestedFieldset, Wt as RelatedMeta, X as DefaultActionTypes, Xi as SortFamilyDescriptor, Xn as AtomicRelationshipHandle, Xr as PageLinks, Xt as RelationCollection, Y as CreateMethod, Yi as ResourceMetaDescriptor, Yn as AtomicRelationshipArgs, Yr as PageKeys, Yt as RelatedReadRelatedQuery, Z as DefaultAttributes, Zi as StrategyDescriptor, Zn as AtomicRelationshipRecorder, Zr as PageMeta, Zt as RelationFilterQuery, _ as RawResponseType, _i as ActionScope, _n as SingleReadQuery, _r as LinkObject, _t as LinkageRef, a as ValidationOption, ai as resolvePaginator, an as RelationshipMembers, ar as InputValidationError, at as ErrorCodeOf, b as executeRaw, bi as ApiExamples, bn as SortQuery, br as NavigateOptions, bt as ListPageParams, c as assertJsonApiDocument, ci as PollTimeoutError, cn as ResourceAccessors, cr as StandardSchemaResult, ct as FilterKey, d as sparseSchemas, di as AcceptedDescriptor, dn as ResourceHandle, dr as ArrayEnvelope, dt as IdentifierMember, ei as PageParamsOf, en as RelationPaginator, er as AtomicUpdateHandle, et as DeleteResult, f as validateDocument, fi as AcceptedOperation, fn as ResourceMetaOf, fr as DocumentEnvelope, ft as IncludePath, g as JsonApiRequest, gi as ActionOutput, gn as ResourceWriteOperation, gr as Link, gt as IsSingleton, h as JsonApiContext, hi as ActionLocationDescriptor, hn as ResourceWriteMeta, hr as EdgeMember, ht as IncludedType, i as ValidationContext, ii as prevPageParams, in as RelationshipAccessor, ir as InputSchemas, it as ErrorCodeCarrier, j as fetchTransport, ji as MenuDescriptor, jn as WaitValue, jr as lateRelationsOf, jt as OperationErrorCodeOf, k as TransportRequest, ki as InputMediaKind, kn as UpdateMethod, kr as identifierViewOf, kt as NestedFieldsetMember, l as resolveValidator, li as isAccepted, ln as ResourceCountToken, lr as inputFailure, lt as FilterQuery, m as ExecutedResponse, mi as ActionInput, mn as ResourceObjectView, mr as EdgeEnvelope, mt as IncludedResource, n as SchemaMap, ni as TypedPage, nn as RelationRequestMetaOf, nr as runAtomic, nt as EdgeMembers, o as Validator, oi as Accepted, on as RequestMetaOf, or as StandardSchema, ot as FieldSelectionMap, p as Document, pi as ActionDescriptor, pn as ResourceMethods, pr as Edge, pt as IncludedRelations, q as CreateAttributesOf, qi as ResourceDescriptor, qn as AtomicRecorder, qr as ExactPageParams, qt as RelatedQueryParam, r as ValidationConfig, ri as nextPageParams, rn as RelationSortQuery, rr as InputCheck, rt as EdgeMethods, s as WireResource, si as PollOptions, sn as RequiresRequestMeta, sr as StandardSchemaIssue, st as FieldsMap, t as ResolvedValidator, ti as ResolvedPaginator, tn as RelationReadQuery, tr as AtomicUpdateInput, tt as DocumentMeta, u as sparseSchema, ui as parseRetryAfter, un as ResourceDataOf, ur as withInputCheck, ut as HydratedMember, v as ReadQuery, vi as AdditionalMembersDescriptor, vn as SingletonAccessor, vr as MaterialiseContext, vt as ListFilterMember, w as HANDLE_RESERVED, wi as CountableDescriptor, wn as TypeName, wr as RelationArrayEnvelope, wt as MemberTypeOf, x as executeResponse, xi as AtomicDescriptor, xn as SortToken, xr as PendingCreate, xt as LooseRelatedQuery, y as execute, yi as ApiDescriptor, yn as SingletonUpdateInput, yr as MaterialisedOverlay, yt as ListMethods, z as BinaryResponseType, zi as RawMediaKind, zn as ActionLocation, zr as JSON_API_MEDIA_TYPE, zt as ReadAttributesOf } from "./validate-DyNfTJ52.mjs";
|
|
2
2
|
|
|
3
|
+
//#region src/error-shared.d.ts
|
|
4
|
+
/** The {@link JsonApiError} members of `E`, read without distributing over a union such as a query's error. */
|
|
5
|
+
type JsonApiErrorOf<E> = Extract<NonNullable<E>, JsonApiError<string>>;
|
|
6
|
+
/** The codes `E`'s {@link JsonApiError} carries, else `Fallback`. */
|
|
7
|
+
type CodesOf<E, Fallback extends string = string> = [JsonApiErrorOf<E>] extends [never] ? Fallback : JsonApiErrorOf<E> extends JsonApiError<infer C> ? C : Fallback;
|
|
8
|
+
//#endregion
|
|
3
9
|
//#region src/errors.d.ts
|
|
4
10
|
/**
|
|
5
11
|
* A single JSON:API error object (spec: error objects).
|
|
@@ -83,11 +89,20 @@ declare class JsonApiError<C extends string = string> extends Error {
|
|
|
83
89
|
*/
|
|
84
90
|
declare function hasErrorCode(err: unknown, code: string): err is JsonApiError;
|
|
85
91
|
/**
|
|
86
|
-
*
|
|
92
|
+
* The codes `hasErrorCode` and `findError` take for an error typed `E`: the codes of the
|
|
93
|
+
* {@link JsonApiError} it holds, such as a query's `error` typed by the operation that raised it,
|
|
94
|
+
* else `C`, every code the server documents.
|
|
95
|
+
*/
|
|
96
|
+
type ErrorCodesFor<E, C extends string> = string extends CodesOf<E, C> ? C : CodesOf<E, C>;
|
|
97
|
+
/**
|
|
98
|
+
* {@link hasErrorCode} restricted to one server's documented codes, or to the codes `err`'s type
|
|
99
|
+
* carries. A generated client binds it:
|
|
87
100
|
* `export const hasErrorCode = hasErrorCodeRuntime as ErrorCodeGuard<ErrorCode>`. The cast is
|
|
88
101
|
* needed because `JsonApiError<string>` doesn't assign to `JsonApiError<ErrorCode>`.
|
|
89
102
|
*/
|
|
90
|
-
type ErrorCodeGuard<C extends string> = (err:
|
|
103
|
+
type ErrorCodeGuard<C extends string> = <E>(err: E, code: ErrorCodesFor<E, C>) => err is E & GuardedError<E, ErrorCodesFor<E, C>>;
|
|
104
|
+
/** What a matched guard narrows `E` to: its {@link JsonApiError} members, or one carrying `K`. */
|
|
105
|
+
type GuardedError<E, K extends string> = [JsonApiErrorOf<E>] extends [never] ? JsonApiError<K> : JsonApiErrorOf<E>;
|
|
91
106
|
/**
|
|
92
107
|
* An error object carrying the documented code `K`, its `meta` typed when the server declares
|
|
93
108
|
* one for the code. `M` is a generated client's `ErrorMetaByCode`; a code it does not list
|
|
@@ -105,11 +120,80 @@ type CodedErrorObject<K extends string, M = {}> = JsonApiErrorObject<K> & {
|
|
|
105
120
|
*/
|
|
106
121
|
declare function findError(err: unknown, code: string): JsonApiErrorObject | undefined;
|
|
107
122
|
/**
|
|
108
|
-
* {@link findError} restricted to one server's documented codes
|
|
109
|
-
* `
|
|
123
|
+
* {@link findError} restricted to one server's documented codes and their declared `meta`, or to
|
|
124
|
+
* the codes `err`'s type carries. A generated client binds it:
|
|
110
125
|
* `export const findError = findErrorRuntime as ErrorFinder<ErrorCode, ErrorMetaByCode>`.
|
|
111
126
|
*/
|
|
112
|
-
type ErrorFinder<C extends string, M = {}> = <K extends C
|
|
127
|
+
type ErrorFinder<C extends string, M = {}> = <E, K extends ErrorCodesFor<E, C>>(err: E, code: K) => CodedErrorObject<K, M> | undefined;
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/field-errors.d.ts
|
|
130
|
+
/** One segment of a Standard Schema issue path: a key, or an array index. */
|
|
131
|
+
type PathSegment = string | number;
|
|
132
|
+
/**
|
|
133
|
+
* One error shaped as a Standard Schema issue (`message` plus `path` segments), so a form library
|
|
134
|
+
* that takes Standard Schema issues takes it as is.
|
|
135
|
+
*/
|
|
136
|
+
interface FieldError<C extends string = string> {
|
|
137
|
+
/** The error's `detail`, else its `title`, else its `code`. */
|
|
138
|
+
readonly message: string;
|
|
139
|
+
/** The input path as segments: `orderedTracks[0].$pivot.position` is `['orderedTracks', 0, '$pivot', 'position']`. Empty for a form-level error. */
|
|
140
|
+
readonly path: readonly PathSegment[];
|
|
141
|
+
/** The input path as the runtime keys it, `''` for a form-level error. */
|
|
142
|
+
readonly key: string;
|
|
143
|
+
readonly code?: C | (string & {});
|
|
144
|
+
/** The failing operation's index in an atomic batch. */
|
|
145
|
+
readonly opIndex?: number;
|
|
146
|
+
/** The error object as the server sent it, with its remapped `path`. Absent for an {@link InputValidationError}'s issue. */
|
|
147
|
+
readonly error?: JsonApiErrorObject<C>;
|
|
148
|
+
}
|
|
149
|
+
/** A write's errors for a form, split into the inputs they point at and the rest. */
|
|
150
|
+
interface FieldErrors<I = unknown, C extends string = string> {
|
|
151
|
+
/** Errors on an input, grouped by its path. */
|
|
152
|
+
readonly fields: Readonly<Record<string, readonly FieldError<C>[]>>;
|
|
153
|
+
/** Errors that point at no input: no `source`, a `source.parameter` or `source.header`, or a pointer the client owns, such as `/data/type`. */
|
|
154
|
+
readonly form: readonly FieldError<C>[];
|
|
155
|
+
/** Every error, in the order the server sent them. */
|
|
156
|
+
readonly issues: readonly FieldError<C>[];
|
|
157
|
+
/** The first message on the input at `path`. */
|
|
158
|
+
first(path: InputPath<I>): string | undefined;
|
|
159
|
+
/** Every message on the input at `path`. */
|
|
160
|
+
messages(path: InputPath<I>): string[];
|
|
161
|
+
/** Only the errors of the atomic operation at `index`. */
|
|
162
|
+
op(index: number): FieldErrors<unknown, C>;
|
|
163
|
+
}
|
|
164
|
+
declare const writeInput: unique symbol;
|
|
165
|
+
/**
|
|
166
|
+
* A {@link JsonApiError} tagged with the input of the write that raised it, at the type level
|
|
167
|
+
* only, so {@link fieldErrors} types its paths without a type argument.
|
|
168
|
+
*/
|
|
169
|
+
type WriteError<C extends string = string, I = unknown> = JsonApiError<C> & {
|
|
170
|
+
readonly [writeInput]?: I;
|
|
171
|
+
};
|
|
172
|
+
type InputOf<E> = [JsonApiErrorOf<E>] extends [never] ? unknown : JsonApiErrorOf<E> extends {
|
|
173
|
+
readonly [writeInput]?: infer I;
|
|
174
|
+
} ? I : unknown;
|
|
175
|
+
type Scalar = string | number | boolean | bigint | symbol | Date;
|
|
176
|
+
/** The next depth down; the paths stop at four levels of nesting. */
|
|
177
|
+
type Deeper = [never, 0, 1, 2, 3];
|
|
178
|
+
/**
|
|
179
|
+
* Every path the runtime can key an error on for write input `I`: attribute keys, nested map
|
|
180
|
+
* keys joined with `.`, to-many members as `[n]` with their `$pivot` fields, `$meta` members, and
|
|
181
|
+
* `$documentMeta` members. A union-typed value contributes only the keys its members share. Any
|
|
182
|
+
* string when `I` is unknown.
|
|
183
|
+
*/
|
|
184
|
+
type InputPath<I> = unknown extends I ? string : KeyPaths<I, 4> | `$documentMeta.${string}`;
|
|
185
|
+
type KeyPaths<T, D extends number> = [D] extends [never] ? never : [T] extends [object] ? { [K in keyof T & string]-?: K | `${K}${SubPaths<NonNullable<T[K]>, D>}` }[keyof T & string] : never;
|
|
186
|
+
type SubPaths<V, D extends number> = [V] extends [never] ? never : [V] extends [readonly (infer M)[]] ? `[${number}]` | `[${number}]${MemberPaths<NonNullable<M>, D>}` : MemberPaths<V, D>;
|
|
187
|
+
type MemberPaths<V, D extends number> = [V] extends [Scalar] ? never : 'type' extends keyof V ? [V] extends [{
|
|
188
|
+
$pivot?: infer P;
|
|
189
|
+
}] ? P extends object ? '.$pivot' | `.$pivot.${keyof P & string}` : never : never : `.${KeyPaths<V, Deeper[D]>}`;
|
|
190
|
+
/**
|
|
191
|
+
* The 4xx `error`'s errors keyed by the write input they point at, or `undefined` when `error`
|
|
192
|
+
* is not a 4xx {@link JsonApiError} or none of its errors points at an input. An
|
|
193
|
+
* {@link InputValidationError} gives its issues the same way. Pass the input type when `error`
|
|
194
|
+
* carries none: `fieldErrors<Parameters<typeof client.albums.create>[0]>(caught)`.
|
|
195
|
+
*/
|
|
196
|
+
declare function fieldErrors<I = never, E = unknown>(error: E): FieldErrors<[I] extends [never] ? InputOf<E> : I, CodesOf<E>> | undefined;
|
|
113
197
|
//#endregion
|
|
114
198
|
//#region src/filters.d.ts
|
|
115
199
|
/** The filter vocabulary {@link listFilterMatcher} reads: a type's, or a collection action's. */
|
|
@@ -146,6 +230,24 @@ interface LoadAllOptions {
|
|
|
146
230
|
*/
|
|
147
231
|
declare function loadAll<T>(first: Collection<T> | PromiseLike<Collection<T>>, options?: LoadAllOptions): Promise<T[]>;
|
|
148
232
|
//#endregion
|
|
233
|
+
//#region src/mock.d.ts
|
|
234
|
+
/** One resource as plain data: `type`, `id`, attributes, and relation values by name. */
|
|
235
|
+
interface MockData {
|
|
236
|
+
readonly type: string;
|
|
237
|
+
readonly id: string;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Build a materialised resource from its plain data, as a read returns it: the relations the data
|
|
241
|
+
* nests hydrate, the identifiers stay identifiers, and each member's `$pivot` lands on its linkage
|
|
242
|
+
* `meta.pivot`, so `$pivot`, `$edge`, `$rel` and `$count` all work. For tests and stories; the
|
|
243
|
+
* generated client binds it to its descriptor and types it.
|
|
244
|
+
*/
|
|
245
|
+
declare function mockResource(descriptor: ApiDescriptor, data: MockData): object;
|
|
246
|
+
/** {@link mockResource} for a collection of type `type`, as a list read returns it. */
|
|
247
|
+
declare function mockCollection(descriptor: ApiDescriptor, type: string, data: readonly MockData[]): object;
|
|
248
|
+
/** The JSON:API document plain data stands for: the primary data, and every nested resource in `included`. */
|
|
249
|
+
declare function mockDocument(descriptor: ApiDescriptor, data: MockData | readonly MockData[]): Document;
|
|
250
|
+
//#endregion
|
|
149
251
|
//#region src/request-stamp.d.ts
|
|
150
252
|
/**
|
|
151
253
|
* Request stamps: when the request behind a result started, relative to every other request made in
|
|
@@ -332,5 +434,5 @@ declare function withRemappedAtomicPaths(error: JsonApiError, descriptor: ApiDes
|
|
|
332
434
|
hasPivot: boolean;
|
|
333
435
|
} | undefined): JsonApiError;
|
|
334
436
|
//#endregion
|
|
335
|
-
export { ATOMIC_EXT, ATOMIC_MEDIA_TYPE, type Accepted, AcceptedDescriptor, AcceptedJob, AcceptedMeta, AcceptedOf, AcceptedOperation, ActionCallOptions, ActionDescriptor, ActionInput, ActionLocation, ActionLocationDescriptor, ActionOutput, ActionScope, ActionsAccessor, AdditionalMembersDescriptor, ApiDescriptor, ApiExamples, ArrayEnvelope, AtomicCreateHandle, AtomicCreateInput, AtomicDeleteHandle, AtomicDescriptor, AtomicHandle, AtomicOperationArgs, AtomicRecorder, AtomicRef, AtomicRelationshipArgs, AtomicRelationshipHandle, AtomicRelationshipRecorder, AtomicResult, AtomicResultOf, AtomicResults, AtomicUpdateHandle, AtomicUpdateInput, BinaryBody, BinaryResponseType, CANONICAL_PAGE_KEYS, Cardinality, Client, ClientIdPolicy, ClientOptions, CodedErrorObject, Collection, CollectionMeta, CountAccessor, CountToken, CountableDescriptor, CountedRelationName, CreateAttributesOf, CreateInput, CreateMethod, DefaultActionTypes, DefaultAttributes, DefaultWriteAttributes, DeleteArgs, DeleteResult, Document, DocumentEnvelope, DocumentMeta, DocumentMetaDescriptor, DocumentMetaOperation, Edge, EdgeEnvelope, EdgeMember, EdgeMembers, ErrorCodeGuard, ErrorCodeOf, ErrorFinder, ExactPageParams, ExecutedResponse, FieldSelectionMap, FieldsMap, FilterFamilyDescriptor, FilterKey, FilterQuery, FilterSpec, HANDLE_RESERVED, HeadersInit, HydratedMember, IdentifierMember, IncludePath, IncludedRelations, IncludedResource, IncludedType, InputMedia, InputMediaKind, IsSingleton, JSON_API_MEDIA_TYPE, JsonApiContext, JsonApiError, JsonApiErrorObject, JsonApiRequest, JsonApiTransport, Link, LinkObject, LinkageRef, ListFilterMember, ListPageParams, LoadAllOptions, LocalIdentifier, LooseRelatedQuery, LooseRelatedQueryEntry, MaterialiseContext, MaterialisedOverlay, MediaExamples, MediaTypeParams, MemberName, MemberTypeOf, MenuDescriptor, MetaLiteral, MetaObject, MetaOption, MutationMetaOf, MutationVerb, NavigateOptions, type NestedFieldset, NestedFieldsetMember, OperationExamples, OperationMeta, OptionsArg, Page, PageKeys, PageLinks, PageMeta, PageOf, PageParams, PageParamsOf, PaginatorDescriptor, PaginatorKind, PaginatorRole, PaginatorStrategy, PendingCreate, PendingMember, PendingPlacement, PivotDescriptor, PivotFieldsOf, PivotInput, type PollOptions, PollTimeoutError, RawMediaKind, RawOutputMedia, RawResponseType, ReadAttributesOf, ReadQuery, ReadResult, ReadableRelationName, RelatedIncludedResource, RelatedIncludedType, RelatedMeta, RelatedQuery, RelatedQueryDescriptor, RelatedQueryEntry, RelatedQueryOperation, RelatedQueryParam, RelatedQueryRelation, RelatedReadRelatedQuery, RelationArrayEnvelope, RelationCollection, RelationDescriptor, RelationFilterQuery, RelationMutations, RelationName, RelationPageParams, RelationPaginator, RelationReadQuery, RelationRequestMetaOf, RelationSortQuery, RelationView, RelationshipAccessor, RelationshipDocument, RelationshipMembers, RequestMetaOf, RequestMetaOperation, RequiresRequestMeta, ResolvedPaginator, ResolvedValidator, ResourceAccessors, ResourceCountOperation, ResourceCountToken, ResourceDescriptor, ResourceEnvelope, ResourceExamples, ResourceHandle, ResourceIdentifier, ResourceLinks, ResourceMetaDescriptor, ResourceMetaOf, ResourceObjectView, ResourceWriteMeta, ResourceWriteOperation, SchemaMap, SingleReadQuery, SingletonAccessor, SingletonUpdateInput, SortFamilyDescriptor, SortQuery, SortToken, StrategyDescriptor, StructuralGuardError, TakesVerb, ToDocumentOptions, TransportRawBody, TransportRequest, TransportResponse, TypeAccessor, TypeName, TypedPage, TypedReadQuery, TypedRelatedReadQuery, TypedRelationReadQuery, UpdateInput, UpdateMethod, ValidationConfig, ValidationContext, ValidationOption, Validator, WaitOptions, WaitValue, WaitedWriteResult, WireResource, WithDocumentMeta, WithLinks, WritableRelationName, WriteDocument, WriteOptions, WritePivotOf, WriteResult, assertJsonApiDocument, createClient, edgeViewOf, execute, executeRaw, executeResponse, fetchTransport, findError, hasErrorCode, identifierViewOf, isAccepted, isActionLocation, isMaterialised, isPolymorphic, listFilterMatcher, loadAll, materialise, mediaType, nestedFieldset, nextPageParams, nextRequestStamp, parseRetryAfter, prevPageParams, readActionLocation, relatedPaginator, relatedPaginatorKind, remapPointer, remapRelationshipPointer, requestStampOf, resolvePaginator, resolveValidator, runAtomic, serializeQuery, setMaterialisedOverlay, sparseSchema, sparseSchemas, toDocument, toRelationshipDocument, validateDocument, withRemappedAtomicPaths, withRemappedDocumentMetaPaths, withRemappedPaths, withRemappedRelationshipPaths, withTopLevelMeta };
|
|
437
|
+
export { ATOMIC_EXT, ATOMIC_MEDIA_TYPE, type Accepted, AcceptedDescriptor, AcceptedJob, AcceptedMeta, AcceptedOf, AcceptedOperation, ActionCallOptions, ActionDescriptor, ActionInput, ActionLocation, ActionLocationDescriptor, ActionOutput, ActionScope, ActionsAccessor, AdditionalMembersDescriptor, ApiDescriptor, ApiExamples, ArrayEnvelope, AtomicCreateHandle, AtomicCreateInput, AtomicDeleteHandle, AtomicDescriptor, AtomicHandle, AtomicOperationArgs, AtomicRecorder, AtomicRef, AtomicRelationshipArgs, AtomicRelationshipHandle, AtomicRelationshipRecorder, AtomicResult, AtomicResultOf, AtomicResults, AtomicUpdateHandle, AtomicUpdateInput, BinaryBody, BinaryResponseType, CANONICAL_PAGE_KEYS, Cardinality, Client, ClientIdPolicy, ClientOptions, ClientTypes, CodedErrorObject, Collection, CollectionMeta, CountAccessor, CountToken, CountableDescriptor, CountedRelationName, CreateAttributesOf, CreateInput, CreateMethod, DefaultActionTypes, DefaultAttributes, DefaultWriteAttributes, DeleteArgs, DeleteResult, Document, DocumentEnvelope, DocumentMeta, DocumentMetaDescriptor, DocumentMetaOperation, Edge, EdgeEnvelope, EdgeMember, EdgeMembers, EdgeMethods, ErrorCodeCarrier, ErrorCodeGuard, ErrorCodeOf, ErrorCodesFor, ErrorFinder, ExactPageParams, ExecutedResponse, FieldError, FieldErrors, FieldSelectionMap, FieldsMap, FilterFamilyDescriptor, FilterKey, FilterQuery, FilterSpec, HANDLE_RESERVED, HeadersInit, HydratedMember, IdentifierMember, IncludePath, IncludedRelations, IncludedResource, IncludedType, InputCheck, InputMedia, InputMediaKind, InputPath, InputSchemas, InputValidationError, IsSingleton, JSON_API_MEDIA_TYPE, JsonApiContext, JsonApiError, JsonApiErrorObject, JsonApiRequest, JsonApiTransport, Link, LinkObject, LinkageRef, ListFilterMember, ListMethods, ListPageParams, LoadAllOptions, LocalIdentifier, LooseRelatedQuery, LooseRelatedQueryEntry, MaterialiseContext, MaterialisedOverlay, MediaExamples, MediaTypeParams, MemberName, MemberTypeOf, MenuDescriptor, MetaLiteral, MetaObject, MetaOption, MockData, MutationMetaOf, MutationVerb, NavigateOptions, type NestedFieldset, NestedFieldsetMember, OperationCodes, OperationErrorCodeOf, OperationExamples, OperationMeta, OptionsArg, Page, PageKeys, PageLinks, PageMeta, PageOf, PageParams, PageParamsOf, PaginatorDescriptor, PaginatorKind, PaginatorRole, PaginatorStrategy, PathSegment, PendingCreate, PendingEdge, PendingEdgeMethods, PendingMember, PendingPivotOf, PendingPlacement, PivotDescriptor, PivotFieldsOf, PivotInput, type PollOptions, PollTimeoutError, RawMediaKind, RawOutputMedia, RawResponseType, ReadAttributesOf, ReadQuery, ReadResult, ReadableRelationName, RelatedIncludedResource, RelatedIncludedType, RelatedMeta, RelatedQuery, RelatedQueryDescriptor, RelatedQueryEntry, RelatedQueryOperation, RelatedQueryParam, RelatedQueryRelation, RelatedReadRelatedQuery, RelationArrayEnvelope, RelationCollection, RelationDescriptor, RelationFilterQuery, RelationMutations, RelationName, RelationPageParams, RelationPaginator, RelationReadQuery, RelationRequestMetaOf, RelationSortQuery, RelationView, RelationshipAccessor, RelationshipDocument, RelationshipMembers, RequestMetaOf, RequestMetaOperation, RequiresRequestMeta, ResolvedPaginator, ResolvedValidator, ResourceAccessors, ResourceCountOperation, ResourceCountToken, ResourceDataOf, ResourceDescriptor, ResourceEnvelope, ResourceExamples, ResourceHandle, ResourceIdentifier, ResourceLinks, ResourceMetaDescriptor, ResourceMetaOf, ResourceMethods, ResourceObjectView, ResourceWriteMeta, ResourceWriteOperation, SchemaMap, SingleReadQuery, SingletonAccessor, SingletonUpdateInput, SortFamilyDescriptor, SortQuery, SortToken, StandardSchema, StandardSchemaIssue, StandardSchemaResult, StrategyDescriptor, StructuralGuardError, TakesVerb, ToDocumentOptions, TransportRawBody, TransportRequest, TransportResponse, TypeAccessor, TypeName, TypedPage, TypedReadQuery, TypedRelatedReadQuery, TypedRelationReadQuery, UpdateInput, UpdateMethod, ValidationConfig, ValidationContext, ValidationOption, Validator, WaitOptions, WaitValue, WaitedWriteResult, WireResource, WithDocumentMeta, WithLinks, WritableRelationName, WriteDocument, WriteError, WriteOptions, WritePivotOf, WriteResult, assertJsonApiDocument, createClient, edgeViewOf, execute, executeRaw, executeResponse, fetchTransport, fieldErrors, findError, hasErrorCode, identifierViewOf, inputFailure, isAccepted, isActionLocation, isMaterialised, isPolymorphic, lateRelationsOf, listFilterMatcher, loadAll, materialise, mediaType, mockCollection, mockDocument, mockResource, nestedFieldset, nextPageParams, nextRequestStamp, parseRetryAfter, prevPageParams, readActionLocation, relatedPaginator, relatedPaginatorKind, relationWritten, remapPointer, remapRelationshipPointer, requestStampOf, resolvePaginator, resolveValidator, runAtomic, serializeQuery, setMaterialisedOverlay, sparseSchema, sparseSchemas, toDocument, toRelationshipDocument, validateDocument, withInputCheck, withRemappedAtomicPaths, withRemappedDocumentMetaPaths, withRemappedPaths, withRemappedRelationshipPaths, withTopLevelMeta };
|
|
336
438
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/errors.ts","../src/filters.ts","../src/load-all.ts","../src/request-stamp.ts","../src/serialize-write.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/error-shared.ts","../src/errors.ts","../src/field-errors.ts","../src/filters.ts","../src/load-all.ts","../src/mock.ts","../src/request-stamp.ts","../src/serialize-write.ts"],"mappings":";;;;KAGY,cAAA,MAAoB,OAAA,CAAQ,WAAA,CAAY,CAAA,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