@distilled.cloud/core 1.0.0-rc.16 → 1.0.0-rc.18

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 (306) 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/annotations.d.ts +15 -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 +15 -0
  16. package/lib/api.d.ts.map +1 -1
  17. package/lib/api.js +1 -796
  18. package/lib/category.d.ts.map +1 -1
  19. package/lib/category.js +1 -278
  20. package/lib/chunks.js +1 -11
  21. package/lib/config.d.ts +54 -13
  22. package/lib/config.d.ts.map +1 -1
  23. package/lib/config.js +1 -161
  24. package/lib/crypto.js +1 -130
  25. package/lib/debug.d.ts.map +1 -1
  26. package/lib/debug.js +1 -8
  27. package/lib/error-category.d.ts.map +1 -1
  28. package/lib/error-category.js +1 -47
  29. package/lib/errors.d.ts +2 -13
  30. package/lib/errors.d.ts.map +1 -1
  31. package/lib/errors.js +1 -198
  32. package/lib/graphql.d.ts +14 -0
  33. package/lib/graphql.d.ts.map +1 -1
  34. package/lib/graphql.js +1 -1058
  35. package/lib/graphql.types.js +1 -6
  36. package/lib/index.d.ts +3 -2
  37. package/lib/index.d.ts.map +1 -1
  38. package/lib/index.js +1 -15
  39. package/lib/pagination.d.ts +34 -2
  40. package/lib/pagination.d.ts.map +1 -1
  41. package/lib/pagination.js +1 -271
  42. package/lib/plain-values.js +1 -39
  43. package/lib/plain-values.js.map +1 -1
  44. package/lib/protocol-http.d.ts +30 -6
  45. package/lib/protocol-http.d.ts.map +1 -1
  46. package/lib/protocol-http.js +1 -812
  47. package/lib/protocol-rest.d.ts +53 -39
  48. package/lib/protocol-rest.d.ts.map +1 -1
  49. package/lib/protocol-rest.js +1 -375
  50. package/lib/query.js +1 -27
  51. package/lib/response-validation-strict.js +1 -284
  52. package/lib/response-validation.d.ts +4 -3
  53. package/lib/response-validation.d.ts.map +1 -1
  54. package/lib/response-validation.js +1 -118
  55. package/lib/retry-after.js +1 -112
  56. package/lib/retry.js +1 -197
  57. package/lib/schema-lite-impl.js +1 -341
  58. package/lib/schema-lite-typed.js +1 -27
  59. package/lib/schema-lite.js +1 -31
  60. package/lib/schema.js +1 -220
  61. package/lib/telemetry-debug.d.ts +14 -0
  62. package/lib/telemetry-debug.d.ts.map +1 -0
  63. package/lib/telemetry-debug.js +2 -0
  64. package/lib/telemetry-debug.js.map +1 -0
  65. package/lib/telemetry-hooks.d.ts +32 -0
  66. package/lib/telemetry-hooks.d.ts.map +1 -0
  67. package/lib/telemetry-hooks.js +2 -0
  68. package/lib/telemetry-hooks.js.map +1 -0
  69. package/lib/telemetry-host-rules.d.ts +23 -0
  70. package/lib/telemetry-host-rules.d.ts.map +1 -0
  71. package/lib/telemetry-host-rules.js +2 -0
  72. package/lib/telemetry-host-rules.js.map +1 -0
  73. package/lib/telemetry-lambda-context.d.ts +17 -0
  74. package/lib/telemetry-lambda-context.d.ts.map +1 -0
  75. package/lib/telemetry-lambda-context.js +2 -0
  76. package/lib/telemetry-lambda-context.js.map +1 -0
  77. package/lib/telemetry-message-context.d.ts +52 -0
  78. package/lib/telemetry-message-context.d.ts.map +1 -0
  79. package/lib/telemetry-message-context.js +2 -0
  80. package/lib/telemetry-message-context.js.map +1 -0
  81. package/lib/telemetry-metrics.d.ts +6 -0
  82. package/lib/telemetry-metrics.d.ts.map +1 -0
  83. package/lib/telemetry-metrics.js +2 -0
  84. package/lib/telemetry-metrics.js.map +1 -0
  85. package/lib/telemetry-name-template.d.ts +13 -0
  86. package/lib/telemetry-name-template.d.ts.map +1 -0
  87. package/lib/telemetry-name-template.js +2 -0
  88. package/lib/telemetry-name-template.js.map +1 -0
  89. package/lib/telemetry-stream.d.ts +9 -0
  90. package/lib/telemetry-stream.d.ts.map +1 -0
  91. package/lib/telemetry-stream.js +2 -0
  92. package/lib/telemetry-stream.js.map +1 -0
  93. package/lib/telemetry-xray.d.ts +28 -0
  94. package/lib/telemetry-xray.d.ts.map +1 -0
  95. package/lib/telemetry-xray.js +2 -0
  96. package/lib/telemetry-xray.js.map +1 -0
  97. package/lib/telemetry.d.ts +269 -0
  98. package/lib/telemetry.d.ts.map +1 -0
  99. package/lib/telemetry.js +3 -0
  100. package/lib/telemetry.js.map +1 -0
  101. package/lib/trait.js +1 -131
  102. package/lib/xml.js +1 -323
  103. package/package.json +1 -3
  104. package/src/annotations.ts +37 -0
  105. package/src/api.ts +130 -30
  106. package/src/category.ts +21 -22
  107. package/src/config.ts +58 -29
  108. package/src/debug.ts +9 -6
  109. package/src/error-category.ts +12 -14
  110. package/src/errors.ts +7 -7
  111. package/src/graphql.ts +123 -18
  112. package/src/index.ts +3 -2
  113. package/src/pagination.ts +119 -6
  114. package/src/protocol-http.ts +63 -43
  115. package/src/protocol-rest.ts +201 -140
  116. package/src/response-validation.ts +4 -3
  117. package/src/telemetry-debug.ts +135 -0
  118. package/src/telemetry-hooks.ts +33 -0
  119. package/src/telemetry-host-rules.ts +39 -0
  120. package/src/telemetry-lambda-context.ts +46 -0
  121. package/src/telemetry-message-context.ts +170 -0
  122. package/src/telemetry-metrics.ts +69 -0
  123. package/src/telemetry-name-template.ts +26 -0
  124. package/src/telemetry-stream.ts +91 -0
  125. package/src/telemetry-xray.ts +66 -0
  126. package/src/telemetry.ts +768 -0
  127. package/lib/api.js.map +0 -1
  128. package/lib/category.js.map +0 -1
  129. package/lib/chunks.js.map +0 -1
  130. package/lib/codegen/boolean-string-enums.d.ts +0 -36
  131. package/lib/codegen/boolean-string-enums.d.ts.map +0 -1
  132. package/lib/codegen/boolean-string-enums.js +0 -147
  133. package/lib/codegen/boolean-string-enums.js.map +0 -1
  134. package/lib/codegen/chunk.d.ts +0 -7
  135. package/lib/codegen/chunk.d.ts.map +0 -1
  136. package/lib/codegen/chunk.js +0 -139
  137. package/lib/codegen/chunk.js.map +0 -1
  138. package/lib/codegen/cli.d.ts +0 -80
  139. package/lib/codegen/cli.d.ts.map +0 -1
  140. package/lib/codegen/cli.js +0 -166
  141. package/lib/codegen/cli.js.map +0 -1
  142. package/lib/codegen/datafy.d.ts +0 -14
  143. package/lib/codegen/datafy.d.ts.map +0 -1
  144. package/lib/codegen/datafy.js +0 -853
  145. package/lib/codegen/datafy.js.map +0 -1
  146. package/lib/codegen/dedupe.d.ts +0 -5
  147. package/lib/codegen/dedupe.d.ts.map +0 -1
  148. package/lib/codegen/dedupe.js +0 -153
  149. package/lib/codegen/dedupe.js.map +0 -1
  150. package/lib/codegen/emit.d.ts +0 -125
  151. package/lib/codegen/emit.d.ts.map +0 -1
  152. package/lib/codegen/emit.js +0 -99
  153. package/lib/codegen/emit.js.map +0 -1
  154. package/lib/codegen/format.d.ts +0 -11
  155. package/lib/codegen/format.d.ts.map +0 -1
  156. package/lib/codegen/format.js +0 -32
  157. package/lib/codegen/format.js.map +0 -1
  158. package/lib/codegen/generated-at.d.ts +0 -29
  159. package/lib/codegen/generated-at.d.ts.map +0 -1
  160. package/lib/codegen/generated-at.js +0 -78
  161. package/lib/codegen/generated-at.js.map +0 -1
  162. package/lib/codegen/generator.d.ts +0 -353
  163. package/lib/codegen/generator.d.ts.map +0 -1
  164. package/lib/codegen/generator.js +0 -810
  165. package/lib/codegen/generator.js.map +0 -1
  166. package/lib/codegen/graph.d.ts +0 -36
  167. package/lib/codegen/graph.d.ts.map +0 -1
  168. package/lib/codegen/graph.js +0 -136
  169. package/lib/codegen/graph.js.map +0 -1
  170. package/lib/codegen/graphql-client.d.ts +0 -70
  171. package/lib/codegen/graphql-client.d.ts.map +0 -1
  172. package/lib/codegen/graphql-client.js +0 -439
  173. package/lib/codegen/graphql-client.js.map +0 -1
  174. package/lib/codegen/graphql.d.ts +0 -207
  175. package/lib/codegen/graphql.d.ts.map +0 -1
  176. package/lib/codegen/graphql.js +0 -786
  177. package/lib/codegen/graphql.js.map +0 -1
  178. package/lib/codegen/latin1.d.ts +0 -3
  179. package/lib/codegen/latin1.d.ts.map +0 -1
  180. package/lib/codegen/latin1.js +0 -126
  181. package/lib/codegen/latin1.js.map +0 -1
  182. package/lib/codegen/members.d.ts +0 -32
  183. package/lib/codegen/members.d.ts.map +0 -1
  184. package/lib/codegen/members.js +0 -62
  185. package/lib/codegen/members.js.map +0 -1
  186. package/lib/codegen/model-diff.d.ts +0 -10
  187. package/lib/codegen/model-diff.d.ts.map +0 -1
  188. package/lib/codegen/model-diff.js +0 -67
  189. package/lib/codegen/model-diff.js.map +0 -1
  190. package/lib/codegen/naming.d.ts +0 -29
  191. package/lib/codegen/naming.d.ts.map +0 -1
  192. package/lib/codegen/naming.js +0 -74
  193. package/lib/codegen/naming.js.map +0 -1
  194. package/lib/codegen/openapi-cli.d.ts +0 -52
  195. package/lib/codegen/openapi-cli.d.ts.map +0 -1
  196. package/lib/codegen/openapi-cli.js +0 -84
  197. package/lib/codegen/openapi-cli.js.map +0 -1
  198. package/lib/codegen/openapi.d.ts +0 -209
  199. package/lib/codegen/openapi.d.ts.map +0 -1
  200. package/lib/codegen/openapi.js +0 -1548
  201. package/lib/codegen/openapi.js.map +0 -1
  202. package/lib/codegen/operations.d.ts +0 -24
  203. package/lib/codegen/operations.d.ts.map +0 -1
  204. package/lib/codegen/operations.js +0 -56
  205. package/lib/codegen/operations.js.map +0 -1
  206. package/lib/codegen/pagination.d.ts +0 -39
  207. package/lib/codegen/pagination.d.ts.map +0 -1
  208. package/lib/codegen/pagination.js +0 -31
  209. package/lib/codegen/pagination.js.map +0 -1
  210. package/lib/codegen/patch-audit.d.ts +0 -84
  211. package/lib/codegen/patch-audit.d.ts.map +0 -1
  212. package/lib/codegen/patch-audit.js +0 -366
  213. package/lib/codegen/patch-audit.js.map +0 -1
  214. package/lib/codegen/patches.d.ts +0 -129
  215. package/lib/codegen/patches.d.ts.map +0 -1
  216. package/lib/codegen/patches.js +0 -472
  217. package/lib/codegen/patches.js.map +0 -1
  218. package/lib/codegen/prelude.d.ts +0 -15
  219. package/lib/codegen/prelude.d.ts.map +0 -1
  220. package/lib/codegen/prelude.js +0 -60
  221. package/lib/codegen/prelude.js.map +0 -1
  222. package/lib/codegen/privatize.d.ts +0 -21
  223. package/lib/codegen/privatize.d.ts.map +0 -1
  224. package/lib/codegen/privatize.js +0 -176
  225. package/lib/codegen/privatize.js.map +0 -1
  226. package/lib/codegen/proto.d.ts +0 -121
  227. package/lib/codegen/proto.d.ts.map +0 -1
  228. package/lib/codegen/proto.js +0 -960
  229. package/lib/codegen/proto.js.map +0 -1
  230. package/lib/codegen/pure.d.ts +0 -6
  231. package/lib/codegen/pure.d.ts.map +0 -1
  232. package/lib/codegen/pure.js +0 -91
  233. package/lib/codegen/pure.js.map +0 -1
  234. package/lib/codegen/rewrite-operation-ids.d.ts +0 -154
  235. package/lib/codegen/rewrite-operation-ids.d.ts.map +0 -1
  236. package/lib/codegen/rewrite-operation-ids.js +0 -1117
  237. package/lib/codegen/rewrite-operation-ids.js.map +0 -1
  238. package/lib/codegen/spec-path.d.ts +0 -16
  239. package/lib/codegen/spec-path.d.ts.map +0 -1
  240. package/lib/codegen/spec-path.js +0 -101
  241. package/lib/codegen/spec-path.js.map +0 -1
  242. package/lib/codegen/table.d.ts +0 -5
  243. package/lib/codegen/table.d.ts.map +0 -1
  244. package/lib/codegen/table.js +0 -249
  245. package/lib/codegen/table.js.map +0 -1
  246. package/lib/config.js.map +0 -1
  247. package/lib/crypto.js.map +0 -1
  248. package/lib/debug.js.map +0 -1
  249. package/lib/error-category.js.map +0 -1
  250. package/lib/errors.js.map +0 -1
  251. package/lib/graphql.js.map +0 -1
  252. package/lib/graphql.types.js.map +0 -1
  253. package/lib/index.js.map +0 -1
  254. package/lib/json-patch.d.ts +0 -58
  255. package/lib/json-patch.d.ts.map +0 -1
  256. package/lib/json-patch.js +0 -227
  257. package/lib/json-patch.js.map +0 -1
  258. package/lib/pagination.js.map +0 -1
  259. package/lib/protocol-http.js.map +0 -1
  260. package/lib/protocol-rest.js.map +0 -1
  261. package/lib/query.js.map +0 -1
  262. package/lib/response-validation-strict.js.map +0 -1
  263. package/lib/response-validation.js.map +0 -1
  264. package/lib/retry-after.js.map +0 -1
  265. package/lib/retry.js.map +0 -1
  266. package/lib/schema-lite-impl.js.map +0 -1
  267. package/lib/schema-lite-typed.js.map +0 -1
  268. package/lib/schema-lite.js.map +0 -1
  269. package/lib/schema.js.map +0 -1
  270. package/lib/testing.d.ts +0 -40
  271. package/lib/testing.d.ts.map +0 -1
  272. package/lib/testing.js +0 -42
  273. package/lib/testing.js.map +0 -1
  274. package/lib/trait.js.map +0 -1
  275. package/lib/xml.js.map +0 -1
  276. package/src/codegen/boolean-string-enums.ts +0 -155
  277. package/src/codegen/chunk.ts +0 -147
  278. package/src/codegen/cli.ts +0 -293
  279. package/src/codegen/datafy.ts +0 -874
  280. package/src/codegen/dedupe.ts +0 -173
  281. package/src/codegen/emit.ts +0 -200
  282. package/src/codegen/format.ts +0 -49
  283. package/src/codegen/generated-at.ts +0 -88
  284. package/src/codegen/generator.ts +0 -1229
  285. package/src/codegen/graph.ts +0 -151
  286. package/src/codegen/graphql-client.ts +0 -545
  287. package/src/codegen/graphql.ts +0 -1145
  288. package/src/codegen/latin1.ts +0 -131
  289. package/src/codegen/members.ts +0 -79
  290. package/src/codegen/model-diff.ts +0 -67
  291. package/src/codegen/naming.ts +0 -85
  292. package/src/codegen/openapi-cli.ts +0 -141
  293. package/src/codegen/openapi.ts +0 -1845
  294. package/src/codegen/operations.ts +0 -73
  295. package/src/codegen/pagination.ts +0 -64
  296. package/src/codegen/patch-audit.ts +0 -480
  297. package/src/codegen/patches.ts +0 -581
  298. package/src/codegen/prelude.ts +0 -70
  299. package/src/codegen/privatize.ts +0 -200
  300. package/src/codegen/proto.ts +0 -1092
  301. package/src/codegen/pure.ts +0 -94
  302. package/src/codegen/rewrite-operation-ids.ts +0 -1219
  303. package/src/codegen/spec-path.ts +0 -112
  304. package/src/codegen/table.ts +0 -254
  305. package/src/json-patch.ts +0 -273
  306. 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,IAAI,CAAC;IAC5B,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,I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