@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.
Files changed (318) hide show
  1. package/lib/_bundle/aws.js +2 -0
  2. package/lib/_bundle/aws.js.map +1 -0
  3. package/lib/_bundle/base.js +5 -0
  4. package/lib/_bundle/base.js.map +1 -0
  5. package/lib/_bundle/graphql.js +3 -0
  6. package/lib/_bundle/graphql.js.map +1 -0
  7. package/lib/_bundle/rest.js +2 -0
  8. package/lib/_bundle/rest.js.map +1 -0
  9. package/lib/_bundle/xml.js +4 -0
  10. package/lib/_bundle/xml.js.map +1 -0
  11. package/lib/api.d.ts +118 -13
  12. package/lib/api.d.ts.map +1 -1
  13. package/lib/api.js +1 -188
  14. package/lib/category.d.ts.map +1 -1
  15. package/lib/category.js +1 -278
  16. package/lib/chunks.d.ts +3 -0
  17. package/lib/chunks.d.ts.map +1 -0
  18. package/lib/chunks.js +1 -0
  19. package/lib/codegen/boolean-string-enums.js +36 -36
  20. package/lib/codegen/chunk.d.ts +7 -0
  21. package/lib/codegen/chunk.d.ts.map +1 -0
  22. package/lib/codegen/chunk.js +139 -0
  23. package/lib/codegen/chunk.js.map +1 -0
  24. package/lib/codegen/cli.d.ts.map +1 -1
  25. package/lib/codegen/cli.js +28 -14
  26. package/lib/codegen/cli.js.map +1 -1
  27. package/lib/codegen/datafy.d.ts +14 -0
  28. package/lib/codegen/datafy.d.ts.map +1 -0
  29. package/lib/codegen/datafy.js +853 -0
  30. package/lib/codegen/datafy.js.map +1 -0
  31. package/lib/codegen/dedupe.d.ts +5 -0
  32. package/lib/codegen/dedupe.d.ts.map +1 -0
  33. package/lib/codegen/dedupe.js +153 -0
  34. package/lib/codegen/dedupe.js.map +1 -0
  35. package/lib/codegen/emit.js +56 -56
  36. package/lib/codegen/format.js +18 -18
  37. package/lib/codegen/generated-at.js +29 -29
  38. package/lib/codegen/generator.d.ts.map +1 -1
  39. package/lib/codegen/generator.js +92 -84
  40. package/lib/codegen/generator.js.map +1 -1
  41. package/lib/codegen/graph.js +36 -36
  42. package/lib/codegen/graphql-client.d.ts +2 -0
  43. package/lib/codegen/graphql-client.d.ts.map +1 -1
  44. package/lib/codegen/graphql-client.js +55 -26
  45. package/lib/codegen/graphql-client.js.map +1 -1
  46. package/lib/codegen/graphql.js +113 -113
  47. package/lib/codegen/latin1.d.ts +3 -0
  48. package/lib/codegen/latin1.d.ts.map +1 -0
  49. package/lib/codegen/latin1.js +126 -0
  50. package/lib/codegen/latin1.js.map +1 -0
  51. package/lib/codegen/members.d.ts +7 -0
  52. package/lib/codegen/members.d.ts.map +1 -1
  53. package/lib/codegen/members.js +26 -19
  54. package/lib/codegen/members.js.map +1 -1
  55. package/lib/codegen/model-diff.js +6 -6
  56. package/lib/codegen/naming.js +19 -19
  57. package/lib/codegen/openapi-cli.js +15 -15
  58. package/lib/codegen/openapi.d.ts +17 -0
  59. package/lib/codegen/openapi.d.ts.map +1 -1
  60. package/lib/codegen/openapi.js +323 -169
  61. package/lib/codegen/openapi.js.map +1 -1
  62. package/lib/codegen/operations.js +14 -14
  63. package/lib/codegen/pagination.js +11 -11
  64. package/lib/codegen/patch-audit.js +57 -57
  65. package/lib/codegen/patches.js +79 -79
  66. package/lib/codegen/prelude.js +19 -19
  67. package/lib/codegen/privatize.d.ts +21 -0
  68. package/lib/codegen/privatize.d.ts.map +1 -0
  69. package/lib/codegen/privatize.js +176 -0
  70. package/lib/codegen/privatize.js.map +1 -0
  71. package/lib/codegen/proto.js +25 -25
  72. package/lib/codegen/pure.d.ts +6 -0
  73. package/lib/codegen/pure.d.ts.map +1 -0
  74. package/lib/codegen/pure.js +91 -0
  75. package/lib/codegen/pure.js.map +1 -0
  76. package/lib/codegen/rewrite-operation-ids.js +108 -108
  77. package/lib/codegen/spec-path.js +57 -57
  78. package/lib/codegen/table.d.ts +5 -0
  79. package/lib/codegen/table.d.ts.map +1 -0
  80. package/lib/codegen/table.js +249 -0
  81. package/lib/codegen/table.js.map +1 -0
  82. package/lib/config.d.ts +27 -0
  83. package/lib/config.d.ts.map +1 -0
  84. package/lib/config.js +1 -0
  85. package/lib/crypto.d.ts +76 -0
  86. package/lib/crypto.d.ts.map +1 -0
  87. package/lib/crypto.js +1 -0
  88. package/lib/debug.d.ts +2 -0
  89. package/lib/debug.d.ts.map +1 -0
  90. package/lib/debug.js +1 -0
  91. package/lib/error-category.d.ts +1 -1
  92. package/lib/error-category.d.ts.map +1 -1
  93. package/lib/error-category.js +1 -46
  94. package/lib/errors.d.ts +62 -62
  95. package/lib/errors.d.ts.map +1 -1
  96. package/lib/errors.js +1 -195
  97. package/lib/graphql.d.ts +31 -20
  98. package/lib/graphql.d.ts.map +1 -1
  99. package/lib/graphql.js +1 -1027
  100. package/lib/graphql.types.js +1 -5
  101. package/lib/index.d.ts +3 -2
  102. package/lib/index.d.ts.map +1 -1
  103. package/lib/index.js +1 -15
  104. package/lib/json-patch.d.ts +2 -2
  105. package/lib/json-patch.js +1 -226
  106. package/lib/json-patch.js.map +1 -1
  107. package/lib/pagination.d.ts +9 -25
  108. package/lib/pagination.d.ts.map +1 -1
  109. package/lib/pagination.js +1 -266
  110. package/lib/plain-values.d.ts +10 -0
  111. package/lib/plain-values.d.ts.map +1 -0
  112. package/lib/plain-values.js +2 -0
  113. package/lib/plain-values.js.map +1 -0
  114. package/lib/protocol-http.d.ts +50 -14
  115. package/lib/protocol-http.d.ts.map +1 -1
  116. package/lib/protocol-http.js +1 -639
  117. package/lib/protocol-rest.d.ts +38 -25
  118. package/lib/protocol-rest.d.ts.map +1 -1
  119. package/lib/protocol-rest.js +1 -267
  120. package/lib/query.js +1 -27
  121. package/lib/response-validation-strict.d.ts +48 -0
  122. package/lib/response-validation-strict.d.ts.map +1 -0
  123. package/lib/response-validation-strict.js +1 -0
  124. package/lib/response-validation.d.ts +43 -25
  125. package/lib/response-validation.d.ts.map +1 -1
  126. package/lib/response-validation.js +1 -76
  127. package/lib/retry-after.d.ts +3 -3
  128. package/lib/retry-after.js +1 -112
  129. package/lib/retry.d.ts +48 -29
  130. package/lib/retry.d.ts.map +1 -1
  131. package/lib/retry.js +1 -209
  132. package/lib/schema-lite-impl.d.ts +158 -0
  133. package/lib/schema-lite-impl.d.ts.map +1 -0
  134. package/lib/schema-lite-impl.js +1 -0
  135. package/lib/schema-lite-typed.d.ts +41 -0
  136. package/lib/schema-lite-typed.d.ts.map +1 -0
  137. package/lib/schema-lite-typed.js +2 -0
  138. package/lib/schema-lite-typed.js.map +1 -0
  139. package/lib/schema-lite.d.ts +40 -0
  140. package/lib/schema-lite.d.ts.map +1 -0
  141. package/lib/schema-lite.js +1 -0
  142. package/lib/schema.d.ts +20 -6
  143. package/lib/schema.d.ts.map +1 -1
  144. package/lib/schema.js +1 -48
  145. package/lib/testing.d.ts +3 -2
  146. package/lib/testing.d.ts.map +1 -1
  147. package/lib/testing.js +1 -40
  148. package/lib/testing.js.map +1 -1
  149. package/lib/trait.d.ts +13 -13
  150. package/lib/trait.d.ts.map +1 -1
  151. package/lib/trait.js +1 -131
  152. package/lib/xml.d.ts +1 -1
  153. package/lib/xml.d.ts.map +1 -1
  154. package/lib/xml.js +1 -311
  155. package/package.json +9 -7
  156. package/src/api.ts +1080 -180
  157. package/src/category.ts +33 -33
  158. package/src/chunks.ts +30 -0
  159. package/src/codegen/chunk.ts +147 -0
  160. package/src/codegen/cli.ts +27 -1
  161. package/src/codegen/datafy.ts +874 -0
  162. package/src/codegen/dedupe.ts +173 -0
  163. package/src/codegen/generator.ts +10 -3
  164. package/src/codegen/graphql-client.ts +49 -15
  165. package/src/codegen/latin1.ts +131 -0
  166. package/src/codegen/members.ts +8 -0
  167. package/src/codegen/openapi.ts +194 -3
  168. package/src/codegen/privatize.ts +200 -0
  169. package/src/codegen/pure.ts +94 -0
  170. package/src/codegen/table.ts +254 -0
  171. package/src/config.ts +216 -0
  172. package/src/crypto.ts +202 -0
  173. package/src/debug.ts +8 -0
  174. package/src/error-category.ts +2 -1
  175. package/src/errors.ts +65 -56
  176. package/src/graphql.ts +109 -62
  177. package/src/graphql.types.ts +9 -7
  178. package/src/index.ts +3 -2
  179. package/src/json-patch.ts +2 -2
  180. package/src/pagination.ts +37 -18
  181. package/src/plain-values.ts +41 -0
  182. package/src/protocol-http.ts +378 -145
  183. package/src/protocol-rest.ts +337 -169
  184. package/src/response-validation-strict.ts +327 -0
  185. package/src/response-validation.ts +101 -50
  186. package/src/retry-after.ts +3 -3
  187. package/src/retry.ts +94 -93
  188. package/src/schema-lite-impl.ts +550 -0
  189. package/src/schema-lite-typed.ts +44 -0
  190. package/src/schema-lite.ts +44 -0
  191. package/src/schema.ts +258 -14
  192. package/src/testing.ts +4 -2
  193. package/src/trait.ts +36 -28
  194. package/src/xml.ts +31 -17
  195. package/lib/api.js.map +0 -1
  196. package/lib/category.js.map +0 -1
  197. package/lib/codegen/boolean-string-enums.test.d.ts +0 -2
  198. package/lib/codegen/boolean-string-enums.test.d.ts.map +0 -1
  199. package/lib/codegen/boolean-string-enums.test.js +0 -275
  200. package/lib/codegen/boolean-string-enums.test.js.map +0 -1
  201. package/lib/codegen/defer-naming.test.d.ts +0 -2
  202. package/lib/codegen/defer-naming.test.d.ts.map +0 -1
  203. package/lib/codegen/defer-naming.test.js +0 -105
  204. package/lib/codegen/defer-naming.test.js.map +0 -1
  205. package/lib/codegen/generated-at.test.d.ts +0 -2
  206. package/lib/codegen/generated-at.test.d.ts.map +0 -1
  207. package/lib/codegen/generated-at.test.js +0 -81
  208. package/lib/codegen/generated-at.test.js.map +0 -1
  209. package/lib/codegen/generator.test.d.ts +0 -2
  210. package/lib/codegen/generator.test.d.ts.map +0 -1
  211. package/lib/codegen/generator.test.js +0 -121
  212. package/lib/codegen/generator.test.js.map +0 -1
  213. package/lib/codegen/graphql-client.test.d.ts +0 -2
  214. package/lib/codegen/graphql-client.test.d.ts.map +0 -1
  215. package/lib/codegen/graphql-client.test.js +0 -171
  216. package/lib/codegen/graphql-client.test.js.map +0 -1
  217. package/lib/codegen/openapi-binary.test.d.ts +0 -2
  218. package/lib/codegen/openapi-binary.test.d.ts.map +0 -1
  219. package/lib/codegen/openapi-binary.test.js +0 -67
  220. package/lib/codegen/openapi-binary.test.js.map +0 -1
  221. package/lib/codegen/patch-audit.test.d.ts +0 -2
  222. package/lib/codegen/patch-audit.test.d.ts.map +0 -1
  223. package/lib/codegen/patch-audit.test.js +0 -141
  224. package/lib/codegen/patch-audit.test.js.map +0 -1
  225. package/lib/codegen/patches.test.d.ts +0 -2
  226. package/lib/codegen/patches.test.d.ts.map +0 -1
  227. package/lib/codegen/patches.test.js +0 -155
  228. package/lib/codegen/patches.test.js.map +0 -1
  229. package/lib/codegen/protocol-imports.test.d.ts +0 -2
  230. package/lib/codegen/protocol-imports.test.d.ts.map +0 -1
  231. package/lib/codegen/protocol-imports.test.js +0 -36
  232. package/lib/codegen/protocol-imports.test.js.map +0 -1
  233. package/lib/codegen/rewrite-operation-ids.test.d.ts +0 -2
  234. package/lib/codegen/rewrite-operation-ids.test.d.ts.map +0 -1
  235. package/lib/codegen/rewrite-operation-ids.test.js +0 -451
  236. package/lib/codegen/rewrite-operation-ids.test.js.map +0 -1
  237. package/lib/codegen/untagged-unions.test.d.ts +0 -2
  238. package/lib/codegen/untagged-unions.test.d.ts.map +0 -1
  239. package/lib/codegen/untagged-unions.test.js +0 -80
  240. package/lib/codegen/untagged-unions.test.js.map +0 -1
  241. package/lib/error-category.js.map +0 -1
  242. package/lib/errors.js.map +0 -1
  243. package/lib/fixtures/xml/upstream-validator.json +0 -397
  244. package/lib/graphql.js.map +0 -1
  245. package/lib/graphql.test.d.ts +0 -2
  246. package/lib/graphql.test.d.ts.map +0 -1
  247. package/lib/graphql.test.js +0 -151
  248. package/lib/graphql.test.js.map +0 -1
  249. package/lib/graphql.types.js.map +0 -1
  250. package/lib/index.js.map +0 -1
  251. package/lib/json-patch.test.d.ts +0 -2
  252. package/lib/json-patch.test.d.ts.map +0 -1
  253. package/lib/json-patch.test.js +0 -65
  254. package/lib/json-patch.test.js.map +0 -1
  255. package/lib/pagination.js.map +0 -1
  256. package/lib/pagination.test.d.ts +0 -2
  257. package/lib/pagination.test.d.ts.map +0 -1
  258. package/lib/pagination.test.js +0 -131
  259. package/lib/pagination.test.js.map +0 -1
  260. package/lib/protocol-http.js.map +0 -1
  261. package/lib/protocol-http.test.d.ts +0 -2
  262. package/lib/protocol-http.test.d.ts.map +0 -1
  263. package/lib/protocol-http.test.js +0 -228
  264. package/lib/protocol-http.test.js.map +0 -1
  265. package/lib/protocol-rest.js.map +0 -1
  266. package/lib/protocol-rest.test.d.ts +0 -2
  267. package/lib/protocol-rest.test.d.ts.map +0 -1
  268. package/lib/protocol-rest.test.js +0 -498
  269. package/lib/protocol-rest.test.js.map +0 -1
  270. package/lib/query.js.map +0 -1
  271. package/lib/response-validation.js.map +0 -1
  272. package/lib/response-validation.test.d.ts +0 -2
  273. package/lib/response-validation.test.d.ts.map +0 -1
  274. package/lib/response-validation.test.js +0 -72
  275. package/lib/response-validation.test.js.map +0 -1
  276. package/lib/retry-after.js.map +0 -1
  277. package/lib/retry-after.test.d.ts +0 -2
  278. package/lib/retry-after.test.d.ts.map +0 -1
  279. package/lib/retry-after.test.js +0 -204
  280. package/lib/retry-after.test.js.map +0 -1
  281. package/lib/retry.js.map +0 -1
  282. package/lib/retry.test.d.ts +0 -2
  283. package/lib/retry.test.d.ts.map +0 -1
  284. package/lib/retry.test.js +0 -407
  285. package/lib/retry.test.js.map +0 -1
  286. package/lib/schema.js.map +0 -1
  287. package/lib/sdks.test.d.ts +0 -2
  288. package/lib/sdks.test.d.ts.map +0 -1
  289. package/lib/sdks.test.js +0 -76
  290. package/lib/sdks.test.js.map +0 -1
  291. package/lib/trait.js.map +0 -1
  292. package/lib/xml.js.map +0 -1
  293. package/lib/xml.test.d.ts +0 -2
  294. package/lib/xml.test.d.ts.map +0 -1
  295. package/lib/xml.test.js +0 -210
  296. package/lib/xml.test.js.map +0 -1
  297. package/src/codegen/boolean-string-enums.test.ts +0 -299
  298. package/src/codegen/defer-naming.test.ts +0 -113
  299. package/src/codegen/generated-at.test.ts +0 -89
  300. package/src/codegen/generator.test.ts +0 -137
  301. package/src/codegen/graphql-client.test.ts +0 -189
  302. package/src/codegen/openapi-binary.test.ts +0 -91
  303. package/src/codegen/patch-audit.test.ts +0 -160
  304. package/src/codegen/patches.test.ts +0 -188
  305. package/src/codegen/protocol-imports.test.ts +0 -39
  306. package/src/codegen/rewrite-operation-ids.test.ts +0 -472
  307. package/src/codegen/untagged-unions.test.ts +0 -85
  308. package/src/fixtures/xml/upstream-validator.json +0 -397
  309. package/src/graphql.test.ts +0 -198
  310. package/src/json-patch.test.ts +0 -77
  311. package/src/pagination.test.ts +0 -169
  312. package/src/protocol-http.test.ts +0 -276
  313. package/src/protocol-rest.test.ts +0 -703
  314. package/src/response-validation.test.ts +0 -89
  315. package/src/retry-after.test.ts +0 -267
  316. package/src/retry.test.ts +0 -566
  317. package/src/sdks.test.ts +0 -87
  318. 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"}
