viell-effect-schema-http 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/dist/concurrency/Interaction.d.ts +7 -1
- package/dist/concurrency/Interaction.d.ts.map +1 -1
- package/dist/concurrency/Interaction.js.map +1 -1
- package/dist/http/Body.d.ts +2 -0
- package/dist/http/Body.d.ts.map +1 -1
- package/dist/http/Body.js.map +1 -1
- package/dist/http/Operation.d.ts +6 -0
- package/dist/http/Operation.d.ts.map +1 -1
- package/dist/http/Operation.js.map +1 -1
- package/dist/http/Policy.d.ts +25 -0
- package/dist/http/Policy.d.ts.map +1 -1
- package/dist/http/Policy.js +25 -0
- package/dist/http/Policy.js.map +1 -1
- package/dist/http/Request.d.ts +109 -23
- package/dist/http/Request.d.ts.map +1 -1
- package/dist/http/Request.js +121 -21
- package/dist/http/Request.js.map +1 -1
- package/dist/http/Response.d.ts +11 -1
- package/dist/http/Response.d.ts.map +1 -1
- package/dist/http/Response.js.map +1 -1
- package/dist/http/UrlEncoding.d.ts +2 -1
- package/dist/http/UrlEncoding.d.ts.map +1 -1
- package/dist/http/UrlEncoding.js.map +1 -1
- package/dist/http/internal/excess.d.ts +44 -0
- package/dist/http/internal/excess.d.ts.map +1 -0
- package/dist/http/internal/excess.js +252 -0
- package/dist/http/internal/excess.js.map +1 -0
- package/dist/http/internal/input.d.ts +33 -8
- package/dist/http/internal/input.d.ts.map +1 -1
- package/dist/http/internal/input.js +102 -20
- package/dist/http/internal/input.js.map +1 -1
- package/dist/http/internal/shape.d.ts +21 -0
- package/dist/http/internal/shape.d.ts.map +1 -1
- package/dist/http/internal/shape.js +96 -12
- package/dist/http/internal/shape.js.map +1 -1
- package/package.json +3 -2
- package/src/concurrency/Interaction.ts +7 -1
- package/src/http/Body.ts +2 -0
- package/src/http/Operation.ts +6 -0
- package/src/http/Policy.ts +27 -0
- package/src/http/Request.ts +236 -31
- package/src/http/Response.ts +11 -1
- package/src/http/UrlEncoding.ts +2 -1
- package/src/http/internal/excess.ts +370 -0
- package/src/http/internal/input.ts +200 -37
- package/src/http/internal/shape.ts +148 -12
package/dist/http/Request.d.ts
CHANGED
|
@@ -13,8 +13,9 @@ declare const InvalidRequest_base: new <A extends Record<string, any> = {}>(args
|
|
|
13
13
|
* Request preparation failed before dispatch.
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Covers computed-field failures, URL-rendering
|
|
17
|
-
*
|
|
16
|
+
* Covers computed-field failures, URL-rendering and {@link mapBaseUrl} exceptions, a path value
|
|
17
|
+
* that does not encode to one value, and fields that do not fit the schemas bound to their group.
|
|
18
|
+
* Schema failures of the caller's input remain separate `SchemaError` values.
|
|
18
19
|
* A failed check of a group names its fields and leaves out their values, which may be credentials.
|
|
19
20
|
*/
|
|
20
21
|
export declare class InvalidRequest extends InvalidRequest_base<{
|
|
@@ -66,11 +67,24 @@ export type QueryFields = Readonly<Record<string, UrlEncoding.QueryValue | Reado
|
|
|
66
67
|
* A value that fits the decoded side is read as decoded. Under a schema whose two sides share a
|
|
67
68
|
* type, such as one from text to text, an already encoded value fits the decoded side, so it is
|
|
68
69
|
* encoded again, with no error. A mix is one level deep in the type. Renamed fields take their
|
|
69
|
-
* encoded names only when the whole value is on the encoded side
|
|
70
|
+
* encoded names only when the whole value is on the encoded side, and a value on that side stays
|
|
71
|
+
* there, even if it would fit the decoded side by losing them.
|
|
72
|
+
* When both names of a renamed field are supplied, the decoded name still wins; give one name.
|
|
73
|
+
*
|
|
74
|
+
* Under a union, a member that keeps every field wins over an earlier one that would strip one, on
|
|
75
|
+
* both sides and at any depth. A field no member can keep beside the others is a `SchemaError` that
|
|
76
|
+
* names it, because the types allow that value and any member would lose a field the schema states.
|
|
77
|
+
* A key no member states is stripped, as a struct strips it, and so is a key the tag has ruled out.
|
|
78
|
+
* A required literal tag can choose by its decoded or encoded name. Both views must rule a member
|
|
79
|
+
* out before its fields go; a constructor default is not guessed to make that choice.
|
|
80
|
+
* A key set to `undefined` is no field, and an accessor on a class is one, as it is to a struct. In a
|
|
81
|
+
* header or query group, a field a schema stacked with the union takes is not lost. Inside text given
|
|
82
|
+
* as text, a `Schema.Map`, a `Schema.Option` or a declaration with no struct behind it, the schema's
|
|
83
|
+
* own reading applies.
|
|
70
84
|
*/
|
|
71
85
|
export type Input<S extends Schema.Top> = Inputs.Input<S>;
|
|
72
86
|
/**
|
|
73
|
-
* The whole input of a request: the object its call takes,
|
|
87
|
+
* The whole input of a request: the object its call takes, assembled from its bindings.
|
|
74
88
|
*
|
|
75
89
|
* @example
|
|
76
90
|
* ```ts
|
|
@@ -95,7 +109,9 @@ export type Input<S extends Schema.Top> = Inputs.Input<S>;
|
|
|
95
109
|
* @remarks
|
|
96
110
|
* This takes a request, and {@link Input} takes a schema. `Input` is what one binding takes, such
|
|
97
111
|
* as the value under `query`, and this is the object that holds them all, which is what
|
|
98
|
-
* {@link mapInput} has to return.
|
|
112
|
+
* {@link mapInput} has to return. A query or header key is optional when that binding's `Input`
|
|
113
|
+
* accepts `{}`; stacked bindings intersect their contributions. `Operation.InputOf` gives the
|
|
114
|
+
* same for an operation.
|
|
99
115
|
*/
|
|
100
116
|
export type InputOf<R> = R extends Request<infer I, unknown, unknown> ? I : never;
|
|
101
117
|
/**
|
|
@@ -105,7 +121,9 @@ export type InputOf<R> = R extends Request<infer I, unknown, unknown> ? I : neve
|
|
|
105
121
|
* This is a low-level extension type. Prefer {@link make} and the request combinators.
|
|
106
122
|
*/
|
|
107
123
|
export interface Declaration {
|
|
124
|
+
/** The HTTP method, passed on as written. */
|
|
108
125
|
readonly method: string;
|
|
126
|
+
/** The constructor's path or URL, without its query and fragment. */
|
|
109
127
|
readonly url: string;
|
|
110
128
|
/** The fragment written in the constructor, without its `#`. */
|
|
111
129
|
readonly hash: string | undefined;
|
|
@@ -114,7 +132,9 @@ export interface Declaration {
|
|
|
114
132
|
* and service types carry what that Effect needs. {@link mapBaseUrl} always leaves an Effect.
|
|
115
133
|
*/
|
|
116
134
|
readonly baseUrl: string | Effect.Effect<string, unknown, unknown>;
|
|
135
|
+
/** The raw header declarations, in order. */
|
|
117
136
|
readonly headers: Fields.Fields;
|
|
137
|
+
/** The raw query declarations, in order, including entries written in the constructor. */
|
|
118
138
|
readonly query: Fields.Fields<string | null>;
|
|
119
139
|
/** The constructor wrote a `?` with nothing after it, which holds no entries. */
|
|
120
140
|
readonly emptyQuery: boolean;
|
|
@@ -129,13 +149,22 @@ export interface Declaration {
|
|
|
129
149
|
}
|
|
130
150
|
/**
|
|
131
151
|
* What one header or query schema says about its group: the names it allows, whether it allows
|
|
132
|
-
* others,
|
|
152
|
+
* others, the names it always writes, and whether a union in it can lose a field.
|
|
133
153
|
*
|
|
134
154
|
* @remarks
|
|
135
|
-
* This is a low-level extension type, read from the schema's encoded side
|
|
136
|
-
* names are lowercase.
|
|
155
|
+
* This is a low-level extension type, read from the schema's encoded side and its fields' own
|
|
156
|
+
* encodings when it is bound. Header names are lowercase.
|
|
137
157
|
*/
|
|
138
158
|
export type Shape = Shapes.Shape;
|
|
159
|
+
/**
|
|
160
|
+
* What the schemas stacked on a group have told each other during preparation.
|
|
161
|
+
*
|
|
162
|
+
* @remarks
|
|
163
|
+
* This is a low-level extension type. A field a union would lose is not lost if another schema in
|
|
164
|
+
* the group took it, and `settled` is never an answer to that: a schema can allow a name it did not
|
|
165
|
+
* take.
|
|
166
|
+
*/
|
|
167
|
+
export type Taken = Shapes.Taken;
|
|
139
168
|
/** A part of a request that a binding can supply, and that {@link unbind} can clear. */
|
|
140
169
|
export type Group = "path" | "query" | "headers" | "body";
|
|
141
170
|
/**
|
|
@@ -171,6 +200,16 @@ export interface Draft {
|
|
|
171
200
|
readonly removedHeaders: ReadonlySet<string>;
|
|
172
201
|
/** The groups a later {@link unbind} cleared, so their earlier bindings skip themselves. */
|
|
173
202
|
readonly unbound: ReadonlySet<Group>;
|
|
203
|
+
/**
|
|
204
|
+
* What the schemas stacked on the query group took from the caller, and which raw values are
|
|
205
|
+
* theirs to settle. `undefined` where the group needs no record, because no stacked schema can lose
|
|
206
|
+
* a field.
|
|
207
|
+
*/
|
|
208
|
+
readonly takenQuery: Taken | undefined;
|
|
209
|
+
/** The same for the header group, as in {@link takenQuery}. */
|
|
210
|
+
readonly takenHeaders: Taken | undefined;
|
|
211
|
+
/** Raw names edited after each binding, recorded before that binding prepares its input. */
|
|
212
|
+
readonly editedFields: ReadonlyMap<Shape, ReadonlySet<string>>;
|
|
174
213
|
}
|
|
175
214
|
/**
|
|
176
215
|
* An immutable HTTP request description with typed application input.
|
|
@@ -181,7 +220,9 @@ export interface Draft {
|
|
|
181
220
|
* `declaration` and `prepare` are low-level extension points.
|
|
182
221
|
*/
|
|
183
222
|
export interface Request<in I, out E = never, out R = never> extends Pipeable.Pipeable {
|
|
223
|
+
/** What preparation starts from. */
|
|
184
224
|
readonly declaration: Declaration;
|
|
225
|
+
/** Apply the request's bindings and transforms to a draft, with the call's input. */
|
|
185
226
|
readonly prepare: (input: I, draft: Draft) => Effect.Effect<Draft, E, R>;
|
|
186
227
|
}
|
|
187
228
|
/**
|
|
@@ -326,6 +367,8 @@ type Edit = <I, E, R>(self: Request<I, E, R>) => Request<I, E, R>;
|
|
|
326
367
|
* With a {@link headers} schema bound, in either order, the name has to be one a schema allows, and
|
|
327
368
|
* the value is a default that goes through the schema. Setting a name the schema always writes,
|
|
328
369
|
* after that schema, is an {@link InvalidRequest}, because the value could never reach the client.
|
|
370
|
+
* A direct struct's constructor-filled optional field is also refused when this preparation
|
|
371
|
+
* supplies and encodes it after the caller leaves it out, as {@link headers} describes.
|
|
329
372
|
*
|
|
330
373
|
* In the object form each key replaces its name as above, in key order, and other names stay. A key
|
|
331
374
|
* set to `undefined` removes that name's declarations and stops no automatic value, which is what
|
|
@@ -351,6 +394,8 @@ export declare const appendHeader: (name: string, value: FieldValue) => Edit;
|
|
|
351
394
|
* Names compare without case. Value functions are never evaluated to compare with `value`. Removing
|
|
352
395
|
* a name a {@link headers} schema always writes, after that schema, is an {@link InvalidRequest},
|
|
353
396
|
* because the schema puts the value back. Removing an optional field clears its default.
|
|
397
|
+
* A constructor-filled optional field can also put it back and be refused, as {@link headers}
|
|
398
|
+
* describes.
|
|
354
399
|
*
|
|
355
400
|
* Without a value, this also stops the library's automatic value for that name: an operation's
|
|
356
401
|
* `Accept`, or a body's `Content-Type` and `Content-Length`. It stops only that. A value that a
|
|
@@ -380,6 +425,8 @@ export declare const removeHeader: (name: string, value?: string) => Edit;
|
|
|
380
425
|
* With a {@link query} schema bound, in either order, the name has to be one a schema allows, and
|
|
381
426
|
* the value is a default that goes through the schema. Setting a name the schema always writes,
|
|
382
427
|
* after that schema, is an {@link InvalidRequest}, because the value could never reach the client.
|
|
428
|
+
* A direct struct's constructor-filled optional field is also refused when this preparation
|
|
429
|
+
* supplies and encodes it after the caller leaves it out, as {@link query} describes.
|
|
383
430
|
*
|
|
384
431
|
* The object form takes {@link QueryFields}. Each key replaces its name as above, in key order, and
|
|
385
432
|
* other names stay. Use {@link appendQuery} for exact order across repeated names.
|
|
@@ -404,12 +451,33 @@ export declare const appendQuery: (name: string, value: FieldValue<string | null
|
|
|
404
451
|
* functions are not evaluated for comparison. Removing a name a {@link query} schema always writes,
|
|
405
452
|
* after that schema, is an {@link InvalidRequest}, because the schema puts the value back. Removing
|
|
406
453
|
* an optional field clears its default.
|
|
454
|
+
* A constructor-filled optional field can also put it back and be refused, as {@link query}
|
|
455
|
+
* describes.
|
|
407
456
|
*/
|
|
408
457
|
export declare const removeQuery: (name: string, value?: string | null) => Edit;
|
|
458
|
+
/** A query or header binding needs its key only when its input cannot be an empty object. */
|
|
459
|
+
type GroupInput<K extends "query" | "headers", A> = Record<never, never> extends A ? {
|
|
460
|
+
readonly [P in K]?: A;
|
|
461
|
+
} : {
|
|
462
|
+
readonly [P in K]: A;
|
|
463
|
+
};
|
|
409
464
|
/**
|
|
410
465
|
* Bind a schema to the call's `{ headers }` input.
|
|
411
466
|
*
|
|
412
467
|
* @remarks
|
|
468
|
+
* When {@link Input} accepts `{}`, the `headers` key is optional, as with an all-optional struct
|
|
469
|
+
* or a union with one such member. An absent or `undefined` group is read as `{}` and still goes
|
|
470
|
+
* through the schema, including its refinements and constructor defaults. Other explicit values,
|
|
471
|
+
* including `null`, are validated as given. With exact optional property types, an explicit
|
|
472
|
+
* `undefined` still has to fit `Input`. Stacked schemas allow omission only when each one does;
|
|
473
|
+
* a raw default does not make a required group optional. The invocation object is still required.
|
|
474
|
+
*
|
|
475
|
+
* In a direct struct, a constructor default can supply an omitted optional field. A raw edit
|
|
476
|
+
* after that binding is an {@link InvalidRequest} when this preparation successfully constructs
|
|
477
|
+
* the group and encodes a non-`undefined` value for that field. This reads the preparation's result;
|
|
478
|
+
* it never reruns a default. Construction proof is unavailable after decoder fallback, for group
|
|
479
|
+
* transformations, classes or unions, or for an accessor or inherited input property.
|
|
480
|
+
*
|
|
413
481
|
* The input is an {@link Input} of the schema. Encoding produces ordered header lines. The schema
|
|
414
482
|
* states the shape of the group, whatever the order of the calls: once any schema is bound, every
|
|
415
483
|
* header the request declares must be a name some schema allows. A raw header under such a name
|
|
@@ -420,10 +488,12 @@ export declare const removeQuery: (name: string, value?: string | null) => Edit;
|
|
|
420
488
|
* case.
|
|
421
489
|
*
|
|
422
490
|
* Under a union, the defaults and what the schema wrote have to fit one member together. A field
|
|
423
|
-
* that would be lost otherwise is an {@link InvalidRequest}, which names that field.
|
|
491
|
+
* that would be lost otherwise is an {@link InvalidRequest}, which names that field. The caller's
|
|
492
|
+
* own value is read before that, as {@link Input} describes.
|
|
424
493
|
*
|
|
425
|
-
* Header schemas stack: a second one adds its fields, and together they state the shape.
|
|
426
|
-
* {@link unbind} to
|
|
494
|
+
* Header schemas stack: a second one adds its fields, and together they state the shape. A field
|
|
495
|
+
* one of them takes stays with it, whatever a union beside it leaves out. Use {@link unbind} to
|
|
496
|
+
* start again.
|
|
427
497
|
*
|
|
428
498
|
* A field the schema produces wins over an automatic `Accept`, `Content-Type` or `Content-Length`,
|
|
429
499
|
* whether the schema is bound before or after the body, and so does a default. An optional field
|
|
@@ -432,9 +502,7 @@ export declare const removeQuery: (name: string, value?: string | null) => Edit;
|
|
|
432
502
|
* Header values are text, so a schema writes its own. A query schema can encode to a `Date`, but
|
|
433
503
|
* HTTP date headers are not ISO text, and `Schema.DateTimeUtcFromHttpDate` writes them.
|
|
434
504
|
*/
|
|
435
|
-
export declare const headers: <S extends Schema.Top & Schema.ConstraintCodec<unknown, Transport.HeaderInput, unknown, unknown>>(contract: S) => <I, E, R>(self: Request<I, E, R>) => Request<I &
|
|
436
|
-
readonly headers: Input<S>;
|
|
437
|
-
}, E | Schema.SchemaError | InvalidRequest, R | S["EncodingServices"] | S["DecodingServices"]>;
|
|
505
|
+
export declare const headers: <S extends Schema.Top & Schema.ConstraintCodec<unknown, Transport.HeaderInput, unknown, unknown>>(contract: S) => <I, E, R>(self: Request<I, E, R>) => Request<I & GroupInput<"headers", Input<S>>, E | Schema.SchemaError | InvalidRequest, R | S["EncodingServices"] | S["DecodingServices"]>;
|
|
438
506
|
/**
|
|
439
507
|
* Bind a schema to the call's `{ query }` input.
|
|
440
508
|
*
|
|
@@ -449,6 +517,19 @@ export declare const headers: <S extends Schema.Top & Schema.ConstraintCodec<unk
|
|
|
449
517
|
* ```
|
|
450
518
|
*
|
|
451
519
|
* @remarks
|
|
520
|
+
* When {@link Input} accepts `{}`, the `query` key is optional, as with an all-optional struct
|
|
521
|
+
* or a union with one such member. An absent or `undefined` group is read as `{}` and still goes
|
|
522
|
+
* through the schema, including its refinements and constructor defaults. Other explicit values,
|
|
523
|
+
* including `null`, are validated as given. With exact optional property types, an explicit
|
|
524
|
+
* `undefined` still has to fit `Input`. Stacked schemas allow omission only when each one does;
|
|
525
|
+
* a raw default does not make a required group optional. The invocation object is still required.
|
|
526
|
+
*
|
|
527
|
+
* In a direct struct, a constructor default can supply an omitted optional field. A raw edit
|
|
528
|
+
* after that binding is an {@link InvalidRequest} when this preparation successfully constructs
|
|
529
|
+
* the group and encodes a non-`undefined` value for that field. This reads the preparation's result;
|
|
530
|
+
* it never reruns a default. Construction proof is unavailable after decoder fallback, for group
|
|
531
|
+
* transformations, classes or unions, or for an accessor or inherited input property.
|
|
532
|
+
*
|
|
452
533
|
* The input is an {@link Input} of the schema. The schema encodes to `UrlEncoding.QueryInput` and
|
|
453
534
|
* states the shape of the group, whatever the order of the calls: once any schema is bound, every
|
|
454
535
|
* query field the request declares must be a name some schema allows. A raw entry under such a
|
|
@@ -459,7 +540,8 @@ export declare const headers: <S extends Schema.Top & Schema.ConstraintCodec<unk
|
|
|
459
540
|
* of pairs allows any name.
|
|
460
541
|
*
|
|
461
542
|
* Under a union, the defaults and what the schema wrote have to fit one member together. A field
|
|
462
|
-
* that would be lost otherwise is an {@link InvalidRequest}, which names that field.
|
|
543
|
+
* that would be lost otherwise is an {@link InvalidRequest}, which names that field. The caller's
|
|
544
|
+
* own value is read before that, as {@link Input} describes.
|
|
463
545
|
*
|
|
464
546
|
* A field can encode to a `Date`, which is written as ISO text. Text under a field that encodes to
|
|
465
547
|
* a number, boolean, bigint or `Date` is read as one first, and a single value under a list field
|
|
@@ -467,12 +549,11 @@ export declare const headers: <S extends Schema.Top & Schema.ConstraintCodec<unk
|
|
|
467
549
|
* schema. A `?` in a base URL or path output is text in the URL, not a field, so it is outside this
|
|
468
550
|
* check.
|
|
469
551
|
*
|
|
470
|
-
* Query schemas stack: a second one adds its fields, and together they state the shape.
|
|
471
|
-
*
|
|
552
|
+
* Query schemas stack: a second one adds its fields, and together they state the shape. A field one
|
|
553
|
+
* of them takes stays with it, whatever a union beside it leaves out. Use {@link unbind} to start
|
|
554
|
+
* again, and {@link mapInput} to supply a required field's value.
|
|
472
555
|
*/
|
|
473
|
-
export declare const query: <S extends Schema.Top & Schema.ConstraintCodec<unknown, UrlEncoding.QueryInput, unknown, unknown>>(contract: S) => <I, E, R>(self: Request<I, E, R>) => Request<I &
|
|
474
|
-
readonly query: Input<S>;
|
|
475
|
-
}, E | Schema.SchemaError | InvalidRequest, R | S["EncodingServices"] | S["DecodingServices"]>;
|
|
556
|
+
export declare const query: <S extends Schema.Top & Schema.ConstraintCodec<unknown, UrlEncoding.QueryInput, unknown, unknown>>(contract: S) => <I, E, R>(self: Request<I, E, R>) => Request<I & GroupInput<"query", Input<S>>, E | Schema.SchemaError | InvalidRequest, R | S["EncodingServices"] | S["DecodingServices"]>;
|
|
476
557
|
/** What a {@link PathValue}'s schema may encode to: one value with an obvious URL text. */
|
|
477
558
|
export type PathScalar = string | number | bigint | boolean;
|
|
478
559
|
/** A schema that encodes to one {@link PathScalar}, so its value fits in a path. */
|
|
@@ -485,7 +566,9 @@ export type PathSchema = Schema.Top & Schema.ConstraintCodec<unknown, PathScalar
|
|
|
485
566
|
* what checks and encodes it.
|
|
486
567
|
*/
|
|
487
568
|
export interface PathValue<K extends string = string, S extends PathSchema = PathSchema> {
|
|
569
|
+
/** The value's field under `path` in the input. */
|
|
488
570
|
readonly name: K;
|
|
571
|
+
/** What checks and encodes the value. */
|
|
489
572
|
readonly schema: S;
|
|
490
573
|
}
|
|
491
574
|
/**
|
|
@@ -644,9 +727,10 @@ export type Unbound<I, K extends Group> = K extends keyof I ? [keyof Omit<I, K>]
|
|
|
644
727
|
* stay too. For `"path"`, the text of earlier {@link path} calls goes with their values, and
|
|
645
728
|
* {@link setPath} is what changes the constructor's path.
|
|
646
729
|
*
|
|
647
|
-
* Other steps stay as well. A {@link mapEffect}
|
|
648
|
-
*
|
|
649
|
-
*
|
|
730
|
+
* Other steps stay as well. A {@link mapEffect} finds the removed property `undefined`, and where
|
|
731
|
+
* no other input is left the whole input is `undefined`, so reading the property there is a defect.
|
|
732
|
+
* After {@link mapInput}, the binding is skipped, but the mapped input keeps whatever the mapping
|
|
733
|
+
* requires. The request's error and service types keep what the removed bindings added.
|
|
650
734
|
*/
|
|
651
735
|
export declare const unbind: <K extends Group>(group: K) => <I, E, R>(self: Request<I, E, R>) => Request<Unbound<I, K>, E, R>;
|
|
652
736
|
/**
|
|
@@ -679,7 +763,9 @@ export declare const mapEffect: <I, E2, R2>(f: (request: HttpClientRequest.HttpC
|
|
|
679
763
|
* `request.url` holds the joined URL and its query. A fragment is in `request.hash`, as written.
|
|
680
764
|
*/
|
|
681
765
|
export interface Compiled {
|
|
766
|
+
/** The native request, with its URL and query joined. */
|
|
682
767
|
readonly request: HttpClientRequest.HttpClientRequest;
|
|
768
|
+
/** The header lines, in the spelling they were written with. */
|
|
683
769
|
readonly headerLines: Transport.Lines;
|
|
684
770
|
/** Lowercase header names the request removed, so the library adds no automatic value. */
|
|
685
771
|
readonly removedHeaders: ReadonlySet<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Request.d.ts","sourceRoot":"","sources":["../../src/http/Request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,MAAM,EAAU,QAAQ,EAAY,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC1E,OAAO,EAEL,iBAAiB,EAEjB,SAAS,EACV,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAC;AAC/C,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;;;;AAEhD;;;;;;;GAOG;AACH,qBAAa,cAAe,SAAQ,oBAAmC;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;CAAG;AAEL;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAErD;;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|
9
9
|
* Request preparation failed before dispatch.
|
|
10
10
|
*
|
|
11
11
|
* @remarks
|
|
12
|
-
* Covers computed-field failures, URL-rendering
|
|
13
|
-
*
|
|
12
|
+
* Covers computed-field failures, URL-rendering and {@link mapBaseUrl} exceptions, a path value
|
|
13
|
+
* that does not encode to one value, and fields that do not fit the schemas bound to their group.
|
|
14
|
+
* Schema failures of the caller's input remain separate `SchemaError` values.
|
|
14
15
|
* A failed check of a group names its fields and leaves out their values, which may be credentials.
|
|
15
16
|
*/
|
|
16
17
|
export class InvalidRequest extends Data.TaggedError("InvalidRequest") {
|
|
@@ -184,6 +185,22 @@ export const mapBaseUrl = (f) => (self) => construct({
|
|
|
184
185
|
const foldHeader = (name) => name.toLowerCase();
|
|
185
186
|
/** Query names compare exactly. */
|
|
186
187
|
const foldQuery = (name) => name;
|
|
188
|
+
/** Copy provenance for this evaluation; a binding snapshots it before earlier steps run. */
|
|
189
|
+
const editing = (draft, shapes, names, fold) => shapes.length === 0
|
|
190
|
+
? draft
|
|
191
|
+
: {
|
|
192
|
+
...draft,
|
|
193
|
+
editedFields: new Map([
|
|
194
|
+
...draft.editedFields,
|
|
195
|
+
...shapes.map((shape) => [
|
|
196
|
+
shape,
|
|
197
|
+
new Set([
|
|
198
|
+
...(draft.editedFields.get(shape) ?? []),
|
|
199
|
+
...names.map(fold),
|
|
200
|
+
]),
|
|
201
|
+
]),
|
|
202
|
+
]),
|
|
203
|
+
};
|
|
187
204
|
const editHeaders = (edited, edit, removed = (names) => names) => (self) => construct({
|
|
188
205
|
...self.declaration,
|
|
189
206
|
headers: edit(self.declaration.headers),
|
|
@@ -192,7 +209,7 @@ const editHeaders = (edited, edit, removed = (names) => names) => (self) => cons
|
|
|
192
209
|
...self.declaration.conflicts,
|
|
193
210
|
...Shapes.required(edited, self.declaration.headerShapes, foldHeader).map((name) => ["headers", name]),
|
|
194
211
|
],
|
|
195
|
-
}, self.prepare);
|
|
212
|
+
}, (input, draft) => self.prepare(input, editing(draft, self.declaration.headerShapes, edited, foldHeader)));
|
|
196
213
|
const editQuery = (names, edit) => (self) => construct({
|
|
197
214
|
...self.declaration,
|
|
198
215
|
query: edit(self.declaration.query),
|
|
@@ -200,7 +217,7 @@ const editQuery = (names, edit) => (self) => construct({
|
|
|
200
217
|
...self.declaration.conflicts,
|
|
201
218
|
...Shapes.required(names, self.declaration.queryShapes, foldQuery).map((name) => ["query", name]),
|
|
202
219
|
],
|
|
203
|
-
}, self.prepare);
|
|
220
|
+
}, (input, draft) => self.prepare(input, editing(draft, self.declaration.queryShapes, names, foldQuery)));
|
|
204
221
|
/**
|
|
205
222
|
* Set a raw header, replacing every existing line with that name, or set several from an object.
|
|
206
223
|
*
|
|
@@ -221,6 +238,8 @@ const editQuery = (names, edit) => (self) => construct({
|
|
|
221
238
|
* With a {@link headers} schema bound, in either order, the name has to be one a schema allows, and
|
|
222
239
|
* the value is a default that goes through the schema. Setting a name the schema always writes,
|
|
223
240
|
* after that schema, is an {@link InvalidRequest}, because the value could never reach the client.
|
|
241
|
+
* A direct struct's constructor-filled optional field is also refused when this preparation
|
|
242
|
+
* supplies and encodes it after the caller leaves it out, as {@link headers} describes.
|
|
224
243
|
*
|
|
225
244
|
* In the object form each key replaces its name as above, in key order, and other names stay. A key
|
|
226
245
|
* set to `undefined` removes that name's declarations and stops no automatic value, which is what
|
|
@@ -248,6 +267,8 @@ export const appendHeader = (name, value) => editHeaders([name], (fields) => Fie
|
|
|
248
267
|
* Names compare without case. Value functions are never evaluated to compare with `value`. Removing
|
|
249
268
|
* a name a {@link headers} schema always writes, after that schema, is an {@link InvalidRequest},
|
|
250
269
|
* because the schema puts the value back. Removing an optional field clears its default.
|
|
270
|
+
* A constructor-filled optional field can also put it back and be refused, as {@link headers}
|
|
271
|
+
* describes.
|
|
251
272
|
*
|
|
252
273
|
* Without a value, this also stops the library's automatic value for that name: an operation's
|
|
253
274
|
* `Accept`, or a body's `Content-Type` and `Content-Length`. It stops only that. A value that a
|
|
@@ -277,6 +298,8 @@ export const removeHeader = (name, value) => editHeaders([name], (fields) => Fie
|
|
|
277
298
|
* With a {@link query} schema bound, in either order, the name has to be one a schema allows, and
|
|
278
299
|
* the value is a default that goes through the schema. Setting a name the schema always writes,
|
|
279
300
|
* after that schema, is an {@link InvalidRequest}, because the value could never reach the client.
|
|
301
|
+
* A direct struct's constructor-filled optional field is also refused when this preparation
|
|
302
|
+
* supplies and encodes it after the caller leaves it out, as {@link query} describes.
|
|
280
303
|
*
|
|
281
304
|
* The object form takes {@link QueryFields}. Each key replaces its name as above, in key order, and
|
|
282
305
|
* other names stay. Use {@link appendQuery} for exact order across repeated names.
|
|
@@ -303,6 +326,8 @@ export const appendQuery = (name, value) => editQuery([name], (fields) => Fields
|
|
|
303
326
|
* functions are not evaluated for comparison. Removing a name a {@link query} schema always writes,
|
|
304
327
|
* after that schema, is an {@link InvalidRequest}, because the schema puts the value back. Removing
|
|
305
328
|
* an optional field clears its default.
|
|
329
|
+
* A constructor-filled optional field can also put it back and be refused, as {@link query}
|
|
330
|
+
* describes.
|
|
306
331
|
*/
|
|
307
332
|
export const removeQuery = (name, value) => editQuery([name], (fields) => Fields.remove(fields, name, value));
|
|
308
333
|
/** Put entries after the existing ones, in place of every entry under the `keys` names. */
|
|
@@ -348,6 +373,10 @@ const misfit = (group, defaults) => new InvalidRequest({
|
|
|
348
373
|
const lostFields = (group, names) => new InvalidRequest({
|
|
349
374
|
message: `The ${group} group cannot be built against its schema: with the rest of the group, these fields would be lost: ${listNames(names)}.`,
|
|
350
375
|
});
|
|
376
|
+
/** Names only: the caller's omitted fields were actually supplied and written by construction. */
|
|
377
|
+
const constructorConflict = (group, names) => new InvalidRequest({
|
|
378
|
+
message: `A constructor supplied these omitted ${group} fields and their schema wrote them, so a later raw edit would be lost: ${listNames(names)}. Supply the value as input, set it with Request.mapInput, or use Request.unbind("${group}") first.`,
|
|
379
|
+
});
|
|
351
380
|
/** Fields a body's encoder supplies unless the request says otherwise. */
|
|
352
381
|
const bodyFields = ["content-type", "content-length"];
|
|
353
382
|
/** After an encoder set the body fields, apply what the request itself says about them. */
|
|
@@ -367,6 +396,19 @@ const applyDeclaredBodyFields = (encoded, prepared) => {
|
|
|
367
396
|
* Bind a schema to the call's `{ headers }` input.
|
|
368
397
|
*
|
|
369
398
|
* @remarks
|
|
399
|
+
* When {@link Input} accepts `{}`, the `headers` key is optional, as with an all-optional struct
|
|
400
|
+
* or a union with one such member. An absent or `undefined` group is read as `{}` and still goes
|
|
401
|
+
* through the schema, including its refinements and constructor defaults. Other explicit values,
|
|
402
|
+
* including `null`, are validated as given. With exact optional property types, an explicit
|
|
403
|
+
* `undefined` still has to fit `Input`. Stacked schemas allow omission only when each one does;
|
|
404
|
+
* a raw default does not make a required group optional. The invocation object is still required.
|
|
405
|
+
*
|
|
406
|
+
* In a direct struct, a constructor default can supply an omitted optional field. A raw edit
|
|
407
|
+
* after that binding is an {@link InvalidRequest} when this preparation successfully constructs
|
|
408
|
+
* the group and encodes a non-`undefined` value for that field. This reads the preparation's result;
|
|
409
|
+
* it never reruns a default. Construction proof is unavailable after decoder fallback, for group
|
|
410
|
+
* transformations, classes or unions, or for an accessor or inherited input property.
|
|
411
|
+
*
|
|
370
412
|
* The input is an {@link Input} of the schema. Encoding produces ordered header lines. The schema
|
|
371
413
|
* states the shape of the group, whatever the order of the calls: once any schema is bound, every
|
|
372
414
|
* header the request declares must be a name some schema allows. A raw header under such a name
|
|
@@ -377,10 +419,12 @@ const applyDeclaredBodyFields = (encoded, prepared) => {
|
|
|
377
419
|
* case.
|
|
378
420
|
*
|
|
379
421
|
* Under a union, the defaults and what the schema wrote have to fit one member together. A field
|
|
380
|
-
* that would be lost otherwise is an {@link InvalidRequest}, which names that field.
|
|
422
|
+
* that would be lost otherwise is an {@link InvalidRequest}, which names that field. The caller's
|
|
423
|
+
* own value is read before that, as {@link Input} describes.
|
|
381
424
|
*
|
|
382
|
-
* Header schemas stack: a second one adds its fields, and together they state the shape.
|
|
383
|
-
* {@link unbind} to
|
|
425
|
+
* Header schemas stack: a second one adds its fields, and together they state the shape. A field
|
|
426
|
+
* one of them takes stays with it, whatever a union beside it leaves out. Use {@link unbind} to
|
|
427
|
+
* start again.
|
|
384
428
|
*
|
|
385
429
|
* A field the schema produces wins over an automatic `Accept`, `Content-Type` or `Content-Length`,
|
|
386
430
|
* whether the schema is bound before or after the body, and so does a default. An optional field
|
|
@@ -390,18 +434,33 @@ const applyDeclaredBodyFields = (encoded, prepared) => {
|
|
|
390
434
|
* HTTP date headers are not ISO text, and `Schema.DateTimeUtcFromHttpDate` writes them.
|
|
391
435
|
*/
|
|
392
436
|
export const headers = (contract) => {
|
|
393
|
-
const
|
|
394
|
-
const { shape, settle } = Shapes.bind(contract, foldHeader);
|
|
437
|
+
const read = Inputs.reader(contract, Schema.encodeEffect(contract));
|
|
438
|
+
const { shape, settle, taken, candidates, filled } = Shapes.bind(contract, foldHeader);
|
|
395
439
|
return (self) => construct({
|
|
396
440
|
...self.declaration,
|
|
397
441
|
headerShapes: [...self.declaration.headerShapes, shape],
|
|
398
442
|
}, Effect.fnUntraced(function* (input, draft) {
|
|
399
443
|
if (draft.unbound.has("headers"))
|
|
400
444
|
return yield* self.prepare(input, draft);
|
|
401
|
-
const
|
|
402
|
-
const
|
|
445
|
+
const value = (input.headers === undefined ? {} : input.headers);
|
|
446
|
+
const edited = candidates(value, draft.editedFields.get(shape));
|
|
447
|
+
const { output, lost: lostFromInput, constructed } = yield* read(value);
|
|
448
|
+
const conflicts = filled(edited, constructed, output);
|
|
449
|
+
const own = draft.takenHeaders && taken(value, output, lostFromInput);
|
|
450
|
+
const prepared = yield* self.prepare(input, own === undefined
|
|
451
|
+
? draft
|
|
452
|
+
: {
|
|
453
|
+
...draft,
|
|
454
|
+
takenHeaders: Shapes.taking(draft.takenHeaders, own),
|
|
455
|
+
});
|
|
456
|
+
if (lostFromInput.length > 0)
|
|
457
|
+
yield* Inputs.refuseLost(contract, lostFromInput, prepared.takenHeaders?.fields);
|
|
458
|
+
if (conflicts.length > 0)
|
|
459
|
+
return yield* constructorConflict("headers", conflicts);
|
|
403
460
|
const names = Shapes.written(output, foldHeader);
|
|
461
|
+
const elsewhere = Shapes.others(shape, prepared.takenHeaders, foldHeader);
|
|
404
462
|
const defaults = prepared.headerLines.filter(([name]) => !names.has(foldHeader(name)) &&
|
|
463
|
+
!elsewhere.has(foldHeader(name)) &&
|
|
405
464
|
Shapes.allows(shape, foldHeader(name)));
|
|
406
465
|
const settled = yield* Effect.mapError(settle(output, defaults), () => misfit("header", defaults));
|
|
407
466
|
// A field the schema does not write back would be lost, as a union member can lose one.
|
|
@@ -441,6 +500,19 @@ export const headers = (contract) => {
|
|
|
441
500
|
* ```
|
|
442
501
|
*
|
|
443
502
|
* @remarks
|
|
503
|
+
* When {@link Input} accepts `{}`, the `query` key is optional, as with an all-optional struct
|
|
504
|
+
* or a union with one such member. An absent or `undefined` group is read as `{}` and still goes
|
|
505
|
+
* through the schema, including its refinements and constructor defaults. Other explicit values,
|
|
506
|
+
* including `null`, are validated as given. With exact optional property types, an explicit
|
|
507
|
+
* `undefined` still has to fit `Input`. Stacked schemas allow omission only when each one does;
|
|
508
|
+
* a raw default does not make a required group optional. The invocation object is still required.
|
|
509
|
+
*
|
|
510
|
+
* In a direct struct, a constructor default can supply an omitted optional field. A raw edit
|
|
511
|
+
* after that binding is an {@link InvalidRequest} when this preparation successfully constructs
|
|
512
|
+
* the group and encodes a non-`undefined` value for that field. This reads the preparation's result;
|
|
513
|
+
* it never reruns a default. Construction proof is unavailable after decoder fallback, for group
|
|
514
|
+
* transformations, classes or unions, or for an accessor or inherited input property.
|
|
515
|
+
*
|
|
444
516
|
* The input is an {@link Input} of the schema. The schema encodes to `UrlEncoding.QueryInput` and
|
|
445
517
|
* states the shape of the group, whatever the order of the calls: once any schema is bound, every
|
|
446
518
|
* query field the request declares must be a name some schema allows. A raw entry under such a
|
|
@@ -451,7 +523,8 @@ export const headers = (contract) => {
|
|
|
451
523
|
* of pairs allows any name.
|
|
452
524
|
*
|
|
453
525
|
* Under a union, the defaults and what the schema wrote have to fit one member together. A field
|
|
454
|
-
* that would be lost otherwise is an {@link InvalidRequest}, which names that field.
|
|
526
|
+
* that would be lost otherwise is an {@link InvalidRequest}, which names that field. The caller's
|
|
527
|
+
* own value is read before that, as {@link Input} describes.
|
|
455
528
|
*
|
|
456
529
|
* A field can encode to a `Date`, which is written as ISO text. Text under a field that encodes to
|
|
457
530
|
* a number, boolean, bigint or `Date` is read as one first, and a single value under a list field
|
|
@@ -459,25 +532,41 @@ export const headers = (contract) => {
|
|
|
459
532
|
* schema. A `?` in a base URL or path output is text in the URL, not a field, so it is outside this
|
|
460
533
|
* check.
|
|
461
534
|
*
|
|
462
|
-
* Query schemas stack: a second one adds its fields, and together they state the shape.
|
|
463
|
-
*
|
|
535
|
+
* Query schemas stack: a second one adds its fields, and together they state the shape. A field one
|
|
536
|
+
* of them takes stays with it, whatever a union beside it leaves out. Use {@link unbind} to start
|
|
537
|
+
* again, and {@link mapInput} to supply a required field's value.
|
|
464
538
|
*/
|
|
465
539
|
export const query = (contract) => {
|
|
466
|
-
const
|
|
467
|
-
const { shape, settle } = Shapes.bind(contract, foldQuery);
|
|
540
|
+
const read = Inputs.reader(contract, Schema.encodeEffect(contract));
|
|
541
|
+
const { shape, settle, taken, candidates, filled } = Shapes.bind(contract, foldQuery);
|
|
468
542
|
return (self) => construct({
|
|
469
543
|
...self.declaration,
|
|
470
544
|
queryShapes: [...self.declaration.queryShapes, shape],
|
|
471
545
|
}, Effect.fnUntraced(function* (input, draft) {
|
|
472
546
|
if (draft.unbound.has("query"))
|
|
473
547
|
return yield* self.prepare(input, draft);
|
|
474
|
-
const
|
|
475
|
-
const
|
|
548
|
+
const value = (input.query === undefined ? {} : input.query);
|
|
549
|
+
const edited = candidates(value, draft.editedFields.get(shape));
|
|
550
|
+
const { output, lost: lostFromInput, constructed } = yield* read(value);
|
|
551
|
+
const conflicts = filled(edited, constructed, output);
|
|
552
|
+
const own = draft.takenQuery && taken(value, output, lostFromInput);
|
|
553
|
+
const prepared = yield* self.prepare(input, own === undefined
|
|
554
|
+
? draft
|
|
555
|
+
: {
|
|
556
|
+
...draft,
|
|
557
|
+
takenQuery: Shapes.taking(draft.takenQuery, own),
|
|
558
|
+
});
|
|
559
|
+
if (lostFromInput.length > 0)
|
|
560
|
+
yield* Inputs.refuseLost(contract, lostFromInput, prepared.takenQuery?.fields);
|
|
561
|
+
if (conflicts.length > 0)
|
|
562
|
+
return yield* constructorConflict("query", conflicts);
|
|
476
563
|
const names = Shapes.written(output, foldQuery);
|
|
564
|
+
const elsewhere = Shapes.others(shape, prepared.takenQuery, foldQuery);
|
|
477
565
|
const defaults = prepared.request.urlParams.params
|
|
478
566
|
.filter((param) => prepared.declaredQuery.has(param) &&
|
|
479
567
|
!isEmptySegment(prepared, param) &&
|
|
480
568
|
!names.has(param[0]) &&
|
|
569
|
+
!elsewhere.has(param[0]) &&
|
|
481
570
|
Shapes.allows(shape, param[0]))
|
|
482
571
|
.map((param) => [param[0], queryValue(prepared, param)]);
|
|
483
572
|
const settled = yield* Effect.mapError(settle(output, defaults), () => misfit("query", defaults));
|
|
@@ -686,9 +775,10 @@ export const body = (codec) => (self) => construct(self.declaration, Effect.fnUn
|
|
|
686
775
|
* stay too. For `"path"`, the text of earlier {@link path} calls goes with their values, and
|
|
687
776
|
* {@link setPath} is what changes the constructor's path.
|
|
688
777
|
*
|
|
689
|
-
* Other steps stay as well. A {@link mapEffect}
|
|
690
|
-
*
|
|
691
|
-
*
|
|
778
|
+
* Other steps stay as well. A {@link mapEffect} finds the removed property `undefined`, and where
|
|
779
|
+
* no other input is left the whole input is `undefined`, so reading the property there is a defect.
|
|
780
|
+
* After {@link mapInput}, the binding is skipped, but the mapped input keeps whatever the mapping
|
|
781
|
+
* requires. The request's error and service types keep what the removed bindings added.
|
|
692
782
|
*/
|
|
693
783
|
export const unbind = (group) => (self) => construct({
|
|
694
784
|
...self.declaration,
|
|
@@ -725,6 +815,13 @@ export const mapEffect = (f) => (self) => construct(self.declaration, (input, dr
|
|
|
725
815
|
...prepared,
|
|
726
816
|
request,
|
|
727
817
|
}))));
|
|
818
|
+
/** A record to start from where a schema in the group can lose a field to another one. */
|
|
819
|
+
const takenRecord = (shapes) => shapes.length > 1 && shapes.some(({ chooses }) => chooses)
|
|
820
|
+
? {
|
|
821
|
+
fields: new Set(),
|
|
822
|
+
settled: new Set(shapes.flatMap(({ chooses, names }) => chooses ? [] : Array.from(names))),
|
|
823
|
+
}
|
|
824
|
+
: undefined;
|
|
728
825
|
const initialDraft = (declaration) => {
|
|
729
826
|
// Custom method strings pass through at runtime; the method union is narrower than the transport.
|
|
730
827
|
const native = HttpClientRequest.make(declaration.method)(declaration.url);
|
|
@@ -741,6 +838,9 @@ const initialDraft = (declaration) => {
|
|
|
741
838
|
declaredQuery: new Set(),
|
|
742
839
|
removedHeaders: declaration.removedHeaders,
|
|
743
840
|
unbound: new Set(),
|
|
841
|
+
takenQuery: takenRecord(declaration.queryShapes),
|
|
842
|
+
takenHeaders: takenRecord(declaration.headerShapes),
|
|
843
|
+
editedFields: new Map(),
|
|
744
844
|
}, declaration.query.flatMap((field) => Fields.resolve([field]).map(([key, value]) => [key, value, field[2]])));
|
|
745
845
|
};
|
|
746
846
|
/**
|