@wirebench/engine 2.1.1
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 +201 -0
- package/README.md +3 -0
- package/dist/assert/contract.d.ts +3 -0
- package/dist/assert/contract.js +17 -0
- package/dist/assert/index.d.ts +4 -0
- package/dist/assert/index.js +27 -0
- package/dist/assert/match.d.ts +3 -0
- package/dist/assert/match.js +58 -0
- package/dist/assert/model.d.ts +73 -0
- package/dist/assert/model.js +8 -0
- package/dist/assert/schema.d.ts +34 -0
- package/dist/assert/schema.js +46 -0
- package/dist/assert/sla.d.ts +3 -0
- package/dist/assert/sla.js +8 -0
- package/dist/assert/soap-fault.d.ts +3 -0
- package/dist/assert/soap-fault.js +20 -0
- package/dist/assert/status.d.ts +3 -0
- package/dist/assert/status.js +14 -0
- package/dist/errors.d.ts +77 -0
- package/dist/errors.js +121 -0
- package/dist/fs.d.ts +35 -0
- package/dist/fs.js +64 -0
- package/dist/generate.d.ts +12 -0
- package/dist/generate.js +14 -0
- package/dist/grpc/browser.d.ts +11 -0
- package/dist/grpc/browser.js +9 -0
- package/dist/grpc/cache.d.ts +113 -0
- package/dist/grpc/cache.js +244 -0
- package/dist/grpc/call.d.ts +64 -0
- package/dist/grpc/call.js +72 -0
- package/dist/grpc/codec.d.ts +29 -0
- package/dist/grpc/codec.js +416 -0
- package/dist/grpc/command.d.ts +23 -0
- package/dist/grpc/command.js +91 -0
- package/dist/grpc/expand.d.ts +25 -0
- package/dist/grpc/expand.js +52 -0
- package/dist/grpc/framing.d.ts +28 -0
- package/dist/grpc/framing.js +61 -0
- package/dist/grpc/import.d.ts +47 -0
- package/dist/grpc/import.js +88 -0
- package/dist/grpc/model.d.ts +179 -0
- package/dist/grpc/model.js +91 -0
- package/dist/grpc/proto/describe.d.ts +92 -0
- package/dist/grpc/proto/describe.js +205 -0
- package/dist/grpc/proto/load.d.ts +35 -0
- package/dist/grpc/proto/load.js +112 -0
- package/dist/grpc/proto/sample.d.ts +21 -0
- package/dist/grpc/proto/sample.js +79 -0
- package/dist/grpc/proto/well-known.d.ts +42 -0
- package/dist/grpc/proto/well-known.js +143 -0
- package/dist/grpc/reconcile.d.ts +42 -0
- package/dist/grpc/reconcile.js +153 -0
- package/dist/grpc/reflection/client.d.ts +70 -0
- package/dist/grpc/reflection/client.js +197 -0
- package/dist/grpc/reflection/descriptors.d.ts +69 -0
- package/dist/grpc/reflection/descriptors.js +140 -0
- package/dist/grpc/reflection/proto.d.ts +33 -0
- package/dist/grpc/reflection/proto.js +144 -0
- package/dist/grpc/send.d.ts +132 -0
- package/dist/grpc/send.js +435 -0
- package/dist/grpc/shape.d.ts +29 -0
- package/dist/grpc/shape.js +36 -0
- package/dist/grpc/status.d.ts +21 -0
- package/dist/grpc/status.js +62 -0
- package/dist/grpc/target.d.ts +21 -0
- package/dist/grpc/target.js +66 -0
- package/dist/http/auth/apply.d.ts +37 -0
- package/dist/http/auth/apply.js +74 -0
- package/dist/http/auth/basic.d.ts +36 -0
- package/dist/http/auth/basic.js +69 -0
- package/dist/http/auth/md4.d.ts +13 -0
- package/dist/http/auth/md4.js +81 -0
- package/dist/http/auth/ntlm-transport.d.ts +61 -0
- package/dist/http/auth/ntlm-transport.js +97 -0
- package/dist/http/auth/ntlm.d.ts +190 -0
- package/dist/http/auth/ntlm.js +377 -0
- package/dist/http/client.d.ts +73 -0
- package/dist/http/client.js +403 -0
- package/dist/http/curl-flags.d.ts +15 -0
- package/dist/http/curl-flags.js +95 -0
- package/dist/http/curl.d.ts +94 -0
- package/dist/http/curl.js +245 -0
- package/dist/http/decompress.d.ts +7 -0
- package/dist/http/decompress.js +22 -0
- package/dist/http/errors.d.ts +22 -0
- package/dist/http/errors.js +144 -0
- package/dist/http/failed-request.d.ts +27 -0
- package/dist/http/failed-request.js +48 -0
- package/dist/http/headers.d.ts +15 -0
- package/dist/http/headers.js +50 -0
- package/dist/http/heredoc.d.ts +25 -0
- package/dist/http/heredoc.js +74 -0
- package/dist/http/proxy.d.ts +103 -0
- package/dist/http/proxy.js +168 -0
- package/dist/http/raw-capture.d.ts +23 -0
- package/dist/http/raw-capture.js +57 -0
- package/dist/http/timings.d.ts +79 -0
- package/dist/http/timings.js +212 -0
- package/dist/http/tls.d.ts +111 -0
- package/dist/http/tls.js +167 -0
- package/dist/http/types.d.ts +125 -0
- package/dist/http/types.js +6 -0
- package/dist/import-detect.d.ts +26 -0
- package/dist/import-detect.js +169 -0
- package/dist/import.d.ts +20 -0
- package/dist/import.js +163 -0
- package/dist/index.d.ts +272 -0
- package/dist/index.js +157 -0
- package/dist/json/cursor.d.ts +43 -0
- package/dist/json/cursor.js +168 -0
- package/dist/operations.d.ts +12 -0
- package/dist/operations.js +52 -0
- package/dist/project/attachments-cache.d.ts +80 -0
- package/dist/project/attachments-cache.js +186 -0
- package/dist/project/endpoints.d.ts +23 -0
- package/dist/project/endpoints.js +47 -0
- package/dist/project/environments.d.ts +68 -0
- package/dist/project/environments.js +124 -0
- package/dist/project/fs.d.ts +45 -0
- package/dist/project/fs.js +78 -0
- package/dist/project/history.d.ts +171 -0
- package/dist/project/history.js +179 -0
- package/dist/project/keystores.d.ts +24 -0
- package/dist/project/keystores.js +66 -0
- package/dist/project/load.d.ts +44 -0
- package/dist/project/load.js +634 -0
- package/dist/project/migrate.d.ts +27 -0
- package/dist/project/migrate.js +46 -0
- package/dist/project/model.d.ts +401 -0
- package/dist/project/model.js +126 -0
- package/dist/project/paths.d.ts +134 -0
- package/dist/project/paths.js +259 -0
- package/dist/project/preferences.d.ts +318 -0
- package/dist/project/preferences.js +239 -0
- package/dist/project/properties.d.ts +97 -0
- package/dist/project/properties.js +356 -0
- package/dist/project/save.d.ts +65 -0
- package/dist/project/save.js +295 -0
- package/dist/project/schema.d.ts +1329 -0
- package/dist/project/schema.js +737 -0
- package/dist/project/serialize.d.ts +42 -0
- package/dist/project/serialize.js +385 -0
- package/dist/project/wss-configs.d.ts +40 -0
- package/dist/project/wss-configs.js +142 -0
- package/dist/project/yaml.d.ts +17 -0
- package/dist/project/yaml.js +39 -0
- package/dist/redact/index.d.ts +77 -0
- package/dist/redact/index.js +328 -0
- package/dist/redact/literal.d.ts +12 -0
- package/dist/redact/literal.js +68 -0
- package/dist/rest/auth.d.ts +53 -0
- package/dist/rest/auth.js +80 -0
- package/dist/rest/body.d.ts +61 -0
- package/dist/rest/body.js +184 -0
- package/dist/rest/browser.d.ts +12 -0
- package/dist/rest/browser.js +11 -0
- package/dist/rest/cookies.d.ts +41 -0
- package/dist/rest/cookies.js +102 -0
- package/dist/rest/curl.d.ts +75 -0
- package/dist/rest/curl.js +417 -0
- package/dist/rest/expand.d.ts +35 -0
- package/dist/rest/expand.js +104 -0
- package/dist/rest/model.d.ts +247 -0
- package/dist/rest/model.js +118 -0
- package/dist/rest/oauth2.d.ts +118 -0
- package/dist/rest/oauth2.js +212 -0
- package/dist/rest/openapi/cache.d.ts +54 -0
- package/dist/rest/openapi/cache.js +128 -0
- package/dist/rest/openapi/import.d.ts +67 -0
- package/dist/rest/openapi/import.js +91 -0
- package/dist/rest/openapi/map.d.ts +102 -0
- package/dist/rest/openapi/map.js +477 -0
- package/dist/rest/openapi/model.d.ts +203 -0
- package/dist/rest/openapi/model.js +37 -0
- package/dist/rest/openapi/parse.d.ts +44 -0
- package/dist/rest/openapi/parse.js +1530 -0
- package/dist/rest/openapi/refs.d.ts +63 -0
- package/dist/rest/openapi/refs.js +258 -0
- package/dist/rest/openapi/sample.d.ts +68 -0
- package/dist/rest/openapi/sample.js +336 -0
- package/dist/rest/postman/import.d.ts +21 -0
- package/dist/rest/postman/import.js +47 -0
- package/dist/rest/postman/index.d.ts +7 -0
- package/dist/rest/postman/index.js +7 -0
- package/dist/rest/postman/map.d.ts +28 -0
- package/dist/rest/postman/map.js +427 -0
- package/dist/rest/postman/model.d.ts +118 -0
- package/dist/rest/postman/model.js +7 -0
- package/dist/rest/postman/parse.d.ts +29 -0
- package/dist/rest/postman/parse.js +518 -0
- package/dist/rest/response.d.ts +72 -0
- package/dist/rest/response.js +221 -0
- package/dist/rest/send.d.ts +102 -0
- package/dist/rest/send.js +148 -0
- package/dist/rest/url.d.ts +92 -0
- package/dist/rest/url.js +213 -0
- package/dist/run/effective-auth.d.ts +10 -0
- package/dist/run/effective-auth.js +19 -0
- package/dist/run/index.d.ts +8 -0
- package/dist/run/index.js +4 -0
- package/dist/run/prepare.d.ts +43 -0
- package/dist/run/prepare.js +280 -0
- package/dist/run/run.d.ts +53 -0
- package/dist/run/run.js +223 -0
- package/dist/run/secret-needs.d.ts +13 -0
- package/dist/run/secret-needs.js +125 -0
- package/dist/run/select.d.ts +34 -0
- package/dist/run/select.js +76 -0
- package/dist/secrets/env-names.d.ts +27 -0
- package/dist/secrets/env-names.js +40 -0
- package/dist/secrets/resolve.d.ts +58 -0
- package/dist/secrets/resolve.js +136 -0
- package/dist/send-options.d.ts +141 -0
- package/dist/send-options.js +228 -0
- package/dist/send.d.ts +53 -0
- package/dist/send.js +210 -0
- package/dist/soap/body-builder.d.ts +38 -0
- package/dist/soap/body-builder.js +250 -0
- package/dist/soap/build-problems.d.ts +12 -0
- package/dist/soap/build-problems.js +2 -0
- package/dist/soap/charset.d.ts +23 -0
- package/dist/soap/charset.js +47 -0
- package/dist/soap/envelope.d.ts +44 -0
- package/dist/soap/envelope.js +76 -0
- package/dist/soap/fault.d.ts +46 -0
- package/dist/soap/fault.js +129 -0
- package/dist/soap/form-request.d.ts +34 -0
- package/dist/soap/form-request.js +251 -0
- package/dist/soap/legacy-project/definition-fetcher.d.ts +21 -0
- package/dist/soap/legacy-project/definition-fetcher.js +43 -0
- package/dist/soap/legacy-project/format.d.ts +18 -0
- package/dist/soap/legacy-project/format.js +24 -0
- package/dist/soap/legacy-project/import.d.ts +21 -0
- package/dist/soap/legacy-project/import.js +46 -0
- package/dist/soap/legacy-project/index.d.ts +9 -0
- package/dist/soap/legacy-project/index.js +5 -0
- package/dist/soap/legacy-project/map.d.ts +91 -0
- package/dist/soap/legacy-project/map.js +290 -0
- package/dist/soap/legacy-project/model.d.ts +98 -0
- package/dist/soap/legacy-project/model.js +5 -0
- package/dist/soap/legacy-project/parse.d.ts +16 -0
- package/dist/soap/legacy-project/parse.js +325 -0
- package/dist/soap/mime/cid-scan.d.ts +36 -0
- package/dist/soap/mime/cid-scan.js +52 -0
- package/dist/soap/mime/inline-files.d.ts +39 -0
- package/dist/soap/mime/inline-files.js +71 -0
- package/dist/soap/mime/mtom.d.ts +74 -0
- package/dist/soap/mime/mtom.js +134 -0
- package/dist/soap/mime/multipart.d.ts +66 -0
- package/dist/soap/mime/multipart.js +329 -0
- package/dist/soap/mime/send-pipeline.d.ts +61 -0
- package/dist/soap/mime/send-pipeline.js +145 -0
- package/dist/soap/mime/swa.d.ts +45 -0
- package/dist/soap/mime/swa.js +62 -0
- package/dist/soap/mime/types.d.ts +69 -0
- package/dist/soap/mime/types.js +10 -0
- package/dist/soap/namespace-scope.d.ts +32 -0
- package/dist/soap/namespace-scope.js +85 -0
- package/dist/soap/prefixes.d.ts +24 -0
- package/dist/soap/prefixes.js +70 -0
- package/dist/soap/recreate.d.ts +28 -0
- package/dist/soap/recreate.js +168 -0
- package/dist/soap/request-builder.d.ts +63 -0
- package/dist/soap/request-builder.js +161 -0
- package/dist/soap/response-parser.d.ts +29 -0
- package/dist/soap/response-parser.js +71 -0
- package/dist/soap/soap-action.d.ts +31 -0
- package/dist/soap/soap-action.js +28 -0
- package/dist/soap/transforms.d.ts +52 -0
- package/dist/soap/transforms.js +164 -0
- package/dist/types.d.ts +307 -0
- package/dist/types.js +6 -0
- package/dist/validate/index.d.ts +61 -0
- package/dist/validate/index.js +72 -0
- package/dist/validate/schema-file-set.d.ts +51 -0
- package/dist/validate/schema-file-set.js +288 -0
- package/dist/validate/schema-validator.d.ts +53 -0
- package/dist/validate/schema-validator.js +251 -0
- package/dist/validate/soap-structure.d.ts +34 -0
- package/dist/validate/soap-structure.js +255 -0
- package/dist/validate/types.d.ts +47 -0
- package/dist/validate/types.js +8 -0
- package/dist/validate/wsi/assertions/helpers.d.ts +145 -0
- package/dist/validate/wsi/assertions/helpers.js +387 -0
- package/dist/validate/wsi/assertions/index.d.ts +44 -0
- package/dist/validate/wsi/assertions/index.js +77 -0
- package/dist/validate/wsi/assertions/message/helpers.d.ts +63 -0
- package/dist/validate/wsi/assertions/message/helpers.js +168 -0
- package/dist/validate/wsi/assertions/message/index.d.ts +39 -0
- package/dist/validate/wsi/assertions/message/index.js +62 -0
- package/dist/validate/wsi/assertions/message/r1001.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1001.js +38 -0
- package/dist/validate/wsi/assertions/message/r1003.d.ts +14 -0
- package/dist/validate/wsi/assertions/message/r1003.js +45 -0
- package/dist/validate/wsi/assertions/message/r1005.d.ts +12 -0
- package/dist/validate/wsi/assertions/message/r1005.js +37 -0
- package/dist/validate/wsi/assertions/message/r1006.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1006.js +49 -0
- package/dist/validate/wsi/assertions/message/r1007.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1007.js +30 -0
- package/dist/validate/wsi/assertions/message/r1011.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1011.js +33 -0
- package/dist/validate/wsi/assertions/message/r1012.d.ts +13 -0
- package/dist/validate/wsi/assertions/message/r1012.js +37 -0
- package/dist/validate/wsi/assertions/message/r1013.d.ts +9 -0
- package/dist/validate/wsi/assertions/message/r1013.js +42 -0
- package/dist/validate/wsi/assertions/message/r1014.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1014.js +30 -0
- package/dist/validate/wsi/assertions/message/r1015.d.ts +12 -0
- package/dist/validate/wsi/assertions/message/r1015.js +36 -0
- package/dist/validate/wsi/assertions/message/r1017.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1017.js +30 -0
- package/dist/validate/wsi/assertions/message/r1100.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1100.js +39 -0
- package/dist/validate/wsi/assertions/message/r1101.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1101.js +37 -0
- package/dist/validate/wsi/assertions/message/r1102.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1102.js +41 -0
- package/dist/validate/wsi/assertions/message/r1103.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1103.js +28 -0
- package/dist/validate/wsi/assertions/message/r1107.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1107.js +38 -0
- package/dist/validate/wsi/assertions/message/r1109.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1109.js +32 -0
- package/dist/validate/wsi/assertions/message/r1124.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1124.js +31 -0
- package/dist/validate/wsi/assertions/message/r1132.d.ts +9 -0
- package/dist/validate/wsi/assertions/message/r1132.js +23 -0
- package/dist/validate/wsi/assertions/message/r1140.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1140.js +42 -0
- package/dist/validate/wsi/assertions/message/r1141.d.ts +10 -0
- package/dist/validate/wsi/assertions/message/r1141.js +32 -0
- package/dist/validate/wsi/assertions/message/r2113.d.ts +11 -0
- package/dist/validate/wsi/assertions/message/r2113.js +33 -0
- package/dist/validate/wsi/assertions/message/r2211.d.ts +7 -0
- package/dist/validate/wsi/assertions/message/r2211.js +42 -0
- package/dist/validate/wsi/assertions/r2001.d.ts +15 -0
- package/dist/validate/wsi/assertions/r2001.js +47 -0
- package/dist/validate/wsi/assertions/r2002.d.ts +11 -0
- package/dist/validate/wsi/assertions/r2002.js +38 -0
- package/dist/validate/wsi/assertions/r2003.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2003.js +32 -0
- package/dist/validate/wsi/assertions/r2005.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2005.js +40 -0
- package/dist/validate/wsi/assertions/r2101.d.ts +14 -0
- package/dist/validate/wsi/assertions/r2101.js +65 -0
- package/dist/validate/wsi/assertions/r2102.d.ts +10 -0
- package/dist/validate/wsi/assertions/r2102.js +41 -0
- package/dist/validate/wsi/assertions/r2105.d.ts +8 -0
- package/dist/validate/wsi/assertions/r2105.js +39 -0
- package/dist/validate/wsi/assertions/r2110.d.ts +8 -0
- package/dist/validate/wsi/assertions/r2110.js +38 -0
- package/dist/validate/wsi/assertions/r2111.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2111.js +30 -0
- package/dist/validate/wsi/assertions/r2112.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2112.js +35 -0
- package/dist/validate/wsi/assertions/r2201.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2201.js +28 -0
- package/dist/validate/wsi/assertions/r2203.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2203.js +30 -0
- package/dist/validate/wsi/assertions/r2204.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2204.js +29 -0
- package/dist/validate/wsi/assertions/r2205.d.ts +8 -0
- package/dist/validate/wsi/assertions/r2205.js +46 -0
- package/dist/validate/wsi/assertions/r2206.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2206.js +36 -0
- package/dist/validate/wsi/assertions/r2209.d.ts +12 -0
- package/dist/validate/wsi/assertions/r2209.js +37 -0
- package/dist/validate/wsi/assertions/r2210.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2210.js +30 -0
- package/dist/validate/wsi/assertions/r2303.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2303.js +44 -0
- package/dist/validate/wsi/assertions/r2304.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2304.js +32 -0
- package/dist/validate/wsi/assertions/r2401.d.ts +12 -0
- package/dist/validate/wsi/assertions/r2401.js +31 -0
- package/dist/validate/wsi/assertions/r2701.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2701.js +28 -0
- package/dist/validate/wsi/assertions/r2702.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2702.js +26 -0
- package/dist/validate/wsi/assertions/r2705.d.ts +11 -0
- package/dist/validate/wsi/assertions/r2705.js +31 -0
- package/dist/validate/wsi/assertions/r2706.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2706.js +29 -0
- package/dist/validate/wsi/assertions/r2710.d.ts +13 -0
- package/dist/validate/wsi/assertions/r2710.js +37 -0
- package/dist/validate/wsi/assertions/r2716.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2716.js +29 -0
- package/dist/validate/wsi/assertions/r2717.d.ts +9 -0
- package/dist/validate/wsi/assertions/r2717.js +31 -0
- package/dist/validate/wsi/assertions/r2718.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2718.js +41 -0
- package/dist/validate/wsi/assertions/r2720.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2720.js +29 -0
- package/dist/validate/wsi/assertions/r2721.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2721.js +27 -0
- package/dist/validate/wsi/assertions/r2722.d.ts +6 -0
- package/dist/validate/wsi/assertions/r2722.js +29 -0
- package/dist/validate/wsi/assertions/r2801.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2801.js +39 -0
- package/dist/validate/wsi/assertions/r2803.d.ts +7 -0
- package/dist/validate/wsi/assertions/r2803.js +29 -0
- package/dist/validate/wsi/docs.d.ts +29 -0
- package/dist/validate/wsi/docs.js +167 -0
- package/dist/validate/wsi/index.d.ts +16 -0
- package/dist/validate/wsi/index.js +11 -0
- package/dist/validate/wsi/report-html.d.ts +36 -0
- package/dist/validate/wsi/report-html.js +135 -0
- package/dist/validate/wsi/run-message.d.ts +50 -0
- package/dist/validate/wsi/run-message.js +190 -0
- package/dist/validate/wsi/run-wsdl.d.ts +48 -0
- package/dist/validate/wsi/run-wsdl.js +99 -0
- package/dist/validate/wsi/types.d.ts +173 -0
- package/dist/validate/wsi/types.js +17 -0
- package/dist/workspace/commit-message.d.ts +47 -0
- package/dist/workspace/commit-message.js +195 -0
- package/dist/workspace/environments.d.ts +79 -0
- package/dist/workspace/environments.js +115 -0
- package/dist/workspace/index.d.ts +28 -0
- package/dist/workspace/index.js +19 -0
- package/dist/workspace/load.d.ts +45 -0
- package/dist/workspace/load.js +155 -0
- package/dist/workspace/local-state.d.ts +37 -0
- package/dist/workspace/local-state.js +59 -0
- package/dist/workspace/migrate.d.ts +38 -0
- package/dist/workspace/migrate.js +50 -0
- package/dist/workspace/model.d.ts +86 -0
- package/dist/workspace/model.js +54 -0
- package/dist/workspace/paths.d.ts +64 -0
- package/dist/workspace/paths.js +97 -0
- package/dist/workspace/reidentify.d.ts +22 -0
- package/dist/workspace/reidentify.js +122 -0
- package/dist/workspace/save.d.ts +31 -0
- package/dist/workspace/save.js +84 -0
- package/dist/workspace/schema.d.ts +93 -0
- package/dist/workspace/schema.js +115 -0
- package/dist/workspace/serialize.d.ts +24 -0
- package/dist/workspace/serialize.js +60 -0
- package/dist/workspace/share.d.ts +52 -0
- package/dist/workspace/share.js +89 -0
- package/dist/ws/browser.d.ts +13 -0
- package/dist/ws/browser.js +11 -0
- package/dist/ws/call.d.ts +53 -0
- package/dist/ws/call.js +106 -0
- package/dist/ws/command.d.ts +19 -0
- package/dist/ws/command.js +28 -0
- package/dist/ws/expand.d.ts +38 -0
- package/dist/ws/expand.js +76 -0
- package/dist/ws/model.d.ts +191 -0
- package/dist/ws/model.js +83 -0
- package/dist/ws/pretty.d.ts +12 -0
- package/dist/ws/pretty.js +25 -0
- package/dist/ws/session.d.ts +50 -0
- package/dist/ws/session.js +333 -0
- package/dist/ws/shape.d.ts +18 -0
- package/dist/ws/shape.js +28 -0
- package/dist/ws/transcript.d.ts +14 -0
- package/dist/ws/transcript.js +29 -0
- package/dist/ws/url.d.ts +3 -0
- package/dist/ws/url.js +44 -0
- package/dist/wsa/headers.d.ts +78 -0
- package/dist/wsa/headers.js +244 -0
- package/dist/wsa/model.d.ts +66 -0
- package/dist/wsa/model.js +52 -0
- package/dist/wsa/policy-detect.d.ts +81 -0
- package/dist/wsa/policy-detect.js +245 -0
- package/dist/wsdl/cache-naming.d.ts +39 -0
- package/dist/wsdl/cache-naming.js +90 -0
- package/dist/wsdl/cache.d.ts +48 -0
- package/dist/wsdl/cache.js +141 -0
- package/dist/wsdl/docs-generator.d.ts +47 -0
- package/dist/wsdl/docs-generator.js +439 -0
- package/dist/wsdl/dom-utils.d.ts +15 -0
- package/dist/wsdl/dom-utils.js +50 -0
- package/dist/wsdl/export-definition.d.ts +38 -0
- package/dist/wsdl/export-definition.js +100 -0
- package/dist/wsdl/fetch.d.ts +13 -0
- package/dist/wsdl/fetch.js +60 -0
- package/dist/wsdl/merge.d.ts +17 -0
- package/dist/wsdl/merge.js +57 -0
- package/dist/wsdl/model.d.ts +176 -0
- package/dist/wsdl/model.js +17 -0
- package/dist/wsdl/parse-binding.d.ts +6 -0
- package/dist/wsdl/parse-binding.js +150 -0
- package/dist/wsdl/parse-wsdl.d.ts +47 -0
- package/dist/wsdl/parse-wsdl.js +161 -0
- package/dist/wsdl/qname.d.ts +28 -0
- package/dist/wsdl/qname.js +41 -0
- package/dist/wsdl/ref-policy.d.ts +54 -0
- package/dist/wsdl/ref-policy.js +87 -0
- package/dist/wsdl/resolver.d.ts +81 -0
- package/dist/wsdl/resolver.js +276 -0
- package/dist/wsdl/update-definition.d.ts +106 -0
- package/dist/wsdl/update-definition.js +314 -0
- package/dist/wss/apply.d.ts +40 -0
- package/dist/wss/apply.js +212 -0
- package/dist/wss/c14n-prefixes.d.ts +27 -0
- package/dist/wss/c14n-prefixes.js +95 -0
- package/dist/wss/incoming/decrypt.d.ts +35 -0
- package/dist/wss/incoming/decrypt.js +57 -0
- package/dist/wss/incoming/index.d.ts +56 -0
- package/dist/wss/incoming/index.js +189 -0
- package/dist/wss/incoming/verify.d.ts +74 -0
- package/dist/wss/incoming/verify.js +440 -0
- package/dist/wss/key-identifiers.d.ts +76 -0
- package/dist/wss/key-identifiers.js +139 -0
- package/dist/wss/keystore/certificate.d.ts +45 -0
- package/dist/wss/keystore/certificate.js +134 -0
- package/dist/wss/keystore/index.d.ts +50 -0
- package/dist/wss/keystore/index.js +80 -0
- package/dist/wss/keystore/model.d.ts +83 -0
- package/dist/wss/keystore/model.js +27 -0
- package/dist/wss/keystore/pem.d.ts +21 -0
- package/dist/wss/keystore/pem.js +140 -0
- package/dist/wss/keystore/pkcs12.d.ts +21 -0
- package/dist/wss/keystore/pkcs12.js +125 -0
- package/dist/wss/model.d.ts +160 -0
- package/dist/wss/model.js +37 -0
- package/dist/wss/outgoing/encryption.d.ts +76 -0
- package/dist/wss/outgoing/encryption.js +618 -0
- package/dist/wss/outgoing/signature.d.ts +73 -0
- package/dist/wss/outgoing/signature.js +239 -0
- package/dist/wss/outgoing/timestamp.d.ts +29 -0
- package/dist/wss/outgoing/timestamp.js +39 -0
- package/dist/wss/outgoing/username-token.d.ts +36 -0
- package/dist/wss/outgoing/username-token.js +68 -0
- package/dist/wss/security-header.d.ts +31 -0
- package/dist/wss/security-header.js +83 -0
- package/dist/xml/index.d.ts +7 -0
- package/dist/xml/index.js +7 -0
- package/dist/xml/namespaces.d.ts +36 -0
- package/dist/xml/namespaces.js +60 -0
- package/dist/xml/parse.d.ts +79 -0
- package/dist/xml/parse.js +109 -0
- package/dist/xml/positions.d.ts +26 -0
- package/dist/xml/positions.js +71 -0
- package/dist/xml/pretty.d.ts +37 -0
- package/dist/xml/pretty.js +137 -0
- package/dist/xml/serialize.d.ts +6 -0
- package/dist/xml/serialize.js +8 -0
- package/dist/xml/tolerant-tree.d.ts +56 -0
- package/dist/xml/tolerant-tree.js +134 -0
- package/dist/xpath/evaluate-async.d.ts +31 -0
- package/dist/xpath/evaluate-async.js +81 -0
- package/dist/xpath/evaluate.d.ts +98 -0
- package/dist/xpath/evaluate.js +340 -0
- package/dist/xpath/jsonpath.d.ts +40 -0
- package/dist/xpath/jsonpath.js +109 -0
- package/dist/xpath/namespaces.d.ts +29 -0
- package/dist/xpath/namespaces.js +101 -0
- package/dist/xpath/worker.d.ts +7 -0
- package/dist/xpath/worker.js +26 -0
- package/dist/xsd/builtins.d.ts +36 -0
- package/dist/xsd/builtins.js +108 -0
- package/dist/xsd/check-references.d.ts +25 -0
- package/dist/xsd/check-references.js +145 -0
- package/dist/xsd/form-edits.d.ts +57 -0
- package/dist/xsd/form-edits.js +153 -0
- package/dist/xsd/form-model.d.ts +153 -0
- package/dist/xsd/form-model.js +691 -0
- package/dist/xsd/locate.d.ts +42 -0
- package/dist/xsd/locate.js +249 -0
- package/dist/xsd/model.d.ts +249 -0
- package/dist/xsd/model.js +1 -0
- package/dist/xsd/parse-particles.d.ts +48 -0
- package/dist/xsd/parse-particles.js +320 -0
- package/dist/xsd/parse-schema.d.ts +21 -0
- package/dist/xsd/parse-schema.js +143 -0
- package/dist/xsd/resolve-content.d.ts +18 -0
- package/dist/xsd/resolve-content.js +242 -0
- package/dist/xsd/sample-generator.d.ts +51 -0
- package/dist/xsd/sample-generator.js +291 -0
- package/dist/xsd/sample-types.d.ts +21 -0
- package/dist/xsd/sample-types.js +69 -0
- package/dist/xsd/sample-values.d.ts +54 -0
- package/dist/xsd/sample-values.js +267 -0
- package/dist/xsd/schema-set.d.ts +51 -0
- package/dist/xsd/schema-set.js +203 -0
- package/dist/xsd/xml-scan.d.ts +64 -0
- package/dist/xsd/xml-scan.js +286 -0
- package/dist/xsd/xml-writer.d.ts +56 -0
- package/dist/xsd/xml-writer.js +103 -0
- package/package.json +69 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Format-version handling for project folders.
|
|
3
|
+
*
|
|
4
|
+
* `formatVersion` is bumped only on breaking changes. Opening a project written
|
|
5
|
+
* by a newer Wirebench must fail loudly rather than silently dropping the parts
|
|
6
|
+
* this build does not understand.
|
|
7
|
+
*/
|
|
8
|
+
import { ProjectError } from '../errors.js';
|
|
9
|
+
import { FORMAT_VERSION } from './model.js';
|
|
10
|
+
/**
|
|
11
|
+
* Brings a raw manifest document up to {@link FORMAT_VERSION}.
|
|
12
|
+
*
|
|
13
|
+
* Version 1 needs no rewrite of its own: it simply has no `disabled` key, and
|
|
14
|
+
* `load.ts` defaults a missing list to empty. This function's job is narrower
|
|
15
|
+
* — validate the version is in `[1, FORMAT_VERSION]` and stamp the document
|
|
16
|
+
* with the current `formatVersion` so schema validation (which pins
|
|
17
|
+
* `formatVersion` to a literal) accepts a document written by an older build.
|
|
18
|
+
* The next save then writes the file back at the current version. Versions
|
|
19
|
+
* 2 → 3 → 4 are the same kind of step: fields an older file simply lacks,
|
|
20
|
+
* which the loader defaults.
|
|
21
|
+
*
|
|
22
|
+
* @throws ProjectError `project-format-too-new` when the file was written by a
|
|
23
|
+
* newer Wirebench, `project-file-invalid` when `formatVersion` is missing,
|
|
24
|
+
* not a number, or below 1.
|
|
25
|
+
*/
|
|
26
|
+
export function migrate(document, file) {
|
|
27
|
+
if (typeof document !== 'object' || document === null || Array.isArray(document)) {
|
|
28
|
+
throw new ProjectError('project-file-invalid', `Invalid project file ${file}: expected a YAML mapping`, {
|
|
29
|
+
details: { file, issues: [{ path: '', message: 'expected a YAML mapping' }] },
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const raw = document;
|
|
33
|
+
const version = raw['formatVersion'];
|
|
34
|
+
if (typeof version !== 'number' || !Number.isInteger(version) || version < 1) {
|
|
35
|
+
throw new ProjectError('project-file-invalid', `Invalid project file ${file}: bad formatVersion`, {
|
|
36
|
+
details: {
|
|
37
|
+
file,
|
|
38
|
+
issues: [{ path: 'formatVersion', message: `expected an integer >= 1, got ${JSON.stringify(version)}` }],
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (version > FORMAT_VERSION) {
|
|
43
|
+
throw new ProjectError('project-format-too-new', `Project was created by a newer version of Wirebench (format ${version}, this build supports ${FORMAT_VERSION})`, { details: { file, formatVersion: version, supported: FORMAT_VERSION } });
|
|
44
|
+
}
|
|
45
|
+
return { ...raw, formatVersion: FORMAT_VERSION };
|
|
46
|
+
}
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Wirebench project model: the in-memory shape of a project folder
|
|
3
|
+
* (see the design spec, "Data model and project format").
|
|
4
|
+
*
|
|
5
|
+
* Every field is `readonly` and every polymorphic type carries a `kind`
|
|
6
|
+
* discriminator (`'soap'` for a WSDL interface, `'rest'` for an API — see
|
|
7
|
+
* `rest/model.ts` — with `'grpc'` reserved and refused by the loader). Ids are ULIDs so entities
|
|
8
|
+
* keep a stable identity across renames; `slug` is the file-system name derived
|
|
9
|
+
* from `name` and is what the folder layout is keyed by.
|
|
10
|
+
*
|
|
11
|
+
* Nothing here ever holds a secret: credentials are referenced by
|
|
12
|
+
* `passwordRef` (a `secretRef` resolved from the OS keychain at send time).
|
|
13
|
+
*/
|
|
14
|
+
import type { Assertion } from '../assert/model.js';
|
|
15
|
+
import type { WsaConfig } from '../wsa/model.js';
|
|
16
|
+
import type { GrpcApi, GrpcRequestDef } from '../grpc/model.js';
|
|
17
|
+
import type { RestApi, RestRequestDef } from '../rest/model.js';
|
|
18
|
+
import type { WsApi, WsRequestDef } from '../ws/model.js';
|
|
19
|
+
export type { WsaConfig, WsaConfigPatch, WsaMustUnderstand, WsaVersion } from '../wsa/model.js';
|
|
20
|
+
/**
|
|
21
|
+
* The on-disk format version written to (and required by) `wirebench.yaml`.
|
|
22
|
+
*
|
|
23
|
+
* 4 added `assertions` on a request and the `…Env` name beside each secret reference. Both are
|
|
24
|
+
* additive, and both still bump the version: this format does not round-trip unknown keys, so an
|
|
25
|
+
* older build would delete them on its next save (see `schema.ts` and ADR-0003).
|
|
26
|
+
*/
|
|
27
|
+
export declare const FORMAT_VERSION = 4;
|
|
28
|
+
/** A flat, ordered map of property name to value (project- or environment-scoped). */
|
|
29
|
+
export type PropertyMap = Readonly<Record<string, string>>;
|
|
30
|
+
/**
|
|
31
|
+
* Every authentication scheme a request, endpoint, interface, API or folder can carry.
|
|
32
|
+
*
|
|
33
|
+
* `inherit` is valid only where there is something to inherit from — a REST request or folder,
|
|
34
|
+
* which walks its folder chain up to its API. A SOAP interface, endpoint or request uses
|
|
35
|
+
* {@link EndpointAuth}, the subset without it.
|
|
36
|
+
*/
|
|
37
|
+
export type AuthType = 'inherit' | 'none' | 'basic' | 'ntlm' | 'bearer' | 'api-key' | 'oauth2';
|
|
38
|
+
/** How a request or endpoint authenticates. Passwords are always `secretRef`s, never values. */
|
|
39
|
+
export interface EndpointAuth {
|
|
40
|
+
readonly type: 'none' | 'basic' | 'ntlm';
|
|
41
|
+
readonly username?: string;
|
|
42
|
+
/** Opaque reference into the OS-keychain-backed secret store. Never a password. */
|
|
43
|
+
readonly passwordRef?: string;
|
|
44
|
+
/** The name CI supplies this secret under: `WIREBENCH_SECRET_<name>`. Not a secret; committed. */
|
|
45
|
+
readonly passwordEnv?: string;
|
|
46
|
+
/** NTLM domain. */
|
|
47
|
+
readonly domain?: string;
|
|
48
|
+
/** NTLM workstation name; optional, and only ever advertised, never verified. */
|
|
49
|
+
readonly workstation?: string;
|
|
50
|
+
/** Send the Authorization header without waiting for a 401 challenge. */
|
|
51
|
+
readonly preemptive?: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* "Whatever the thing above me uses." Only a REST request or folder may say this; resolution
|
|
55
|
+
* walks request → folder chain → API and takes the first configuration that is not `inherit`
|
|
56
|
+
* (see `rest/auth.ts`).
|
|
57
|
+
*/
|
|
58
|
+
export interface InheritAuth {
|
|
59
|
+
readonly type: 'inherit';
|
|
60
|
+
}
|
|
61
|
+
/** A token sent as `Authorization: <scheme> <token>`. The token itself is always a `secretRef`. */
|
|
62
|
+
export interface BearerAuth {
|
|
63
|
+
readonly type: 'bearer';
|
|
64
|
+
/** Opaque reference into the OS-keychain-backed secret store. Never a token value. */
|
|
65
|
+
readonly tokenRef?: string;
|
|
66
|
+
/** The name CI supplies this secret under: `WIREBENCH_SECRET_<name>`. Not a secret; committed. */
|
|
67
|
+
readonly tokenEnv?: string;
|
|
68
|
+
/** Authentication scheme placed before the token. Defaults to `Bearer`. */
|
|
69
|
+
readonly scheme?: string;
|
|
70
|
+
}
|
|
71
|
+
/** A key sent as one header or one query parameter. The value is always a `secretRef`. */
|
|
72
|
+
export interface ApiKeyAuth {
|
|
73
|
+
readonly type: 'api-key';
|
|
74
|
+
/** Header or query-parameter name, e.g. `X-Api-Key`. */
|
|
75
|
+
readonly name: string;
|
|
76
|
+
/** Opaque reference into the OS-keychain-backed secret store. Never a key value. */
|
|
77
|
+
readonly valueRef?: string;
|
|
78
|
+
/** The name CI supplies this secret under: `WIREBENCH_SECRET_<name>`. Not a secret; committed. */
|
|
79
|
+
readonly valueEnv?: string;
|
|
80
|
+
readonly in: 'header' | 'query';
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* OAuth2, as much of it as a client needs to obtain a token: the two grants that suit a desktop
|
|
84
|
+
* tool (client credentials for machine-to-machine, authorization code with PKCE for a user
|
|
85
|
+
* sign-in). Access tokens are never persisted — they live in the host's memory for the session —
|
|
86
|
+
* so the only secrets here are the client secret and, if the user opts in, a refresh token.
|
|
87
|
+
*/
|
|
88
|
+
export interface OAuth2Auth {
|
|
89
|
+
readonly type: 'oauth2';
|
|
90
|
+
readonly grant: 'client-credentials' | 'authorization-code';
|
|
91
|
+
/** Token endpoint. Property expansion applies. */
|
|
92
|
+
readonly tokenUrl: string;
|
|
93
|
+
/** Authorization endpoint; required for, and only used by, the authorization-code grant. */
|
|
94
|
+
readonly authorizationUrl?: string;
|
|
95
|
+
readonly clientId: string;
|
|
96
|
+
/** Opaque reference into the OS-keychain-backed secret store. Never a secret value. */
|
|
97
|
+
readonly clientSecretRef?: string;
|
|
98
|
+
/** The name CI supplies this secret under: `WIREBENCH_SECRET_<name>`. Not a secret; committed. */
|
|
99
|
+
readonly clientSecretEnv?: string;
|
|
100
|
+
readonly scopes: readonly string[];
|
|
101
|
+
readonly audience?: string;
|
|
102
|
+
/** Whether the client credentials go in an `Authorization: Basic` header or the request body. */
|
|
103
|
+
readonly clientAuth: 'basic' | 'body';
|
|
104
|
+
/** Proof Key for Code Exchange (RFC 7636); authorization-code only, on by default. */
|
|
105
|
+
readonly pkce: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Set only when the user asked for the refresh token to be remembered: like every other
|
|
108
|
+
* credential it is then a keychain reference, never a value (ADR-0004).
|
|
109
|
+
*/
|
|
110
|
+
readonly refreshTokenRef?: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Authentication as configured anywhere in a project. A discriminated union on `type`, of which
|
|
114
|
+
* {@link EndpointAuth} — the `none`/`basic`/`ntlm` member SOAP has always had — is one arm, so a
|
|
115
|
+
* SOAP endpoint's credentials are already an `AuthConfig` and the same editor serves both
|
|
116
|
+
* protocols.
|
|
117
|
+
*/
|
|
118
|
+
export type AuthConfig = InheritAuth | EndpointAuth | BearerAuth | ApiKeyAuth | OAuth2Auth;
|
|
119
|
+
/** The OAuth2 fields a freshly configured entry starts with. */
|
|
120
|
+
export declare const DEFAULT_OAUTH2_AUTH: OAuth2Auth;
|
|
121
|
+
/** One addressable endpoint (URL + optional credentials) of an interface. */
|
|
122
|
+
export interface Endpoint {
|
|
123
|
+
readonly id: string;
|
|
124
|
+
readonly name: string;
|
|
125
|
+
readonly url: string;
|
|
126
|
+
readonly auth?: EndpointAuth;
|
|
127
|
+
/** `override` replaces request credentials, `complement` only fills in blanks. */
|
|
128
|
+
readonly authMode: 'override' | 'complement';
|
|
129
|
+
/**
|
|
130
|
+
* Send to this endpoint even when its certificate does not verify (`rejectUnauthorized:
|
|
131
|
+
* false`). Per endpoint only — there is no global equivalent — and the UI badges every
|
|
132
|
+
* endpoint that has it in red, permanently, so a debugging shortcut cannot quietly become
|
|
133
|
+
* the way the project always runs.
|
|
134
|
+
*/
|
|
135
|
+
readonly trustInvalid?: boolean;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* How an attachment participates in the outgoing message, under the names classic SOAP
|
|
139
|
+
* workbenches use:
|
|
140
|
+
* `XOP` for an MTOM/XOP-optimised binary, `SWAREF` for a `ref:swaRef`-referenced part,
|
|
141
|
+
* `MIME` for a WSDL `mime:content` part, `CONTENT` for an unreferenced body attachment,
|
|
142
|
+
* and `UNKNOWN` when nothing in the definition says.
|
|
143
|
+
*/
|
|
144
|
+
export type AttachmentType = 'XOP' | 'MIME' | 'SWAREF' | 'CONTENT' | 'UNKNOWN';
|
|
145
|
+
/**
|
|
146
|
+
* Where an attachment's bytes live: either content-addressed inside the project
|
|
147
|
+
* (`attachments/<sha256>`, written by `project/attachments-cache.ts`) or a file
|
|
148
|
+
* on disk, absolute or relative to the project's resource root.
|
|
149
|
+
*/
|
|
150
|
+
export type AttachmentSource = {
|
|
151
|
+
readonly kind: 'cache';
|
|
152
|
+
readonly sha256: string;
|
|
153
|
+
} | {
|
|
154
|
+
readonly kind: 'path';
|
|
155
|
+
readonly path: string;
|
|
156
|
+
};
|
|
157
|
+
/** One attachment part of a request. Bytes are never held here; see {@link AttachmentSource}. */
|
|
158
|
+
export interface Attachment {
|
|
159
|
+
readonly id: string;
|
|
160
|
+
/** Display/file name; may contain `${#...}` property expansions. */
|
|
161
|
+
readonly name: string;
|
|
162
|
+
readonly contentType: string;
|
|
163
|
+
/** Size in bytes, as known when the attachment was added (informational for `path` sources). */
|
|
164
|
+
readonly size: number;
|
|
165
|
+
/** WSDL `mime:part` name this attachment fills, when the binding names one. */
|
|
166
|
+
readonly part?: string;
|
|
167
|
+
readonly type: AttachmentType;
|
|
168
|
+
/** MIME Content-ID, stored without the angle brackets. Defaults to {@link defaultContentId}. */
|
|
169
|
+
readonly contentId: string;
|
|
170
|
+
/** True when the bytes were copied into the project's attachment cache. */
|
|
171
|
+
readonly cached: boolean;
|
|
172
|
+
readonly source: AttachmentSource;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The Content-ID a freshly added attachment gets: its own id in the `wirebench`
|
|
176
|
+
* domain, which is globally unique because ids are ULIDs.
|
|
177
|
+
*/
|
|
178
|
+
export declare function defaultContentId(attachmentId: string): string;
|
|
179
|
+
/** One HTTP header of a request, kept in author-defined order (duplicates allowed). */
|
|
180
|
+
export interface HeaderEntry {
|
|
181
|
+
readonly name: string;
|
|
182
|
+
readonly value: string;
|
|
183
|
+
}
|
|
184
|
+
/** The per-request knobs of the request editor's Details panel. */
|
|
185
|
+
export interface RequestProperties {
|
|
186
|
+
readonly encoding: string;
|
|
187
|
+
readonly timeoutMs?: number;
|
|
188
|
+
readonly bindAddress?: string;
|
|
189
|
+
readonly followRedirects: boolean;
|
|
190
|
+
readonly skipSoapAction: boolean;
|
|
191
|
+
readonly enableMtom: boolean;
|
|
192
|
+
readonly forceMtom: boolean;
|
|
193
|
+
readonly inlineResponseAttachments: boolean;
|
|
194
|
+
readonly expandMtomAttachments: boolean;
|
|
195
|
+
readonly disableMultiparts: boolean;
|
|
196
|
+
readonly encodeAttachments: boolean;
|
|
197
|
+
readonly enableInlineFiles: boolean;
|
|
198
|
+
readonly removeEmptyContent: boolean;
|
|
199
|
+
readonly entitizeProperties: boolean;
|
|
200
|
+
readonly prettyPrint: boolean;
|
|
201
|
+
readonly stripWhitespaces: boolean;
|
|
202
|
+
readonly dumpFile?: string;
|
|
203
|
+
readonly maxSizeBytes?: number;
|
|
204
|
+
readonly wssPasswordType?: 'text' | 'digest';
|
|
205
|
+
readonly wssTimeToLive?: number;
|
|
206
|
+
/** Id of a `wss/keystores.yaml` entry: the client identity this request's TLS handshake presents. */
|
|
207
|
+
readonly sslKeystoreRef?: string;
|
|
208
|
+
}
|
|
209
|
+
/** The request property values applied to a freshly created request. */
|
|
210
|
+
export declare const DEFAULT_REQUEST_PROPERTIES: RequestProperties;
|
|
211
|
+
/** A saved SOAP request: everything but the envelope lives in `<slug>.request.yaml`, the envelope in `<slug>.xml`. */
|
|
212
|
+
export interface SoapRequestDef {
|
|
213
|
+
readonly kind: 'soap';
|
|
214
|
+
readonly id: string;
|
|
215
|
+
readonly name: string;
|
|
216
|
+
/** File-system name (without the `.request.yaml` / `.xml` suffix). */
|
|
217
|
+
readonly slug: string;
|
|
218
|
+
readonly order: number;
|
|
219
|
+
readonly description?: string;
|
|
220
|
+
/** Id of the interface endpoint to send to. */
|
|
221
|
+
readonly endpointId?: string;
|
|
222
|
+
/** A one-off URL that overrides {@link endpointId}. */
|
|
223
|
+
readonly endpointUrl?: string;
|
|
224
|
+
readonly soapVersion: '1.1' | '1.2';
|
|
225
|
+
readonly soapAction?: string;
|
|
226
|
+
readonly headers: readonly HeaderEntry[];
|
|
227
|
+
readonly attachments: readonly Attachment[];
|
|
228
|
+
readonly auth?: EndpointAuth;
|
|
229
|
+
readonly wsa?: WsaConfig;
|
|
230
|
+
/** Name of a `wss/outgoing/<name>.yaml` configuration. */
|
|
231
|
+
readonly wssOutgoingRef?: string;
|
|
232
|
+
/** Name of a `wss/incoming/<name>.yaml` configuration. */
|
|
233
|
+
readonly wssIncomingRef?: string;
|
|
234
|
+
readonly properties: RequestProperties;
|
|
235
|
+
/** Declarative checks a runner evaluates against this request's response. Empty when none. */
|
|
236
|
+
readonly assertions: readonly Assertion[];
|
|
237
|
+
/**
|
|
238
|
+
* True when the operation this request belongs to is no longer in the interface's definition
|
|
239
|
+
* (see `wsdl/update-definition.ts`). Nothing is ever deleted on an update, so the request
|
|
240
|
+
* survives with this flag and the UI badges it; clearing it is what a later definition that
|
|
241
|
+
* brings the operation back does.
|
|
242
|
+
*/
|
|
243
|
+
readonly orphaned?: boolean;
|
|
244
|
+
/** Stored verbatim in the sibling `.xml` file, byte for byte. */
|
|
245
|
+
readonly envelopeXml: string;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* The name this type had before REST requests existed, kept as an alias for one release so
|
|
249
|
+
* callers that only ever mean a SOAP request need not be touched. Prefer {@link SoapRequestDef}.
|
|
250
|
+
*/
|
|
251
|
+
export type RequestDef = SoapRequestDef;
|
|
252
|
+
/**
|
|
253
|
+
* A saved request of either protocol, which is what a lookup by request id can return: the id
|
|
254
|
+
* space is one (ULIDs), so `kind` is how a caller finds out what it has.
|
|
255
|
+
*/
|
|
256
|
+
export type AnyRequestDef = SoapRequestDef | RestRequestDef | GrpcRequestDef | WsRequestDef;
|
|
257
|
+
/** A binding operation of an interface, holding its saved requests. */
|
|
258
|
+
export interface OperationDef {
|
|
259
|
+
readonly name: string;
|
|
260
|
+
/** The owning binding as `{namespace}localName`. */
|
|
261
|
+
readonly bindingName: string;
|
|
262
|
+
readonly slug: string;
|
|
263
|
+
readonly order: number;
|
|
264
|
+
readonly requests: readonly SoapRequestDef[];
|
|
265
|
+
}
|
|
266
|
+
/** An imported WSDL interface: its definition, endpoints and operations. */
|
|
267
|
+
export interface Interface {
|
|
268
|
+
readonly kind: 'soap';
|
|
269
|
+
readonly id: string;
|
|
270
|
+
readonly name: string;
|
|
271
|
+
readonly slug: string;
|
|
272
|
+
readonly order: number;
|
|
273
|
+
readonly definitionUrl: string;
|
|
274
|
+
/** Cache the resolved definition under `interfaces/<slug>/definition/`. */
|
|
275
|
+
readonly cacheDefinition: boolean;
|
|
276
|
+
readonly targetNamespace?: string;
|
|
277
|
+
readonly endpoints: readonly Endpoint[];
|
|
278
|
+
readonly defaultEndpointId?: string;
|
|
279
|
+
readonly wsa: WsaConfig;
|
|
280
|
+
/** Interface-level default credentials, overridable per endpoint and per request. */
|
|
281
|
+
readonly auth?: EndpointAuth;
|
|
282
|
+
readonly operations: readonly OperationDef[];
|
|
283
|
+
}
|
|
284
|
+
/** A named set of per-interface endpoint overrides and property values. */
|
|
285
|
+
export interface Environment {
|
|
286
|
+
readonly id: string;
|
|
287
|
+
readonly name: string;
|
|
288
|
+
readonly slug: string;
|
|
289
|
+
readonly order: number;
|
|
290
|
+
/** Interface slug to endpoint URL. */
|
|
291
|
+
readonly endpoints: Readonly<Record<string, string>>;
|
|
292
|
+
readonly properties: PropertyMap;
|
|
293
|
+
/**
|
|
294
|
+
* Names of {@link properties} entries that are switched off: resolution treats a disabled
|
|
295
|
+
* property exactly as if it were absent from the map (see `project/properties.ts`), while its
|
|
296
|
+
* value stays on disk. Written sorted and deduplicated, and only for names still present in
|
|
297
|
+
* `properties` — see `serialize.ts`.
|
|
298
|
+
*/
|
|
299
|
+
readonly disabledProperties: readonly string[];
|
|
300
|
+
}
|
|
301
|
+
/** A pointer to a WS-Security or keystore configuration file (contents land in later tasks). */
|
|
302
|
+
export interface WssRef {
|
|
303
|
+
readonly id: string;
|
|
304
|
+
readonly name: string;
|
|
305
|
+
/**
|
|
306
|
+
* Path relative to the project root. Omitted for keystore entries, which all
|
|
307
|
+
* share the single `wss/keystores.yaml` registry.
|
|
308
|
+
*/
|
|
309
|
+
readonly file?: string;
|
|
310
|
+
/**
|
|
311
|
+
* The document as loaded from (or to be written to) disk, verbatim. Tasks
|
|
312
|
+
* 36-40 will replace this loose bag with a typed shape; until then, saving a
|
|
313
|
+
* loaded `WssRef` back out must not drop fields this build does not
|
|
314
|
+
* understand.
|
|
315
|
+
*/
|
|
316
|
+
readonly document: Readonly<Record<string, unknown>>;
|
|
317
|
+
}
|
|
318
|
+
/** Project-wide settings persisted in `wirebench.yaml`. */
|
|
319
|
+
export interface ProjectSettings {
|
|
320
|
+
readonly cacheDefinitions: boolean;
|
|
321
|
+
readonly defaultTimeoutMs: number;
|
|
322
|
+
/** Base directory for `file:` inline attachments; relative paths resolve against the project root. */
|
|
323
|
+
readonly resourceRoot?: string;
|
|
324
|
+
readonly prettyPrintResponses: boolean;
|
|
325
|
+
}
|
|
326
|
+
/** The settings a new project starts with. */
|
|
327
|
+
export declare const DEFAULT_PROJECT_SETTINGS: ProjectSettings;
|
|
328
|
+
/** A whole Wirebench project, as loaded from (or saved to) a project folder. */
|
|
329
|
+
export interface Project {
|
|
330
|
+
readonly formatVersion: typeof FORMAT_VERSION;
|
|
331
|
+
readonly id: string;
|
|
332
|
+
readonly name: string;
|
|
333
|
+
readonly description?: string;
|
|
334
|
+
readonly settings: ProjectSettings;
|
|
335
|
+
readonly properties: PropertyMap;
|
|
336
|
+
/** Names of {@link properties} entries switched off; see {@link Environment.disabledProperties}. */
|
|
337
|
+
readonly disabledProperties: readonly string[];
|
|
338
|
+
readonly interfaces: readonly Interface[];
|
|
339
|
+
/**
|
|
340
|
+
* The project's REST APIs. `order` is shared with {@link interfaces}, so the two kinds
|
|
341
|
+
* interleave in the explorer in whatever order the user arranged them.
|
|
342
|
+
*/
|
|
343
|
+
readonly apis: readonly RestApi[];
|
|
344
|
+
/**
|
|
345
|
+
* The project's gRPC APIs. On disk they share `apis/` with the REST ones, each `api.yaml` saying
|
|
346
|
+
* which it is with `kind`; in memory they are their own list so every surface that handles one
|
|
347
|
+
* protocol has to say what it does with the third (ADR-0007). `order` is shared with both lists.
|
|
348
|
+
*/
|
|
349
|
+
readonly grpcApis: readonly GrpcApi[];
|
|
350
|
+
/**
|
|
351
|
+
* The project's WebSocket APIs. On disk they share `apis/` with the REST and gRPC ones, each
|
|
352
|
+
* `api.yaml` saying which it is with `kind`; in memory they are their own list, the fourth
|
|
353
|
+
* sibling container beside {@link interfaces}, {@link apis} and {@link grpcApis} (ADR-0007).
|
|
354
|
+
* `order` is shared with all three.
|
|
355
|
+
*/
|
|
356
|
+
readonly wsApis: readonly WsApi[];
|
|
357
|
+
readonly environments: readonly Environment[];
|
|
358
|
+
/** Id of the environment currently active for this project, if any. */
|
|
359
|
+
readonly activeEnvironmentId?: string;
|
|
360
|
+
readonly wss: {
|
|
361
|
+
readonly outgoing: readonly WssRef[];
|
|
362
|
+
readonly incoming: readonly WssRef[];
|
|
363
|
+
readonly keystores: readonly WssRef[];
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
/** Generates entity ids; injectable so tests can produce deterministic projects. */
|
|
367
|
+
export type IdGenerator = () => string;
|
|
368
|
+
/** The default {@link IdGenerator}: a lexicographically sortable ULID. */
|
|
369
|
+
export declare const generateId: IdGenerator;
|
|
370
|
+
/** Options shared by the `create*` factories. */
|
|
371
|
+
export interface CreateOptions {
|
|
372
|
+
readonly id?: string;
|
|
373
|
+
readonly newId?: IdGenerator;
|
|
374
|
+
readonly order?: number;
|
|
375
|
+
}
|
|
376
|
+
/** Creates an empty project with default settings. */
|
|
377
|
+
export declare function createProject(name: string, options?: CreateOptions): Project;
|
|
378
|
+
/** Input to {@link createInterface} beyond the name. */
|
|
379
|
+
export interface CreateInterfaceInput extends CreateOptions {
|
|
380
|
+
readonly definitionUrl: string;
|
|
381
|
+
readonly slug?: string;
|
|
382
|
+
readonly targetNamespace?: string;
|
|
383
|
+
readonly cacheDefinition?: boolean;
|
|
384
|
+
readonly endpoints?: readonly Endpoint[];
|
|
385
|
+
readonly defaultEndpointId?: string;
|
|
386
|
+
readonly operations?: readonly OperationDef[];
|
|
387
|
+
}
|
|
388
|
+
/** Creates an interface with v1 defaults (WS-A off, definition cached, no auth). */
|
|
389
|
+
export declare function createInterface(name: string, input: CreateInterfaceInput): Interface;
|
|
390
|
+
/** Input to {@link createRequest} beyond the name. */
|
|
391
|
+
export interface CreateRequestInput extends CreateOptions {
|
|
392
|
+
readonly envelopeXml: string;
|
|
393
|
+
readonly soapVersion: '1.1' | '1.2';
|
|
394
|
+
readonly slug?: string;
|
|
395
|
+
readonly soapAction?: string;
|
|
396
|
+
readonly endpointId?: string;
|
|
397
|
+
readonly headers?: readonly HeaderEntry[];
|
|
398
|
+
readonly properties?: Partial<RequestProperties>;
|
|
399
|
+
}
|
|
400
|
+
/** Creates a request with the default request properties applied. */
|
|
401
|
+
export declare function createRequest(name: string, input: CreateRequestInput): RequestDef;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Wirebench project model: the in-memory shape of a project folder
|
|
3
|
+
* (see the design spec, "Data model and project format").
|
|
4
|
+
*
|
|
5
|
+
* Every field is `readonly` and every polymorphic type carries a `kind`
|
|
6
|
+
* discriminator (`'soap'` for a WSDL interface, `'rest'` for an API — see
|
|
7
|
+
* `rest/model.ts` — with `'grpc'` reserved and refused by the loader). Ids are ULIDs so entities
|
|
8
|
+
* keep a stable identity across renames; `slug` is the file-system name derived
|
|
9
|
+
* from `name` and is what the folder layout is keyed by.
|
|
10
|
+
*
|
|
11
|
+
* Nothing here ever holds a secret: credentials are referenced by
|
|
12
|
+
* `passwordRef` (a `secretRef` resolved from the OS keychain at send time).
|
|
13
|
+
*/
|
|
14
|
+
import { ulid } from 'ulidx';
|
|
15
|
+
import { slugify } from './paths.js';
|
|
16
|
+
import { DEFAULT_WSA_CONFIG } from '../wsa/model.js';
|
|
17
|
+
/**
|
|
18
|
+
* The on-disk format version written to (and required by) `wirebench.yaml`.
|
|
19
|
+
*
|
|
20
|
+
* 4 added `assertions` on a request and the `…Env` name beside each secret reference. Both are
|
|
21
|
+
* additive, and both still bump the version: this format does not round-trip unknown keys, so an
|
|
22
|
+
* older build would delete them on its next save (see `schema.ts` and ADR-0003).
|
|
23
|
+
*/
|
|
24
|
+
export const FORMAT_VERSION = 4;
|
|
25
|
+
/** The OAuth2 fields a freshly configured entry starts with. */
|
|
26
|
+
export const DEFAULT_OAUTH2_AUTH = Object.freeze({
|
|
27
|
+
type: 'oauth2',
|
|
28
|
+
grant: 'client-credentials',
|
|
29
|
+
tokenUrl: '',
|
|
30
|
+
clientId: '',
|
|
31
|
+
scopes: Object.freeze([]),
|
|
32
|
+
clientAuth: 'basic',
|
|
33
|
+
pkce: true,
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* The Content-ID a freshly added attachment gets: its own id in the `wirebench`
|
|
37
|
+
* domain, which is globally unique because ids are ULIDs.
|
|
38
|
+
*/
|
|
39
|
+
export function defaultContentId(attachmentId) {
|
|
40
|
+
return `${attachmentId}@wirebench`;
|
|
41
|
+
}
|
|
42
|
+
/** The request property values applied to a freshly created request. */
|
|
43
|
+
export const DEFAULT_REQUEST_PROPERTIES = Object.freeze({
|
|
44
|
+
encoding: 'UTF-8',
|
|
45
|
+
followRedirects: false,
|
|
46
|
+
skipSoapAction: false,
|
|
47
|
+
enableMtom: false,
|
|
48
|
+
forceMtom: false,
|
|
49
|
+
inlineResponseAttachments: false,
|
|
50
|
+
expandMtomAttachments: false,
|
|
51
|
+
disableMultiparts: false,
|
|
52
|
+
encodeAttachments: false,
|
|
53
|
+
enableInlineFiles: false,
|
|
54
|
+
removeEmptyContent: false,
|
|
55
|
+
entitizeProperties: false,
|
|
56
|
+
prettyPrint: false,
|
|
57
|
+
stripWhitespaces: false,
|
|
58
|
+
});
|
|
59
|
+
/** The settings a new project starts with. */
|
|
60
|
+
export const DEFAULT_PROJECT_SETTINGS = Object.freeze({
|
|
61
|
+
cacheDefinitions: true,
|
|
62
|
+
defaultTimeoutMs: 60_000,
|
|
63
|
+
prettyPrintResponses: true,
|
|
64
|
+
});
|
|
65
|
+
/** The default {@link IdGenerator}: a lexicographically sortable ULID. */
|
|
66
|
+
export const generateId = () => ulid();
|
|
67
|
+
function idOf(options) {
|
|
68
|
+
return options?.id ?? (options?.newId ?? generateId)();
|
|
69
|
+
}
|
|
70
|
+
/** Creates an empty project with default settings. */
|
|
71
|
+
export function createProject(name, options) {
|
|
72
|
+
return {
|
|
73
|
+
formatVersion: FORMAT_VERSION,
|
|
74
|
+
id: idOf(options),
|
|
75
|
+
name,
|
|
76
|
+
settings: DEFAULT_PROJECT_SETTINGS,
|
|
77
|
+
properties: {},
|
|
78
|
+
disabledProperties: [],
|
|
79
|
+
interfaces: [],
|
|
80
|
+
apis: [],
|
|
81
|
+
grpcApis: [],
|
|
82
|
+
wsApis: [],
|
|
83
|
+
environments: [],
|
|
84
|
+
wss: { outgoing: [], incoming: [], keystores: [] },
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** Creates an interface with v1 defaults (WS-A off, definition cached, no auth). */
|
|
88
|
+
export function createInterface(name, input) {
|
|
89
|
+
const endpoints = input.endpoints ?? [];
|
|
90
|
+
return {
|
|
91
|
+
kind: 'soap',
|
|
92
|
+
id: idOf(input),
|
|
93
|
+
name,
|
|
94
|
+
slug: input.slug ?? slugify(name),
|
|
95
|
+
order: input.order ?? 0,
|
|
96
|
+
definitionUrl: input.definitionUrl,
|
|
97
|
+
cacheDefinition: input.cacheDefinition ?? true,
|
|
98
|
+
...(input.targetNamespace !== undefined ? { targetNamespace: input.targetNamespace } : {}),
|
|
99
|
+
endpoints,
|
|
100
|
+
...(input.defaultEndpointId !== undefined
|
|
101
|
+
? { defaultEndpointId: input.defaultEndpointId }
|
|
102
|
+
: endpoints[0] !== undefined
|
|
103
|
+
? { defaultEndpointId: endpoints[0].id }
|
|
104
|
+
: {}),
|
|
105
|
+
wsa: DEFAULT_WSA_CONFIG,
|
|
106
|
+
operations: input.operations ?? [],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/** Creates a request with the default request properties applied. */
|
|
110
|
+
export function createRequest(name, input) {
|
|
111
|
+
return {
|
|
112
|
+
kind: 'soap',
|
|
113
|
+
id: idOf(input),
|
|
114
|
+
name,
|
|
115
|
+
slug: input.slug ?? slugify(name),
|
|
116
|
+
order: input.order ?? 0,
|
|
117
|
+
...(input.endpointId !== undefined ? { endpointId: input.endpointId } : {}),
|
|
118
|
+
soapVersion: input.soapVersion,
|
|
119
|
+
...(input.soapAction !== undefined ? { soapAction: input.soapAction } : {}),
|
|
120
|
+
headers: input.headers ?? [],
|
|
121
|
+
attachments: [],
|
|
122
|
+
properties: { ...DEFAULT_REQUEST_PROPERTIES, ...input.properties },
|
|
123
|
+
assertions: [],
|
|
124
|
+
envelopeXml: input.envelopeXml,
|
|
125
|
+
};
|
|
126
|
+
}
|