@distilled.cloud/core 1.0.0-rc.17 → 1.0.0-rc.19

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 (314) hide show
  1. package/lib/_bundle/base.js +2 -2
  2. package/lib/_bundle/base.js.map +1 -1
  3. package/lib/_bundle/graphql.js +2 -2
  4. package/lib/_bundle/graphql.js.map +1 -1
  5. package/lib/_bundle/grpc.js +2 -0
  6. package/lib/_bundle/grpc.js.map +1 -0
  7. package/lib/_bundle/rest.js +1 -1
  8. package/lib/_bundle/rest.js.map +1 -1
  9. package/lib/_bundle/xml.js +1 -1
  10. package/lib/_bundle/xml.js.map +1 -1
  11. package/lib/annotations.d.ts +17 -0
  12. package/lib/annotations.d.ts.map +1 -0
  13. package/lib/annotations.js +2 -0
  14. package/lib/annotations.js.map +1 -0
  15. package/lib/api.d.ts +52 -1
  16. package/lib/api.d.ts.map +1 -1
  17. package/lib/api.js +1 -1
  18. package/lib/category.d.ts.map +1 -1
  19. package/lib/config.d.ts +54 -13
  20. package/lib/config.d.ts.map +1 -1
  21. package/lib/config.js +1 -1
  22. package/lib/error-category.d.ts.map +1 -1
  23. package/lib/errors.d.ts +3 -13
  24. package/lib/errors.d.ts.map +1 -1
  25. package/lib/errors.js +1 -1
  26. package/lib/graphql.d.ts +26 -5
  27. package/lib/graphql.d.ts.map +1 -1
  28. package/lib/graphql.types.d.ts.map +1 -1
  29. package/lib/grpc-transport-cloudflare-http2.d.ts +7 -0
  30. package/lib/grpc-transport-cloudflare-http2.d.ts.map +1 -0
  31. package/lib/grpc-transport-cloudflare-http2.js +6 -0
  32. package/lib/grpc-transport-cloudflare-http2.js.map +1 -0
  33. package/lib/grpc-transport-cloudflare-sockets.d.ts +7 -0
  34. package/lib/grpc-transport-cloudflare-sockets.d.ts.map +1 -0
  35. package/lib/grpc-transport-cloudflare-sockets.js +5 -0
  36. package/lib/grpc-transport-cloudflare-sockets.js.map +1 -0
  37. package/lib/grpc-transport-node-http2.d.ts +19 -0
  38. package/lib/grpc-transport-node-http2.d.ts.map +1 -0
  39. package/lib/grpc-transport-node-http2.js +2 -0
  40. package/lib/grpc-transport-node-http2.js.map +1 -0
  41. package/lib/grpc-transport.d.ts +76 -0
  42. package/lib/grpc-transport.d.ts.map +1 -0
  43. package/lib/grpc-transport.js +1 -0
  44. package/lib/hpack.d.ts +34 -0
  45. package/lib/hpack.d.ts.map +1 -0
  46. package/lib/hpack.js +2 -0
  47. package/lib/hpack.js.map +1 -0
  48. package/lib/index.d.ts +6 -2
  49. package/lib/index.d.ts.map +1 -1
  50. package/lib/index.js +4 -0
  51. package/lib/pagination.d.ts +55 -3
  52. package/lib/pagination.d.ts.map +1 -1
  53. package/lib/pagination.js +1 -1
  54. package/lib/protobuf.d.ts +92 -0
  55. package/lib/protobuf.d.ts.map +1 -0
  56. package/lib/protobuf.js +1 -0
  57. package/lib/protocol-grpc.d.ts +86 -0
  58. package/lib/protocol-grpc.d.ts.map +1 -0
  59. package/lib/protocol-grpc.js +1 -0
  60. package/lib/protocol-http.d.ts +38 -9
  61. package/lib/protocol-http.d.ts.map +1 -1
  62. package/lib/protocol-http.js +1 -1
  63. package/lib/protocol-rest.d.ts +60 -42
  64. package/lib/protocol-rest.d.ts.map +1 -1
  65. package/lib/protocol-rest.js +1 -1
  66. package/lib/response-validation.d.ts +5 -4
  67. package/lib/response-validation.d.ts.map +1 -1
  68. package/lib/schema-lite-typed.js +1 -2
  69. package/lib/sdk-error.d.ts +27 -0
  70. package/lib/sdk-error.d.ts.map +1 -0
  71. package/lib/sdk-error.js +1 -0
  72. package/lib/sensitive.d.ts +28 -0
  73. package/lib/sensitive.d.ts.map +1 -0
  74. package/lib/sensitive.js +2 -0
  75. package/lib/sensitive.js.map +1 -0
  76. package/lib/telemetry-debug.d.ts +6 -0
  77. package/lib/telemetry-debug.d.ts.map +1 -0
  78. package/lib/telemetry-debug.js +2 -0
  79. package/lib/telemetry-debug.js.map +1 -0
  80. package/lib/telemetry-hooks.d.ts +32 -0
  81. package/lib/telemetry-hooks.d.ts.map +1 -0
  82. package/lib/telemetry-hooks.js +2 -0
  83. package/lib/telemetry-hooks.js.map +1 -0
  84. package/lib/telemetry-host-rules.d.ts +23 -0
  85. package/lib/telemetry-host-rules.d.ts.map +1 -0
  86. package/lib/telemetry-host-rules.js +2 -0
  87. package/lib/telemetry-host-rules.js.map +1 -0
  88. package/lib/telemetry-lambda-context.d.ts +17 -0
  89. package/lib/telemetry-lambda-context.d.ts.map +1 -0
  90. package/lib/telemetry-lambda-context.js +2 -0
  91. package/lib/telemetry-lambda-context.js.map +1 -0
  92. package/lib/telemetry-message-context.d.ts +52 -0
  93. package/lib/telemetry-message-context.d.ts.map +1 -0
  94. package/lib/telemetry-message-context.js +2 -0
  95. package/lib/telemetry-message-context.js.map +1 -0
  96. package/lib/telemetry-metrics.d.ts +6 -0
  97. package/lib/telemetry-metrics.d.ts.map +1 -0
  98. package/lib/telemetry-metrics.js +2 -0
  99. package/lib/telemetry-metrics.js.map +1 -0
  100. package/lib/telemetry-name-template.d.ts +13 -0
  101. package/lib/telemetry-name-template.d.ts.map +1 -0
  102. package/lib/telemetry-name-template.js +2 -0
  103. package/lib/telemetry-name-template.js.map +1 -0
  104. package/lib/telemetry-stream.d.ts +11 -0
  105. package/lib/telemetry-stream.d.ts.map +1 -0
  106. package/lib/telemetry-stream.js +2 -0
  107. package/lib/telemetry-stream.js.map +1 -0
  108. package/lib/telemetry-xray.d.ts +28 -0
  109. package/lib/telemetry-xray.d.ts.map +1 -0
  110. package/lib/telemetry-xray.js +2 -0
  111. package/lib/telemetry-xray.js.map +1 -0
  112. package/lib/telemetry.d.ts +288 -0
  113. package/lib/telemetry.d.ts.map +1 -0
  114. package/lib/telemetry.js +3 -0
  115. package/lib/telemetry.js.map +1 -0
  116. package/lib/trait.d.ts +7 -0
  117. package/lib/trait.d.ts.map +1 -1
  118. package/lib/trait.js +1 -1
  119. package/lib/xml.d.ts.map +1 -1
  120. package/package.json +3 -5
  121. package/src/annotations.ts +53 -0
  122. package/src/api.ts +316 -43
  123. package/src/category.ts +21 -22
  124. package/src/config.ts +58 -29
  125. package/src/error-category.ts +12 -14
  126. package/src/errors.ts +11 -7
  127. package/src/graphql.ts +191 -63
  128. package/src/graphql.types.ts +5 -1
  129. package/src/grpc-transport-cloudflare-http2.ts +494 -0
  130. package/src/grpc-transport-cloudflare-sockets.ts +299 -0
  131. package/src/grpc-transport-node-http2.ts +234 -0
  132. package/src/grpc-transport.ts +118 -0
  133. package/src/hpack.ts +331 -0
  134. package/src/index.ts +6 -2
  135. package/src/pagination.ts +193 -8
  136. package/src/protobuf.ts +1332 -0
  137. package/src/protocol-grpc.ts +641 -0
  138. package/src/protocol-http.ts +87 -67
  139. package/src/protocol-rest.ts +183 -191
  140. package/src/response-validation.ts +8 -5
  141. package/src/sdk-error.ts +33 -0
  142. package/src/sensitive.ts +154 -0
  143. package/src/telemetry-debug.ts +179 -0
  144. package/src/telemetry-hooks.ts +33 -0
  145. package/src/telemetry-host-rules.ts +39 -0
  146. package/src/telemetry-lambda-context.ts +46 -0
  147. package/src/telemetry-message-context.ts +170 -0
  148. package/src/telemetry-metrics.ts +69 -0
  149. package/src/telemetry-name-template.ts +26 -0
  150. package/src/telemetry-stream.ts +100 -0
  151. package/src/telemetry-xray.ts +66 -0
  152. package/src/telemetry.ts +832 -0
  153. package/src/trait.ts +10 -0
  154. package/src/xml.ts +10 -1
  155. package/lib/codegen/boolean-string-enums.d.ts +0 -36
  156. package/lib/codegen/boolean-string-enums.d.ts.map +0 -1
  157. package/lib/codegen/boolean-string-enums.js +0 -147
  158. package/lib/codegen/boolean-string-enums.js.map +0 -1
  159. package/lib/codegen/chunk.d.ts +0 -7
  160. package/lib/codegen/chunk.d.ts.map +0 -1
  161. package/lib/codegen/chunk.js +0 -139
  162. package/lib/codegen/chunk.js.map +0 -1
  163. package/lib/codegen/cli.d.ts +0 -80
  164. package/lib/codegen/cli.d.ts.map +0 -1
  165. package/lib/codegen/cli.js +0 -166
  166. package/lib/codegen/cli.js.map +0 -1
  167. package/lib/codegen/datafy.d.ts +0 -14
  168. package/lib/codegen/datafy.d.ts.map +0 -1
  169. package/lib/codegen/datafy.js +0 -853
  170. package/lib/codegen/datafy.js.map +0 -1
  171. package/lib/codegen/dedupe.d.ts +0 -5
  172. package/lib/codegen/dedupe.d.ts.map +0 -1
  173. package/lib/codegen/dedupe.js +0 -153
  174. package/lib/codegen/dedupe.js.map +0 -1
  175. package/lib/codegen/emit.d.ts +0 -125
  176. package/lib/codegen/emit.d.ts.map +0 -1
  177. package/lib/codegen/emit.js +0 -99
  178. package/lib/codegen/emit.js.map +0 -1
  179. package/lib/codegen/format.d.ts +0 -11
  180. package/lib/codegen/format.d.ts.map +0 -1
  181. package/lib/codegen/format.js +0 -32
  182. package/lib/codegen/format.js.map +0 -1
  183. package/lib/codegen/generated-at.d.ts +0 -29
  184. package/lib/codegen/generated-at.d.ts.map +0 -1
  185. package/lib/codegen/generated-at.js +0 -78
  186. package/lib/codegen/generated-at.js.map +0 -1
  187. package/lib/codegen/generator.d.ts +0 -353
  188. package/lib/codegen/generator.d.ts.map +0 -1
  189. package/lib/codegen/generator.js +0 -810
  190. package/lib/codegen/generator.js.map +0 -1
  191. package/lib/codegen/graph.d.ts +0 -36
  192. package/lib/codegen/graph.d.ts.map +0 -1
  193. package/lib/codegen/graph.js +0 -136
  194. package/lib/codegen/graph.js.map +0 -1
  195. package/lib/codegen/graphql-client.d.ts +0 -70
  196. package/lib/codegen/graphql-client.d.ts.map +0 -1
  197. package/lib/codegen/graphql-client.js +0 -439
  198. package/lib/codegen/graphql-client.js.map +0 -1
  199. package/lib/codegen/graphql.d.ts +0 -207
  200. package/lib/codegen/graphql.d.ts.map +0 -1
  201. package/lib/codegen/graphql.js +0 -786
  202. package/lib/codegen/graphql.js.map +0 -1
  203. package/lib/codegen/latin1.d.ts +0 -3
  204. package/lib/codegen/latin1.d.ts.map +0 -1
  205. package/lib/codegen/latin1.js +0 -126
  206. package/lib/codegen/latin1.js.map +0 -1
  207. package/lib/codegen/members.d.ts +0 -32
  208. package/lib/codegen/members.d.ts.map +0 -1
  209. package/lib/codegen/members.js +0 -62
  210. package/lib/codegen/members.js.map +0 -1
  211. package/lib/codegen/model-diff.d.ts +0 -10
  212. package/lib/codegen/model-diff.d.ts.map +0 -1
  213. package/lib/codegen/model-diff.js +0 -67
  214. package/lib/codegen/model-diff.js.map +0 -1
  215. package/lib/codegen/naming.d.ts +0 -29
  216. package/lib/codegen/naming.d.ts.map +0 -1
  217. package/lib/codegen/naming.js +0 -74
  218. package/lib/codegen/naming.js.map +0 -1
  219. package/lib/codegen/openapi-cli.d.ts +0 -52
  220. package/lib/codegen/openapi-cli.d.ts.map +0 -1
  221. package/lib/codegen/openapi-cli.js +0 -84
  222. package/lib/codegen/openapi-cli.js.map +0 -1
  223. package/lib/codegen/openapi.d.ts +0 -209
  224. package/lib/codegen/openapi.d.ts.map +0 -1
  225. package/lib/codegen/openapi.js +0 -1548
  226. package/lib/codegen/openapi.js.map +0 -1
  227. package/lib/codegen/operations.d.ts +0 -24
  228. package/lib/codegen/operations.d.ts.map +0 -1
  229. package/lib/codegen/operations.js +0 -56
  230. package/lib/codegen/operations.js.map +0 -1
  231. package/lib/codegen/pagination.d.ts +0 -39
  232. package/lib/codegen/pagination.d.ts.map +0 -1
  233. package/lib/codegen/pagination.js +0 -31
  234. package/lib/codegen/pagination.js.map +0 -1
  235. package/lib/codegen/patch-audit.d.ts +0 -84
  236. package/lib/codegen/patch-audit.d.ts.map +0 -1
  237. package/lib/codegen/patch-audit.js +0 -366
  238. package/lib/codegen/patch-audit.js.map +0 -1
  239. package/lib/codegen/patches.d.ts +0 -129
  240. package/lib/codegen/patches.d.ts.map +0 -1
  241. package/lib/codegen/patches.js +0 -472
  242. package/lib/codegen/patches.js.map +0 -1
  243. package/lib/codegen/prelude.d.ts +0 -15
  244. package/lib/codegen/prelude.d.ts.map +0 -1
  245. package/lib/codegen/prelude.js +0 -60
  246. package/lib/codegen/prelude.js.map +0 -1
  247. package/lib/codegen/privatize.d.ts +0 -21
  248. package/lib/codegen/privatize.d.ts.map +0 -1
  249. package/lib/codegen/privatize.js +0 -176
  250. package/lib/codegen/privatize.js.map +0 -1
  251. package/lib/codegen/proto.d.ts +0 -121
  252. package/lib/codegen/proto.d.ts.map +0 -1
  253. package/lib/codegen/proto.js +0 -960
  254. package/lib/codegen/proto.js.map +0 -1
  255. package/lib/codegen/pure.d.ts +0 -6
  256. package/lib/codegen/pure.d.ts.map +0 -1
  257. package/lib/codegen/pure.js +0 -91
  258. package/lib/codegen/pure.js.map +0 -1
  259. package/lib/codegen/rewrite-operation-ids.d.ts +0 -154
  260. package/lib/codegen/rewrite-operation-ids.d.ts.map +0 -1
  261. package/lib/codegen/rewrite-operation-ids.js +0 -1117
  262. package/lib/codegen/rewrite-operation-ids.js.map +0 -1
  263. package/lib/codegen/spec-path.d.ts +0 -16
  264. package/lib/codegen/spec-path.d.ts.map +0 -1
  265. package/lib/codegen/spec-path.js +0 -101
  266. package/lib/codegen/spec-path.js.map +0 -1
  267. package/lib/codegen/table.d.ts +0 -5
  268. package/lib/codegen/table.d.ts.map +0 -1
  269. package/lib/codegen/table.js +0 -249
  270. package/lib/codegen/table.js.map +0 -1
  271. package/lib/debug.d.ts +0 -2
  272. package/lib/debug.d.ts.map +0 -1
  273. package/lib/debug.js +0 -1
  274. package/lib/json-patch.d.ts +0 -58
  275. package/lib/json-patch.d.ts.map +0 -1
  276. package/lib/json-patch.js +0 -2
  277. package/lib/json-patch.js.map +0 -1
  278. package/lib/schema-lite-typed.js.map +0 -1
  279. package/lib/testing.d.ts +0 -40
  280. package/lib/testing.d.ts.map +0 -1
  281. package/lib/testing.js +0 -2
  282. package/lib/testing.js.map +0 -1
  283. package/src/codegen/boolean-string-enums.ts +0 -155
  284. package/src/codegen/chunk.ts +0 -147
  285. package/src/codegen/cli.ts +0 -293
  286. package/src/codegen/datafy.ts +0 -874
  287. package/src/codegen/dedupe.ts +0 -173
  288. package/src/codegen/emit.ts +0 -200
  289. package/src/codegen/format.ts +0 -49
  290. package/src/codegen/generated-at.ts +0 -88
  291. package/src/codegen/generator.ts +0 -1229
  292. package/src/codegen/graph.ts +0 -151
  293. package/src/codegen/graphql-client.ts +0 -545
  294. package/src/codegen/graphql.ts +0 -1145
  295. package/src/codegen/latin1.ts +0 -131
  296. package/src/codegen/members.ts +0 -79
  297. package/src/codegen/model-diff.ts +0 -67
  298. package/src/codegen/naming.ts +0 -85
  299. package/src/codegen/openapi-cli.ts +0 -141
  300. package/src/codegen/openapi.ts +0 -1845
  301. package/src/codegen/operations.ts +0 -73
  302. package/src/codegen/pagination.ts +0 -64
  303. package/src/codegen/patch-audit.ts +0 -480
  304. package/src/codegen/patches.ts +0 -581
  305. package/src/codegen/prelude.ts +0 -70
  306. package/src/codegen/privatize.ts +0 -200
  307. package/src/codegen/proto.ts +0 -1092
  308. package/src/codegen/pure.ts +0 -94
  309. package/src/codegen/rewrite-operation-ids.ts +0 -1219
  310. package/src/codegen/spec-path.ts +0 -112
  311. package/src/codegen/table.ts +0 -254
  312. package/src/debug.ts +0 -8
  313. package/src/json-patch.ts +0 -273
  314. package/src/testing.ts +0 -74
