@workerstack/clients 0.0.0-stage → 1.0.0-rc.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +619 -2
- package/bin/honey-clients.js +94 -0
- package/dist/cli.d.ts +102 -0
- package/dist/cli.js +190 -0
- package/dist/emit/cli/channels.d.ts +73 -0
- package/dist/emit/cli/channels.js +197 -0
- package/dist/emit/cli/commands.d.ts +27 -0
- package/dist/emit/cli/commands.js +187 -0
- package/dist/emit/cli/discovery.d.ts +35 -0
- package/dist/emit/cli/discovery.js +202 -0
- package/dist/emit/cli/flags.d.ts +59 -0
- package/dist/emit/cli/flags.js +186 -0
- package/dist/emit/cli/index.d.ts +1 -0
- package/dist/emit/cli/index.js +1 -0
- package/dist/emit/cli/install.d.ts +37 -0
- package/dist/emit/cli/install.js +88 -0
- package/dist/emit/cli/layout.d.ts +23 -0
- package/dist/emit/cli/layout.js +118 -0
- package/dist/emit/cli/module.d.ts +30 -0
- package/dist/emit/cli/module.js +186 -0
- package/dist/emit/cli/release.d.ts +40 -0
- package/dist/emit/cli/release.js +183 -0
- package/dist/emit/cli/skills.d.ts +11 -0
- package/dist/emit/cli/skills.js +56 -0
- package/dist/emit/csharp/errors.d.ts +7 -0
- package/dist/emit/csharp/errors.js +69 -0
- package/dist/emit/csharp/index.d.ts +1 -0
- package/dist/emit/csharp/index.js +1 -0
- package/dist/emit/csharp/json.d.ts +13 -0
- package/dist/emit/csharp/json.js +113 -0
- package/dist/emit/csharp/realtime.d.ts +10 -0
- package/dist/emit/csharp/realtime.js +33 -0
- package/dist/emit/csharp/sdk-answer.d.ts +48 -0
- package/dist/emit/csharp/sdk-answer.js +85 -0
- package/dist/emit/csharp/sdk-body.d.ts +10 -0
- package/dist/emit/csharp/sdk-body.js +87 -0
- package/dist/emit/csharp/sdk-client.d.ts +32 -0
- package/dist/emit/csharp/sdk-client.js +177 -0
- package/dist/emit/csharp/sdk-csproj.d.ts +36 -0
- package/dist/emit/csharp/sdk-csproj.js +136 -0
- package/dist/emit/csharp/sdk-doc.d.ts +12 -0
- package/dist/emit/csharp/sdk-doc.js +35 -0
- package/dist/emit/csharp/sdk-method.d.ts +26 -0
- package/dist/emit/csharp/sdk-method.js +187 -0
- package/dist/emit/csharp/sdk-plan.d.ts +38 -0
- package/dist/emit/csharp/sdk-plan.js +1 -0
- package/dist/emit/csharp/sdk.d.ts +40 -0
- package/dist/emit/csharp/sdk.js +105 -0
- package/dist/emit/csharp/sse.d.ts +18 -0
- package/dist/emit/csharp/sse.js +29 -0
- package/dist/emit/csharp/transport.d.ts +11 -0
- package/dist/emit/csharp/transport.js +67 -0
- package/dist/emit/csharp/types-enum.d.ts +19 -0
- package/dist/emit/csharp/types-enum.js +63 -0
- package/dist/emit/csharp/types-names.d.ts +33 -0
- package/dist/emit/csharp/types-names.js +182 -0
- package/dist/emit/csharp/types-record.d.ts +25 -0
- package/dist/emit/csharp/types-record.js +65 -0
- package/dist/emit/csharp/types-union.d.ts +27 -0
- package/dist/emit/csharp/types-union.js +113 -0
- package/dist/emit/csharp/types.d.ts +36 -0
- package/dist/emit/csharp/types.js +126 -0
- package/dist/emit/csharp/ws.d.ts +20 -0
- package/dist/emit/csharp/ws.js +14 -0
- package/dist/emit/go/errors.d.ts +7 -0
- package/dist/emit/go/errors.js +44 -0
- package/dist/emit/go/http.d.ts +11 -0
- package/dist/emit/go/http.js +50 -0
- package/dist/emit/go/index.d.ts +1 -0
- package/dist/emit/go/index.js +1 -0
- package/dist/emit/go/module-path.d.ts +2 -0
- package/dist/emit/go/module-path.js +27 -0
- package/dist/emit/go/sdk-answer.d.ts +28 -0
- package/dist/emit/go/sdk-answer.js +41 -0
- package/dist/emit/go/sdk-body.d.ts +24 -0
- package/dist/emit/go/sdk-body.js +76 -0
- package/dist/emit/go/sdk-client.d.ts +29 -0
- package/dist/emit/go/sdk-client.js +141 -0
- package/dist/emit/go/sdk-method.d.ts +68 -0
- package/dist/emit/go/sdk-method.js +172 -0
- package/dist/emit/go/sdk-mirror.d.ts +23 -0
- package/dist/emit/go/sdk-mirror.js +97 -0
- package/dist/emit/go/sdk-opts.d.ts +55 -0
- package/dist/emit/go/sdk-opts.js +100 -0
- package/dist/emit/go/sdk.d.ts +26 -0
- package/dist/emit/go/sdk.js +111 -0
- package/dist/emit/go/sse.d.ts +16 -0
- package/dist/emit/go/sse.js +26 -0
- package/dist/emit/go/types-codec.d.ts +15 -0
- package/dist/emit/go/types-codec.js +171 -0
- package/dist/emit/go/types-names.d.ts +14 -0
- package/dist/emit/go/types-names.js +64 -0
- package/dist/emit/go/types-struct.d.ts +29 -0
- package/dist/emit/go/types-struct.js +65 -0
- package/dist/emit/go/types-union.d.ts +17 -0
- package/dist/emit/go/types-union.js +84 -0
- package/dist/emit/go/types.d.ts +32 -0
- package/dist/emit/go/types.js +177 -0
- package/dist/emit/go/ws.d.ts +12 -0
- package/dist/emit/go/ws.js +70 -0
- package/dist/emit/java/gradle.d.ts +57 -0
- package/dist/emit/java/gradle.js +221 -0
- package/dist/emit/java/index.d.ts +2 -0
- package/dist/emit/java/index.js +2 -0
- package/dist/emit/java/json.d.ts +13 -0
- package/dist/emit/java/json.js +84 -0
- package/dist/emit/java/layout-ast.d.ts +146 -0
- package/dist/emit/java/layout-ast.js +102 -0
- package/dist/emit/java/layout-decl.d.ts +20 -0
- package/dist/emit/java/layout-decl.js +155 -0
- package/dist/emit/java/layout-doc.d.ts +55 -0
- package/dist/emit/java/layout-doc.js +166 -0
- package/dist/emit/java/layout-dot.d.ts +18 -0
- package/dist/emit/java/layout-dot.js +127 -0
- package/dist/emit/java/layout-strings.d.ts +8 -0
- package/dist/emit/java/layout-strings.js +76 -0
- package/dist/emit/java/layout-types.d.ts +11 -0
- package/dist/emit/java/layout-types.js +95 -0
- package/dist/emit/java/layout-visitor.d.ts +38 -0
- package/dist/emit/java/layout-visitor.js +232 -0
- package/dist/emit/java/layout.d.ts +61 -0
- package/dist/emit/java/layout.js +121 -0
- package/dist/emit/java/models-enum.d.ts +17 -0
- package/dist/emit/java/models-enum.js +51 -0
- package/dist/emit/java/models-names.d.ts +29 -0
- package/dist/emit/java/models-names.js +97 -0
- package/dist/emit/java/models-record.d.ts +24 -0
- package/dist/emit/java/models-record.js +79 -0
- package/dist/emit/java/models-union.d.ts +27 -0
- package/dist/emit/java/models-union.js +86 -0
- package/dist/emit/java/models.d.ts +28 -0
- package/dist/emit/java/models.js +118 -0
- package/dist/emit/java/realtime.d.ts +50 -0
- package/dist/emit/java/realtime.js +69 -0
- package/dist/emit/java/sdk-client.d.ts +66 -0
- package/dist/emit/java/sdk-client.js +207 -0
- package/dist/emit/java/sdk-decl.d.ts +11 -0
- package/dist/emit/java/sdk-decl.js +63 -0
- package/dist/emit/java/sdk-errors.d.ts +13 -0
- package/dist/emit/java/sdk-errors.js +141 -0
- package/dist/emit/java/sdk-headers.d.ts +12 -0
- package/dist/emit/java/sdk-headers.js +74 -0
- package/dist/emit/java/sdk-mirror.d.ts +14 -0
- package/dist/emit/java/sdk-mirror.js +107 -0
- package/dist/emit/java/sdk-models.d.ts +16 -0
- package/dist/emit/java/sdk-models.js +68 -0
- package/dist/emit/java/sdk-op.d.ts +57 -0
- package/dist/emit/java/sdk-op.js +216 -0
- package/dist/emit/java/sdk-params.d.ts +38 -0
- package/dist/emit/java/sdk-params.js +133 -0
- package/dist/emit/java/sdk-plan.d.ts +52 -0
- package/dist/emit/java/sdk-plan.js +1 -0
- package/dist/emit/java/sdk-record.d.ts +16 -0
- package/dist/emit/java/sdk-record.js +99 -0
- package/dist/emit/java/sdk.d.ts +49 -0
- package/dist/emit/java/sdk.js +216 -0
- package/dist/emit/java/sse.d.ts +35 -0
- package/dist/emit/java/sse.js +57 -0
- package/dist/emit/java/ws.d.ts +27 -0
- package/dist/emit/java/ws.js +31 -0
- package/dist/emit/mcp/annotations.d.ts +15 -0
- package/dist/emit/mcp/annotations.js +15 -0
- package/dist/emit/mcp/files.d.ts +18 -0
- package/dist/emit/mcp/files.js +42 -0
- package/dist/emit/mcp/index.d.ts +3 -0
- package/dist/emit/mcp/index.js +3 -0
- package/dist/emit/mcp/literal.d.ts +2 -0
- package/dist/emit/mcp/literal.js +33 -0
- package/dist/emit/mcp/mounted.d.ts +21 -0
- package/dist/emit/mcp/mounted.js +89 -0
- package/dist/emit/mcp/output-schema.d.ts +18 -0
- package/dist/emit/mcp/output-schema.js +38 -0
- package/dist/emit/mcp/registry.d.ts +23 -0
- package/dist/emit/mcp/registry.js +83 -0
- package/dist/emit/mcp/runtime.d.ts +10 -0
- package/dist/emit/mcp/runtime.js +47 -0
- package/dist/emit/mcp/schema.d.ts +19 -0
- package/dist/emit/mcp/schema.js +88 -0
- package/dist/emit/mcp/server.d.ts +30 -0
- package/dist/emit/mcp/server.js +246 -0
- package/dist/emit/mcp/tools.d.ts +51 -0
- package/dist/emit/mcp/tools.js +153 -0
- package/dist/emit/python/errors.d.ts +8 -0
- package/dist/emit/python/errors.js +68 -0
- package/dist/emit/python/index.d.ts +1 -0
- package/dist/emit/python/index.js +1 -0
- package/dist/emit/python/realtime.d.ts +10 -0
- package/dist/emit/python/realtime.js +33 -0
- package/dist/emit/python/sdk-answer.d.ts +49 -0
- package/dist/emit/python/sdk-answer.js +89 -0
- package/dist/emit/python/sdk-body.d.ts +11 -0
- package/dist/emit/python/sdk-body.js +40 -0
- package/dist/emit/python/sdk-client.d.ts +36 -0
- package/dist/emit/python/sdk-client.js +163 -0
- package/dist/emit/python/sdk-doc.d.ts +9 -0
- package/dist/emit/python/sdk-doc.js +32 -0
- package/dist/emit/python/sdk-imports.d.ts +14 -0
- package/dist/emit/python/sdk-imports.js +38 -0
- package/dist/emit/python/sdk-method.d.ts +29 -0
- package/dist/emit/python/sdk-method.js +183 -0
- package/dist/emit/python/sdk-plan.d.ts +33 -0
- package/dist/emit/python/sdk-plan.js +1 -0
- package/dist/emit/python/sdk-pyproject.d.ts +27 -0
- package/dist/emit/python/sdk-pyproject.js +103 -0
- package/dist/emit/python/sdk.d.ts +22 -0
- package/dist/emit/python/sdk.js +154 -0
- package/dist/emit/python/sse.d.ts +12 -0
- package/dist/emit/python/sse.js +23 -0
- package/dist/emit/python/transport.d.ts +15 -0
- package/dist/emit/python/transport.js +60 -0
- package/dist/emit/python/types-dict.d.ts +31 -0
- package/dist/emit/python/types-dict.js +45 -0
- package/dist/emit/python/types-names.d.ts +16 -0
- package/dist/emit/python/types-names.js +52 -0
- package/dist/emit/python/types-union.d.ts +32 -0
- package/dist/emit/python/types-union.js +46 -0
- package/dist/emit/python/types.d.ts +36 -0
- package/dist/emit/python/types.js +128 -0
- package/dist/emit/python/ws.d.ts +14 -0
- package/dist/emit/python/ws.js +16 -0
- package/dist/emit/rust/errors.d.ts +7 -0
- package/dist/emit/rust/errors.js +107 -0
- package/dist/emit/rust/http.d.ts +13 -0
- package/dist/emit/rust/http.js +67 -0
- package/dist/emit/rust/index.d.ts +1 -0
- package/dist/emit/rust/index.js +1 -0
- package/dist/emit/rust/realtime.d.ts +11 -0
- package/dist/emit/rust/realtime.js +29 -0
- package/dist/emit/rust/sdk-body.d.ts +19 -0
- package/dist/emit/rust/sdk-body.js +53 -0
- package/dist/emit/rust/sdk-cargo.d.ts +43 -0
- package/dist/emit/rust/sdk-cargo.js +178 -0
- package/dist/emit/rust/sdk-client.d.ts +25 -0
- package/dist/emit/rust/sdk-client.js +108 -0
- package/dist/emit/rust/sdk-method.d.ts +15 -0
- package/dist/emit/rust/sdk-method.js +119 -0
- package/dist/emit/rust/sdk-opts.d.ts +58 -0
- package/dist/emit/rust/sdk-opts.js +117 -0
- package/dist/emit/rust/sdk-plan.d.ts +33 -0
- package/dist/emit/rust/sdk-plan.js +1 -0
- package/dist/emit/rust/sdk.d.ts +23 -0
- package/dist/emit/rust/sdk.js +111 -0
- package/dist/emit/rust/sse.d.ts +19 -0
- package/dist/emit/rust/sse.js +20 -0
- package/dist/emit/rust/types-enum.d.ts +13 -0
- package/dist/emit/rust/types-enum.js +62 -0
- package/dist/emit/rust/types-names.d.ts +19 -0
- package/dist/emit/rust/types-names.js +66 -0
- package/dist/emit/rust/types-struct.d.ts +21 -0
- package/dist/emit/rust/types-struct.js +59 -0
- package/dist/emit/rust/types-union.d.ts +24 -0
- package/dist/emit/rust/types-union.js +97 -0
- package/dist/emit/rust/types.d.ts +34 -0
- package/dist/emit/rust/types.js +105 -0
- package/dist/emit/rust/ws.d.ts +21 -0
- package/dist/emit/rust/ws.js +20 -0
- package/dist/emit/shared/escape.d.ts +55 -0
- package/dist/emit/shared/escape.js +144 -0
- package/dist/emit/shared/format.d.ts +24 -0
- package/dist/emit/shared/format.js +23 -0
- package/dist/emit/shared/gofmt.d.ts +3 -0
- package/dist/emit/shared/gofmt.js +26 -0
- package/dist/emit/shared/lang.d.ts +60 -0
- package/dist/emit/shared/lang.js +233 -0
- package/dist/emit/shared/literals.d.ts +4 -0
- package/dist/emit/shared/literals.js +31 -0
- package/dist/emit/shared/metadata.d.ts +106 -0
- package/dist/emit/shared/metadata.js +130 -0
- package/dist/emit/shared/mirror.d.ts +22 -0
- package/dist/emit/shared/mirror.js +26 -0
- package/dist/emit/shared/ruff.d.ts +3 -0
- package/dist/emit/shared/ruff.js +31 -0
- package/dist/emit/shared/rustfmt.d.ts +3 -0
- package/dist/emit/shared/rustfmt.js +32 -0
- package/dist/emit/shared/status-keys.d.ts +7 -0
- package/dist/emit/shared/status-keys.js +67 -0
- package/dist/emit/shared/type-emitter.d.ts +19 -0
- package/dist/emit/shared/type-emitter.js +100 -0
- package/dist/emit/ts/app-client.d.ts +4 -0
- package/dist/emit/ts/app-client.js +68 -0
- package/dist/emit/ts/http.d.ts +20 -0
- package/dist/emit/ts/http.js +74 -0
- package/dist/emit/ts/package.d.ts +36 -0
- package/dist/emit/ts/package.js +126 -0
- package/dist/emit/ts/route-tree.d.ts +68 -0
- package/dist/emit/ts/route-tree.js +240 -0
- package/dist/emit/ts/sdk-types-preamble.d.ts +14 -0
- package/dist/emit/ts/sdk-types-preamble.js +123 -0
- package/dist/emit/ts/sdk-types.d.ts +13 -0
- package/dist/emit/ts/sdk-types.js +213 -0
- package/dist/emit/ts/sdk.d.ts +21 -0
- package/dist/emit/ts/sdk.js +173 -0
- package/dist/emit/ts/service-map.d.ts +40 -0
- package/dist/emit/ts/service-map.js +171 -0
- package/dist/emit/ts/tanstack-query.d.ts +12 -0
- package/dist/emit/ts/tanstack-query.js +156 -0
- package/dist/emit/ts/type-gen.d.ts +26 -0
- package/dist/emit/ts/type-gen.js +255 -0
- package/dist/emit/ts/webhooks.d.ts +19 -0
- package/dist/emit/ts/webhooks.js +81 -0
- package/dist/extract/chain.d.ts +34 -0
- package/dist/extract/chain.js +84 -0
- package/dist/extract/extract.d.ts +41 -0
- package/dist/extract/extract.js +191 -0
- package/dist/extract/serialize.d.ts +34 -0
- package/dist/extract/serialize.js +295 -0
- package/dist/extract/walk.d.ts +47 -0
- package/dist/extract/walk.js +109 -0
- package/dist/gen/args.d.ts +28 -0
- package/dist/gen/args.js +133 -0
- package/dist/gen/formatters.d.ts +62 -0
- package/dist/gen/formatters.js +146 -0
- package/dist/gen/process.d.ts +13 -0
- package/dist/gen/process.js +35 -0
- package/dist/gen/shipped.d.ts +17 -0
- package/dist/gen/shipped.js +55 -0
- package/dist/gen/targets.d.ts +93 -0
- package/dist/gen/targets.js +171 -0
- package/dist/gen/write.d.ts +33 -0
- package/dist/gen/write.js +118 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +15 -0
- package/dist/ir/build.d.ts +37 -0
- package/dist/ir/build.js +152 -0
- package/dist/ir/load.d.ts +11 -0
- package/dist/ir/load.js +112 -0
- package/dist/ir/model.d.ts +206 -0
- package/dist/ir/model.js +5 -0
- package/dist/ir/resolve-refs.d.ts +11 -0
- package/dist/ir/resolve-refs.js +66 -0
- package/dist/ir/resource-tree.d.ts +9 -0
- package/dist/ir/resource-tree.js +53 -0
- package/dist/ir/route-tree-intern.d.ts +18 -0
- package/dist/ir/route-tree-intern.js +174 -0
- package/dist/ir/schema.d.ts +11 -0
- package/dist/ir/schema.js +192 -0
- package/dist/ir/sdk-model.d.ts +86 -0
- package/dist/ir/sdk-model.js +204 -0
- package/dist/ir/slots.d.ts +42 -0
- package/dist/ir/slots.js +245 -0
- package/dist/runtime/cli/body.go +176 -0
- package/dist/runtime/cli/config.go +243 -0
- package/dist/runtime/cli/discovery.go +147 -0
- package/dist/runtime/cli/format.go +174 -0
- package/dist/runtime/cli/log.go +117 -0
- package/dist/runtime/cli/output.go +247 -0
- package/dist/runtime/cli/params.go +197 -0
- package/dist/runtime/cli/run.go +226 -0
- package/dist/runtime/cli/socket.go +60 -0
- package/dist/runtime/cli/stream.go +217 -0
- package/dist/runtime/cli/target.go +117 -0
- package/dist/runtime/csharp/Adapters.cs +183 -0
- package/dist/runtime/csharp/Auth.cs +56 -0
- package/dist/runtime/csharp/Body.cs +135 -0
- package/dist/runtime/csharp/Config.cs +161 -0
- package/dist/runtime/csharp/Envelope.cs +149 -0
- package/dist/runtime/csharp/Errors.cs +194 -0
- package/dist/runtime/csharp/Events.cs +155 -0
- package/dist/runtime/csharp/Exchange.cs +247 -0
- package/dist/runtime/csharp/Handler.cs +103 -0
- package/dist/runtime/csharp/Hooks.cs +128 -0
- package/dist/runtime/csharp/Invalidation.cs +102 -0
- package/dist/runtime/csharp/Json.cs +144 -0
- package/dist/runtime/csharp/Log.cs +48 -0
- package/dist/runtime/csharp/Operation.cs +33 -0
- package/dist/runtime/csharp/Path.cs +65 -0
- package/dist/runtime/csharp/Query.cs +72 -0
- package/dist/runtime/csharp/Realtime.cs +118 -0
- package/dist/runtime/csharp/RealtimeLoop.cs +236 -0
- package/dist/runtime/csharp/Redirect.cs +53 -0
- package/dist/runtime/csharp/Result.cs +57 -0
- package/dist/runtime/csharp/Sse.cs +122 -0
- package/dist/runtime/csharp/Stale.cs +151 -0
- package/dist/runtime/csharp/Transport.cs +143 -0
- package/dist/runtime/csharp/TransportLongPoll.cs +63 -0
- package/dist/runtime/csharp/TransportSse.cs +54 -0
- package/dist/runtime/csharp/TransportWs.cs +40 -0
- package/dist/runtime/csharp/Wire.cs +109 -0
- package/dist/runtime/csharp/Ws.cs +300 -0
- package/dist/runtime/csharp/WsDial.cs +127 -0
- package/dist/runtime/go/auth.go +127 -0
- package/dist/runtime/go/body.go +129 -0
- package/dist/runtime/go/config.go +75 -0
- package/dist/runtime/go/errors.go +185 -0
- package/dist/runtime/go/export.go +37 -0
- package/dist/runtime/go/hooks.go +53 -0
- package/dist/runtime/go/invalidation.go +112 -0
- package/dist/runtime/go/log.go +92 -0
- package/dist/runtime/go/nullable.go +64 -0
- package/dist/runtime/go/options.go +118 -0
- package/dist/runtime/go/path.go +156 -0
- package/dist/runtime/go/query.go +147 -0
- package/dist/runtime/go/realtime.go +239 -0
- package/dist/runtime/go/realtime_loop.go +208 -0
- package/dist/runtime/go/redirect.go +124 -0
- package/dist/runtime/go/request.go +222 -0
- package/dist/runtime/go/result.go +86 -0
- package/dist/runtime/go/sse.go +186 -0
- package/dist/runtime/go/stale.go +229 -0
- package/dist/runtime/go/stream.go +105 -0
- package/dist/runtime/go/transport.go +242 -0
- package/dist/runtime/go/transport_longpoll.go +121 -0
- package/dist/runtime/go/transport_sse.go +175 -0
- package/dist/runtime/go/ws.go +205 -0
- package/dist/runtime/java/Answer.java +107 -0
- package/dist/runtime/java/ApiException.java +110 -0
- package/dist/runtime/java/BinaryBody.java +36 -0
- package/dist/runtime/java/Body.java +105 -0
- package/dist/runtime/java/Call.java +23 -0
- package/dist/runtime/java/CallLog.java +51 -0
- package/dist/runtime/java/ClientConfig.java +233 -0
- package/dist/runtime/java/ConnectionState.java +12 -0
- package/dist/runtime/java/Credential.java +58 -0
- package/dist/runtime/java/Deadline.java +38 -0
- package/dist/runtime/java/Decode.java +181 -0
- package/dist/runtime/java/Envelope.java +141 -0
- package/dist/runtime/java/ErrorEnvelope.java +23 -0
- package/dist/runtime/java/EventStream.java +129 -0
- package/dist/runtime/java/Exchange.java +62 -0
- package/dist/runtime/java/FilePart.java +5 -0
- package/dist/runtime/java/Flight.java +306 -0
- package/dist/runtime/java/HoneyException.java +14 -0
- package/dist/runtime/java/Hooks.java +47 -0
- package/dist/runtime/java/Hops.java +133 -0
- package/dist/runtime/java/InvalidationConfig.java +73 -0
- package/dist/runtime/java/Json.java +23 -0
- package/dist/runtime/java/Keepalive.java +60 -0
- package/dist/runtime/java/LogEntry.java +14 -0
- package/dist/runtime/java/LongPollAdapter.java +68 -0
- package/dist/runtime/java/Operation.java +21 -0
- package/dist/runtime/java/Opt.java +121 -0
- package/dist/runtime/java/Pump.java +160 -0
- package/dist/runtime/java/RawResponse.java +48 -0
- package/dist/runtime/java/Realtime.java +152 -0
- package/dist/runtime/java/RealtimeLoop.java +371 -0
- package/dist/runtime/java/RedirectPolicy.java +13 -0
- package/dist/runtime/java/Redirects.java +126 -0
- package/dist/runtime/java/RequestContext.java +78 -0
- package/dist/runtime/java/RequestHook.java +9 -0
- package/dist/runtime/java/RequestOptions.java +91 -0
- package/dist/runtime/java/ResponseContext.java +70 -0
- package/dist/runtime/java/ResponseHook.java +12 -0
- package/dist/runtime/java/Result.java +32 -0
- package/dist/runtime/java/ResumableConnection.java +165 -0
- package/dist/runtime/java/SdkException.java +11 -0
- package/dist/runtime/java/Socket.java +301 -0
- package/dist/runtime/java/Sse.java +171 -0
- package/dist/runtime/java/SseAdapter.java +61 -0
- package/dist/runtime/java/SseEvent.java +10 -0
- package/dist/runtime/java/StaleMeta.java +16 -0
- package/dist/runtime/java/StaleTracker.java +287 -0
- package/dist/runtime/java/Transport.java +16 -0
- package/dist/runtime/java/TransportAdapter.java +14 -0
- package/dist/runtime/java/TransportConnection.java +15 -0
- package/dist/runtime/java/TransportKind.java +12 -0
- package/dist/runtime/java/TransportMessage.java +9 -0
- package/dist/runtime/java/TransportOptions.java +138 -0
- package/dist/runtime/java/TypedWebSocket.java +83 -0
- package/dist/runtime/java/UrlPath.java +49 -0
- package/dist/runtime/java/UrlQuery.java +99 -0
- package/dist/runtime/java/WsAdapter.java +52 -0
- package/dist/runtime/java/WsClose.java +47 -0
- package/dist/runtime/java/WsDial.java +148 -0
- package/dist/runtime/java/WsMessage.java +18 -0
- package/dist/runtime/mcp/call.ts +167 -0
- package/dist/runtime/mcp/files.ts +183 -0
- package/dist/runtime/mcp/guard.ts +176 -0
- package/dist/runtime/mcp/http.ts +159 -0
- package/dist/runtime/mcp/jsonrpc.ts +50 -0
- package/dist/runtime/mcp/listen.ts +76 -0
- package/dist/runtime/mcp/mount.ts +123 -0
- package/dist/runtime/mcp/protocol.ts +219 -0
- package/dist/runtime/mcp/reader.ts +57 -0
- package/dist/runtime/mcp/result.ts +85 -0
- package/dist/runtime/mcp/stdio.ts +79 -0
- package/dist/runtime/mcp/stream.ts +62 -0
- package/dist/runtime/python/__init__.py +2 -0
- package/dist/runtime/python/auth.py +67 -0
- package/dist/runtime/python/body.py +83 -0
- package/dist/runtime/python/config.py +139 -0
- package/dist/runtime/python/errors.py +213 -0
- package/dist/runtime/python/events.py +152 -0
- package/dist/runtime/python/exchange.py +298 -0
- package/dist/runtime/python/hooks.py +86 -0
- package/dist/runtime/python/invalidation.py +57 -0
- package/dist/runtime/python/log.py +60 -0
- package/dist/runtime/python/operation.py +25 -0
- package/dist/runtime/python/path.py +41 -0
- package/dist/runtime/python/query.py +48 -0
- package/dist/runtime/python/realtime.py +244 -0
- package/dist/runtime/python/redirect.py +93 -0
- package/dist/runtime/python/result.py +58 -0
- package/dist/runtime/python/send_async.py +189 -0
- package/dist/runtime/python/send_sync.py +105 -0
- package/dist/runtime/python/sse.py +81 -0
- package/dist/runtime/python/stale.py +94 -0
- package/dist/runtime/python/transport.py +157 -0
- package/dist/runtime/python/transport_longpoll.py +60 -0
- package/dist/runtime/python/transport_sse.py +60 -0
- package/dist/runtime/python/transport_ws.py +57 -0
- package/dist/runtime/python/ws.py +276 -0
- package/dist/runtime/rust/Cargo.lock +1763 -0
- package/dist/runtime/rust/answer.rs +120 -0
- package/dist/runtime/rust/auth.rs +80 -0
- package/dist/runtime/rust/body.rs +150 -0
- package/dist/runtime/rust/call.rs +200 -0
- package/dist/runtime/rust/config.rs +254 -0
- package/dist/runtime/rust/envelope.rs +84 -0
- package/dist/runtime/rust/errors.rs +235 -0
- package/dist/runtime/rust/events.rs +177 -0
- package/dist/runtime/rust/exchange.rs +287 -0
- package/dist/runtime/rust/hooks.rs +63 -0
- package/dist/runtime/rust/invalidation.rs +84 -0
- package/dist/runtime/rust/log.rs +88 -0
- package/dist/runtime/rust/nullable.rs +13 -0
- package/dist/runtime/rust/path.rs +83 -0
- package/dist/runtime/rust/query.rs +84 -0
- package/dist/runtime/rust/realtime.rs +182 -0
- package/dist/runtime/rust/realtime_loop.rs +177 -0
- package/dist/runtime/rust/redirect.rs +121 -0
- package/dist/runtime/rust/request.rs +178 -0
- package/dist/runtime/rust/result.rs +101 -0
- package/dist/runtime/rust/sse.rs +104 -0
- package/dist/runtime/rust/stale.rs +209 -0
- package/dist/runtime/rust/transport.rs +221 -0
- package/dist/runtime/rust/transport_longpoll.rs +108 -0
- package/dist/runtime/rust/transport_sse.rs +91 -0
- package/dist/runtime/rust/transport_ws.rs +75 -0
- package/dist/runtime/rust/ws.rs +322 -0
- package/dist/runtime/ts/app-types.ts +200 -0
- package/dist/runtime/ts/app.ts +104 -0
- package/dist/runtime/ts/config.ts +124 -0
- package/dist/runtime/ts/defaults.ts +48 -0
- package/dist/runtime/ts/error.ts +113 -0
- package/dist/runtime/ts/hooks.ts +92 -0
- package/dist/runtime/ts/http.ts +228 -0
- package/dist/runtime/ts/media-type.ts +36 -0
- package/dist/runtime/ts/path.ts +152 -0
- package/dist/runtime/ts/realtime-connection.ts +296 -0
- package/dist/runtime/ts/realtime-transports.ts +149 -0
- package/dist/runtime/ts/realtime.ts +293 -0
- package/dist/runtime/ts/redirect-policy.ts +17 -0
- package/dist/runtime/ts/redirects.ts +74 -0
- package/dist/runtime/ts/request.ts +239 -0
- package/dist/runtime/ts/response.ts +219 -0
- package/dist/runtime/ts/sdk-realtime.ts +10 -0
- package/dist/runtime/ts/sdk-sse.ts +55 -0
- package/dist/runtime/ts/sdk-ws.ts +21 -0
- package/dist/runtime/ts/sdk.ts +242 -0
- package/dist/runtime/ts/sse.ts +175 -0
- package/dist/runtime/ts/stale.ts +137 -0
- package/dist/runtime/ts/stream.ts +87 -0
- package/dist/runtime/ts/webhook.ts +116 -0
- package/dist/runtime/ts/ws.ts +155 -0
- package/dist/runtime/ts-tanstack-query/invalidate.ts +152 -0
- package/dist/runtime/ts-tanstack-query/query.ts +261 -0
- package/package.json +84 -5
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type JavaTypeContext } from "./models.ts";
|
|
2
|
+
import type { IR } from "../../ir/model.ts";
|
|
3
|
+
/** The import lines `decl` needs, sorted as google-java-format sorts them. */
|
|
4
|
+
export declare function importsOf(decl: string): string[];
|
|
5
|
+
/** One model file's text: the marker, the package, its imports, its declaration. */
|
|
6
|
+
export declare function sourceOf(marker: string, packageName: string, decl: string): string;
|
|
7
|
+
/** The model declarations of `ir` in `ctx`: every component that declares, then what each hoists, the ops' included. */
|
|
8
|
+
export declare function componentDecls(ir: IR, ctx: JavaTypeContext): Map<string, string>;
|
|
9
|
+
/** `files` with `path` set to `text`; a second declaration of one path is a generator bug, never an overwrite. */
|
|
10
|
+
export declare function putFile(files: Record<string, string>, path: string, text: string): void;
|
|
11
|
+
/** The model files of `decls` under `dir`, in `packageName`, each behind `marker`. */
|
|
12
|
+
export declare function modelFiles(decls: ReadonlyMap<string, string>, { dir, marker, packageName }: {
|
|
13
|
+
dir: string;
|
|
14
|
+
marker: string;
|
|
15
|
+
packageName: string;
|
|
16
|
+
}): Record<string, string>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Java SDK's model files (bit 16 phase b): each component that declares a type, and every type its declaration
|
|
3
|
+
* hoists (an inline object, an enum, a union's wrappers), as one source file each, since a public top-level type
|
|
4
|
+
* needs its own. A file imports exactly the types its text spells, in google-java-format's order: one block, sorted.
|
|
5
|
+
*/
|
|
6
|
+
import { compareCodeUnits } from "../shared/lang.js";
|
|
7
|
+
import { declares, javaTopLevel } from "./models.js";
|
|
8
|
+
import { codeOf } from "./models-names.js";
|
|
9
|
+
/* every type a model declaration may spell that java.lang does not hold, by its simple name */
|
|
10
|
+
const IMPORTS = {
|
|
11
|
+
DeserializationContext: "tools.jackson.databind.DeserializationContext",
|
|
12
|
+
JsonAnyGetter: "com.fasterxml.jackson.annotation.JsonAnyGetter",
|
|
13
|
+
JsonAnySetter: "com.fasterxml.jackson.annotation.JsonAnySetter",
|
|
14
|
+
JsonCreator: "com.fasterxml.jackson.annotation.JsonCreator",
|
|
15
|
+
JsonDeserialize: "tools.jackson.databind.annotation.JsonDeserialize",
|
|
16
|
+
JsonInclude: "com.fasterxml.jackson.annotation.JsonInclude",
|
|
17
|
+
JsonNode: "tools.jackson.databind.JsonNode",
|
|
18
|
+
JsonParser: "tools.jackson.core.JsonParser",
|
|
19
|
+
JsonProperty: "com.fasterxml.jackson.annotation.JsonProperty",
|
|
20
|
+
JsonValue: "com.fasterxml.jackson.annotation.JsonValue",
|
|
21
|
+
LinkedHashMap: "java.util.LinkedHashMap",
|
|
22
|
+
Map: "java.util.Map",
|
|
23
|
+
StdDeserializer: "tools.jackson.databind.deser.std.StdDeserializer",
|
|
24
|
+
Consumer: "java.util.function.Consumer",
|
|
25
|
+
Duration: "java.time.Duration",
|
|
26
|
+
InputStream: "java.io.InputStream",
|
|
27
|
+
List: "java.util.List",
|
|
28
|
+
Supplier: "java.util.function.Supplier",
|
|
29
|
+
TypeReference: "tools.jackson.core.type.TypeReference",
|
|
30
|
+
};
|
|
31
|
+
/** The import lines `decl` needs, sorted as google-java-format sorts them. */
|
|
32
|
+
export function importsOf(decl) {
|
|
33
|
+
const code = codeOf(decl);
|
|
34
|
+
return Object.entries(IMPORTS)
|
|
35
|
+
.filter(([name]) => new RegExp(`(?<![\\w.])${name}\\b`).test(code))
|
|
36
|
+
.map(([, path]) => `import ${path};`)
|
|
37
|
+
.sort(compareCodeUnits);
|
|
38
|
+
}
|
|
39
|
+
/** One model file's text: the marker, the package, its imports, its declaration. */
|
|
40
|
+
export function sourceOf(marker, packageName, decl) {
|
|
41
|
+
const imports = importsOf(decl);
|
|
42
|
+
const head = imports.length > 0 ? `\n${imports.join("\n")}\n` : "";
|
|
43
|
+
return `${marker}\npackage ${packageName};\n${head}\n${decl}\n`;
|
|
44
|
+
}
|
|
45
|
+
/** The model declarations of `ir` in `ctx`: every component that declares, then what each hoists, the ops' included. */
|
|
46
|
+
export function componentDecls(ir, ctx) {
|
|
47
|
+
const decls = new Map();
|
|
48
|
+
for (const [key, schema] of Object.entries(ir.schemas).sort(([a], [b]) => compareCodeUnits(a, b))) {
|
|
49
|
+
if (!declares(schema))
|
|
50
|
+
continue;
|
|
51
|
+
const name = ctx.names.ref(key);
|
|
52
|
+
decls.set(name, javaTopLevel(name, schema, ctx));
|
|
53
|
+
}
|
|
54
|
+
/* a hoist claims its name from the same scope as the components, so it never repeats one */
|
|
55
|
+
for (const [name, decl] of ctx.decls)
|
|
56
|
+
decls.set(name, decl);
|
|
57
|
+
return decls;
|
|
58
|
+
}
|
|
59
|
+
/** `files` with `path` set to `text`; a second declaration of one path is a generator bug, never an overwrite. */
|
|
60
|
+
export function putFile(files, path, text) {
|
|
61
|
+
if (Object.hasOwn(files, path))
|
|
62
|
+
throw new Error(`two declarations claim ${path}`);
|
|
63
|
+
files[path] = text;
|
|
64
|
+
}
|
|
65
|
+
/** The model files of `decls` under `dir`, in `packageName`, each behind `marker`. */
|
|
66
|
+
export function modelFiles(decls, { dir, marker, packageName }) {
|
|
67
|
+
return Object.fromEntries([...decls].map(([name, decl]) => [`${dir}/${name}.java`, sourceOf(marker, packageName, decl)]));
|
|
68
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One operation's Java text (bit 16 phase c1, C1, C3): its `Operation` constant, its two method overloads
|
|
3
|
+
* `op(Params)` and `op(Params, RequestOptions)`, its call through the runtime's `Exchange`, and its plan. The method
|
|
4
|
+
* answers the type and throws an error status; its twin on the client's `safe()` mirror is sdk-mirror.ts's (bit 21 i6).
|
|
5
|
+
* A body is sent by its declared media type:
|
|
6
|
+
* JSON as the mapper writes it, a form urlencoded, text as its raw bytes, binary as sized bytes or a one-shot stream,
|
|
7
|
+
* multipart as hand-built parts under a `honey-<uuid>` boundary.
|
|
8
|
+
*/
|
|
9
|
+
import type { IRSchema } from "../../ir/model.ts";
|
|
10
|
+
import type { SdkOp } from "../../ir/sdk-model.ts";
|
|
11
|
+
import { type JavaTypeContext } from "./models.ts";
|
|
12
|
+
import { type Expr } from "./layout.ts";
|
|
13
|
+
import { type JavaHeaders } from "./sdk-headers.ts";
|
|
14
|
+
import type { JavaCallPlan } from "./sdk-plan.ts";
|
|
15
|
+
import { type Field } from "./sdk-params.ts";
|
|
16
|
+
/** What an operation's text needs: the type context its types hoist into, and the array test. */
|
|
17
|
+
export type OpEnv = {
|
|
18
|
+
readonly ctx: JavaTypeContext;
|
|
19
|
+
readonly isArray: (schema: IRSchema) => boolean;
|
|
20
|
+
};
|
|
21
|
+
/** One operation's text and plan, before its accessors are known. */
|
|
22
|
+
export type JavaOp = {
|
|
23
|
+
readonly plan: Omit<JavaCallPlan, "accessors">;
|
|
24
|
+
/** the `Operation` constant's name, in the class that calls it */
|
|
25
|
+
readonly constant: string;
|
|
26
|
+
readonly constantLines: string[];
|
|
27
|
+
/** the method's lines, both overloads */
|
|
28
|
+
readonly lines: string[];
|
|
29
|
+
/** the `<Op>Params` record's lines */
|
|
30
|
+
readonly params: string[];
|
|
31
|
+
/** the `<Op>Body` record's name and lines, for a multipart body; null otherwise */
|
|
32
|
+
readonly body: {
|
|
33
|
+
readonly name: string;
|
|
34
|
+
readonly lines: string[];
|
|
35
|
+
} | null;
|
|
36
|
+
/** the multipart helper's lines, for a multipart body; empty otherwise */
|
|
37
|
+
readonly helper: string[];
|
|
38
|
+
/** the `<Op>Headers` holder, for an operation whose 2xx responses declare headers; null otherwise */
|
|
39
|
+
readonly headers: JavaHeaders | null;
|
|
40
|
+
};
|
|
41
|
+
/** A method's javadoc paragraphs: the operation's id, then its summary and description, as the other SDKs carry them. */
|
|
42
|
+
export declare const paragraphsOf: (op: SdkOp) => string[];
|
|
43
|
+
/** The constant's name for a method: its words upper-cased, `_OPERATION` after them. */
|
|
44
|
+
export declare const constantOf: (method: string) => string;
|
|
45
|
+
/** The answer's Java type and its reader on `answer`, for each response kind. */
|
|
46
|
+
export declare function answerOf(op: SdkOp, env: OpEnv): {
|
|
47
|
+
readonly reader: Expr;
|
|
48
|
+
readonly type: string;
|
|
49
|
+
};
|
|
50
|
+
/** One method's name, its fields, and the holder of its response headers when it declares any. */
|
|
51
|
+
export type MethodSite = {
|
|
52
|
+
readonly name: string;
|
|
53
|
+
readonly fields: readonly Field[];
|
|
54
|
+
readonly headers: JavaHeaders | null;
|
|
55
|
+
};
|
|
56
|
+
/** One operation's text and plan, with its accessors left to the resource tree. */
|
|
57
|
+
export declare function javaOp(op: SdkOp, name: string, env: OpEnv): JavaOp;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { javaString } from "../shared/escape.js";
|
|
2
|
+
import { snakeWords } from "../shared/lang.js";
|
|
3
|
+
import { javaTypeOf } from "./models.js";
|
|
4
|
+
import { array, call, exprStmt, field, lit, local, methodHeader, param, newOf, returnStmt, statement, } from "./layout.js";
|
|
5
|
+
import { docParagraphs } from "./sdk-decl.js";
|
|
6
|
+
import { javaResponseHeaders } from "./sdk-headers.js";
|
|
7
|
+
import { MAX_RECONNECT_ATTEMPTS, RECONNECT_DELAY, realtimeMethodLines } from "./realtime.js";
|
|
8
|
+
import { CURSOR, sseMethodLines } from "./sse.js";
|
|
9
|
+
import { PROTOCOLS, TOKEN, wsMethodLines } from "./ws.js";
|
|
10
|
+
import { multipartHelper, multipartRecordLines, paramsRecord } from "./sdk-record.js";
|
|
11
|
+
import { fieldsOf, multipartRecord, paramsName } from "./sdk-params.js";
|
|
12
|
+
const UNKNOWN = { kind: "unknown" };
|
|
13
|
+
/** A method's javadoc paragraphs: the operation's id, then its summary and description, as the other SDKs carry them. */
|
|
14
|
+
export const paragraphsOf = (op) => [op.id, op.summary, op.description].filter((text) => text !== "");
|
|
15
|
+
/** The constant's name for a method: its words upper-cased, `_OPERATION` after them. */
|
|
16
|
+
export const constantOf = (method) => `${snakeWords(method).toUpperCase()}_OPERATION`;
|
|
17
|
+
/** The answer's Java type and its reader on `answer`, for each response kind. */
|
|
18
|
+
export function answerOf(op, env) {
|
|
19
|
+
const kind = op.success.kind;
|
|
20
|
+
if (kind === "json") {
|
|
21
|
+
const schema = op.success.schema ?? UNKNOWN;
|
|
22
|
+
const type = javaTypeOf(schema, { ...env.ctx, fieldName: "Response", parentName: op.id });
|
|
23
|
+
return { reader: call("answer", "json", [newOf(`TypeReference<${type}>`, [], true)]), type };
|
|
24
|
+
}
|
|
25
|
+
if (kind === "text")
|
|
26
|
+
return { reader: call("answer", "text"), type: "String" };
|
|
27
|
+
if (kind === "binary")
|
|
28
|
+
return { reader: call("answer", "bytes"), type: "byte[]" };
|
|
29
|
+
return { reader: call("answer", "none"), type: "void" };
|
|
30
|
+
}
|
|
31
|
+
/** The `Accept` an operation asks for: a text or binary answer's media type. */
|
|
32
|
+
function acceptOf(op) {
|
|
33
|
+
if (op.stream === "sse")
|
|
34
|
+
return "text/event-stream";
|
|
35
|
+
const kind = op.success.kind;
|
|
36
|
+
return kind === "binary" || kind === "text" ? op.success.contentType : undefined;
|
|
37
|
+
}
|
|
38
|
+
/** One body's expression over the params record's `body` component. */
|
|
39
|
+
function bodyExpr(op) {
|
|
40
|
+
const body = op.body;
|
|
41
|
+
if (body === undefined)
|
|
42
|
+
return lit("null");
|
|
43
|
+
const value = call("params", "body");
|
|
44
|
+
if (body.kind === "form")
|
|
45
|
+
return call("Body", "form", [value]);
|
|
46
|
+
if (body.kind === "multipart")
|
|
47
|
+
return call(null, "multipart", [value]);
|
|
48
|
+
return call("Body", body.kind, [value, javaString(body.contentType)]);
|
|
49
|
+
}
|
|
50
|
+
/** `Type name = init;`, a local at the method body's indent. */
|
|
51
|
+
const declared = (type, name, init) => statement(4, local({ init, name, type }));
|
|
52
|
+
/** One query or header param's `Call.Arg`; the cursor's sends nothing when it is unset or empty. */
|
|
53
|
+
const arg = (f) => call("Call.Arg", f.where === "cursor" || f.where === "token" ? "cursor" : "of", [
|
|
54
|
+
javaString(f.name),
|
|
55
|
+
call("params", f.field),
|
|
56
|
+
]);
|
|
57
|
+
/** One `List<Call.Arg>` local of `items`, as its own statement. */
|
|
58
|
+
const list = (name, items) => declared("List<Call.Arg>", name, call("List", "of", items));
|
|
59
|
+
/** The lines that build the `Call`: its path array, its query and header lists, its body, each as its own statement. */
|
|
60
|
+
function callLines(fields, op) {
|
|
61
|
+
const path = fields.filter((f) => f.where === "path").map((f) => call("params", f.field));
|
|
62
|
+
const query = fields.filter((f) => f.where === "query" || f.where === "token").map(arg);
|
|
63
|
+
const headers = fields.filter((f) => f.where === "header" || f.where === "key" || f.where === "cursor").map(arg);
|
|
64
|
+
return [
|
|
65
|
+
...declared("String[]", "path", array(null, path)),
|
|
66
|
+
...list("query", query),
|
|
67
|
+
...list("headers", headers),
|
|
68
|
+
...declared("Body", "body", bodyExpr(op)),
|
|
69
|
+
...declared("Call", "call", newOf("Call", ["path", "query", "headers", "body"])),
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
/** A stream operation's method lines (SSE, WebSocket or realtime), each kind's own emitter; null for a plain call. */
|
|
73
|
+
function streamMethodLines(op, site, env) {
|
|
74
|
+
if (op.stream === null)
|
|
75
|
+
return null;
|
|
76
|
+
const { fields, headers, name } = site;
|
|
77
|
+
const constant = constantOf(name);
|
|
78
|
+
const params = paramsName(op, env.ctx);
|
|
79
|
+
const lines = callLines(fields, op);
|
|
80
|
+
if (op.stream === "sse")
|
|
81
|
+
return sseMethodLines(op, { call: lines, constant, headers, name, params }, env.ctx);
|
|
82
|
+
if (op.stream === "ws")
|
|
83
|
+
return wsMethodLines(op, { call: lines, constant, name, params });
|
|
84
|
+
return realtimeMethodLines(op, { call: lines, constant, name, params }, env.ctx);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The method's lines: `op(params)` and `op(params, options)` for every operation. An operation with response headers
|
|
88
|
+
* adds `op(params, headersInto, options)`, which fills `headersInto` from a 2xx before it reads the answer (null: none);
|
|
89
|
+
* its two shorter overloads delegate to it.
|
|
90
|
+
*/
|
|
91
|
+
function methodLines(op, site, env) {
|
|
92
|
+
const streamed = streamMethodLines(op, site, env);
|
|
93
|
+
if (streamed !== null)
|
|
94
|
+
return streamed;
|
|
95
|
+
const { fields, headers, name } = site;
|
|
96
|
+
const constant = constantOf(name);
|
|
97
|
+
const answer = answerOf(op, env);
|
|
98
|
+
const returns = answer.type;
|
|
99
|
+
const params = paramsName(op, env.ctx);
|
|
100
|
+
/* `return value;`, or the statement alone for no answer */
|
|
101
|
+
const ret = (value) => statement(4, returns === "void" ? exprStmt(value) : returnStmt(value));
|
|
102
|
+
const delegate = (args) => ret(call(null, name, args));
|
|
103
|
+
const fill = headers === null
|
|
104
|
+
? []
|
|
105
|
+
: [
|
|
106
|
+
" if (headersInto != null && answer.error() == null) {",
|
|
107
|
+
" headersInto.read(answer.raw().headers());",
|
|
108
|
+
" }",
|
|
109
|
+
];
|
|
110
|
+
const body = [
|
|
111
|
+
...callLines(fields, op),
|
|
112
|
+
...declared("Answer", "answer", call("exchange", "run", [constant, "call", "options"])),
|
|
113
|
+
...fill,
|
|
114
|
+
...ret(answer.reader),
|
|
115
|
+
];
|
|
116
|
+
const shorter = headers === null ? body : delegate(["params", "null", "options"]);
|
|
117
|
+
const signature = (args) => methodHeader(2, { modifiers: ["public"], name, params: args, returns });
|
|
118
|
+
return [
|
|
119
|
+
docParagraphs(paragraphsOf(op)),
|
|
120
|
+
...signature([param(params, "params")]),
|
|
121
|
+
...delegate(headers === null ? ["params", "null"] : ["params", "null", "null"]),
|
|
122
|
+
" }",
|
|
123
|
+
"",
|
|
124
|
+
docParagraphs(paragraphsOf(op)),
|
|
125
|
+
...signature([param(params, "params"), param("RequestOptions", "options")]),
|
|
126
|
+
...shorter,
|
|
127
|
+
" }",
|
|
128
|
+
"",
|
|
129
|
+
...(headers === null
|
|
130
|
+
? []
|
|
131
|
+
: [
|
|
132
|
+
docParagraphs(paragraphsOf(op)),
|
|
133
|
+
...signature([
|
|
134
|
+
param(params, "params"),
|
|
135
|
+
param(headers.type, "headersInto"),
|
|
136
|
+
param("RequestOptions", "options"),
|
|
137
|
+
]),
|
|
138
|
+
...body,
|
|
139
|
+
" }",
|
|
140
|
+
"",
|
|
141
|
+
]),
|
|
142
|
+
];
|
|
143
|
+
}
|
|
144
|
+
/** The `Operation` constant: the method, the path template, the path params in path order, accept and idempotence. */
|
|
145
|
+
function constantLines(op, constant) {
|
|
146
|
+
const names = op.pathSegments.flatMap((segment) => (segment.kind === "param" ? [segment.name] : []));
|
|
147
|
+
const accept = acceptOf(op);
|
|
148
|
+
const items = [
|
|
149
|
+
javaString(op.method),
|
|
150
|
+
javaString(op.path),
|
|
151
|
+
array("String[]", names.map((n) => javaString(n))),
|
|
152
|
+
accept === undefined ? "null" : javaString(accept),
|
|
153
|
+
op.idempotent ? "true" : "false",
|
|
154
|
+
...(op.invalidates.length === 0
|
|
155
|
+
? []
|
|
156
|
+
: [
|
|
157
|
+
array("String[]", op.invalidates.map((target) => javaString(target))),
|
|
158
|
+
]),
|
|
159
|
+
];
|
|
160
|
+
return field(2, {
|
|
161
|
+
init: newOf("Operation", items),
|
|
162
|
+
modifiers: ["private", "static", "final"],
|
|
163
|
+
name: constant,
|
|
164
|
+
type: "Operation",
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* A stream's own fields as the plan names them: SSE's cursor, a socket's protocols and token, a realtime op's five;
|
|
169
|
+
* null where absent.
|
|
170
|
+
*/
|
|
171
|
+
const streamPlan = (fields) => {
|
|
172
|
+
const named = (where) => fields.find((f) => f.where === where)?.field ?? null;
|
|
173
|
+
const own = (name) => fields.find((f) => f.where === "realtime" && f.name === name)?.field ?? null;
|
|
174
|
+
return {
|
|
175
|
+
lastEventId: named("cursor") ?? own(CURSOR),
|
|
176
|
+
maxReconnectAttempts: own(MAX_RECONNECT_ATTEMPTS),
|
|
177
|
+
protocols: named("protocols") ?? own(PROTOCOLS),
|
|
178
|
+
reconnectDelay: own(RECONNECT_DELAY),
|
|
179
|
+
reconnectToken: named("token") ?? own(TOKEN),
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
/** One operation's text and plan, with its accessors left to the resource tree. */
|
|
183
|
+
export function javaOp(op, name, env) {
|
|
184
|
+
const fields = fieldsOf(op, env.ctx);
|
|
185
|
+
const headers = javaResponseHeaders(op, env);
|
|
186
|
+
const constant = constantOf(name);
|
|
187
|
+
const multipart = op.body?.kind === "multipart" ? multipartRecord(op, op.body.parts, env.ctx, env.isArray) : null;
|
|
188
|
+
const plan = {
|
|
189
|
+
body: op.body === undefined ? null : { kind: op.body.kind, param: "body" },
|
|
190
|
+
headers: Object.fromEntries(fields.filter((f) => f.where === "header").map((f) => [f.name, f.field])),
|
|
191
|
+
idempotencyKey: fields.find((f) => f.where === "key")?.field ?? null,
|
|
192
|
+
...streamPlan(fields),
|
|
193
|
+
method: name,
|
|
194
|
+
operation: op.id,
|
|
195
|
+
options: true,
|
|
196
|
+
params: paramsName(op, env.ctx),
|
|
197
|
+
path: fields.filter((f) => f.where === "path").map((f) => ({ name: f.name, param: f.field })),
|
|
198
|
+
query: Object.fromEntries(fields.filter((f) => f.where === "query").map((f) => [f.name, f.field])),
|
|
199
|
+
required: fields.filter((f) => f.required).map((f) => f.field),
|
|
200
|
+
response: op.success.kind,
|
|
201
|
+
responseHeaders: headers === null ? null : { fields: headers.fields, type: headers.type },
|
|
202
|
+
stream: op.stream ?? null,
|
|
203
|
+
};
|
|
204
|
+
return {
|
|
205
|
+
body: multipart === null
|
|
206
|
+
? null
|
|
207
|
+
: { lines: multipartRecordLines(multipart.name, op.id, multipart.components), name: multipart.name },
|
|
208
|
+
headers,
|
|
209
|
+
helper: multipartHelper(op, env),
|
|
210
|
+
constant,
|
|
211
|
+
constantLines: constantLines(op, constant),
|
|
212
|
+
lines: methodLines(op, { fields, headers, name }, env),
|
|
213
|
+
params: paramsRecord(paramsName(op, env.ctx), op.id, fields),
|
|
214
|
+
plan,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An operation's `<Op>Params` record and its builder (bit 16 phase c1, C3): one record field per path, body, query and
|
|
3
|
+
* header param, then the idempotency key; the builder has exactly one setter per field, and `build()` refuses a required
|
|
4
|
+
* field left unset. A multipart body is a record of its own, `<Op>Body`, one component per part (C#'s parity).
|
|
5
|
+
*/
|
|
6
|
+
import type { IRMultipartPart, IRSchema } from "../../ir/model.ts";
|
|
7
|
+
import type { SdkOp } from "../../ir/sdk-model.ts";
|
|
8
|
+
import { type JavaTypeContext } from "./models.ts";
|
|
9
|
+
/** One record field: its spec name, its Java identifier and type, where it goes, and whether it is required. */
|
|
10
|
+
export type Field = {
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly field: string;
|
|
13
|
+
readonly type: string;
|
|
14
|
+
readonly where: "path" | "body" | "query" | "header" | "key" | "cursor" | "protocols" | "token" | "realtime";
|
|
15
|
+
readonly required: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The record's fields in order: path params in path order, the body, the query, the headers, then the key, or an SSE
|
|
19
|
+
* operation's cursor (J7): it holds its name first, so a param spelled the same claims `…2`, and a declared
|
|
20
|
+
* Last-Event-ID header folds into it. A stream takes no idempotency key.
|
|
21
|
+
*/
|
|
22
|
+
export declare function fieldsOf(op: SdkOp, ctx: JavaTypeContext): Field[];
|
|
23
|
+
/**
|
|
24
|
+
* The operation's own `<Op><Kind>` type, claimed from the model scope after the components (C#'s order), so a component
|
|
25
|
+
* spelled the same keeps its name and this one is `…2`; one operation and kind, one name.
|
|
26
|
+
*/
|
|
27
|
+
export declare const opTypeName: (op: SdkOp, kind: "Body" | "Headers" | "Params", ctx: JavaTypeContext) => string;
|
|
28
|
+
/** The record's name: `<Op>Params`. */
|
|
29
|
+
export declare const paramsName: (op: SdkOp, ctx: JavaTypeContext) => string;
|
|
30
|
+
/** Each multipart part as a record component: a file's `FilePart` or a list of them, a text part's type. */
|
|
31
|
+
export declare function multipartRecord(op: SdkOp, parts: readonly IRMultipartPart[], ctx: JavaTypeContext, isArray: (s: IRSchema) => boolean): {
|
|
32
|
+
components: {
|
|
33
|
+
field: string;
|
|
34
|
+
name: string;
|
|
35
|
+
type: string;
|
|
36
|
+
}[];
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { compareCodeUnits, javaIdentifier, javaTypeName, NameScope } from "../shared/lang.js";
|
|
2
|
+
import { javaTypeOf } from "./models.js";
|
|
3
|
+
import { CURSOR, isLastEventIdHeader, LAST_EVENT_ID } from "./sse.js";
|
|
4
|
+
import { carriesRealtime, REALTIME_FIELDS } from "./realtime.js";
|
|
5
|
+
import { isReconnectTokenQuery, PROTOCOLS, RECONNECT_TOKEN, TOKEN } from "./ws.js";
|
|
6
|
+
/** The record's own members, which a component may not take (`builder()` is static). */
|
|
7
|
+
const RECORD_RESERVED = ["builder", "equals", "hashCode", "toString"];
|
|
8
|
+
/** The idempotency header's spec name: a declared one is the key field itself. */
|
|
9
|
+
const KEY_HEADER = "Idempotency-Key";
|
|
10
|
+
/** A type's text at the param named `name` of `op`. */
|
|
11
|
+
const typeAt = (schema, op, name, ctx) => javaTypeOf(schema, { ...ctx, fieldName: name, parentName: op.id });
|
|
12
|
+
/** Whether a declared param is a stream field's resume channel, which folds into that field (J7, K2, R8). */
|
|
13
|
+
function folds(op, name, where) {
|
|
14
|
+
if (op.stream === "realtime")
|
|
15
|
+
return carriesRealtime(name, where);
|
|
16
|
+
return where === "query"
|
|
17
|
+
? op.stream === "ws" && isReconnectTokenQuery(name)
|
|
18
|
+
: op.stream === "sse" && isLastEventIdHeader(name);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The record's fields in order: path params in path order, the body, the query, the headers, then the key, or an SSE
|
|
22
|
+
* operation's cursor (J7): it holds its name first, so a param spelled the same claims `…2`, and a declared
|
|
23
|
+
* Last-Event-ID header folds into it. A stream takes no idempotency key.
|
|
24
|
+
*/
|
|
25
|
+
export function fieldsOf(op, ctx) {
|
|
26
|
+
const own = streamFields(op);
|
|
27
|
+
const scope = new NameScope([...RECORD_RESERVED, ...own.map((f) => f.field)]);
|
|
28
|
+
const segments = op.pathSegments.flatMap((segment) => (segment.kind === "param" ? [segment.name] : []));
|
|
29
|
+
const path = segments.flatMap((name) => op.pathParams.filter((p) => p.name === name));
|
|
30
|
+
const query = [...op.query]
|
|
31
|
+
.filter((param) => !folds(op, param.name, "query"))
|
|
32
|
+
.sort((a, b) => compareCodeUnits(a.name, b.name));
|
|
33
|
+
const headers = [...op.headers]
|
|
34
|
+
.filter((param) => !folds(op, param.name, "header"))
|
|
35
|
+
.sort((a, b) => compareCodeUnits(a.name, b.name));
|
|
36
|
+
const fields = [];
|
|
37
|
+
for (const param of path) {
|
|
38
|
+
fields.push({
|
|
39
|
+
field: scope.claim(javaIdentifier(param.name)),
|
|
40
|
+
name: param.name,
|
|
41
|
+
required: true,
|
|
42
|
+
type: "String",
|
|
43
|
+
where: "path",
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
const body = op.body;
|
|
47
|
+
if (body !== undefined) {
|
|
48
|
+
const type = bodyType(body, op, ctx);
|
|
49
|
+
fields.push({ field: scope.claim("body"), name: "body", required: body.required, type, where: "body" });
|
|
50
|
+
}
|
|
51
|
+
for (const param of query) {
|
|
52
|
+
const type = typeAt(param.schema, op, param.name, ctx);
|
|
53
|
+
fields.push({
|
|
54
|
+
field: scope.claim(javaIdentifier(param.name)),
|
|
55
|
+
name: param.name,
|
|
56
|
+
required: param.required === true,
|
|
57
|
+
type,
|
|
58
|
+
where: "query",
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
for (const param of headers) {
|
|
62
|
+
const type = typeAt(param.schema, op, param.name, ctx);
|
|
63
|
+
fields.push({
|
|
64
|
+
field: scope.claim(javaIdentifier(param.name)),
|
|
65
|
+
name: param.name,
|
|
66
|
+
required: param.required === true,
|
|
67
|
+
type,
|
|
68
|
+
where: "header",
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const declared = headers.some((param) => param.name.toLowerCase() === KEY_HEADER.toLowerCase());
|
|
72
|
+
fields.push(...own);
|
|
73
|
+
if (op.idempotent && !declared && op.stream === null) {
|
|
74
|
+
fields.push({
|
|
75
|
+
field: scope.claim("idempotencyKey"),
|
|
76
|
+
name: KEY_HEADER,
|
|
77
|
+
required: false,
|
|
78
|
+
type: "String",
|
|
79
|
+
where: "key",
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return fields;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A stream's own fields, after the declared ones: SSE's cursor (J7), a socket's protocols and token (K2), a realtime
|
|
86
|
+
* op's cursor, protocols and reconnect policy (R8), which the runtime puts on each dial rather than the Call.
|
|
87
|
+
*/
|
|
88
|
+
function streamFields(op) {
|
|
89
|
+
if (op.stream === "sse")
|
|
90
|
+
return [{ field: CURSOR, name: LAST_EVENT_ID, required: false, type: "String", where: "cursor" }];
|
|
91
|
+
if (op.stream === "realtime")
|
|
92
|
+
return REALTIME_FIELDS.map((f) => ({
|
|
93
|
+
field: f.field,
|
|
94
|
+
name: f.field,
|
|
95
|
+
required: false,
|
|
96
|
+
type: f.type,
|
|
97
|
+
where: "realtime",
|
|
98
|
+
}));
|
|
99
|
+
if (op.stream !== "ws")
|
|
100
|
+
return [];
|
|
101
|
+
return [
|
|
102
|
+
{ field: PROTOCOLS, name: PROTOCOLS, required: false, type: "List<String>", where: "protocols" },
|
|
103
|
+
{ field: TOKEN, name: RECONNECT_TOKEN, required: false, type: "String", where: "token" },
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
/** A body's Java type: a schema's, `String` for text, `BinaryBody` for binary, `<Op>Body` for multipart. */
|
|
107
|
+
function bodyType(body, op, ctx) {
|
|
108
|
+
if (body.kind === "json" || body.kind === "form")
|
|
109
|
+
return typeAt(body.schema, op, "Body", ctx);
|
|
110
|
+
if (body.kind === "text")
|
|
111
|
+
return "String";
|
|
112
|
+
if (body.kind === "binary")
|
|
113
|
+
return "BinaryBody";
|
|
114
|
+
return opTypeName(op, "Body", ctx);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The operation's own `<Op><Kind>` type, claimed from the model scope after the components (C#'s order), so a component
|
|
118
|
+
* spelled the same keeps its name and this one is `…2`; one operation and kind, one name.
|
|
119
|
+
*/
|
|
120
|
+
export const opTypeName = (op, kind, ctx) => ctx.names.hoist(`op:${op.id}:${kind}`, `${javaTypeName(op.id)}${kind}`);
|
|
121
|
+
/** The record's name: `<Op>Params`. */
|
|
122
|
+
export const paramsName = (op, ctx) => opTypeName(op, "Params", ctx);
|
|
123
|
+
/** Each multipart part as a record component: a file's `FilePart` or a list of them, a text part's type. */
|
|
124
|
+
export function multipartRecord(op, parts, ctx, isArray) {
|
|
125
|
+
const scope = new NameScope(["equals", "hashCode", "toString"]);
|
|
126
|
+
const sorted = [...parts].sort((a, b) => compareCodeUnits(a.name, b.name));
|
|
127
|
+
const components = sorted.map((part) => {
|
|
128
|
+
const schema = part.schema;
|
|
129
|
+
const type = part.type === "file" ? (isArray(schema) ? "List<FilePart>" : "FilePart") : typeAt(schema, op, part.name, ctx);
|
|
130
|
+
return { field: scope.claim(javaIdentifier(part.name)), name: part.name, type };
|
|
131
|
+
});
|
|
132
|
+
return { components, name: opTypeName(op, "Body", ctx) };
|
|
133
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Java SDK's call plan for one operation (bit 16 phase c1, C1): the names a fixed reflection driver walks, the
|
|
3
|
+
* same shape as the C# plan (`csharp/sdk-plan.ts`), so the driver binds each argument through the operation's
|
|
4
|
+
* `<Op>Params` builder by its field name and never re-derives a name. A plan carries no Java type.
|
|
5
|
+
*/
|
|
6
|
+
import type { SdkBody, SdkResponseKind, SdkStream } from "../../ir/sdk-model.ts";
|
|
7
|
+
export type JavaCallPlan = {
|
|
8
|
+
readonly operation: string;
|
|
9
|
+
/** the accessor names from the client to the operation's resource, root first: `["users"]` */
|
|
10
|
+
readonly accessors: readonly string[];
|
|
11
|
+
/** the method as emitted: `"get"` */
|
|
12
|
+
readonly method: string;
|
|
13
|
+
/** the `<Op>Params` class the method takes */
|
|
14
|
+
readonly params: string;
|
|
15
|
+
/** each path param's spec name to its record field, in path order */
|
|
16
|
+
readonly path: readonly {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly param: string;
|
|
19
|
+
}[];
|
|
20
|
+
/** the body's kind and its record field; null without a body */
|
|
21
|
+
readonly body: {
|
|
22
|
+
readonly kind: SdkBody["kind"];
|
|
23
|
+
readonly param: string;
|
|
24
|
+
} | null;
|
|
25
|
+
/** each query param's spec name to its record field */
|
|
26
|
+
readonly query: Readonly<Record<string, string>>;
|
|
27
|
+
/** each declared header param's spec name to its record field; the idempotency key is `idempotencyKey`'s (C#'s plan) */
|
|
28
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
29
|
+
/** the record fields a builder must set */
|
|
30
|
+
readonly required: readonly string[];
|
|
31
|
+
/** the idempotency key's record field; null when the operation is not keyed (a stream never is) */
|
|
32
|
+
readonly idempotencyKey: string | null;
|
|
33
|
+
/** an SSE or realtime operation's cursor field, sent as Last-Event-ID (realtime: also last_event_id); null otherwise */
|
|
34
|
+
readonly lastEventId: string | null;
|
|
35
|
+
/** a WebSocket or realtime operation's subprotocols field; null for any other operation */
|
|
36
|
+
readonly protocols: string | null;
|
|
37
|
+
/** a WebSocket or realtime operation's resume token field, sent as reconnect_token; null for any other operation */
|
|
38
|
+
readonly reconnectToken: string | null;
|
|
39
|
+
/** a realtime operation's reconnect budget field; null for any other operation */
|
|
40
|
+
readonly maxReconnectAttempts: string | null;
|
|
41
|
+
/** a realtime operation's reconnect delay field (a Duration); null for any other operation */
|
|
42
|
+
readonly reconnectDelay: string | null;
|
|
43
|
+
readonly response: SdkResponseKind;
|
|
44
|
+
/** the `<Op>Headers` holder the method takes as `headersInto`, each declared header to its accessor; null without one */
|
|
45
|
+
readonly responseHeaders: {
|
|
46
|
+
readonly type: string;
|
|
47
|
+
readonly fields: Readonly<Record<string, string>>;
|
|
48
|
+
} | null;
|
|
49
|
+
/** the method has a `RequestOptions` overload; every method does */
|
|
50
|
+
readonly options: true;
|
|
51
|
+
readonly stream: SdkStream;
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Java record text (bit 16 phase c1, C3): an operation's `<Op>Params` record with its builder, one setter per field,
|
|
3
|
+
* `build()` refusing a required field left unset; and a multipart body's `<Op>Body` record, one component per part.
|
|
4
|
+
*/
|
|
5
|
+
import type { SdkOp } from "../../ir/sdk-model.ts";
|
|
6
|
+
import type { OpEnv } from "./sdk-op.ts";
|
|
7
|
+
import { type Field } from "./sdk-params.ts";
|
|
8
|
+
/** `<Op>Params`: the record over `fields`, its static `builder()`, and the builder's setters and `build()`. */
|
|
9
|
+
export declare function paramsRecord(name: string, id: string, fields: readonly Field[]): string[];
|
|
10
|
+
/** `<Op>Body`: the multipart body record, one component per part, typed as its `Part` (`FilePart`, a list or text). */
|
|
11
|
+
export declare function multipartRecordLines(name: string, id: string, components: readonly {
|
|
12
|
+
field: string;
|
|
13
|
+
type: string;
|
|
14
|
+
}[]): string[];
|
|
15
|
+
/** The `multipart` helper of a multipart body: null without a body, else the parts, one per component, in order. */
|
|
16
|
+
export declare function multipartHelper(op: SdkOp, env: OpEnv): string[];
|