@distilled.cloud/core 1.0.0-rc.2 → 1.0.0-rc.20

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 (291) hide show
  1. package/LICENSE +201 -0
  2. package/lib/_bundle/aws.js +2 -0
  3. package/lib/_bundle/aws.js.map +1 -0
  4. package/lib/_bundle/base.js +5 -0
  5. package/lib/_bundle/base.js.map +1 -0
  6. package/lib/_bundle/graphql.js +3 -0
  7. package/lib/_bundle/graphql.js.map +1 -0
  8. package/lib/_bundle/grpc.js +2 -0
  9. package/lib/_bundle/grpc.js.map +1 -0
  10. package/lib/_bundle/rest.js +2 -0
  11. package/lib/_bundle/rest.js.map +1 -0
  12. package/lib/_bundle/xml.js +4 -0
  13. package/lib/_bundle/xml.js.map +1 -0
  14. package/lib/annotations.d.ts +17 -0
  15. package/lib/annotations.d.ts.map +1 -0
  16. package/lib/annotations.js +2 -0
  17. package/lib/annotations.js.map +1 -0
  18. package/lib/api.d.ts +174 -18
  19. package/lib/api.d.ts.map +1 -1
  20. package/lib/api.js +1 -178
  21. package/lib/category.d.ts +4 -4
  22. package/lib/category.d.ts.map +1 -1
  23. package/lib/category.js +1 -280
  24. package/lib/chunks.d.ts +3 -0
  25. package/lib/chunks.d.ts.map +1 -0
  26. package/lib/chunks.js +1 -0
  27. package/lib/config.d.ts +68 -0
  28. package/lib/config.d.ts.map +1 -0
  29. package/lib/config.js +1 -0
  30. package/lib/crypto.d.ts +76 -0
  31. package/lib/crypto.d.ts.map +1 -0
  32. package/lib/crypto.js +1 -0
  33. package/lib/error-category.d.ts +1 -1
  34. package/lib/error-category.d.ts.map +1 -1
  35. package/lib/error-category.js +1 -46
  36. package/lib/errors.d.ts +64 -72
  37. package/lib/errors.d.ts.map +1 -1
  38. package/lib/errors.js +1 -186
  39. package/lib/graphql.d.ts +403 -0
  40. package/lib/graphql.d.ts.map +1 -0
  41. package/lib/graphql.js +1 -0
  42. package/lib/graphql.types.d.ts +12 -0
  43. package/lib/graphql.types.d.ts.map +1 -0
  44. package/lib/graphql.types.js +1 -0
  45. package/lib/grpc-transport-cloudflare-http2.d.ts +7 -0
  46. package/lib/grpc-transport-cloudflare-http2.d.ts.map +1 -0
  47. package/lib/grpc-transport-cloudflare-http2.js +6 -0
  48. package/lib/grpc-transport-cloudflare-http2.js.map +1 -0
  49. package/lib/grpc-transport-cloudflare-sockets.d.ts +7 -0
  50. package/lib/grpc-transport-cloudflare-sockets.d.ts.map +1 -0
  51. package/lib/grpc-transport-cloudflare-sockets.js +5 -0
  52. package/lib/grpc-transport-cloudflare-sockets.js.map +1 -0
  53. package/lib/grpc-transport-node-http2.d.ts +19 -0
  54. package/lib/grpc-transport-node-http2.d.ts.map +1 -0
  55. package/lib/grpc-transport-node-http2.js +2 -0
  56. package/lib/grpc-transport-node-http2.js.map +1 -0
  57. package/lib/grpc-transport.d.ts +76 -0
  58. package/lib/grpc-transport.d.ts.map +1 -0
  59. package/lib/grpc-transport.js +1 -0
  60. package/lib/hpack.d.ts +34 -0
  61. package/lib/hpack.d.ts.map +1 -0
  62. package/lib/hpack.js +2 -0
  63. package/lib/hpack.js.map +1 -0
  64. package/lib/index.d.ts +32 -0
  65. package/lib/index.d.ts.map +1 -0
  66. package/lib/index.js +17 -0
  67. package/lib/pagination.d.ts +101 -24
  68. package/lib/pagination.d.ts.map +1 -1
  69. package/lib/pagination.js +1 -182
  70. package/lib/plain-values.d.ts +10 -0
  71. package/lib/plain-values.d.ts.map +1 -0
  72. package/lib/plain-values.js +2 -0
  73. package/lib/plain-values.js.map +1 -0
  74. package/lib/protobuf.d.ts +92 -0
  75. package/lib/protobuf.d.ts.map +1 -0
  76. package/lib/protobuf.js +1 -0
  77. package/lib/protocol-grpc.d.ts +86 -0
  78. package/lib/protocol-grpc.d.ts.map +1 -0
  79. package/lib/protocol-grpc.js +1 -0
  80. package/lib/protocol-http.d.ts +102 -23
  81. package/lib/protocol-http.d.ts.map +1 -1
  82. package/lib/protocol-http.js +1 -554
  83. package/lib/protocol-rest.d.ts +120 -50
  84. package/lib/protocol-rest.d.ts.map +1 -1
  85. package/lib/protocol-rest.js +1 -242
  86. package/lib/query.d.ts +29 -0
  87. package/lib/query.d.ts.map +1 -0
  88. package/lib/query.js +1 -0
  89. package/lib/response-validation-strict.d.ts +48 -0
  90. package/lib/response-validation-strict.d.ts.map +1 -0
  91. package/lib/response-validation-strict.js +1 -0
  92. package/lib/response-validation.d.ts +86 -0
  93. package/lib/response-validation.d.ts.map +1 -0
  94. package/lib/response-validation.js +1 -0
  95. package/lib/retry-after.d.ts +3 -3
  96. package/lib/retry-after.d.ts.map +1 -1
  97. package/lib/retry-after.js +1 -112
  98. package/lib/retry.d.ts +48 -29
  99. package/lib/retry.d.ts.map +1 -1
  100. package/lib/retry.js +1 -210
  101. package/lib/schema-lite-impl.d.ts +158 -0
  102. package/lib/schema-lite-impl.d.ts.map +1 -0
  103. package/lib/schema-lite-impl.js +1 -0
  104. package/lib/schema-lite-typed.d.ts +41 -0
  105. package/lib/schema-lite-typed.d.ts.map +1 -0
  106. package/lib/schema-lite-typed.js +1 -0
  107. package/lib/schema-lite.d.ts +40 -0
  108. package/lib/schema-lite.d.ts.map +1 -0
  109. package/lib/schema-lite.js +1 -0
  110. package/lib/schema.d.ts +21 -7
  111. package/lib/schema.d.ts.map +1 -1
  112. package/lib/schema.js +1 -48
  113. package/lib/sdk-error.d.ts +27 -0
  114. package/lib/sdk-error.d.ts.map +1 -0
  115. package/lib/sdk-error.js +1 -0
  116. package/lib/sensitive.d.ts +28 -0
  117. package/lib/sensitive.d.ts.map +1 -0
  118. package/lib/sensitive.js +2 -0
  119. package/lib/sensitive.js.map +1 -0
  120. package/lib/telemetry-debug.d.ts +6 -0
  121. package/lib/telemetry-debug.d.ts.map +1 -0
  122. package/lib/telemetry-debug.js +2 -0
  123. package/lib/telemetry-debug.js.map +1 -0
  124. package/lib/telemetry-hooks.d.ts +32 -0
  125. package/lib/telemetry-hooks.d.ts.map +1 -0
  126. package/lib/telemetry-hooks.js +2 -0
  127. package/lib/telemetry-hooks.js.map +1 -0
  128. package/lib/telemetry-host-rules.d.ts +23 -0
  129. package/lib/telemetry-host-rules.d.ts.map +1 -0
  130. package/lib/telemetry-host-rules.js +2 -0
  131. package/lib/telemetry-host-rules.js.map +1 -0
  132. package/lib/telemetry-lambda-context.d.ts +17 -0
  133. package/lib/telemetry-lambda-context.d.ts.map +1 -0
  134. package/lib/telemetry-lambda-context.js +2 -0
  135. package/lib/telemetry-lambda-context.js.map +1 -0
  136. package/lib/telemetry-message-context.d.ts +52 -0
  137. package/lib/telemetry-message-context.d.ts.map +1 -0
  138. package/lib/telemetry-message-context.js +2 -0
  139. package/lib/telemetry-message-context.js.map +1 -0
  140. package/lib/telemetry-metrics.d.ts +6 -0
  141. package/lib/telemetry-metrics.d.ts.map +1 -0
  142. package/lib/telemetry-metrics.js +2 -0
  143. package/lib/telemetry-metrics.js.map +1 -0
  144. package/lib/telemetry-name-template.d.ts +13 -0
  145. package/lib/telemetry-name-template.d.ts.map +1 -0
  146. package/lib/telemetry-name-template.js +2 -0
  147. package/lib/telemetry-name-template.js.map +1 -0
  148. package/lib/telemetry-stream.d.ts +11 -0
  149. package/lib/telemetry-stream.d.ts.map +1 -0
  150. package/lib/telemetry-stream.js +2 -0
  151. package/lib/telemetry-stream.js.map +1 -0
  152. package/lib/telemetry-xray.d.ts +28 -0
  153. package/lib/telemetry-xray.d.ts.map +1 -0
  154. package/lib/telemetry-xray.js +2 -0
  155. package/lib/telemetry-xray.js.map +1 -0
  156. package/lib/telemetry.d.ts +288 -0
  157. package/lib/telemetry.d.ts.map +1 -0
  158. package/lib/telemetry.js +3 -0
  159. package/lib/telemetry.js.map +1 -0
  160. package/lib/trait.d.ts +71 -20
  161. package/lib/trait.d.ts.map +1 -1
  162. package/lib/trait.js +1 -107
  163. package/lib/unknown-error.d.ts +18 -0
  164. package/lib/unknown-error.d.ts.map +1 -0
  165. package/lib/unknown-error.js +1 -0
  166. package/lib/xml.d.ts +44 -0
  167. package/lib/xml.d.ts.map +1 -0
  168. package/lib/xml.js +1 -0
  169. package/package.json +13 -13
  170. package/src/annotations.ts +53 -0
  171. package/src/api.ts +1370 -200
  172. package/src/category.ts +76 -106
  173. package/src/chunks.ts +30 -0
  174. package/src/config.ts +245 -0
  175. package/src/crypto.ts +202 -0
  176. package/src/error-category.ts +16 -29
  177. package/src/errors.ts +75 -75
  178. package/src/graphql.ts +1778 -0
  179. package/src/graphql.types.ts +105 -0
  180. package/src/grpc-transport-cloudflare-http2.ts +494 -0
  181. package/src/grpc-transport-cloudflare-sockets.ts +299 -0
  182. package/src/grpc-transport-node-http2.ts +234 -0
  183. package/src/grpc-transport.ts +118 -0
  184. package/src/hpack.ts +331 -0
  185. package/src/index.ts +31 -0
  186. package/src/pagination.ts +368 -94
  187. package/src/plain-values.ts +41 -0
  188. package/src/protobuf.ts +1332 -0
  189. package/src/protocol-grpc.ts +641 -0
  190. package/src/protocol-http.ts +622 -322
  191. package/src/protocol-rest.ts +440 -227
  192. package/src/query.ts +39 -0
  193. package/src/response-validation-strict.ts +327 -0
  194. package/src/response-validation.ts +161 -0
  195. package/src/retry-after.ts +7 -13
  196. package/src/retry.ts +96 -110
  197. package/src/schema-lite-impl.ts +550 -0
  198. package/src/schema-lite-typed.ts +44 -0
  199. package/src/schema-lite.ts +44 -0
  200. package/src/schema.ts +259 -15
  201. package/src/sdk-error.ts +33 -0
  202. package/src/sensitive.ts +154 -0
  203. package/src/telemetry-debug.ts +179 -0
  204. package/src/telemetry-hooks.ts +33 -0
  205. package/src/telemetry-host-rules.ts +39 -0
  206. package/src/telemetry-lambda-context.ts +46 -0
  207. package/src/telemetry-message-context.ts +170 -0
  208. package/src/telemetry-metrics.ts +69 -0
  209. package/src/telemetry-name-template.ts +26 -0
  210. package/src/telemetry-stream.ts +100 -0
  211. package/src/telemetry-xray.ts +66 -0
  212. package/src/telemetry.ts +832 -0
  213. package/src/trait.ts +106 -67
  214. package/src/unknown-error.ts +38 -0
  215. package/src/xml.ts +346 -0
  216. package/lib/api.js.map +0 -1
  217. package/lib/category.js.map +0 -1
  218. package/lib/codegen/cli.d.ts +0 -29
  219. package/lib/codegen/cli.d.ts.map +0 -1
  220. package/lib/codegen/cli.js +0 -165
  221. package/lib/codegen/cli.js.map +0 -1
  222. package/lib/codegen/emit.d.ts +0 -129
  223. package/lib/codegen/emit.d.ts.map +0 -1
  224. package/lib/codegen/emit.js +0 -105
  225. package/lib/codegen/emit.js.map +0 -1
  226. package/lib/codegen/format.d.ts +0 -23
  227. package/lib/codegen/format.d.ts.map +0 -1
  228. package/lib/codegen/format.js +0 -28
  229. package/lib/codegen/format.js.map +0 -1
  230. package/lib/codegen/generator.d.ts +0 -334
  231. package/lib/codegen/generator.d.ts.map +0 -1
  232. package/lib/codegen/generator.js +0 -691
  233. package/lib/codegen/generator.js.map +0 -1
  234. package/lib/codegen/graph.d.ts +0 -36
  235. package/lib/codegen/graph.d.ts.map +0 -1
  236. package/lib/codegen/graph.js +0 -136
  237. package/lib/codegen/graph.js.map +0 -1
  238. package/lib/codegen/members.d.ts +0 -25
  239. package/lib/codegen/members.d.ts.map +0 -1
  240. package/lib/codegen/members.js +0 -55
  241. package/lib/codegen/members.js.map +0 -1
  242. package/lib/codegen/naming.d.ts +0 -29
  243. package/lib/codegen/naming.d.ts.map +0 -1
  244. package/lib/codegen/naming.js +0 -74
  245. package/lib/codegen/naming.js.map +0 -1
  246. package/lib/codegen/openapi-cli.d.ts +0 -38
  247. package/lib/codegen/openapi-cli.d.ts.map +0 -1
  248. package/lib/codegen/openapi-cli.js +0 -107
  249. package/lib/codegen/openapi-cli.js.map +0 -1
  250. package/lib/codegen/openapi.d.ts +0 -115
  251. package/lib/codegen/openapi.d.ts.map +0 -1
  252. package/lib/codegen/openapi.js +0 -1220
  253. package/lib/codegen/openapi.js.map +0 -1
  254. package/lib/codegen/operations.d.ts +0 -24
  255. package/lib/codegen/operations.d.ts.map +0 -1
  256. package/lib/codegen/operations.js +0 -56
  257. package/lib/codegen/operations.js.map +0 -1
  258. package/lib/codegen/pagination.d.ts +0 -39
  259. package/lib/codegen/pagination.d.ts.map +0 -1
  260. package/lib/codegen/pagination.js +0 -33
  261. package/lib/codegen/pagination.js.map +0 -1
  262. package/lib/codegen/prelude.d.ts +0 -15
  263. package/lib/codegen/prelude.d.ts.map +0 -1
  264. package/lib/codegen/prelude.js +0 -60
  265. package/lib/codegen/prelude.js.map +0 -1
  266. package/lib/error-category.js.map +0 -1
  267. package/lib/errors.js.map +0 -1
  268. package/lib/json-patch.d.ts +0 -44
  269. package/lib/json-patch.d.ts.map +0 -1
  270. package/lib/json-patch.js +0 -174
  271. package/lib/json-patch.js.map +0 -1
  272. package/lib/pagination.js.map +0 -1
  273. package/lib/protocol-http.js.map +0 -1
  274. package/lib/protocol-rest.js.map +0 -1
  275. package/lib/retry-after.js.map +0 -1
  276. package/lib/retry.js.map +0 -1
  277. package/lib/schema.js.map +0 -1
  278. package/lib/trait.js.map +0 -1
  279. package/src/codegen/cli.ts +0 -268
  280. package/src/codegen/emit.ts +0 -207
  281. package/src/codegen/format.ts +0 -47
  282. package/src/codegen/generator.ts +0 -1153
  283. package/src/codegen/graph.ts +0 -151
  284. package/src/codegen/members.ts +0 -71
  285. package/src/codegen/naming.ts +0 -86
  286. package/src/codegen/openapi-cli.ts +0 -166
  287. package/src/codegen/openapi.ts +0 -1450
  288. package/src/codegen/operations.ts +0 -76
  289. package/src/codegen/pagination.ts +0 -71
  290. package/src/codegen/prelude.ts +0 -70
  291. package/src/json-patch.ts +0 -222
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Protobuf binary wire codec over generated descriptors.
3
+ *
4
+ * Proto-sourced SDKs keep their schemas in proto3 JSON shape (camelCase wire
5
+ * names, 64-bit integers as strings, bytes as base64, enums by name,
6
+ * `google.protobuf.Timestamp` as RFC 3339). Servers that only speak binary
7
+ * gRPC need the same values as protobuf bytes, so this module transcodes
8
+ * between the two using a descriptor table the converter emits next to the
9
+ * services (`src/descriptors.ts`): field numbers, scalar kinds, message and
10
+ * enum references.
11
+ *
12
+ * Decoding follows proto3: a field without presence (a plain scalar, enum,
13
+ * `repeated` or `map` field) reads as its default when the wire omits it
14
+ * (`""`, `0`, `"0"` for 64-bit integers, `false`, the enum's zero value,
15
+ * `[]`, `{}`), so the JSON always carries it. Fields with presence (marked
16
+ * `optional`, message fields and `oneof` members) are omitted when absent.
17
+ * Enum numbers map back to names, and unknown fields are skipped.
18
+ */
19
+ /** A scalar or composite field kind. */
20
+ export type FieldKind = "double" | "float" | "int32" | "int64" | "uint32" | "uint64" | "sint32" | "sint64" | "fixed32" | "fixed64" | "sfixed32" | "sfixed64" | "bool" | "string" | "bytes" | "enum" | "message" | "map";
21
+ /** `[keyKind, valueKind, valueRef?]` for a `map<K, V>` field. */
22
+ export type MapRef = readonly [key: FieldKind, value: FieldKind, ref?: string];
23
+ /**
24
+ * One field: `[number, jsonName, kind, ref?, repeated?, presence?]`. `ref`
25
+ * names the message or enum for `message`/`enum` kinds and is a
26
+ * {@link MapRef} for `map`; `repeated` is `1` for repeated fields. `presence`
27
+ * is set for a field whose absence is observable: `1` for a proto3
28
+ * `optional` field, and `n >= 2` for the members of the message's oneof `n`
29
+ * (setting one member clears the others). Message fields always have
30
+ * presence.
31
+ */
32
+ export type FieldDescriptor = readonly [
33
+ number: number,
34
+ jsonName: string,
35
+ kind: FieldKind,
36
+ ref?: string | MapRef | 0,
37
+ repeated?: 0 | 1,
38
+ presence?: number
39
+ ];
40
+ export interface ProtoDescriptors {
41
+ /** Message full name -> fields. */
42
+ readonly messages: Readonly<Record<string, ReadonlyArray<FieldDescriptor>>>;
43
+ /** Enum full name -> value name -> number. */
44
+ readonly enums: Readonly<Record<string, Readonly<Record<string, number>>>>;
45
+ /**
46
+ * gRPC method path (`/<package>.<Service>/<Method>`) ->
47
+ * `[requestMessage, responseMessage, serverStream?]`. A server-streaming
48
+ * method's JSON output is `{ items: [response, ...] }`.
49
+ */
50
+ readonly methods: Readonly<Record<string, readonly [request: string, response: string, serverStream?: 0 | 1]>>;
51
+ }
52
+ /** A value the descriptors can't encode (a wrong type for its field). */
53
+ export declare class ProtobufEncodeError extends Error {
54
+ readonly _tag = "ProtobufEncodeError";
55
+ }
56
+ /** Bytes that aren't valid protobuf for the expected message. */
57
+ export declare class ProtobufDecodeError extends Error {
58
+ readonly _tag: string;
59
+ }
60
+ /**
61
+ * Valid protobuf whose value proto3 JSON can't represent: a Timestamp
62
+ * outside years 0001 to 9999, or a Duration beyond 10,000 years.
63
+ */
64
+ export declare class ProtobufJsonRangeError extends ProtobufDecodeError {
65
+ readonly _tag = "ProtobufJsonRangeError";
66
+ }
67
+ /** Encode a proto3 JSON value of message `name` to protobuf bytes. */
68
+ export declare const encodeMessage: (d: ProtoDescriptors, name: string, value: unknown) => Uint8Array;
69
+ /**
70
+ * Decode protobuf bytes of message `name` to a proto3 JSON value. As in any
71
+ * proto3 parser, the last value of a singular field wins, a message field
72
+ * seen more than once is merged, setting a oneof member clears the others,
73
+ * a field whose wire type doesn't match its kind is skipped as unknown, and
74
+ * unknown fields are dropped.
75
+ */
76
+ export declare const decodeMessage: (d: ProtoDescriptors, name: string, bytes: Uint8Array) => unknown;
77
+ /** One gRPC message frame: `[flag=0][u32 length BE][payload]`. */
78
+ export declare const frame: (payload: Uint8Array) => Uint8Array;
79
+ /**
80
+ * Reads gRPC message frames from a body that arrives in chunks: `push` each
81
+ * chunk and get back the messages it completed. `rest` is the number of
82
+ * bytes held for an incomplete frame (`0` once a body ends cleanly).
83
+ * Compressed frames are rejected; gRPC-Web trailer frames are skipped.
84
+ */
85
+ export declare class FrameReader {
86
+ private buf;
87
+ get rest(): number;
88
+ push(chunk: Uint8Array): Uint8Array[];
89
+ }
90
+ /** Split a whole gRPC body into message payloads. */
91
+ export declare const unframe: (body: Uint8Array) => Uint8Array[];
92
+ //# sourceMappingURL=protobuf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protobuf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C,CAAC,CAAC,CACnF,CAAC;CACH;AAED,yEAAyE;AACzE,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,yBAAyB;CACvC;AAED,iEAAiE;AACjE,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAyB;CAC/C;AAED;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D,SAAkB,IAAI,4BAA4B;CACnD;AAytBD,sEAAsE;AACtE,eAAO,MAAM,aAAa,MAAO,gBAAgB,QAAQ,MAAM,SAAS,OAAO,KAAG,UAOjF,CAAC;AAoUF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,MAAO,gBAAgB,QAAQ,MAAM,SAAS,UAAU,KAAG,OA0EpF,CAAC;AA4CF,kEAAkE;AAClE,eAAO,MAAM,KAAK,YAAa,UAAU,KAAG,UAK3C,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,GAAG,CAAkD;IAE7D,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,EAAE,CAuBpC;CACF;AAED,qDAAqD;AACrD,eAAO,MAAM,OAAO,SAAU,UAAU,KAAG,UAAU,EAKpD,CAAC"}
@@ -0,0 +1 @@
1
+ export { protobuf$FrameReader as FrameReader, protobuf$ProtobufDecodeError as ProtobufDecodeError, protobuf$ProtobufEncodeError as ProtobufEncodeError, protobuf$ProtobufJsonRangeError as ProtobufJsonRangeError, protobuf$decodeMessage as decodeMessage, protobuf$encodeMessage as encodeMessage, protobuf$frame as frame, protobuf$unframe as unframe } from "./_bundle/grpc.js";
@@ -0,0 +1,86 @@
1
+ /**
2
+ * gRPC (binary protobuf) protocol for proto-sourced SDKs.
3
+ *
4
+ * Proto SDKs are generated as REST-shaped operations: each RPC is
5
+ * `POST /<package>.<Service>/<Method>` with a proto3 JSON body. Servers that
6
+ * accept JSON (Connect, grpc-gateway) use {@link makeRestProtocol} directly.
7
+ * Servers that only speak gRPC use this protocol, which builds the request
8
+ * with the REST protocol and speaks gRPC on the wire:
9
+ *
10
+ * - **Request**: the proto3 JSON body is transcoded to one protobuf message
11
+ * ({@link encodeMessage}) in one gRPC frame, sent as `application/grpc`.
12
+ * - **Transport**: the call goes through the `HttpClient` the
13
+ * `GrpcTransport` reference holds, or the caller's `HttpClient` when it
14
+ * holds none (see `@distilled.cloud/core/grpc-transport`). Plain `fetch`
15
+ * works where a proxy bridges HTTP/1.1 to gRPC (envoy).
16
+ * - **Status**: the call's `grpc-status` is read from the trailers, or from
17
+ * the headers of a trailers-only reply. A transport that can't see
18
+ * trailers (`fetch`) leaves only the headers; a reply with message frames
19
+ * and no status there is treated as OK.
20
+ * - **Errors**: a non-zero status becomes the operation's typed error. The
21
+ * REST decoder receives `{ code, status, message }` (`{ code: 5, status:
22
+ * "NOT_FOUND", ... }`) with the HTTP status grpc-gateway maps the code to
23
+ * (`NOT_FOUND` -> 404, `UNAVAILABLE` -> 503, ...), so error matchers key on
24
+ * the numeric gRPC `code`, and categories and retries follow the HTTP
25
+ * status.
26
+ * - **Response**: protobuf messages are transcoded back to proto3 JSON and
27
+ * decoded by the operation's output schema, so schemas, sensitive values
28
+ * and response validation behave exactly as for REST.
29
+ *
30
+ * A server-streaming method's output is `{ items: [message, ...] }`. Calling
31
+ * the operation collects the whole stream; its `.stream(input)` (see
32
+ * `API.makeStreaming`) emits each message as it arrives, and stopping the
33
+ * stream cancels the call.
34
+ *
35
+ * {@link Deadline} bounds calls in its scope: it is sent as `grpc-timeout`
36
+ * and enforced here, and a call that runs past it fails with
37
+ * `DEADLINE_EXCEEDED` (code 4).
38
+ */
39
+ import * as Context from "effect/Context";
40
+ import * as Duration from "effect/Duration";
41
+ import * as Layer from "effect/Layer";
42
+ import * as API from "./api.ts";
43
+ import { type ProtoDescriptors } from "./protobuf.ts";
44
+ import { type RestProtocolOptions } from "./protocol-rest.ts";
45
+ /** gRPC status code -> name. */
46
+ export declare const GRPC_STATUS_NAMES: Readonly<Record<number, string>>;
47
+ /** gRPC status code -> HTTP status (grpc-gateway's mapping). */
48
+ export declare const GRPC_HTTP_STATUS: Readonly<Record<number, number>>;
49
+ /**
50
+ * The deadline of gRPC calls in its scope, from when each call starts.
51
+ * `undefined` (the default) sets none.
52
+ *
53
+ * ```ts
54
+ * router.taskExecWait(input).pipe(Effect.provideService(Deadline, "30 seconds"));
55
+ * ```
56
+ */
57
+ export declare const Deadline: Context.Reference<Duration.Input | undefined>;
58
+ export interface GrpcProtocolOptions<C> extends RestProtocolOptions<C> {
59
+ /** The SDK's generated descriptors (`src/descriptors.ts`). */
60
+ readonly descriptors: ProtoDescriptors;
61
+ /**
62
+ * The error for a non-zero status no typed error matched, from its gRPC
63
+ * code. By default the REST decoder classifies it by the HTTP status the
64
+ * code maps to (`UNAVAILABLE` -> `ServiceUnavailable`, which retries), which
65
+ * keeps retries working but merges codes that share a status
66
+ * (`INVALID_ARGUMENT`, `FAILED_PRECONDITION` and `OUT_OF_RANGE` are all
67
+ * `BadRequest`).
68
+ */
69
+ readonly statusError?: (info: StatusInfo) => unknown;
70
+ }
71
+ /** A non-OK gRPC status, as `statusError` receives it. */
72
+ export interface StatusInfo {
73
+ readonly code: number;
74
+ readonly message: string;
75
+ /** `google.rpc.Status.details` from `grpc-status-details-bin`, as proto3 JSON `Any`s. */
76
+ readonly details: ReadonlyArray<unknown>;
77
+ readonly headers: Readonly<Record<string, string>>;
78
+ }
79
+ /** gRPC's mapping of an HTTP status, for a reply that carries no gRPC status. */
80
+ export declare const HTTP_GRPC_STATUS: Readonly<Record<number, number>>;
81
+ /**
82
+ * A gRPC protocol over the given REST protocol options. See the module
83
+ * documentation for the wire behavior.
84
+ */
85
+ export declare const makeGrpcProtocol: <C>(options: GrpcProtocolOptions<C>) => Layer.Layer<API.Protocol>;
86
+ //# sourceMappingURL=protocol-grpc.d.ts.map
@@ -0,0 +1 @@
1
+ {"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AC,CAAC;CACpD;AAED,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAS7D,CAAC;AAiHF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,WAAW,mBAAmB,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAsX5C,CAAC"}
@@ -0,0 +1 @@
1
+ export { protocol_grpc$Deadline as Deadline, protocol_grpc$GRPC_HTTP_STATUS as GRPC_HTTP_STATUS, protocol_grpc$GRPC_STATUS_NAMES as GRPC_STATUS_NAMES, protocol_grpc$HTTP_GRPC_STATUS as HTTP_GRPC_STATUS, protocol_grpc$makeGrpcProtocol as makeGrpcProtocol } from "./_bundle/grpc.js";
@@ -1,25 +1,42 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as HttpClientRequest from "effect/http/HttpClientRequest";
1
3
  /**
2
4
  * Generic REST protocol machinery, shared by SDK protocol layers.
3
5
  *
4
6
  * Everything here is driven purely by the trait annotations in
5
- * `core/trait.ts` — nothing is provider-specific. An SDK protocol (e.g.
7
+ * `core/trait.ts` -- nothing is provider-specific. An SDK protocol (e.g.
6
8
  * cloudflare's) supplies credentials/base-URL, calls {@link buildRequest} to
7
9
  * encode, and layers its own response-envelope handling on top of the
8
10
  * decode-side helpers ({@link getProps}/{@link mapKeys}/
9
11
  * {@link matchTypedError}).
10
12
  */
