@continuous-labs/sdk 0.0.4
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/FUNCTIONS.md +87 -0
- package/LICENSE +21 -0
- package/README.md +493 -0
- package/RUNTIMES.md +48 -0
- package/esm/core.d.ts +10 -0
- package/esm/core.d.ts.map +1 -0
- package/esm/core.js +13 -0
- package/esm/core.js.map +1 -0
- package/esm/funcs/simulations-create-simulation.d.ts +18 -0
- package/esm/funcs/simulations-create-simulation.d.ts.map +1 -0
- package/esm/funcs/simulations-create-simulation.js +86 -0
- package/esm/funcs/simulations-create-simulation.js.map +1 -0
- package/esm/funcs/simulations-delete-simulation.d.ts +18 -0
- package/esm/funcs/simulations-delete-simulation.d.ts.map +1 -0
- package/esm/funcs/simulations-delete-simulation.js +93 -0
- package/esm/funcs/simulations-delete-simulation.js.map +1 -0
- package/esm/funcs/simulations-fork-simulation.d.ts +19 -0
- package/esm/funcs/simulations-fork-simulation.d.ts.map +1 -0
- package/esm/funcs/simulations-fork-simulation.js +93 -0
- package/esm/funcs/simulations-fork-simulation.js.map +1 -0
- package/esm/funcs/simulations-get-simulation.d.ts +19 -0
- package/esm/funcs/simulations-get-simulation.d.ts.map +1 -0
- package/esm/funcs/simulations-get-simulation.js +94 -0
- package/esm/funcs/simulations-get-simulation.js.map +1 -0
- package/esm/funcs/simulations-list-simulation-steps.d.ts +19 -0
- package/esm/funcs/simulations-list-simulation-steps.d.ts.map +1 -0
- package/esm/funcs/simulations-list-simulation-steps.js +99 -0
- package/esm/funcs/simulations-list-simulation-steps.js.map +1 -0
- package/esm/funcs/simulations-list-simulations.d.ts +19 -0
- package/esm/funcs/simulations-list-simulations.d.ts.map +1 -0
- package/esm/funcs/simulations-list-simulations.js +95 -0
- package/esm/funcs/simulations-list-simulations.js.map +1 -0
- package/esm/funcs/simulations-mint-simulation-token.d.ts +19 -0
- package/esm/funcs/simulations-mint-simulation-token.d.ts.map +1 -0
- package/esm/funcs/simulations-mint-simulation-token.js +93 -0
- package/esm/funcs/simulations-mint-simulation-token.js.map +1 -0
- package/esm/funcs/simulations-start-simulation.d.ts +19 -0
- package/esm/funcs/simulations-start-simulation.d.ts.map +1 -0
- package/esm/funcs/simulations-start-simulation.js +94 -0
- package/esm/funcs/simulations-start-simulation.js.map +1 -0
- package/esm/funcs/simulations-stop-simulation.d.ts +19 -0
- package/esm/funcs/simulations-stop-simulation.d.ts.map +1 -0
- package/esm/funcs/simulations-stop-simulation.js +94 -0
- package/esm/funcs/simulations-stop-simulation.js.map +1 -0
- package/esm/funcs/simulators-build-simulator.d.ts +19 -0
- package/esm/funcs/simulators-build-simulator.d.ts.map +1 -0
- package/esm/funcs/simulators-build-simulator.js +109 -0
- package/esm/funcs/simulators-build-simulator.js.map +1 -0
- package/esm/funcs/simulators-cancel-simulator-build.d.ts +19 -0
- package/esm/funcs/simulators-cancel-simulator-build.d.ts.map +1 -0
- package/esm/funcs/simulators-cancel-simulator-build.js +94 -0
- package/esm/funcs/simulators-cancel-simulator-build.js.map +1 -0
- package/esm/funcs/simulators-delete-simulator.d.ts +18 -0
- package/esm/funcs/simulators-delete-simulator.d.ts.map +1 -0
- package/esm/funcs/simulators-delete-simulator.js +93 -0
- package/esm/funcs/simulators-delete-simulator.js.map +1 -0
- package/esm/funcs/simulators-get-simulator.d.ts +19 -0
- package/esm/funcs/simulators-get-simulator.d.ts.map +1 -0
- package/esm/funcs/simulators-get-simulator.js +94 -0
- package/esm/funcs/simulators-get-simulator.js.map +1 -0
- package/esm/funcs/simulators-list-simulators.d.ts +19 -0
- package/esm/funcs/simulators-list-simulators.d.ts.map +1 -0
- package/esm/funcs/simulators-list-simulators.js +95 -0
- package/esm/funcs/simulators-list-simulators.js.map +1 -0
- package/esm/funcs/worlds-build-world.d.ts +18 -0
- package/esm/funcs/worlds-build-world.d.ts.map +1 -0
- package/esm/funcs/worlds-build-world.js +86 -0
- package/esm/funcs/worlds-build-world.js.map +1 -0
- package/esm/funcs/worlds-cancel-world-build.d.ts +19 -0
- package/esm/funcs/worlds-cancel-world-build.d.ts.map +1 -0
- package/esm/funcs/worlds-cancel-world-build.js +94 -0
- package/esm/funcs/worlds-cancel-world-build.js.map +1 -0
- package/esm/funcs/worlds-delete-world.d.ts +18 -0
- package/esm/funcs/worlds-delete-world.d.ts.map +1 -0
- package/esm/funcs/worlds-delete-world.js +93 -0
- package/esm/funcs/worlds-delete-world.js.map +1 -0
- package/esm/funcs/worlds-get-world.d.ts +19 -0
- package/esm/funcs/worlds-get-world.d.ts.map +1 -0
- package/esm/funcs/worlds-get-world.js +94 -0
- package/esm/funcs/worlds-get-world.js.map +1 -0
- package/esm/funcs/worlds-list-worlds.d.ts +19 -0
- package/esm/funcs/worlds-list-worlds.d.ts.map +1 -0
- package/esm/funcs/worlds-list-worlds.js +93 -0
- package/esm/funcs/worlds-list-worlds.js.map +1 -0
- package/esm/funcs/worlds-start-world.d.ts +19 -0
- package/esm/funcs/worlds-start-world.d.ts.map +1 -0
- package/esm/funcs/worlds-start-world.js +94 -0
- package/esm/funcs/worlds-start-world.js.map +1 -0
- package/esm/funcs/worlds-stop-world.d.ts +19 -0
- package/esm/funcs/worlds-stop-world.d.ts.map +1 -0
- package/esm/funcs/worlds-stop-world.js +94 -0
- package/esm/funcs/worlds-stop-world.js.map +1 -0
- package/esm/hooks/hooks.d.ts +25 -0
- package/esm/hooks/hooks.d.ts.map +1 -0
- package/esm/hooks/hooks.js +82 -0
- package/esm/hooks/hooks.js.map +1 -0
- package/esm/hooks/index.d.ts +3 -0
- package/esm/hooks/index.d.ts.map +1 -0
- package/esm/hooks/index.js +6 -0
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/registration.d.ts +3 -0
- package/esm/hooks/registration.d.ts.map +1 -0
- package/esm/hooks/registration.js +12 -0
- package/esm/hooks/registration.js.map +1 -0
- package/esm/hooks/types.d.ts +77 -0
- package/esm/hooks/types.d.ts.map +1 -0
- package/esm/hooks/types.js +5 -0
- package/esm/hooks/types.js.map +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +8 -0
- package/esm/index.js.map +1 -0
- package/esm/lib/base64.d.ts +10 -0
- package/esm/lib/base64.d.ts.map +1 -0
- package/esm/lib/base64.js +31 -0
- package/esm/lib/base64.js.map +1 -0
- package/esm/lib/config.d.ts +38 -0
- package/esm/lib/config.d.ts.map +1 -0
- package/esm/lib/config.js +34 -0
- package/esm/lib/config.js.map +1 -0
- package/esm/lib/encodings.d.ts +55 -0
- package/esm/lib/encodings.d.ts.map +1 -0
- package/esm/lib/encodings.js +407 -0
- package/esm/lib/encodings.js.map +1 -0
- package/esm/lib/env.d.ts +15 -0
- package/esm/lib/env.d.ts.map +1 -0
- package/esm/lib/env.js +44 -0
- package/esm/lib/env.js.map +1 -0
- package/esm/lib/files.d.ts +26 -0
- package/esm/lib/files.d.ts.map +1 -0
- package/esm/lib/files.js +91 -0
- package/esm/lib/files.js.map +1 -0
- package/esm/lib/http.d.ts +67 -0
- package/esm/lib/http.d.ts.map +1 -0
- package/esm/lib/http.js +209 -0
- package/esm/lib/http.js.map +1 -0
- package/esm/lib/logger.d.ts +6 -0
- package/esm/lib/logger.d.ts.map +1 -0
- package/esm/lib/logger.js +5 -0
- package/esm/lib/logger.js.map +1 -0
- package/esm/lib/matchers.d.ts +59 -0
- package/esm/lib/matchers.d.ts.map +1 -0
- package/esm/lib/matchers.js +202 -0
- package/esm/lib/matchers.js.map +1 -0
- package/esm/lib/primitives.d.ts +27 -0
- package/esm/lib/primitives.d.ts.map +1 -0
- package/esm/lib/primitives.js +120 -0
- package/esm/lib/primitives.js.map +1 -0
- package/esm/lib/retries.d.ts +38 -0
- package/esm/lib/retries.d.ts.map +1 -0
- package/esm/lib/retries.js +157 -0
- package/esm/lib/retries.js.map +1 -0
- package/esm/lib/schemas.d.ts +21 -0
- package/esm/lib/schemas.d.ts.map +1 -0
- package/esm/lib/schemas.js +57 -0
- package/esm/lib/schemas.js.map +1 -0
- package/esm/lib/sdks.d.ts +63 -0
- package/esm/lib/sdks.d.ts.map +1 -0
- package/esm/lib/sdks.js +294 -0
- package/esm/lib/sdks.js.map +1 -0
- package/esm/lib/security.d.ts +84 -0
- package/esm/lib/security.d.ts.map +1 -0
- package/esm/lib/security.js +147 -0
- package/esm/lib/security.js.map +1 -0
- package/esm/lib/url.d.ts +5 -0
- package/esm/lib/url.d.ts.map +1 -0
- package/esm/lib/url.js +24 -0
- package/esm/lib/url.js.map +1 -0
- package/esm/models/build-simulator-request.d.ts +67 -0
- package/esm/models/build-simulator-request.d.ts.map +1 -0
- package/esm/models/build-simulator-request.js +41 -0
- package/esm/models/build-simulator-request.js.map +1 -0
- package/esm/models/build-world-request.d.ts +20 -0
- package/esm/models/build-world-request.d.ts.map +1 -0
- package/esm/models/build-world-request.js +13 -0
- package/esm/models/build-world-request.js.map +1 -0
- package/esm/models/create-simulation-request.d.ts +20 -0
- package/esm/models/create-simulation-request.d.ts.map +1 -0
- package/esm/models/create-simulation-request.js +18 -0
- package/esm/models/create-simulation-request.js.map +1 -0
- package/esm/models/created-simulation.d.ts +60 -0
- package/esm/models/created-simulation.d.ts.map +1 -0
- package/esm/models/created-simulation.js +41 -0
- package/esm/models/created-simulation.js.map +1 -0
- package/esm/models/errors/continuous-default-error.d.ts +10 -0
- package/esm/models/errors/continuous-default-error.d.ts.map +1 -0
- package/esm/models/errors/continuous-default-error.js +30 -0
- package/esm/models/errors/continuous-default-error.js.map +1 -0
- package/esm/models/errors/continuous-error.d.ts +19 -0
- package/esm/models/errors/continuous-error.d.ts.map +1 -0
- package/esm/models/errors/continuous-error.js +26 -0
- package/esm/models/errors/continuous-error.js.map +1 -0
- package/esm/models/errors/continuous-simulation-default-error.d.ts +10 -0
- package/esm/models/errors/continuous-simulation-default-error.d.ts.map +1 -0
- package/esm/models/errors/continuous-simulation-default-error.js +30 -0
- package/esm/models/errors/continuous-simulation-default-error.js.map +1 -0
- package/esm/models/errors/continuous-simulation-error.d.ts +19 -0
- package/esm/models/errors/continuous-simulation-error.d.ts.map +1 -0
- package/esm/models/errors/continuous-simulation-error.js +26 -0
- package/esm/models/errors/continuous-simulation-error.js.map +1 -0
- package/esm/models/errors/error.d.ts +32 -0
- package/esm/models/errors/error.d.ts.map +1 -0
- package/esm/models/errors/error.js +43 -0
- package/esm/models/errors/error.js.map +1 -0
- package/esm/models/errors/http-client-errors.d.ts +44 -0
- package/esm/models/errors/http-client-errors.d.ts.map +1 -0
- package/esm/models/errors/http-client-errors.js +56 -0
- package/esm/models/errors/http-client-errors.js.map +1 -0
- package/esm/models/errors/index.d.ts +7 -0
- package/esm/models/errors/index.d.ts.map +1 -0
- package/esm/models/errors/index.js +10 -0
- package/esm/models/errors/index.js.map +1 -0
- package/esm/models/errors/response-validation-error.d.ts +26 -0
- package/esm/models/errors/response-validation-error.d.ts.map +1 -0
- package/esm/models/errors/response-validation-error.js +37 -0
- package/esm/models/errors/response-validation-error.js.map +1 -0
- package/esm/models/errors/sdk-validation-error.d.ts +21 -0
- package/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
- package/esm/models/errors/sdk-validation-error.js +52 -0
- package/esm/models/errors/sdk-validation-error.js.map +1 -0
- package/esm/models/fork-simulation-request.d.ts +20 -0
- package/esm/models/fork-simulation-request.d.ts.map +1 -0
- package/esm/models/fork-simulation-request.js +18 -0
- package/esm/models/fork-simulation-request.js.map +1 -0
- package/esm/models/index.d.ts +19 -0
- package/esm/models/index.d.ts.map +1 -0
- package/esm/models/index.js +22 -0
- package/esm/models/index.js.map +1 -0
- package/esm/models/list-simulation-steps-response.d.ts +18 -0
- package/esm/models/list-simulation-steps-response.d.ts.map +1 -0
- package/esm/models/list-simulation-steps-response.js +21 -0
- package/esm/models/list-simulation-steps-response.js.map +1 -0
- package/esm/models/list-simulations-response.d.ts +18 -0
- package/esm/models/list-simulations-response.d.ts.map +1 -0
- package/esm/models/list-simulations-response.js +21 -0
- package/esm/models/list-simulations-response.js.map +1 -0
- package/esm/models/list-simulators-response.d.ts +18 -0
- package/esm/models/list-simulators-response.d.ts.map +1 -0
- package/esm/models/list-simulators-response.js +21 -0
- package/esm/models/list-simulators-response.js.map +1 -0
- package/esm/models/list-worlds-response.d.ts +18 -0
- package/esm/models/list-worlds-response.d.ts.map +1 -0
- package/esm/models/list-worlds-response.js +21 -0
- package/esm/models/list-worlds-response.js.map +1 -0
- package/esm/models/mint-simulation-token-request.d.ts +15 -0
- package/esm/models/mint-simulation-token-request.d.ts.map +1 -0
- package/esm/models/mint-simulation-token-request.js +17 -0
- package/esm/models/mint-simulation-token-request.js.map +1 -0
- package/esm/models/operations/build-simulator.d.ts +30 -0
- package/esm/models/operations/build-simulator.d.ts.map +1 -0
- package/esm/models/operations/build-simulator.js +28 -0
- package/esm/models/operations/build-simulator.js.map +1 -0
- package/esm/models/operations/cancel-simulator-build.d.ts +15 -0
- package/esm/models/operations/cancel-simulator-build.d.ts.map +1 -0
- package/esm/models/operations/cancel-simulator-build.js +12 -0
- package/esm/models/operations/cancel-simulator-build.js.map +1 -0
- package/esm/models/operations/cancel-world-build.d.ts +15 -0
- package/esm/models/operations/cancel-world-build.d.ts.map +1 -0
- package/esm/models/operations/cancel-world-build.js +12 -0
- package/esm/models/operations/cancel-world-build.js.map +1 -0
- package/esm/models/operations/delete-simulation.d.ts +15 -0
- package/esm/models/operations/delete-simulation.d.ts.map +1 -0
- package/esm/models/operations/delete-simulation.js +12 -0
- package/esm/models/operations/delete-simulation.js.map +1 -0
- package/esm/models/operations/delete-simulator.d.ts +15 -0
- package/esm/models/operations/delete-simulator.d.ts.map +1 -0
- package/esm/models/operations/delete-simulator.js +12 -0
- package/esm/models/operations/delete-simulator.js.map +1 -0
- package/esm/models/operations/delete-world.d.ts +15 -0
- package/esm/models/operations/delete-world.d.ts.map +1 -0
- package/esm/models/operations/delete-world.js +12 -0
- package/esm/models/operations/delete-world.js.map +1 -0
- package/esm/models/operations/fork-simulation.d.ts +18 -0
- package/esm/models/operations/fork-simulation.d.ts.map +1 -0
- package/esm/models/operations/fork-simulation.js +14 -0
- package/esm/models/operations/fork-simulation.js.map +1 -0
- package/esm/models/operations/get-simulation.d.ts +15 -0
- package/esm/models/operations/get-simulation.d.ts.map +1 -0
- package/esm/models/operations/get-simulation.js +12 -0
- package/esm/models/operations/get-simulation.js.map +1 -0
- package/esm/models/operations/get-simulator.d.ts +15 -0
- package/esm/models/operations/get-simulator.d.ts.map +1 -0
- package/esm/models/operations/get-simulator.js +12 -0
- package/esm/models/operations/get-simulator.js.map +1 -0
- package/esm/models/operations/get-world.d.ts +15 -0
- package/esm/models/operations/get-world.d.ts.map +1 -0
- package/esm/models/operations/get-world.js +12 -0
- package/esm/models/operations/get-world.js.map +1 -0
- package/esm/models/operations/index.d.ts +20 -0
- package/esm/models/operations/index.d.ts.map +1 -0
- package/esm/models/operations/index.js +23 -0
- package/esm/models/operations/index.js.map +1 -0
- package/esm/models/operations/list-simulation-steps.d.ts +25 -0
- package/esm/models/operations/list-simulation-steps.d.ts.map +1 -0
- package/esm/models/operations/list-simulation-steps.js +14 -0
- package/esm/models/operations/list-simulation-steps.js.map +1 -0
- package/esm/models/operations/list-simulations.d.ts +45 -0
- package/esm/models/operations/list-simulations.d.ts.map +1 -0
- package/esm/models/operations/list-simulations.js +30 -0
- package/esm/models/operations/list-simulations.js.map +1 -0
- package/esm/models/operations/list-simulators.d.ts +46 -0
- package/esm/models/operations/list-simulators.d.ts.map +1 -0
- package/esm/models/operations/list-simulators.js +26 -0
- package/esm/models/operations/list-simulators.js.map +1 -0
- package/esm/models/operations/list-worlds.d.ts +20 -0
- package/esm/models/operations/list-worlds.d.ts.map +1 -0
- package/esm/models/operations/list-worlds.js +13 -0
- package/esm/models/operations/list-worlds.js.map +1 -0
- package/esm/models/operations/mint-simulation-token.d.ts +18 -0
- package/esm/models/operations/mint-simulation-token.d.ts.map +1 -0
- package/esm/models/operations/mint-simulation-token.js +14 -0
- package/esm/models/operations/mint-simulation-token.js.map +1 -0
- package/esm/models/operations/start-simulation.d.ts +15 -0
- package/esm/models/operations/start-simulation.d.ts.map +1 -0
- package/esm/models/operations/start-simulation.js +12 -0
- package/esm/models/operations/start-simulation.js.map +1 -0
- package/esm/models/operations/start-world.d.ts +15 -0
- package/esm/models/operations/start-world.d.ts.map +1 -0
- package/esm/models/operations/start-world.js +12 -0
- package/esm/models/operations/start-world.js.map +1 -0
- package/esm/models/operations/stop-simulation.d.ts +15 -0
- package/esm/models/operations/stop-simulation.d.ts.map +1 -0
- package/esm/models/operations/stop-simulation.js +12 -0
- package/esm/models/operations/stop-simulation.js.map +1 -0
- package/esm/models/operations/stop-world.d.ts +15 -0
- package/esm/models/operations/stop-world.d.ts.map +1 -0
- package/esm/models/operations/stop-world.js +12 -0
- package/esm/models/operations/stop-world.js.map +1 -0
- package/esm/models/resource-error.d.ts +17 -0
- package/esm/models/resource-error.d.ts.map +1 -0
- package/esm/models/resource-error.js +15 -0
- package/esm/models/resource-error.js.map +1 -0
- package/esm/models/security.d.ts +12 -0
- package/esm/models/security.d.ts.map +1 -0
- package/esm/models/security.js +12 -0
- package/esm/models/security.js.map +1 -0
- package/esm/models/simulation-token.d.ts +17 -0
- package/esm/models/simulation-token.d.ts.map +1 -0
- package/esm/models/simulation-token.js +20 -0
- package/esm/models/simulation-token.js.map +1 -0
- package/esm/models/simulation.d.ts +52 -0
- package/esm/models/simulation.d.ts.map +1 -0
- package/esm/models/simulation.js +39 -0
- package/esm/models/simulation.js.map +1 -0
- package/esm/models/simulator.d.ts +64 -0
- package/esm/models/simulator.d.ts.map +1 -0
- package/esm/models/simulator.js +50 -0
- package/esm/models/simulator.js.map +1 -0
- package/esm/models/step.d.ts +17 -0
- package/esm/models/step.d.ts.map +1 -0
- package/esm/models/step.js +15 -0
- package/esm/models/step.js.map +1 -0
- package/esm/models/world-simulation.d.ts +17 -0
- package/esm/models/world-simulation.d.ts.map +1 -0
- package/esm/models/world-simulation.js +20 -0
- package/esm/models/world-simulation.js.map +1 -0
- package/esm/models/world.d.ts +54 -0
- package/esm/models/world.d.ts.map +1 -0
- package/esm/models/world.js +41 -0
- package/esm/models/world.js.map +1 -0
- package/esm/sdk/index.d.ts +2 -0
- package/esm/sdk/index.d.ts.map +1 -0
- package/esm/sdk/index.js +5 -0
- package/esm/sdk/index.js.map +1 -0
- package/esm/sdk/sdk.d.ts +13 -0
- package/esm/sdk/sdk.d.ts.map +1 -0
- package/esm/sdk/sdk.js +22 -0
- package/esm/sdk/sdk.js.map +1 -0
- package/esm/sdk/simulations.d.ts +69 -0
- package/esm/sdk/simulations.d.ts.map +1 -0
- package/esm/sdk/simulations.js +98 -0
- package/esm/sdk/simulations.js.map +1 -0
- package/esm/sdk/simulators.d.ts +41 -0
- package/esm/sdk/simulators.d.ts.map +1 -0
- package/esm/sdk/simulators.js +58 -0
- package/esm/sdk/simulators.js.map +1 -0
- package/esm/sdk/worlds.d.ts +55 -0
- package/esm/sdk/worlds.d.ts.map +1 -0
- package/esm/sdk/worlds.js +78 -0
- package/esm/sdk/worlds.js.map +1 -0
- package/esm/types/async.d.ts +23 -0
- package/esm/types/async.d.ts.map +1 -0
- package/esm/types/async.js +28 -0
- package/esm/types/async.js.map +1 -0
- package/esm/types/blobs.d.ts +4 -0
- package/esm/types/blobs.d.ts.map +1 -0
- package/esm/types/blobs.js +25 -0
- package/esm/types/blobs.js.map +1 -0
- package/esm/types/const-date-time.d.ts +3 -0
- package/esm/types/const-date-time.d.ts.map +1 -0
- package/esm/types/const-date-time.js +10 -0
- package/esm/types/const-date-time.js.map +1 -0
- package/esm/types/default-to-zero-value.d.ts +12 -0
- package/esm/types/default-to-zero-value.d.ts.map +1 -0
- package/esm/types/default-to-zero-value.js +31 -0
- package/esm/types/default-to-zero-value.js.map +1 -0
- package/esm/types/enums.d.ts +9 -0
- package/esm/types/enums.d.ts.map +1 -0
- package/esm/types/enums.js +27 -0
- package/esm/types/enums.js.map +1 -0
- package/esm/types/fp.d.ts +31 -0
- package/esm/types/fp.d.ts.map +1 -0
- package/esm/types/fp.js +31 -0
- package/esm/types/fp.js.map +1 -0
- package/esm/types/index.d.ts +10 -0
- package/esm/types/index.d.ts.map +1 -0
- package/esm/types/index.js +10 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/operations.d.ts +27 -0
- package/esm/types/operations.d.ts.map +1 -0
- package/esm/types/operations.js +77 -0
- package/esm/types/operations.js.map +1 -0
- package/esm/types/primitives.d.ts +9 -0
- package/esm/types/primitives.d.ts.map +1 -0
- package/esm/types/primitives.js +109 -0
- package/esm/types/primitives.js.map +1 -0
- package/esm/types/rfcdate.d.ts +21 -0
- package/esm/types/rfcdate.d.ts.map +1 -0
- package/esm/types/rfcdate.js +43 -0
- package/esm/types/rfcdate.js.map +1 -0
- package/esm/types/smart-union.d.ts +7 -0
- package/esm/types/smart-union.d.ts.map +1 -0
- package/esm/types/smart-union.js +117 -0
- package/esm/types/smart-union.js.map +1 -0
- package/esm/types/streams.d.ts +2 -0
- package/esm/types/streams.d.ts.map +1 -0
- package/esm/types/streams.js +15 -0
- package/esm/types/streams.js.map +1 -0
- package/esm/types/unrecognized.d.ts +16 -0
- package/esm/types/unrecognized.d.ts.map +1 -0
- package/esm/types/unrecognized.js +31 -0
- package/esm/types/unrecognized.js.map +1 -0
- package/examples/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/examples/node_modules/@types/node/assert.d.ts +1062 -0
- package/examples/node_modules/@types/node/async_hooks.d.ts +605 -0
- package/examples/node_modules/@types/node/buffer.buffer.d.ts +471 -0
- package/examples/node_modules/@types/node/buffer.d.ts +1936 -0
- package/examples/node_modules/@types/node/child_process.d.ts +1475 -0
- package/examples/node_modules/@types/node/cluster.d.ts +577 -0
- package/examples/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/examples/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/examples/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/examples/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/examples/node_modules/@types/node/console.d.ts +452 -0
- package/examples/node_modules/@types/node/constants.d.ts +21 -0
- package/examples/node_modules/@types/node/crypto.d.ts +4590 -0
- package/examples/node_modules/@types/node/dgram.d.ts +597 -0
- package/examples/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
- package/examples/node_modules/@types/node/dns/promises.d.ts +479 -0
- package/examples/node_modules/@types/node/dns.d.ts +871 -0
- package/examples/node_modules/@types/node/domain.d.ts +170 -0
- package/examples/node_modules/@types/node/events.d.ts +977 -0
- package/examples/node_modules/@types/node/fs/promises.d.ts +1270 -0
- package/examples/node_modules/@types/node/fs.d.ts +4375 -0
- package/examples/node_modules/@types/node/globals.d.ts +172 -0
- package/examples/node_modules/@types/node/globals.typedarray.d.ts +38 -0
- package/examples/node_modules/@types/node/http.d.ts +2049 -0
- package/examples/node_modules/@types/node/http2.d.ts +2712 -0
- package/examples/node_modules/@types/node/https.d.ts +578 -0
- package/examples/node_modules/@types/node/index.d.ts +93 -0
- package/examples/node_modules/@types/node/inspector.generated.d.ts +3966 -0
- package/examples/node_modules/@types/node/module.d.ts +539 -0
- package/examples/node_modules/@types/node/net.d.ts +1031 -0
- package/examples/node_modules/@types/node/os.d.ts +506 -0
- package/examples/node_modules/@types/node/path.d.ts +200 -0
- package/examples/node_modules/@types/node/perf_hooks.d.ts +961 -0
- package/examples/node_modules/@types/node/process.d.ts +1961 -0
- package/examples/node_modules/@types/node/punycode.d.ts +117 -0
- package/examples/node_modules/@types/node/querystring.d.ts +152 -0
- package/examples/node_modules/@types/node/readline/promises.d.ts +162 -0
- package/examples/node_modules/@types/node/readline.d.ts +589 -0
- package/examples/node_modules/@types/node/repl.d.ts +430 -0
- package/examples/node_modules/@types/node/sea.d.ts +153 -0
- package/examples/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/examples/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/examples/node_modules/@types/node/stream/web.d.ts +533 -0
- package/examples/node_modules/@types/node/stream.d.ts +1698 -0
- package/examples/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/examples/node_modules/@types/node/test.d.ts +1787 -0
- package/examples/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/examples/node_modules/@types/node/timers.d.ts +286 -0
- package/examples/node_modules/@types/node/tls.d.ts +1259 -0
- package/examples/node_modules/@types/node/trace_events.d.ts +197 -0
- package/examples/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/examples/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
- package/examples/node_modules/@types/node/ts5.6/index.d.ts +93 -0
- package/examples/node_modules/@types/node/tty.d.ts +208 -0
- package/examples/node_modules/@types/node/url.d.ts +964 -0
- package/examples/node_modules/@types/node/util.d.ts +2331 -0
- package/examples/node_modules/@types/node/v8.d.ts +809 -0
- package/examples/node_modules/@types/node/vm.d.ts +1001 -0
- package/examples/node_modules/@types/node/wasi.d.ts +181 -0
- package/examples/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/examples/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/examples/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/examples/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
- package/examples/node_modules/@types/node/worker_threads.d.ts +715 -0
- package/examples/node_modules/@types/node/zlib.d.ts +598 -0
- package/examples/node_modules/dotenv/config.d.ts +1 -0
- package/examples/node_modules/dotenv/config.js +9 -0
- package/examples/node_modules/dotenv/lib/cli-options.js +17 -0
- package/examples/node_modules/dotenv/lib/env-options.js +28 -0
- package/examples/node_modules/dotenv/lib/main.d.ts +162 -0
- package/examples/node_modules/dotenv/lib/main.js +386 -0
- package/examples/node_modules/esbuild/install.js +300 -0
- package/examples/node_modules/esbuild/lib/main.d.ts +720 -0
- package/examples/node_modules/esbuild/lib/main.js +2536 -0
- package/examples/node_modules/tsx/dist/cjs/api/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/cjs/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/cli.mjs +55 -0
- package/examples/node_modules/tsx/dist/client-D_mPDF5S.mjs +1 -0
- package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/esm/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/get-pipe-path-_tAJyU_v.mjs +1 -0
- package/examples/node_modules/tsx/dist/index-DCefr8NP.mjs +14 -0
- package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +1 -0
- package/examples/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +3 -0
- package/examples/node_modules/tsx/dist/loader.mjs +1 -0
- package/examples/node_modules/tsx/dist/node-features-JeyyvQz6.mjs +1 -0
- package/examples/node_modules/tsx/dist/package-BL7Whz21.mjs +1 -0
- package/examples/node_modules/tsx/dist/patch-repl.mjs +1 -0
- package/examples/node_modules/tsx/dist/preflight.mjs +1 -0
- package/examples/node_modules/tsx/dist/register-DHgpdRjs.mjs +10 -0
- package/examples/node_modules/tsx/dist/register-SoqaU4rg.mjs +2 -0
- package/examples/node_modules/tsx/dist/repl.mjs +3 -0
- package/examples/node_modules/tsx/dist/require-Cuv-0BLU.mjs +1 -0
- package/examples/node_modules/tsx/dist/suppress-warnings.mjs +1 -0
- package/examples/node_modules/tsx/dist/temporary-directory-BDDVQOvU.mjs +1 -0
- package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +5 -0
- package/examples/node_modules/undici-types/agent.d.ts +31 -0
- package/examples/node_modules/undici-types/api.d.ts +43 -0
- package/examples/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/examples/node_modules/undici-types/cache.d.ts +36 -0
- package/examples/node_modules/undici-types/client.d.ts +108 -0
- package/examples/node_modules/undici-types/connector.d.ts +34 -0
- package/examples/node_modules/undici-types/content-type.d.ts +21 -0
- package/examples/node_modules/undici-types/cookies.d.ts +28 -0
- package/examples/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/examples/node_modules/undici-types/dispatcher.d.ts +256 -0
- package/examples/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/examples/node_modules/undici-types/errors.d.ts +149 -0
- package/examples/node_modules/undici-types/eventsource.d.ts +61 -0
- package/examples/node_modules/undici-types/fetch.d.ts +209 -0
- package/examples/node_modules/undici-types/file.d.ts +39 -0
- package/examples/node_modules/undici-types/filereader.d.ts +54 -0
- package/examples/node_modules/undici-types/formdata.d.ts +108 -0
- package/examples/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/examples/node_modules/undici-types/global-origin.d.ts +7 -0
- package/examples/node_modules/undici-types/handlers.d.ts +15 -0
- package/examples/node_modules/undici-types/header.d.ts +4 -0
- package/examples/node_modules/undici-types/index.d.ts +71 -0
- package/examples/node_modules/undici-types/interceptors.d.ts +17 -0
- package/examples/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/examples/node_modules/undici-types/mock-client.d.ts +25 -0
- package/examples/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/examples/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/examples/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/examples/node_modules/undici-types/patch.d.ts +33 -0
- package/examples/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/examples/node_modules/undici-types/pool.d.ts +39 -0
- package/examples/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/examples/node_modules/undici-types/readable.d.ts +65 -0
- package/examples/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/examples/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/examples/node_modules/undici-types/util.d.ts +18 -0
- package/examples/node_modules/undici-types/webidl.d.ts +228 -0
- package/examples/node_modules/undici-types/websocket.d.ts +150 -0
- package/examples/simulationsListSimulations.example.ts +26 -0
- package/jsr.json +27 -0
- package/package.json +67 -0
- package/src/core.ts +13 -0
- package/src/funcs/simulations-create-simulation.ts +179 -0
- package/src/funcs/simulations-delete-simulation.ts +183 -0
- package/src/funcs/simulations-fork-simulation.ts +186 -0
- package/src/funcs/simulations-get-simulation.ts +183 -0
- package/src/funcs/simulations-list-simulation-steps.ts +190 -0
- package/src/funcs/simulations-list-simulations.ts +189 -0
- package/src/funcs/simulations-mint-simulation-token.ts +187 -0
- package/src/funcs/simulations-start-simulation.ts +183 -0
- package/src/funcs/simulations-stop-simulation.ts +183 -0
- package/src/funcs/simulators-build-simulator.ts +219 -0
- package/src/funcs/simulators-cancel-simulator-build.ts +184 -0
- package/src/funcs/simulators-delete-simulator.ts +182 -0
- package/src/funcs/simulators-get-simulator.ts +183 -0
- package/src/funcs/simulators-list-simulators.ts +189 -0
- package/src/funcs/worlds-build-world.ts +179 -0
- package/src/funcs/worlds-cancel-world-build.ts +184 -0
- package/src/funcs/worlds-delete-world.ts +182 -0
- package/src/funcs/worlds-get-world.ts +183 -0
- package/src/funcs/worlds-list-worlds.ts +184 -0
- package/src/funcs/worlds-start-world.ts +183 -0
- package/src/funcs/worlds-stop-world.ts +183 -0
- package/src/hooks/hooks.ts +132 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/registration.ts +14 -0
- package/src/hooks/types.ts +108 -0
- package/src/index.ts +9 -0
- package/src/lib/base64.ts +39 -0
- package/src/lib/config.ts +67 -0
- package/src/lib/encodings.ts +564 -0
- package/src/lib/env.ts +61 -0
- package/src/lib/files.ts +104 -0
- package/src/lib/http.ts +325 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +353 -0
- package/src/lib/primitives.ts +166 -0
- package/src/lib/retries.ts +226 -0
- package/src/lib/schemas.ts +94 -0
- package/src/lib/sdks.ts +442 -0
- package/src/lib/security.ts +280 -0
- package/src/lib/url.ts +35 -0
- package/src/models/build-simulator-request.ts +107 -0
- package/src/models/build-world-request.ts +39 -0
- package/src/models/create-simulation-request.ts +47 -0
- package/src/models/created-simulation.ts +106 -0
- package/src/models/errors/continuous-default-error.ts +40 -0
- package/src/models/errors/continuous-error.ts +35 -0
- package/src/models/errors/error.ts +65 -0
- package/src/models/errors/http-client-errors.ts +62 -0
- package/src/models/errors/index.ts +10 -0
- package/src/models/errors/response-validation-error.ts +50 -0
- package/src/models/errors/sdk-validation-error.ts +54 -0
- package/src/models/fork-simulation-request.ts +47 -0
- package/src/models/index.ts +22 -0
- package/src/models/list-simulation-steps-response.ts +48 -0
- package/src/models/list-simulations-response.ts +48 -0
- package/src/models/list-simulators-response.ts +48 -0
- package/src/models/list-worlds-response.ts +48 -0
- package/src/models/mint-simulation-token-request.ts +41 -0
- package/src/models/operations/build-simulator.ts +68 -0
- package/src/models/operations/cancel-simulator-build.ts +35 -0
- package/src/models/operations/cancel-world-build.ts +33 -0
- package/src/models/operations/delete-simulation.ts +33 -0
- package/src/models/operations/delete-simulator.ts +33 -0
- package/src/models/operations/delete-world.ts +33 -0
- package/src/models/operations/fork-simulation.ts +37 -0
- package/src/models/operations/get-simulation.ts +33 -0
- package/src/models/operations/get-simulator.ts +33 -0
- package/src/models/operations/get-world.ts +31 -0
- package/src/models/operations/index.ts +23 -0
- package/src/models/operations/list-simulation-steps.ts +45 -0
- package/src/models/operations/list-simulations.ts +78 -0
- package/src/models/operations/list-simulators.ts +71 -0
- package/src/models/operations/list-worlds.ts +39 -0
- package/src/models/operations/mint-simulation-token.ts +37 -0
- package/src/models/operations/start-simulation.ts +33 -0
- package/src/models/operations/start-world.ts +33 -0
- package/src/models/operations/stop-simulation.ts +33 -0
- package/src/models/operations/stop-world.ts +33 -0
- package/src/models/resource-error.ts +39 -0
- package/src/models/security.ts +26 -0
- package/src/models/simulation-token.ts +47 -0
- package/src/models/simulation.ts +93 -0
- package/src/models/simulator.ts +110 -0
- package/src/models/step.ts +36 -0
- package/src/models/world-simulation.ts +47 -0
- package/src/models/world.ts +96 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/sdk.ts +25 -0
- package/src/sdk/simulations.ts +172 -0
- package/src/sdk/simulators.ts +100 -0
- package/src/sdk/worlds.ts +136 -0
- package/src/types/async.ts +69 -0
- package/src/types/blobs.ts +33 -0
- package/src/types/const-date-time.ts +15 -0
- package/src/types/default-to-zero-value.ts +33 -0
- package/src/types/enums.ts +45 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +13 -0
- package/src/types/operations.ts +105 -0
- package/src/types/primitives.ts +140 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/smart-union.ts +153 -0
- package/src/types/streams.ts +21 -0
- package/src/types/unrecognized.ts +35 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consumes a stream and returns a concatenated array buffer. Useful in
|
|
3
|
+
* situations where we need to read the whole file because it forms part of a
|
|
4
|
+
* larger payload containing other fields, and we can't modify the underlying
|
|
5
|
+
* request structure.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readableStreamToArrayBuffer(readable: ReadableStream<Uint8Array>): Promise<ArrayBuffer>;
|
|
8
|
+
/**
|
|
9
|
+
* Determines the MIME content type based on a file's extension.
|
|
10
|
+
* Returns null if the extension is not recognized.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getContentTypeFromFileName(fileName: string): string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a Blob from file content with the given MIME type.
|
|
15
|
+
*
|
|
16
|
+
* Node.js Buffers are Uint8Array subclasses that may share a pooled
|
|
17
|
+
* ArrayBuffer (byteOffset > 0, byteLength < buffer.byteLength). Passing
|
|
18
|
+
* such a Buffer directly to `new Blob([buf])` can include the entire
|
|
19
|
+
* underlying pool on some runtimes, producing a Blob with extra bytes
|
|
20
|
+
* that corrupts multipart uploads.
|
|
21
|
+
*
|
|
22
|
+
* Copying into a standalone Uint8Array ensures the Blob receives only the
|
|
23
|
+
* intended bytes regardless of runtime behaviour.
|
|
24
|
+
*/
|
|
25
|
+
export declare function bytesToBlob(content: Uint8Array<ArrayBufferLike> | ArrayBuffer | Blob | string, contentType: string): Blob;
|
|
26
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/lib/files.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,OAAO,CAAC,WAAW,CAAC,CA2BtB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoC1E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,UAAU,CAAC,eAAe,CAAC,GAAG,WAAW,GAAG,IAAI,GAAG,MAAM,EAClE,WAAW,EAAE,MAAM,GAClB,IAAI,CAKN"}
|
package/esm/lib/files.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Consumes a stream and returns a concatenated array buffer. Useful in
|
|
6
|
+
* situations where we need to read the whole file because it forms part of a
|
|
7
|
+
* larger payload containing other fields, and we can't modify the underlying
|
|
8
|
+
* request structure.
|
|
9
|
+
*/
|
|
10
|
+
export async function readableStreamToArrayBuffer(readable) {
|
|
11
|
+
const reader = readable.getReader();
|
|
12
|
+
const chunks = [];
|
|
13
|
+
let totalLength = 0;
|
|
14
|
+
let done = false;
|
|
15
|
+
while (!done) {
|
|
16
|
+
const { value, done: doneReading } = await reader.read();
|
|
17
|
+
if (doneReading) {
|
|
18
|
+
done = true;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
chunks.push(value);
|
|
22
|
+
totalLength += value.length;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const concatenatedChunks = new Uint8Array(totalLength);
|
|
26
|
+
let offset = 0;
|
|
27
|
+
for (const chunk of chunks) {
|
|
28
|
+
concatenatedChunks.set(chunk, offset);
|
|
29
|
+
offset += chunk.length;
|
|
30
|
+
}
|
|
31
|
+
return concatenatedChunks.buffer;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Determines the MIME content type based on a file's extension.
|
|
35
|
+
* Returns null if the extension is not recognized.
|
|
36
|
+
*/
|
|
37
|
+
export function getContentTypeFromFileName(fileName) {
|
|
38
|
+
if (!fileName)
|
|
39
|
+
return null;
|
|
40
|
+
const ext = fileName.toLowerCase().split(".").pop();
|
|
41
|
+
if (!ext)
|
|
42
|
+
return null;
|
|
43
|
+
const mimeTypes = {
|
|
44
|
+
json: "application/json",
|
|
45
|
+
xml: "application/xml",
|
|
46
|
+
html: "text/html",
|
|
47
|
+
htm: "text/html",
|
|
48
|
+
txt: "text/plain",
|
|
49
|
+
csv: "text/csv",
|
|
50
|
+
pdf: "application/pdf",
|
|
51
|
+
png: "image/png",
|
|
52
|
+
jpg: "image/jpeg",
|
|
53
|
+
jpeg: "image/jpeg",
|
|
54
|
+
gif: "image/gif",
|
|
55
|
+
svg: "image/svg+xml",
|
|
56
|
+
js: "application/javascript",
|
|
57
|
+
css: "text/css",
|
|
58
|
+
zip: "application/zip",
|
|
59
|
+
tar: "application/x-tar",
|
|
60
|
+
gz: "application/gzip",
|
|
61
|
+
mp4: "video/mp4",
|
|
62
|
+
mp3: "audio/mpeg",
|
|
63
|
+
wav: "audio/wav",
|
|
64
|
+
webp: "image/webp",
|
|
65
|
+
ico: "image/x-icon",
|
|
66
|
+
woff: "font/woff",
|
|
67
|
+
woff2: "font/woff2",
|
|
68
|
+
ttf: "font/ttf",
|
|
69
|
+
otf: "font/otf",
|
|
70
|
+
};
|
|
71
|
+
return mimeTypes[ext] || null;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Creates a Blob from file content with the given MIME type.
|
|
75
|
+
*
|
|
76
|
+
* Node.js Buffers are Uint8Array subclasses that may share a pooled
|
|
77
|
+
* ArrayBuffer (byteOffset > 0, byteLength < buffer.byteLength). Passing
|
|
78
|
+
* such a Buffer directly to `new Blob([buf])` can include the entire
|
|
79
|
+
* underlying pool on some runtimes, producing a Blob with extra bytes
|
|
80
|
+
* that corrupts multipart uploads.
|
|
81
|
+
*
|
|
82
|
+
* Copying into a standalone Uint8Array ensures the Blob receives only the
|
|
83
|
+
* intended bytes regardless of runtime behaviour.
|
|
84
|
+
*/
|
|
85
|
+
export function bytesToBlob(content, contentType) {
|
|
86
|
+
if (content instanceof Uint8Array) {
|
|
87
|
+
return new Blob([new Uint8Array(content)], { type: contentType });
|
|
88
|
+
}
|
|
89
|
+
return new Blob([content], { type: contentType });
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/lib/files.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,QAAoC,EACd;IACtB,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;IACpC,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,IAAI,GAAG,KAAK,CAAC;IAEjB,OAAO,CAAC,IAAI,EAAE,CAAC;QACb,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QAEzD,IAAI,WAAW,EAAE,CAAC;YAChB,IAAI,GAAG,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,MAAM,kBAAkB,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACvD,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,MAAM,CA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I,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,IAAI,IAAI,CAAC,CAAC,OAAmB,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AAAA,CAC/D"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
2
|
+
export type Awaitable<T> = T | Promise<T>;
|
|
3
|
+
export type RequestInput = {
|
|
4
|
+
/**
|
|
5
|
+
* The URL the request will use.
|
|
6
|
+
*/
|
|
7
|
+
url: URL;
|
|
8
|
+
/**
|
|
9
|
+
* Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request).
|
|
10
|
+
*/
|
|
11
|
+
options?: RequestInit | undefined;
|
|
12
|
+
};
|
|
13
|
+
export interface HTTPClientOptions {
|
|
14
|
+
fetcher?: Fetcher;
|
|
15
|
+
}
|
|
16
|
+
export type BeforeRequestHook = (req: Request) => Awaitable<Request | void>;
|
|
17
|
+
export type RequestErrorHook = (err: unknown, req: Request) => Awaitable<void>;
|
|
18
|
+
export type ResponseHook = (res: Response, req: Request) => Awaitable<void>;
|
|
19
|
+
export declare class HTTPClient {
|
|
20
|
+
private fetcher;
|
|
21
|
+
private requestHooks;
|
|
22
|
+
private requestErrorHooks;
|
|
23
|
+
private responseHooks;
|
|
24
|
+
private options;
|
|
25
|
+
constructor(options?: HTTPClientOptions);
|
|
26
|
+
request(request: Request): Promise<Response>;
|
|
27
|
+
/**
|
|
28
|
+
* Registers a hook that is called before a request is made. The hook function
|
|
29
|
+
* can mutate the request or return a new request. This may be useful to add
|
|
30
|
+
* additional information to request such as request IDs and tracing headers.
|
|
31
|
+
*/
|
|
32
|
+
addHook(hook: "beforeRequest", fn: BeforeRequestHook): this;
|
|
33
|
+
/**
|
|
34
|
+
* Registers a hook that is called when a request cannot be made due to a
|
|
35
|
+
* network error.
|
|
36
|
+
*/
|
|
37
|
+
addHook(hook: "requestError", fn: RequestErrorHook): this;
|
|
38
|
+
/**
|
|
39
|
+
* Registers a hook that is called when a response has been received from the
|
|
40
|
+
* server.
|
|
41
|
+
*/
|
|
42
|
+
addHook(hook: "response", fn: ResponseHook): this;
|
|
43
|
+
/** Removes a hook that was previously registered with `addHook`. */
|
|
44
|
+
removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this;
|
|
45
|
+
/** Removes a hook that was previously registered with `addHook`. */
|
|
46
|
+
removeHook(hook: "requestError", fn: RequestErrorHook): this;
|
|
47
|
+
/** Removes a hook that was previously registered with `addHook`. */
|
|
48
|
+
removeHook(hook: "response", fn: ResponseHook): this;
|
|
49
|
+
clone(): HTTPClient;
|
|
50
|
+
}
|
|
51
|
+
export type StatusCodePredicate = number | string | (number | string)[];
|
|
52
|
+
export declare function matchContentType(response: Response, pattern: string): boolean;
|
|
53
|
+
export declare function matchStatusCode(response: Response, codes: StatusCodePredicate): boolean;
|
|
54
|
+
export declare function matchResponse(response: Response, code: StatusCodePredicate, contentTypePattern: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Uses various heurisitics to determine if an error is a connection error.
|
|
57
|
+
*/
|
|
58
|
+
export declare function isConnectionError(err: unknown): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Uses various heurisitics to determine if an error is a timeout error.
|
|
61
|
+
*/
|
|
62
|
+
export declare function isTimeoutError(err: unknown): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Uses various heurisitics to determine if an error is a abort error.
|
|
65
|
+
*/
|
|
66
|
+
export declare function isAbortError(err: unknown): boolean;
|
|
67
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/lib/http.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,CACpB,KAAK,EAAE,WAAW,GAAG,GAAG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E,UAAU,EAAE,EAAE,EAAE,YAAY,GAAG,IAAI,CAAC;IAmBlD,oEAAoE;IACpE,UAAU,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC/D,oEAAoE;IACpE,UAAU,CAAC,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC7D,oEAAoE;IACpE,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,YAAY,GAAG,IAAI,CAAC;IA0BrD,KAAK,IAAI,UAAU,CAOlB;CACF;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAMxE,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CA8C7E;AAID,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,mBAAmB,GACzB,OAAO,CA8BT;AAED,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,mBAAmB,EACzB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAKT;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAsBvD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAgBpD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAgBlD"}
|
package/esm/lib/http.js
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
const DEFAULT_FETCHER = (input, init) => {
|
|
5
|
+
// If input is a Request and init is undefined, Bun will discard the method,
|
|
6
|
+
// headers, body and other options that were set on the request object.
|
|
7
|
+
// Node.js and browers would ignore an undefined init value. This check is
|
|
8
|
+
// therefore needed for interop with Bun.
|
|
9
|
+
if (init == null) {
|
|
10
|
+
return fetch(input);
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
return fetch(input, init);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export class HTTPClient {
|
|
17
|
+
fetcher;
|
|
18
|
+
requestHooks = [];
|
|
19
|
+
requestErrorHooks = [];
|
|
20
|
+
responseHooks = [];
|
|
21
|
+
options;
|
|
22
|
+
constructor(options = {}) {
|
|
23
|
+
this.options = options;
|
|
24
|
+
this.fetcher = options.fetcher || DEFAULT_FETCHER;
|
|
25
|
+
}
|
|
26
|
+
async request(request) {
|
|
27
|
+
let req = request;
|
|
28
|
+
for (const hook of this.requestHooks) {
|
|
29
|
+
const nextRequest = await hook(req);
|
|
30
|
+
if (nextRequest) {
|
|
31
|
+
req = nextRequest;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
const res = await this.fetcher(req);
|
|
36
|
+
for (const hook of this.responseHooks) {
|
|
37
|
+
await hook(res, req);
|
|
38
|
+
}
|
|
39
|
+
return res;
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
for (const hook of this.requestErrorHooks) {
|
|
43
|
+
await hook(err, req);
|
|
44
|
+
}
|
|
45
|
+
throw err;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
addHook(...args) {
|
|
49
|
+
if (args[0] === "beforeRequest") {
|
|
50
|
+
this.requestHooks.push(args[1]);
|
|
51
|
+
}
|
|
52
|
+
else if (args[0] === "requestError") {
|
|
53
|
+
this.requestErrorHooks.push(args[1]);
|
|
54
|
+
}
|
|
55
|
+
else if (args[0] === "response") {
|
|
56
|
+
this.responseHooks.push(args[1]);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
throw new Error(`Invalid hook type: ${args[0]}`);
|
|
60
|
+
}
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
removeHook(...args) {
|
|
64
|
+
let target;
|
|
65
|
+
if (args[0] === "beforeRequest") {
|
|
66
|
+
target = this.requestHooks;
|
|
67
|
+
}
|
|
68
|
+
else if (args[0] === "requestError") {
|
|
69
|
+
target = this.requestErrorHooks;
|
|
70
|
+
}
|
|
71
|
+
else if (args[0] === "response") {
|
|
72
|
+
target = this.responseHooks;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
throw new Error(`Invalid hook type: ${args[0]}`);
|
|
76
|
+
}
|
|
77
|
+
const index = target.findIndex((v) => v === args[1]);
|
|
78
|
+
if (index >= 0) {
|
|
79
|
+
target.splice(index, 1);
|
|
80
|
+
}
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
clone() {
|
|
84
|
+
const child = new HTTPClient(this.options);
|
|
85
|
+
child.requestHooks = this.requestHooks.slice();
|
|
86
|
+
child.requestErrorHooks = this.requestErrorHooks.slice();
|
|
87
|
+
child.responseHooks = this.responseHooks.slice();
|
|
88
|
+
return child;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// A semicolon surrounded by optional whitespace characters is used to separate
|
|
92
|
+
// segments in a media type string.
|
|
93
|
+
const mediaParamSeparator = /\s*;\s*/g;
|
|
94
|
+
export function matchContentType(response, pattern) {
|
|
95
|
+
// `*` is a special case which means anything is acceptable.
|
|
96
|
+
if (pattern === "*") {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
let contentType = response.headers.get("content-type")?.trim() || "application/octet-stream";
|
|
100
|
+
contentType = contentType.toLowerCase();
|
|
101
|
+
const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator);
|
|
102
|
+
const [wantType = "", ...wantParams] = wantParts;
|
|
103
|
+
if (wantType.split("/").length !== 2) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
const gotParts = contentType.split(mediaParamSeparator);
|
|
107
|
+
const [gotType = "", ...gotParams] = gotParts;
|
|
108
|
+
const [type = "", subtype = ""] = gotType.split("/");
|
|
109
|
+
if (!type || !subtype) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
if (wantType !== "*/*" &&
|
|
113
|
+
gotType !== wantType &&
|
|
114
|
+
`${type}/*` !== wantType &&
|
|
115
|
+
`*/${subtype}` !== wantType) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
if (gotParams.length < wantParams.length) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
const params = new Set(gotParams);
|
|
122
|
+
for (const wantParam of wantParams) {
|
|
123
|
+
if (!params.has(wantParam)) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
const codeRangeRE = new RegExp("^[0-9]xx$", "i");
|
|
130
|
+
export function matchStatusCode(response, codes) {
|
|
131
|
+
const actual = `${response.status}`;
|
|
132
|
+
const expectedCodes = Array.isArray(codes) ? codes : [codes];
|
|
133
|
+
if (!expectedCodes.length) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
return expectedCodes.some((ec) => {
|
|
137
|
+
const code = `${ec}`;
|
|
138
|
+
if (code === "default") {
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
if (!codeRangeRE.test(`${code}`)) {
|
|
142
|
+
return code === actual;
|
|
143
|
+
}
|
|
144
|
+
const expectFamily = code.charAt(0);
|
|
145
|
+
if (!expectFamily) {
|
|
146
|
+
throw new Error("Invalid status code range");
|
|
147
|
+
}
|
|
148
|
+
const actualFamily = actual.charAt(0);
|
|
149
|
+
if (!actualFamily) {
|
|
150
|
+
throw new Error(`Invalid response status code: ${actual}`);
|
|
151
|
+
}
|
|
152
|
+
return actualFamily === expectFamily;
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
export function matchResponse(response, code, contentTypePattern) {
|
|
156
|
+
return (matchStatusCode(response, code) &&
|
|
157
|
+
matchContentType(response, contentTypePattern));
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Uses various heurisitics to determine if an error is a connection error.
|
|
161
|
+
*/
|
|
162
|
+
export function isConnectionError(err) {
|
|
163
|
+
if (typeof err !== "object" || err == null) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
// Covers fetch in Deno as well
|
|
167
|
+
const isBrowserErr = err instanceof TypeError &&
|
|
168
|
+
err.message.toLowerCase().startsWith("failed to fetch");
|
|
169
|
+
const isNodeErr = err instanceof TypeError &&
|
|
170
|
+
err.message.toLowerCase().startsWith("fetch failed");
|
|
171
|
+
const isBunErr = "name" in err && err.name === "ConnectionError";
|
|
172
|
+
const isGenericErr = "code" in err &&
|
|
173
|
+
typeof err.code === "string" &&
|
|
174
|
+
err.code.toLowerCase() === "econnreset";
|
|
175
|
+
return isBrowserErr || isNodeErr || isGenericErr || isBunErr;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Uses various heurisitics to determine if an error is a timeout error.
|
|
179
|
+
*/
|
|
180
|
+
export function isTimeoutError(err) {
|
|
181
|
+
if (typeof err !== "object" || err == null) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
// Fetch in browser, Node.js, Bun, Deno
|
|
185
|
+
const isNative = "name" in err && err.name === "TimeoutError";
|
|
186
|
+
const isLegacyNative = "code" in err && err.code === 23;
|
|
187
|
+
// Node.js HTTP client and Axios
|
|
188
|
+
const isGenericErr = "code" in err &&
|
|
189
|
+
typeof err.code === "string" &&
|
|
190
|
+
err.code.toLowerCase() === "econnaborted";
|
|
191
|
+
return isNative || isLegacyNative || isGenericErr;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Uses various heurisitics to determine if an error is a abort error.
|
|
195
|
+
*/
|
|
196
|
+
export function isAbortError(err) {
|
|
197
|
+
if (typeof err !== "object" || err == null) {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
// Fetch in browser, Node.js, Bun, Deno
|
|
201
|
+
const isNative = "name" in err && err.name === "AbortError";
|
|
202
|
+
const isLegacyNative = "code" in err && err.code === 20;
|
|
203
|
+
// Node.js HTTP client and Axios
|
|
204
|
+
const isGenericErr = "code" in err &&
|
|
205
|
+
typeof err.code === "string" &&
|
|
206
|
+
err.code.toLowerCase() === "econnaborted";
|
|
207
|
+
return isNative || isLegacyNative || isGenericErr;
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/lib/http.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,MAAM,eAAe,GAAY,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC;IAChD,4EAA4E;IAC5E,uEAAuE;IACvE,0EAA0E;IAC1E,yCAAyC;IACzC,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC5B,CAAC;AAAA,CACF,CAAC;AAqBF,MAAM,OAAO,UAAU;IACb,OAAO,CAAU;IACjB,YAAY,GAAwB,EAAE,CAAC;IACvC,iBAAiB,GAAuB,EAAE,CAAC;IAC3C,aAAa,GAAmB,EAAE,CAAC;IACnC,OAAO,CAAoB;IAEnC,YAAY,OAAO,GAAsB,EAAE,EAAE;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,eAAe,CAAC;IAAA,CACnD;IAED,KAAK,CAAC,OAAO,CAAC,OAAgB,EAAqB;QACjD,IAAI,GAAG,GAAG,OAAO,CAAC;QAClB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACrC,MAAM,WAAW,GAAG,MAAM,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AAE,GAAG,IAAI,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ContinuousDefaultError } from "../models/errors/continuous-default-error.js";
|
|
2
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
3
|
+
import { Result } from "../types/fp.js";
|
|
4
|
+
import { StatusCodePredicate } from "./http.js";
|
|
5
|
+
export type Encoding = "jsonl" | "json" | "text" | "bytes" | "stream" | "sse" | "nil" | "fail";
|
|
6
|
+
type Schema<T> = {
|
|
7
|
+
parse(raw: unknown): T;
|
|
8
|
+
};
|
|
9
|
+
type MatchOptions = {
|
|
10
|
+
ctype?: string;
|
|
11
|
+
hdrs?: boolean;
|
|
12
|
+
key?: string;
|
|
13
|
+
sseSentinel?: string;
|
|
14
|
+
};
|
|
15
|
+
export type ValueMatcher<V> = MatchOptions & {
|
|
16
|
+
enc: Encoding;
|
|
17
|
+
codes: StatusCodePredicate;
|
|
18
|
+
schema: Schema<V>;
|
|
19
|
+
};
|
|
20
|
+
export type ErrorMatcher<E> = MatchOptions & {
|
|
21
|
+
enc: Encoding;
|
|
22
|
+
codes: StatusCodePredicate;
|
|
23
|
+
schema: Schema<E>;
|
|
24
|
+
err: true;
|
|
25
|
+
};
|
|
26
|
+
export type FailMatcher = {
|
|
27
|
+
enc: "fail";
|
|
28
|
+
codes: StatusCodePredicate;
|
|
29
|
+
};
|
|
30
|
+
export type Matcher<T, E> = ValueMatcher<T> | ErrorMatcher<E> | FailMatcher;
|
|
31
|
+
export declare function jsonErr<E>(codes: StatusCodePredicate, schema: Schema<E>, options?: MatchOptions): ErrorMatcher<E>;
|
|
32
|
+
export declare function json<T>(codes: StatusCodePredicate, schema: Schema<T>, options?: MatchOptions): ValueMatcher<T>;
|
|
33
|
+
export declare function jsonl<T>(codes: StatusCodePredicate, schema: Schema<T>, options?: MatchOptions): ValueMatcher<T>;
|
|
34
|
+
export declare function jsonlErr<E>(codes: StatusCodePredicate, schema: Schema<E>, options?: MatchOptions): ErrorMatcher<E>;
|
|
35
|
+
export declare function textErr<E>(codes: StatusCodePredicate, schema: Schema<E>, options?: MatchOptions): ErrorMatcher<E>;
|
|
36
|
+
export declare function text<T>(codes: StatusCodePredicate, schema: Schema<T>, options?: MatchOptions): ValueMatcher<T>;
|
|
37
|
+
export declare function bytesErr<E>(codes: StatusCodePredicate, schema: Schema<E>, options?: MatchOptions): ErrorMatcher<E>;
|
|
38
|
+
export declare function bytes<T>(codes: StatusCodePredicate, schema: Schema<T>, options?: MatchOptions): ValueMatcher<T>;
|
|
39
|
+
export declare function streamErr<E>(codes: StatusCodePredicate, schema: Schema<E>, options?: MatchOptions): ErrorMatcher<E>;
|
|
40
|
+
export declare function stream<T>(codes: StatusCodePredicate, schema: Schema<T>, options?: MatchOptions): ValueMatcher<T>;
|
|
41
|
+
export declare function sseErr<E>(codes: StatusCodePredicate, schema: Schema<E>, options?: MatchOptions): ErrorMatcher<E>;
|
|
42
|
+
export declare function sse<T>(codes: StatusCodePredicate, schema: Schema<T>, options?: MatchOptions): ValueMatcher<T>;
|
|
43
|
+
export declare function nilErr<E>(codes: StatusCodePredicate, schema: Schema<E>, options?: MatchOptions): ErrorMatcher<E>;
|
|
44
|
+
export declare function nil<T>(codes: StatusCodePredicate, schema: Schema<T>, options?: MatchOptions): ValueMatcher<T>;
|
|
45
|
+
export declare function fail(codes: StatusCodePredicate): FailMatcher;
|
|
46
|
+
export type MatchedValue<Matchers> = Matchers extends Matcher<infer T, any>[] ? T : never;
|
|
47
|
+
export type MatchedError<Matchers> = Matchers extends Matcher<any, infer E>[] ? E : never;
|
|
48
|
+
export type MatchFunc<T, E> = (response: Response, request: Request, options?: {
|
|
49
|
+
resultKey?: string;
|
|
50
|
+
extraFields?: Record<string, unknown>;
|
|
51
|
+
}) => Promise<[result: Result<T, E>, raw: unknown]>;
|
|
52
|
+
export declare function match<T, E>(...matchers: Array<Matcher<T, E>>): MatchFunc<T, E | ContinuousDefaultError | ResponseValidationError>;
|
|
53
|
+
/**
|
|
54
|
+
* Iterates over a Headers object and returns an object with all the header
|
|
55
|
+
* entries. Values are represented as an array to account for repeated headers.
|
|
56
|
+
*/
|
|
57
|
+
export declare function unpackHeaders(headers: Headers): Record<string, string[]>;
|
|
58
|
+
export {};
|
|
59
|
+
//# sourceMappingURL=matchers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"matchers.d.ts","sourceRoot":"","sources":["../../src/lib/matchers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAW,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAkC,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGhF,MAAM,MAAM,QAAQ,GAChB,OAAO,GACP,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,KAAK,GACL,KAAK,GACL,MAAM,CAAC;AAaX,KAAK,MAAM,CAAC,CAAC,IAAI;IAAE,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,CAAC,CAAA;CAAE,CAAC;AAE5C,KAAK,YAAY,GAAG;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,YAAY,GAAG;IAC3C,GAAG,EAAE,QAAQ,CAAC;IACd,KAAK,EAAE,mBAAmB,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,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