@@ -1,207 +0,0 @@
1
- /**
2
- * Shared GraphQL → Smithy 2.0 converter (dev-time only).
3
- *
4
- * A GraphQL endpoint has no per-operation URLs, no path/query/header bindings
5
- * and no response shapes to speak of: there is one POST, one request envelope
6
- * (`{ query, operationName, variables }`) and one response envelope
7
- * (`{ data, errors }`). What varies per operation is the *document* — which
8
- * root field is called, which variables it takes, and which selection set
9
- * comes back. This module turns an introspection schema into a Smithy model
10
- * carrying exactly that:
11
- *
12
- * • operation → `smithy.api#http` (POST <endpoint>) + the op shape
13
- * • input struct → `<traits.operation>` { query, operationName, type } —
14
- * the baked GraphQL document for the op
15
- * • output struct → `<traits.responsePath>` ("account.byId") — the path
16
- * under `data` the protocol unwraps
17
- * • nullability → `<traits.nullable>` on members,
18
- * `<traits.nullableItems>` on list shapes (GraphQL
19
- * nullability is not Smithy optionality: a selected
20
- * field is always *delivered*, it just may be `null`)
21
- * • bare results → `<traits.payload>` on the sole `result` member when
22
- * the leaf returns a list/scalar (the response IS that
23
- * value)
24
- * • connections → `smithy.api#paginated` when a root field looks like a
25
- * Relay connection (see {@link RelayOptions})
26
- *
27
- * Trait *ids* are caller-supplied so each SDK keeps its own vocabulary
28
- * namespace; the generator side maps them back to that SDK's trait module.
29
- *
30
- * ─── Operation discovery ────────────────────────────────────────────────────
31
- * Most schemas put operations directly on Query/Mutation, but some namespace
32
- * them behind objects whose fields are the real operations (`account.byId`).
33
- * `maxNamespaceDepth` bounds how far that expansion goes; set it to 1 for a
34
- * flat schema. Selection sets are expanded to `maxDepth` levels, cycles
35
- * short-circuit, and fields that themselves take arguments are not selected
36
- * (we have no value to pass them).
37
- *
38
- * Originally distilled v0's `core/scripts/generate-graphql.ts`, generalized
39
- * out of packages/expo-eas.
40
- */
41
- export type TypeKind = "SCALAR" | "OBJECT" | "INTERFACE" | "UNION" | "ENUM" | "INPUT_OBJECT" | "LIST" | "NON_NULL";
42
- export interface TypeRef {
43
- kind: TypeKind;
44
- name?: string | null;
45
- ofType?: TypeRef | null;
46
- }
47
- export interface InputValue {
48
- name: string;
49
- description?: string | null;
50
- type: TypeRef;
51
- defaultValue?: string | null;
52
- }
53
- export interface Field {
54
- name: string;
55
- description?: string | null;
56
- args: InputValue[];
57
- type: TypeRef;
58
- isDeprecated?: boolean;
59
- }
60
- export interface IntrospectionType {
61
- kind: TypeKind;
62
- name: string;
63
- description?: string | null;
64
- fields?: Field[] | null;
65
- inputFields?: InputValue[] | null;
66
- enumValues?: Array<{
67
- name: string;
68
- isDeprecated?: boolean;
69
- }> | null;
70
- possibleTypes?: TypeRef[] | null;
71
- }
72
- export interface IntrospectionSchema {
73
- queryType: {
74
- name: string;
75
- };
76
- mutationType?: {
77
- name: string;
78
- } | null;
79
- subscriptionType?: {
80
- name: string;
81
- } | null;
82
- types: IntrospectionType[];
83
- }
84
- /**
85
- * Pull the `__schema` out of an introspection response, accepting either the
86
- * bare schema, `{ __schema }`, or a full `{ data: { __schema } }` envelope —
87
- * all three are shipped by real mirrors.
88
- */
89
- export declare const readIntrospection: (json: unknown) => IntrospectionSchema;
90
- export declare const PRELUDE: {
91
- readonly String: "smithy.api#String";
92
- readonly Boolean: "smithy.api#Boolean";
93
- readonly Integer: "smithy.api#Integer";
94
- readonly Long: "smithy.api#Long";
95
- readonly Double: "smithy.api#Double";
96
- readonly Timestamp: "smithy.api#Timestamp";
97
- readonly Document: "smithy.api#Document";
98
- };
99
- /**
100
- * The Smithy trait ids this converter stamps. Each SDK owns its own trait
101
- * namespace (`com.expo.graphql#operation`, `com.railway.graphql#operation`,
102
- * …) and maps them back to its trait module in its `generate.ts`.
103
- */
104
- export interface GraphQLTraitIds {
105
- /** On the input struct: the baked `{ query, operationName, type }`. */
106
- readonly operation: string;
107
- /** On the output struct: the dotted path under `data` to unwrap. */
108
- readonly responsePath: string;
109
- /** On members: the GraphQL type was nullable. */
110
- readonly nullable: string;
111
- /** On list shapes: the GraphQL *element* type was nullable. */
112
- readonly nullableItems: string;
113
- /** On the sole `result` member: the response IS this value. */
114
- readonly payload: string;
115
- }
116
- /**
117
- * Relay connection detection. A root field paginates when its return type
118
- * looks like a connection (an `edges` list of objects with a `node`, plus a
119
- * `pageInfo`) AND it accepts the forward-pagination arguments.
120
- *
121
- * The emitted `smithy.api#paginated` trait drives `.pages()` / `.items()` in
122
- * the generated SDK; `items` deliberately points *through* the edges
123
- * (`edges.node`) so `.items()` streams nodes rather than edge wrappers.
124
- */
125
- export interface RelayOptions {
126
- /** Cursor argument fed the previous page's `endCursor`. Default `"after"`. */
127
- readonly after?: string;
128
- /** Page-size argument. Default `"first"`. */
129
- readonly first?: string;
130
- /** Connection field holding the edge list. Default `"edges"`. */
131
- readonly edges?: string;
132
- /** Edge field holding the item. Default `"node"`. */
133
- readonly node?: string;
134
- /** Connection field holding the cursor/termination block. Default `"pageInfo"`. */
135
- readonly pageInfo?: string;
136
- /** `pageInfo` field holding the next cursor. Default `"endCursor"`. */
137
- readonly endCursor?: string;
138
- /** `pageInfo` field saying whether more pages exist. Default `"hasNextPage"`. */
139
- readonly hasNextPage?: string;
140
- /** Pagination mode written into the trait. Default `"relay"`. */
141
- readonly mode?: string;
142
- }
143
- export interface GraphQLConvertOptions {
144
- /** The introspection schema (see {@link readIntrospection}). */
145
- readonly schema: IntrospectionSchema;
146
- /** Smithy namespace for every generated shape, e.g. `"com.railway.api"`. */
147
- readonly namespace: string;
148
- /** Local name of the service shape, e.g. `"Railway"`. */
149
- readonly serviceName: string;
150
- /** `smithy.api#title` on the service shape. */
151
- readonly serviceTitle: string;
152
- /** `smithy.api#documentation` on the service shape. */
153
- readonly serviceDocumentation?: string;
154
- /** Service `version` field. Default `"1.0"`. */
155
- readonly serviceVersion?: string;
156
- /** HTTP path every operation POSTs to, e.g. `"/graphql/v2"`. */
157
- readonly endpoint: string;
158
- /** Trait ids to stamp (see {@link GraphQLTraitIds}). */
159
- readonly traits: GraphQLTraitIds;
160
- /** How many levels of selection set to expand. Default `3`. */
161
- readonly maxDepth?: number;
162
- /**
163
- * How many namespace objects an operation may sit behind. `1` means the
164
- * schema is flat (every operation is a direct Query/Mutation field).
165
- * Default `3`.
166
- */
167
- readonly maxNamespaceDepth?: number;
168
- /** Skip `@deprecated` root fields and namespace subfields. Default `true`. */
169
- readonly skipDeprecated?: boolean;
170
- /** Drop root fields by name (placeholders like `_doNotUse`). */
171
- readonly skipRootField?: (name: string) => boolean;
172
- /**
173
- * Custom (non-builtin) scalar name → Smithy prelude target. Unmapped
174
- * customs fall back to `smithy.api#Document` so nothing hard-fails, but
175
- * mapping them keeps the generated types honest.
176
- */
177
- readonly customScalars?: Record<string, string>;
178
- /** Relay connection pagination. Omit (or `false`) to emit no `paginated`. */
179
- readonly relay?: RelayOptions | false;
180
- /**
181
- * SDK operation name style. Default `"verbNoun"` (`projectCreate` →
182
- * `createProject`). The GraphQL document's `operationName` stays the
183
- * schema field name.
184
- */
185
- readonly operationNaming?: "as-is" | "verbNoun";
186
- }
187
- export interface GraphQLConvertResult {
188
- /** The Smithy 2.0 model, ready to `JSON.stringify`. */
189
- readonly model: {
190
- smithy: "2.0";
191
- metadata: Record<string, unknown>;
192
- shapes: Record<string, any>;
193
- };
194
- readonly converted: number;
195
- readonly failed: number;
196
- readonly paginated: number;
197
- readonly shapeCount: number;
198
- }
199
- /**
200
- * Turn a GraphQL introspection schema into a Smithy 2.0 model.
201
- *
202
- * Subscriptions are ignored: they are a streaming transport, not a
203
- * `POST /graphql` request/response pair, and nothing in the generated SDK
204
- * could speak them.
205
- */
206
- export declare const convertGraphQLToSmithy: (options: GraphQLConvertOptions) => GraphQLConvertResult;
207
- //# sourceMappingURL=graphql.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/codegen/graphql.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAQH,MAAM,MAAM,QAAQ,GAChB,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,OAAO,GACP,MAAM,GACN,cAAc,GACd,MAAM,GACN,UAAU,CAAC;AAEf,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,I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