@aurora-interactive/fankare-api-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 +90 -0
- package/README.md +455 -0
- package/RUNTIMES.md +48 -0
- package/esm/core.d.ts +10 -0
- package/esm/core.d.ts.map +1 -0
- package/esm/core.js +13 -0
- package/esm/core.js.map +1 -0
- package/esm/funcs/authentication-login-user.d.ts +15 -0
- package/esm/funcs/authentication-login-user.d.ts.map +1 -0
- package/esm/funcs/authentication-login-user.js +78 -0
- package/esm/funcs/authentication-login-user.js.map +1 -0
- package/esm/funcs/authentication-register-user.d.ts +14 -0
- package/esm/funcs/authentication-register-user.d.ts.map +1 -0
- package/esm/funcs/authentication-register-user.js +77 -0
- package/esm/funcs/authentication-register-user.js.map +1 -0
- package/esm/funcs/custom-lists-add-list-member.d.ts +14 -0
- package/esm/funcs/custom-lists-add-list-member.d.ts.map +1 -0
- package/esm/funcs/custom-lists-add-list-member.js +87 -0
- package/esm/funcs/custom-lists-add-list-member.js.map +1 -0
- package/esm/funcs/custom-lists-create-list.d.ts +15 -0
- package/esm/funcs/custom-lists-create-list.d.ts.map +1 -0
- package/esm/funcs/custom-lists-create-list.js +78 -0
- package/esm/funcs/custom-lists-create-list.js.map +1 -0
- package/esm/funcs/custom-lists-get-list-members.d.ts +14 -0
- package/esm/funcs/custom-lists-get-list-members.d.ts.map +1 -0
- package/esm/funcs/custom-lists-get-list-members.js +86 -0
- package/esm/funcs/custom-lists-get-list-members.js.map +1 -0
- package/esm/funcs/custom-lists-get-lists.d.ts +14 -0
- package/esm/funcs/custom-lists-get-lists.d.ts.map +1 -0
- package/esm/funcs/custom-lists-get-lists.js +67 -0
- package/esm/funcs/custom-lists-get-lists.js.map +1 -0
- package/esm/funcs/custom-lists-remove-list-member.d.ts +13 -0
- package/esm/funcs/custom-lists-remove-list-member.d.ts.map +1 -0
- package/esm/funcs/custom-lists-remove-list-member.js +90 -0
- package/esm/funcs/custom-lists-remove-list-member.js.map +1 -0
- package/esm/funcs/posts-create-post.d.ts +18 -0
- package/esm/funcs/posts-create-post.d.ts.map +1 -0
- package/esm/funcs/posts-create-post.js +81 -0
- package/esm/funcs/posts-create-post.js.map +1 -0
- package/esm/funcs/posts-get-feed.d.ts +17 -0
- package/esm/funcs/posts-get-feed.d.ts.map +1 -0
- package/esm/funcs/posts-get-feed.js +88 -0
- package/esm/funcs/posts-get-feed.js.map +1 -0
- package/esm/funcs/posts-get-list-feed.d.ts +14 -0
- package/esm/funcs/posts-get-list-feed.d.ts.map +1 -0
- package/esm/funcs/posts-get-list-feed.js +91 -0
- package/esm/funcs/posts-get-list-feed.js.map +1 -0
- package/esm/funcs/subscriptions-subscribe-to-user.d.ts +13 -0
- package/esm/funcs/subscriptions-subscribe-to-user.d.ts.map +1 -0
- package/esm/funcs/subscriptions-subscribe-to-user.js +85 -0
- package/esm/funcs/subscriptions-subscribe-to-user.js.map +1 -0
- package/esm/funcs/subscriptions-unsubscribe-from-user.d.ts +13 -0
- package/esm/funcs/subscriptions-unsubscribe-from-user.d.ts.map +1 -0
- package/esm/funcs/subscriptions-unsubscribe-from-user.js +85 -0
- package/esm/funcs/subscriptions-unsubscribe-from-user.js.map +1 -0
- package/esm/hooks/hooks.d.ts +25 -0
- package/esm/hooks/hooks.d.ts.map +1 -0
- package/esm/hooks/hooks.js +80 -0
- package/esm/hooks/hooks.js.map +1 -0
- package/esm/hooks/index.d.ts +3 -0
- package/esm/hooks/index.d.ts.map +1 -0
- package/esm/hooks/index.js +6 -0
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/types.d.ts +77 -0
- package/esm/hooks/types.d.ts.map +1 -0
- package/esm/hooks/types.js +5 -0
- package/esm/hooks/types.js.map +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +8 -0
- package/esm/index.js.map +1 -0
- package/esm/lib/base64.d.ts +10 -0
- package/esm/lib/base64.d.ts.map +1 -0
- package/esm/lib/base64.js +31 -0
- package/esm/lib/base64.js.map +1 -0
- package/esm/lib/config.d.ts +38 -0
- package/esm/lib/config.d.ts.map +1 -0
- package/esm/lib/config.js +34 -0
- package/esm/lib/config.js.map +1 -0
- package/esm/lib/encodings.d.ts +54 -0
- package/esm/lib/encodings.d.ts.map +1 -0
- package/esm/lib/encodings.js +391 -0
- package/esm/lib/encodings.js.map +1 -0
- package/esm/lib/files.d.ts +26 -0
- package/esm/lib/files.d.ts.map +1 -0
- package/esm/lib/files.js +91 -0
- package/esm/lib/files.js.map +1 -0
- package/esm/lib/http.d.ts +67 -0
- package/esm/lib/http.d.ts.map +1 -0
- package/esm/lib/http.js +209 -0
- package/esm/lib/http.js.map +1 -0
- package/esm/lib/logger.d.ts +6 -0
- package/esm/lib/logger.d.ts.map +1 -0
- package/esm/lib/logger.js +5 -0
- package/esm/lib/logger.js.map +1 -0
- package/esm/lib/matchers.d.ts +59 -0
- package/esm/lib/matchers.d.ts.map +1 -0
- package/esm/lib/matchers.js +202 -0
- package/esm/lib/matchers.js.map +1 -0
- package/esm/lib/primitives.d.ts +27 -0
- package/esm/lib/primitives.d.ts.map +1 -0
- package/esm/lib/primitives.js +120 -0
- package/esm/lib/primitives.js.map +1 -0
- package/esm/lib/retries.d.ts +38 -0
- package/esm/lib/retries.d.ts.map +1 -0
- package/esm/lib/retries.js +157 -0
- package/esm/lib/retries.js.map +1 -0
- package/esm/lib/schemas.d.ts +21 -0
- package/esm/lib/schemas.d.ts.map +1 -0
- package/esm/lib/schemas.js +57 -0
- package/esm/lib/schemas.js.map +1 -0
- package/esm/lib/sdks.d.ts +63 -0
- package/esm/lib/sdks.d.ts.map +1 -0
- package/esm/lib/sdks.js +290 -0
- package/esm/lib/sdks.js.map +1 -0
- package/esm/lib/security.d.ts +83 -0
- package/esm/lib/security.d.ts.map +1 -0
- package/esm/lib/security.js +148 -0
- package/esm/lib/security.js.map +1 -0
- package/esm/lib/url.d.ts +5 -0
- package/esm/lib/url.d.ts.map +1 -0
- package/esm/lib/url.js +24 -0
- package/esm/lib/url.js.map +1 -0
- package/esm/models/create-post-request.d.ts +22 -0
- package/esm/models/create-post-request.d.ts.map +1 -0
- package/esm/models/create-post-request.js +19 -0
- package/esm/models/create-post-request.js.map +1 -0
- package/esm/models/custom-list.d.ts +12 -0
- package/esm/models/custom-list.d.ts.map +1 -0
- package/esm/models/custom-list.js +17 -0
- package/esm/models/custom-list.js.map +1 -0
- package/esm/models/errors/fankare-sdk-default-error.d.ts +10 -0
- package/esm/models/errors/fankare-sdk-default-error.d.ts.map +1 -0
- package/esm/models/errors/fankare-sdk-default-error.js +30 -0
- package/esm/models/errors/fankare-sdk-default-error.js.map +1 -0
- package/esm/models/errors/fankare-sdk-error.d.ts +19 -0
- package/esm/models/errors/fankare-sdk-error.d.ts.map +1 -0
- package/esm/models/errors/fankare-sdk-error.js +26 -0
- package/esm/models/errors/fankare-sdk-error.js.map +1 -0
- package/esm/models/errors/http-client-errors.d.ts +44 -0
- package/esm/models/errors/http-client-errors.d.ts.map +1 -0
- package/esm/models/errors/http-client-errors.js +56 -0
- package/esm/models/errors/http-client-errors.js.map +1 -0
- package/esm/models/errors/index.d.ts +6 -0
- package/esm/models/errors/index.d.ts.map +1 -0
- package/esm/models/errors/index.js +9 -0
- package/esm/models/errors/index.js.map +1 -0
- package/esm/models/errors/response-validation-error.d.ts +26 -0
- package/esm/models/errors/response-validation-error.d.ts.map +1 -0
- package/esm/models/errors/response-validation-error.js +37 -0
- package/esm/models/errors/response-validation-error.js.map +1 -0
- package/esm/models/errors/sdk-validation-error.d.ts +21 -0
- package/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
- package/esm/models/errors/sdk-validation-error.js +52 -0
- package/esm/models/errors/sdk-validation-error.js.map +1 -0
- package/esm/models/index.d.ts +8 -0
- package/esm/models/index.d.ts.map +1 -0
- package/esm/models/index.js +11 -0
- package/esm/models/index.js.map +1 -0
- package/esm/models/login-request.d.ts +14 -0
- package/esm/models/login-request.d.ts.map +1 -0
- package/esm/models/login-request.js +13 -0
- package/esm/models/login-request.js.map +1 -0
- package/esm/models/operations/add-list-member.d.ts +24 -0
- package/esm/models/operations/add-list-member.d.ts.map +1 -0
- package/esm/models/operations/add-list-member.js +20 -0
- package/esm/models/operations/add-list-member.js.map +1 -0
- package/esm/models/operations/create-list.d.ts +12 -0
- package/esm/models/operations/create-list.d.ts.map +1 -0
- package/esm/models/operations/create-list.js +12 -0
- package/esm/models/operations/create-list.js.map +1 -0
- package/esm/models/operations/create-post.d.ts +17 -0
- package/esm/models/operations/create-post.d.ts.map +1 -0
- package/esm/models/operations/create-post.js +15 -0
- package/esm/models/operations/create-post.js.map +1 -0
- package/esm/models/operations/get-feed.d.ts +30 -0
- package/esm/models/operations/get-feed.d.ts.map +1 -0
- package/esm/models/operations/get-feed.js +24 -0
- package/esm/models/operations/get-feed.js.map +1 -0
- package/esm/models/operations/get-list-feed.d.ts +14 -0
- package/esm/models/operations/get-list-feed.d.ts.map +1 -0
- package/esm/models/operations/get-list-feed.js +13 -0
- package/esm/models/operations/get-list-feed.js.map +1 -0
- package/esm/models/operations/get-list-members.d.ts +12 -0
- package/esm/models/operations/get-list-members.d.ts.map +1 -0
- package/esm/models/operations/get-list-members.js +12 -0
- package/esm/models/operations/get-list-members.js.map +1 -0
- package/esm/models/operations/index.d.ts +11 -0
- package/esm/models/operations/index.d.ts.map +1 -0
- package/esm/models/operations/index.js +14 -0
- package/esm/models/operations/index.js.map +1 -0
- package/esm/models/operations/login-user.d.ts +18 -0
- package/esm/models/operations/login-user.d.ts.map +1 -0
- package/esm/models/operations/login-user.js +16 -0
- package/esm/models/operations/login-user.js.map +1 -0
- package/esm/models/operations/remove-list-member.d.ts +17 -0
- package/esm/models/operations/remove-list-member.d.ts.map +1 -0
- package/esm/models/operations/remove-list-member.js +13 -0
- package/esm/models/operations/remove-list-member.js.map +1 -0
- package/esm/models/operations/subscribe-to-user.d.ts +15 -0
- package/esm/models/operations/subscribe-to-user.d.ts.map +1 -0
- package/esm/models/operations/subscribe-to-user.js +12 -0
- package/esm/models/operations/subscribe-to-user.js.map +1 -0
- package/esm/models/operations/unsubscribe-from-user.d.ts +15 -0
- package/esm/models/operations/unsubscribe-from-user.d.ts.map +1 -0
- package/esm/models/operations/unsubscribe-from-user.js +12 -0
- package/esm/models/operations/unsubscribe-from-user.js.map +1 -0
- package/esm/models/post.d.ts +44 -0
- package/esm/models/post.d.ts.map +1 -0
- package/esm/models/post.js +38 -0
- package/esm/models/post.js.map +1 -0
- package/esm/models/register-request.d.ts +16 -0
- package/esm/models/register-request.d.ts.map +1 -0
- package/esm/models/register-request.js +14 -0
- package/esm/models/register-request.js.map +1 -0
- package/esm/models/security.d.ts +12 -0
- package/esm/models/security.d.ts.map +1 -0
- package/esm/models/security.js +17 -0
- package/esm/models/security.js.map +1 -0
- package/esm/models/user.d.ts +13 -0
- package/esm/models/user.d.ts.map +1 -0
- package/esm/models/user.js +17 -0
- package/esm/models/user.js.map +1 -0
- package/esm/sdk/authentication.d.ts +14 -0
- package/esm/sdk/authentication.d.ts.map +1 -0
- package/esm/sdk/authentication.js +22 -0
- package/esm/sdk/authentication.js.map +1 -0
- package/esm/sdk/custom-lists.d.ts +26 -0
- package/esm/sdk/custom-lists.d.ts.map +1 -0
- package/esm/sdk/custom-lists.js +43 -0
- package/esm/sdk/custom-lists.js.map +1 -0
- package/esm/sdk/index.d.ts +2 -0
- package/esm/sdk/index.d.ts.map +1 -0
- package/esm/sdk/index.js +5 -0
- package/esm/sdk/index.js.map +1 -0
- package/esm/sdk/posts.d.ts +24 -0
- package/esm/sdk/posts.d.ts.map +1 -0
- package/esm/sdk/posts.js +35 -0
- package/esm/sdk/posts.js.map +1 -0
- package/esm/sdk/sdk.d.ts +16 -0
- package/esm/sdk/sdk.d.ts.map +1 -0
- package/esm/sdk/sdk.js +27 -0
- package/esm/sdk/sdk.js.map +1 -0
- package/esm/sdk/subscriptions.d.ts +12 -0
- package/esm/sdk/subscriptions.d.ts.map +1 -0
- package/esm/sdk/subscriptions.js +22 -0
- package/esm/sdk/subscriptions.js.map +1 -0
- package/esm/types/async.d.ts +23 -0
- package/esm/types/async.d.ts.map +1 -0
- package/esm/types/async.js +28 -0
- package/esm/types/async.js.map +1 -0
- package/esm/types/blobs.d.ts +4 -0
- package/esm/types/blobs.d.ts.map +1 -0
- package/esm/types/blobs.js +25 -0
- package/esm/types/blobs.js.map +1 -0
- package/esm/types/const-date-time.d.ts +3 -0
- package/esm/types/const-date-time.d.ts.map +1 -0
- package/esm/types/const-date-time.js +10 -0
- package/esm/types/const-date-time.js.map +1 -0
- package/esm/types/default-to-zero-value.d.ts +12 -0
- package/esm/types/default-to-zero-value.d.ts.map +1 -0
- package/esm/types/default-to-zero-value.js +31 -0
- package/esm/types/default-to-zero-value.js.map +1 -0
- package/esm/types/enums.d.ts +9 -0
- package/esm/types/enums.d.ts.map +1 -0
- package/esm/types/enums.js +27 -0
- package/esm/types/enums.js.map +1 -0
- package/esm/types/fp.d.ts +31 -0
- package/esm/types/fp.d.ts.map +1 -0
- package/esm/types/fp.js +31 -0
- package/esm/types/fp.js.map +1 -0
- package/esm/types/index.d.ts +10 -0
- package/esm/types/index.d.ts.map +1 -0
- package/esm/types/index.js +10 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/operations.d.ts +27 -0
- package/esm/types/operations.d.ts.map +1 -0
- package/esm/types/operations.js +77 -0
- package/esm/types/operations.js.map +1 -0
- package/esm/types/primitives.d.ts +9 -0
- package/esm/types/primitives.d.ts.map +1 -0
- package/esm/types/primitives.js +109 -0
- package/esm/types/primitives.js.map +1 -0
- package/esm/types/rfcdate.d.ts +21 -0
- package/esm/types/rfcdate.d.ts.map +1 -0
- package/esm/types/rfcdate.js +43 -0
- package/esm/types/rfcdate.js.map +1 -0
- package/esm/types/smart-union.d.ts +7 -0
- package/esm/types/smart-union.d.ts.map +1 -0
- package/esm/types/smart-union.js +117 -0
- package/esm/types/smart-union.js.map +1 -0
- package/esm/types/streams.d.ts +2 -0
- package/esm/types/streams.d.ts.map +1 -0
- package/esm/types/streams.js +15 -0
- package/esm/types/streams.js.map +1 -0
- package/esm/types/unrecognized.d.ts +16 -0
- package/esm/types/unrecognized.d.ts.map +1 -0
- package/esm/types/unrecognized.js +31 -0
- package/esm/types/unrecognized.js.map +1 -0
- package/examples/authenticationRegisterUser.example.ts +29 -0
- package/examples/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/examples/node_modules/@types/node/assert.d.ts +1062 -0
- package/examples/node_modules/@types/node/async_hooks.d.ts +605 -0
- package/examples/node_modules/@types/node/buffer.buffer.d.ts +471 -0
- package/examples/node_modules/@types/node/buffer.d.ts +1936 -0
- package/examples/node_modules/@types/node/child_process.d.ts +1475 -0
- package/examples/node_modules/@types/node/cluster.d.ts +577 -0
- package/examples/node_modules/@types/node/compatibility/disposable.d.ts +16 -0
- package/examples/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/examples/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/examples/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/examples/node_modules/@types/node/console.d.ts +452 -0
- package/examples/node_modules/@types/node/constants.d.ts +21 -0
- package/examples/node_modules/@types/node/crypto.d.ts +4590 -0
- package/examples/node_modules/@types/node/dgram.d.ts +597 -0
- package/examples/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
- package/examples/node_modules/@types/node/dns/promises.d.ts +479 -0
- package/examples/node_modules/@types/node/dns.d.ts +871 -0
- package/examples/node_modules/@types/node/domain.d.ts +170 -0
- package/examples/node_modules/@types/node/events.d.ts +977 -0
- package/examples/node_modules/@types/node/fs/promises.d.ts +1270 -0
- package/examples/node_modules/@types/node/fs.d.ts +4375 -0
- package/examples/node_modules/@types/node/globals.d.ts +172 -0
- package/examples/node_modules/@types/node/globals.typedarray.d.ts +38 -0
- package/examples/node_modules/@types/node/http.d.ts +2049 -0
- package/examples/node_modules/@types/node/http2.d.ts +2712 -0
- package/examples/node_modules/@types/node/https.d.ts +578 -0
- package/examples/node_modules/@types/node/index.d.ts +93 -0
- package/examples/node_modules/@types/node/inspector.generated.d.ts +3966 -0
- package/examples/node_modules/@types/node/module.d.ts +539 -0
- package/examples/node_modules/@types/node/net.d.ts +1031 -0
- package/examples/node_modules/@types/node/os.d.ts +506 -0
- package/examples/node_modules/@types/node/path.d.ts +200 -0
- package/examples/node_modules/@types/node/perf_hooks.d.ts +961 -0
- package/examples/node_modules/@types/node/process.d.ts +1961 -0
- package/examples/node_modules/@types/node/punycode.d.ts +117 -0
- package/examples/node_modules/@types/node/querystring.d.ts +152 -0
- package/examples/node_modules/@types/node/readline/promises.d.ts +162 -0
- package/examples/node_modules/@types/node/readline.d.ts +589 -0
- package/examples/node_modules/@types/node/repl.d.ts +430 -0
- package/examples/node_modules/@types/node/sea.d.ts +153 -0
- package/examples/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/examples/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/examples/node_modules/@types/node/stream/web.d.ts +533 -0
- package/examples/node_modules/@types/node/stream.d.ts +1698 -0
- package/examples/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/examples/node_modules/@types/node/test.d.ts +1787 -0
- package/examples/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/examples/node_modules/@types/node/timers.d.ts +286 -0
- package/examples/node_modules/@types/node/tls.d.ts +1259 -0
- package/examples/node_modules/@types/node/trace_events.d.ts +197 -0
- package/examples/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/examples/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
- package/examples/node_modules/@types/node/ts5.6/index.d.ts +93 -0
- package/examples/node_modules/@types/node/tty.d.ts +208 -0
- package/examples/node_modules/@types/node/url.d.ts +964 -0
- package/examples/node_modules/@types/node/util.d.ts +2331 -0
- package/examples/node_modules/@types/node/v8.d.ts +809 -0
- package/examples/node_modules/@types/node/vm.d.ts +1001 -0
- package/examples/node_modules/@types/node/wasi.d.ts +181 -0
- package/examples/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/examples/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/examples/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/examples/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
- package/examples/node_modules/@types/node/worker_threads.d.ts +715 -0
- package/examples/node_modules/@types/node/zlib.d.ts +598 -0
- package/examples/node_modules/dotenv/config.d.ts +1 -0
- package/examples/node_modules/dotenv/config.js +9 -0
- package/examples/node_modules/dotenv/lib/cli-options.js +17 -0
- package/examples/node_modules/dotenv/lib/env-options.js +28 -0
- package/examples/node_modules/dotenv/lib/main.d.ts +162 -0
- package/examples/node_modules/dotenv/lib/main.js +386 -0
- package/examples/node_modules/esbuild/install.js +300 -0
- package/examples/node_modules/esbuild/lib/main.d.ts +716 -0
- package/examples/node_modules/esbuild/lib/main.js +2532 -0
- package/examples/node_modules/fsevents/fsevents.d.ts +46 -0
- package/examples/node_modules/fsevents/fsevents.js +83 -0
- package/examples/node_modules/tsx/dist/cjs/api/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/cjs/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/cli.mjs +55 -0
- package/examples/node_modules/tsx/dist/client-D_mPDF5S.mjs +1 -0
- package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/esm/index.mjs +1 -0
- package/examples/node_modules/tsx/dist/get-pipe-path-_tAJyU_v.mjs +1 -0
- package/examples/node_modules/tsx/dist/index-XurvG3JN.mjs +14 -0
- package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +1 -0
- package/examples/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +3 -0
- package/examples/node_modules/tsx/dist/loader.mjs +1 -0
- package/examples/node_modules/tsx/dist/node-features-B9BBLzwu.mjs +1 -0
- package/examples/node_modules/tsx/dist/package-Bj47PlGH.mjs +1 -0
- package/examples/node_modules/tsx/dist/patch-repl.mjs +1 -0
- package/examples/node_modules/tsx/dist/preflight.mjs +1 -0
- package/examples/node_modules/tsx/dist/register-BnTWPeIB.mjs +10 -0
- package/examples/node_modules/tsx/dist/register-CqMfTiWi.mjs +2 -0
- package/examples/node_modules/tsx/dist/repl.mjs +3 -0
- package/examples/node_modules/tsx/dist/require-DzmC1hVr.mjs +1 -0
- package/examples/node_modules/tsx/dist/suppress-warnings.mjs +1 -0
- package/examples/node_modules/tsx/dist/temporary-directory-BDDVQOvU.mjs +1 -0
- package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +5 -0
- package/examples/node_modules/undici-types/agent.d.ts +31 -0
- package/examples/node_modules/undici-types/api.d.ts +43 -0
- package/examples/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/examples/node_modules/undici-types/cache.d.ts +36 -0
- package/examples/node_modules/undici-types/client.d.ts +108 -0
- package/examples/node_modules/undici-types/connector.d.ts +34 -0
- package/examples/node_modules/undici-types/content-type.d.ts +21 -0
- package/examples/node_modules/undici-types/cookies.d.ts +28 -0
- package/examples/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/examples/node_modules/undici-types/dispatcher.d.ts +256 -0
- package/examples/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/examples/node_modules/undici-types/errors.d.ts +149 -0
- package/examples/node_modules/undici-types/eventsource.d.ts +61 -0
- package/examples/node_modules/undici-types/fetch.d.ts +209 -0
- package/examples/node_modules/undici-types/file.d.ts +39 -0
- package/examples/node_modules/undici-types/filereader.d.ts +54 -0
- package/examples/node_modules/undici-types/formdata.d.ts +108 -0
- package/examples/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/examples/node_modules/undici-types/global-origin.d.ts +7 -0
- package/examples/node_modules/undici-types/handlers.d.ts +15 -0
- package/examples/node_modules/undici-types/header.d.ts +4 -0
- package/examples/node_modules/undici-types/index.d.ts +71 -0
- package/examples/node_modules/undici-types/interceptors.d.ts +17 -0
- package/examples/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/examples/node_modules/undici-types/mock-client.d.ts +25 -0
- package/examples/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/examples/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/examples/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/examples/node_modules/undici-types/patch.d.ts +33 -0
- package/examples/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/examples/node_modules/undici-types/pool.d.ts +39 -0
- package/examples/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/examples/node_modules/undici-types/readable.d.ts +65 -0
- package/examples/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/examples/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/examples/node_modules/undici-types/util.d.ts +18 -0
- package/examples/node_modules/undici-types/webidl.d.ts +228 -0
- package/examples/node_modules/undici-types/websocket.d.ts +150 -0
- package/jsr.json +27 -0
- package/package.json +62 -0
- package/src/core.ts +13 -0
- package/src/funcs/authentication-login-user.ts +161 -0
- package/src/funcs/authentication-register-user.ts +160 -0
- package/src/funcs/custom-lists-add-list-member.ts +174 -0
- package/src/funcs/custom-lists-create-list.ts +161 -0
- package/src/funcs/custom-lists-get-list-members.ts +170 -0
- package/src/funcs/custom-lists-get-lists.ts +142 -0
- package/src/funcs/custom-lists-remove-list-member.ts +179 -0
- package/src/funcs/posts-create-post.ts +164 -0
- package/src/funcs/posts-get-feed.ts +177 -0
- package/src/funcs/posts-get-list-feed.ts +179 -0
- package/src/funcs/subscriptions-subscribe-to-user.ts +169 -0
- package/src/funcs/subscriptions-unsubscribe-from-user.ts +170 -0
- package/src/hooks/hooks.ts +129 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/types.ts +108 -0
- package/src/index.ts +9 -0
- package/src/lib/base64.ts +39 -0
- package/src/lib/config.ts +67 -0
- package/src/lib/encodings.ts +529 -0
- package/src/lib/files.ts +104 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +353 -0
- package/src/lib/primitives.ts +166 -0
- package/src/lib/retries.ts +226 -0
- package/src/lib/schemas.ts +94 -0
- package/src/lib/sdks.ts +438 -0
- package/src/lib/security.ts +274 -0
- package/src/lib/url.ts +35 -0
- package/src/models/create-post-request.ts +47 -0
- package/src/models/custom-list.ts +33 -0
- package/src/models/errors/fankare-sdk-default-error.ts +40 -0
- package/src/models/errors/fankare-sdk-error.ts +35 -0
- package/src/models/errors/http-client-errors.ts +62 -0
- package/src/models/errors/index.ts +9 -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 +11 -0
- package/src/models/login-request.ts +29 -0
- package/src/models/operations/add-list-member.ts +58 -0
- package/src/models/operations/create-list.ts +30 -0
- package/src/models/operations/create-post.ts +39 -0
- package/src/models/operations/get-feed.ts +64 -0
- package/src/models/operations/get-list-feed.ts +33 -0
- package/src/models/operations/get-list-members.ts +30 -0
- package/src/models/operations/index.ts +14 -0
- package/src/models/operations/login-user.ts +40 -0
- package/src/models/operations/remove-list-member.ts +36 -0
- package/src/models/operations/subscribe-to-user.ts +33 -0
- package/src/models/operations/unsubscribe-from-user.ts +33 -0
- package/src/models/post.ts +77 -0
- package/src/models/register-request.ts +34 -0
- package/src/models/security.ts +34 -0
- package/src/models/user.ts +34 -0
- package/src/sdk/authentication.ts +40 -0
- package/src/sdk/custom-lists.ts +87 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/posts.ts +65 -0
- package/src/sdk/sdk.ts +31 -0
- package/src/sdk/subscriptions.ts +38 -0
- package/src/types/async.ts +69 -0
- package/src/types/blobs.ts +33 -0
- package/src/types/const-date-time.ts +15 -0
- package/src/types/default-to-zero-value.ts +33 -0
- package/src/types/enums.ts +45 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +13 -0
- package/src/types/operations.ts +105 -0
- package/src/types/primitives.ts +140 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/smart-union.ts +153 -0
- package/src/types/streams.ts +21 -0
- package/src/types/unrecognized.ts +35 -0
package/src/lib/url.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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
|
|
17
|
+
.replace(paramRE, function (_, placeholder) {
|
|
18
|
+
if (!hasOwn.call(params, placeholder)) {
|
|
19
|
+
throw new Error(`Parameter '${placeholder}' is required`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const value = params[placeholder];
|
|
23
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
24
|
+
throw new Error(
|
|
25
|
+
`Parameter '${placeholder}' must be a string or number`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return options?.charEncoding === "percent"
|
|
30
|
+
? encodeURIComponent(`${value}`)
|
|
31
|
+
: `${value}`;
|
|
32
|
+
})
|
|
33
|
+
.replace(/^\/+/, "");
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -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 { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const CreatePostRequestMediaType = {
|
|
9
|
+
Image: "IMAGE",
|
|
10
|
+
Video: "VIDEO",
|
|
11
|
+
} as const;
|
|
12
|
+
export type CreatePostRequestMediaType = ClosedEnum<
|
|
13
|
+
typeof CreatePostRequestMediaType
|
|
14
|
+
>;
|
|
15
|
+
|
|
16
|
+
export type CreatePostRequest = {
|
|
17
|
+
caption: string;
|
|
18
|
+
mediaType: CreatePostRequestMediaType;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const CreatePostRequestMediaType$outboundSchema: z.ZodMiniEnum<
|
|
23
|
+
typeof CreatePostRequestMediaType
|
|
24
|
+
> = z.enum(CreatePostRequestMediaType);
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type CreatePostRequest$Outbound = {
|
|
28
|
+
caption: string;
|
|
29
|
+
mediaType: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const CreatePostRequest$outboundSchema: z.ZodMiniType<
|
|
34
|
+
CreatePostRequest$Outbound,
|
|
35
|
+
CreatePostRequest
|
|
36
|
+
> = z.object({
|
|
37
|
+
caption: z.string(),
|
|
38
|
+
mediaType: CreatePostRequestMediaType$outboundSchema,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export function createPostRequestToJSON(
|
|
42
|
+
createPostRequest: CreatePostRequest,
|
|
43
|
+
): string {
|
|
44
|
+
return JSON.stringify(
|
|
45
|
+
CreatePostRequest$outboundSchema.parse(createPostRequest),
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -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
|
+
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
|
+
export type CustomList = {
|
|
12
|
+
id?: number | undefined;
|
|
13
|
+
ownerId?: number | undefined;
|
|
14
|
+
listName?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const CustomList$inboundSchema: z.ZodMiniType<CustomList, unknown> = z
|
|
19
|
+
.object({
|
|
20
|
+
id: types.optional(types.number()),
|
|
21
|
+
ownerId: types.optional(types.number()),
|
|
22
|
+
listName: types.optional(types.string()),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export function customListFromJSON(
|
|
26
|
+
jsonString: string,
|
|
27
|
+
): SafeParseResult<CustomList, SDKValidationError> {
|
|
28
|
+
return safeParse(
|
|
29
|
+
jsonString,
|
|
30
|
+
(x) => CustomList$inboundSchema.parse(JSON.parse(x)),
|
|
31
|
+
`Failed to parse 'CustomList' from JSON`,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { FankareSDKError } from "./fankare-sdk-error.js";
|
|
6
|
+
|
|
7
|
+
/** The fallback error class if no more specific error class is matched */
|
|
8
|
+
export class FankareSDKDefaultError extends FankareSDKError {
|
|
9
|
+
constructor(
|
|
10
|
+
message: string,
|
|
11
|
+
httpMeta: {
|
|
12
|
+
response: Response;
|
|
13
|
+
request: Request;
|
|
14
|
+
body: string;
|
|
15
|
+
},
|
|
16
|
+
) {
|
|
17
|
+
if (message) {
|
|
18
|
+
message += `: `;
|
|
19
|
+
}
|
|
20
|
+
message += `Status ${httpMeta.response.status}`;
|
|
21
|
+
const contentType = httpMeta.response.headers.get("content-type") || `""`;
|
|
22
|
+
if (contentType !== "application/json") {
|
|
23
|
+
message += ` Content-Type ${
|
|
24
|
+
contentType.includes(" ") ? `"${contentType}"` : contentType
|
|
25
|
+
}`;
|
|
26
|
+
}
|
|
27
|
+
const body = httpMeta.body || `""`;
|
|
28
|
+
message += body.length > 100 ? "\n" : ". ";
|
|
29
|
+
let bodyDisplay = body;
|
|
30
|
+
if (body.length > 10000) {
|
|
31
|
+
const truncated = body.substring(0, 10000);
|
|
32
|
+
const remaining = body.length - 10000;
|
|
33
|
+
bodyDisplay = `${truncated}...and ${remaining} more chars`;
|
|
34
|
+
}
|
|
35
|
+
message += `Body: ${bodyDisplay}`;
|
|
36
|
+
message = message.trim();
|
|
37
|
+
super(message, httpMeta);
|
|
38
|
+
this.name = "FankareSDKDefaultError";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/** The base class for all HTTP error responses */
|
|
6
|
+
export class FankareSDKError extends Error {
|
|
7
|
+
/** HTTP status code */
|
|
8
|
+
public readonly statusCode: number;
|
|
9
|
+
/** HTTP body */
|
|
10
|
+
public readonly body: string;
|
|
11
|
+
/** HTTP headers */
|
|
12
|
+
public readonly headers: Headers;
|
|
13
|
+
/** HTTP content type */
|
|
14
|
+
public readonly contentType: string;
|
|
15
|
+
/** Raw response */
|
|
16
|
+
public readonly rawResponse: Response;
|
|
17
|
+
|
|
18
|
+
constructor(
|
|
19
|
+
message: string,
|
|
20
|
+
httpMeta: {
|
|
21
|
+
response: Response;
|
|
22
|
+
request: Request;
|
|
23
|
+
body: string;
|
|
24
|
+
},
|
|
25
|
+
) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.statusCode = httpMeta.response.status;
|
|
28
|
+
this.body = httpMeta.body;
|
|
29
|
+
this.headers = httpMeta.response.headers;
|
|
30
|
+
this.contentType = httpMeta.response.headers.get("content-type") || "";
|
|
31
|
+
this.rawResponse = httpMeta.response;
|
|
32
|
+
|
|
33
|
+
this.name = "FankareSDKError";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Base class for all HTTP errors.
|
|
7
|
+
*/
|
|
8
|
+
export class HTTPClientError extends Error {
|
|
9
|
+
/** The underlying cause of the error. */
|
|
10
|
+
override readonly cause: unknown;
|
|
11
|
+
override name = "HTTPClientError";
|
|
12
|
+
constructor(message: string, opts?: { cause?: unknown }) {
|
|
13
|
+
let msg = message;
|
|
14
|
+
if (opts?.cause) {
|
|
15
|
+
msg += `: ${opts.cause}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
super(msg, opts);
|
|
19
|
+
// In older runtimes, the cause field would not have been assigned through
|
|
20
|
+
// the super() call.
|
|
21
|
+
if (typeof this.cause === "undefined") {
|
|
22
|
+
this.cause = opts?.cause;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* An error to capture unrecognised or unexpected errors when making HTTP calls.
|
|
29
|
+
*/
|
|
30
|
+
export class UnexpectedClientError extends HTTPClientError {
|
|
31
|
+
override name = "UnexpectedClientError";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* An error that is raised when any inputs used to create a request are invalid.
|
|
36
|
+
*/
|
|
37
|
+
export class InvalidRequestError extends HTTPClientError {
|
|
38
|
+
override name = "InvalidRequestError";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* An error that is raised when a HTTP request was aborted by the client error.
|
|
43
|
+
*/
|
|
44
|
+
export class RequestAbortedError extends HTTPClientError {
|
|
45
|
+
override readonly name = "RequestAbortedError";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* An error that is raised when a HTTP request timed out due to an AbortSignal
|
|
50
|
+
* signal timeout.
|
|
51
|
+
*/
|
|
52
|
+
export class RequestTimeoutError extends HTTPClientError {
|
|
53
|
+
override readonly name = "RequestTimeoutError";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* An error that is raised when a HTTP client is unable to make a request to
|
|
58
|
+
* a server.
|
|
59
|
+
*/
|
|
60
|
+
export class ConnectionError extends HTTPClientError {
|
|
61
|
+
override readonly name = "ConnectionError";
|
|
62
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from "./fankare-sdk-default-error.js";
|
|
6
|
+
export * from "./fankare-sdk-error.js";
|
|
7
|
+
export * from "./http-client-errors.js";
|
|
8
|
+
export * from "./response-validation-error.js";
|
|
9
|
+
export * from "./sdk-validation-error.js";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4/core";
|
|
6
|
+
import { FankareSDKError } from "./fankare-sdk-error.js";
|
|
7
|
+
import { formatZodError } from "./sdk-validation-error.js";
|
|
8
|
+
|
|
9
|
+
export class ResponseValidationError extends FankareSDKError {
|
|
10
|
+
/**
|
|
11
|
+
* The raw value that failed validation.
|
|
12
|
+
*/
|
|
13
|
+
public readonly rawValue: unknown;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The raw message that failed validation.
|
|
17
|
+
*/
|
|
18
|
+
public readonly rawMessage: unknown;
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
message: string,
|
|
22
|
+
extra: {
|
|
23
|
+
response: Response;
|
|
24
|
+
request: Request;
|
|
25
|
+
body: string;
|
|
26
|
+
cause: unknown;
|
|
27
|
+
rawValue: unknown;
|
|
28
|
+
rawMessage: unknown;
|
|
29
|
+
},
|
|
30
|
+
) {
|
|
31
|
+
super(message, extra);
|
|
32
|
+
this.name = "ResponseValidationError";
|
|
33
|
+
this.cause = extra.cause;
|
|
34
|
+
this.rawValue = extra.rawValue;
|
|
35
|
+
this.rawMessage = extra.rawMessage;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Return a pretty-formatted error message if the underlying validation error
|
|
40
|
+
* is a ZodError or some other recognized error type, otherwise return the
|
|
41
|
+
* default error message.
|
|
42
|
+
*/
|
|
43
|
+
public pretty(): string {
|
|
44
|
+
if (this.cause instanceof z.$ZodError) {
|
|
45
|
+
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
|
|
46
|
+
} else {
|
|
47
|
+
return this.toString();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4/core";
|
|
6
|
+
|
|
7
|
+
export class SDKValidationError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* The raw value that failed validation.
|
|
10
|
+
*/
|
|
11
|
+
public readonly rawValue: unknown;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The raw message that failed validation.
|
|
15
|
+
*/
|
|
16
|
+
public readonly rawMessage: unknown;
|
|
17
|
+
|
|
18
|
+
// Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError`
|
|
19
|
+
static override [Symbol.hasInstance](
|
|
20
|
+
instance: unknown,
|
|
21
|
+
): instance is SDKValidationError {
|
|
22
|
+
if (!(instance instanceof Error)) return false;
|
|
23
|
+
if (!("rawValue" in instance)) return false;
|
|
24
|
+
if (!("rawMessage" in instance)) return false;
|
|
25
|
+
if (!("pretty" in instance)) return false;
|
|
26
|
+
if (typeof instance.pretty !== "function") return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
constructor(message: string, cause: unknown, rawValue: unknown) {
|
|
31
|
+
super(`${message}: ${cause}`);
|
|
32
|
+
this.name = "SDKValidationError";
|
|
33
|
+
this.cause = cause;
|
|
34
|
+
this.rawValue = rawValue;
|
|
35
|
+
this.rawMessage = message;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Return a pretty-formatted error message if the underlying validation error
|
|
40
|
+
* is a ZodError or some other recognized error type, otherwise return the
|
|
41
|
+
* default error message.
|
|
42
|
+
*/
|
|
43
|
+
public pretty(): string {
|
|
44
|
+
if (this.cause instanceof z.$ZodError) {
|
|
45
|
+
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
|
|
46
|
+
} else {
|
|
47
|
+
return this.toString();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function formatZodError(err: z.$ZodError): string {
|
|
53
|
+
return z.prettifyError(err);
|
|
54
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from "./create-post-request.js";
|
|
6
|
+
export * from "./custom-list.js";
|
|
7
|
+
export * from "./login-request.js";
|
|
8
|
+
export * from "./post.js";
|
|
9
|
+
export * from "./register-request.js";
|
|
10
|
+
export * from "./security.js";
|
|
11
|
+
export * from "./user.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
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 type LoginRequest = {
|
|
8
|
+
username: string;
|
|
9
|
+
password: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type LoginRequest$Outbound = {
|
|
14
|
+
username: string;
|
|
15
|
+
password: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const LoginRequest$outboundSchema: z.ZodMiniType<
|
|
20
|
+
LoginRequest$Outbound,
|
|
21
|
+
LoginRequest
|
|
22
|
+
> = z.object({
|
|
23
|
+
username: z.string(),
|
|
24
|
+
password: z.string(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function loginRequestToJSON(loginRequest: LoginRequest): string {
|
|
28
|
+
return JSON.stringify(LoginRequest$outboundSchema.parse(loginRequest));
|
|
29
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 type AddListMemberRequestBody = {
|
|
8
|
+
userId: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type AddListMemberRequest = {
|
|
12
|
+
listId: number;
|
|
13
|
+
body: AddListMemberRequestBody;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export type AddListMemberRequestBody$Outbound = {
|
|
18
|
+
userId: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const AddListMemberRequestBody$outboundSchema: z.ZodMiniType<
|
|
23
|
+
AddListMemberRequestBody$Outbound,
|
|
24
|
+
AddListMemberRequestBody
|
|
25
|
+
> = z.object({
|
|
26
|
+
userId: z.int(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function addListMemberRequestBodyToJSON(
|
|
30
|
+
addListMemberRequestBody: AddListMemberRequestBody,
|
|
31
|
+
): string {
|
|
32
|
+
return JSON.stringify(
|
|
33
|
+
AddListMemberRequestBody$outboundSchema.parse(addListMemberRequestBody),
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type AddListMemberRequest$Outbound = {
|
|
39
|
+
listId: number;
|
|
40
|
+
body: AddListMemberRequestBody$Outbound;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const AddListMemberRequest$outboundSchema: z.ZodMiniType<
|
|
45
|
+
AddListMemberRequest$Outbound,
|
|
46
|
+
AddListMemberRequest
|
|
47
|
+
> = z.object({
|
|
48
|
+
listId: z.int(),
|
|
49
|
+
body: z.lazy(() => AddListMemberRequestBody$outboundSchema),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export function addListMemberRequestToJSON(
|
|
53
|
+
addListMemberRequest: AddListMemberRequest,
|
|
54
|
+
): string {
|
|
55
|
+
return JSON.stringify(
|
|
56
|
+
AddListMemberRequest$outboundSchema.parse(addListMemberRequest),
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 type CreateListRequest = {
|
|
8
|
+
listName: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type CreateListRequest$Outbound = {
|
|
13
|
+
listName: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const CreateListRequest$outboundSchema: z.ZodMiniType<
|
|
18
|
+
CreateListRequest$Outbound,
|
|
19
|
+
CreateListRequest
|
|
20
|
+
> = z.object({
|
|
21
|
+
listName: z.string(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function createListRequestToJSON(
|
|
25
|
+
createListRequest: CreateListRequest,
|
|
26
|
+
): string {
|
|
27
|
+
return JSON.stringify(
|
|
28
|
+
CreateListRequest$outboundSchema.parse(createListRequest),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
* Post metadata accepted. Upload target provided.
|
|
13
|
+
*/
|
|
14
|
+
export type CreatePostResponse = {
|
|
15
|
+
postId?: number | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Direct SeaweedFS S3/Filer presigned upload URL endpoint
|
|
18
|
+
*/
|
|
19
|
+
uploadUrl?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const CreatePostResponse$inboundSchema: z.ZodMiniType<
|
|
24
|
+
CreatePostResponse,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
postId: types.optional(types.number()),
|
|
28
|
+
uploadUrl: types.optional(types.string()),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function createPostResponseFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<CreatePostResponse, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) => CreatePostResponse$inboundSchema.parse(JSON.parse(x)),
|
|
37
|
+
`Failed to parse 'CreatePostResponse' from JSON`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
import * as models from "../index.js";
|
|
11
|
+
|
|
12
|
+
export type GetFeedRequest = {
|
|
13
|
+
limit?: number | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Opaque cursor for pagination (typically a timestamp or offset)
|
|
16
|
+
*/
|
|
17
|
+
cursor?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A list of feed posts
|
|
22
|
+
*/
|
|
23
|
+
export type GetFeedResponse = {
|
|
24
|
+
items?: Array<models.Post> | undefined;
|
|
25
|
+
nextCursor?: string | null | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type GetFeedRequest$Outbound = {
|
|
30
|
+
limit: number;
|
|
31
|
+
cursor?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const GetFeedRequest$outboundSchema: z.ZodMiniType<
|
|
36
|
+
GetFeedRequest$Outbound,
|
|
37
|
+
GetFeedRequest
|
|
38
|
+
> = z.object({
|
|
39
|
+
limit: z._default(z.int(), 20),
|
|
40
|
+
cursor: z.optional(z.string()),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export function getFeedRequestToJSON(getFeedRequest: GetFeedRequest): string {
|
|
44
|
+
return JSON.stringify(GetFeedRequest$outboundSchema.parse(getFeedRequest));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const GetFeedResponse$inboundSchema: z.ZodMiniType<
|
|
49
|
+
GetFeedResponse,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.object({
|
|
52
|
+
items: types.optional(z.array(models.Post$inboundSchema)),
|
|
53
|
+
nextCursor: z.optional(z.nullable(types.string())),
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export function getFeedResponseFromJSON(
|
|
57
|
+
jsonString: string,
|
|
58
|
+
): SafeParseResult<GetFeedResponse, SDKValidationError> {
|
|
59
|
+
return safeParse(
|
|
60
|
+
jsonString,
|
|
61
|
+
(x) => GetFeedResponse$inboundSchema.parse(JSON.parse(x)),
|
|
62
|
+
`Failed to parse 'GetFeedResponse' from JSON`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -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 type GetListFeedRequest = {
|
|
8
|
+
listId: number;
|
|
9
|
+
limit?: number | undefined;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type GetListFeedRequest$Outbound = {
|
|
14
|
+
listId: number;
|
|
15
|
+
limit: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const GetListFeedRequest$outboundSchema: z.ZodMiniType<
|
|
20
|
+
GetListFeedRequest$Outbound,
|
|
21
|
+
GetListFeedRequest
|
|
22
|
+
> = z.object({
|
|
23
|
+
listId: z.int(),
|
|
24
|
+
limit: z._default(z.int(), 20),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function getListFeedRequestToJSON(
|
|
28
|
+
getListFeedRequest: GetListFeedRequest,
|
|
29
|
+
): string {
|
|
30
|
+
return JSON.stringify(
|
|
31
|
+
GetListFeedRequest$outboundSchema.parse(getListFeedRequest),
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 type GetListMembersRequest = {
|
|
8
|
+
listId: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type GetListMembersRequest$Outbound = {
|
|
13
|
+
listId: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const GetListMembersRequest$outboundSchema: z.ZodMiniType<
|
|
18
|
+
GetListMembersRequest$Outbound,
|
|
19
|
+
GetListMembersRequest
|
|
20
|
+
> = z.object({
|
|
21
|
+
listId: z.int(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function getListMembersRequestToJSON(
|
|
25
|
+
getListMembersRequest: GetListMembersRequest,
|
|
26
|
+
): string {
|
|
27
|
+
return JSON.stringify(
|
|
28
|
+
GetListMembersRequest$outboundSchema.parse(getListMembersRequest),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from "./add-list-member.js";
|
|
6
|
+
export * from "./create-list.js";
|
|
7
|
+
export * from "./create-post.js";
|
|
8
|
+
export * from "./get-feed.js";
|
|
9
|
+
export * from "./get-list-feed.js";
|
|
10
|
+
export * from "./get-list-members.js";
|
|
11
|
+
export * from "./login-user.js";
|
|
12
|
+
export * from "./remove-list-member.js";
|
|
13
|
+
export * from "./subscribe-to-user.js";
|
|
14
|
+
export * from "./unsubscribe-from-user.js";
|