@aurora-interactive/fankare-api-sdk 0.0.1 → 0.0.3
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 +41 -18
- 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 +14 -0
- package/esm/funcs/creator-timelines-get-creator-posts.d.ts.map +1 -0
- package/esm/funcs/creator-timelines-get-creator-posts.js +94 -0
- package/esm/funcs/creator-timelines-get-creator-posts.js.map +1 -0
- package/esm/funcs/custom-collections-add-collection-member.d.ts +14 -0
- package/esm/funcs/custom-collections-add-collection-member.d.ts.map +1 -0
- package/esm/funcs/custom-collections-add-collection-member.js +88 -0
- package/esm/funcs/custom-collections-add-collection-member.js.map +1 -0
- package/esm/funcs/custom-collections-create-collection.d.ts +15 -0
- package/esm/funcs/custom-collections-create-collection.d.ts.map +1 -0
- package/esm/funcs/custom-collections-create-collection.js +79 -0
- package/esm/funcs/custom-collections-create-collection.js.map +1 -0
- package/esm/funcs/custom-collections-get-collection-members.d.ts +14 -0
- package/esm/funcs/custom-collections-get-collection-members.d.ts.map +1 -0
- package/esm/funcs/custom-collections-get-collection-members.js +87 -0
- package/esm/funcs/custom-collections-get-collection-members.js.map +1 -0
- package/esm/funcs/custom-collections-get-collections.d.ts +14 -0
- package/esm/funcs/custom-collections-get-collections.d.ts.map +1 -0
- package/esm/funcs/custom-collections-get-collections.js +68 -0
- package/esm/funcs/custom-collections-get-collections.js.map +1 -0
- package/esm/funcs/custom-collections-remove-collection-member.d.ts +13 -0
- package/esm/funcs/custom-collections-remove-collection-member.d.ts.map +1 -0
- package/esm/funcs/custom-collections-remove-collection-member.js +91 -0
- package/esm/funcs/custom-collections-remove-collection-member.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 +14 -0
- package/esm/funcs/direct-messaging-get-conversations.d.ts.map +1 -0
- package/esm/funcs/direct-messaging-get-conversations.js +68 -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 +93 -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 +1 -4
- package/esm/funcs/posts-create-post.d.ts.map +1 -1
- package/esm/funcs/posts-create-post.js +3 -5
- package/esm/funcs/posts-create-post.js.map +1 -1
- package/esm/funcs/posts-get-collection-feed.d.ts +14 -0
- package/esm/funcs/posts-get-collection-feed.d.ts.map +1 -0
- package/esm/funcs/posts-get-collection-feed.js +94 -0
- package/esm/funcs/posts-get-collection-feed.js.map +1 -0
- package/esm/funcs/posts-get-feed.d.ts +3 -6
- package/esm/funcs/posts-get-feed.d.ts.map +1 -1
- package/esm/funcs/posts-get-feed.js +4 -5
- 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 +14 -0
- package/esm/funcs/user-discovery-get-following.d.ts.map +1 -0
- package/esm/funcs/user-discovery-get-following.js +68 -0
- package/esm/funcs/user-discovery-get-following.js.map +1 -0
- package/esm/funcs/user-discovery-get-user-profile.d.ts +14 -0
- package/esm/funcs/user-discovery-get-user-profile.d.ts.map +1 -0
- package/esm/funcs/user-discovery-get-user-profile.js +87 -0
- package/esm/funcs/user-discovery-get-user-profile.js.map +1 -0
- package/esm/funcs/user-discovery-search-users.d.ts +14 -0
- package/esm/funcs/user-discovery-search-users.d.ts.map +1 -0
- package/esm/funcs/user-discovery-search-users.js +85 -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/collection.d.ts +12 -0
- package/esm/models/collection.d.ts.map +1 -0
- package/esm/models/collection.js +18 -0
- package/esm/models/collection.js.map +1 -0
- package/esm/models/conversation.d.ts +14 -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 +7 -1
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +8 -1
- 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-collection-member.d.ts +24 -0
- package/esm/models/operations/add-collection-member.d.ts.map +1 -0
- package/esm/models/operations/add-collection-member.js +21 -0
- package/esm/models/operations/add-collection-member.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-collection.d.ts +12 -0
- package/esm/models/operations/create-collection.d.ts.map +1 -0
- package/esm/models/operations/create-collection.js +13 -0
- package/esm/models/operations/create-collection.js.map +1 -0
- 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-collection-feed.d.ts +19 -0
- package/esm/models/operations/get-collection-feed.d.ts.map +1 -0
- package/esm/models/operations/get-collection-feed.js +15 -0
- package/esm/models/operations/get-collection-feed.js.map +1 -0
- package/esm/models/operations/get-collection-members.d.ts +12 -0
- package/esm/models/operations/get-collection-members.d.ts.map +1 -0
- package/esm/models/operations/get-collection-members.js +13 -0
- package/esm/models/operations/get-collection-members.js.map +1 -0
- package/esm/models/operations/get-creator-posts.d.ts +19 -0
- package/esm/models/operations/get-creator-posts.d.ts.map +1 -0
- package/esm/models/operations/get-creator-posts.js +15 -0
- package/esm/models/operations/get-creator-posts.js.map +1 -0
- package/esm/models/operations/get-feed.d.ts +1 -14
- package/esm/models/operations/get-feed.d.ts.map +1 -1
- package/esm/models/operations/get-feed.js +1 -11
- 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 +32 -0
- package/esm/models/operations/get-message-history.d.ts.map +1 -0
- package/esm/models/operations/get-message-history.js +26 -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 +10 -5
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +11 -5
- 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-collection-member.d.ts +14 -0
- package/esm/models/operations/remove-collection-member.d.ts.map +1 -0
- package/esm/models/operations/remove-collection-member.js +14 -0
- package/esm/models/operations/remove-collection-member.js.map +1 -0
- 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/paginated-posts-response.d.ts +15 -0
- package/esm/models/paginated-posts-response.d.ts.map +1 -0
- package/esm/models/paginated-posts-response.js +17 -0
- package/esm/models/paginated-posts-response.js.map +1 -0
- 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 +9 -0
- package/esm/sdk/creator-timelines.d.ts.map +1 -0
- package/esm/sdk/creator-timelines.js +16 -0
- package/esm/sdk/creator-timelines.js.map +1 -0
- package/esm/sdk/custom-collections.d.ts +26 -0
- package/esm/sdk/custom-collections.d.ts.map +1 -0
- package/esm/sdk/custom-collections.js +44 -0
- package/esm/sdk/custom-collections.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 +18 -0
- package/esm/sdk/direct-messaging.d.ts.map +1 -0
- package/esm/sdk/direct-messaging.js +30 -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 +5 -11
- package/esm/sdk/posts.d.ts.map +1 -1
- package/esm/sdk/posts.js +7 -12
- package/esm/sdk/posts.js.map +1 -1
- package/esm/sdk/sdk.d.ts +12 -3
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +20 -4
- 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 +17 -0
- package/esm/sdk/user-discovery.d.ts.map +1 -0
- package/esm/sdk/user-discovery.js +30 -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/{posts-get-list-feed.ts → creator-timelines-get-creator-posts.ts} +21 -15
- package/src/funcs/{custom-lists-add-list-member.ts → custom-collections-add-collection-member.ts} +16 -14
- package/src/funcs/{custom-lists-create-list.ts → custom-collections-create-collection.ts} +14 -12
- package/src/funcs/{custom-lists-get-list-members.ts → custom-collections-get-collection-members.ts} +14 -12
- package/src/funcs/custom-collections-get-collections.ts +143 -0
- package/src/funcs/{custom-lists-remove-list-member.ts → custom-collections-remove-collection-member.ts} +12 -11
- package/src/funcs/direct-messaging-get-conversations.ts +143 -0
- package/src/funcs/direct-messaging-get-message-history.ts +185 -0
- package/src/funcs/direct-messaging-send-message.ts +176 -0
- package/src/funcs/posts-create-post.ts +3 -5
- package/src/funcs/posts-get-collection-feed.ts +186 -0
- package/src/funcs/posts-get-feed.ts +8 -9
- package/src/funcs/subscriptions-subscribe-to-user.ts +2 -1
- package/src/funcs/subscriptions-unsubscribe-from-user.ts +2 -1
- package/src/funcs/{custom-lists-get-lists.ts → user-discovery-get-following.ts} +10 -9
- package/src/funcs/user-discovery-get-user-profile.ts +171 -0
- package/src/funcs/user-discovery-search-users.ts +170 -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/{custom-list.ts → collection.ts} +7 -6
- package/src/models/conversation.ts +36 -0
- package/src/models/create-post-request.ts +23 -3
- 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 +8 -1
- 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-collection-member.ts +61 -0
- package/src/models/operations/create-collection.ts +31 -0
- package/src/models/operations/create-post.ts +29 -6
- package/src/models/operations/get-collection-feed.ts +40 -0
- package/src/models/operations/get-collection-members.ts +33 -0
- package/src/models/operations/get-creator-posts.ts +40 -0
- package/src/models/operations/get-feed.ts +2 -33
- package/src/models/operations/get-message-history.ts +72 -0
- package/src/models/operations/get-user-profile.ts +31 -0
- package/src/models/operations/index.ts +11 -5
- package/src/models/operations/login-user.ts +1 -0
- package/src/models/operations/remove-collection-member.ts +36 -0
- 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/paginated-posts-response.ts +38 -0
- 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 +29 -0
- package/src/sdk/custom-collections.ts +88 -0
- package/src/sdk/direct-messaging.ts +60 -0
- package/src/sdk/index.ts +1 -0
- package/src/sdk/posts.ts +13 -16
- package/src/sdk/sdk.ts +23 -4
- package/src/sdk/subscriptions.ts +1 -0
- package/src/sdk/user-discovery.ts +53 -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
- package/src/models/operations/add-list-member.ts +0 -58
- package/src/models/operations/create-list.ts +0 -30
- package/src/models/operations/get-list-feed.ts +0 -33
- package/src/models/operations/get-list-members.ts +0 -30
- package/src/models/operations/remove-list-member.ts +0 -36
- package/src/sdk/custom-lists.ts +0 -87
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ba2331639991
|
|
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 timeline filtered strictly by members of this collection with pagination
|
|
33
|
+
*/
|
|
34
|
+
export function postsGetCollectionFeed(
|
|
35
|
+
client: FankareSDKCore,
|
|
36
|
+
collectionId: number,
|
|
37
|
+
limit?: number | undefined,
|
|
38
|
+
cursor?: string | undefined,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
models.PaginatedPostsResponse,
|
|
43
|
+
| FankareSDKError
|
|
44
|
+
| ResponseValidationError
|
|
45
|
+
| ConnectionError
|
|
46
|
+
| RequestAbortedError
|
|
47
|
+
| RequestTimeoutError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| UnexpectedClientError
|
|
50
|
+
| SDKValidationError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
return new APIPromise($do(
|
|
54
|
+
client,
|
|
55
|
+
collectionId,
|
|
56
|
+
limit,
|
|
57
|
+
cursor,
|
|
58
|
+
options,
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function $do(
|
|
63
|
+
client: FankareSDKCore,
|
|
64
|
+
collectionId: number,
|
|
65
|
+
limit?: number | undefined,
|
|
66
|
+
cursor?: string | undefined,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): Promise<
|
|
69
|
+
[
|
|
70
|
+
Result<
|
|
71
|
+
models.PaginatedPostsResponse,
|
|
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.GetCollectionFeedRequest = {
|
|
85
|
+
collectionId: collectionId,
|
|
86
|
+
limit: limit,
|
|
87
|
+
cursor: cursor,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const parsed = safeParse(
|
|
91
|
+
input,
|
|
92
|
+
(value) =>
|
|
93
|
+
z.parse(operations.GetCollectionFeedRequest$outboundSchema, value),
|
|
94
|
+
"Input validation failed",
|
|
95
|
+
);
|
|
96
|
+
if (!parsed.ok) {
|
|
97
|
+
return [parsed, { status: "invalid" }];
|
|
98
|
+
}
|
|
99
|
+
const payload = parsed.value;
|
|
100
|
+
const body = null;
|
|
101
|
+
|
|
102
|
+
const pathParams = {
|
|
103
|
+
collectionId: encodeSimple("collectionId", payload.collectionId, {
|
|
104
|
+
explode: false,
|
|
105
|
+
charEncoding: "percent",
|
|
106
|
+
}),
|
|
107
|
+
};
|
|
108
|
+
const path = pathToFunc("/collections/{collectionId}/feed")(pathParams);
|
|
109
|
+
|
|
110
|
+
const query = encodeFormQuery({
|
|
111
|
+
"cursor": payload.cursor,
|
|
112
|
+
"limit": payload.limit,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
const headers = new Headers(compactMap({
|
|
116
|
+
Accept: "application/json",
|
|
117
|
+
}));
|
|
118
|
+
|
|
119
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
120
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
121
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
122
|
+
|
|
123
|
+
const context = {
|
|
124
|
+
options: client._options,
|
|
125
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
126
|
+
operationID: "getCollectionFeed",
|
|
127
|
+
oAuth2Scopes: null,
|
|
128
|
+
|
|
129
|
+
resolvedSecurity: requestSecurity,
|
|
130
|
+
|
|
131
|
+
securitySource: client._options.bearerAuth,
|
|
132
|
+
retryConfig: options?.retries
|
|
133
|
+
|| client._options.retryConfig
|
|
134
|
+
|| { strategy: "none" },
|
|
135
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const requestRes = client._createRequest(context, {
|
|
139
|
+
security: requestSecurity,
|
|
140
|
+
method: "GET",
|
|
141
|
+
baseURL: options?.serverURL,
|
|
142
|
+
path: path,
|
|
143
|
+
headers: headers,
|
|
144
|
+
query: query,
|
|
145
|
+
body: body,
|
|
146
|
+
userAgent: client._options.userAgent,
|
|
147
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
148
|
+
}, options);
|
|
149
|
+
if (!requestRes.ok) {
|
|
150
|
+
return [requestRes, { status: "invalid" }];
|
|
151
|
+
}
|
|
152
|
+
const req = requestRes.value;
|
|
153
|
+
|
|
154
|
+
const doResult = await client._do(req, {
|
|
155
|
+
context,
|
|
156
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
157
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
158
|
+
retryConfig: context.retryConfig,
|
|
159
|
+
retryCodes: context.retryCodes,
|
|
160
|
+
});
|
|
161
|
+
if (!doResult.ok) {
|
|
162
|
+
return [doResult, { status: "request-error", request: req }];
|
|
163
|
+
}
|
|
164
|
+
const response = doResult.value;
|
|
165
|
+
|
|
166
|
+
const [result] = await M.match<
|
|
167
|
+
models.PaginatedPostsResponse,
|
|
168
|
+
| FankareSDKError
|
|
169
|
+
| ResponseValidationError
|
|
170
|
+
| ConnectionError
|
|
171
|
+
| RequestAbortedError
|
|
172
|
+
| RequestTimeoutError
|
|
173
|
+
| InvalidRequestError
|
|
174
|
+
| UnexpectedClientError
|
|
175
|
+
| SDKValidationError
|
|
176
|
+
>(
|
|
177
|
+
M.json(200, models.PaginatedPostsResponse$inboundSchema),
|
|
178
|
+
M.fail("4XX"),
|
|
179
|
+
M.fail("5XX"),
|
|
180
|
+
)(response, req);
|
|
181
|
+
if (!result.ok) {
|
|
182
|
+
return [result, { status: "complete", request: req, response }];
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return [result, { status: "complete", request: req, response }];
|
|
186
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: cf21b812a544
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
import * as z from "zod/v4-mini";
|
|
@@ -22,15 +23,13 @@ import {
|
|
|
22
23
|
} from "../models/errors/http-client-errors.js";
|
|
23
24
|
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
24
25
|
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
26
|
+
import * as models from "../models/index.js";
|
|
25
27
|
import * as operations from "../models/operations/index.js";
|
|
26
28
|
import { APICall, APIPromise } from "../types/async.js";
|
|
27
29
|
import { Result } from "../types/fp.js";
|
|
28
30
|
|
|
29
31
|
/**
|
|
30
|
-
* Get the consolidated timeline feed
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Retrieves posts from users the current authenticated user is subscribed to.
|
|
32
|
+
* Get the consolidated timeline feed with pagination
|
|
34
33
|
*/
|
|
35
34
|
export function postsGetFeed(
|
|
36
35
|
client: FankareSDKCore,
|
|
@@ -39,7 +38,7 @@ export function postsGetFeed(
|
|
|
39
38
|
options?: RequestOptions,
|
|
40
39
|
): APIPromise<
|
|
41
40
|
Result<
|
|
42
|
-
|
|
41
|
+
models.PaginatedPostsResponse,
|
|
43
42
|
| FankareSDKError
|
|
44
43
|
| ResponseValidationError
|
|
45
44
|
| ConnectionError
|
|
@@ -66,7 +65,7 @@ async function $do(
|
|
|
66
65
|
): Promise<
|
|
67
66
|
[
|
|
68
67
|
Result<
|
|
69
|
-
|
|
68
|
+
models.PaginatedPostsResponse,
|
|
70
69
|
| FankareSDKError
|
|
71
70
|
| ResponseValidationError
|
|
72
71
|
| ConnectionError
|
|
@@ -155,7 +154,7 @@ async function $do(
|
|
|
155
154
|
const response = doResult.value;
|
|
156
155
|
|
|
157
156
|
const [result] = await M.match<
|
|
158
|
-
|
|
157
|
+
models.PaginatedPostsResponse,
|
|
159
158
|
| FankareSDKError
|
|
160
159
|
| ResponseValidationError
|
|
161
160
|
| ConnectionError
|
|
@@ -165,8 +164,8 @@ async function $do(
|
|
|
165
164
|
| UnexpectedClientError
|
|
166
165
|
| SDKValidationError
|
|
167
166
|
>(
|
|
168
|
-
M.json(200,
|
|
169
|
-
M.fail(
|
|
167
|
+
M.json(200, models.PaginatedPostsResponse$inboundSchema),
|
|
168
|
+
M.fail("4XX"),
|
|
170
169
|
M.fail("5XX"),
|
|
171
170
|
)(response, req);
|
|
172
171
|
if (!result.ok) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 30e3962853be
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
import * as z from "zod/v4-mini";
|
|
@@ -158,7 +159,7 @@ async function $do(
|
|
|
158
159
|
| SDKValidationError
|
|
159
160
|
>(
|
|
160
161
|
M.nil(204, z.void()),
|
|
161
|
-
M.fail([
|
|
162
|
+
M.fail([404, "4XX"]),
|
|
162
163
|
M.fail("5XX"),
|
|
163
164
|
)(response, req);
|
|
164
165
|
if (!result.ok) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 4de787b8ab40
|
|
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.nil(204, z.void()),
|
|
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: 8a42f7bea1ab
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
6
|
import * as z from "zod/v4-mini";
|
|
@@ -25,14 +26,14 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
26
|
import { Result } from "../types/fp.js";
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
|
-
* Get
|
|
29
|
+
* Get subscriptions list
|
|
29
30
|
*/
|
|
30
|
-
export function
|
|
31
|
+
export function userDiscoveryGetFollowing(
|
|
31
32
|
client: FankareSDKCore,
|
|
32
33
|
options?: RequestOptions,
|
|
33
34
|
): APIPromise<
|
|
34
35
|
Result<
|
|
35
|
-
Array<models.
|
|
36
|
+
Array<models.User>,
|
|
36
37
|
| FankareSDKError
|
|
37
38
|
| ResponseValidationError
|
|
38
39
|
| ConnectionError
|
|
@@ -55,7 +56,7 @@ async function $do(
|
|
|
55
56
|
): Promise<
|
|
56
57
|
[
|
|
57
58
|
Result<
|
|
58
|
-
Array<models.
|
|
59
|
+
Array<models.User>,
|
|
59
60
|
| FankareSDKError
|
|
60
61
|
| ResponseValidationError
|
|
61
62
|
| ConnectionError
|
|
@@ -68,7 +69,7 @@ async function $do(
|
|
|
68
69
|
APICall,
|
|
69
70
|
]
|
|
70
71
|
> {
|
|
71
|
-
const path = pathToFunc("/
|
|
72
|
+
const path = pathToFunc("/users/following")();
|
|
72
73
|
|
|
73
74
|
const headers = new Headers(compactMap({
|
|
74
75
|
Accept: "application/json",
|
|
@@ -81,7 +82,7 @@ async function $do(
|
|
|
81
82
|
const context = {
|
|
82
83
|
options: client._options,
|
|
83
84
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
84
|
-
operationID: "
|
|
85
|
+
operationID: "getFollowing",
|
|
85
86
|
oAuth2Scopes: null,
|
|
86
87
|
|
|
87
88
|
resolvedSecurity: requestSecurity,
|
|
@@ -120,7 +121,7 @@ async function $do(
|
|
|
120
121
|
const response = doResult.value;
|
|
121
122
|
|
|
122
123
|
const [result] = await M.match<
|
|
123
|
-
Array<models.
|
|
124
|
+
Array<models.User>,
|
|
124
125
|
| FankareSDKError
|
|
125
126
|
| ResponseValidationError
|
|
126
127
|
| ConnectionError
|
|
@@ -130,8 +131,8 @@ async function $do(
|
|
|
130
131
|
| UnexpectedClientError
|
|
131
132
|
| SDKValidationError
|
|
132
133
|
>(
|
|
133
|
-
M.json(200, z.array(models.
|
|
134
|
-
M.fail(
|
|
134
|
+
M.json(200, z.array(models.User$inboundSchema)),
|
|
135
|
+
M.fail("4XX"),
|
|
135
136
|
M.fail("5XX"),
|
|
136
137
|
)(response, req);
|
|
137
138
|
if (!result.ok) {
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 89261df4fc2d
|
|
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
|
+
* Retrieve user profile metadata
|
|
33
|
+
*/
|
|
34
|
+
export function userDiscoveryGetUserProfile(
|
|
35
|
+
client: FankareSDKCore,
|
|
36
|
+
userId: number,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
models.UserProfile,
|
|
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
|
+
models.UserProfile,
|
|
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.GetUserProfileRequest = {
|
|
79
|
+
userId: userId,
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const parsed = safeParse(
|
|
83
|
+
input,
|
|
84
|
+
(value) => z.parse(operations.GetUserProfileRequest$outboundSchema, value),
|
|
85
|
+
"Input validation failed",
|
|
86
|
+
);
|
|
87
|
+
if (!parsed.ok) {
|
|
88
|
+
return [parsed, { status: "invalid" }];
|
|
89
|
+
}
|
|
90
|
+
const payload = parsed.value;
|
|
91
|
+
const body = null;
|
|
92
|
+
|
|
93
|
+
const pathParams = {
|
|
94
|
+
userId: encodeSimple("userId", payload.userId, {
|
|
95
|
+
explode: false,
|
|
96
|
+
charEncoding: "percent",
|
|
97
|
+
}),
|
|
98
|
+
};
|
|
99
|
+
const path = pathToFunc("/users/profile/{userId}")(pathParams);
|
|
100
|
+
|
|
101
|
+
const headers = new Headers(compactMap({
|
|
102
|
+
Accept: "application/json",
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
106
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
107
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
108
|
+
|
|
109
|
+
const context = {
|
|
110
|
+
options: client._options,
|
|
111
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
112
|
+
operationID: "getUserProfile",
|
|
113
|
+
oAuth2Scopes: null,
|
|
114
|
+
|
|
115
|
+
resolvedSecurity: requestSecurity,
|
|
116
|
+
|
|
117
|
+
securitySource: client._options.bearerAuth,
|
|
118
|
+
retryConfig: options?.retries
|
|
119
|
+
|| client._options.retryConfig
|
|
120
|
+
|| { strategy: "none" },
|
|
121
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const requestRes = client._createRequest(context, {
|
|
125
|
+
security: requestSecurity,
|
|
126
|
+
method: "GET",
|
|
127
|
+
baseURL: options?.serverURL,
|
|
128
|
+
path: path,
|
|
129
|
+
headers: headers,
|
|
130
|
+
body: body,
|
|
131
|
+
userAgent: client._options.userAgent,
|
|
132
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
133
|
+
}, options);
|
|
134
|
+
if (!requestRes.ok) {
|
|
135
|
+
return [requestRes, { status: "invalid" }];
|
|
136
|
+
}
|
|
137
|
+
const req = requestRes.value;
|
|
138
|
+
|
|
139
|
+
const doResult = await client._do(req, {
|
|
140
|
+
context,
|
|
141
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
142
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
143
|
+
retryConfig: context.retryConfig,
|
|
144
|
+
retryCodes: context.retryCodes,
|
|
145
|
+
});
|
|
146
|
+
if (!doResult.ok) {
|
|
147
|
+
return [doResult, { status: "request-error", request: req }];
|
|
148
|
+
}
|
|
149
|
+
const response = doResult.value;
|
|
150
|
+
|
|
151
|
+
const [result] = await M.match<
|
|
152
|
+
models.UserProfile,
|
|
153
|
+
| FankareSDKError
|
|
154
|
+
| ResponseValidationError
|
|
155
|
+
| ConnectionError
|
|
156
|
+
| RequestAbortedError
|
|
157
|
+
| RequestTimeoutError
|
|
158
|
+
| InvalidRequestError
|
|
159
|
+
| UnexpectedClientError
|
|
160
|
+
| SDKValidationError
|
|
161
|
+
>(
|
|
162
|
+
M.json(200, models.UserProfile$inboundSchema),
|
|
163
|
+
M.fail([404, "4XX"]),
|
|
164
|
+
M.fail("5XX"),
|
|
165
|
+
)(response, req);
|
|
166
|
+
if (!result.ok) {
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 04e3e50c86ee
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4-mini";
|
|
7
|
+
import { FankareSDKCore } from "../core.js";
|
|
8
|
+
import { encodeFormQuery } 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
|
+
* Search global user profiles
|
|
33
|
+
*/
|
|
34
|
+
export function userDiscoverySearchUsers(
|
|
35
|
+
client: FankareSDKCore,
|
|
36
|
+
query: string,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
Array<models.User>,
|
|
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
|
+
query,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: FankareSDKCore,
|
|
60
|
+
query: string,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
Array<models.User>,
|
|
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.SearchUsersRequest = {
|
|
79
|
+
query: query,
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const parsed = safeParse(
|
|
83
|
+
input,
|
|
84
|
+
(value) => z.parse(operations.SearchUsersRequest$outboundSchema, value),
|
|
85
|
+
"Input validation failed",
|
|
86
|
+
);
|
|
87
|
+
if (!parsed.ok) {
|
|
88
|
+
return [parsed, { status: "invalid" }];
|
|
89
|
+
}
|
|
90
|
+
const payload = parsed.value;
|
|
91
|
+
const body = null;
|
|
92
|
+
|
|
93
|
+
const path = pathToFunc("/users/search")();
|
|
94
|
+
|
|
95
|
+
const query$ = encodeFormQuery({
|
|
96
|
+
"query": payload.query,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const headers = new Headers(compactMap({
|
|
100
|
+
Accept: "application/json",
|
|
101
|
+
}));
|
|
102
|
+
|
|
103
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
104
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
105
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
106
|
+
|
|
107
|
+
const context = {
|
|
108
|
+
options: client._options,
|
|
109
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
110
|
+
operationID: "searchUsers",
|
|
111
|
+
oAuth2Scopes: null,
|
|
112
|
+
|
|
113
|
+
resolvedSecurity: requestSecurity,
|
|
114
|
+
|
|
115
|
+
securitySource: client._options.bearerAuth,
|
|
116
|
+
retryConfig: options?.retries
|
|
117
|
+
|| client._options.retryConfig
|
|
118
|
+
|| { strategy: "none" },
|
|
119
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const requestRes = client._createRequest(context, {
|
|
123
|
+
security: requestSecurity,
|
|
124
|
+
method: "GET",
|
|
125
|
+
baseURL: options?.serverURL,
|
|
126
|
+
path: path,
|
|
127
|
+
headers: headers,
|
|
128
|
+
query: query$,
|
|
129
|
+
body: body,
|
|
130
|
+
userAgent: client._options.userAgent,
|
|
131
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
132
|
+
}, options);
|
|
133
|
+
if (!requestRes.ok) {
|
|
134
|
+
return [requestRes, { status: "invalid" }];
|
|
135
|
+
}
|
|
136
|
+
const req = requestRes.value;
|
|
137
|
+
|
|
138
|
+
const doResult = await client._do(req, {
|
|
139
|
+
context,
|
|
140
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
141
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
142
|
+
retryConfig: context.retryConfig,
|
|
143
|
+
retryCodes: context.retryCodes,
|
|
144
|
+
});
|
|
145
|
+
if (!doResult.ok) {
|
|
146
|
+
return [doResult, { status: "request-error", request: req }];
|
|
147
|
+
}
|
|
148
|
+
const response = doResult.value;
|
|
149
|
+
|
|
150
|
+
const [result] = await M.match<
|
|
151
|
+
Array<models.User>,
|
|
152
|
+
| FankareSDKError
|
|
153
|
+
| ResponseValidationError
|
|
154
|
+
| ConnectionError
|
|
155
|
+
| RequestAbortedError
|
|
156
|
+
| RequestTimeoutError
|
|
157
|
+
| InvalidRequestError
|
|
158
|
+
| UnexpectedClientError
|
|
159
|
+
| SDKValidationError
|
|
160
|
+
>(
|
|
161
|
+
M.json(200, z.array(models.User$inboundSchema)),
|
|
162
|
+
M.fail([401, "4XX"]),
|
|
163
|
+
M.fail("5XX"),
|
|
164
|
+
)(response, req);
|
|
165
|
+
if (!result.ok) {
|
|
166
|
+
return [result, { status: "complete", request: req, response }];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return [result, { status: "complete", request: req, response }];
|
|
170
|
+
}
|
package/src/hooks/hooks.ts
CHANGED