11
13
  import type * as AST from "effect/SchemaAST";
12
- import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest";
13
- import { type ErrorMatcher, type KeyDictionaryEntries } from "./trait.ts";
14
- export declare const getProps: (ast: AST.AST) => readonly AST.PropertySignature[];
15
- export declare const getAnn: (ast: AST.AST, symbol: symbol) => unknown;
14
+ import { isOpaqueValue } from "./plain-values.ts";
15
+ import * as Schema from "./schema-lite-typed.ts";
16
+ import { SdkError } from "./sdk-error.ts";
17
+ import { type ErrorMatcher, type HttpTrait, type KeyDictionaryEntries } from "./trait.ts";
18
+ export { getAnn, getProps, resolveNode } from "./annotations.ts";
16
19
  export declare const getPropAnn: (prop: AST.PropertySignature, symbol: symbol) => unknown;
17
20
  export declare const hasPropAnn: (prop: AST.PropertySignature, symbol: symbol) => boolean;
18
21
  export declare const nameOf: (prop: AST.PropertySignature, symbol: symbol) => string;
19
- /** Resolve wrappers to the real node: Suspend, encoding, optional/null unions. */
20
- 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
@@ -27,14 +44,13 @@ export declare const isOpaqueValue: (v: unknown) => boolean;
27
44
  */
