@aurora-interactive/fankare-api-sdk 0.0.1 → 0.0.2
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/README.md +26 -3
- package/esm/core.d.ts.map +1 -1
- package/esm/core.js +1 -0
- package/esm/core.js.map +1 -1
- package/esm/funcs/authentication-login-user.d.ts.map +1 -1
- package/esm/funcs/authentication-login-user.js +1 -0
- package/esm/funcs/authentication-login-user.js.map +1 -1
- package/esm/funcs/authentication-register-user.d.ts.map +1 -1
- package/esm/funcs/authentication-register-user.js +1 -0
- package/esm/funcs/authentication-register-user.js.map +1 -1
- package/esm/funcs/creator-timelines-get-creator-posts.d.ts +17 -0
- package/esm/funcs/creator-timelines-get-creator-posts.d.ts.map +1 -0
- package/esm/funcs/creator-timelines-get-creator-posts.js +95 -0
- package/esm/funcs/creator-timelines-get-creator-posts.js.map +1 -0
- package/esm/funcs/custom-lists-add-list-member.d.ts.map +1 -1
- package/esm/funcs/custom-lists-add-list-member.js +2 -1
- package/esm/funcs/custom-lists-add-list-member.js.map +1 -1
- package/esm/funcs/custom-lists-create-list.d.ts.map +1 -1
- package/esm/funcs/custom-lists-create-list.js +2 -1
- package/esm/funcs/custom-lists-create-list.js.map +1 -1
- package/esm/funcs/custom-lists-get-list-members.d.ts.map +1 -1
- package/esm/funcs/custom-lists-get-list-members.js +2 -1
- package/esm/funcs/custom-lists-get-list-members.js.map +1 -1
- package/esm/funcs/custom-lists-get-lists.d.ts.map +1 -1
- package/esm/funcs/custom-lists-get-lists.js +2 -1
- package/esm/funcs/custom-lists-get-lists.js.map +1 -1
- package/esm/funcs/custom-lists-remove-list-member.d.ts.map +1 -1
- package/esm/funcs/custom-lists-remove-list-member.js +1 -0
- package/esm/funcs/custom-lists-remove-list-member.js.map +1 -1
- package/esm/funcs/direct-messaging-get-conversations.d.ts +17 -0
- package/esm/funcs/direct-messaging-get-conversations.d.ts.map +1 -0
- package/esm/funcs/direct-messaging-get-conversations.js +71 -0
- package/esm/funcs/direct-messaging-get-conversations.js.map +1 -0
- package/esm/funcs/direct-messaging-get-message-history.d.ts +14 -0
- package/esm/funcs/direct-messaging-get-message-history.d.ts.map +1 -0
- package/esm/funcs/direct-messaging-get-message-history.js +87 -0
- package/esm/funcs/direct-messaging-get-message-history.js.map +1 -0
- package/esm/funcs/direct-messaging-send-message.d.ts +14 -0
- package/esm/funcs/direct-messaging-send-message.d.ts.map +1 -0
- package/esm/funcs/direct-messaging-send-message.js +89 -0
- package/esm/funcs/direct-messaging-send-message.js.map +1 -0
- package/esm/funcs/posts-create-post.d.ts +2 -2
- package/esm/funcs/posts-create-post.d.ts.map +1 -1
- package/esm/funcs/posts-create-post.js +4 -3
- package/esm/funcs/posts-create-post.js.map +1 -1
- package/esm/funcs/posts-get-feed.d.ts.map +1 -1
- package/esm/funcs/posts-get-feed.js +2 -1
- package/esm/funcs/posts-get-feed.js.map +1 -1
- package/esm/funcs/posts-get-list-feed.d.ts.map +1 -1
- package/esm/funcs/posts-get-list-feed.js +1 -0
- package/esm/funcs/posts-get-list-feed.js.map +1 -1
- package/esm/funcs/subscriptions-subscribe-to-user.d.ts.map +1 -1
- package/esm/funcs/subscriptions-subscribe-to-user.js +2 -1
- package/esm/funcs/subscriptions-subscribe-to-user.js.map +1 -1
- package/esm/funcs/subscriptions-unsubscribe-from-user.d.ts.map +1 -1
- package/esm/funcs/subscriptions-unsubscribe-from-user.js +2 -1
- package/esm/funcs/subscriptions-unsubscribe-from-user.js.map +1 -1
- package/esm/funcs/user-discovery-get-following.d.ts +17 -0
- package/esm/funcs/user-discovery-get-following.d.ts.map +1 -0
- package/esm/funcs/user-discovery-get-following.js +71 -0
- package/esm/funcs/user-discovery-get-following.js.map +1 -0
- package/esm/funcs/user-discovery-get-user-profile.d.ts +17 -0
- package/esm/funcs/user-discovery-get-user-profile.d.ts.map +1 -0
- package/esm/funcs/user-discovery-get-user-profile.js +90 -0
- package/esm/funcs/user-discovery-get-user-profile.js.map +1 -0
- package/esm/funcs/user-discovery-search-users.d.ts +17 -0
- package/esm/funcs/user-discovery-search-users.d.ts.map +1 -0
- package/esm/funcs/user-discovery-search-users.js +88 -0
- package/esm/funcs/user-discovery-search-users.js.map +1 -0
- package/esm/hooks/hooks.d.ts.map +1 -1
- package/esm/hooks/hooks.js +1 -0
- package/esm/hooks/hooks.js.map +1 -1
- package/esm/hooks/index.d.ts.map +1 -1
- package/esm/hooks/index.js +1 -0
- package/esm/hooks/index.js.map +1 -1
- package/esm/hooks/types.d.ts.map +1 -1
- package/esm/hooks/types.js +1 -0
- package/esm/hooks/types.js.map +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/lib/base64.d.ts.map +1 -1
- package/esm/lib/base64.js +1 -0
- package/esm/lib/base64.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -2
- package/esm/lib/config.js.map +1 -1
- package/esm/lib/encodings.d.ts.map +1 -1
- package/esm/lib/encodings.js +1 -0
- package/esm/lib/encodings.js.map +1 -1
- package/esm/lib/files.d.ts.map +1 -1
- package/esm/lib/files.js +1 -0
- package/esm/lib/files.js.map +1 -1
- package/esm/lib/http.d.ts.map +1 -1
- package/esm/lib/http.js +1 -0
- package/esm/lib/http.js.map +1 -1
- package/esm/lib/logger.d.ts.map +1 -1
- package/esm/lib/logger.js +1 -0
- package/esm/lib/logger.js.map +1 -1
- package/esm/lib/matchers.d.ts.map +1 -1
- package/esm/lib/matchers.js +1 -0
- package/esm/lib/matchers.js.map +1 -1
- package/esm/lib/primitives.d.ts.map +1 -1
- package/esm/lib/primitives.js +1 -0
- package/esm/lib/primitives.js.map +1 -1
- package/esm/lib/retries.d.ts.map +1 -1
- package/esm/lib/retries.js +1 -0
- package/esm/lib/retries.js.map +1 -1
- package/esm/lib/schemas.d.ts.map +1 -1
- package/esm/lib/schemas.js +1 -0
- package/esm/lib/schemas.js.map +1 -1
- package/esm/lib/sdks.d.ts.map +1 -1
- package/esm/lib/sdks.js +1 -0
- package/esm/lib/sdks.js.map +1 -1
- package/esm/lib/security.d.ts.map +1 -1
- package/esm/lib/security.js +1 -0
- package/esm/lib/security.js.map +1 -1
- package/esm/lib/url.d.ts.map +1 -1
- package/esm/lib/url.js +1 -0
- package/esm/lib/url.js.map +1 -1
- package/esm/models/conversation.d.ts +17 -0
- package/esm/models/conversation.d.ts.map +1 -0
- package/esm/models/conversation.js +19 -0
- package/esm/models/conversation.js.map +1 -0
- package/esm/models/create-post-request.d.ts +12 -2
- package/esm/models/create-post-request.d.ts.map +1 -1
- package/esm/models/create-post-request.js +10 -1
- package/esm/models/create-post-request.js.map +1 -1
- package/esm/models/custom-list.d.ts.map +1 -1
- package/esm/models/custom-list.js +1 -0
- package/esm/models/custom-list.js.map +1 -1
- package/esm/models/errors/fankare-sdk-default-error.d.ts.map +1 -1
- package/esm/models/errors/fankare-sdk-default-error.js +1 -0
- package/esm/models/errors/fankare-sdk-default-error.js.map +1 -1
- package/esm/models/errors/fankare-sdk-error.d.ts.map +1 -1
- package/esm/models/errors/fankare-sdk-error.js +1 -0
- package/esm/models/errors/fankare-sdk-error.js.map +1 -1
- package/esm/models/errors/http-client-errors.d.ts.map +1 -1
- package/esm/models/errors/http-client-errors.js +1 -0
- package/esm/models/errors/http-client-errors.js.map +1 -1
- package/esm/models/errors/index.d.ts.map +1 -1
- package/esm/models/errors/index.js +1 -0
- package/esm/models/errors/index.js.map +1 -1
- package/esm/models/errors/response-validation-error.d.ts.map +1 -1
- package/esm/models/errors/response-validation-error.js +1 -0
- package/esm/models/errors/response-validation-error.js.map +1 -1
- package/esm/models/errors/sdk-validation-error.d.ts.map +1 -1
- package/esm/models/errors/sdk-validation-error.js +1 -0
- package/esm/models/errors/sdk-validation-error.js.map +1 -1
- package/esm/models/index.d.ts +5 -0
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +6 -0
- package/esm/models/index.js.map +1 -1
- package/esm/models/login-request.d.ts.map +1 -1
- package/esm/models/login-request.js +1 -0
- package/esm/models/login-request.js.map +1 -1
- package/esm/models/media-asset.d.ts +30 -0
- package/esm/models/media-asset.d.ts.map +1 -0
- package/esm/models/media-asset.js +35 -0
- package/esm/models/media-asset.js.map +1 -0
- package/esm/models/message.d.ts +14 -0
- package/esm/models/message.d.ts.map +1 -0
- package/esm/models/message.js +19 -0
- package/esm/models/message.js.map +1 -0
- package/esm/models/operations/add-list-member.d.ts.map +1 -1
- package/esm/models/operations/add-list-member.js +1 -0
- package/esm/models/operations/add-list-member.js.map +1 -1
- package/esm/models/operations/create-list.d.ts.map +1 -1
- package/esm/models/operations/create-list.js +1 -0
- package/esm/models/operations/create-list.js.map +1 -1
- package/esm/models/operations/create-post.d.ts +12 -5
- package/esm/models/operations/create-post.d.ts.map +1 -1
- package/esm/models/operations/create-post.js +11 -1
- package/esm/models/operations/create-post.js.map +1 -1
- package/esm/models/operations/get-creator-posts.d.ts +14 -0
- package/esm/models/operations/get-creator-posts.d.ts.map +1 -0
- package/esm/models/operations/get-creator-posts.js +14 -0
- package/esm/models/operations/get-creator-posts.js.map +1 -0
- package/esm/models/operations/get-feed.d.ts +0 -3
- package/esm/models/operations/get-feed.d.ts.map +1 -1
- package/esm/models/operations/get-feed.js +1 -0
- package/esm/models/operations/get-feed.js.map +1 -1
- package/esm/models/operations/get-list-feed.d.ts.map +1 -1
- package/esm/models/operations/get-list-feed.js +1 -0
- package/esm/models/operations/get-list-feed.js.map +1 -1
- package/esm/models/operations/get-list-members.d.ts.map +1 -1
- package/esm/models/operations/get-list-members.js +1 -0
- package/esm/models/operations/get-list-members.js.map +1 -1
- package/esm/models/operations/get-message-history.d.ts +12 -0
- package/esm/models/operations/get-message-history.d.ts.map +1 -0
- package/esm/models/operations/get-message-history.js +13 -0
- package/esm/models/operations/get-message-history.js.map +1 -0
- package/esm/models/operations/get-user-profile.d.ts +12 -0
- package/esm/models/operations/get-user-profile.d.ts.map +1 -0
- package/esm/models/operations/get-user-profile.js +13 -0
- package/esm/models/operations/get-user-profile.js.map +1 -0
- package/esm/models/operations/index.d.ts +5 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +6 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/login-user.d.ts.map +1 -1
- package/esm/models/operations/login-user.js +1 -0
- package/esm/models/operations/login-user.js.map +1 -1
- package/esm/models/operations/remove-list-member.d.ts +0 -3
- package/esm/models/operations/remove-list-member.d.ts.map +1 -1
- package/esm/models/operations/remove-list-member.js +1 -0
- package/esm/models/operations/remove-list-member.js.map +1 -1
- package/esm/models/operations/search-users.d.ts +15 -0
- package/esm/models/operations/search-users.d.ts.map +1 -0
- package/esm/models/operations/search-users.js +13 -0
- package/esm/models/operations/search-users.js.map +1 -0
- package/esm/models/operations/send-message.d.ts +15 -0
- package/esm/models/operations/send-message.d.ts.map +1 -0
- package/esm/models/operations/send-message.js +15 -0
- package/esm/models/operations/send-message.js.map +1 -0
- package/esm/models/operations/subscribe-to-user.d.ts +0 -3
- package/esm/models/operations/subscribe-to-user.d.ts.map +1 -1
- package/esm/models/operations/subscribe-to-user.js +1 -0
- package/esm/models/operations/subscribe-to-user.js.map +1 -1
- package/esm/models/operations/unsubscribe-from-user.d.ts +0 -3
- package/esm/models/operations/unsubscribe-from-user.d.ts.map +1 -1
- package/esm/models/operations/unsubscribe-from-user.js +1 -0
- package/esm/models/operations/unsubscribe-from-user.js.map +1 -1
- package/esm/models/post.d.ts +2 -31
- package/esm/models/post.d.ts.map +1 -1
- package/esm/models/post.js +3 -21
- package/esm/models/post.js.map +1 -1
- package/esm/models/register-request.d.ts.map +1 -1
- package/esm/models/register-request.js +1 -0
- package/esm/models/register-request.js.map +1 -1
- package/esm/models/security.d.ts.map +1 -1
- package/esm/models/security.js +1 -0
- package/esm/models/security.js.map +1 -1
- package/esm/models/send-message-request.d.ts +12 -0
- package/esm/models/send-message-request.d.ts.map +1 -0
- package/esm/models/send-message-request.js +13 -0
- package/esm/models/send-message-request.js.map +1 -0
- package/esm/models/user-profile.d.ts +14 -0
- package/esm/models/user-profile.d.ts.map +1 -0
- package/esm/models/user-profile.js +20 -0
- package/esm/models/user-profile.js.map +1 -0
- package/esm/models/user.d.ts.map +1 -1
- package/esm/models/user.js +1 -0
- package/esm/models/user.js.map +1 -1
- package/esm/sdk/authentication.d.ts.map +1 -1
- package/esm/sdk/authentication.js +1 -0
- package/esm/sdk/authentication.js.map +1 -1
- package/esm/sdk/creator-timelines.d.ts +12 -0
- package/esm/sdk/creator-timelines.d.ts.map +1 -0
- package/esm/sdk/creator-timelines.js +19 -0
- package/esm/sdk/creator-timelines.js.map +1 -0
- package/esm/sdk/custom-lists.d.ts.map +1 -1
- package/esm/sdk/custom-lists.js +1 -0
- package/esm/sdk/custom-lists.js.map +1 -1
- package/esm/sdk/direct-messaging.d.ts +20 -0
- package/esm/sdk/direct-messaging.d.ts.map +1 -0
- package/esm/sdk/direct-messaging.js +33 -0
- package/esm/sdk/direct-messaging.js.map +1 -0
- package/esm/sdk/index.d.ts.map +1 -1
- package/esm/sdk/index.js +1 -0
- package/esm/sdk/index.js.map +1 -1
- package/esm/sdk/posts.d.ts +2 -2
- package/esm/sdk/posts.d.ts.map +1 -1
- package/esm/sdk/posts.js +3 -2
- package/esm/sdk/posts.js.map +1 -1
- package/esm/sdk/sdk.d.ts +9 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +16 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/subscriptions.d.ts.map +1 -1
- package/esm/sdk/subscriptions.js +1 -0
- package/esm/sdk/subscriptions.js.map +1 -1
- package/esm/sdk/user-discovery.d.ts +26 -0
- package/esm/sdk/user-discovery.d.ts.map +1 -0
- package/esm/sdk/user-discovery.js +39 -0
- package/esm/sdk/user-discovery.js.map +1 -0
- package/esm/types/async.d.ts.map +1 -1
- package/esm/types/async.js +1 -0
- package/esm/types/async.js.map +1 -1
- package/esm/types/blobs.d.ts.map +1 -1
- package/esm/types/blobs.js +1 -0
- package/esm/types/blobs.js.map +1 -1
- package/esm/types/const-date-time.d.ts.map +1 -1
- package/esm/types/const-date-time.js +1 -0
- package/esm/types/const-date-time.js.map +1 -1
- package/esm/types/default-to-zero-value.d.ts.map +1 -1
- package/esm/types/default-to-zero-value.js +1 -0
- package/esm/types/default-to-zero-value.js.map +1 -1
- package/esm/types/enums.d.ts.map +1 -1
- package/esm/types/enums.js +1 -0
- package/esm/types/enums.js.map +1 -1
- package/esm/types/fp.d.ts.map +1 -1
- package/esm/types/fp.js +1 -0
- package/esm/types/fp.js.map +1 -1
- package/esm/types/index.d.ts.map +1 -1
- package/esm/types/index.js +1 -0
- package/esm/types/index.js.map +1 -1
- package/esm/types/operations.d.ts.map +1 -1
- package/esm/types/operations.js +1 -0
- package/esm/types/operations.js.map +1 -1
- package/esm/types/primitives.d.ts.map +1 -1
- package/esm/types/primitives.js +1 -0
- package/esm/types/primitives.js.map +1 -1
- package/esm/types/rfcdate.d.ts.map +1 -1
- package/esm/types/rfcdate.js +1 -0
- package/esm/types/rfcdate.js.map +1 -1
- package/esm/types/smart-union.d.ts.map +1 -1
- package/esm/types/smart-union.js +1 -0
- package/esm/types/smart-union.js.map +1 -1
- package/esm/types/streams.d.ts.map +1 -1
- package/esm/types/streams.js +1 -0
- package/esm/types/streams.js.map +1 -1
- package/esm/types/unrecognized.d.ts.map +1 -1
- package/esm/types/unrecognized.js +1 -0
- package/esm/types/unrecognized.js.map +1 -1
- package/examples/authenticationRegisterUser.example.ts +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/core.ts +1 -0
- package/src/funcs/authentication-login-user.ts +1 -0
- package/src/funcs/authentication-register-user.ts +1 -0
- package/src/funcs/creator-timelines-get-creator-posts.ts +183 -0
- package/src/funcs/custom-lists-add-list-member.ts +2 -1
- package/src/funcs/custom-lists-create-list.ts +2 -1
- package/src/funcs/custom-lists-get-list-members.ts +2 -1
- package/src/funcs/custom-lists-get-lists.ts +2 -1
- package/src/funcs/custom-lists-remove-list-member.ts +1 -0
- package/src/funcs/direct-messaging-get-conversations.ts +146 -0
- package/src/funcs/direct-messaging-get-message-history.ts +172 -0
- package/src/funcs/direct-messaging-send-message.ts +176 -0
- package/src/funcs/posts-create-post.ts +4 -3
- package/src/funcs/posts-get-feed.ts +2 -1
- package/src/funcs/posts-get-list-feed.ts +1 -0
- package/src/funcs/subscriptions-subscribe-to-user.ts +2 -1
- package/src/funcs/subscriptions-unsubscribe-from-user.ts +2 -1
- package/src/funcs/user-discovery-get-following.ts +146 -0
- package/src/funcs/user-discovery-get-user-profile.ts +174 -0
- package/src/funcs/user-discovery-search-users.ts +173 -0
- package/src/hooks/hooks.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/types.ts +1 -0
- package/src/index.ts +1 -0
- package/src/lib/base64.ts +1 -0
- package/src/lib/config.ts +3 -2
- package/src/lib/encodings.ts +1 -0
- package/src/lib/files.ts +1 -0
- package/src/lib/http.ts +1 -0
- package/src/lib/logger.ts +1 -0
- package/src/lib/matchers.ts +1 -0
- package/src/lib/primitives.ts +1 -0
- package/src/lib/retries.ts +1 -0
- package/src/lib/schemas.ts +1 -0
- package/src/lib/sdks.ts +1 -0
- package/src/lib/security.ts +1 -0
- package/src/lib/url.ts +1 -0
- package/src/models/conversation.ts +39 -0
- package/src/models/create-post-request.ts +23 -3
- package/src/models/custom-list.ts +1 -0
- package/src/models/errors/fankare-sdk-default-error.ts +1 -0
- package/src/models/errors/fankare-sdk-error.ts +1 -0
- package/src/models/errors/http-client-errors.ts +1 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/response-validation-error.ts +1 -0
- package/src/models/errors/sdk-validation-error.ts +1 -0
- package/src/models/index.ts +6 -0
- package/src/models/login-request.ts +1 -0
- package/src/models/media-asset.ts +63 -0
- package/src/models/message.ts +37 -0
- package/src/models/operations/add-list-member.ts +1 -0
- package/src/models/operations/create-list.ts +1 -0
- package/src/models/operations/create-post.ts +29 -6
- package/src/models/operations/get-creator-posts.ts +34 -0
- package/src/models/operations/get-feed.ts +1 -3
- package/src/models/operations/get-list-feed.ts +1 -0
- package/src/models/operations/get-list-members.ts +1 -0
- package/src/models/operations/get-message-history.ts +31 -0
- package/src/models/operations/get-user-profile.ts +31 -0
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/login-user.ts +1 -0
- package/src/models/operations/remove-list-member.ts +1 -3
- package/src/models/operations/search-users.ts +34 -0
- package/src/models/operations/send-message.ts +35 -0
- package/src/models/operations/subscribe-to-user.ts +1 -3
- package/src/models/operations/unsubscribe-from-user.ts +1 -3
- package/src/models/post.ts +4 -43
- package/src/models/register-request.ts +1 -0
- package/src/models/security.ts +1 -0
- package/src/models/send-message-request.ts +31 -0
- package/src/models/user-profile.ts +37 -0
- package/src/models/user.ts +1 -0
- package/src/sdk/authentication.ts +1 -0
- package/src/sdk/creator-timelines.ts +30 -0
- package/src/sdk/custom-lists.ts +1 -0
- package/src/sdk/direct-messaging.ts +58 -0
- package/src/sdk/index.ts +1 -0
- package/src/sdk/posts.ts +3 -2
- package/src/sdk/sdk.ts +19 -0
- package/src/sdk/subscriptions.ts +1 -0
- package/src/sdk/user-discovery.ts +62 -0
- package/src/types/async.ts +1 -0
- package/src/types/blobs.ts +1 -0
- package/src/types/const-date-time.ts +1 -0
- package/src/types/default-to-zero-value.ts +1 -0
- package/src/types/enums.ts +1 -0
- package/src/types/fp.ts +1 -0
- package/src/types/index.ts +1 -0
- package/src/types/operations.ts +1 -0
- package/src/types/primitives.ts +1 -0
- package/src/types/rfcdate.ts +1 -0
- package/src/types/smart-union.ts +1 -0
- package/src/types/streams.ts +1 -0
- package/src/types/unrecognized.ts +1 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 69b8bb59a6b6
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4-mini";
|
|
7
|
+
import { FankareSDKCore } from "../core.js";
|
|
8
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
9
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
10
|
+
import * as M from "../lib/matchers.js";
|
|
11
|
+
import { compactMap } from "../lib/primitives.js";
|
|
12
|
+
import { safeParse } from "../lib/schemas.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
15
|
+
import { pathToFunc } from "../lib/url.js";
|
|
16
|
+
import { FankareSDKError } from "../models/errors/fankare-sdk-error.js";
|
|
17
|
+
import {
|
|
18
|
+
ConnectionError,
|
|
19
|
+
InvalidRequestError,
|
|
20
|
+
RequestAbortedError,
|
|
21
|
+
RequestTimeoutError,
|
|
22
|
+
UnexpectedClientError,
|
|
23
|
+
} from "../models/errors/http-client-errors.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
26
|
+
import * as models from "../models/index.js";
|
|
27
|
+
import * as operations from "../models/operations/index.js";
|
|
28
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
29
|
+
import { Result } from "../types/fp.js";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get a specific creator's timeline
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Retrieves individual posts uploaded strictly by the requested user account.
|
|
36
|
+
*/
|
|
37
|
+
export function creatorTimelinesGetCreatorPosts(
|
|
38
|
+
client: FankareSDKCore,
|
|
39
|
+
userId: number,
|
|
40
|
+
limit?: number | undefined,
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): APIPromise<
|
|
43
|
+
Result<
|
|
44
|
+
Array<models.Post>,
|
|
45
|
+
| FankareSDKError
|
|
46
|
+
| ResponseValidationError
|
|
47
|
+
| ConnectionError
|
|
48
|
+
| RequestAbortedError
|
|
49
|
+
| RequestTimeoutError
|
|
50
|
+
| InvalidRequestError
|
|
51
|
+
| UnexpectedClientError
|
|
52
|
+
| SDKValidationError
|
|
53
|
+
>
|
|
54
|
+
> {
|
|
55
|
+
return new APIPromise($do(
|
|
56
|
+
client,
|
|
57
|
+
userId,
|
|
58
|
+
limit,
|
|
59
|
+
options,
|
|
60
|
+
));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function $do(
|
|
64
|
+
client: FankareSDKCore,
|
|
65
|
+
userId: number,
|
|
66
|
+
limit?: number | undefined,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): Promise<
|
|
69
|
+
[
|
|
70
|
+
Result<
|
|
71
|
+
Array<models.Post>,
|
|
72
|
+
| FankareSDKError
|
|
73
|
+
| ResponseValidationError
|
|
74
|
+
| ConnectionError
|
|
75
|
+
| RequestAbortedError
|
|
76
|
+
| RequestTimeoutError
|
|
77
|
+
| InvalidRequestError
|
|
78
|
+
| UnexpectedClientError
|
|
79
|
+
| SDKValidationError
|
|
80
|
+
>,
|
|
81
|
+
APICall,
|
|
82
|
+
]
|
|
83
|
+
> {
|
|
84
|
+
const input: operations.GetCreatorPostsRequest = {
|
|
85
|
+
userId: userId,
|
|
86
|
+
limit: limit,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const parsed = safeParse(
|
|
90
|
+
input,
|
|
91
|
+
(value) => z.parse(operations.GetCreatorPostsRequest$outboundSchema, value),
|
|
92
|
+
"Input validation failed",
|
|
93
|
+
);
|
|
94
|
+
if (!parsed.ok) {
|
|
95
|
+
return [parsed, { status: "invalid" }];
|
|
96
|
+
}
|
|
97
|
+
const payload = parsed.value;
|
|
98
|
+
const body = null;
|
|
99
|
+
|
|
100
|
+
const pathParams = {
|
|
101
|
+
userId: encodeSimple("userId", payload.userId, {
|
|
102
|
+
explode: false,
|
|
103
|
+
charEncoding: "percent",
|
|
104
|
+
}),
|
|
105
|
+
};
|
|
106
|
+
const path = pathToFunc("/users/{userId}/posts")(pathParams);
|
|
107
|
+
|
|
108
|
+
const query = encodeFormQuery({
|
|
109
|
+
"limit": payload.limit,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const headers = new Headers(compactMap({
|
|
113
|
+
Accept: "application/json",
|
|
114
|
+
}));
|
|
115
|
+
|
|
116
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
117
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
118
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
119
|
+
|
|
120
|
+
const context = {
|
|
121
|
+
options: client._options,
|
|
122
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
123
|
+
operationID: "getCreatorPosts",
|
|
124
|
+
oAuth2Scopes: null,
|
|
125
|
+
|
|
126
|
+
resolvedSecurity: requestSecurity,
|
|
127
|
+
|
|
128
|
+
securitySource: client._options.bearerAuth,
|
|
129
|
+
retryConfig: options?.retries
|
|
130
|
+
|| client._options.retryConfig
|
|
131
|
+
|| { strategy: "none" },
|
|
132
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const requestRes = client._createRequest(context, {
|
|
136
|
+
security: requestSecurity,
|
|
137
|
+
method: "GET",
|
|
138
|
+
baseURL: options?.serverURL,
|
|
139
|
+
path: path,
|
|
140
|
+
headers: headers,
|
|
141
|
+
query: query,
|
|
142
|
+
body: body,
|
|
143
|
+
userAgent: client._options.userAgent,
|
|
144
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
145
|
+
}, options);
|
|
146
|
+
if (!requestRes.ok) {
|
|
147
|
+
return [requestRes, { status: "invalid" }];
|
|
148
|
+
}
|
|
149
|
+
const req = requestRes.value;
|
|
150
|
+
|
|
151
|
+
const doResult = await client._do(req, {
|
|
152
|
+
context,
|
|
153
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
154
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
155
|
+
retryConfig: context.retryConfig,
|
|
156
|
+
retryCodes: context.retryCodes,
|
|
157
|
+
});
|
|
158
|
+
if (!doResult.ok) {
|
|
159
|
+
return [doResult, { status: "request-error", request: req }];
|
|
160
|
+
}
|
|
161
|
+
const response = doResult.value;
|
|
162
|
+
|
|
163
|
+
const [result] = await M.match<
|
|
164
|
+
Array<models.Post>,
|
|
165
|
+
| FankareSDKError
|
|
166
|
+
| ResponseValidationError
|
|
167
|
+
| ConnectionError
|
|
168
|
+
| RequestAbortedError
|
|
169
|
+
| RequestTimeoutError
|
|
170
|
+
| InvalidRequestError
|
|
171
|
+
| UnexpectedClientError
|
|
172
|
+
| SDKValidationError
|
|
173
|
+
>(
|
|
174
|
+
M.json(200, z.array(models.Post$inboundSchema)),
|
|
175
|
+
M.fail("4XX"),
|
|
176
|
+
M.fail("5XX"),
|
|
177
|
+
)(response, req);
|
|
178
|
+
if (!result.ok) {
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: e529857a5527
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
import * as z from "zod/v4-mini";
|
|
@@ -163,7 +164,7 @@ async function $do(
|
|
|
163
164
|
| SDKValidationError
|
|
164
165
|
>(
|
|
165
166
|
M.nil(204, z.void()),
|
|
166
|
-
M.fail(
|
|
167
|
+
M.fail("4XX"),
|
|
167
168
|
M.fail("5XX"),
|
|
168
169
|
)(response, req);
|
|
169
170
|
if (!result.ok) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 5194d9d90891
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
import * as z from "zod/v4-mini";
|
|
@@ -150,7 +151,7 @@ async function $do(
|
|
|
150
151
|
| SDKValidationError
|
|
151
152
|
>(
|
|
152
153
|
M.json(201, models.CustomList$inboundSchema),
|
|
153
|
-
M.fail(
|
|
154
|
+
M.fail("4XX"),
|
|
154
155
|
M.fail("5XX"),
|
|
155
156
|
)(response, req);
|
|
156
157
|
if (!result.ok) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: cf3d1c8686d6
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
import * as z from "zod/v4-mini";
|
|
@@ -159,7 +160,7 @@ async function $do(
|
|
|
159
160
|
| SDKValidationError
|
|
160
161
|
>(
|
|
161
162
|
M.json(200, z.array(models.User$inboundSchema)),
|
|
162
|
-
M.fail(
|
|
163
|
+
M.fail("4XX"),
|
|
163
164
|
M.fail("5XX"),
|
|
164
165
|
)(response, req);
|
|
165
166
|
if (!result.ok) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: cd08936dfbdf
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
import * as z from "zod/v4-mini";
|
|
@@ -131,7 +132,7 @@ async function $do(
|
|
|
131
132
|
| SDKValidationError
|
|
132
133
|
>(
|
|
133
134
|
M.json(200, z.array(models.CustomList$inboundSchema)),
|
|
134
|
-
M.fail(
|
|
135
|
+
M.fail("4XX"),
|
|
135
136
|
M.fail("5XX"),
|
|
136
137
|
)(response, req);
|
|
137
138
|
if (!result.ok) {
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 2455a7dd6455
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4-mini";
|
|
7
|
+
import { FankareSDKCore } from "../core.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import { FankareSDKError } from "../models/errors/fankare-sdk-error.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/http-client-errors.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
24
|
+
import * as models from "../models/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Fetch active DM threads
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Gets recent conversation summary records containing index context of opposing communication profiles.
|
|
33
|
+
*/
|
|
34
|
+
export function directMessagingGetConversations(
|
|
35
|
+
client: FankareSDKCore,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<
|
|
38
|
+
Result<
|
|
39
|
+
Array<models.Conversation>,
|
|
40
|
+
| FankareSDKError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client,
|
|
52
|
+
options,
|
|
53
|
+
));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function $do(
|
|
57
|
+
client: FankareSDKCore,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
Array<models.Conversation>,
|
|
63
|
+
| FankareSDKError
|
|
64
|
+
| ResponseValidationError
|
|
65
|
+
| ConnectionError
|
|
66
|
+
| RequestAbortedError
|
|
67
|
+
| RequestTimeoutError
|
|
68
|
+
| InvalidRequestError
|
|
69
|
+
| UnexpectedClientError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
>,
|
|
72
|
+
APICall,
|
|
73
|
+
]
|
|
74
|
+
> {
|
|
75
|
+
const path = pathToFunc("/messages/conversations")();
|
|
76
|
+
|
|
77
|
+
const headers = new Headers(compactMap({
|
|
78
|
+
Accept: "application/json",
|
|
79
|
+
}));
|
|
80
|
+
|
|
81
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
82
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
83
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
84
|
+
|
|
85
|
+
const context = {
|
|
86
|
+
options: client._options,
|
|
87
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
88
|
+
operationID: "getConversations",
|
|
89
|
+
oAuth2Scopes: null,
|
|
90
|
+
|
|
91
|
+
resolvedSecurity: requestSecurity,
|
|
92
|
+
|
|
93
|
+
securitySource: client._options.bearerAuth,
|
|
94
|
+
retryConfig: options?.retries
|
|
95
|
+
|| client._options.retryConfig
|
|
96
|
+
|| { strategy: "none" },
|
|
97
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const requestRes = client._createRequest(context, {
|
|
101
|
+
security: requestSecurity,
|
|
102
|
+
method: "GET",
|
|
103
|
+
baseURL: options?.serverURL,
|
|
104
|
+
path: path,
|
|
105
|
+
headers: headers,
|
|
106
|
+
userAgent: client._options.userAgent,
|
|
107
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
108
|
+
}, options);
|
|
109
|
+
if (!requestRes.ok) {
|
|
110
|
+
return [requestRes, { status: "invalid" }];
|
|
111
|
+
}
|
|
112
|
+
const req = requestRes.value;
|
|
113
|
+
|
|
114
|
+
const doResult = await client._do(req, {
|
|
115
|
+
context,
|
|
116
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
117
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
118
|
+
retryConfig: context.retryConfig,
|
|
119
|
+
retryCodes: context.retryCodes,
|
|
120
|
+
});
|
|
121
|
+
if (!doResult.ok) {
|
|
122
|
+
return [doResult, { status: "request-error", request: req }];
|
|
123
|
+
}
|
|
124
|
+
const response = doResult.value;
|
|
125
|
+
|
|
126
|
+
const [result] = await M.match<
|
|
127
|
+
Array<models.Conversation>,
|
|
128
|
+
| FankareSDKError
|
|
129
|
+
| ResponseValidationError
|
|
130
|
+
| ConnectionError
|
|
131
|
+
| RequestAbortedError
|
|
132
|
+
| RequestTimeoutError
|
|
133
|
+
| InvalidRequestError
|
|
134
|
+
| UnexpectedClientError
|
|
135
|
+
| SDKValidationError
|
|
136
|
+
>(
|
|
137
|
+
M.json(200, z.array(models.Conversation$inboundSchema)),
|
|
138
|
+
M.fail("4XX"),
|
|
139
|
+
M.fail("5XX"),
|
|
140
|
+
)(response, req);
|
|
141
|
+
if (!result.ok) {
|
|
142
|
+
return [result, { status: "complete", request: req, response }];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return [result, { status: "complete", request: req, response }];
|
|
146
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: b913d374c9f8
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4-mini";
|
|
7
|
+
import { FankareSDKCore } from "../core.js";
|
|
8
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
9
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
10
|
+
import * as M from "../lib/matchers.js";
|
|
11
|
+
import { compactMap } from "../lib/primitives.js";
|
|
12
|
+
import { safeParse } from "../lib/schemas.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
15
|
+
import { pathToFunc } from "../lib/url.js";
|
|
16
|
+
import { FankareSDKError } from "../models/errors/fankare-sdk-error.js";
|
|
17
|
+
import {
|
|
18
|
+
ConnectionError,
|
|
19
|
+
InvalidRequestError,
|
|
20
|
+
RequestAbortedError,
|
|
21
|
+
RequestTimeoutError,
|
|
22
|
+
UnexpectedClientError,
|
|
23
|
+
} from "../models/errors/http-client-errors.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
26
|
+
import * as models from "../models/index.js";
|
|
27
|
+
import * as operations from "../models/operations/index.js";
|
|
28
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
29
|
+
import { Result } from "../types/fp.js";
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Load message history with a specific creator
|
|
33
|
+
*/
|
|
34
|
+
export function directMessagingGetMessageHistory(
|
|
35
|
+
client: FankareSDKCore,
|
|
36
|
+
userId: number,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
Array<models.Message>,
|
|
41
|
+
| FankareSDKError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
userId,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: FankareSDKCore,
|
|
60
|
+
userId: number,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
Array<models.Message>,
|
|
66
|
+
| FankareSDKError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const input: operations.GetMessageHistoryRequest = {
|
|
79
|
+
userId: userId,
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const parsed = safeParse(
|
|
83
|
+
input,
|
|
84
|
+
(value) =>
|
|
85
|
+
z.parse(operations.GetMessageHistoryRequest$outboundSchema, value),
|
|
86
|
+
"Input validation failed",
|
|
87
|
+
);
|
|
88
|
+
if (!parsed.ok) {
|
|
89
|
+
return [parsed, { status: "invalid" }];
|
|
90
|
+
}
|
|
91
|
+
const payload = parsed.value;
|
|
92
|
+
const body = null;
|
|
93
|
+
|
|
94
|
+
const pathParams = {
|
|
95
|
+
userId: encodeSimple("userId", payload.userId, {
|
|
96
|
+
explode: false,
|
|
97
|
+
charEncoding: "percent",
|
|
98
|
+
}),
|
|
99
|
+
};
|
|
100
|
+
const path = pathToFunc("/messages/user/{userId}")(pathParams);
|
|
101
|
+
|
|
102
|
+
const headers = new Headers(compactMap({
|
|
103
|
+
Accept: "application/json",
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
107
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
108
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
109
|
+
|
|
110
|
+
const context = {
|
|
111
|
+
options: client._options,
|
|
112
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
113
|
+
operationID: "getMessageHistory",
|
|
114
|
+
oAuth2Scopes: null,
|
|
115
|
+
|
|
116
|
+
resolvedSecurity: requestSecurity,
|
|
117
|
+
|
|
118
|
+
securitySource: client._options.bearerAuth,
|
|
119
|
+
retryConfig: options?.retries
|
|
120
|
+
|| client._options.retryConfig
|
|
121
|
+
|| { strategy: "none" },
|
|
122
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const requestRes = client._createRequest(context, {
|
|
126
|
+
security: requestSecurity,
|
|
127
|
+
method: "GET",
|
|
128
|
+
baseURL: options?.serverURL,
|
|
129
|
+
path: path,
|
|
130
|
+
headers: headers,
|
|
131
|
+
body: body,
|
|
132
|
+
userAgent: client._options.userAgent,
|
|
133
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
134
|
+
}, options);
|
|
135
|
+
if (!requestRes.ok) {
|
|
136
|
+
return [requestRes, { status: "invalid" }];
|
|
137
|
+
}
|
|
138
|
+
const req = requestRes.value;
|
|
139
|
+
|
|
140
|
+
const doResult = await client._do(req, {
|
|
141
|
+
context,
|
|
142
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
143
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
144
|
+
retryConfig: context.retryConfig,
|
|
145
|
+
retryCodes: context.retryCodes,
|
|
146
|
+
});
|
|
147
|
+
if (!doResult.ok) {
|
|
148
|
+
return [doResult, { status: "request-error", request: req }];
|
|
149
|
+
}
|
|
150
|
+
const response = doResult.value;
|
|
151
|
+
|
|
152
|
+
const [result] = await M.match<
|
|
153
|
+
Array<models.Message>,
|
|
154
|
+
| FankareSDKError
|
|
155
|
+
| ResponseValidationError
|
|
156
|
+
| ConnectionError
|
|
157
|
+
| RequestAbortedError
|
|
158
|
+
| RequestTimeoutError
|
|
159
|
+
| InvalidRequestError
|
|
160
|
+
| UnexpectedClientError
|
|
161
|
+
| SDKValidationError
|
|
162
|
+
>(
|
|
163
|
+
M.json(200, z.array(models.Message$inboundSchema)),
|
|
164
|
+
M.fail("4XX"),
|
|
165
|
+
M.fail("5XX"),
|
|
166
|
+
)(response, req);
|
|
167
|
+
if (!result.ok) {
|
|
168
|
+
return [result, { status: "complete", request: req, response }];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return [result, { status: "complete", request: req, response }];
|
|
172
|
+
}
|