@@ -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` — nothing is provider-specific. An SDK protocol (e.g.
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 { type ErrorMatcher, type KeyDictionaryEntries } from "./trait.ts";
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
- /** Binary/opaque values that must never be treated as key-value objects. */
22
- export declare const isOpaqueValue: (v: unknown) => boolean;
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
- * Throws when the input schema is missing the `Http()` trait — a codegen
59
- * bug, surfaced as a defect by the calling protocol's Effect context.
60
- */
61
- /**
62
- * Encode a greedy `{name+}` label: the value may span several path
63
- * segments (e.g. an Azure scope `/subscriptions/{id}/resourceGroups/{rg}`),
64
- * so each segment is encoded on its own and the `/` separators are kept.
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":"AACA,OAAO,KAAK,iBAAiB,MAAM,+BAA+B,CAAC;AACnE;;;;;;;;;GASG;AACH,OAAO,KAAK,KAAK,GAAG,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAcL,KAAK,YAAY,EAGjB,KAAK,oBAAoB,EAE1B,MAAM,YAAY,CAAC;AAIpB,eAAO,MAAM,QAAQ,QAAS,GAAG,CAAC,GAAG,KAAG,SAAS,GAAG,CAAC,iBAAiB,EAKrE,CAAC;AAEF,eAAO,MAAM,MAAM,Q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