@distilled.cloud/core 1.0.0-rc.15 → 1.0.0-rc.17
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/lib/_bundle/aws.js +2 -0
- package/lib/_bundle/aws.js.map +1 -0
- package/lib/_bundle/base.js +5 -0
- package/lib/_bundle/base.js.map +1 -0
- package/lib/_bundle/graphql.js +3 -0
- package/lib/_bundle/graphql.js.map +1 -0
- package/lib/_bundle/rest.js +2 -0
- package/lib/_bundle/rest.js.map +1 -0
- package/lib/_bundle/xml.js +4 -0
- package/lib/_bundle/xml.js.map +1 -0
- package/lib/api.d.ts +118 -13
- package/lib/api.d.ts.map +1 -1
- package/lib/api.js +1 -188
- package/lib/category.d.ts.map +1 -1
- package/lib/category.js +1 -278
- package/lib/chunks.d.ts +3 -0
- package/lib/chunks.d.ts.map +1 -0
- package/lib/chunks.js +1 -0
- package/lib/codegen/boolean-string-enums.js +36 -36
- package/lib/codegen/chunk.d.ts +7 -0
- package/lib/codegen/chunk.d.ts.map +1 -0
- package/lib/codegen/chunk.js +139 -0
- package/lib/codegen/chunk.js.map +1 -0
- package/lib/codegen/cli.d.ts.map +1 -1
- package/lib/codegen/cli.js +28 -14
- package/lib/codegen/cli.js.map +1 -1
- package/lib/codegen/datafy.d.ts +14 -0
- package/lib/codegen/datafy.d.ts.map +1 -0
- package/lib/codegen/datafy.js +853 -0
- package/lib/codegen/datafy.js.map +1 -0
- package/lib/codegen/dedupe.d.ts +5 -0
- package/lib/codegen/dedupe.d.ts.map +1 -0
- package/lib/codegen/dedupe.js +153 -0
- package/lib/codegen/dedupe.js.map +1 -0
- package/lib/codegen/emit.js +56 -56
- package/lib/codegen/format.js +18 -18
- package/lib/codegen/generated-at.js +29 -29
- package/lib/codegen/generator.d.ts.map +1 -1
- package/lib/codegen/generator.js +92 -84
- package/lib/codegen/generator.js.map +1 -1
- package/lib/codegen/graph.js +36 -36
- package/lib/codegen/graphql-client.d.ts +2 -0
- package/lib/codegen/graphql-client.d.ts.map +1 -1
- package/lib/codegen/graphql-client.js +55 -26
- package/lib/codegen/graphql-client.js.map +1 -1
- package/lib/codegen/graphql.js +113 -113
- package/lib/codegen/latin1.d.ts +3 -0
- package/lib/codegen/latin1.d.ts.map +1 -0
- package/lib/codegen/latin1.js +126 -0
- package/lib/codegen/latin1.js.map +1 -0
- package/lib/codegen/members.d.ts +7 -0
- package/lib/codegen/members.d.ts.map +1 -1
- package/lib/codegen/members.js +26 -19
- package/lib/codegen/members.js.map +1 -1
- package/lib/codegen/model-diff.js +6 -6
- package/lib/codegen/naming.js +19 -19
- package/lib/codegen/openapi-cli.js +15 -15
- package/lib/codegen/openapi.d.ts +17 -0
- package/lib/codegen/openapi.d.ts.map +1 -1
- package/lib/codegen/openapi.js +323 -169
- package/lib/codegen/openapi.js.map +1 -1
- package/lib/codegen/operations.js +14 -14
- package/lib/codegen/pagination.js +11 -11
- package/lib/codegen/patch-audit.js +57 -57
- package/lib/codegen/patches.js +79 -79
- package/lib/codegen/prelude.js +19 -19
- package/lib/codegen/privatize.d.ts +21 -0
- package/lib/codegen/privatize.d.ts.map +1 -0
- package/lib/codegen/privatize.js +176 -0
- package/lib/codegen/privatize.js.map +1 -0
- package/lib/codegen/proto.js +25 -25
- package/lib/codegen/pure.d.ts +6 -0
- package/lib/codegen/pure.d.ts.map +1 -0
- package/lib/codegen/pure.js +91 -0
- package/lib/codegen/pure.js.map +1 -0
- package/lib/codegen/rewrite-operation-ids.js +108 -108
- package/lib/codegen/spec-path.js +57 -57
- package/lib/codegen/table.d.ts +5 -0
- package/lib/codegen/table.d.ts.map +1 -0
- package/lib/codegen/table.js +249 -0
- package/lib/codegen/table.js.map +1 -0
- package/lib/config.d.ts +27 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +1 -0
- package/lib/crypto.d.ts +76 -0
- package/lib/crypto.d.ts.map +1 -0
- package/lib/crypto.js +1 -0
- package/lib/debug.d.ts +2 -0
- package/lib/debug.d.ts.map +1 -0
- package/lib/debug.js +1 -0
- package/lib/error-category.d.ts +1 -1
- package/lib/error-category.d.ts.map +1 -1
- package/lib/error-category.js +1 -46
- package/lib/errors.d.ts +62 -62
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -195
- package/lib/graphql.d.ts +31 -20
- package/lib/graphql.d.ts.map +1 -1
- package/lib/graphql.js +1 -1027
- package/lib/graphql.types.js +1 -5
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -15
- package/lib/json-patch.d.ts +2 -2
- package/lib/json-patch.js +1 -226
- package/lib/json-patch.js.map +1 -1
- package/lib/pagination.d.ts +9 -25
- package/lib/pagination.d.ts.map +1 -1
- package/lib/pagination.js +1 -266
- package/lib/plain-values.d.ts +10 -0
- package/lib/plain-values.d.ts.map +1 -0
- package/lib/plain-values.js +2 -0
- package/lib/plain-values.js.map +1 -0
- package/lib/protocol-http.d.ts +50 -14
- package/lib/protocol-http.d.ts.map +1 -1
- package/lib/protocol-http.js +1 -639
- package/lib/protocol-rest.d.ts +38 -25
- package/lib/protocol-rest.d.ts.map +1 -1
- package/lib/protocol-rest.js +1 -267
- package/lib/query.js +1 -27
- package/lib/response-validation-strict.d.ts +48 -0
- package/lib/response-validation-strict.d.ts.map +1 -0
- package/lib/response-validation-strict.js +1 -0
- package/lib/response-validation.d.ts +43 -25
- package/lib/response-validation.d.ts.map +1 -1
- package/lib/response-validation.js +1 -76
- package/lib/retry-after.d.ts +3 -3
- package/lib/retry-after.js +1 -112
- package/lib/retry.d.ts +48 -29
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -209
- package/lib/schema-lite-impl.d.ts +158 -0
- package/lib/schema-lite-impl.d.ts.map +1 -0
- package/lib/schema-lite-impl.js +1 -0
- package/lib/schema-lite-typed.d.ts +41 -0
- package/lib/schema-lite-typed.d.ts.map +1 -0
- package/lib/schema-lite-typed.js +2 -0
- package/lib/schema-lite-typed.js.map +1 -0
- package/lib/schema-lite.d.ts +40 -0
- package/lib/schema-lite.d.ts.map +1 -0
- package/lib/schema-lite.js +1 -0
- package/lib/schema.d.ts +20 -6
- package/lib/schema.d.ts.map +1 -1
- package/lib/schema.js +1 -48
- package/lib/testing.d.ts +3 -2
- package/lib/testing.d.ts.map +1 -1
- package/lib/testing.js +1 -40
- package/lib/testing.js.map +1 -1
- package/lib/trait.d.ts +13 -13
- package/lib/trait.d.ts.map +1 -1
- package/lib/trait.js +1 -131
- package/lib/xml.d.ts +1 -1
- package/lib/xml.d.ts.map +1 -1
- package/lib/xml.js +1 -311
- package/package.json +9 -7
- package/src/api.ts +1080 -180
- package/src/category.ts +33 -33
- package/src/chunks.ts +30 -0
- package/src/codegen/chunk.ts +147 -0
- package/src/codegen/cli.ts +27 -1
- package/src/codegen/datafy.ts +874 -0
- package/src/codegen/dedupe.ts +173 -0
- package/src/codegen/generator.ts +10 -3
- package/src/codegen/graphql-client.ts +49 -15
- package/src/codegen/latin1.ts +131 -0
- package/src/codegen/members.ts +8 -0
- package/src/codegen/openapi.ts +194 -3
- package/src/codegen/privatize.ts +200 -0
- package/src/codegen/pure.ts +94 -0
- package/src/codegen/table.ts +254 -0
- package/src/config.ts +216 -0
- package/src/crypto.ts +202 -0
- package/src/debug.ts +8 -0
- package/src/error-category.ts +2 -1
- package/src/errors.ts +65 -56
- package/src/graphql.ts +109 -62
- package/src/graphql.types.ts +9 -7
- package/src/index.ts +3 -2
- package/src/json-patch.ts +2 -2
- package/src/pagination.ts +37 -18
- package/src/plain-values.ts +41 -0
- package/src/protocol-http.ts +378 -145
- package/src/protocol-rest.ts +337 -169
- package/src/response-validation-strict.ts +327 -0
- package/src/response-validation.ts +101 -50
- package/src/retry-after.ts +3 -3
- package/src/retry.ts +94 -93
- package/src/schema-lite-impl.ts +550 -0
- package/src/schema-lite-typed.ts +44 -0
- package/src/schema-lite.ts +44 -0
- package/src/schema.ts +258 -14
- package/src/testing.ts +4 -2
- package/src/trait.ts +36 -28
- package/src/xml.ts +31 -17
- package/lib/api.js.map +0 -1
- package/lib/category.js.map +0 -1
- package/lib/codegen/boolean-string-enums.test.d.ts +0 -2
- package/lib/codegen/boolean-string-enums.test.d.ts.map +0 -1
- package/lib/codegen/boolean-string-enums.test.js +0 -275
- package/lib/codegen/boolean-string-enums.test.js.map +0 -1
- package/lib/codegen/defer-naming.test.d.ts +0 -2
- package/lib/codegen/defer-naming.test.d.ts.map +0 -1
- package/lib/codegen/defer-naming.test.js +0 -105
- package/lib/codegen/defer-naming.test.js.map +0 -1
- package/lib/codegen/generated-at.test.d.ts +0 -2
- package/lib/codegen/generated-at.test.d.ts.map +0 -1
- package/lib/codegen/generated-at.test.js +0 -81
- package/lib/codegen/generated-at.test.js.map +0 -1
- package/lib/codegen/generator.test.d.ts +0 -2
- package/lib/codegen/generator.test.d.ts.map +0 -1
- package/lib/codegen/generator.test.js +0 -121
- package/lib/codegen/generator.test.js.map +0 -1
- package/lib/codegen/graphql-client.test.d.ts +0 -2
- package/lib/codegen/graphql-client.test.d.ts.map +0 -1
- package/lib/codegen/graphql-client.test.js +0 -171
- package/lib/codegen/graphql-client.test.js.map +0 -1
- package/lib/codegen/openapi-binary.test.d.ts +0 -2
- package/lib/codegen/openapi-binary.test.d.ts.map +0 -1
- package/lib/codegen/openapi-binary.test.js +0 -67
- package/lib/codegen/openapi-binary.test.js.map +0 -1
- package/lib/codegen/patch-audit.test.d.ts +0 -2
- package/lib/codegen/patch-audit.test.d.ts.map +0 -1
- package/lib/codegen/patch-audit.test.js +0 -141
- package/lib/codegen/patch-audit.test.js.map +0 -1
- package/lib/codegen/patches.test.d.ts +0 -2
- package/lib/codegen/patches.test.d.ts.map +0 -1
- package/lib/codegen/patches.test.js +0 -155
- package/lib/codegen/patches.test.js.map +0 -1
- package/lib/codegen/protocol-imports.test.d.ts +0 -2
- package/lib/codegen/protocol-imports.test.d.ts.map +0 -1
- package/lib/codegen/protocol-imports.test.js +0 -36
- package/lib/codegen/protocol-imports.test.js.map +0 -1
- package/lib/codegen/rewrite-operation-ids.test.d.ts +0 -2
- package/lib/codegen/rewrite-operation-ids.test.d.ts.map +0 -1
- package/lib/codegen/rewrite-operation-ids.test.js +0 -451
- package/lib/codegen/rewrite-operation-ids.test.js.map +0 -1
- package/lib/codegen/untagged-unions.test.d.ts +0 -2
- package/lib/codegen/untagged-unions.test.d.ts.map +0 -1
- package/lib/codegen/untagged-unions.test.js +0 -80
- package/lib/codegen/untagged-unions.test.js.map +0 -1
- package/lib/error-category.js.map +0 -1
- package/lib/errors.js.map +0 -1
- package/lib/fixtures/xml/upstream-validator.json +0 -397
- package/lib/graphql.js.map +0 -1
- package/lib/graphql.test.d.ts +0 -2
- package/lib/graphql.test.d.ts.map +0 -1
- package/lib/graphql.test.js +0 -151
- package/lib/graphql.test.js.map +0 -1
- package/lib/graphql.types.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/json-patch.test.d.ts +0 -2
- package/lib/json-patch.test.d.ts.map +0 -1
- package/lib/json-patch.test.js +0 -65
- package/lib/json-patch.test.js.map +0 -1
- package/lib/pagination.js.map +0 -1
- package/lib/pagination.test.d.ts +0 -2
- package/lib/pagination.test.d.ts.map +0 -1
- package/lib/pagination.test.js +0 -131
- package/lib/pagination.test.js.map +0 -1
- package/lib/protocol-http.js.map +0 -1
- package/lib/protocol-http.test.d.ts +0 -2
- package/lib/protocol-http.test.d.ts.map +0 -1
- package/lib/protocol-http.test.js +0 -228
- package/lib/protocol-http.test.js.map +0 -1
- package/lib/protocol-rest.js.map +0 -1
- package/lib/protocol-rest.test.d.ts +0 -2
- package/lib/protocol-rest.test.d.ts.map +0 -1
- package/lib/protocol-rest.test.js +0 -498
- package/lib/protocol-rest.test.js.map +0 -1
- package/lib/query.js.map +0 -1
- package/lib/response-validation.js.map +0 -1
- package/lib/response-validation.test.d.ts +0 -2
- package/lib/response-validation.test.d.ts.map +0 -1
- package/lib/response-validation.test.js +0 -72
- package/lib/response-validation.test.js.map +0 -1
- package/lib/retry-after.js.map +0 -1
- package/lib/retry-after.test.d.ts +0 -2
- package/lib/retry-after.test.d.ts.map +0 -1
- package/lib/retry-after.test.js +0 -204
- package/lib/retry-after.test.js.map +0 -1
- package/lib/retry.js.map +0 -1
- package/lib/retry.test.d.ts +0 -2
- package/lib/retry.test.d.ts.map +0 -1
- package/lib/retry.test.js +0 -407
- package/lib/retry.test.js.map +0 -1
- package/lib/schema.js.map +0 -1
- package/lib/sdks.test.d.ts +0 -2
- package/lib/sdks.test.d.ts.map +0 -1
- package/lib/sdks.test.js +0 -76
- package/lib/sdks.test.js.map +0 -1
- package/lib/trait.js.map +0 -1
- package/lib/xml.js.map +0 -1
- package/lib/xml.test.d.ts +0 -2
- package/lib/xml.test.d.ts.map +0 -1
- package/lib/xml.test.js +0 -210
- package/lib/xml.test.js.map +0 -1
- package/src/codegen/boolean-string-enums.test.ts +0 -299
- package/src/codegen/defer-naming.test.ts +0 -113
- package/src/codegen/generated-at.test.ts +0 -89
- package/src/codegen/generator.test.ts +0 -137
- package/src/codegen/graphql-client.test.ts +0 -189
- package/src/codegen/openapi-binary.test.ts +0 -91
- package/src/codegen/patch-audit.test.ts +0 -160
- package/src/codegen/patches.test.ts +0 -188
- package/src/codegen/protocol-imports.test.ts +0 -39
- package/src/codegen/rewrite-operation-ids.test.ts +0 -472
- package/src/codegen/untagged-unions.test.ts +0 -85
- package/src/fixtures/xml/upstream-validator.json +0 -397
- package/src/graphql.test.ts +0 -198
- package/src/json-patch.test.ts +0 -77
- package/src/pagination.test.ts +0 -169
- package/src/protocol-http.test.ts +0 -276
- package/src/protocol-rest.test.ts +0 -703
- package/src/response-validation.test.ts +0 -89
- package/src/retry-after.test.ts +0 -267
- package/src/retry.test.ts +0 -566
- package/src/sdks.test.ts +0 -87
- package/src/xml.test.ts +0 -251
package/lib/pagination.js
CHANGED
|
@@ -1,266 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Pagination utilities for streaming through paginated API responses.
|
|
3
|
-
*
|
|
4
|
-
* Supports multiple pagination styles:
|
|
5
|
-
* - Page-based: page/per_page with a page number that advances
|
|
6
|
-
* - Cursor-based: cursor/limit with an opaque next-cursor string
|
|
7
|
-
* - Token-based (AWS style): NextToken/MaxResults continuation tokens
|
|
8
|
-
* - Relay (GraphQL connections): after/first with a `pageInfo` block whose
|
|
9
|
-
* `hasNextPage` — not the cursor — marks the end
|
|
10
|
-
* - Single: one-shot list endpoints that still expose the paginated surface
|
|
11
|
-
*
|
|
12
|
-
* Each SDK stores a {@link PaginatedTrait} on its operations (sourced from the
|
|
13
|
-
* `smithy.api#paginated` trait in its models) and picks a
|
|
14
|
-
* {@link PaginationStrategy}; these shared utilities handle the streaming.
|
|
15
|
-
* Ported from the distilled repo's `core/pagination`.
|
|
16
|
-
*/
|
|
17
|
-
import * as Effect from "effect/Effect";
|
|
18
|
-
import * as Stream from "effect/Stream";
|
|
19
|
-
/**
|
|
20
|
-
* Get a value from an object using a dot-separated path (e.g.
|
|
21
|
-
* `"resultInfo.page"`). Used for pagination traits and nested access.
|
|
22
|
-
*/
|
|
23
|
-
export const getPath = (obj, path) => {
|
|
24
|
-
const parts = path.split(".");
|
|
25
|
-
let current = obj;
|
|
26
|
-
for (const part of parts) {
|
|
27
|
-
if (current == null || typeof current !== "object") {
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
current = current[part];
|
|
31
|
-
}
|
|
32
|
-
return current;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Collect the items a dot-separated path selects, flattening arrays as it
|
|
36
|
-
* goes. Unlike {@link getPath} (which walks a single value and is used for
|
|
37
|
-
* cursors/tokens), every segment here fans out over whatever the previous one
|
|
38
|
-
* produced, so a path may cross a list:
|
|
39
|
-
*
|
|
40
|
-
* - `"items"` on `{ items: [a, b] }` → `[a, b]` (the common flat case)
|
|
41
|
-
* - `"edges.node"` on a Relay connection → every edge's `node`
|
|
42
|
-
*
|
|
43
|
-
* `null`/`undefined` links are dropped rather than propagated, so a partially
|
|
44
|
-
* null page yields the items it does have instead of nothing.
|
|
45
|
-
*/
|
|
46
|
-
export const getItems = (obj, path) => {
|
|
47
|
-
let current = [obj];
|
|
48
|
-
for (const part of path.split(".")) {
|
|
49
|
-
const next = [];
|
|
50
|
-
for (const value of current) {
|
|
51
|
-
if (value == null || typeof value !== "object")
|
|
52
|
-
continue;
|
|
53
|
-
const child = value[part];
|
|
54
|
-
if (Array.isArray(child))
|
|
55
|
-
next.push(...child);
|
|
56
|
-
else if (child != null)
|
|
57
|
-
next.push(child);
|
|
58
|
-
}
|
|
59
|
-
current = next;
|
|
60
|
-
}
|
|
61
|
-
return current;
|
|
62
|
-
};
|
|
63
|
-
const missingPaginationConfig = (kind) => Stream.die(new Error(kind));
|
|
64
|
-
/**
|
|
65
|
-
* Whether a continuation token/cursor returned by a paginated operation
|
|
66
|
-
* means "no more pages".
|
|
67
|
-
*
|
|
68
|
-
* APIs mark the terminal page by omitting the output token, returning it
|
|
69
|
-
* as `null`, or — for several services (e.g. SSM, CloudWatch Logs) — as an
|
|
70
|
-
* empty string. Treating `""` as a live token re-requests the first page
|
|
71
|
-
* forever (or fails with a ValidationException). Object tokens (e.g.
|
|
72
|
-
* DynamoDB's `LastEvaluatedKey`) are always truthy and unaffected.
|
|
73
|
-
*/
|
|
74
|
-
export const isTerminalToken = (token) => token === undefined || token === null || token === "";
|
|
75
|
-
/**
|
|
76
|
-
* Stream for single-shot list endpoints that still expose the paginated
|
|
77
|
-
* surface — emits exactly one page.
|
|
78
|
-
*/
|
|
79
|
-
export const paginateSingle = (operation, input) => Stream.make(input).pipe(Stream.mapEffect((requestPayload) => operation(requestPayload)));
|
|
80
|
-
// ============================================================================
|
|
81
|
-
// Page-based Pagination
|
|
82
|
-
// ============================================================================
|
|
83
|
-
/**
|
|
84
|
-
* Stream of pages using page-number pagination. The next page is taken from
|
|
85
|
-
* `outputToken` when it advances; otherwise the page number is incremented,
|
|
86
|
-
* terminating when a page comes back with no items (or no token).
|
|
87
|
-
*/
|
|
88
|
-
export const paginatePageNumber = (operation, input, pagination) => {
|
|
89
|
-
const inputToken = pagination.inputToken;
|
|
90
|
-
const outputToken = pagination.outputToken;
|
|
91
|
-
if (!inputToken || !outputToken) {
|
|
92
|
-
return missingPaginationConfig("Page-number pagination requires inputToken and outputToken");
|
|
93
|
-
}
|
|
94
|
-
const startPage = typeof input[inputToken] === "number" ? input[inputToken] : 1;
|
|
95
|
-
return Stream.unfold({ page: startPage, done: false }, (state) => Effect.gen(function* () {
|
|
96
|
-
if (state.done)
|
|
97
|
-
return undefined;
|
|
98
|
-
const requestPayload = { ...input, [inputToken]: state.page };
|
|
99
|
-
const response = yield* operation(requestPayload);
|
|
100
|
-
const nextPage = getPath(response, outputToken);
|
|
101
|
-
// Some APIs report the CURRENT page at `outputToken` rather than the
|
|
102
|
-
// next one (e.g. Cloudflare's `result_info.page`). Taking that value as
|
|
103
|
-
// the next page re-requests the same page forever. Only accept an
|
|
104
|
-
// *advancing* page number; otherwise advance by one and terminate when
|
|
105
|
-
// a page comes back with no items (or the token is absent).
|
|
106
|
-
const items = pagination.items
|
|
107
|
-
? getPath(response, pagination.items)
|
|
108
|
-
: undefined;
|
|
109
|
-
const nextState = {
|
|
110
|
-
page: typeof nextPage === "number" && nextPage > state.page ? nextPage : state.page + 1,
|
|
111
|
-
done: nextPage === null ||
|
|
112
|
-
nextPage === undefined ||
|
|
113
|
-
(items !== undefined && items.length === 0),
|
|
114
|
-
};
|
|
115
|
-
return [response, nextState];
|
|
116
|
-
}));
|
|
117
|
-
};
|
|
118
|
-
// ============================================================================
|
|
119
|
-
// Cursor-based Pagination
|
|
120
|
-
// ============================================================================
|
|
121
|
-
/**
|
|
122
|
-
* Stream of pages using cursor-based pagination — follow `outputToken`
|
|
123
|
-
* cursors until one comes back absent or repeats a previously requested cursor.
|
|
124
|
-
* Empty pages still advance when they return a new cursor.
|
|
125
|
-
*/
|
|
126
|
-
export const paginateCursor = (operation, input, pagination) => {
|
|
127
|
-
const inputToken = pagination.inputToken;
|
|
128
|
-
const outputToken = pagination.outputToken;
|
|
129
|
-
if (!inputToken || !outputToken) {
|
|
130
|
-
return missingPaginationConfig("Cursor pagination requires inputToken and outputToken");
|
|
131
|
-
}
|
|
132
|
-
const startCursor = typeof input[inputToken] === "string" ? input[inputToken] : undefined;
|
|
133
|
-
return Stream.suspend(() => {
|
|
134
|
-
// Cursor history belongs to this traversal, not to the reusable stream.
|
|
135
|
-
const requestedCursors = new Set();
|
|
136
|
-
return Stream.unfold({ cursor: startCursor, done: false }, (state) => Effect.gen(function* () {
|
|
137
|
-
if (state.done)
|
|
138
|
-
return undefined;
|
|
139
|
-
if (state.cursor !== undefined)
|
|
140
|
-
requestedCursors.add(state.cursor);
|
|
141
|
-
const requestPayload = {
|
|
142
|
-
...input,
|
|
143
|
-
...(state.cursor ? { [inputToken]: state.cursor } : {}),
|
|
144
|
-
};
|
|
145
|
-
const response = yield* operation(requestPayload);
|
|
146
|
-
const nextCursor = getPath(response, outputToken);
|
|
147
|
-
const nextState = {
|
|
148
|
-
cursor: nextCursor ?? undefined,
|
|
149
|
-
done: isTerminalToken(nextCursor) || (nextCursor != null && requestedCursors.has(nextCursor)),
|
|
150
|
-
};
|
|
151
|
-
return [response, nextState];
|
|
152
|
-
}));
|
|
153
|
-
});
|
|
154
|
-
};
|
|
155
|
-
// ============================================================================
|
|
156
|
-
// Token-based Pagination (AWS style)
|
|
157
|
-
// ============================================================================
|
|
158
|
-
/**
|
|
159
|
-
* Stream of pages using token-based pagination — pass `outputToken` back as
|
|
160
|
-
* `inputToken` until it comes back absent.
|
|
161
|
-
*/
|
|
162
|
-
export const paginateToken = (operation, input, pagination) => {
|
|
163
|
-
const inputToken = pagination.inputToken;
|
|
164
|
-
const outputToken = pagination.outputToken;
|
|
165
|
-
if (!inputToken || !outputToken) {
|
|
166
|
-
return missingPaginationConfig("Token pagination requires inputToken and outputToken");
|
|
167
|
-
}
|
|
168
|
-
const startToken = input[inputToken];
|
|
169
|
-
return Stream.unfold({ token: startToken, done: false }, (state) => Effect.gen(function* () {
|
|
170
|
-
if (state.done)
|
|
171
|
-
return undefined;
|
|
172
|
-
const requestPayload = state.token !== undefined ? { ...input, [inputToken]: state.token } : input;
|
|
173
|
-
const response = yield* operation(requestPayload);
|
|
174
|
-
const nextToken = getPath(response, outputToken);
|
|
175
|
-
const nextState = {
|
|
176
|
-
token: nextToken,
|
|
177
|
-
done: isTerminalToken(nextToken),
|
|
178
|
-
};
|
|
179
|
-
return [response, nextState];
|
|
180
|
-
}));
|
|
181
|
-
};
|
|
182
|
-
// ============================================================================
|
|
183
|
-
// Relay Pagination (GraphQL connections)
|
|
184
|
-
// ============================================================================
|
|
185
|
-
/**
|
|
186
|
-
* Stream of pages over a Relay connection — pass `pageInfo.endCursor` back as
|
|
187
|
-
* `after` for as long as `pageInfo.hasNextPage` is true.
|
|
188
|
-
*
|
|
189
|
-
* Relay is cursor pagination with one twist that breaks
|
|
190
|
-
* {@link paginateCursor}: the terminal page still carries an `endCursor` (it
|
|
191
|
-
* points at the last edge, not at "nothing left"). Only `hasNextPage`
|
|
192
|
-
* distinguishes "more to fetch" from "that was everything", so this strategy
|
|
193
|
-
* reads the boolean and treats the cursor as a pure position marker. A
|
|
194
|
-
* connection that omits `pageInfo` entirely (or returns an empty page) also
|
|
195
|
-
* terminates, so a malformed response can't spin forever.
|
|
196
|
-
*/
|
|
197
|
-
export const paginateRelay = (operation, input, pagination) => {
|
|
198
|
-
const inputToken = pagination.inputToken;
|
|
199
|
-
const outputToken = pagination.outputToken;
|
|
200
|
-
if (!inputToken || !outputToken) {
|
|
201
|
-
return missingPaginationConfig("Relay pagination requires inputToken and outputToken");
|
|
202
|
-
}
|
|
203
|
-
// `pageInfo.endCursor` → `pageInfo.hasNextPage` when the trait doesn't say.
|
|
204
|
-
const hasNextPath = pagination.hasNextPage ??
|
|
205
|
-
`${outputToken.split(".").slice(0, -1).concat("hasNextPage").join(".")}`;
|
|
206
|
-
const startCursor = typeof input[inputToken] === "string" ? input[inputToken] : undefined;
|
|
207
|
-
return Stream.unfold({ cursor: startCursor, done: false }, (state) => Effect.gen(function* () {
|
|
208
|
-
if (state.done)
|
|
209
|
-
return undefined;
|
|
210
|
-
const requestPayload = {
|
|
211
|
-
...input,
|
|
212
|
-
...(state.cursor ? { [inputToken]: state.cursor } : {}),
|
|
213
|
-
};
|
|
214
|
-
const response = yield* operation(requestPayload);
|
|
215
|
-
const nextCursor = getPath(response, outputToken);
|
|
216
|
-
const hasNext = getPath(response, hasNextPath) === true;
|
|
217
|
-
// An empty page means the connection is exhausted regardless of what
|
|
218
|
-
// `hasNextPage` claims — re-requesting the same cursor would loop.
|
|
219
|
-
const emptyPage = pagination.items !== undefined && getItems(response, pagination.items).length === 0;
|
|
220
|
-
// A connection that keeps returning the same `endCursor` with
|
|
221
|
-
// `hasNextPage: true` (Railway `projects` has done this) would
|
|
222
|
-
// otherwise paginate forever.
|
|
223
|
-
const stuckCursor = state.cursor !== undefined &&
|
|
224
|
-
nextCursor !== undefined &&
|
|
225
|
-
nextCursor !== null &&
|
|
226
|
-
nextCursor === state.cursor;
|
|
227
|
-
const nextState = {
|
|
228
|
-
cursor: nextCursor ?? undefined,
|
|
229
|
-
done: !hasNext || isTerminalToken(nextCursor) || emptyPage || stuckCursor,
|
|
230
|
-
};
|
|
231
|
-
return [response, nextState];
|
|
232
|
-
}));
|
|
233
|
-
};
|
|
234
|
-
/**
|
|
235
|
-
* Shared default pagination dispatcher for SDKs that use generic
|
|
236
|
-
* token/cursor/page traversal.
|
|
237
|
-
*/
|
|
238
|
-
export const paginateWithDefaults = (operation, input, pagination) => {
|
|
239
|
-
const mode = pagination.mode ?? "token";
|
|
240
|
-
switch (mode) {
|
|
241
|
-
case "page":
|
|
242
|
-
return paginatePageNumber(operation, input, pagination);
|
|
243
|
-
case "cursor":
|
|
244
|
-
return paginateCursor(operation, input, pagination);
|
|
245
|
-
case "relay":
|
|
246
|
-
return paginateRelay(operation, input, pagination);
|
|
247
|
-
case "single":
|
|
248
|
-
return paginateSingle(operation, input, pagination);
|
|
249
|
-
case "token":
|
|
250
|
-
default:
|
|
251
|
-
return paginateToken(operation, input, pagination);
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
// ============================================================================
|
|
255
|
-
// Item extraction
|
|
256
|
-
// ============================================================================
|
|
257
|
-
/**
|
|
258
|
-
* Extracts individual items from a page stream.
|
|
259
|
-
*
|
|
260
|
-
* @param pages - A stream of page responses
|
|
261
|
-
* @param itemsPath - Dot-separated path to the items in the page; segments may
|
|
262
|
-
* cross arrays (see {@link getItems})
|
|
263
|
-
* @returns A Stream of individual items
|
|
264
|
-
*/
|
|
265
|
-
export const extractItems = (pages, itemsPath) => pages.pipe(Stream.flatMap((page) => Stream.fromIterable(getItems(page, itemsPath))));
|
|
266
|
-
//# sourceMappingURL=pagination.js.map
|
|
1
|
+
export { pagination$extractItems as extractItems, pagination$getItems as getItems, pagination$getPath as getPath, pagination$isTerminalToken as isTerminalToken, pagination$paginateCursor as paginateCursor, pagination$paginatePageNumber as paginatePageNumber, pagination$paginateRelay as paginateRelay, pagination$paginateSingle as paginateSingle, pagination$paginateToken as paginateToken, pagination$paginateWithDefaults as paginateWithDefaults } from "./_bundle/base.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Binary/opaque values that must never be treated as key-value objects. */
|
|
2
|
+
export declare const isOpaqueValue: (v: unknown) => boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Deep-unwrap `Redacted` values in an input (plain objects/arrays only --
|
|
5
|
+
* class instances, files, and binary payloads pass through untouched).
|
|
6
|
+
* Sensitive input members accept `string | Redacted<string>`; the wire wants
|
|
7
|
+
* the raw string.
|
|
8
|
+
*/
|
|
9
|
+
export declare const unwrapRedactedDeep: (value: unknown) => unknown;
|
|
10
|
+
//# sourceMappingURL=plain-values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plain-values.d.ts","sourceRoot":"","sources":["../src/plain-values.ts"],"names":[],"mappings":"AAOA,4EAA4E;AAC5E,eAAO,MAAM,aAAa,MAAO,OAAO,KAAG,OAKxB,CAAC;AASpB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,UAAW,OAAO,KAAG,OAYnD,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from"effect/Redacted";const isOpaqueValue=e=>e instanceof Blob||e instanceof File||e instanceof ArrayBuffer||e instanceof Uint8Array||e instanceof Date;const isPlainObject=e=>e!==null&&typeof e===`object`&&!Array.isArray(e)&&!isOpaqueValue(e)&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null);const unwrapRedactedDeep=t=>{if(e.isRedacted(t))return e.value(t);if(Array.isArray(t))return t.map(unwrapRedactedDeep);if(isPlainObject(t)){const e={};for(const[n,r]of Object.entries(t)){if(r===void 0)continue;e[n]=unwrapRedactedDeep(r)}return e}return t};export{isOpaqueValue,unwrapRedactedDeep};
|
|
2
|
+
//# sourceMappingURL=plain-values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plain-values.js","names":["Redacted","v","value","out","k"],"sources":["../src/plain-values.ts"],"mappings":"kCAQA,MAAa,cAAiB,GAC5BC,aAAa,MACbA,aAAa,MACbA,aAAa,aACbA,aAAa,YACbA,aAAa,KAEf,MAAM,cAAiB,GACrBA,IAAM,MACN,OAAOA,IAAM,UACb,CAAC,MAAM,QAAQA,CAAC,GAChB,CAAC,cAAcA,CAAC,IACf,OAAO,eAAeA,CAAC,IAAM,OAAO,WAAa,OAAO,eAAeA,CAAC,IAAM,MAQjF,MAAa,mBAAsB,GAA4B,CAC7D,GAAID,EAAS,WAAWE,CAAK,EAAG,OAAOF,EAAS,MAAME,CAAK,EAC3D,GAAI,MAAM,QAAQA,CAAK,EAAG,OAAOA,EAAM,IAAI,kBAAkB,EAC7D,GAAI,cAAcA,CAAK,EAAG,CACxB,MAAMC,EAA+B,CAAC,EACtC,IAAK,KAAM,CAACC,EAAGH,KAAM,OAAO,QAAQC,CAAK,EAAG,CAC1C,GAAID,IAAM,IAAA,GAAW,SACrB,EAAIG,GAAK,mBAAmBH,CAAC,CAC/B,CACA,OAAOE,CACT,CACA,OAAOD,CACT"}
|
package/lib/protocol-http.d.ts
CHANGED
|
@@ -3,14 +3,15 @@ import * as HttpClientRequest from "effect/http/HttpClientRequest";
|
|
|
3
3
|
* Generic REST protocol machinery, shared by SDK protocol layers.
|
|
4
4
|
*
|
|
5
5
|
* Everything here is driven purely by the trait annotations in
|
|
6
|
-
* `core/trait.ts`
|
|
6
|
+
* `core/trait.ts` -- nothing is provider-specific. An SDK protocol (e.g.
|
|
7
7
|
* cloudflare's) supplies credentials/base-URL, calls {@link buildRequest} to
|
|
8
8
|
* encode, and layers its own response-envelope handling on top of the
|
|
9
9
|
* decode-side helpers ({@link getProps}/{@link mapKeys}/
|
|
10
10
|
* {@link matchTypedError}).
|
|
11
11
|
*/
|
|
12
12
|
import type * as AST from "effect/SchemaAST";
|
|
13
|
-
import {
|
|
13
|
+
import { isOpaqueValue } from "./plain-values.ts";
|
|
14
|
+
import { type ErrorMatcher, type HttpTrait, type KeyDictionaryEntries } from "./trait.ts";
|
|
14
15
|
export declare const getProps: (ast: AST.AST) => readonly AST.PropertySignature[];
|
|
15
16
|
export declare const getAnn: (ast: AST.AST, symbol: symbol) => unknown;
|
|
16
17
|
export declare const getPropAnn: (prop: AST.PropertySignature, symbol: symbol) => unknown;
|
|
@@ -18,14 +19,38 @@ export declare const hasPropAnn: (prop: AST.PropertySignature, symbol: symbol) =
|
|
|
18
19
|
export declare const nameOf: (prop: AST.PropertySignature, symbol: symbol) => string;
|
|
19
20
|
/** Resolve wrappers to the real node: Suspend, encoding, optional/null unions. */
|
|
20
21
|
export declare const resolveNode: (ast: AST.AST) => AST.AST;
|
|
21
|
-
/**
|
|
22
|
-
export
|
|
22
|
+
/** An output member read from a response header (`T.Header`). */
|
|
23
|
+
export interface ResponseHeaderMember {
|
|
24
|
+
readonly key: string;
|
|
25
|
+
/** Lowercase header name. */
|
|
26
|
+
readonly wire: string;
|
|
27
|
+
/** The member is a number; the header's text is parsed. */
|
|
28
|
+
readonly number: boolean;
|
|
29
|
+
}
|
|
30
|
+
/** The output's header-bound members, read from the schema once. */
|
|
31
|
+
export declare const responseHeaderMembers: (outputAst: AST.AST) => ReadonlyArray<ResponseHeaderMember>;
|
|
32
|
+
/**
|
|
33
|
+
* Copy the response headers an output declares onto its decoded body. A
|
|
34
|
+
* number member gets the header parsed; text that is not a number is kept
|
|
35
|
+
* as sent, so strict validation reports it. A body that is not an object
|
|
36
|
+
* (a raw root) is returned as is -- generators bind no headers there.
|
|
37
|
+
*/
|
|
38
|
+
export declare const withResponseHeaders: (members: ReadonlyArray<ResponseHeaderMember>, body: unknown, headers: Record<string, string | undefined>) => unknown;
|
|
39
|
+
export { isOpaqueValue };
|
|
23
40
|
/**
|
|
24
41
|
* Deep-rename keys via a plain dictionary (see `T.KeyDictionary`). An entry
|
|
25
42
|
* may list several wire spellings; encode uses the first (canonical) one and
|
|
26
43
|
* decode maps every listed spelling back to the TS name.
|
|
27
44
|
*/
|
|
28
45
|
export declare const mapKeysByDictionary: (dict: KeyDictionaryEntries, value: unknown, direction: "encode" | "decode") => unknown;
|
|
46
|
+
/**
|
|
47
|
+
* Whether {@link mapKeys} returns every value of `root` unchanged (as a deep
|
|
48
|
+
* copy) in `direction` with no fallback dictionary: no member is renamed,
|
|
49
|
+
* string-encoded (encode) or picked by `T.UnionCases` (decode), and no
|
|
50
|
+
* `T.KeyDictionary` is in scope anywhere below `root`. Protocols use it to
|
|
51
|
+
* skip the walk. Computed once per schema node and direction.
|
|
52
|
+
*/
|
|
53
|
+
export declare const mapsVerbatim: (root: AST.AST, direction: "encode" | "decode") => boolean;
|
|
29
54
|
export declare const mapKeys: (ast: AST.AST, value: unknown, direction: "encode" | "decode", fallback?: KeyDictionaryEntries) => unknown;
|
|
30
55
|
export interface BuildRequestOptions {
|
|
31
56
|
readonly input: unknown;
|
|
@@ -40,12 +65,25 @@ export interface BuildRequestOptions {
|
|
|
40
65
|
*/
|
|
41
66
|
readonly mapMemberHeader?: (name: string, value: string) => string;
|
|
42
67
|
/**
|
|
43
|
-
* Wire name for input keys the schema doesn't declare (spec drift
|
|
68
|
+
* Wire name for input keys the schema doesn't declare (spec drift --
|
|
44
69
|
* unknown keys pass through as body fields rather than being dropped).
|
|
45
70
|
* Defaults to the key verbatim.
|
|
46
71
|
*/
|
|
47
72
|
readonly unknownKeyToWire?: (key: string) => string;
|
|
48
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Encode a greedy `{name+}` label: the value may span several path
|
|
76
|
+
* segments (e.g. an Azure scope `/subscriptions/{id}/resourceGroups/{rg}`),
|
|
77
|
+
* so each segment is encoded on its own and the `/` separators are kept.
|
|
78
|
+
* Leading slashes are dropped because the URI template already supplies one.
|
|
79
|
+
*/
|
|
80
|
+
export declare const encodeGreedyLabel: (value: string) => string;
|
|
81
|
+
/**
|
|
82
|
+
* `HttpClientRequest.make(method)(url)` with `headers` set, in one object:
|
|
83
|
+
* the same request as `make(...).pipe(setHeaders(headers))` without the
|
|
84
|
+
* intermediate copies. `url` may carry a query string.
|
|
85
|
+
*/
|
|
86
|
+
export declare const makeRequest: (method: HttpTrait["method"], url: string, headers: Record<string, string>) => HttpClientRequest.HttpClientRequest;
|
|
49
87
|
/**
|
|
50
88
|
* Build an HTTP request from an operation input and its schema, driven by
|
|
51
89
|
* the trait annotations: `Http()` supplies method + URI template, `Label()`
|
|
@@ -55,16 +93,14 @@ export interface BuildRequestOptions {
|
|
|
55
93
|
* `FormDataFile()` members become multipart file parts, and everything else
|
|
56
94
|
* is a JSON body field (wire-named via `Body()` / `KeyDictionary`).
|
|
57
95
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*
|
|
63
|
-
* segments
|
|
64
|
-
*
|
|
65
|
-
* Leading slashes are dropped because the URI template already supplies one.
|
|
96
|
+
* The schema is read once per input schema (see `planFor`); later calls only
|
|
97
|
+
* walk the input value.
|
|
98
|
+
*
|
|
99
|
+
* Throws when the input schema is missing the `Http()` trait -- a codegen
|
|
100
|
+
* bug -- and, before anything is sent, when a label is `.` or `..` (for a
|
|
101
|
+
* greedy `{name+}` label, when any of its segments is). Each surfaces as a
|
|
102
|
+
* defect by the calling protocol's Effect context.
|
|
66
103
|
*/
|
|
67
|
-
export declare const encodeGreedyLabel: (value: string) => string;
|
|
68
104
|
export declare const buildRequest: ({ input, inputAst, baseUrl, headers: baseHeaders, mapMemberHeader, unknownKeyToWire, }: BuildRequestOptions) => HttpClientRequest.HttpClientRequest;
|
|
69
105
|
/** Parsed response metadata supplied by a protocol after it detects a failure. */
|
|
70
106
|
export interface ErrorResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol-http.d.ts","sourceRoot":"","sources":["../src/protocol-http.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"protocol-http.d.ts","sourceRoot":"","sources":["../src/protocol-http.ts"],"names":[],"mappings":"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"}
|