28
45
  export declare const mapKeysByDictionary: (dict: KeyDictionaryEntries, value: unknown, direction: "encode" | "decode") => unknown;
29
46
  /**
30
- * Recursively rename keys between TS names and wire names, per the schema.
31
- *
32
- * `fallback` is the nearest ancestor `T.KeyDictionary` — schema-known members
33
- * always map via their own annotations, but opaque values (Document members,
34
- * keys the schema doesn't know) deep-rename via the dictionary so nested
35
- * TS-cased content still reaches the wire in wire case. Content with no
36
- * dictionary in scope passes through verbatim.
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.
37
52
  */
53
+ export declare const mapsVerbatim: (root: AST.AST, direction: "encode" | "decode") => boolean;
38
54
  export declare const mapKeys: (ast: AST.AST, value: unknown, direction: "encode" | "decode", fallback?: KeyDictionaryEntries) => unknown;
39
55
  export interface BuildRequestOptions {
40
56
  readonly input: unknown;
@@ -49,26 +65,89 @@ export interface BuildRequestOptions {
49
65
  */
50
66
  readonly mapMemberHeader?: (name: string, value: string) => string;
51
67
  /**
52
- * 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 --
53
69
  * unknown keys pass through as body fields rather than being dropped).
54
70
  * Defaults to the key verbatim.
55
71
  */
56
72
  readonly unknownKeyToWire?: (key: string) => string;
73
+ /**
74
+ * Send `{}` on a method that takes a body even when the input declares no
75
+ * body members. Connect unary RPCs (E2B's envd) POST JSON for every call,
76
+ * and refuse a bodyless one with 415.
77
+ */
78
+ readonly emptyJsonBody?: boolean;
79
+ }
80
+ /**
81
+ * Encode a greedy `{name+}` label: the value may span several path
82
+ * segments (e.g. an Azure scope `/subscriptions/{id}/resourceGroups/{rg}`),
83
+ * so each segment is encoded on its own and the `/` separators are kept.
84
+ * Leading slashes are dropped because the URI template already supplies one.
85
+ */
86
+ export declare const encodeGreedyLabel: (value: string) => string;
87
+ /**
88
+ * `HttpClientRequest.make(method)(url)` with `headers` set, in one object:
89
+ * the same request as `make(...).pipe(setHeaders(headers))` without the
90
+ * intermediate copies. `url` may carry a query string.
91
+ */
92
+ export declare const makeRequest: (method: HttpTrait["method"], url: string, headers: Record<string, string>) => HttpClientRequest.HttpClientRequest;
93
+ declare const InvalidInput_base: Schema.TaggedErrorClass<"InvalidInput", {
94
+ readonly member: import("effect/Schema").String;
95
+ readonly message: import("effect/Schema").String;
96
+ }> & (new (...args: any[]) => {
97
+ "@distilled.cloud/error/categories": {
98
+ BadRequestError: true;
99
+ };
100
+ });
101
+ /**
102
+ * The input cannot be sent: a path label whose value would address another
103
+ * resource (`.` or `..`, which the URL parser resolves to the parent path).
104
+ * Raised before anything is sent.
105
+ */
106
+ export declare class InvalidInput extends /*@__PURE__*/ InvalidInput_base {
57
107
  }
58
- export declare const buildRequest: ({ input, inputAst, baseUrl, headers: baseHeaders, mapMemberHeader, unknownKeyToWire, }: BuildRequestOptions) => HttpClientRequest.HttpClientRequest;
59
108
  /**
60
- * Whether one matcher matches one wire error: every present field must
61
- * match; a matcher (or a message object) with no constraints matches
62
- * nothing.
109
+ * The refusal for a path label value that would address another resource,
110
+ * or `undefined`. The URL parser resolves a `.` or `..` segment,
111
+ * percent-encoded or not, so no encoding can carry one
112
+ * (`/projects/p1/branches/..` -> `/projects/p1/`). A greedy label keeps its
113
+ * `/`, so each of its segments counts.
63
114
  */
64
- export declare const matchesExpression: (m: ErrorMatcher, code: number | undefined, status: number, message: string) => boolean;
115
+ export declare const invalidLabel: (member: string, value: unknown, greedy?: boolean) => InvalidInput | undefined;
116
+ /**
117
+ * Build an HTTP request from an operation input and its schema, driven by
118
+ * the trait annotations: `Http()` supplies method + URI template, `Label()`
119
+ * members fill URI placeholders, `Header()`/`Query()` members bind to
120
+ * headers/query params, `DeepQuery()` struct members expand into dotted
121
+ * query params, `HttpBody()` sends the member as the whole body,
122
+ * `FormDataFile()` members become multipart file parts, and everything else
123
+ * is a JSON body field (wire-named via `Body()` / `KeyDictionary`).
124
+ *
125
+ * The schema is read once per input schema (see `planFor`); later calls only
126
+ * walk the input value.
127
+ *
128
+ * Fails with {@link InvalidInput}, before anything is sent, when a label is
129
+ * `.` or `..` (for a greedy `{name+}` label, when any of its segments is).
130
+ * Fails with {@link SdkError} when the input schema is missing the `Http()`
131
+ * trait (a codegen bug the generator refuses).
132
+ */
133
+ export declare const buildRequest: (options: BuildRequestOptions) => Effect.Effect<HttpClientRequest.HttpClientRequest, InvalidInput | SdkError>;
134
+ /** Parsed response metadata supplied by a protocol after it detects a failure. */
135
+ export interface ErrorResponse {
136
+ readonly body?: unknown;
137
+ readonly headers?: Readonly<Record<string, string | undefined>>;
138
+ }
139
+ /** Every supplied constraint must match; an unconstrained matcher matches nothing. */
140
+ export declare const matchesExpression: (m: ErrorMatcher, code: number | undefined, status: number, message: string, response?: ErrorResponse) => boolean;
65
141
  /**
66
142
  * Pick the operation's typed error class for a failed response: among all
67
143
  * declared classes whose matchers (see `applyErrorMatchers`) match the wire
68
144
  * failure, the most specific matcher wins (ties break by declaration order).
145
+ * Empty error lists use an HTTP-status message so body/header-only failures can
146
+ * still match. The constructor receives the raw body and headers as well as
147
+ * code/message; error schemas can declare these fields to expose them to callers.
69
148
  */
70
149
  export declare const matchTypedError: (errorClasses: ReadonlyArray<unknown>, status: number, errors: ReadonlyArray<{
71
150
  code?: number;
72
151
  message: string;
73
- }>) => unknown | undefined;
152
+ }>, response?: ErrorResponse) => unknown | undefined;
74
153
  //# sourceMappingURL=protocol-http.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocol-http.d.ts","sourceRoot":"","sources":["../src/protocol-http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,KAAK,GAAG,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,iBAAiB,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAYL,KAAK,YAAY,EAEjB,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AAIpB,eAAO,MAAM,QAAQ,QAAS,GAAG,CAAC,GAAG,KAAG,SAAS,GAAG,CAAC,iBAAiB,EAMrE,CAAC;AAEF,eAAO,MAAM,MAAM,QAAS,GAAG,CAAC,GAAG,UAAU,MAA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