cribl-control-plane 0.0.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/.devcontainer/README.md +30 -0
- package/.devcontainer/devcontainer.json +45 -0
- package/FUNCTIONS.md +87 -0
- package/README.md +452 -0
- package/RUNTIMES.md +48 -0
- package/bin/mcp-server.js +36958 -0
- package/bin/mcp-server.js.map +266 -0
- package/dist/commonjs/__tests__/assertions.d.ts +2 -0
- package/dist/commonjs/__tests__/assertions.d.ts.map +1 -0
- package/dist/commonjs/__tests__/assertions.js +14 -0
- package/dist/commonjs/__tests__/assertions.js.map +1 -0
- package/dist/commonjs/__tests__/diag.test.d.ts +2 -0
- package/dist/commonjs/__tests__/diag.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/diag.test.js +22 -0
- package/dist/commonjs/__tests__/diag.test.js.map +1 -0
- package/dist/commonjs/__tests__/files.d.ts +6 -0
- package/dist/commonjs/__tests__/files.d.ts.map +1 -0
- package/dist/commonjs/__tests__/files.js +51 -0
- package/dist/commonjs/__tests__/files.js.map +1 -0
- package/dist/commonjs/__tests__/testclient.d.ts +3 -0
- package/dist/commonjs/__tests__/testclient.d.ts.map +1 -0
- package/dist/commonjs/__tests__/testclient.js +38 -0
- package/dist/commonjs/__tests__/testclient.js.map +1 -0
- package/dist/commonjs/core.d.ts +10 -0
- package/dist/commonjs/core.d.ts.map +1 -0
- package/dist/commonjs/core.js +17 -0
- package/dist/commonjs/core.js.map +1 -0
- package/dist/commonjs/funcs/diagGetHealthInfo.d.ts +15 -0
- package/dist/commonjs/funcs/diagGetHealthInfo.d.ts.map +1 -0
- package/dist/commonjs/funcs/diagGetHealthInfo.js +100 -0
- package/dist/commonjs/funcs/diagGetHealthInfo.js.map +1 -0
- package/dist/commonjs/hooks/hooks.d.ts +25 -0
- package/dist/commonjs/hooks/hooks.d.ts.map +1 -0
- package/dist/commonjs/hooks/hooks.js +86 -0
- package/dist/commonjs/hooks/hooks.js.map +1 -0
- package/dist/commonjs/hooks/index.d.ts +3 -0
- package/dist/commonjs/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/hooks/index.js +22 -0
- package/dist/commonjs/hooks/index.js.map +1 -0
- package/dist/commonjs/hooks/registration.d.ts +3 -0
- package/dist/commonjs/hooks/registration.d.ts.map +1 -0
- package/dist/commonjs/hooks/registration.js +15 -0
- package/dist/commonjs/hooks/registration.js.map +1 -0
- package/dist/commonjs/hooks/types.d.ts +76 -0
- package/dist/commonjs/hooks/types.d.ts.map +1 -0
- package/dist/commonjs/hooks/types.js +6 -0
- package/dist/commonjs/hooks/types.js.map +1 -0
- package/dist/commonjs/index.d.ts +6 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +48 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lib/base64.d.ts +10 -0
- package/dist/commonjs/lib/base64.d.ts.map +1 -0
- package/dist/commonjs/lib/base64.js +71 -0
- package/dist/commonjs/lib/base64.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +38 -0
- package/dist/commonjs/lib/config.d.ts.map +1 -0
- package/dist/commonjs/lib/config.js +35 -0
- package/dist/commonjs/lib/config.js.map +1 -0
- package/dist/commonjs/lib/dlv.d.ts +14 -0
- package/dist/commonjs/lib/dlv.d.ts.map +1 -0
- package/dist/commonjs/lib/dlv.js +49 -0
- package/dist/commonjs/lib/dlv.js.map +1 -0
- package/dist/commonjs/lib/encodings.d.ts +52 -0
- package/dist/commonjs/lib/encodings.d.ts.map +1 -0
- package/dist/commonjs/lib/encodings.js +368 -0
- package/dist/commonjs/lib/encodings.js.map +1 -0
- package/dist/commonjs/lib/env.d.ts +15 -0
- package/dist/commonjs/lib/env.d.ts.map +1 -0
- package/dist/commonjs/lib/env.js +65 -0
- package/dist/commonjs/lib/env.js.map +1 -0
- package/dist/commonjs/lib/files.d.ts +13 -0
- package/dist/commonjs/lib/files.d.ts.map +1 -0
- package/dist/commonjs/lib/files.js +77 -0
- package/dist/commonjs/lib/files.js.map +1 -0
- package/dist/commonjs/lib/http.d.ts +67 -0
- package/dist/commonjs/lib/http.d.ts.map +1 -0
- package/dist/commonjs/lib/http.js +217 -0
- package/dist/commonjs/lib/http.js.map +1 -0
- package/dist/commonjs/lib/is-plain-object.d.ts +2 -0
- package/dist/commonjs/lib/is-plain-object.d.ts.map +1 -0
- package/dist/commonjs/lib/is-plain-object.js +41 -0
- package/dist/commonjs/lib/is-plain-object.js.map +1 -0
- package/dist/commonjs/lib/logger.d.ts +6 -0
- package/dist/commonjs/lib/logger.d.ts.map +1 -0
- package/dist/commonjs/lib/logger.js +6 -0
- package/dist/commonjs/lib/logger.js.map +1 -0
- package/dist/commonjs/lib/matchers.d.ts +59 -0
- package/dist/commonjs/lib/matchers.d.ts.map +1 -0
- package/dist/commonjs/lib/matchers.js +222 -0
- package/dist/commonjs/lib/matchers.js.map +1 -0
- package/dist/commonjs/lib/primitives.d.ts +26 -0
- package/dist/commonjs/lib/primitives.d.ts.map +1 -0
- package/dist/commonjs/lib/primitives.js +111 -0
- package/dist/commonjs/lib/primitives.js.map +1 -0
- package/dist/commonjs/lib/retries.d.ts +38 -0
- package/dist/commonjs/lib/retries.d.ts.map +1 -0
- package/dist/commonjs/lib/retries.js +153 -0
- package/dist/commonjs/lib/retries.js.map +1 -0
- package/dist/commonjs/lib/schemas.d.ts +19 -0
- package/dist/commonjs/lib/schemas.d.ts.map +1 -0
- package/dist/commonjs/lib/schemas.js +62 -0
- package/dist/commonjs/lib/schemas.js.map +1 -0
- package/dist/commonjs/lib/sdks.d.ts +63 -0
- package/dist/commonjs/lib/sdks.d.ts.map +1 -0
- package/dist/commonjs/lib/sdks.js +273 -0
- package/dist/commonjs/lib/sdks.js.map +1 -0
- package/dist/commonjs/lib/security.d.ts +83 -0
- package/dist/commonjs/lib/security.d.ts.map +1 -0
- package/dist/commonjs/lib/security.js +144 -0
- package/dist/commonjs/lib/security.js.map +1 -0
- package/dist/commonjs/lib/url.d.ts +5 -0
- package/dist/commonjs/lib/url.d.ts.map +1 -0
- package/dist/commonjs/lib/url.js +25 -0
- package/dist/commonjs/lib/url.js.map +1 -0
- package/dist/commonjs/mcp-server/cli/start/command.d.ts +2 -0
- package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/cli/start/command.js +126 -0
- package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -0
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts +16 -0
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/cli/start/impl.js +102 -0
- package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -0
- package/dist/commonjs/mcp-server/cli.d.ts +6 -0
- package/dist/commonjs/mcp-server/cli.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/cli.js +10 -0
- package/dist/commonjs/mcp-server/cli.js.map +1 -0
- package/dist/commonjs/mcp-server/console-logger.d.ts +7 -0
- package/dist/commonjs/mcp-server/console-logger.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/console-logger.js +59 -0
- package/dist/commonjs/mcp-server/console-logger.js.map +1 -0
- package/dist/commonjs/mcp-server/extensions.d.ts +11 -0
- package/dist/commonjs/mcp-server/extensions.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/extensions.js +6 -0
- package/dist/commonjs/mcp-server/extensions.js.map +1 -0
- package/dist/commonjs/mcp-server/mcp-server.d.ts +2 -0
- package/dist/commonjs/mcp-server/mcp-server.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/mcp-server.js +29 -0
- package/dist/commonjs/mcp-server/mcp-server.js.map +1 -0
- package/dist/commonjs/mcp-server/prompts.d.ts +26 -0
- package/dist/commonjs/mcp-server/prompts.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/prompts.js +51 -0
- package/dist/commonjs/mcp-server/prompts.js.map +1 -0
- package/dist/commonjs/mcp-server/resources.d.ts +32 -0
- package/dist/commonjs/mcp-server/resources.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/resources.js +87 -0
- package/dist/commonjs/mcp-server/resources.js.map +1 -0
- package/dist/commonjs/mcp-server/scopes.d.ts +3 -0
- package/dist/commonjs/mcp-server/scopes.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/scopes.js +8 -0
- package/dist/commonjs/mcp-server/scopes.js.map +1 -0
- package/dist/commonjs/mcp-server/server.d.ts +13 -0
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/server.js +34 -0
- package/dist/commonjs/mcp-server/server.js.map +1 -0
- package/dist/commonjs/mcp-server/shared.d.ts +7 -0
- package/dist/commonjs/mcp-server/shared.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/shared.js +98 -0
- package/dist/commonjs/mcp-server/shared.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/diagGetHealthInfo.d.ts +3 -0
- package/dist/commonjs/mcp-server/tools/diagGetHealthInfo.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/diagGetHealthInfo.js +24 -0
- package/dist/commonjs/mcp-server/tools/diagGetHealthInfo.js.map +1 -0
- package/dist/commonjs/mcp-server/tools.d.ts +25 -0
- package/dist/commonjs/mcp-server/tools.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools.js +82 -0
- package/dist/commonjs/mcp-server/tools.js.map +1 -0
- package/dist/commonjs/models/errors/criblcontrolplanedefaulterror.d.ts +10 -0
- package/dist/commonjs/models/errors/criblcontrolplanedefaulterror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/criblcontrolplanedefaulterror.js +34 -0
- package/dist/commonjs/models/errors/criblcontrolplanedefaulterror.js.map +1 -0
- package/dist/commonjs/models/errors/criblcontrolplaneerror.d.ts +19 -0
- package/dist/commonjs/models/errors/criblcontrolplaneerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/criblcontrolplaneerror.js +20 -0
- package/dist/commonjs/models/errors/criblcontrolplaneerror.js.map +1 -0
- package/dist/commonjs/models/errors/healthstatuserror.d.ts +43 -0
- package/dist/commonjs/models/errors/healthstatuserror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/healthstatuserror.js +93 -0
- package/dist/commonjs/models/errors/healthstatuserror.js.map +1 -0
- package/dist/commonjs/models/errors/httpclienterrors.d.ts +44 -0
- package/dist/commonjs/models/errors/httpclienterrors.d.ts.map +1 -0
- package/dist/commonjs/models/errors/httpclienterrors.js +78 -0
- package/dist/commonjs/models/errors/httpclienterrors.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +6 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -0
- package/dist/commonjs/models/errors/index.js +25 -0
- package/dist/commonjs/models/errors/index.js.map +1 -0
- package/dist/commonjs/models/errors/responsevalidationerror.d.ts +26 -0
- package/dist/commonjs/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js +66 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js.map +1 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts +21 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.js +129 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.js.map +1 -0
- package/dist/commonjs/models/healthstatus.d.ts +87 -0
- package/dist/commonjs/models/healthstatus.d.ts.map +1 -0
- package/dist/commonjs/models/healthstatus.js +113 -0
- package/dist/commonjs/models/healthstatus.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +3 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +22 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/security.d.ts +29 -0
- package/dist/commonjs/models/security.d.ts.map +1 -0
- package/dist/commonjs/models/security.js +69 -0
- package/dist/commonjs/models/security.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/sdk/diag.d.ts +9 -0
- package/dist/commonjs/sdk/diag.d.ts.map +1 -0
- package/dist/commonjs/sdk/diag.js +19 -0
- package/dist/commonjs/sdk/diag.js.map +1 -0
- package/dist/commonjs/sdk/health.d.ts +9 -0
- package/dist/commonjs/sdk/health.d.ts.map +1 -0
- package/dist/commonjs/sdk/health.js +19 -0
- package/dist/commonjs/sdk/health.js.map +1 -0
- package/dist/commonjs/sdk/index.d.ts +2 -0
- package/dist/commonjs/sdk/index.d.ts.map +1 -0
- package/dist/commonjs/sdk/index.js +21 -0
- package/dist/commonjs/sdk/index.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +10 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -0
- package/dist/commonjs/sdk/sdk.js +19 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -0
- package/dist/commonjs/types/async.d.ts +23 -0
- package/dist/commonjs/types/async.d.ts.map +1 -0
- package/dist/commonjs/types/async.js +44 -0
- package/dist/commonjs/types/async.js.map +1 -0
- package/dist/commonjs/types/blobs.d.ts +4 -0
- package/dist/commonjs/types/blobs.d.ts.map +1 -0
- package/dist/commonjs/types/blobs.js +62 -0
- package/dist/commonjs/types/blobs.js.map +1 -0
- package/dist/commonjs/types/constdatetime.d.ts +3 -0
- package/dist/commonjs/types/constdatetime.d.ts.map +1 -0
- package/dist/commonjs/types/constdatetime.js +46 -0
- package/dist/commonjs/types/constdatetime.js.map +1 -0
- package/dist/commonjs/types/enums.d.ts +12 -0
- package/dist/commonjs/types/enums.d.ts.map +1 -0
- package/dist/commonjs/types/enums.js +10 -0
- package/dist/commonjs/types/enums.js.map +1 -0
- package/dist/commonjs/types/fp.d.ts +31 -0
- package/dist/commonjs/types/fp.d.ts.map +1 -0
- package/dist/commonjs/types/fp.js +37 -0
- package/dist/commonjs/types/fp.js.map +1 -0
- package/dist/commonjs/types/index.d.ts +8 -0
- package/dist/commonjs/types/index.d.ts.map +1 -0
- package/dist/commonjs/types/index.js +16 -0
- package/dist/commonjs/types/index.js.map +1 -0
- package/dist/commonjs/types/operations.d.ts +27 -0
- package/dist/commonjs/types/operations.d.ts.map +1 -0
- package/dist/commonjs/types/operations.js +83 -0
- package/dist/commonjs/types/operations.js.map +1 -0
- package/dist/commonjs/types/rfcdate.d.ts +21 -0
- package/dist/commonjs/types/rfcdate.d.ts.map +1 -0
- package/dist/commonjs/types/rfcdate.js +46 -0
- package/dist/commonjs/types/rfcdate.js.map +1 -0
- package/dist/commonjs/types/streams.d.ts +2 -0
- package/dist/commonjs/types/streams.d.ts.map +1 -0
- package/dist/commonjs/types/streams.js +18 -0
- package/dist/commonjs/types/streams.js.map +1 -0
- package/dist/esm/__tests__/assertions.d.ts +2 -0
- package/dist/esm/__tests__/assertions.d.ts.map +1 -0
- package/dist/esm/__tests__/assertions.js +11 -0
- package/dist/esm/__tests__/assertions.js.map +1 -0
- package/dist/esm/__tests__/diag.test.d.ts +2 -0
- package/dist/esm/__tests__/diag.test.d.ts.map +1 -0
- package/dist/esm/__tests__/diag.test.js +20 -0
- package/dist/esm/__tests__/diag.test.js.map +1 -0
- package/dist/esm/__tests__/files.d.ts +6 -0
- package/dist/esm/__tests__/files.d.ts.map +1 -0
- package/dist/esm/__tests__/files.js +44 -0
- package/dist/esm/__tests__/files.js.map +1 -0
- package/dist/esm/__tests__/testclient.d.ts +3 -0
- package/dist/esm/__tests__/testclient.d.ts.map +1 -0
- package/dist/esm/__tests__/testclient.js +35 -0
- package/dist/esm/__tests__/testclient.js.map +1 -0
- package/dist/esm/core.d.ts +10 -0
- package/dist/esm/core.d.ts.map +1 -0
- package/dist/esm/core.js +13 -0
- package/dist/esm/core.js.map +1 -0
- package/dist/esm/funcs/diagGetHealthInfo.d.ts +15 -0
- package/dist/esm/funcs/diagGetHealthInfo.d.ts.map +1 -0
- package/dist/esm/funcs/diagGetHealthInfo.js +64 -0
- package/dist/esm/funcs/diagGetHealthInfo.js.map +1 -0
- package/dist/esm/hooks/hooks.d.ts +25 -0
- package/dist/esm/hooks/hooks.d.ts.map +1 -0
- package/dist/esm/hooks/hooks.js +82 -0
- package/dist/esm/hooks/hooks.js.map +1 -0
- package/dist/esm/hooks/index.d.ts +3 -0
- package/dist/esm/hooks/index.d.ts.map +1 -0
- package/dist/esm/hooks/index.js +6 -0
- package/dist/esm/hooks/index.js.map +1 -0
- package/dist/esm/hooks/registration.d.ts +3 -0
- package/dist/esm/hooks/registration.d.ts.map +1 -0
- package/dist/esm/hooks/registration.js +12 -0
- package/dist/esm/hooks/registration.js.map +1 -0
- package/dist/esm/hooks/types.d.ts +76 -0
- package/dist/esm/hooks/types.d.ts.map +1 -0
- package/dist/esm/hooks/types.js +5 -0
- package/dist/esm/hooks/types.js.map +1 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/base64.d.ts +10 -0
- package/dist/esm/lib/base64.d.ts.map +1 -0
- package/dist/esm/lib/base64.js +29 -0
- package/dist/esm/lib/base64.js.map +1 -0
- package/dist/esm/lib/config.d.ts +38 -0
- package/dist/esm/lib/config.d.ts.map +1 -0
- package/dist/esm/lib/config.js +31 -0
- package/dist/esm/lib/config.js.map +1 -0
- package/dist/esm/lib/dlv.d.ts +14 -0
- package/dist/esm/lib/dlv.d.ts.map +1 -0
- package/dist/esm/lib/dlv.js +46 -0
- package/dist/esm/lib/dlv.js.map +1 -0
- package/dist/esm/lib/encodings.d.ts +52 -0
- package/dist/esm/lib/encodings.d.ts.map +1 -0
- package/dist/esm/lib/encodings.js +354 -0
- package/dist/esm/lib/encodings.js.map +1 -0
- package/dist/esm/lib/env.d.ts +15 -0
- package/dist/esm/lib/env.d.ts.map +1 -0
- package/dist/esm/lib/env.js +27 -0
- package/dist/esm/lib/env.js.map +1 -0
- package/dist/esm/lib/files.d.ts +13 -0
- package/dist/esm/lib/files.d.ts.map +1 -0
- package/dist/esm/lib/files.js +73 -0
- package/dist/esm/lib/files.js.map +1 -0
- package/dist/esm/lib/http.d.ts +67 -0
- package/dist/esm/lib/http.d.ts.map +1 -0
- package/dist/esm/lib/http.js +207 -0
- package/dist/esm/lib/http.js.map +1 -0
- package/dist/esm/lib/is-plain-object.d.ts +2 -0
- package/dist/esm/lib/is-plain-object.d.ts.map +1 -0
- package/dist/esm/lib/is-plain-object.js +38 -0
- package/dist/esm/lib/is-plain-object.js.map +1 -0
- package/dist/esm/lib/logger.d.ts +6 -0
- package/dist/esm/lib/logger.d.ts.map +1 -0
- package/dist/esm/lib/logger.js +5 -0
- package/dist/esm/lib/logger.js.map +1 -0
- package/dist/esm/lib/matchers.d.ts +59 -0
- package/dist/esm/lib/matchers.d.ts.map +1 -0
- package/dist/esm/lib/matchers.js +203 -0
- package/dist/esm/lib/matchers.js.map +1 -0
- package/dist/esm/lib/primitives.d.ts +26 -0
- package/dist/esm/lib/primitives.d.ts.map +1 -0
- package/dist/esm/lib/primitives.js +103 -0
- package/dist/esm/lib/primitives.js.map +1 -0
- package/dist/esm/lib/retries.d.ts +38 -0
- package/dist/esm/lib/retries.d.ts.map +1 -0
- package/dist/esm/lib/retries.js +147 -0
- package/dist/esm/lib/retries.js.map +1 -0
- package/dist/esm/lib/schemas.d.ts +19 -0
- package/dist/esm/lib/schemas.d.ts.map +1 -0
- package/dist/esm/lib/schemas.js +57 -0
- package/dist/esm/lib/schemas.js.map +1 -0
- package/dist/esm/lib/sdks.d.ts +63 -0
- package/dist/esm/lib/sdks.d.ts.map +1 -0
- package/dist/esm/lib/sdks.js +269 -0
- package/dist/esm/lib/sdks.js.map +1 -0
- package/dist/esm/lib/security.d.ts +83 -0
- package/dist/esm/lib/security.d.ts.map +1 -0
- package/dist/esm/lib/security.js +137 -0
- package/dist/esm/lib/security.js.map +1 -0
- package/dist/esm/lib/url.d.ts +5 -0
- package/dist/esm/lib/url.d.ts.map +1 -0
- package/dist/esm/lib/url.js +22 -0
- package/dist/esm/lib/url.js.map +1 -0
- package/dist/esm/mcp-server/build.d.mts.map +1 -0
- package/dist/esm/mcp-server/build.mjs +14 -0
- package/dist/esm/mcp-server/build.mjs.map +1 -0
- package/dist/esm/mcp-server/cli/start/command.d.ts +2 -0
- package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -0
- package/dist/esm/mcp-server/cli/start/command.js +90 -0
- package/dist/esm/mcp-server/cli/start/command.js.map +1 -0
- package/dist/esm/mcp-server/cli/start/impl.d.ts +16 -0
- package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -0
- package/dist/esm/mcp-server/cli/start/impl.js +96 -0
- package/dist/esm/mcp-server/cli/start/impl.js.map +1 -0
- package/dist/esm/mcp-server/cli.d.ts +6 -0
- package/dist/esm/mcp-server/cli.d.ts.map +1 -0
- package/dist/esm/mcp-server/cli.js +7 -0
- package/dist/esm/mcp-server/cli.js.map +1 -0
- package/dist/esm/mcp-server/console-logger.d.ts +7 -0
- package/dist/esm/mcp-server/console-logger.d.ts.map +1 -0
- package/dist/esm/mcp-server/console-logger.js +55 -0
- package/dist/esm/mcp-server/console-logger.js.map +1 -0
- package/dist/esm/mcp-server/extensions.d.ts +11 -0
- package/dist/esm/mcp-server/extensions.d.ts.map +1 -0
- package/dist/esm/mcp-server/extensions.js +5 -0
- package/dist/esm/mcp-server/extensions.js.map +1 -0
- package/dist/esm/mcp-server/mcp-server.d.ts +2 -0
- package/dist/esm/mcp-server/mcp-server.d.ts.map +1 -0
- package/dist/esm/mcp-server/mcp-server.js +23 -0
- package/dist/esm/mcp-server/mcp-server.js.map +1 -0
- package/dist/esm/mcp-server/prompts.d.ts +26 -0
- package/dist/esm/mcp-server/prompts.d.ts.map +1 -0
- package/dist/esm/mcp-server/prompts.js +47 -0
- package/dist/esm/mcp-server/prompts.js.map +1 -0
- package/dist/esm/mcp-server/resources.d.ts +32 -0
- package/dist/esm/mcp-server/resources.d.ts.map +1 -0
- package/dist/esm/mcp-server/resources.js +82 -0
- package/dist/esm/mcp-server/resources.js.map +1 -0
- package/dist/esm/mcp-server/scopes.d.ts +3 -0
- package/dist/esm/mcp-server/scopes.d.ts.map +1 -0
- package/dist/esm/mcp-server/scopes.js +5 -0
- package/dist/esm/mcp-server/scopes.js.map +1 -0
- package/dist/esm/mcp-server/server.d.ts +13 -0
- package/dist/esm/mcp-server/server.d.ts.map +1 -0
- package/dist/esm/mcp-server/server.js +31 -0
- package/dist/esm/mcp-server/server.js.map +1 -0
- package/dist/esm/mcp-server/shared.d.ts +7 -0
- package/dist/esm/mcp-server/shared.d.ts.map +1 -0
- package/dist/esm/mcp-server/shared.js +59 -0
- package/dist/esm/mcp-server/shared.js.map +1 -0
- package/dist/esm/mcp-server/tools/diagGetHealthInfo.d.ts +3 -0
- package/dist/esm/mcp-server/tools/diagGetHealthInfo.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/diagGetHealthInfo.js +21 -0
- package/dist/esm/mcp-server/tools/diagGetHealthInfo.js.map +1 -0
- package/dist/esm/mcp-server/tools.d.ts +25 -0
- package/dist/esm/mcp-server/tools.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools.js +78 -0
- package/dist/esm/mcp-server/tools.js.map +1 -0
- package/dist/esm/models/errors/criblcontrolplanedefaulterror.d.ts +10 -0
- package/dist/esm/models/errors/criblcontrolplanedefaulterror.d.ts.map +1 -0
- package/dist/esm/models/errors/criblcontrolplanedefaulterror.js +30 -0
- package/dist/esm/models/errors/criblcontrolplanedefaulterror.js.map +1 -0
- package/dist/esm/models/errors/criblcontrolplaneerror.d.ts +19 -0
- package/dist/esm/models/errors/criblcontrolplaneerror.d.ts.map +1 -0
- package/dist/esm/models/errors/criblcontrolplaneerror.js +16 -0
- package/dist/esm/models/errors/criblcontrolplaneerror.js.map +1 -0
- package/dist/esm/models/errors/healthstatuserror.d.ts +43 -0
- package/dist/esm/models/errors/healthstatuserror.d.ts.map +1 -0
- package/dist/esm/models/errors/healthstatuserror.js +56 -0
- package/dist/esm/models/errors/healthstatuserror.js.map +1 -0
- package/dist/esm/models/errors/httpclienterrors.d.ts +44 -0
- package/dist/esm/models/errors/httpclienterrors.d.ts.map +1 -0
- package/dist/esm/models/errors/httpclienterrors.js +69 -0
- package/dist/esm/models/errors/httpclienterrors.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +6 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -0
- package/dist/esm/models/errors/index.js +9 -0
- package/dist/esm/models/errors/index.js.map +1 -0
- package/dist/esm/models/errors/responsevalidationerror.d.ts +26 -0
- package/dist/esm/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/dist/esm/models/errors/responsevalidationerror.js +29 -0
- package/dist/esm/models/errors/responsevalidationerror.js.map +1 -0
- package/dist/esm/models/errors/sdkvalidationerror.d.ts +21 -0
- package/dist/esm/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/dist/esm/models/errors/sdkvalidationerror.js +91 -0
- package/dist/esm/models/errors/sdkvalidationerror.js.map +1 -0
- package/dist/esm/models/healthstatus.d.ts +87 -0
- package/dist/esm/models/healthstatus.d.ts.map +1 -0
- package/dist/esm/models/healthstatus.js +75 -0
- package/dist/esm/models/healthstatus.js.map +1 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/security.d.ts +29 -0
- package/dist/esm/models/security.d.ts.map +1 -0
- package/dist/esm/models/security.js +31 -0
- package/dist/esm/models/security.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/sdk/diag.d.ts +9 -0
- package/dist/esm/sdk/diag.d.ts.map +1 -0
- package/dist/esm/sdk/diag.js +15 -0
- package/dist/esm/sdk/diag.js.map +1 -0
- package/dist/esm/sdk/health.d.ts +9 -0
- package/dist/esm/sdk/health.d.ts.map +1 -0
- package/dist/esm/sdk/health.js +15 -0
- package/dist/esm/sdk/health.js.map +1 -0
- package/dist/esm/sdk/index.d.ts +2 -0
- package/dist/esm/sdk/index.d.ts.map +1 -0
- package/dist/esm/sdk/index.js +5 -0
- package/dist/esm/sdk/index.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +10 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -0
- package/dist/esm/sdk/sdk.js +15 -0
- package/dist/esm/sdk/sdk.js.map +1 -0
- package/dist/esm/types/async.d.ts +23 -0
- package/dist/esm/types/async.d.ts.map +1 -0
- package/dist/esm/types/async.js +40 -0
- package/dist/esm/types/async.js.map +1 -0
- package/dist/esm/types/blobs.d.ts +4 -0
- package/dist/esm/types/blobs.d.ts.map +1 -0
- package/dist/esm/types/blobs.js +25 -0
- package/dist/esm/types/blobs.js.map +1 -0
- package/dist/esm/types/constdatetime.d.ts +3 -0
- package/dist/esm/types/constdatetime.d.ts.map +1 -0
- package/dist/esm/types/constdatetime.js +10 -0
- package/dist/esm/types/constdatetime.js.map +1 -0
- package/dist/esm/types/enums.d.ts +12 -0
- package/dist/esm/types/enums.d.ts.map +1 -0
- package/dist/esm/types/enums.js +7 -0
- package/dist/esm/types/enums.js.map +1 -0
- package/dist/esm/types/fp.d.ts +31 -0
- package/dist/esm/types/fp.d.ts.map +1 -0
- package/dist/esm/types/fp.js +31 -0
- package/dist/esm/types/fp.js.map +1 -0
- package/dist/esm/types/index.d.ts +8 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/index.js +8 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/operations.d.ts +27 -0
- package/dist/esm/types/operations.d.ts.map +1 -0
- package/dist/esm/types/operations.js +77 -0
- package/dist/esm/types/operations.js.map +1 -0
- package/dist/esm/types/rfcdate.d.ts +21 -0
- package/dist/esm/types/rfcdate.d.ts.map +1 -0
- package/dist/esm/types/rfcdate.js +42 -0
- package/dist/esm/types/rfcdate.js.map +1 -0
- package/dist/esm/types/streams.d.ts +2 -0
- package/dist/esm/types/streams.d.ts.map +1 -0
- package/dist/esm/types/streams.js +15 -0
- package/dist/esm/types/streams.js.map +1 -0
- package/docs/sdks/criblcontrolplane/README.md +7 -0
- package/docs/sdks/diag/README.md +78 -0
- package/docs/sdks/health/README.md +78 -0
- package/examples/README.md +26 -0
- package/examples/diagGetHealthInfo.example.ts +24 -0
- package/examples/package-lock.json +629 -0
- package/examples/package.json +18 -0
- package/jsr.json +27 -0
- package/package.json +131 -0
- package/src/__tests__/assertions.ts +13 -0
- package/src/__tests__/diag.test.ts +23 -0
- package/src/__tests__/files.ts +56 -0
- package/src/__tests__/mockserver/README.md +52 -0
- package/src/__tests__/testclient.ts +48 -0
- package/src/core.ts +13 -0
- package/src/funcs/diagGetHealthInfo.ts +142 -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 +107 -0
- package/src/index.ts +9 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +65 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +483 -0
- package/src/lib/env.ts +41 -0
- package/src/lib/files.ts +82 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +358 -0
- package/src/lib/primitives.ts +150 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +91 -0
- package/src/lib/sdks.ts +406 -0
- package/src/lib/security.ts +261 -0
- package/src/lib/url.ts +33 -0
- package/src/mcp-server/cli/start/command.ts +94 -0
- package/src/mcp-server/cli/start/impl.ts +130 -0
- package/src/mcp-server/cli.ts +13 -0
- package/src/mcp-server/console-logger.ts +71 -0
- package/src/mcp-server/extensions.ts +17 -0
- package/src/mcp-server/mcp-server.ts +26 -0
- package/src/mcp-server/prompts.ts +117 -0
- package/src/mcp-server/resources.ts +172 -0
- package/src/mcp-server/scopes.ts +7 -0
- package/src/mcp-server/server.ts +61 -0
- package/src/mcp-server/shared.ts +75 -0
- package/src/mcp-server/tools/diagGetHealthInfo.ts +28 -0
- package/src/mcp-server/tools.ts +129 -0
- package/src/models/errors/criblcontrolplanedefaulterror.ts +40 -0
- package/src/models/errors/criblcontrolplaneerror.ts +35 -0
- package/src/models/errors/healthstatuserror.ts +92 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/index.ts +9 -0
- package/src/models/errors/responsevalidationerror.ts +50 -0
- package/src/models/errors/sdkvalidationerror.ts +109 -0
- package/src/models/healthstatus.ts +123 -0
- package/src/models/index.ts +6 -0
- package/src/models/security.ts +62 -0
- package/src/sdk/diag.ts +22 -0
- package/src/sdk/health.ts +22 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/sdk.ts +19 -0
- package/src/types/async.ts +68 -0
- package/src/types/blobs.ts +31 -0
- package/src/types/constdatetime.ts +15 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +11 -0
- package/src/types/operations.ts +105 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/streams.ts +21 -0
- package/tsconfig.json +41 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import * as models from "../index.js";
|
|
7
|
+
import { CriblControlPlaneError } from "./criblcontrolplaneerror.js";
|
|
8
|
+
|
|
9
|
+
export type HealthStatusErrorData = {
|
|
10
|
+
role?: models.Role | undefined;
|
|
11
|
+
status: models.Status;
|
|
12
|
+
startTime: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export class HealthStatusError extends CriblControlPlaneError {
|
|
16
|
+
role?: models.Role | undefined;
|
|
17
|
+
status: models.Status;
|
|
18
|
+
startTime: number;
|
|
19
|
+
|
|
20
|
+
/** The original data that was passed to this error instance. */
|
|
21
|
+
data$: HealthStatusErrorData;
|
|
22
|
+
|
|
23
|
+
constructor(
|
|
24
|
+
err: HealthStatusErrorData,
|
|
25
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
26
|
+
) {
|
|
27
|
+
const message = "message" in err && typeof err.message === "string"
|
|
28
|
+
? err.message
|
|
29
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
30
|
+
super(message, httpMeta);
|
|
31
|
+
this.data$ = err;
|
|
32
|
+
if (err.role != null) this.role = err.role;
|
|
33
|
+
this.status = err.status;
|
|
34
|
+
this.startTime = err.startTime;
|
|
35
|
+
|
|
36
|
+
this.name = "HealthStatusError";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const HealthStatusError$inboundSchema: z.ZodType<
|
|
42
|
+
HealthStatusError,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.object({
|
|
46
|
+
role: models.Role$inboundSchema.optional(),
|
|
47
|
+
status: models.Status$inboundSchema,
|
|
48
|
+
startTime: z.number(),
|
|
49
|
+
request$: z.instanceof(Request),
|
|
50
|
+
response$: z.instanceof(Response),
|
|
51
|
+
body$: z.string(),
|
|
52
|
+
})
|
|
53
|
+
.transform((v) => {
|
|
54
|
+
return new HealthStatusError(v, {
|
|
55
|
+
request: v.request$,
|
|
56
|
+
response: v.response$,
|
|
57
|
+
body: v.body$,
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export type HealthStatusError$Outbound = {
|
|
63
|
+
role?: string | undefined;
|
|
64
|
+
status: string;
|
|
65
|
+
startTime: number;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const HealthStatusError$outboundSchema: z.ZodType<
|
|
70
|
+
HealthStatusError$Outbound,
|
|
71
|
+
z.ZodTypeDef,
|
|
72
|
+
HealthStatusError
|
|
73
|
+
> = z.instanceof(HealthStatusError)
|
|
74
|
+
.transform(v => v.data$)
|
|
75
|
+
.pipe(z.object({
|
|
76
|
+
role: models.Role$outboundSchema.optional(),
|
|
77
|
+
status: models.Status$outboundSchema,
|
|
78
|
+
startTime: z.number(),
|
|
79
|
+
}));
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
84
|
+
*/
|
|
85
|
+
export namespace HealthStatusError$ {
|
|
86
|
+
/** @deprecated use `HealthStatusError$inboundSchema` instead. */
|
|
87
|
+
export const inboundSchema = HealthStatusError$inboundSchema;
|
|
88
|
+
/** @deprecated use `HealthStatusError$outboundSchema` instead. */
|
|
89
|
+
export const outboundSchema = HealthStatusError$outboundSchema;
|
|
90
|
+
/** @deprecated use `HealthStatusError$Outbound` instead. */
|
|
91
|
+
export type Outbound = HealthStatusError$Outbound;
|
|
92
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Base class for all HTTP errors.
|
|
7
|
+
*/
|
|
8
|
+
export class HTTPClientError extends Error {
|
|
9
|
+
/** The underlying cause of the error. */
|
|
10
|
+
override readonly cause: unknown;
|
|
11
|
+
override name = "HTTPClientError";
|
|
12
|
+
constructor(message: string, opts?: { cause?: unknown }) {
|
|
13
|
+
let msg = message;
|
|
14
|
+
if (opts?.cause) {
|
|
15
|
+
msg += `: ${opts.cause}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
super(msg, opts);
|
|
19
|
+
// In older runtimes, the cause field would not have been assigned through
|
|
20
|
+
// the super() call.
|
|
21
|
+
if (typeof this.cause === "undefined") {
|
|
22
|
+
this.cause = opts?.cause;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* An error to capture unrecognised or unexpected errors when making HTTP calls.
|
|
29
|
+
*/
|
|
30
|
+
export class UnexpectedClientError extends HTTPClientError {
|
|
31
|
+
override name = "UnexpectedClientError";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* An error that is raised when any inputs used to create a request are invalid.
|
|
36
|
+
*/
|
|
37
|
+
export class InvalidRequestError extends HTTPClientError {
|
|
38
|
+
override name = "InvalidRequestError";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* An error that is raised when a HTTP request was aborted by the client error.
|
|
43
|
+
*/
|
|
44
|
+
export class RequestAbortedError extends HTTPClientError {
|
|
45
|
+
override readonly name = "RequestAbortedError";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* An error that is raised when a HTTP request timed out due to an AbortSignal
|
|
50
|
+
* signal timeout.
|
|
51
|
+
*/
|
|
52
|
+
export class RequestTimeoutError extends HTTPClientError {
|
|
53
|
+
override readonly name = "RequestTimeoutError";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* An error that is raised when a HTTP client is unable to make a request to
|
|
58
|
+
* a server.
|
|
59
|
+
*/
|
|
60
|
+
export class ConnectionError extends HTTPClientError {
|
|
61
|
+
override readonly name = "ConnectionError";
|
|
62
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from "./criblcontrolplanedefaulterror.js";
|
|
6
|
+
export * from "./healthstatuserror.js";
|
|
7
|
+
export * from "./httpclienterrors.js";
|
|
8
|
+
export * from "./responsevalidationerror.js";
|
|
9
|
+
export * from "./sdkvalidationerror.js";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { CriblControlPlaneError } from "./criblcontrolplaneerror.js";
|
|
7
|
+
import { formatZodError } from "./sdkvalidationerror.js";
|
|
8
|
+
|
|
9
|
+
export class ResponseValidationError extends CriblControlPlaneError {
|
|
10
|
+
/**
|
|
11
|
+
* The raw value that failed validation.
|
|
12
|
+
*/
|
|
13
|
+
public readonly rawValue: unknown;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The raw message that failed validation.
|
|
17
|
+
*/
|
|
18
|
+
public readonly rawMessage: unknown;
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
message: string,
|
|
22
|
+
extra: {
|
|
23
|
+
response: Response;
|
|
24
|
+
request: Request;
|
|
25
|
+
body: string;
|
|
26
|
+
cause: unknown;
|
|
27
|
+
rawValue: unknown;
|
|
28
|
+
rawMessage: unknown;
|
|
29
|
+
},
|
|
30
|
+
) {
|
|
31
|
+
super(message, extra);
|
|
32
|
+
this.name = "ResponseValidationError";
|
|
33
|
+
this.cause = extra.cause;
|
|
34
|
+
this.rawValue = extra.rawValue;
|
|
35
|
+
this.rawMessage = extra.rawMessage;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Return a pretty-formatted error message if the underlying validation error
|
|
40
|
+
* is a ZodError or some other recognized error type, otherwise return the
|
|
41
|
+
* default error message.
|
|
42
|
+
*/
|
|
43
|
+
public pretty(): string {
|
|
44
|
+
if (this.cause instanceof z.ZodError) {
|
|
45
|
+
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
|
|
46
|
+
} else {
|
|
47
|
+
return this.toString();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export class SDKValidationError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* The raw value that failed validation.
|
|
10
|
+
*/
|
|
11
|
+
public readonly rawValue: unknown;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The raw message that failed validation.
|
|
15
|
+
*/
|
|
16
|
+
public readonly rawMessage: unknown;
|
|
17
|
+
|
|
18
|
+
// Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError`
|
|
19
|
+
static override [Symbol.hasInstance](
|
|
20
|
+
instance: unknown,
|
|
21
|
+
): instance is SDKValidationError {
|
|
22
|
+
if (!(instance instanceof Error)) return false;
|
|
23
|
+
if (!("rawValue" in instance)) return false;
|
|
24
|
+
if (!("rawMessage" in instance)) return false;
|
|
25
|
+
if (!("pretty" in instance)) return false;
|
|
26
|
+
if (typeof instance.pretty !== "function") return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
constructor(message: string, cause: unknown, rawValue: unknown) {
|
|
31
|
+
super(`${message}: ${cause}`);
|
|
32
|
+
this.name = "SDKValidationError";
|
|
33
|
+
this.cause = cause;
|
|
34
|
+
this.rawValue = rawValue;
|
|
35
|
+
this.rawMessage = message;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Return a pretty-formatted error message if the underlying validation error
|
|
40
|
+
* is a ZodError or some other recognized error type, otherwise return the
|
|
41
|
+
* default error message.
|
|
42
|
+
*/
|
|
43
|
+
public pretty(): string {
|
|
44
|
+
if (this.cause instanceof z.ZodError) {
|
|
45
|
+
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
|
|
46
|
+
} else {
|
|
47
|
+
return this.toString();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function formatZodError(err: z.ZodError, level = 0): string {
|
|
53
|
+
let pre = " ".repeat(level);
|
|
54
|
+
pre = level > 0 ? `│${pre}` : pre;
|
|
55
|
+
pre += " ".repeat(level);
|
|
56
|
+
|
|
57
|
+
let message = "";
|
|
58
|
+
const append = (str: string) => (message += `\n${pre}${str}`);
|
|
59
|
+
|
|
60
|
+
const len = err.issues.length;
|
|
61
|
+
const headline = len === 1 ? `${len} issue found` : `${len} issues found`;
|
|
62
|
+
|
|
63
|
+
if (len) {
|
|
64
|
+
append(`┌ ${headline}:`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
for (const issue of err.issues) {
|
|
68
|
+
let path = issue.path.join(".");
|
|
69
|
+
path = path ? `<root>.${path}` : "<root>";
|
|
70
|
+
append(`│ • [${path}]: ${issue.message} (${issue.code})`);
|
|
71
|
+
switch (issue.code) {
|
|
72
|
+
case "invalid_literal":
|
|
73
|
+
case "invalid_type": {
|
|
74
|
+
append(`│ Want: ${issue.expected}`);
|
|
75
|
+
append(`│ Got: ${issue.received}`);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
case "unrecognized_keys": {
|
|
79
|
+
append(`│ Keys: ${issue.keys.join(", ")}`);
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
case "invalid_enum_value": {
|
|
83
|
+
append(`│ Allowed: ${issue.options.join(", ")}`);
|
|
84
|
+
append(`│ Got: ${issue.received}`);
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
case "invalid_union_discriminator": {
|
|
88
|
+
append(`│ Allowed: ${issue.options.join(", ")}`);
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case "invalid_union": {
|
|
92
|
+
const len = issue.unionErrors.length;
|
|
93
|
+
append(
|
|
94
|
+
`│ ✖︎ Attemped to deserialize into one of ${len} union members:`,
|
|
95
|
+
);
|
|
96
|
+
issue.unionErrors.forEach((err, i) => {
|
|
97
|
+
append(`│ ✖︎ Member ${i + 1} of ${len}`);
|
|
98
|
+
append(`${formatZodError(err, level + 1)}`);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (err.issues.length) {
|
|
105
|
+
append(`└─*`);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return message.slice(1);
|
|
109
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const Role = {
|
|
12
|
+
Primary: "primary",
|
|
13
|
+
Standby: "standby",
|
|
14
|
+
} as const;
|
|
15
|
+
export type Role = ClosedEnum<typeof Role>;
|
|
16
|
+
|
|
17
|
+
export const Status = {
|
|
18
|
+
Healthy: "healthy",
|
|
19
|
+
ShuttingDown: "shutting down",
|
|
20
|
+
Standby: "standby",
|
|
21
|
+
} as const;
|
|
22
|
+
export type Status = ClosedEnum<typeof Status>;
|
|
23
|
+
|
|
24
|
+
export type HealthStatus = {
|
|
25
|
+
role?: Role | undefined;
|
|
26
|
+
status: Status;
|
|
27
|
+
startTime: number;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const Role$inboundSchema: z.ZodNativeEnum<typeof Role> = z.nativeEnum(
|
|
32
|
+
Role,
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const Role$outboundSchema: z.ZodNativeEnum<typeof Role> =
|
|
37
|
+
Role$inboundSchema;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
42
|
+
*/
|
|
43
|
+
export namespace Role$ {
|
|
44
|
+
/** @deprecated use `Role$inboundSchema` instead. */
|
|
45
|
+
export const inboundSchema = Role$inboundSchema;
|
|
46
|
+
/** @deprecated use `Role$outboundSchema` instead. */
|
|
47
|
+
export const outboundSchema = Role$outboundSchema;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
|
|
52
|
+
.nativeEnum(Status);
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> =
|
|
56
|
+
Status$inboundSchema;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
+
*/
|
|
62
|
+
export namespace Status$ {
|
|
63
|
+
/** @deprecated use `Status$inboundSchema` instead. */
|
|
64
|
+
export const inboundSchema = Status$inboundSchema;
|
|
65
|
+
/** @deprecated use `Status$outboundSchema` instead. */
|
|
66
|
+
export const outboundSchema = Status$outboundSchema;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const HealthStatus$inboundSchema: z.ZodType<
|
|
71
|
+
HealthStatus,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
unknown
|
|
74
|
+
> = z.object({
|
|
75
|
+
role: Role$inboundSchema.optional(),
|
|
76
|
+
status: Status$inboundSchema,
|
|
77
|
+
startTime: z.number(),
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export type HealthStatus$Outbound = {
|
|
82
|
+
role?: string | undefined;
|
|
83
|
+
status: string;
|
|
84
|
+
startTime: number;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const HealthStatus$outboundSchema: z.ZodType<
|
|
89
|
+
HealthStatus$Outbound,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
HealthStatus
|
|
92
|
+
> = z.object({
|
|
93
|
+
role: Role$outboundSchema.optional(),
|
|
94
|
+
status: Status$outboundSchema,
|
|
95
|
+
startTime: z.number(),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
+
*/
|
|
102
|
+
export namespace HealthStatus$ {
|
|
103
|
+
/** @deprecated use `HealthStatus$inboundSchema` instead. */
|
|
104
|
+
export const inboundSchema = HealthStatus$inboundSchema;
|
|
105
|
+
/** @deprecated use `HealthStatus$outboundSchema` instead. */
|
|
106
|
+
export const outboundSchema = HealthStatus$outboundSchema;
|
|
107
|
+
/** @deprecated use `HealthStatus$Outbound` instead. */
|
|
108
|
+
export type Outbound = HealthStatus$Outbound;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function healthStatusToJSON(healthStatus: HealthStatus): string {
|
|
112
|
+
return JSON.stringify(HealthStatus$outboundSchema.parse(healthStatus));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function healthStatusFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<HealthStatus, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => HealthStatus$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'HealthStatus' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type Security = {
|
|
11
|
+
bearerAuth?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const Security$inboundSchema: z.ZodType<
|
|
16
|
+
Security,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
bearerAuth: z.string().optional(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type Security$Outbound = {
|
|
25
|
+
bearerAuth?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const Security$outboundSchema: z.ZodType<
|
|
30
|
+
Security$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
Security
|
|
33
|
+
> = z.object({
|
|
34
|
+
bearerAuth: z.string().optional(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
+
*/
|
|
41
|
+
export namespace Security$ {
|
|
42
|
+
/** @deprecated use `Security$inboundSchema` instead. */
|
|
43
|
+
export const inboundSchema = Security$inboundSchema;
|
|
44
|
+
/** @deprecated use `Security$outboundSchema` instead. */
|
|
45
|
+
export const outboundSchema = Security$outboundSchema;
|
|
46
|
+
/** @deprecated use `Security$Outbound` instead. */
|
|
47
|
+
export type Outbound = Security$Outbound;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function securityToJSON(security: Security): string {
|
|
51
|
+
return JSON.stringify(Security$outboundSchema.parse(security));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function securityFromJSON(
|
|
55
|
+
jsonString: string,
|
|
56
|
+
): SafeParseResult<Security, SDKValidationError> {
|
|
57
|
+
return safeParse(
|
|
58
|
+
jsonString,
|
|
59
|
+
(x) => Security$inboundSchema.parse(JSON.parse(x)),
|
|
60
|
+
`Failed to parse 'Security' from JSON`,
|
|
61
|
+
);
|
|
62
|
+
}
|
package/src/sdk/diag.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { diagGetHealthInfo } from "../funcs/diagGetHealthInfo.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as models from "../models/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class Diag extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Provides health info for REST server
|
|
13
|
+
*/
|
|
14
|
+
async getHealthInfo(
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): Promise<models.HealthStatus> {
|
|
17
|
+
return unwrapAsync(diagGetHealthInfo(
|
|
18
|
+
this,
|
|
19
|
+
options,
|
|
20
|
+
));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { diagGetHealthInfo } from "../funcs/diagGetHealthInfo.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as models from "../models/index.js";
|
|
8
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
+
|
|
10
|
+
export class Health extends ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Provides health info for REST server
|
|
13
|
+
*/
|
|
14
|
+
async getHealthInfo(
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): Promise<models.HealthStatus> {
|
|
17
|
+
return unwrapAsync(diagGetHealthInfo(
|
|
18
|
+
this,
|
|
19
|
+
options,
|
|
20
|
+
));
|
|
21
|
+
}
|
|
22
|
+
}
|
package/src/sdk/index.ts
ADDED
package/src/sdk/sdk.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { ClientSDK } from "../lib/sdks.js";
|
|
6
|
+
import { Diag } from "./diag.js";
|
|
7
|
+
import { Health } from "./health.js";
|
|
8
|
+
|
|
9
|
+
export class CriblControlPlane extends ClientSDK {
|
|
10
|
+
private _diag?: Diag;
|
|
11
|
+
get diag(): Diag {
|
|
12
|
+
return (this._diag ??= new Diag(this._options));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
private _health?: Health;
|
|
16
|
+
get health(): Health {
|
|
17
|
+
return (this._health ??= new Health(this._options));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export type APICall =
|
|
6
|
+
| {
|
|
7
|
+
status: "complete";
|
|
8
|
+
request: Request;
|
|
9
|
+
response: Response;
|
|
10
|
+
}
|
|
11
|
+
| {
|
|
12
|
+
status: "request-error";
|
|
13
|
+
request: Request;
|
|
14
|
+
response?: undefined;
|
|
15
|
+
}
|
|
16
|
+
| {
|
|
17
|
+
status: "invalid";
|
|
18
|
+
request?: undefined;
|
|
19
|
+
response?: undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export class APIPromise<T> implements Promise<T> {
|
|
23
|
+
readonly #promise: Promise<[T, APICall]>;
|
|
24
|
+
readonly #unwrapped: Promise<T>;
|
|
25
|
+
|
|
26
|
+
readonly [Symbol.toStringTag] = "APIPromise";
|
|
27
|
+
|
|
28
|
+
constructor(p: [T, APICall] | Promise<[T, APICall]>) {
|
|
29
|
+
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
30
|
+
this.#unwrapped =
|
|
31
|
+
p instanceof Promise
|
|
32
|
+
? this.#promise.then(([value]) => value)
|
|
33
|
+
: Promise.resolve(p[0]);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
then<TResult1 = T, TResult2 = never>(
|
|
37
|
+
onfulfilled?:
|
|
38
|
+
| ((value: T) => TResult1 | PromiseLike<TResult1>)
|
|
39
|
+
| null
|
|
40
|
+
| undefined,
|
|
41
|
+
onrejected?:
|
|
42
|
+
| ((reason: any) => TResult2 | PromiseLike<TResult2>)
|
|
43
|
+
| null
|
|
44
|
+
| undefined,
|
|
45
|
+
): Promise<TResult1 | TResult2> {
|
|
46
|
+
return this.#promise.then(
|
|
47
|
+
onfulfilled ? ([value]) => onfulfilled(value) : void 0,
|
|
48
|
+
onrejected,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
catch<TResult = never>(
|
|
53
|
+
onrejected?:
|
|
54
|
+
| ((reason: any) => TResult | PromiseLike<TResult>)
|
|
55
|
+
| null
|
|
56
|
+
| undefined,
|
|
57
|
+
): Promise<T | TResult> {
|
|
58
|
+
return this.#unwrapped.catch(onrejected);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
finally(onfinally?: (() => void) | null | undefined): Promise<T> {
|
|
62
|
+
return this.#unwrapped.finally(onfinally);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
$inspect(): Promise<[T, APICall]> {
|
|
66
|
+
return this.#promise;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export const blobLikeSchema: z.ZodType<Blob, z.ZodTypeDef, Blob> =
|
|
8
|
+
z.custom<Blob>(isBlobLike, {
|
|
9
|
+
message: "expected a Blob, File or Blob-like object",
|
|
10
|
+
fatal: true,
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export function isBlobLike(val: unknown): val is Blob {
|
|
14
|
+
if (val instanceof Blob) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const name = val[Symbol.toStringTag];
|
|
23
|
+
if (typeof name !== "string") {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
if (name !== "Blob" && name !== "File") {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return "stream" in val && typeof val.stream === "function";
|
|
31
|
+
}
|