@aurora-interactive/fankare-api-sdk 0.0.5 → 0.1.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 +0 -1
- package/README.md +64 -8
- package/esm/funcs/creators-discovery-get-featured-creators.d.ts +14 -0
- package/esm/funcs/creators-discovery-get-featured-creators.d.ts.map +1 -0
- package/esm/funcs/creators-discovery-get-featured-creators.js +85 -0
- package/esm/funcs/creators-discovery-get-featured-creators.js.map +1 -0
- package/esm/funcs/creators-discovery-get-trending-creators.d.ts +14 -0
- package/esm/funcs/creators-discovery-get-trending-creators.d.ts.map +1 -0
- package/esm/funcs/creators-discovery-get-trending-creators.js +85 -0
- package/esm/funcs/creators-discovery-get-trending-creators.js.map +1 -0
- package/esm/funcs/internal-asset-processing-callback.d.ts +17 -0
- package/esm/funcs/internal-asset-processing-callback.d.ts.map +1 -0
- package/esm/funcs/internal-asset-processing-callback.js +96 -0
- package/esm/funcs/internal-asset-processing-callback.js.map +1 -0
- package/esm/funcs/me-confirm-avatar-upload.d.ts +14 -0
- package/esm/funcs/me-confirm-avatar-upload.d.ts.map +1 -0
- package/esm/funcs/me-confirm-avatar-upload.js +78 -0
- package/esm/funcs/me-confirm-avatar-upload.js.map +1 -0
- package/esm/funcs/me-confirm-banner-upload.d.ts +14 -0
- package/esm/funcs/me-confirm-banner-upload.d.ts.map +1 -0
- package/esm/funcs/me-confirm-banner-upload.js +78 -0
- package/esm/funcs/me-confirm-banner-upload.js.map +1 -0
- package/esm/funcs/me-get-me.d.ts +14 -0
- package/esm/funcs/me-get-me.d.ts.map +1 -0
- package/esm/funcs/me-get-me.js +67 -0
- package/esm/funcs/me-get-me.js.map +1 -0
- package/esm/funcs/me-request-avatar-upload-url.d.ts +14 -0
- package/esm/funcs/me-request-avatar-upload-url.d.ts.map +1 -0
- package/esm/funcs/me-request-avatar-upload-url.js +78 -0
- package/esm/funcs/me-request-avatar-upload-url.js.map +1 -0
- package/esm/funcs/me-request-banner-upload-url.d.ts +14 -0
- package/esm/funcs/me-request-banner-upload-url.d.ts.map +1 -0
- package/esm/funcs/me-request-banner-upload-url.js +78 -0
- package/esm/funcs/me-request-banner-upload-url.js.map +1 -0
- package/esm/funcs/me-update-me.d.ts +14 -0
- package/esm/funcs/me-update-me.d.ts.map +1 -0
- package/esm/funcs/me-update-me.js +78 -0
- package/esm/funcs/me-update-me.js.map +1 -0
- package/esm/funcs/notifications-get-notifications.d.ts +14 -0
- package/esm/funcs/notifications-get-notifications.d.ts.map +1 -0
- package/esm/funcs/notifications-get-notifications.js +87 -0
- package/esm/funcs/notifications-get-notifications.js.map +1 -0
- package/esm/funcs/notifications-get-unread-notification-count.d.ts +14 -0
- package/esm/funcs/notifications-get-unread-notification-count.d.ts.map +1 -0
- package/esm/funcs/notifications-get-unread-notification-count.js +67 -0
- package/esm/funcs/notifications-get-unread-notification-count.js.map +1 -0
- package/esm/funcs/notifications-mark-notifications-as-read.d.ts +14 -0
- package/esm/funcs/notifications-mark-notifications-as-read.d.ts.map +1 -0
- package/esm/funcs/notifications-mark-notifications-as-read.js +78 -0
- package/esm/funcs/notifications-mark-notifications-as-read.js.map +1 -0
- package/esm/funcs/posts-create-comment.d.ts +14 -0
- package/esm/funcs/posts-create-comment.d.ts.map +1 -0
- package/esm/funcs/posts-create-comment.js +89 -0
- package/esm/funcs/posts-create-comment.js.map +1 -0
- package/esm/funcs/posts-create-post.d.ts +5 -3
- package/esm/funcs/posts-create-post.d.ts.map +1 -1
- package/esm/funcs/posts-create-post.js +5 -3
- package/esm/funcs/posts-create-post.js.map +1 -1
- package/esm/funcs/posts-delete-comment.d.ts +13 -0
- package/esm/funcs/posts-delete-comment.d.ts.map +1 -0
- package/esm/funcs/posts-delete-comment.js +91 -0
- package/esm/funcs/posts-delete-comment.js.map +1 -0
- package/esm/funcs/posts-delete-post.d.ts +13 -0
- package/esm/funcs/posts-delete-post.d.ts.map +1 -0
- package/esm/funcs/posts-delete-post.js +86 -0
- package/esm/funcs/posts-delete-post.js.map +1 -0
- package/esm/funcs/posts-get-post-comments.d.ts +14 -0
- package/esm/funcs/posts-get-post-comments.d.ts.map +1 -0
- package/esm/funcs/posts-get-post-comments.js +94 -0
- package/esm/funcs/posts-get-post-comments.js.map +1 -0
- package/esm/funcs/posts-get-post-likes.d.ts +14 -0
- package/esm/funcs/posts-get-post-likes.d.ts.map +1 -0
- package/esm/funcs/posts-get-post-likes.js +94 -0
- package/esm/funcs/posts-get-post-likes.js.map +1 -0
- package/esm/funcs/posts-get-post.d.ts +14 -0
- package/esm/funcs/posts-get-post.d.ts.map +1 -0
- package/esm/funcs/posts-get-post.js +87 -0
- package/esm/funcs/posts-get-post.js.map +1 -0
- package/esm/funcs/posts-like-post.d.ts +13 -0
- package/esm/funcs/posts-like-post.d.ts.map +1 -0
- package/esm/funcs/posts-like-post.js +86 -0
- package/esm/funcs/posts-like-post.js.map +1 -0
- package/esm/funcs/posts-unlike-post.d.ts +13 -0
- package/esm/funcs/posts-unlike-post.d.ts.map +1 -0
- package/esm/funcs/posts-unlike-post.js +86 -0
- package/esm/funcs/posts-unlike-post.js.map +1 -0
- package/esm/funcs/posts-update-post.d.ts +17 -0
- package/esm/funcs/posts-update-post.d.ts.map +1 -0
- package/esm/funcs/posts-update-post.js +92 -0
- package/esm/funcs/posts-update-post.js.map +1 -0
- package/esm/funcs/user-discovery-get-follower-count.d.ts +14 -0
- package/esm/funcs/user-discovery-get-follower-count.d.ts.map +1 -0
- package/esm/funcs/user-discovery-get-follower-count.js +67 -0
- package/esm/funcs/user-discovery-get-follower-count.js.map +1 -0
- package/esm/funcs/user-discovery-get-followers.d.ts +14 -0
- package/esm/funcs/user-discovery-get-followers.d.ts.map +1 -0
- package/esm/funcs/user-discovery-get-followers.js +87 -0
- package/esm/funcs/user-discovery-get-followers.js.map +1 -0
- package/esm/funcs/user-discovery-get-user-follower-count.d.ts +14 -0
- package/esm/funcs/user-discovery-get-user-follower-count.d.ts.map +1 -0
- package/esm/funcs/user-discovery-get-user-follower-count.js +87 -0
- package/esm/funcs/user-discovery-get-user-follower-count.js.map +1 -0
- package/esm/funcs/user-discovery-get-user-followers.d.ts +14 -0
- package/esm/funcs/user-discovery-get-user-followers.d.ts.map +1 -0
- package/esm/funcs/user-discovery-get-user-followers.js +94 -0
- package/esm/funcs/user-discovery-get-user-followers.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/asset-declaration.d.ts +52 -0
- package/esm/models/asset-declaration.d.ts.map +1 -0
- package/esm/models/asset-declaration.js +37 -0
- package/esm/models/asset-declaration.js.map +1 -0
- package/esm/models/asset-processing-callback-request.d.ts +39 -0
- package/esm/models/asset-processing-callback-request.d.ts.map +1 -0
- package/esm/models/asset-processing-callback-request.js +24 -0
- package/esm/models/asset-processing-callback-request.js.map +1 -0
- package/esm/models/comment.d.ts +15 -0
- package/esm/models/comment.d.ts.map +1 -0
- package/esm/models/comment.js +20 -0
- package/esm/models/comment.js.map +1 -0
- package/esm/models/create-comment-request.d.ts +15 -0
- package/esm/models/create-comment-request.d.ts.map +1 -0
- package/esm/models/create-comment-request.js +13 -0
- package/esm/models/create-comment-request.js.map +1 -0
- package/esm/models/create-post-request.d.ts +11 -22
- package/esm/models/create-post-request.d.ts.map +1 -1
- package/esm/models/create-post-request.js +3 -16
- package/esm/models/create-post-request.js.map +1 -1
- package/esm/models/create-post-response.d.ts +18 -0
- package/esm/models/create-post-response.d.ts.map +1 -0
- package/esm/models/create-post-response.js +17 -0
- package/esm/models/create-post-response.js.map +1 -0
- package/esm/models/follower-count-response.d.ts +10 -0
- package/esm/models/follower-count-response.d.ts.map +1 -0
- package/esm/models/follower-count-response.js +15 -0
- package/esm/models/follower-count-response.js.map +1 -0
- package/esm/models/index.d.ts +19 -0
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +19 -0
- package/esm/models/index.js.map +1 -1
- package/esm/models/mark-notifications-read-request.d.ts +20 -0
- package/esm/models/mark-notifications-read-request.d.ts.map +1 -0
- package/esm/models/mark-notifications-read-request.js +14 -0
- package/esm/models/mark-notifications-read-request.js.map +1 -0
- package/esm/models/media-asset.d.ts +11 -5
- package/esm/models/media-asset.d.ts.map +1 -1
- package/esm/models/media-asset.js +4 -5
- package/esm/models/media-asset.js.map +1 -1
- package/esm/models/notification.d.ts +30 -0
- package/esm/models/notification.d.ts.map +1 -0
- package/esm/models/notification.js +31 -0
- package/esm/models/notification.js.map +1 -0
- package/esm/models/operations/asset-processing-callback.d.ts +17 -0
- package/esm/models/operations/asset-processing-callback.d.ts.map +1 -0
- package/esm/models/operations/asset-processing-callback.js +16 -0
- package/esm/models/operations/asset-processing-callback.js.map +1 -0
- package/esm/models/operations/create-comment.d.ts +15 -0
- package/esm/models/operations/create-comment.d.ts.map +1 -0
- package/esm/models/operations/create-comment.js +15 -0
- package/esm/models/operations/create-comment.js.map +1 -0
- package/esm/models/operations/delete-comment.d.ts +14 -0
- package/esm/models/operations/delete-comment.d.ts.map +1 -0
- package/esm/models/operations/delete-comment.js +14 -0
- package/esm/models/operations/delete-comment.js.map +1 -0
- package/esm/models/operations/delete-post.d.ts +12 -0
- package/esm/models/operations/delete-post.d.ts.map +1 -0
- package/esm/models/operations/delete-post.js +13 -0
- package/esm/models/operations/delete-post.js.map +1 -0
- package/esm/models/operations/get-featured-creators.d.ts +12 -0
- package/esm/models/operations/get-featured-creators.d.ts.map +1 -0
- package/esm/models/operations/get-featured-creators.js +13 -0
- package/esm/models/operations/get-featured-creators.js.map +1 -0
- package/esm/models/operations/get-followers.d.ts +17 -0
- package/esm/models/operations/get-followers.d.ts.map +1 -0
- package/esm/models/operations/get-followers.js +14 -0
- package/esm/models/operations/get-followers.js.map +1 -0
- package/esm/models/operations/get-notifications.d.ts +17 -0
- package/esm/models/operations/get-notifications.d.ts.map +1 -0
- package/esm/models/operations/get-notifications.js +14 -0
- package/esm/models/operations/get-notifications.js.map +1 -0
- package/esm/models/operations/get-post-comments.d.ts +19 -0
- package/esm/models/operations/get-post-comments.d.ts.map +1 -0
- package/esm/models/operations/get-post-comments.js +15 -0
- package/esm/models/operations/get-post-comments.js.map +1 -0
- package/esm/models/operations/get-post-likes.d.ts +19 -0
- package/esm/models/operations/get-post-likes.d.ts.map +1 -0
- package/esm/models/operations/get-post-likes.js +15 -0
- package/esm/models/operations/get-post-likes.js.map +1 -0
- package/esm/models/operations/get-post.d.ts +12 -0
- package/esm/models/operations/get-post.d.ts.map +1 -0
- package/esm/models/operations/get-post.js +13 -0
- package/esm/models/operations/get-post.js.map +1 -0
- package/esm/models/operations/get-trending-creators.d.ts +12 -0
- package/esm/models/operations/get-trending-creators.d.ts.map +1 -0
- package/esm/models/operations/get-trending-creators.js +13 -0
- package/esm/models/operations/get-trending-creators.js.map +1 -0
- package/esm/models/operations/get-user-follower-count.d.ts +12 -0
- package/esm/models/operations/get-user-follower-count.d.ts.map +1 -0
- package/esm/models/operations/get-user-follower-count.js +13 -0
- package/esm/models/operations/get-user-follower-count.js.map +1 -0
- package/esm/models/operations/get-user-followers.d.ts +19 -0
- package/esm/models/operations/get-user-followers.d.ts.map +1 -0
- package/esm/models/operations/get-user-followers.js +15 -0
- package/esm/models/operations/get-user-followers.js.map +1 -0
- package/esm/models/operations/index.d.ts +16 -1
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +16 -1
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/like-post.d.ts +12 -0
- package/esm/models/operations/like-post.d.ts.map +1 -0
- package/esm/models/operations/like-post.js +13 -0
- package/esm/models/operations/like-post.js.map +1 -0
- package/esm/models/operations/unlike-post.d.ts +12 -0
- package/esm/models/operations/unlike-post.d.ts.map +1 -0
- package/esm/models/operations/unlike-post.js +13 -0
- package/esm/models/operations/unlike-post.js.map +1 -0
- package/esm/models/operations/update-post.d.ts +15 -0
- package/esm/models/operations/update-post.d.ts.map +1 -0
- package/esm/models/operations/update-post.js +15 -0
- package/esm/models/operations/update-post.js.map +1 -0
- package/esm/models/paginated-comments-response.d.ts +15 -0
- package/esm/models/paginated-comments-response.d.ts.map +1 -0
- package/esm/models/paginated-comments-response.js +17 -0
- package/esm/models/paginated-comments-response.js.map +1 -0
- package/esm/models/paginated-followers-response.d.ts +15 -0
- package/esm/models/paginated-followers-response.d.ts.map +1 -0
- package/esm/models/paginated-followers-response.js +17 -0
- package/esm/models/paginated-followers-response.js.map +1 -0
- package/esm/models/paginated-likes-response.d.ts +15 -0
- package/esm/models/paginated-likes-response.d.ts.map +1 -0
- package/esm/models/paginated-likes-response.js +17 -0
- package/esm/models/paginated-likes-response.js.map +1 -0
- package/esm/models/paginated-notifications-response.d.ts +15 -0
- package/esm/models/paginated-notifications-response.d.ts.map +1 -0
- package/esm/models/paginated-notifications-response.js +17 -0
- package/esm/models/paginated-notifications-response.js.map +1 -0
- package/esm/models/post.d.ts +20 -1
- package/esm/models/post.d.ts.map +1 -1
- package/esm/models/post.js +13 -1
- package/esm/models/post.js.map +1 -1
- package/esm/models/profile-media-confirm-request.d.ts +15 -0
- package/esm/models/profile-media-confirm-request.d.ts.map +1 -0
- package/esm/models/profile-media-confirm-request.js +13 -0
- package/esm/models/profile-media-confirm-request.js.map +1 -0
- package/esm/models/profile-media-upload-request.d.ts +30 -0
- package/esm/models/profile-media-upload-request.d.ts.map +1 -0
- package/esm/models/profile-media-upload-request.js +23 -0
- package/esm/models/profile-media-upload-request.js.map +1 -0
- package/esm/models/profile-media-upload-response.d.ts +21 -0
- package/esm/models/profile-media-upload-response.d.ts.map +1 -0
- package/esm/models/profile-media-upload-response.js +17 -0
- package/esm/models/profile-media-upload-response.js.map +1 -0
- package/esm/models/register-request.d.ts +2 -2
- package/esm/models/register-request.d.ts.map +1 -1
- package/esm/models/register-request.js +1 -1
- package/esm/models/register-request.js.map +1 -1
- package/esm/models/unread-count-response.d.ts +10 -0
- package/esm/models/unread-count-response.d.ts.map +1 -0
- package/esm/models/unread-count-response.js +15 -0
- package/esm/models/unread-count-response.js.map +1 -0
- package/esm/models/update-post-request.d.ts +30 -0
- package/esm/models/update-post-request.d.ts.map +1 -0
- package/esm/models/update-post-request.js +22 -0
- package/esm/models/update-post-request.js.map +1 -0
- package/esm/models/update-profile-request.d.ts +17 -0
- package/esm/models/update-profile-request.d.ts.map +1 -0
- package/esm/models/update-profile-request.js +14 -0
- package/esm/models/update-profile-request.js.map +1 -0
- package/esm/models/upload-slot.d.ts +29 -0
- package/esm/models/upload-slot.d.ts.map +1 -0
- package/esm/models/upload-slot.js +20 -0
- package/esm/models/upload-slot.js.map +1 -0
- package/esm/models/user.d.ts +4 -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/creators-discovery.d.ts +13 -0
- package/esm/sdk/creators-discovery.d.ts.map +1 -0
- package/esm/sdk/creators-discovery.js +23 -0
- package/esm/sdk/creators-discovery.js.map +1 -0
- package/esm/sdk/internal.d.ts +12 -0
- package/esm/sdk/internal.d.ts.map +1 -0
- package/esm/sdk/internal.js +19 -0
- package/esm/sdk/internal.js.map +1 -0
- package/esm/sdk/me.d.ts +29 -0
- package/esm/sdk/me.d.ts.map +1 -0
- package/esm/sdk/me.js +51 -0
- package/esm/sdk/me.js.map +1 -0
- package/esm/sdk/notifications.d.ts +17 -0
- package/esm/sdk/notifications.d.ts.map +1 -0
- package/esm/sdk/notifications.js +30 -0
- package/esm/sdk/notifications.js.map +1 -0
- package/esm/sdk/posts.d.ts +44 -3
- package/esm/sdk/posts.d.ts.map +1 -1
- package/esm/sdk/posts.js +70 -1
- package/esm/sdk/posts.js.map +1 -1
- package/esm/sdk/sdk.d.ts +12 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +20 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/user-discovery.d.ts +16 -0
- package/esm/sdk/user-discovery.d.ts.map +1 -1
- package/esm/sdk/user-discovery.js +28 -0
- package/esm/sdk/user-discovery.js.map +1 -1
- package/examples/authenticationRegisterUser.example.ts +0 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/creators-discovery-get-featured-creators.ts +174 -0
- package/src/funcs/creators-discovery-get-trending-creators.ts +174 -0
- package/src/funcs/internal-asset-processing-callback.ts +190 -0
- package/src/funcs/me-confirm-avatar-upload.ts +161 -0
- package/src/funcs/me-confirm-banner-upload.ts +161 -0
- package/src/funcs/me-get-me.ts +142 -0
- package/src/funcs/me-request-avatar-upload-url.ts +161 -0
- package/src/funcs/me-request-banner-upload-url.ts +161 -0
- package/src/funcs/me-update-me.ts +161 -0
- package/src/funcs/notifications-get-notifications.ts +179 -0
- package/src/funcs/notifications-get-unread-notification-count.ts +142 -0
- package/src/funcs/notifications-mark-notifications-as-read.ts +162 -0
- package/src/funcs/posts-create-comment.ts +176 -0
- package/src/funcs/posts-create-post.ts +9 -7
- package/src/funcs/posts-delete-comment.ts +178 -0
- package/src/funcs/posts-delete-post.ts +170 -0
- package/src/funcs/posts-get-post-comments.ts +185 -0
- package/src/funcs/posts-get-post-likes.ts +185 -0
- package/src/funcs/posts-get-post.ts +171 -0
- package/src/funcs/posts-like-post.ts +170 -0
- package/src/funcs/posts-unlike-post.ts +170 -0
- package/src/funcs/posts-update-post.ts +179 -0
- package/src/funcs/user-discovery-get-follower-count.ts +142 -0
- package/src/funcs/user-discovery-get-followers.ts +176 -0
- package/src/funcs/user-discovery-get-user-follower-count.ts +172 -0
- package/src/funcs/user-discovery-get-user-followers.ts +186 -0
- package/src/lib/config.ts +3 -3
- package/src/models/asset-declaration.ts +84 -0
- package/src/models/asset-processing-callback-request.ts +68 -0
- package/src/models/comment.ts +38 -0
- package/src/models/create-comment-request.ts +34 -0
- package/src/models/create-post-request.ts +17 -39
- package/src/models/create-post-response.ts +41 -0
- package/src/models/follower-count-response.ts +32 -0
- package/src/models/index.ts +19 -0
- package/src/models/mark-notifications-read-request.ts +42 -0
- package/src/models/media-asset.ts +16 -8
- package/src/models/notification.ts +60 -0
- package/src/models/operations/asset-processing-callback.ts +40 -0
- package/src/models/operations/create-comment.ts +35 -0
- package/src/models/operations/delete-comment.ts +34 -0
- package/src/models/operations/delete-post.ts +31 -0
- package/src/models/operations/get-featured-creators.ts +31 -0
- package/src/models/operations/get-followers.ts +37 -0
- package/src/models/operations/get-notifications.ts +37 -0
- package/src/models/operations/get-post-comments.ts +40 -0
- package/src/models/operations/get-post-likes.ts +40 -0
- package/src/models/operations/get-post.ts +27 -0
- package/src/models/operations/get-trending-creators.ts +31 -0
- package/src/models/operations/get-user-follower-count.ts +33 -0
- package/src/models/operations/get-user-followers.ts +40 -0
- package/src/models/operations/index.ts +16 -1
- package/src/models/operations/like-post.ts +29 -0
- package/src/models/operations/unlike-post.ts +31 -0
- package/src/models/operations/update-post.ts +35 -0
- package/src/models/paginated-comments-response.ts +38 -0
- package/src/models/paginated-followers-response.ts +38 -0
- package/src/models/paginated-likes-response.ts +38 -0
- package/src/models/paginated-notifications-response.ts +38 -0
- package/src/models/post.ts +27 -2
- package/src/models/profile-media-confirm-request.ts +34 -0
- package/src/models/profile-media-upload-request.ts +55 -0
- package/src/models/profile-media-upload-response.ts +45 -0
- package/src/models/register-request.ts +3 -3
- package/src/models/unread-count-response.ts +32 -0
- package/src/models/update-post-request.ts +56 -0
- package/src/models/update-profile-request.ts +37 -0
- package/src/models/upload-slot.ts +53 -0
- package/src/models/user.ts +5 -0
- package/src/sdk/creators-discovery.ts +40 -0
- package/src/sdk/internal.ts +32 -0
- package/src/sdk/me.ts +98 -0
- package/src/sdk/notifications.ts +55 -0
- package/src/sdk/posts.ts +157 -3
- package/src/sdk/sdk.ts +24 -0
- package/src/sdk/user-discovery.ts +64 -0
- package/src/models/operations/create-post.ts +0 -62
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 788aa2ce6d6e
|
|
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
|
+
* Fetch a specific user's follower count
|
|
33
|
+
*/
|
|
34
|
+
export function userDiscoveryGetUserFollowerCount(
|
|
35
|
+
client: FankareSDKCore,
|
|
36
|
+
userId: number,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
models.FollowerCountResponse,
|
|
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.FollowerCountResponse,
|
|
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.GetUserFollowerCountRequest = {
|
|
79
|
+
userId: userId,
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const parsed = safeParse(
|
|
83
|
+
input,
|
|
84
|
+
(value) =>
|
|
85
|
+
z.parse(operations.GetUserFollowerCountRequest$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("/users/{userId}/followers/count")(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: "getUserFollowerCount",
|
|
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
|
+
models.FollowerCountResponse,
|
|
154
|
+
| FankareSDKError
|
|
155
|
+
| ResponseValidationError
|
|
156
|
+
| ConnectionError
|
|
157
|
+
| RequestAbortedError
|
|
158
|
+
| RequestTimeoutError
|
|
159
|
+
| InvalidRequestError
|
|
160
|
+
| UnexpectedClientError
|
|
161
|
+
| SDKValidationError
|
|
162
|
+
>(
|
|
163
|
+
M.json(200, models.FollowerCountResponse$inboundSchema),
|
|
164
|
+
M.fail([401, 404, "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
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 4085e9ab1118
|
|
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
|
+
* Fetch a specific user's paginated list of followers
|
|
33
|
+
*/
|
|
34
|
+
export function userDiscoveryGetUserFollowers(
|
|
35
|
+
client: FankareSDKCore,
|
|
36
|
+
userId: number,
|
|
37
|
+
limit?: number | undefined,
|
|
38
|
+
cursor?: string | undefined,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<
|
|
41
|
+
Result<
|
|
42
|
+
models.PaginatedFollowersResponse,
|
|
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
|
+
userId,
|
|
56
|
+
limit,
|
|
57
|
+
cursor,
|
|
58
|
+
options,
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function $do(
|
|
63
|
+
client: FankareSDKCore,
|
|
64
|
+
userId: number,
|
|
65
|
+
limit?: number | undefined,
|
|
66
|
+
cursor?: string | undefined,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): Promise<
|
|
69
|
+
[
|
|
70
|
+
Result<
|
|
71
|
+
models.PaginatedFollowersResponse,
|
|
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.GetUserFollowersRequest = {
|
|
85
|
+
userId: userId,
|
|
86
|
+
limit: limit,
|
|
87
|
+
cursor: cursor,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const parsed = safeParse(
|
|
91
|
+
input,
|
|
92
|
+
(value) =>
|
|
93
|
+
z.parse(operations.GetUserFollowersRequest$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
|
+
userId: encodeSimple("userId", payload.userId, {
|
|
104
|
+
explode: false,
|
|
105
|
+
charEncoding: "percent",
|
|
106
|
+
}),
|
|
107
|
+
};
|
|
108
|
+
const path = pathToFunc("/users/{userId}/followers")(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: "getUserFollowers",
|
|
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.PaginatedFollowersResponse,
|
|
168
|
+
| FankareSDKError
|
|
169
|
+
| ResponseValidationError
|
|
170
|
+
| ConnectionError
|
|
171
|
+
| RequestAbortedError
|
|
172
|
+
| RequestTimeoutError
|
|
173
|
+
| InvalidRequestError
|
|
174
|
+
| UnexpectedClientError
|
|
175
|
+
| SDKValidationError
|
|
176
|
+
>(
|
|
177
|
+
M.json(200, models.PaginatedFollowersResponse$inboundSchema),
|
|
178
|
+
M.fail([401, 404, "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
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
|
|
62
62
|
export const SDK_METADATA = {
|
|
63
63
|
language: "typescript",
|
|
64
|
-
openapiDocVersion: "1.
|
|
65
|
-
sdkVersion: "0.
|
|
64
|
+
openapiDocVersion: "1.1.0",
|
|
65
|
+
sdkVersion: "0.1.1",
|
|
66
66
|
genVersion: "2.911.0",
|
|
67
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
67
|
+
userAgent: "speakeasy-sdk/typescript 0.1.1 2.911.0 1.1.0 openapi",
|
|
68
68
|
} as const;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 382ff0659e0a
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4-mini";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Logical media category used to route the Celery processing task.
|
|
11
|
+
*/
|
|
12
|
+
export const AssetDeclarationMediaType = {
|
|
13
|
+
Image: "IMAGE",
|
|
14
|
+
Video: "VIDEO",
|
|
15
|
+
} as const;
|
|
16
|
+
/**
|
|
17
|
+
* Logical media category used to route the Celery processing task.
|
|
18
|
+
*/
|
|
19
|
+
export type AssetDeclarationMediaType = ClosedEnum<
|
|
20
|
+
typeof AssetDeclarationMediaType
|
|
21
|
+
>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* MIME type of the file to be uploaded. Must match the mediaType category.
|
|
25
|
+
*/
|
|
26
|
+
export const AssetDeclarationContentType = {
|
|
27
|
+
ImageJpeg: "image/jpeg",
|
|
28
|
+
ImagePng: "image/png",
|
|
29
|
+
ImageWebp: "image/webp",
|
|
30
|
+
ImageGif: "image/gif",
|
|
31
|
+
VideoMp4: "video/mp4",
|
|
32
|
+
VideoQuicktime: "video/quicktime",
|
|
33
|
+
VideoXMatroska: "video/x-matroska",
|
|
34
|
+
} as const;
|
|
35
|
+
/**
|
|
36
|
+
* MIME type of the file to be uploaded. Must match the mediaType category.
|
|
37
|
+
*/
|
|
38
|
+
export type AssetDeclarationContentType = ClosedEnum<
|
|
39
|
+
typeof AssetDeclarationContentType
|
|
40
|
+
>;
|
|
41
|
+
|
|
42
|
+
export type AssetDeclaration = {
|
|
43
|
+
/**
|
|
44
|
+
* Logical media category used to route the Celery processing task.
|
|
45
|
+
*/
|
|
46
|
+
mediaType: AssetDeclarationMediaType;
|
|
47
|
+
/**
|
|
48
|
+
* MIME type of the file to be uploaded. Must match the mediaType category.
|
|
49
|
+
*/
|
|
50
|
+
contentType: AssetDeclarationContentType;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const AssetDeclarationMediaType$outboundSchema: z.ZodMiniEnum<
|
|
55
|
+
typeof AssetDeclarationMediaType
|
|
56
|
+
> = z.enum(AssetDeclarationMediaType);
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const AssetDeclarationContentType$outboundSchema: z.ZodMiniEnum<
|
|
60
|
+
typeof AssetDeclarationContentType
|
|
61
|
+
> = z.enum(AssetDeclarationContentType);
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type AssetDeclaration$Outbound = {
|
|
65
|
+
mediaType: string;
|
|
66
|
+
contentType: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const AssetDeclaration$outboundSchema: z.ZodMiniType<
|
|
71
|
+
AssetDeclaration$Outbound,
|
|
72
|
+
AssetDeclaration
|
|
73
|
+
> = z.object({
|
|
74
|
+
mediaType: AssetDeclarationMediaType$outboundSchema,
|
|
75
|
+
contentType: AssetDeclarationContentType$outboundSchema,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export function assetDeclarationToJSON(
|
|
79
|
+
assetDeclaration: AssetDeclaration,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
AssetDeclaration$outboundSchema.parse(assetDeclaration),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: b75d6ac67429
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4-mini";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The terminal processing outcome reported by the Celery worker.
|
|
11
|
+
*/
|
|
12
|
+
export const AssetProcessingCallbackRequestStatus = {
|
|
13
|
+
Ready: "READY",
|
|
14
|
+
Failed: "FAILED",
|
|
15
|
+
} as const;
|
|
16
|
+
/**
|
|
17
|
+
* The terminal processing outcome reported by the Celery worker.
|
|
18
|
+
*/
|
|
19
|
+
export type AssetProcessingCallbackRequestStatus = ClosedEnum<
|
|
20
|
+
typeof AssetProcessingCallbackRequestStatus
|
|
21
|
+
>;
|
|
22
|
+
|
|
23
|
+
export type AssetProcessingCallbackRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* The terminal processing outcome reported by the Celery worker.
|
|
26
|
+
*/
|
|
27
|
+
status: AssetProcessingCallbackRequestStatus;
|
|
28
|
+
/**
|
|
29
|
+
* The canonical SeaweedFS path of the transcoded/optimised output file. Required when status is READY. The gateway overwrites post_assets.media_key with this value so that mediaUrl is derived from the processed file, not the raw upload.
|
|
30
|
+
*/
|
|
31
|
+
finalMediaKey?: string | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Human-readable failure reason for logging and observability. Only meaningful when status is FAILED.
|
|
34
|
+
*/
|
|
35
|
+
errorReason?: string | null | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const AssetProcessingCallbackRequestStatus$outboundSchema: z.ZodMiniEnum<
|
|
40
|
+
typeof AssetProcessingCallbackRequestStatus
|
|
41
|
+
> = z.enum(AssetProcessingCallbackRequestStatus);
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type AssetProcessingCallbackRequest$Outbound = {
|
|
45
|
+
status: string;
|
|
46
|
+
finalMediaKey?: string | null | undefined;
|
|
47
|
+
errorReason?: string | null | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const AssetProcessingCallbackRequest$outboundSchema: z.ZodMiniType<
|
|
52
|
+
AssetProcessingCallbackRequest$Outbound,
|
|
53
|
+
AssetProcessingCallbackRequest
|
|
54
|
+
> = z.object({
|
|
55
|
+
status: AssetProcessingCallbackRequestStatus$outboundSchema,
|
|
56
|
+
finalMediaKey: z.optional(z.nullable(z.string())),
|
|
57
|
+
errorReason: z.optional(z.nullable(z.string())),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export function assetProcessingCallbackRequestToJSON(
|
|
61
|
+
assetProcessingCallbackRequest: AssetProcessingCallbackRequest,
|
|
62
|
+
): string {
|
|
63
|
+
return JSON.stringify(
|
|
64
|
+
AssetProcessingCallbackRequest$outboundSchema.parse(
|
|
65
|
+
assetProcessingCallbackRequest,
|
|
66
|
+
),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 31da50e38c51
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4-mini";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import * as types from "../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
11
|
+
import { User, User$inboundSchema } from "./user.js";
|
|
12
|
+
|
|
13
|
+
export type Comment = {
|
|
14
|
+
id: number;
|
|
15
|
+
postId: number;
|
|
16
|
+
user: User;
|
|
17
|
+
content: string;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const Comment$inboundSchema: z.ZodMiniType<Comment, unknown> = z.object({
|
|
23
|
+
id: types.number(),
|
|
24
|
+
postId: types.number(),
|
|
25
|
+
user: User$inboundSchema,
|
|
26
|
+
content: types.string(),
|
|
27
|
+
createdAt: types.date(),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function commentFromJSON(
|
|
31
|
+
jsonString: string,
|
|
32
|
+
): SafeParseResult<Comment, SDKValidationError> {
|
|
33
|
+
return safeParse(
|
|
34
|
+
jsonString,
|
|
35
|
+
(x) => Comment$inboundSchema.parse(JSON.parse(x)),
|
|
36
|
+
`Failed to parse 'Comment' from JSON`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 1281f847c1db
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v4-mini";
|
|
7
|
+
|
|
8
|
+
export type CreateCommentRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* The textual content of the comment.
|
|
11
|
+
*/
|
|
12
|
+
content: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type CreateCommentRequest$Outbound = {
|
|
17
|
+
content: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const CreateCommentRequest$outboundSchema: z.ZodMiniType<
|
|
22
|
+
CreateCommentRequest$Outbound,
|
|
23
|
+
CreateCommentRequest
|
|
24
|
+
> = z.object({
|
|
25
|
+
content: z.string(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function createCommentRequestToJSON(
|
|
29
|
+
createCommentRequest: CreateCommentRequest,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
CreateCommentRequest$outboundSchema.parse(createCommentRequest),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -4,49 +4,27 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import * as z from "zod/v4-mini";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} as const;
|
|
13
|
-
export type CreatePostRequestMediaType = ClosedEnum<
|
|
14
|
-
typeof CreatePostRequestMediaType
|
|
15
|
-
>;
|
|
16
|
-
|
|
17
|
-
export type Asset = {
|
|
18
|
-
mediaType: CreatePostRequestMediaType;
|
|
19
|
-
};
|
|
7
|
+
import {
|
|
8
|
+
AssetDeclaration,
|
|
9
|
+
AssetDeclaration$Outbound,
|
|
10
|
+
AssetDeclaration$outboundSchema,
|
|
11
|
+
} from "./asset-declaration.js";
|
|
20
12
|
|
|
21
13
|
export type CreatePostRequest = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export type Asset$Outbound = {
|
|
33
|
-
mediaType: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional caption for the post. May be set now or supplied later via PATCH.
|
|
16
|
+
*/
|
|
17
|
+
caption?: string | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Ordered list of media assets to attach to this post. The array index determines sort_order.
|
|
20
|
+
*/
|
|
21
|
+
assets: Array<AssetDeclaration>;
|
|
34
22
|
};
|
|
35
23
|
|
|
36
|
-
/** @internal */
|
|
37
|
-
export const Asset$outboundSchema: z.ZodMiniType<Asset$Outbound, Asset> = z
|
|
38
|
-
.object({
|
|
39
|
-
mediaType: CreatePostRequestMediaType$outboundSchema,
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
export function assetToJSON(asset: Asset): string {
|
|
43
|
-
return JSON.stringify(Asset$outboundSchema.parse(asset));
|
|
44
|
-
}
|
|
45
|
-
|
|
46
24
|
/** @internal */
|
|
47
25
|
export type CreatePostRequest$Outbound = {
|
|
48
|
-
caption
|
|
49
|
-
assets: Array<
|
|
26
|
+
caption?: string | null | undefined;
|
|
27
|
+
assets: Array<AssetDeclaration$Outbound>;
|
|
50
28
|
};
|
|
51
29
|
|
|
52
30
|
/** @internal */
|
|
@@ -54,8 +32,8 @@ export const CreatePostRequest$outboundSchema: z.ZodMiniType<
|
|
|
54
32
|
CreatePostRequest$Outbound,
|
|
55
33
|
CreatePostRequest
|
|
56
34
|
> = z.object({
|
|
57
|
-
caption: z.string(),
|
|
58
|
-
assets: z.array(
|
|
35
|
+
caption: z.optional(z.nullable(z.string())),
|
|
36
|
+
assets: z.array(AssetDeclaration$outboundSchema),
|
|
59
37
|
});
|
|
60
38
|
|
|
61
39
|
export function createPostRequestToJSON(
|