@detent/sdk 0.1.0
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/devcontainer.json +45 -0
- package/FUNCTIONS.md +87 -0
- package/README.md +413 -0
- package/RUNTIMES.md +48 -0
- package/_speakeasy/.github/action-inputs-config.json +53 -0
- package/_speakeasy/.github/action-security-config.json +88 -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/diagnostics-create.d.ts +24 -0
- package/dist/commonjs/funcs/diagnostics-create.d.ts.map +1 -0
- package/dist/commonjs/funcs/diagnostics-create.js +120 -0
- package/dist/commonjs/funcs/diagnostics-create.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 +73 -0
- package/dist/commonjs/lib/base64.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +37 -0
- package/dist/commonjs/lib/config.d.ts.map +1 -0
- package/dist/commonjs/lib/config.js +42 -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 +53 -0
- package/dist/commonjs/lib/encodings.d.ts.map +1 -0
- package/dist/commonjs/lib/encodings.js +384 -0
- package/dist/commonjs/lib/encodings.js.map +1 -0
- package/dist/commonjs/lib/env.d.ts +14 -0
- package/dist/commonjs/lib/env.d.ts.map +1 -0
- package/dist/commonjs/lib/env.js +81 -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 +21 -0
- package/dist/commonjs/lib/schemas.d.ts.map +1 -0
- package/dist/commonjs/lib/schemas.js +95 -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 +80 -0
- package/dist/commonjs/lib/security.d.ts.map +1 -0
- package/dist/commonjs/lib/security.js +126 -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/models/detected-tool.d.ts +19 -0
- package/dist/commonjs/models/detected-tool.d.ts.map +1 -0
- package/dist/commonjs/models/detected-tool.js +54 -0
- package/dist/commonjs/models/detected-tool.js.map +1 -0
- package/dist/commonjs/models/diagnostic-lite.d.ts +25 -0
- package/dist/commonjs/models/diagnostic-lite.d.ts.map +1 -0
- package/dist/commonjs/models/diagnostic-lite.js +59 -0
- package/dist/commonjs/models/diagnostic-lite.js.map +1 -0
- package/dist/commonjs/models/diagnostic-summary.d.ts +24 -0
- package/dist/commonjs/models/diagnostic-summary.d.ts.map +1 -0
- package/dist/commonjs/models/diagnostic-summary.js +53 -0
- package/dist/commonjs/models/diagnostic-summary.js.map +1 -0
- package/dist/commonjs/models/diagnostic.d.ts +46 -0
- package/dist/commonjs/models/diagnostic.d.ts.map +1 -0
- package/dist/commonjs/models/diagnostic.js +68 -0
- package/dist/commonjs/models/diagnostic.js.map +1 -0
- package/dist/commonjs/models/diagnostics-request.d.ts +27 -0
- package/dist/commonjs/models/diagnostics-request.d.ts.map +1 -0
- package/dist/commonjs/models/diagnostics-request.js +53 -0
- package/dist/commonjs/models/diagnostics-request.js.map +1 -0
- package/dist/commonjs/models/diagnostics-response-full.d.ts +31 -0
- package/dist/commonjs/models/diagnostics-response-full.d.ts.map +1 -0
- package/dist/commonjs/models/diagnostics-response-full.js +62 -0
- package/dist/commonjs/models/diagnostics-response-full.js.map +1 -0
- package/dist/commonjs/models/diagnostics-response-lite.d.ts +26 -0
- package/dist/commonjs/models/diagnostics-response-lite.d.ts.map +1 -0
- package/dist/commonjs/models/diagnostics-response-lite.js +60 -0
- package/dist/commonjs/models/diagnostics-response-lite.js.map +1 -0
- package/dist/commonjs/models/diagnostics-response.d.ts +11 -0
- package/dist/commonjs/models/diagnostics-response.d.ts.map +1 -0
- package/dist/commonjs/models/diagnostics-response.js +20 -0
- package/dist/commonjs/models/diagnostics-response.js.map +1 -0
- package/dist/commonjs/models/errors/detent-sdk-default-error.d.ts +10 -0
- package/dist/commonjs/models/errors/detent-sdk-default-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/detent-sdk-default-error.js +34 -0
- package/dist/commonjs/models/errors/detent-sdk-default-error.js.map +1 -0
- package/dist/commonjs/models/errors/detent-sdk-error.d.ts +19 -0
- package/dist/commonjs/models/errors/detent-sdk-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/detent-sdk-error.js +20 -0
- package/dist/commonjs/models/errors/detent-sdk-error.js.map +1 -0
- package/dist/commonjs/models/errors/error-response.d.ts +24 -0
- package/dist/commonjs/models/errors/error-response.d.ts.map +1 -0
- package/dist/commonjs/models/errors/error-response.js +68 -0
- package/dist/commonjs/models/errors/error-response.js.map +1 -0
- package/dist/commonjs/models/errors/http-client-errors.d.ts +44 -0
- package/dist/commonjs/models/errors/http-client-errors.d.ts.map +1 -0
- package/dist/commonjs/models/errors/http-client-errors.js +78 -0
- package/dist/commonjs/models/errors/http-client-errors.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +8 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -0
- package/dist/commonjs/models/errors/index.js +27 -0
- package/dist/commonjs/models/errors/index.js.map +1 -0
- package/dist/commonjs/models/errors/rate-limit-error.d.ts +32 -0
- package/dist/commonjs/models/errors/rate-limit-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/rate-limit-error.js +70 -0
- package/dist/commonjs/models/errors/rate-limit-error.js.map +1 -0
- package/dist/commonjs/models/errors/response-validation-error.d.ts +26 -0
- package/dist/commonjs/models/errors/response-validation-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/response-validation-error.js +66 -0
- package/dist/commonjs/models/errors/response-validation-error.js.map +1 -0
- package/dist/commonjs/models/errors/sdk-validation-error.d.ts +21 -0
- package/dist/commonjs/models/errors/sdk-validation-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/sdk-validation-error.js +82 -0
- package/dist/commonjs/models/errors/sdk-validation-error.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +11 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +30 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mode-enum.d.ts +16 -0
- package/dist/commonjs/models/mode-enum.d.ts.map +1 -0
- package/dist/commonjs/models/mode-enum.js +50 -0
- package/dist/commonjs/models/mode-enum.js.map +1 -0
- package/dist/commonjs/models/severity.d.ts +16 -0
- package/dist/commonjs/models/severity.d.ts.map +1 -0
- package/dist/commonjs/models/severity.js +50 -0
- package/dist/commonjs/models/severity.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/sdk/diagnostics.d.ts +18 -0
- package/dist/commonjs/sdk/diagnostics.d.ts.map +1 -0
- package/dist/commonjs/sdk/diagnostics.js +28 -0
- package/dist/commonjs/sdk/diagnostics.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 +7 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -0
- package/dist/commonjs/sdk/sdk.js +15 -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/const-date-time.d.ts +3 -0
- package/dist/commonjs/types/const-date-time.d.ts.map +1 -0
- package/dist/commonjs/types/const-date-time.js +46 -0
- package/dist/commonjs/types/const-date-time.js.map +1 -0
- package/dist/commonjs/types/default-to-zero-value.d.ts +12 -0
- package/dist/commonjs/types/default-to-zero-value.d.ts.map +1 -0
- package/dist/commonjs/types/default-to-zero-value.js +35 -0
- package/dist/commonjs/types/default-to-zero-value.js.map +1 -0
- package/dist/commonjs/types/discriminated-union.d.ts +25 -0
- package/dist/commonjs/types/discriminated-union.d.ts.map +1 -0
- package/dist/commonjs/types/discriminated-union.js +98 -0
- package/dist/commonjs/types/discriminated-union.js.map +1 -0
- package/dist/commonjs/types/enums.d.ts +9 -0
- package/dist/commonjs/types/enums.d.ts.map +1 -0
- package/dist/commonjs/types/enums.js +66 -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 +10 -0
- package/dist/commonjs/types/index.d.ts.map +1 -0
- package/dist/commonjs/types/index.js +31 -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/primitives.d.ts +11 -0
- package/dist/commonjs/types/primitives.d.ts.map +1 -0
- package/dist/commonjs/types/primitives.js +176 -0
- package/dist/commonjs/types/primitives.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/smart-union.d.ts +7 -0
- package/dist/commonjs/types/smart-union.d.ts.map +1 -0
- package/dist/commonjs/types/smart-union.js +147 -0
- package/dist/commonjs/types/smart-union.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/commonjs/types/unrecognized.d.ts +16 -0
- package/dist/commonjs/types/unrecognized.d.ts.map +1 -0
- package/dist/commonjs/types/unrecognized.js +34 -0
- package/dist/commonjs/types/unrecognized.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/diagnostics-create.d.ts +24 -0
- package/dist/esm/funcs/diagnostics-create.d.ts.map +1 -0
- package/dist/esm/funcs/diagnostics-create.js +84 -0
- package/dist/esm/funcs/diagnostics-create.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 +31 -0
- package/dist/esm/lib/base64.js.map +1 -0
- package/dist/esm/lib/config.d.ts +37 -0
- package/dist/esm/lib/config.d.ts.map +1 -0
- package/dist/esm/lib/config.js +38 -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 +53 -0
- package/dist/esm/lib/encodings.d.ts.map +1 -0
- package/dist/esm/lib/encodings.js +370 -0
- package/dist/esm/lib/encodings.js.map +1 -0
- package/dist/esm/lib/env.d.ts +14 -0
- package/dist/esm/lib/env.d.ts.map +1 -0
- package/dist/esm/lib/env.js +43 -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 +21 -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 +80 -0
- package/dist/esm/lib/security.d.ts.map +1 -0
- package/dist/esm/lib/security.js +121 -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/models/detected-tool.d.ts +19 -0
- package/dist/esm/models/detected-tool.d.ts.map +1 -0
- package/dist/esm/models/detected-tool.js +18 -0
- package/dist/esm/models/detected-tool.js.map +1 -0
- package/dist/esm/models/diagnostic-lite.d.ts +25 -0
- package/dist/esm/models/diagnostic-lite.d.ts.map +1 -0
- package/dist/esm/models/diagnostic-lite.js +22 -0
- package/dist/esm/models/diagnostic-lite.js.map +1 -0
- package/dist/esm/models/diagnostic-summary.d.ts +24 -0
- package/dist/esm/models/diagnostic-summary.d.ts.map +1 -0
- package/dist/esm/models/diagnostic-summary.js +16 -0
- package/dist/esm/models/diagnostic-summary.js.map +1 -0
- package/dist/esm/models/diagnostic.d.ts +46 -0
- package/dist/esm/models/diagnostic.d.ts.map +1 -0
- package/dist/esm/models/diagnostic.js +31 -0
- package/dist/esm/models/diagnostic.js.map +1 -0
- package/dist/esm/models/diagnostics-request.d.ts +27 -0
- package/dist/esm/models/diagnostics-request.d.ts.map +1 -0
- package/dist/esm/models/diagnostics-request.js +16 -0
- package/dist/esm/models/diagnostics-request.js.map +1 -0
- package/dist/esm/models/diagnostics-response-full.d.ts +31 -0
- package/dist/esm/models/diagnostics-response-full.d.ts.map +1 -0
- package/dist/esm/models/diagnostics-response-full.js +25 -0
- package/dist/esm/models/diagnostics-response-full.js.map +1 -0
- package/dist/esm/models/diagnostics-response-lite.d.ts +26 -0
- package/dist/esm/models/diagnostics-response-lite.d.ts.map +1 -0
- package/dist/esm/models/diagnostics-response-lite.js +23 -0
- package/dist/esm/models/diagnostics-response-lite.js.map +1 -0
- package/dist/esm/models/diagnostics-response.d.ts +11 -0
- package/dist/esm/models/diagnostics-response.d.ts.map +1 -0
- package/dist/esm/models/diagnostics-response.js +16 -0
- package/dist/esm/models/diagnostics-response.js.map +1 -0
- package/dist/esm/models/errors/detent-sdk-default-error.d.ts +10 -0
- package/dist/esm/models/errors/detent-sdk-default-error.d.ts.map +1 -0
- package/dist/esm/models/errors/detent-sdk-default-error.js +30 -0
- package/dist/esm/models/errors/detent-sdk-default-error.js.map +1 -0
- package/dist/esm/models/errors/detent-sdk-error.d.ts +19 -0
- package/dist/esm/models/errors/detent-sdk-error.d.ts.map +1 -0
- package/dist/esm/models/errors/detent-sdk-error.js +16 -0
- package/dist/esm/models/errors/detent-sdk-error.js.map +1 -0
- package/dist/esm/models/errors/error-response.d.ts +24 -0
- package/dist/esm/models/errors/error-response.d.ts.map +1 -0
- package/dist/esm/models/errors/error-response.js +31 -0
- package/dist/esm/models/errors/error-response.js.map +1 -0
- package/dist/esm/models/errors/http-client-errors.d.ts +44 -0
- package/dist/esm/models/errors/http-client-errors.d.ts.map +1 -0
- package/dist/esm/models/errors/http-client-errors.js +69 -0
- package/dist/esm/models/errors/http-client-errors.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +8 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -0
- package/dist/esm/models/errors/index.js +11 -0
- package/dist/esm/models/errors/index.js.map +1 -0
- package/dist/esm/models/errors/rate-limit-error.d.ts +32 -0
- package/dist/esm/models/errors/rate-limit-error.d.ts.map +1 -0
- package/dist/esm/models/errors/rate-limit-error.js +33 -0
- package/dist/esm/models/errors/rate-limit-error.js.map +1 -0
- package/dist/esm/models/errors/response-validation-error.d.ts +26 -0
- package/dist/esm/models/errors/response-validation-error.d.ts.map +1 -0
- package/dist/esm/models/errors/response-validation-error.js +29 -0
- package/dist/esm/models/errors/response-validation-error.js.map +1 -0
- package/dist/esm/models/errors/sdk-validation-error.d.ts +21 -0
- package/dist/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
- package/dist/esm/models/errors/sdk-validation-error.js +44 -0
- package/dist/esm/models/errors/sdk-validation-error.js.map +1 -0
- package/dist/esm/models/index.d.ts +11 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +14 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mode-enum.d.ts +16 -0
- package/dist/esm/models/mode-enum.d.ts.map +1 -0
- package/dist/esm/models/mode-enum.js +14 -0
- package/dist/esm/models/mode-enum.js.map +1 -0
- package/dist/esm/models/severity.d.ts +16 -0
- package/dist/esm/models/severity.d.ts.map +1 -0
- package/dist/esm/models/severity.js +14 -0
- package/dist/esm/models/severity.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/sdk/diagnostics.d.ts +18 -0
- package/dist/esm/sdk/diagnostics.d.ts.map +1 -0
- package/dist/esm/sdk/diagnostics.js +24 -0
- package/dist/esm/sdk/diagnostics.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 +7 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -0
- package/dist/esm/sdk/sdk.js +11 -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/const-date-time.d.ts +3 -0
- package/dist/esm/types/const-date-time.d.ts.map +1 -0
- package/dist/esm/types/const-date-time.js +10 -0
- package/dist/esm/types/const-date-time.js.map +1 -0
- package/dist/esm/types/default-to-zero-value.d.ts +12 -0
- package/dist/esm/types/default-to-zero-value.d.ts.map +1 -0
- package/dist/esm/types/default-to-zero-value.js +31 -0
- package/dist/esm/types/default-to-zero-value.js.map +1 -0
- package/dist/esm/types/discriminated-union.d.ts +25 -0
- package/dist/esm/types/discriminated-union.d.ts.map +1 -0
- package/dist/esm/types/discriminated-union.js +61 -0
- package/dist/esm/types/discriminated-union.js.map +1 -0
- package/dist/esm/types/enums.d.ts +9 -0
- package/dist/esm/types/enums.d.ts.map +1 -0
- package/dist/esm/types/enums.js +27 -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 +10 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/index.js +10 -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/primitives.d.ts +11 -0
- package/dist/esm/types/primitives.d.ts.map +1 -0
- package/dist/esm/types/primitives.js +132 -0
- package/dist/esm/types/primitives.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/smart-union.d.ts +7 -0
- package/dist/esm/types/smart-union.d.ts.map +1 -0
- package/dist/esm/types/smart-union.js +111 -0
- package/dist/esm/types/smart-union.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/dist/esm/types/unrecognized.d.ts +16 -0
- package/dist/esm/types/unrecognized.d.ts.map +1 -0
- package/dist/esm/types/unrecognized.js +31 -0
- package/dist/esm/types/unrecognized.js.map +1 -0
- package/examples/diagnosticsCreate.example.ts +26 -0
- package/examples/package-lock.json +611 -0
- package/examples/package.json +18 -0
- package/jsr.json +27 -0
- package/package.json +114 -0
- package/src/core.ts +13 -0
- package/src/funcs/diagnostics-create.ts +174 -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 +39 -0
- package/src/lib/config.ts +69 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +501 -0
- package/src/lib/env.ts +53 -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 +352 -0
- package/src/lib/primitives.ts +150 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +94 -0
- package/src/lib/sdks.ts +406 -0
- package/src/lib/security.ts +237 -0
- package/src/lib/url.ts +33 -0
- package/src/models/detected-tool.ts +25 -0
- package/src/models/diagnostic-lite.ts +57 -0
- package/src/models/diagnostic-summary.ts +47 -0
- package/src/models/diagnostic.ts +83 -0
- package/src/models/diagnostics-request.ts +47 -0
- package/src/models/diagnostics-response-full.ts +67 -0
- package/src/models/diagnostics-response-lite.ts +61 -0
- package/src/models/diagnostics-response.ts +42 -0
- package/src/models/errors/detent-sdk-default-error.ts +40 -0
- package/src/models/errors/detent-sdk-error.ts +35 -0
- package/src/models/errors/error-response.ts +58 -0
- package/src/models/errors/http-client-errors.ts +62 -0
- package/src/models/errors/index.ts +11 -0
- package/src/models/errors/rate-limit-error.ts +68 -0
- package/src/models/errors/response-validation-error.ts +50 -0
- package/src/models/errors/sdk-validation-error.ts +54 -0
- package/src/models/index.ts +14 -0
- package/src/models/mode-enum.ts +23 -0
- package/src/models/severity.ts +23 -0
- package/src/sdk/diagnostics.ts +33 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/sdk.ts +13 -0
- package/src/types/async.ts +68 -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/discriminated-union.ts +101 -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 +168 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/smart-union.ts +146 -0
- package/src/types/streams.ts +21 -0
- package/src/types/unrecognized.ts +35 -0
- package/tsconfig.json +40 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
type OAuth2PasswordFlow = {
|
|
6
|
+
username: string;
|
|
7
|
+
password: string;
|
|
8
|
+
clientID?: string | undefined;
|
|
9
|
+
clientSecret?: string | undefined;
|
|
10
|
+
tokenURL: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export enum SecurityErrorCode {
|
|
14
|
+
Incomplete = "incomplete",
|
|
15
|
+
UnrecognisedSecurityType = "unrecognized_security_type",
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class SecurityError extends Error {
|
|
19
|
+
constructor(
|
|
20
|
+
public code: SecurityErrorCode,
|
|
21
|
+
message: string,
|
|
22
|
+
) {
|
|
23
|
+
super(message);
|
|
24
|
+
this.name = "SecurityError";
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static incomplete(): SecurityError {
|
|
28
|
+
return new SecurityError(
|
|
29
|
+
SecurityErrorCode.Incomplete,
|
|
30
|
+
"Security requirements not met in order to perform the operation",
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
static unrecognizedType(type: string): SecurityError {
|
|
34
|
+
return new SecurityError(
|
|
35
|
+
SecurityErrorCode.UnrecognisedSecurityType,
|
|
36
|
+
`Unrecognised security type: ${type}`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type SecurityState = {
|
|
42
|
+
basic: { username?: string | undefined; password?: string | undefined };
|
|
43
|
+
headers: Record<string, string>;
|
|
44
|
+
queryParams: Record<string, string>;
|
|
45
|
+
cookies: Record<string, string>;
|
|
46
|
+
oauth2: ({ type: "password" } & OAuth2PasswordFlow) | { type: "none" };
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
type SecurityInputBasic = {
|
|
50
|
+
type: "http:basic";
|
|
51
|
+
value:
|
|
52
|
+
| { username?: string | undefined; password?: string | undefined }
|
|
53
|
+
| null
|
|
54
|
+
| undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
type SecurityInputBearer = {
|
|
58
|
+
type: "http:bearer";
|
|
59
|
+
value: string | null | undefined;
|
|
60
|
+
fieldName: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
type SecurityInputAPIKey = {
|
|
64
|
+
type: "apiKey:header" | "apiKey:query" | "apiKey:cookie";
|
|
65
|
+
value: string | null | undefined;
|
|
66
|
+
fieldName: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
type SecurityInputOIDC = {
|
|
70
|
+
type: "openIdConnect";
|
|
71
|
+
value: string | null | undefined;
|
|
72
|
+
fieldName: string;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
type SecurityInputOAuth2 = {
|
|
76
|
+
type: "oauth2";
|
|
77
|
+
value: string | null | undefined;
|
|
78
|
+
fieldName: string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
type SecurityInputOAuth2ClientCredentials = {
|
|
82
|
+
type: "oauth2:client_credentials";
|
|
83
|
+
value:
|
|
84
|
+
| {
|
|
85
|
+
clientID?: string | undefined;
|
|
86
|
+
clientSecret?: string | undefined;
|
|
87
|
+
}
|
|
88
|
+
| null
|
|
89
|
+
| string
|
|
90
|
+
| undefined;
|
|
91
|
+
fieldName?: string;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
type SecurityInputOAuth2PasswordCredentials = {
|
|
95
|
+
type: "oauth2:password";
|
|
96
|
+
value:
|
|
97
|
+
| string
|
|
98
|
+
| null
|
|
99
|
+
| undefined;
|
|
100
|
+
fieldName?: string;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
type SecurityInputCustom = {
|
|
104
|
+
type: "http:custom";
|
|
105
|
+
value: any | null | undefined;
|
|
106
|
+
fieldName?: string;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export type SecurityInput =
|
|
110
|
+
| SecurityInputBasic
|
|
111
|
+
| SecurityInputBearer
|
|
112
|
+
| SecurityInputAPIKey
|
|
113
|
+
| SecurityInputOAuth2
|
|
114
|
+
| SecurityInputOAuth2ClientCredentials
|
|
115
|
+
| SecurityInputOAuth2PasswordCredentials
|
|
116
|
+
| SecurityInputOIDC
|
|
117
|
+
| SecurityInputCustom;
|
|
118
|
+
|
|
119
|
+
export function resolveSecurity(
|
|
120
|
+
...options: SecurityInput[][]
|
|
121
|
+
): SecurityState | null {
|
|
122
|
+
const state: SecurityState = {
|
|
123
|
+
basic: {},
|
|
124
|
+
headers: {},
|
|
125
|
+
queryParams: {},
|
|
126
|
+
cookies: {},
|
|
127
|
+
oauth2: { type: "none" },
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const option = options.find((opts) => {
|
|
131
|
+
return opts.every((o) => {
|
|
132
|
+
if (o.value == null) {
|
|
133
|
+
return false;
|
|
134
|
+
} else if (o.type === "http:basic") {
|
|
135
|
+
return o.value.username != null || o.value.password != null;
|
|
136
|
+
} else if (o.type === "http:custom") {
|
|
137
|
+
return null;
|
|
138
|
+
} else if (o.type === "oauth2:password") {
|
|
139
|
+
return (
|
|
140
|
+
typeof o.value === "string" && !!o.value
|
|
141
|
+
);
|
|
142
|
+
} else if (o.type === "oauth2:client_credentials") {
|
|
143
|
+
if (typeof o.value == "string") {
|
|
144
|
+
return !!o.value;
|
|
145
|
+
}
|
|
146
|
+
return o.value.clientID != null || o.value.clientSecret != null;
|
|
147
|
+
} else if (typeof o.value === "string") {
|
|
148
|
+
return !!o.value;
|
|
149
|
+
} else {
|
|
150
|
+
throw new Error(
|
|
151
|
+
`Unrecognized security type: ${o.type} (value type: ${typeof o
|
|
152
|
+
.value})`,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
if (option == null) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
option.forEach((spec) => {
|
|
162
|
+
if (spec.value == null) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const { type } = spec;
|
|
167
|
+
|
|
168
|
+
switch (type) {
|
|
169
|
+
case "apiKey:header":
|
|
170
|
+
state.headers[spec.fieldName] = spec.value;
|
|
171
|
+
break;
|
|
172
|
+
case "apiKey:query":
|
|
173
|
+
state.queryParams[spec.fieldName] = spec.value;
|
|
174
|
+
break;
|
|
175
|
+
case "apiKey:cookie":
|
|
176
|
+
state.cookies[spec.fieldName] = spec.value;
|
|
177
|
+
break;
|
|
178
|
+
case "http:basic":
|
|
179
|
+
applyBasic(state, spec);
|
|
180
|
+
break;
|
|
181
|
+
case "http:custom":
|
|
182
|
+
break;
|
|
183
|
+
case "http:bearer":
|
|
184
|
+
applyBearer(state, spec);
|
|
185
|
+
break;
|
|
186
|
+
case "oauth2":
|
|
187
|
+
applyBearer(state, spec);
|
|
188
|
+
break;
|
|
189
|
+
case "oauth2:password":
|
|
190
|
+
applyBearer(state, spec);
|
|
191
|
+
break;
|
|
192
|
+
case "oauth2:client_credentials":
|
|
193
|
+
break;
|
|
194
|
+
case "openIdConnect":
|
|
195
|
+
applyBearer(state, spec);
|
|
196
|
+
break;
|
|
197
|
+
default:
|
|
198
|
+
spec satisfies never;
|
|
199
|
+
throw SecurityError.unrecognizedType(type);
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
return state;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function applyBasic(
|
|
207
|
+
state: SecurityState,
|
|
208
|
+
spec: SecurityInputBasic,
|
|
209
|
+
) {
|
|
210
|
+
if (spec.value == null) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
state.basic = spec.value;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function applyBearer(
|
|
218
|
+
state: SecurityState,
|
|
219
|
+
spec:
|
|
220
|
+
| SecurityInputBearer
|
|
221
|
+
| SecurityInputOAuth2
|
|
222
|
+
| SecurityInputOIDC
|
|
223
|
+
| SecurityInputOAuth2PasswordCredentials,
|
|
224
|
+
) {
|
|
225
|
+
if (typeof spec.value !== "string" || !spec.value) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
let value = spec.value;
|
|
230
|
+
if (value.slice(0, 7).toLowerCase() !== "bearer ") {
|
|
231
|
+
value = `Bearer ${value}`;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (spec.fieldName !== undefined) {
|
|
235
|
+
state.headers[spec.fieldName] = value;
|
|
236
|
+
}
|
|
237
|
+
}
|
package/src/lib/url.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const hasOwn = Object.prototype.hasOwnProperty;
|
|
6
|
+
|
|
7
|
+
export type Params = Partial<Record<string, string | number>>;
|
|
8
|
+
|
|
9
|
+
export function pathToFunc(
|
|
10
|
+
pathPattern: string,
|
|
11
|
+
options?: { charEncoding?: "percent" | "none" },
|
|
12
|
+
): (params?: Params) => string {
|
|
13
|
+
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
14
|
+
|
|
15
|
+
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
|
+
return pathPattern.replace(paramRE, function (_, placeholder) {
|
|
17
|
+
if (!hasOwn.call(params, placeholder)) {
|
|
18
|
+
throw new Error(`Parameter '${placeholder}' is required`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const value = params[placeholder];
|
|
22
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`Parameter '${placeholder}' must be a string or number`,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return options?.charEncoding === "percent"
|
|
29
|
+
? encodeURIComponent(`${value}`)
|
|
30
|
+
: `${value}`;
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Hint for which tool produced the output. Auto-detected if omitted.
|
|
10
|
+
*/
|
|
11
|
+
export const DetectedTool = {
|
|
12
|
+
Eslint: "eslint",
|
|
13
|
+
Vitest: "vitest",
|
|
14
|
+
Typescript: "typescript",
|
|
15
|
+
Cargo: "cargo",
|
|
16
|
+
Golangci: "golangci",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* Hint for which tool produced the output. Auto-detected if omitted.
|
|
20
|
+
*/
|
|
21
|
+
export type DetectedTool = ClosedEnum<typeof DetectedTool>;
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const DetectedTool$outboundSchema: z.ZodMiniEnum<typeof DetectedTool> = z
|
|
25
|
+
.enum(DetectedTool);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export type DiagnosticLite = {
|
|
13
|
+
/**
|
|
14
|
+
* Error or warning message
|
|
15
|
+
*/
|
|
16
|
+
message: string;
|
|
17
|
+
/**
|
|
18
|
+
* File path where the issue occurred
|
|
19
|
+
*/
|
|
20
|
+
filePath?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Line number (1-indexed)
|
|
23
|
+
*/
|
|
24
|
+
line?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Column number (1-indexed)
|
|
27
|
+
*/
|
|
28
|
+
column?: number | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const DiagnosticLite$inboundSchema: z.ZodMiniType<
|
|
33
|
+
DiagnosticLite,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.pipe(
|
|
36
|
+
z.object({
|
|
37
|
+
message: types.string(),
|
|
38
|
+
file_path: types.optional(types.string()),
|
|
39
|
+
line: types.optional(types.number()),
|
|
40
|
+
column: types.optional(types.number()),
|
|
41
|
+
}),
|
|
42
|
+
z.transform((v) => {
|
|
43
|
+
return remap$(v, {
|
|
44
|
+
"file_path": "filePath",
|
|
45
|
+
});
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
export function diagnosticLiteFromJSON(
|
|
50
|
+
jsonString: string,
|
|
51
|
+
): SafeParseResult<DiagnosticLite, SDKValidationError> {
|
|
52
|
+
return safeParse(
|
|
53
|
+
jsonString,
|
|
54
|
+
(x) => DiagnosticLite$inboundSchema.parse(JSON.parse(x)),
|
|
55
|
+
`Failed to parse 'DiagnosticLite' from JSON`,
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import * as types from "../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Aggregated counts
|
|
13
|
+
*/
|
|
14
|
+
export type DiagnosticSummary = {
|
|
15
|
+
/**
|
|
16
|
+
* Total number of diagnostics
|
|
17
|
+
*/
|
|
18
|
+
total: number;
|
|
19
|
+
/**
|
|
20
|
+
* Number of errors
|
|
21
|
+
*/
|
|
22
|
+
errors: number;
|
|
23
|
+
/**
|
|
24
|
+
* Number of warnings
|
|
25
|
+
*/
|
|
26
|
+
warnings: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const DiagnosticSummary$inboundSchema: z.ZodMiniType<
|
|
31
|
+
DiagnosticSummary,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
total: types.number(),
|
|
35
|
+
errors: types.number(),
|
|
36
|
+
warnings: types.number(),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function diagnosticSummaryFromJSON(
|
|
40
|
+
jsonString: string,
|
|
41
|
+
): SafeParseResult<DiagnosticSummary, SDKValidationError> {
|
|
42
|
+
return safeParse(
|
|
43
|
+
jsonString,
|
|
44
|
+
(x) => DiagnosticSummary$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
+
`Failed to parse 'DiagnosticSummary' from JSON`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
11
|
+
import { Severity, Severity$inboundSchema } from "./severity.js";
|
|
12
|
+
|
|
13
|
+
export type Diagnostic = {
|
|
14
|
+
/**
|
|
15
|
+
* Error or warning message
|
|
16
|
+
*/
|
|
17
|
+
message: string;
|
|
18
|
+
/**
|
|
19
|
+
* File path where the issue occurred
|
|
20
|
+
*/
|
|
21
|
+
filePath?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Line number (1-indexed)
|
|
24
|
+
*/
|
|
25
|
+
line?: number | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Column number (1-indexed)
|
|
28
|
+
*/
|
|
29
|
+
column?: number | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Issue severity level
|
|
32
|
+
*/
|
|
33
|
+
severity: Severity;
|
|
34
|
+
/**
|
|
35
|
+
* Tool-specific rule identifier
|
|
36
|
+
*/
|
|
37
|
+
ruleId?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Stack trace if available (e.g., for test failures)
|
|
40
|
+
*/
|
|
41
|
+
stackTrace?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Suggested fixes from the tool
|
|
44
|
+
*/
|
|
45
|
+
suggestions?: Array<string> | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the tool can auto-fix this issue
|
|
48
|
+
*/
|
|
49
|
+
fixable?: boolean | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const Diagnostic$inboundSchema: z.ZodMiniType<Diagnostic, unknown> = z
|
|
54
|
+
.pipe(
|
|
55
|
+
z.object({
|
|
56
|
+
message: types.string(),
|
|
57
|
+
file_path: types.optional(types.string()),
|
|
58
|
+
line: types.optional(types.number()),
|
|
59
|
+
column: types.optional(types.number()),
|
|
60
|
+
severity: Severity$inboundSchema,
|
|
61
|
+
rule_id: types.optional(types.string()),
|
|
62
|
+
stack_trace: types.optional(types.string()),
|
|
63
|
+
suggestions: types.optional(z.array(types.string())),
|
|
64
|
+
fixable: types.optional(types.boolean()),
|
|
65
|
+
}),
|
|
66
|
+
z.transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
"file_path": "filePath",
|
|
69
|
+
"rule_id": "ruleId",
|
|
70
|
+
"stack_trace": "stackTrace",
|
|
71
|
+
});
|
|
72
|
+
}),
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
export function diagnosticFromJSON(
|
|
76
|
+
jsonString: string,
|
|
77
|
+
): SafeParseResult<Diagnostic, SDKValidationError> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) => Diagnostic$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
+
`Failed to parse 'Diagnostic' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { DetectedTool, DetectedTool$outboundSchema } from "./detected-tool.js";
|
|
7
|
+
import { ModeEnum, ModeEnum$outboundSchema } from "./mode-enum.js";
|
|
8
|
+
|
|
9
|
+
export type DiagnosticsRequest = {
|
|
10
|
+
/**
|
|
11
|
+
* Raw CI/build log content to parse
|
|
12
|
+
*/
|
|
13
|
+
content: string;
|
|
14
|
+
/**
|
|
15
|
+
* Hint for which tool produced the output. Auto-detected if omitted.
|
|
16
|
+
*/
|
|
17
|
+
tool?: DetectedTool | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Response detail level. 'full' includes severity, ruleId, suggestions. 'lite' is minimal.
|
|
20
|
+
*/
|
|
21
|
+
mode?: ModeEnum | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export type DiagnosticsRequest$Outbound = {
|
|
26
|
+
content: string;
|
|
27
|
+
tool?: string | undefined;
|
|
28
|
+
mode: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const DiagnosticsRequest$outboundSchema: z.ZodMiniType<
|
|
33
|
+
DiagnosticsRequest$Outbound,
|
|
34
|
+
DiagnosticsRequest
|
|
35
|
+
> = z.object({
|
|
36
|
+
content: z.string(),
|
|
37
|
+
tool: z.optional(DetectedTool$outboundSchema),
|
|
38
|
+
mode: z._default(ModeEnum$outboundSchema, "full"),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export function diagnosticsRequestToJSON(
|
|
42
|
+
diagnosticsRequest: DiagnosticsRequest,
|
|
43
|
+
): string {
|
|
44
|
+
return JSON.stringify(
|
|
45
|
+
DiagnosticsRequest$outboundSchema.parse(diagnosticsRequest),
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
DiagnosticSummary,
|
|
12
|
+
DiagnosticSummary$inboundSchema,
|
|
13
|
+
} from "./diagnostic-summary.js";
|
|
14
|
+
import { Diagnostic, Diagnostic$inboundSchema } from "./diagnostic.js";
|
|
15
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
16
|
+
|
|
17
|
+
export type DiagnosticsResponseFull = {
|
|
18
|
+
/**
|
|
19
|
+
* Response mode indicator (discriminator)
|
|
20
|
+
*/
|
|
21
|
+
mode: "full";
|
|
22
|
+
/**
|
|
23
|
+
* Tool detected from output (null if unknown)
|
|
24
|
+
*/
|
|
25
|
+
detectedTool: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* Parsed diagnostics from the log
|
|
28
|
+
*/
|
|
29
|
+
diagnostics: Array<Diagnostic>;
|
|
30
|
+
/**
|
|
31
|
+
* Aggregated counts
|
|
32
|
+
*/
|
|
33
|
+
summary: DiagnosticSummary;
|
|
34
|
+
/**
|
|
35
|
+
* True if diagnostics were truncated (max 10,000)
|
|
36
|
+
*/
|
|
37
|
+
truncated: boolean;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const DiagnosticsResponseFull$inboundSchema: z.ZodMiniType<
|
|
42
|
+
DiagnosticsResponseFull,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.pipe(
|
|
45
|
+
z.object({
|
|
46
|
+
mode: types.literal("full"),
|
|
47
|
+
detected_tool: types.nullable(types.string()),
|
|
48
|
+
diagnostics: z.array(Diagnostic$inboundSchema),
|
|
49
|
+
summary: DiagnosticSummary$inboundSchema,
|
|
50
|
+
truncated: types.boolean(),
|
|
51
|
+
}),
|
|
52
|
+
z.transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
"detected_tool": "detectedTool",
|
|
55
|
+
});
|
|
56
|
+
}),
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
export function diagnosticsResponseFullFromJSON(
|
|
60
|
+
jsonString: string,
|
|
61
|
+
): SafeParseResult<DiagnosticsResponseFull, SDKValidationError> {
|
|
62
|
+
return safeParse(
|
|
63
|
+
jsonString,
|
|
64
|
+
(x) => DiagnosticsResponseFull$inboundSchema.parse(JSON.parse(x)),
|
|
65
|
+
`Failed to parse 'DiagnosticsResponseFull' from JSON`,
|
|
66
|
+
);
|
|
67
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
DiagnosticLite,
|
|
12
|
+
DiagnosticLite$inboundSchema,
|
|
13
|
+
} from "./diagnostic-lite.js";
|
|
14
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
15
|
+
|
|
16
|
+
export type DiagnosticsResponseLite = {
|
|
17
|
+
/**
|
|
18
|
+
* Response mode indicator (discriminator)
|
|
19
|
+
*/
|
|
20
|
+
mode: "lite";
|
|
21
|
+
/**
|
|
22
|
+
* Tool detected from output (null if unknown)
|
|
23
|
+
*/
|
|
24
|
+
detectedTool: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Parsed diagnostics (minimal fields)
|
|
27
|
+
*/
|
|
28
|
+
diagnostics: Array<DiagnosticLite>;
|
|
29
|
+
/**
|
|
30
|
+
* True if diagnostics were truncated (max 10,000)
|
|
31
|
+
*/
|
|
32
|
+
truncated: boolean;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const DiagnosticsResponseLite$inboundSchema: z.ZodMiniType<
|
|
37
|
+
DiagnosticsResponseLite,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.pipe(
|
|
40
|
+
z.object({
|
|
41
|
+
mode: types.literal("lite"),
|
|
42
|
+
detected_tool: types.nullable(types.string()),
|
|
43
|
+
diagnostics: z.array(DiagnosticLite$inboundSchema),
|
|
44
|
+
truncated: types.boolean(),
|
|
45
|
+
}),
|
|
46
|
+
z.transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"detected_tool": "detectedTool",
|
|
49
|
+
});
|
|
50
|
+
}),
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
export function diagnosticsResponseLiteFromJSON(
|
|
54
|
+
jsonString: string,
|
|
55
|
+
): SafeParseResult<DiagnosticsResponseLite, SDKValidationError> {
|
|
56
|
+
return safeParse(
|
|
57
|
+
jsonString,
|
|
58
|
+
(x) => DiagnosticsResponseLite$inboundSchema.parse(JSON.parse(x)),
|
|
59
|
+
`Failed to parse 'DiagnosticsResponseLite' from JSON`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import * as discriminatedUnionTypes from "../types/discriminated-union.js";
|
|
8
|
+
import { discriminatedUnion } from "../types/discriminated-union.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import {
|
|
11
|
+
DiagnosticsResponseFull,
|
|
12
|
+
DiagnosticsResponseFull$inboundSchema,
|
|
13
|
+
} from "./diagnostics-response-full.js";
|
|
14
|
+
import {
|
|
15
|
+
DiagnosticsResponseLite,
|
|
16
|
+
DiagnosticsResponseLite$inboundSchema,
|
|
17
|
+
} from "./diagnostics-response-lite.js";
|
|
18
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
19
|
+
|
|
20
|
+
export type DiagnosticsResponse =
|
|
21
|
+
| DiagnosticsResponseFull
|
|
22
|
+
| DiagnosticsResponseLite
|
|
23
|
+
| discriminatedUnionTypes.Unknown<"mode">;
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const DiagnosticsResponse$inboundSchema: z.ZodMiniType<
|
|
27
|
+
DiagnosticsResponse,
|
|
28
|
+
unknown
|
|
29
|
+
> = discriminatedUnion("mode", {
|
|
30
|
+
full: DiagnosticsResponseFull$inboundSchema,
|
|
31
|
+
lite: DiagnosticsResponseLite$inboundSchema,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function diagnosticsResponseFromJSON(
|
|
35
|
+
jsonString: string,
|
|
36
|
+
): SafeParseResult<DiagnosticsResponse, SDKValidationError> {
|
|
37
|
+
return safeParse(
|
|
38
|
+
jsonString,
|
|
39
|
+
(x) => DiagnosticsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
40
|
+
`Failed to parse 'DiagnosticsResponse' from JSON`,
|
|
41
|
+
);
|
|
42
|
+
}
|