@usenotra/sdk 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/FUNCTIONS.md +89 -0
- package/README.md +429 -0
- package/RUNTIMES.md +48 -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/content-get-post.d.ts +15 -0
- package/dist/commonjs/funcs/content-get-post.d.ts.map +1 -0
- package/dist/commonjs/funcs/content-get-post.js +129 -0
- package/dist/commonjs/funcs/content-get-post.js.map +1 -0
- package/dist/commonjs/funcs/content-list-posts.d.ts +15 -0
- package/dist/commonjs/funcs/content-list-posts.d.ts.map +1 -0
- package/dist/commonjs/funcs/content-list-posts.js +128 -0
- package/dist/commonjs/funcs/content-list-posts.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 +38 -0
- package/dist/commonjs/lib/config.d.ts.map +1 -0
- package/dist/commonjs/lib/config.js +38 -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 +15 -0
- package/dist/commonjs/lib/env.d.ts.map +1 -0
- package/dist/commonjs/lib/env.js +82 -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 +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/models/errors/error-response.d.ts +18 -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 +7 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -0
- package/dist/commonjs/models/errors/index.js +26 -0
- package/dist/commonjs/models/errors/index.js.map +1 -0
- package/dist/commonjs/models/errors/notra-default-error.d.ts +10 -0
- package/dist/commonjs/models/errors/notra-default-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/notra-default-error.js +34 -0
- package/dist/commonjs/models/errors/notra-default-error.js.map +1 -0
- package/dist/commonjs/models/errors/notra-error.d.ts +19 -0
- package/dist/commonjs/models/errors/notra-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/notra-error.js +20 -0
- package/dist/commonjs/models/errors/notra-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 +2 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +21 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/operations/get-post.d.ts +89 -0
- package/dist/commonjs/models/operations/get-post.d.ts.map +1 -0
- package/dist/commonjs/models/operations/get-post.js +125 -0
- package/dist/commonjs/models/operations/get-post.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -0
- package/dist/commonjs/models/operations/index.js +22 -0
- package/dist/commonjs/models/operations/index.js.map +1 -0
- package/dist/commonjs/models/operations/list-posts.d.ts +127 -0
- package/dist/commonjs/models/operations/list-posts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/list-posts.js +150 -0
- package/dist/commonjs/models/operations/list-posts.js.map +1 -0
- package/dist/commonjs/models/security.d.ts +12 -0
- package/dist/commonjs/models/security.d.ts.map +1 -0
- package/dist/commonjs/models/security.js +54 -0
- package/dist/commonjs/models/security.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/sdk/content.d.ts +13 -0
- package/dist/commonjs/sdk/content.d.ts.map +1 -0
- package/dist/commonjs/sdk/content.js +26 -0
- package/dist/commonjs/sdk/content.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/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 +153 -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/content-get-post.d.ts +15 -0
- package/dist/esm/funcs/content-get-post.d.ts.map +1 -0
- package/dist/esm/funcs/content-get-post.js +93 -0
- package/dist/esm/funcs/content-get-post.js.map +1 -0
- package/dist/esm/funcs/content-list-posts.d.ts +15 -0
- package/dist/esm/funcs/content-list-posts.d.ts.map +1 -0
- package/dist/esm/funcs/content-list-posts.js +92 -0
- package/dist/esm/funcs/content-list-posts.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 +38 -0
- package/dist/esm/lib/config.d.ts.map +1 -0
- package/dist/esm/lib/config.js +34 -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 +15 -0
- package/dist/esm/lib/env.d.ts.map +1 -0
- package/dist/esm/lib/env.js +44 -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 +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/models/errors/error-response.d.ts +18 -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 +7 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -0
- package/dist/esm/models/errors/index.js +10 -0
- package/dist/esm/models/errors/index.js.map +1 -0
- package/dist/esm/models/errors/notra-default-error.d.ts +10 -0
- package/dist/esm/models/errors/notra-default-error.d.ts.map +1 -0
- package/dist/esm/models/errors/notra-default-error.js +30 -0
- package/dist/esm/models/errors/notra-default-error.js.map +1 -0
- package/dist/esm/models/errors/notra-error.d.ts +19 -0
- package/dist/esm/models/errors/notra-error.d.ts.map +1 -0
- package/dist/esm/models/errors/notra-error.js +16 -0
- package/dist/esm/models/errors/notra-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 +2 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/operations/get-post.d.ts +89 -0
- package/dist/esm/models/operations/get-post.d.ts.map +1 -0
- package/dist/esm/models/operations/get-post.js +84 -0
- package/dist/esm/models/operations/get-post.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -0
- package/dist/esm/models/operations/index.js +6 -0
- package/dist/esm/models/operations/index.js.map +1 -0
- package/dist/esm/models/operations/list-posts.d.ts +127 -0
- package/dist/esm/models/operations/list-posts.d.ts.map +1 -0
- package/dist/esm/models/operations/list-posts.js +108 -0
- package/dist/esm/models/operations/list-posts.js.map +1 -0
- package/dist/esm/models/security.d.ts +12 -0
- package/dist/esm/models/security.d.ts.map +1 -0
- package/dist/esm/models/security.js +17 -0
- package/dist/esm/models/security.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/sdk/content.d.ts +13 -0
- package/dist/esm/sdk/content.d.ts.map +1 -0
- package/dist/esm/sdk/content.js +22 -0
- package/dist/esm/sdk/content.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/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 +117 -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/contentListPosts.example.ts +28 -0
- package/jsr.json +27 -0
- package/package.json +122 -0
- package/src/core.ts +13 -0
- package/src/funcs/content-get-post.ts +183 -0
- package/src/funcs/content-list-posts.ts +182 -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 +67 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +501 -0
- package/src/lib/env.ts +57 -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 +264 -0
- package/src/lib/url.ts +33 -0
- package/src/models/errors/error-response.ts +52 -0
- package/src/models/errors/http-client-errors.ts +62 -0
- package/src/models/errors/index.ts +10 -0
- package/src/models/errors/notra-default-error.ts +40 -0
- package/src/models/errors/notra-error.ts +35 -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 +5 -0
- package/src/models/operations/get-post.ts +212 -0
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/list-posts.ts +280 -0
- package/src/models/security.ts +34 -0
- package/src/sdk/content.ts +39 -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/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 +153 -0
- package/src/types/streams.ts +21 -0
- package/src/types/unrecognized.ts +35 -0
|
@@ -0,0 +1,212 @@
|
|
|
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 openEnums from "../../types/enums.js";
|
|
8
|
+
import { ClosedEnum, OpenEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
13
|
+
|
|
14
|
+
export const GetPostStatusQueryParamEnum2 = {
|
|
15
|
+
Draft: "draft",
|
|
16
|
+
Published: "published",
|
|
17
|
+
} as const;
|
|
18
|
+
export type GetPostStatusQueryParamEnum2 = ClosedEnum<
|
|
19
|
+
typeof GetPostStatusQueryParamEnum2
|
|
20
|
+
>;
|
|
21
|
+
|
|
22
|
+
export const GetPostStatusQueryParamEnum1 = {
|
|
23
|
+
Draft: "draft",
|
|
24
|
+
Published: "published",
|
|
25
|
+
} as const;
|
|
26
|
+
export type GetPostStatusQueryParamEnum1 = ClosedEnum<
|
|
27
|
+
typeof GetPostStatusQueryParamEnum1
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Filter by status. Repeat the query param to pass multiple values.
|
|
32
|
+
*/
|
|
33
|
+
export type GetPostStatusUnion =
|
|
34
|
+
| GetPostStatusQueryParamEnum1
|
|
35
|
+
| Array<GetPostStatusQueryParamEnum2>;
|
|
36
|
+
|
|
37
|
+
export type GetPostRequest = {
|
|
38
|
+
organizationId: string;
|
|
39
|
+
postId: string;
|
|
40
|
+
/**
|
|
41
|
+
* Filter by status. Repeat the query param to pass multiple values.
|
|
42
|
+
*/
|
|
43
|
+
status?:
|
|
44
|
+
| GetPostStatusQueryParamEnum1
|
|
45
|
+
| Array<GetPostStatusQueryParamEnum2>
|
|
46
|
+
| undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const GetPostPostStatus = {
|
|
50
|
+
Draft: "draft",
|
|
51
|
+
Published: "published",
|
|
52
|
+
} as const;
|
|
53
|
+
export type GetPostPostStatus = OpenEnum<typeof GetPostPostStatus>;
|
|
54
|
+
|
|
55
|
+
export type GetPostPost = {
|
|
56
|
+
id: string;
|
|
57
|
+
title: string;
|
|
58
|
+
content: string;
|
|
59
|
+
markdown: string;
|
|
60
|
+
contentType: string;
|
|
61
|
+
sourceMetadata?: any | undefined;
|
|
62
|
+
status: GetPostPostStatus;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
updatedAt: string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const GetPostMetadataStatus = {
|
|
68
|
+
Draft: "draft",
|
|
69
|
+
Published: "published",
|
|
70
|
+
} as const;
|
|
71
|
+
export type GetPostMetadataStatus = OpenEnum<typeof GetPostMetadataStatus>;
|
|
72
|
+
|
|
73
|
+
export type GetPostMetadata = {
|
|
74
|
+
status: Array<GetPostMetadataStatus>;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Post fetched successfully
|
|
79
|
+
*/
|
|
80
|
+
export type GetPostResponse = {
|
|
81
|
+
post: GetPostPost | null;
|
|
82
|
+
metadata: GetPostMetadata;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const GetPostStatusQueryParamEnum2$outboundSchema: z.ZodMiniEnum<
|
|
87
|
+
typeof GetPostStatusQueryParamEnum2
|
|
88
|
+
> = z.enum(GetPostStatusQueryParamEnum2);
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const GetPostStatusQueryParamEnum1$outboundSchema: z.ZodMiniEnum<
|
|
92
|
+
typeof GetPostStatusQueryParamEnum1
|
|
93
|
+
> = z.enum(GetPostStatusQueryParamEnum1);
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export type GetPostStatusUnion$Outbound = string | Array<string>;
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const GetPostStatusUnion$outboundSchema: z.ZodMiniType<
|
|
100
|
+
GetPostStatusUnion$Outbound,
|
|
101
|
+
GetPostStatusUnion
|
|
102
|
+
> = smartUnion([
|
|
103
|
+
GetPostStatusQueryParamEnum1$outboundSchema,
|
|
104
|
+
z.array(GetPostStatusQueryParamEnum2$outboundSchema),
|
|
105
|
+
]);
|
|
106
|
+
|
|
107
|
+
export function getPostStatusUnionToJSON(
|
|
108
|
+
getPostStatusUnion: GetPostStatusUnion,
|
|
109
|
+
): string {
|
|
110
|
+
return JSON.stringify(
|
|
111
|
+
GetPostStatusUnion$outboundSchema.parse(getPostStatusUnion),
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** @internal */
|
|
116
|
+
export type GetPostRequest$Outbound = {
|
|
117
|
+
organizationId: string;
|
|
118
|
+
postId: string;
|
|
119
|
+
status?: string | Array<string> | undefined;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/** @internal */
|
|
123
|
+
export const GetPostRequest$outboundSchema: z.ZodMiniType<
|
|
124
|
+
GetPostRequest$Outbound,
|
|
125
|
+
GetPostRequest
|
|
126
|
+
> = z.object({
|
|
127
|
+
organizationId: z.string(),
|
|
128
|
+
postId: z.string(),
|
|
129
|
+
status: z.optional(
|
|
130
|
+
smartUnion([
|
|
131
|
+
GetPostStatusQueryParamEnum1$outboundSchema,
|
|
132
|
+
z.array(GetPostStatusQueryParamEnum2$outboundSchema),
|
|
133
|
+
]),
|
|
134
|
+
),
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
export function getPostRequestToJSON(getPostRequest: GetPostRequest): string {
|
|
138
|
+
return JSON.stringify(GetPostRequest$outboundSchema.parse(getPostRequest));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** @internal */
|
|
142
|
+
export const GetPostPostStatus$inboundSchema: z.ZodMiniType<
|
|
143
|
+
GetPostPostStatus,
|
|
144
|
+
unknown
|
|
145
|
+
> = openEnums.inboundSchema(GetPostPostStatus);
|
|
146
|
+
|
|
147
|
+
/** @internal */
|
|
148
|
+
export const GetPostPost$inboundSchema: z.ZodMiniType<GetPostPost, unknown> = z
|
|
149
|
+
.object({
|
|
150
|
+
id: types.string(),
|
|
151
|
+
title: types.string(),
|
|
152
|
+
content: types.string(),
|
|
153
|
+
markdown: types.string(),
|
|
154
|
+
contentType: types.string(),
|
|
155
|
+
sourceMetadata: types.optional(z.any()),
|
|
156
|
+
status: GetPostPostStatus$inboundSchema,
|
|
157
|
+
createdAt: types.string(),
|
|
158
|
+
updatedAt: types.string(),
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
export function getPostPostFromJSON(
|
|
162
|
+
jsonString: string,
|
|
163
|
+
): SafeParseResult<GetPostPost, SDKValidationError> {
|
|
164
|
+
return safeParse(
|
|
165
|
+
jsonString,
|
|
166
|
+
(x) => GetPostPost$inboundSchema.parse(JSON.parse(x)),
|
|
167
|
+
`Failed to parse 'GetPostPost' from JSON`,
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
export const GetPostMetadataStatus$inboundSchema: z.ZodMiniType<
|
|
173
|
+
GetPostMetadataStatus,
|
|
174
|
+
unknown
|
|
175
|
+
> = openEnums.inboundSchema(GetPostMetadataStatus);
|
|
176
|
+
|
|
177
|
+
/** @internal */
|
|
178
|
+
export const GetPostMetadata$inboundSchema: z.ZodMiniType<
|
|
179
|
+
GetPostMetadata,
|
|
180
|
+
unknown
|
|
181
|
+
> = z.object({
|
|
182
|
+
status: z.array(GetPostMetadataStatus$inboundSchema),
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
export function getPostMetadataFromJSON(
|
|
186
|
+
jsonString: string,
|
|
187
|
+
): SafeParseResult<GetPostMetadata, SDKValidationError> {
|
|
188
|
+
return safeParse(
|
|
189
|
+
jsonString,
|
|
190
|
+
(x) => GetPostMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
191
|
+
`Failed to parse 'GetPostMetadata' from JSON`,
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** @internal */
|
|
196
|
+
export const GetPostResponse$inboundSchema: z.ZodMiniType<
|
|
197
|
+
GetPostResponse,
|
|
198
|
+
unknown
|
|
199
|
+
> = z.object({
|
|
200
|
+
post: types.nullable(z.lazy(() => GetPostPost$inboundSchema)),
|
|
201
|
+
metadata: z.lazy(() => GetPostMetadata$inboundSchema),
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
export function getPostResponseFromJSON(
|
|
205
|
+
jsonString: string,
|
|
206
|
+
): SafeParseResult<GetPostResponse, SDKValidationError> {
|
|
207
|
+
return safeParse(
|
|
208
|
+
jsonString,
|
|
209
|
+
(x) => GetPostResponse$inboundSchema.parse(JSON.parse(x)),
|
|
210
|
+
`Failed to parse 'GetPostResponse' from JSON`,
|
|
211
|
+
);
|
|
212
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
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 openEnums from "../../types/enums.js";
|
|
8
|
+
import { ClosedEnum, OpenEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Sort by creation date
|
|
16
|
+
*/
|
|
17
|
+
export const Sort = {
|
|
18
|
+
Asc: "asc",
|
|
19
|
+
Desc: "desc",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* Sort by creation date
|
|
23
|
+
*/
|
|
24
|
+
export type Sort = ClosedEnum<typeof Sort>;
|
|
25
|
+
|
|
26
|
+
export const ListPostsStatusQueryParamEnum2 = {
|
|
27
|
+
Draft: "draft",
|
|
28
|
+
Published: "published",
|
|
29
|
+
} as const;
|
|
30
|
+
export type ListPostsStatusQueryParamEnum2 = ClosedEnum<
|
|
31
|
+
typeof ListPostsStatusQueryParamEnum2
|
|
32
|
+
>;
|
|
33
|
+
|
|
34
|
+
export const ListPostsStatusQueryParamEnum1 = {
|
|
35
|
+
Draft: "draft",
|
|
36
|
+
Published: "published",
|
|
37
|
+
} as const;
|
|
38
|
+
export type ListPostsStatusQueryParamEnum1 = ClosedEnum<
|
|
39
|
+
typeof ListPostsStatusQueryParamEnum1
|
|
40
|
+
>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Filter by status. Repeat the query param to pass multiple values.
|
|
44
|
+
*/
|
|
45
|
+
export type ListPostsStatusUnion =
|
|
46
|
+
| ListPostsStatusQueryParamEnum1
|
|
47
|
+
| Array<ListPostsStatusQueryParamEnum2>;
|
|
48
|
+
|
|
49
|
+
export type ListPostsRequest = {
|
|
50
|
+
organizationId: string;
|
|
51
|
+
/**
|
|
52
|
+
* Sort by creation date
|
|
53
|
+
*/
|
|
54
|
+
sort?: Sort | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Items per page
|
|
57
|
+
*/
|
|
58
|
+
limit?: number | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Page number
|
|
61
|
+
*/
|
|
62
|
+
page?: number | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Filter by status. Repeat the query param to pass multiple values.
|
|
65
|
+
*/
|
|
66
|
+
status?:
|
|
67
|
+
| ListPostsStatusQueryParamEnum1
|
|
68
|
+
| Array<ListPostsStatusQueryParamEnum2>
|
|
69
|
+
| undefined;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const ListPostsPostStatus = {
|
|
73
|
+
Draft: "draft",
|
|
74
|
+
Published: "published",
|
|
75
|
+
} as const;
|
|
76
|
+
export type ListPostsPostStatus = OpenEnum<typeof ListPostsPostStatus>;
|
|
77
|
+
|
|
78
|
+
export type ListPostsPost = {
|
|
79
|
+
id: string;
|
|
80
|
+
title: string;
|
|
81
|
+
content: string;
|
|
82
|
+
markdown: string;
|
|
83
|
+
contentType: string;
|
|
84
|
+
sourceMetadata?: any | undefined;
|
|
85
|
+
status: ListPostsPostStatus;
|
|
86
|
+
createdAt: string;
|
|
87
|
+
updatedAt: string;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type Pagination = {
|
|
91
|
+
limit: number;
|
|
92
|
+
currentPage: number;
|
|
93
|
+
nextPage: number | null;
|
|
94
|
+
previousPage: number | null;
|
|
95
|
+
totalPages: number;
|
|
96
|
+
totalItems: number;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const ListPostsMetadataStatus = {
|
|
100
|
+
Draft: "draft",
|
|
101
|
+
Published: "published",
|
|
102
|
+
} as const;
|
|
103
|
+
export type ListPostsMetadataStatus = OpenEnum<typeof ListPostsMetadataStatus>;
|
|
104
|
+
|
|
105
|
+
export type ListPostsMetadata = {
|
|
106
|
+
status: Array<ListPostsMetadataStatus>;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Posts fetched successfully
|
|
111
|
+
*/
|
|
112
|
+
export type ListPostsResponse = {
|
|
113
|
+
posts: Array<ListPostsPost>;
|
|
114
|
+
pagination: Pagination;
|
|
115
|
+
metadata: ListPostsMetadata;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/** @internal */
|
|
119
|
+
export const Sort$outboundSchema: z.ZodMiniEnum<typeof Sort> = z.enum(Sort);
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const ListPostsStatusQueryParamEnum2$outboundSchema: z.ZodMiniEnum<
|
|
123
|
+
typeof ListPostsStatusQueryParamEnum2
|
|
124
|
+
> = z.enum(ListPostsStatusQueryParamEnum2);
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const ListPostsStatusQueryParamEnum1$outboundSchema: z.ZodMiniEnum<
|
|
128
|
+
typeof ListPostsStatusQueryParamEnum1
|
|
129
|
+
> = z.enum(ListPostsStatusQueryParamEnum1);
|
|
130
|
+
|
|
131
|
+
/** @internal */
|
|
132
|
+
export type ListPostsStatusUnion$Outbound = string | Array<string>;
|
|
133
|
+
|
|
134
|
+
/** @internal */
|
|
135
|
+
export const ListPostsStatusUnion$outboundSchema: z.ZodMiniType<
|
|
136
|
+
ListPostsStatusUnion$Outbound,
|
|
137
|
+
ListPostsStatusUnion
|
|
138
|
+
> = smartUnion([
|
|
139
|
+
ListPostsStatusQueryParamEnum1$outboundSchema,
|
|
140
|
+
z.array(ListPostsStatusQueryParamEnum2$outboundSchema),
|
|
141
|
+
]);
|
|
142
|
+
|
|
143
|
+
export function listPostsStatusUnionToJSON(
|
|
144
|
+
listPostsStatusUnion: ListPostsStatusUnion,
|
|
145
|
+
): string {
|
|
146
|
+
return JSON.stringify(
|
|
147
|
+
ListPostsStatusUnion$outboundSchema.parse(listPostsStatusUnion),
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export type ListPostsRequest$Outbound = {
|
|
153
|
+
organizationId: string;
|
|
154
|
+
sort: string;
|
|
155
|
+
limit: number;
|
|
156
|
+
page: number;
|
|
157
|
+
status?: string | Array<string> | undefined;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/** @internal */
|
|
161
|
+
export const ListPostsRequest$outboundSchema: z.ZodMiniType<
|
|
162
|
+
ListPostsRequest$Outbound,
|
|
163
|
+
ListPostsRequest
|
|
164
|
+
> = z.object({
|
|
165
|
+
organizationId: z.string(),
|
|
166
|
+
sort: z._default(Sort$outboundSchema, "desc"),
|
|
167
|
+
limit: z._default(z.int(), 10),
|
|
168
|
+
page: z._default(z.int(), 1),
|
|
169
|
+
status: z.optional(
|
|
170
|
+
smartUnion([
|
|
171
|
+
ListPostsStatusQueryParamEnum1$outboundSchema,
|
|
172
|
+
z.array(ListPostsStatusQueryParamEnum2$outboundSchema),
|
|
173
|
+
]),
|
|
174
|
+
),
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
export function listPostsRequestToJSON(
|
|
178
|
+
listPostsRequest: ListPostsRequest,
|
|
179
|
+
): string {
|
|
180
|
+
return JSON.stringify(
|
|
181
|
+
ListPostsRequest$outboundSchema.parse(listPostsRequest),
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** @internal */
|
|
186
|
+
export const ListPostsPostStatus$inboundSchema: z.ZodMiniType<
|
|
187
|
+
ListPostsPostStatus,
|
|
188
|
+
unknown
|
|
189
|
+
> = openEnums.inboundSchema(ListPostsPostStatus);
|
|
190
|
+
|
|
191
|
+
/** @internal */
|
|
192
|
+
export const ListPostsPost$inboundSchema: z.ZodMiniType<
|
|
193
|
+
ListPostsPost,
|
|
194
|
+
unknown
|
|
195
|
+
> = z.object({
|
|
196
|
+
id: types.string(),
|
|
197
|
+
title: types.string(),
|
|
198
|
+
content: types.string(),
|
|
199
|
+
markdown: types.string(),
|
|
200
|
+
contentType: types.string(),
|
|
201
|
+
sourceMetadata: types.optional(z.any()),
|
|
202
|
+
status: ListPostsPostStatus$inboundSchema,
|
|
203
|
+
createdAt: types.string(),
|
|
204
|
+
updatedAt: types.string(),
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
export function listPostsPostFromJSON(
|
|
208
|
+
jsonString: string,
|
|
209
|
+
): SafeParseResult<ListPostsPost, SDKValidationError> {
|
|
210
|
+
return safeParse(
|
|
211
|
+
jsonString,
|
|
212
|
+
(x) => ListPostsPost$inboundSchema.parse(JSON.parse(x)),
|
|
213
|
+
`Failed to parse 'ListPostsPost' from JSON`,
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** @internal */
|
|
218
|
+
export const Pagination$inboundSchema: z.ZodMiniType<Pagination, unknown> = z
|
|
219
|
+
.object({
|
|
220
|
+
limit: types.number(),
|
|
221
|
+
currentPage: types.number(),
|
|
222
|
+
nextPage: types.nullable(types.number()),
|
|
223
|
+
previousPage: types.nullable(types.number()),
|
|
224
|
+
totalPages: types.number(),
|
|
225
|
+
totalItems: types.number(),
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
export function paginationFromJSON(
|
|
229
|
+
jsonString: string,
|
|
230
|
+
): SafeParseResult<Pagination, SDKValidationError> {
|
|
231
|
+
return safeParse(
|
|
232
|
+
jsonString,
|
|
233
|
+
(x) => Pagination$inboundSchema.parse(JSON.parse(x)),
|
|
234
|
+
`Failed to parse 'Pagination' from JSON`,
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/** @internal */
|
|
239
|
+
export const ListPostsMetadataStatus$inboundSchema: z.ZodMiniType<
|
|
240
|
+
ListPostsMetadataStatus,
|
|
241
|
+
unknown
|
|
242
|
+
> = openEnums.inboundSchema(ListPostsMetadataStatus);
|
|
243
|
+
|
|
244
|
+
/** @internal */
|
|
245
|
+
export const ListPostsMetadata$inboundSchema: z.ZodMiniType<
|
|
246
|
+
ListPostsMetadata,
|
|
247
|
+
unknown
|
|
248
|
+
> = z.object({
|
|
249
|
+
status: z.array(ListPostsMetadataStatus$inboundSchema),
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
export function listPostsMetadataFromJSON(
|
|
253
|
+
jsonString: string,
|
|
254
|
+
): SafeParseResult<ListPostsMetadata, SDKValidationError> {
|
|
255
|
+
return safeParse(
|
|
256
|
+
jsonString,
|
|
257
|
+
(x) => ListPostsMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
258
|
+
`Failed to parse 'ListPostsMetadata' from JSON`,
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/** @internal */
|
|
263
|
+
export const ListPostsResponse$inboundSchema: z.ZodMiniType<
|
|
264
|
+
ListPostsResponse,
|
|
265
|
+
unknown
|
|
266
|
+
> = z.object({
|
|
267
|
+
posts: z.array(z.lazy(() => ListPostsPost$inboundSchema)),
|
|
268
|
+
pagination: z.lazy(() => Pagination$inboundSchema),
|
|
269
|
+
metadata: z.lazy(() => ListPostsMetadata$inboundSchema),
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
export function listPostsResponseFromJSON(
|
|
273
|
+
jsonString: string,
|
|
274
|
+
): SafeParseResult<ListPostsResponse, SDKValidationError> {
|
|
275
|
+
return safeParse(
|
|
276
|
+
jsonString,
|
|
277
|
+
(x) => ListPostsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
278
|
+
`Failed to parse 'ListPostsResponse' from JSON`,
|
|
279
|
+
);
|
|
280
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
|
|
8
|
+
export type Security = {
|
|
9
|
+
bearerAuth?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type Security$Outbound = {
|
|
14
|
+
BearerAuth?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const Security$outboundSchema: z.ZodMiniType<
|
|
19
|
+
Security$Outbound,
|
|
20
|
+
Security
|
|
21
|
+
> = z.pipe(
|
|
22
|
+
z.object({
|
|
23
|
+
bearerAuth: z.optional(z.string()),
|
|
24
|
+
}),
|
|
25
|
+
z.transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
bearerAuth: "BearerAuth",
|
|
28
|
+
});
|
|
29
|
+
}),
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export function securityToJSON(security: Security): string {
|
|
33
|
+
return JSON.stringify(Security$outboundSchema.parse(security));
|
|
34
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { contentGetPost } from "../funcs/content-get-post.js";
|
|
6
|
+
import { contentListPosts } from "../funcs/content-list-posts.js";
|
|
7
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
10
|
+
|
|
11
|
+
export class Content extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* List posts
|
|
14
|
+
*/
|
|
15
|
+
async listPosts(
|
|
16
|
+
request: operations.ListPostsRequest,
|
|
17
|
+
options?: RequestOptions,
|
|
18
|
+
): Promise<operations.ListPostsResponse> {
|
|
19
|
+
return unwrapAsync(contentListPosts(
|
|
20
|
+
this,
|
|
21
|
+
request,
|
|
22
|
+
options,
|
|
23
|
+
));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get a single post
|
|
28
|
+
*/
|
|
29
|
+
async getPost(
|
|
30
|
+
request: operations.GetPostRequest,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): Promise<operations.GetPostResponse> {
|
|
33
|
+
return unwrapAsync(contentGetPost(
|
|
34
|
+
this,
|
|
35
|
+
request,
|
|
36
|
+
options,
|
|
37
|
+
));
|
|
38
|
+
}
|
|
39
|
+
}
|
package/src/sdk/index.ts
ADDED
package/src/sdk/sdk.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { ClientSDK } from "../lib/sdks.js";
|
|
6
|
+
import { Content } from "./content.js";
|
|
7
|
+
|
|
8
|
+
export class Notra extends ClientSDK {
|
|
9
|
+
private _content?: Content;
|
|
10
|
+
get content(): Content {
|
|
11
|
+
return (this._content ??= new Content(this._options));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -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,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export const blobLikeSchema: z.ZodMiniType<Blob, Blob> = z.custom<Blob>(
|
|
8
|
+
isBlobLike,
|
|
9
|
+
{
|
|
10
|
+
message: "expected a Blob, File or Blob-like object",
|
|
11
|
+
abort: true,
|
|
12
|
+
},
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export function isBlobLike(val: unknown): val is Blob {
|
|
16
|
+
if (val instanceof Blob) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const name = val[Symbol.toStringTag];
|
|
25
|
+
if (typeof name !== "string") {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
if (name !== "Blob" && name !== "File") {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return "stream" in val && typeof val.stream === "function";
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export function constDateTime(
|
|
8
|
+
val: string,
|
|
9
|
+
): z.ZodMiniType<string, unknown> {
|
|
10
|
+
return z.custom<string>((v) => {
|
|
11
|
+
return (
|
|
12
|
+
typeof v === "string" && new Date(v).getTime() === new Date(val).getTime()
|
|
13
|
+
);
|
|
14
|
+
}, `Value must be equivalent to ${val}`);
|
|
15
|
+
}
|