@blorp-labs/piefed-api-client 0.0.0-7e59b13 → 0.0.0-90bfbe5
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/LICENSE +661 -0
- package/README.md +61 -10
- package/dist/client/admin/admin.d.ts +3 -41
- package/dist/client/admin/admin.d.ts.map +1 -1
- package/dist/client/admin/admin.js +20 -7
- package/dist/client/admin/admin.js.map +1 -1
- package/dist/client/comment/comment.d.ts +15 -285
- package/dist/client/comment/comment.d.ts.map +1 -1
- package/dist/client/comment/comment.js +116 -43
- package/dist/client/comment/comment.js.map +1 -1
- package/dist/client/community/community.d.ts +18 -341
- package/dist/client/community/community.d.ts.map +1 -1
- package/dist/client/community/community.js +140 -52
- package/dist/client/community/community.js.map +1 -1
- package/dist/client/feed/feed.d.ts +7 -125
- package/dist/client/feed/feed.d.ts.map +1 -1
- package/dist/client/feed/feed.js +52 -19
- package/dist/client/feed/feed.js.map +1 -1
- package/dist/client/misc/misc.d.ts +6 -101
- package/dist/client/misc/misc.d.ts.map +1 -1
- package/dist/client/misc/misc.js +44 -16
- package/dist/client/misc/misc.js.map +1 -1
- package/dist/client/post/post.d.ts +21 -405
- package/dist/client/post/post.d.ts.map +1 -1
- package/dist/client/post/post.js +164 -61
- package/dist/client/post/post.js.map +1 -1
- package/dist/client/private-message/private-message.d.ts +9 -165
- package/dist/client/private-message/private-message.d.ts.map +1 -1
- package/dist/client/private-message/private-message.js +68 -25
- package/dist/client/private-message/private-message.js.map +1 -1
- package/dist/client/site/site.d.ts +6 -89
- package/dist/client/site/site.d.ts.map +1 -1
- package/dist/client/site/site.js +44 -16
- package/dist/client/site/site.js.map +1 -1
- package/dist/client/topic/topic.d.ts +2 -21
- package/dist/client/topic/topic.d.ts.map +1 -1
- package/dist/client/topic/topic.js +12 -4
- package/dist/client/topic/topic.js.map +1 -1
- package/dist/client/upload/upload.d.ts +5 -97
- package/dist/client/upload/upload.d.ts.map +1 -1
- package/dist/client/upload/upload.js +36 -13
- package/dist/client/upload/upload.js.map +1 -1
- package/dist/client/user/user.d.ts +22 -405
- package/dist/client/user/user.d.ts.map +1 -1
- package/dist/client/user/user.js +172 -64
- package/dist/client/user/user.js.map +1 -1
- package/dist/create-client.d.ts +15 -214
- package/dist/create-client.d.ts.map +1 -1
- package/dist/create-client.js +69 -30
- package/dist/create-client.js.map +1 -1
- package/dist/index.d.ts +1 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -15
- package/dist/index.js.map +1 -1
- package/dist/mutator/custom-fetch.d.ts +5 -3
- package/dist/mutator/custom-fetch.d.ts.map +1 -1
- package/dist/mutator/custom-fetch.js +31 -7
- package/dist/mutator/custom-fetch.js.map +1 -1
- package/dist/schemas/adminPurgeComment.js +2 -1
- package/dist/schemas/adminPurgeCommentReason.js +2 -1
- package/dist/schemas/adminPurgeCommentReason.js.map +1 -1
- package/dist/schemas/adminPurgeCommentView.js +2 -1
- package/dist/schemas/adminPurgeCommunity.js +2 -1
- package/dist/schemas/adminPurgeCommunityReason.js +2 -1
- package/dist/schemas/adminPurgeCommunityReason.js.map +1 -1
- package/dist/schemas/adminPurgeCommunityView.js +2 -1
- package/dist/schemas/adminPurgePerson.js +2 -1
- package/dist/schemas/adminPurgePersonReason.js +2 -1
- package/dist/schemas/adminPurgePersonReason.js.map +1 -1
- package/dist/schemas/adminPurgePersonView.js +2 -1
- package/dist/schemas/adminPurgePost.js +2 -1
- package/dist/schemas/adminPurgePostCommunityId.js +2 -1
- package/dist/schemas/adminPurgePostCommunityId.js.map +1 -1
- package/dist/schemas/adminPurgePostReason.js +2 -1
- package/dist/schemas/adminPurgePostReason.js.map +1 -1
- package/dist/schemas/adminPurgePostView.js +2 -1
- package/dist/schemas/blockCommunityRequest.js +2 -1
- package/dist/schemas/blockCommunityRequest.js.map +1 -1
- package/dist/schemas/blockCommunityResponse.js +2 -1
- package/dist/schemas/blockInstanceRequest.js +2 -1
- package/dist/schemas/blockInstanceRequest.js.map +1 -1
- package/dist/schemas/blockInstanceResponse.js +2 -1
- package/dist/schemas/blockInstanceResponse.js.map +1 -1
- package/dist/schemas/comment.js +2 -1
- package/dist/schemas/commentAggregates.js +2 -1
- package/dist/schemas/commentAggregates.js.map +1 -1
- package/dist/schemas/commentEmojiReactions.js +2 -1
- package/dist/schemas/commentLikeView.js +2 -1
- package/dist/schemas/commentReply.js +2 -1
- package/dist/schemas/commentReply.js.map +1 -1
- package/dist/schemas/commentReplyView.js +2 -1
- package/dist/schemas/commentReplyViewSubscribed.js +4 -1
- package/dist/schemas/commentReplyViewSubscribed.js.map +1 -1
- package/dist/schemas/commentReport.js +2 -1
- package/dist/schemas/commentReport.js.map +1 -1
- package/dist/schemas/commentReportView.js +2 -1
- package/dist/schemas/commentReportViewSubscribed.js +4 -1
- package/dist/schemas/commentReportViewSubscribed.js.map +1 -1
- package/dist/schemas/commentView.js +2 -1
- package/dist/schemas/commentViewSubscribed.js +4 -1
- package/dist/schemas/commentViewSubscribed.js.map +1 -1
- package/dist/schemas/community.js +2 -1
- package/dist/schemas/communityAggregates.js +2 -1
- package/dist/schemas/communityAggregates.js.map +1 -1
- package/dist/schemas/communityBanner.js +2 -1
- package/dist/schemas/communityBanner.js.map +1 -1
- package/dist/schemas/communityBlockView.js +2 -1
- package/dist/schemas/communityFlair.js +2 -1
- package/dist/schemas/communityFlairApId.js +2 -1
- package/dist/schemas/communityFlairApId.js.map +1 -1
- package/dist/schemas/communityFlairCreateRequest.js +2 -1
- package/dist/schemas/communityFlairCreateRequest.js.map +1 -1
- package/dist/schemas/communityFlairCreateResponse.js +2 -1
- package/dist/schemas/communityFlairCreateResponseApId.js +2 -1
- package/dist/schemas/communityFlairCreateResponseApId.js.map +1 -1
- package/dist/schemas/communityFlairDeleteRequest.js +2 -1
- package/dist/schemas/communityFlairDeleteRequest.js.map +1 -1
- package/dist/schemas/communityFlairDeleteResponse.js +2 -1
- package/dist/schemas/communityFlairEditRequest.js +2 -1
- package/dist/schemas/communityFlairEditRequest.js.map +1 -1
- package/dist/schemas/communityFlairEditResponse.js +2 -1
- package/dist/schemas/communityFlairEditResponseApId.js +2 -1
- package/dist/schemas/communityFlairEditResponseApId.js.map +1 -1
- package/dist/schemas/communityFollowerView.js +2 -1
- package/dist/schemas/communityIcon.js +2 -1
- package/dist/schemas/communityIcon.js.map +1 -1
- package/dist/schemas/communityModerationBanItem.js +2 -1
- package/dist/schemas/communityModerationBanItemExpiredAt.js +2 -1
- package/dist/schemas/communityModerationBanItemExpiredAt.js.map +1 -1
- package/dist/schemas/communityModerationBanItemExpiresAt.js +2 -1
- package/dist/schemas/communityModerationBanItemExpiresAt.js.map +1 -1
- package/dist/schemas/communityModerationBanRequest.js +2 -1
- package/dist/schemas/communityModerationBanRequest.js.map +1 -1
- package/dist/schemas/communityModerationBansListResponse.js +2 -1
- package/dist/schemas/communityModerationBansListResponseNextPage.js +2 -1
- package/dist/schemas/communityModerationBansListResponseNextPage.js.map +1 -1
- package/dist/schemas/communityModerationNsfwRequest.js +2 -1
- package/dist/schemas/communityModerationNsfwRequest.js.map +1 -1
- package/dist/schemas/communityModerationUnbanRequest.js +2 -1
- package/dist/schemas/communityModerationUnbanRequest.js.map +1 -1
- package/dist/schemas/communityModeratorView.js +2 -1
- package/dist/schemas/communityPostingWarning.js +2 -1
- package/dist/schemas/communityPostingWarning.js.map +1 -1
- package/dist/schemas/communityResponse.js +2 -1
- package/dist/schemas/communityView.js +2 -1
- package/dist/schemas/communityViewSubscribed.js +4 -1
- package/dist/schemas/communityViewSubscribed.js.map +1 -1
- package/dist/schemas/createCommentRequest.js +2 -1
- package/dist/schemas/createCommentRequest.js.map +1 -1
- package/dist/schemas/createCommunityRequest.js +2 -1
- package/dist/schemas/createCommunityRequestBannerUrl.js +2 -1
- package/dist/schemas/createCommunityRequestBannerUrl.js.map +1 -1
- package/dist/schemas/createCommunityRequestIconUrl.js +2 -1
- package/dist/schemas/createCommunityRequestIconUrl.js.map +1 -1
- package/dist/schemas/createFeedRequest.js +2 -1
- package/dist/schemas/createFeedRequestBannerUrl.js +2 -1
- package/dist/schemas/createFeedRequestBannerUrl.js.map +1 -1
- package/dist/schemas/createFeedRequestIconUrl.js +2 -1
- package/dist/schemas/createFeedRequestIconUrl.js.map +1 -1
- package/dist/schemas/createFeedRequestParentFeedId.js +2 -1
- package/dist/schemas/createFeedRequestParentFeedId.js.map +1 -1
- package/dist/schemas/createPostRequest.js +2 -1
- package/dist/schemas/createPostRequestEvent.js +2 -1
- package/dist/schemas/createPostRequestPoll.js +2 -1
- package/dist/schemas/createPrivateMessageRequest.js +2 -1
- package/dist/schemas/createPrivateMessageRequest.js.map +1 -1
- package/dist/schemas/defaultError.js +2 -1
- package/dist/schemas/defaultError.js.map +1 -1
- package/dist/schemas/deleteCommentRequest.js +2 -1
- package/dist/schemas/deleteCommentRequest.js.map +1 -1
- package/dist/schemas/deleteCommunityRequest.js +2 -1
- package/dist/schemas/deleteCommunityRequest.js.map +1 -1
- package/dist/schemas/deleteFeedRequest.js +2 -1
- package/dist/schemas/deleteFeedRequest.js.map +1 -1
- package/dist/schemas/deletePostRequest.js +2 -1
- package/dist/schemas/deletePostRequest.js.map +1 -1
- package/dist/schemas/deletePrivateMessageRequest.js +2 -1
- package/dist/schemas/deletePrivateMessageRequest.js.map +1 -1
- package/dist/schemas/domainBlockRequest.js +2 -1
- package/dist/schemas/domainBlockRequest.js.map +1 -1
- package/dist/schemas/domainBlockResponse.js +2 -1
- package/dist/schemas/domainBlockResponse.js.map +1 -1
- package/dist/schemas/editCommentRequest.js +2 -1
- package/dist/schemas/editCommentRequest.js.map +1 -1
- package/dist/schemas/editCommunityRequest.js +2 -1
- package/dist/schemas/editCommunityRequestBannerUrl.js +2 -1
- package/dist/schemas/editCommunityRequestBannerUrl.js.map +1 -1
- package/dist/schemas/editCommunityRequestIconUrl.js +2 -1
- package/dist/schemas/editCommunityRequestIconUrl.js.map +1 -1
- package/dist/schemas/editFeedRequest.js +2 -1
- package/dist/schemas/editFeedRequestBannerUrl.js +2 -1
- package/dist/schemas/editFeedRequestBannerUrl.js.map +1 -1
- package/dist/schemas/editFeedRequestIconUrl.js +2 -1
- package/dist/schemas/editFeedRequestIconUrl.js.map +1 -1
- package/dist/schemas/editFeedRequestParentFeedId.js +2 -1
- package/dist/schemas/editFeedRequestParentFeedId.js.map +1 -1
- package/dist/schemas/editPostRequest.js +2 -1
- package/dist/schemas/editPostRequestAltText.js +2 -1
- package/dist/schemas/editPostRequestAltText.js.map +1 -1
- package/dist/schemas/editPostRequestEvent.js +2 -1
- package/dist/schemas/editPostRequestFlair.js +2 -1
- package/dist/schemas/editPostRequestFlair.js.map +1 -1
- package/dist/schemas/editPostRequestPoll.js +2 -1
- package/dist/schemas/editPostRequestTags.js +2 -1
- package/dist/schemas/editPostRequestTags.js.map +1 -1
- package/dist/schemas/editPostRequestUrl.js +2 -1
- package/dist/schemas/editPostRequestUrl.js.map +1 -1
- package/dist/schemas/editPrivateMessageRequest.js +2 -1
- package/dist/schemas/editPrivateMessageRequest.js.map +1 -1
- package/dist/schemas/error.js +2 -1
- package/dist/schemas/errorErrors.js +2 -1
- package/dist/schemas/errorErrors.js.map +1 -1
- package/dist/schemas/featurePostRequest.js +2 -1
- package/dist/schemas/featurePostRequestFeatureType.js +4 -1
- package/dist/schemas/featurePostRequestFeatureType.js.map +1 -1
- package/dist/schemas/federatedInstancesView.js +2 -1
- package/dist/schemas/feedListResponse.js +2 -1
- package/dist/schemas/feedView.js +2 -1
- package/dist/schemas/feedViewBanner.js +2 -1
- package/dist/schemas/feedViewBanner.js.map +1 -1
- package/dist/schemas/feedViewDescription.js +2 -1
- package/dist/schemas/feedViewDescription.js.map +1 -1
- package/dist/schemas/feedViewDescriptionHtml.js +2 -1
- package/dist/schemas/feedViewDescriptionHtml.js.map +1 -1
- package/dist/schemas/feedViewIcon.js +2 -1
- package/dist/schemas/feedViewIcon.js.map +1 -1
- package/dist/schemas/feedViewParentFeedId.js +2 -1
- package/dist/schemas/feedViewParentFeedId.js.map +1 -1
- package/dist/schemas/followCommunityRequest.js +2 -1
- package/dist/schemas/followCommunityRequest.js.map +1 -1
- package/dist/schemas/followFeedRequest.js +2 -1
- package/dist/schemas/followFeedRequest.js.map +1 -1
- package/dist/schemas/getApiAlphaAdminRegistrationApplicationListParams.js +2 -1
- package/dist/schemas/getApiAlphaAdminRegistrationApplicationListSort.js +4 -1
- package/dist/schemas/getApiAlphaAdminRegistrationApplicationListSort.js.map +1 -1
- package/dist/schemas/getApiAlphaCommentLikeListParams.js +2 -1
- package/dist/schemas/getApiAlphaCommentLikeListParams.js.map +1 -1
- package/dist/schemas/getApiAlphaCommentListParams.js +2 -1
- package/dist/schemas/getApiAlphaCommentListSort.js +4 -1
- package/dist/schemas/getApiAlphaCommentListSort.js.map +1 -1
- package/dist/schemas/getApiAlphaCommentParams.js +2 -1
- package/dist/schemas/getApiAlphaCommentParams.js.map +1 -1
- package/dist/schemas/getApiAlphaCommunityListParams.js +2 -1
- package/dist/schemas/getApiAlphaCommunityListSort.js +4 -1
- package/dist/schemas/getApiAlphaCommunityListSort.js.map +1 -1
- package/dist/schemas/getApiAlphaCommunityListType.js +4 -1
- package/dist/schemas/getApiAlphaCommunityListType.js.map +1 -1
- package/dist/schemas/getApiAlphaCommunityModerateBansParams.js +2 -1
- package/dist/schemas/getApiAlphaCommunityModerateBansParams.js.map +1 -1
- package/dist/schemas/getApiAlphaCommunityParams.js +2 -1
- package/dist/schemas/getApiAlphaCommunityParams.js.map +1 -1
- package/dist/schemas/getApiAlphaFeedListParams.js +2 -1
- package/dist/schemas/getApiAlphaFeedListParams.js.map +1 -1
- package/dist/schemas/getApiAlphaFeedParams.js +2 -1
- package/dist/schemas/getApiAlphaFeedParams.js.map +1 -1
- package/dist/schemas/getApiAlphaModlogParams.js +2 -1
- package/dist/schemas/getApiAlphaModlogType.js +4 -1
- package/dist/schemas/getApiAlphaModlogType.js.map +1 -1
- package/dist/schemas/getApiAlphaPostLikeListParams.js +2 -1
- package/dist/schemas/getApiAlphaPostLikeListParams.js.map +1 -1
- package/dist/schemas/getApiAlphaPostList2Params.js +2 -1
- package/dist/schemas/getApiAlphaPostList2Sort.js +4 -1
- package/dist/schemas/getApiAlphaPostList2Sort.js.map +1 -1
- package/dist/schemas/getApiAlphaPostList2Type.js +4 -1
- package/dist/schemas/getApiAlphaPostList2Type.js.map +1 -1
- package/dist/schemas/getApiAlphaPostListParams.js +2 -1
- package/dist/schemas/getApiAlphaPostListSort.js +4 -1
- package/dist/schemas/getApiAlphaPostListSort.js.map +1 -1
- package/dist/schemas/getApiAlphaPostListType.js +4 -1
- package/dist/schemas/getApiAlphaPostListType.js.map +1 -1
- package/dist/schemas/getApiAlphaPostParams.js +2 -1
- package/dist/schemas/getApiAlphaPostParams.js.map +1 -1
- package/dist/schemas/getApiAlphaPostRepliesParams.js +2 -1
- package/dist/schemas/getApiAlphaPostRepliesSort.js +4 -1
- package/dist/schemas/getApiAlphaPostRepliesSort.js.map +1 -1
- package/dist/schemas/getApiAlphaPostSiteMetadataParams.js +2 -1
- package/dist/schemas/getApiAlphaPostSiteMetadataParams.js.map +1 -1
- package/dist/schemas/getApiAlphaPrivateMessageConversationParams.js +2 -1
- package/dist/schemas/getApiAlphaPrivateMessageConversationParams.js.map +1 -1
- package/dist/schemas/getApiAlphaPrivateMessageListParams.js +2 -1
- package/dist/schemas/getApiAlphaPrivateMessageListParams.js.map +1 -1
- package/dist/schemas/getApiAlphaResolveObjectParams.js +2 -1
- package/dist/schemas/getApiAlphaResolveObjectParams.js.map +1 -1
- package/dist/schemas/getApiAlphaSearchListingType.js +4 -1
- package/dist/schemas/getApiAlphaSearchListingType.js.map +1 -1
- package/dist/schemas/getApiAlphaSearchNsfw.js +4 -1
- package/dist/schemas/getApiAlphaSearchNsfw.js.map +1 -1
- package/dist/schemas/getApiAlphaSearchParams.js +2 -1
- package/dist/schemas/getApiAlphaSearchSort.js +4 -1
- package/dist/schemas/getApiAlphaSearchSort.js.map +1 -1
- package/dist/schemas/getApiAlphaSearchType.js +4 -1
- package/dist/schemas/getApiAlphaSearchType.js.map +1 -1
- package/dist/schemas/getApiAlphaSiteInstanceChooserSearchParams.js +2 -1
- package/dist/schemas/getApiAlphaSiteInstanceChooserSearchParams.js.map +1 -1
- package/dist/schemas/getApiAlphaSuggestCompletionParams.js +2 -1
- package/dist/schemas/getApiAlphaSuggestCompletionParams.js.map +1 -1
- package/dist/schemas/getApiAlphaTopicListParams.js +2 -1
- package/dist/schemas/getApiAlphaTopicListParams.js.map +1 -1
- package/dist/schemas/getApiAlphaUserMediaParams.js +2 -1
- package/dist/schemas/getApiAlphaUserMediaSort.js +4 -1
- package/dist/schemas/getApiAlphaUserMediaSort.js.map +1 -1
- package/dist/schemas/getApiAlphaUserMentionsParams.js +2 -1
- package/dist/schemas/getApiAlphaUserMentionsSort.js +4 -1
- package/dist/schemas/getApiAlphaUserMentionsSort.js.map +1 -1
- package/dist/schemas/getApiAlphaUserNotificationsParams.js +2 -1
- package/dist/schemas/getApiAlphaUserNotificationsStatus.js +4 -1
- package/dist/schemas/getApiAlphaUserNotificationsStatus.js.map +1 -1
- package/dist/schemas/getApiAlphaUserParams.js +2 -1
- package/dist/schemas/getApiAlphaUserRepliesParams.js +2 -1
- package/dist/schemas/getApiAlphaUserRepliesSort.js +4 -1
- package/dist/schemas/getApiAlphaUserRepliesSort.js.map +1 -1
- package/dist/schemas/getApiAlphaUserSort.js +4 -1
- package/dist/schemas/getApiAlphaUserSort.js.map +1 -1
- package/dist/schemas/getCommentReplyResponse.js +2 -1
- package/dist/schemas/getCommentReportResponse.js +2 -1
- package/dist/schemas/getCommentResponse.js +2 -1
- package/dist/schemas/getCommunityResponse.js +2 -1
- package/dist/schemas/getFederatedInstancesResponse.js +2 -1
- package/dist/schemas/getModLogResponse.js +2 -1
- package/dist/schemas/getPostRepliesResponse.js +2 -1
- package/dist/schemas/getPostRepliesResponseNextPage.js +2 -1
- package/dist/schemas/getPostRepliesResponseNextPage.js.map +1 -1
- package/dist/schemas/getPostResponse.js +2 -1
- package/dist/schemas/getPrivateMessageConversationResponse.js +2 -1
- package/dist/schemas/getRegistrationListResponse.js +2 -1
- package/dist/schemas/getSiteInstanceChooserResponse.js +2 -1
- package/dist/schemas/getSiteInstanceChooserSearchResponse.js +2 -1
- package/dist/schemas/getSiteInstanceChooserSearchResponseItem.js +2 -1
- package/dist/schemas/getSiteInstanceChooserSearchResponseItem.js.map +1 -1
- package/dist/schemas/getSiteMetadataResponse.js +2 -1
- package/dist/schemas/getSiteResponse.js +2 -1
- package/dist/schemas/getSiteVersionResponse.js +2 -1
- package/dist/schemas/getSiteVersionResponse.js.map +1 -1
- package/dist/schemas/getSuggestCompletionResponse.js +2 -1
- package/dist/schemas/getSuggestCompletionResponse.js.map +1 -1
- package/dist/schemas/getUserResponse.js +2 -1
- package/dist/schemas/hidePostRequest.js +2 -1
- package/dist/schemas/hidePostRequest.js.map +1 -1
- package/dist/schemas/imageDeleteRequest.js +2 -1
- package/dist/schemas/imageDeleteRequest.js.map +1 -1
- package/dist/schemas/imageDeleteResponse.js +2 -1
- package/dist/schemas/imageDeleteResponse.js.map +1 -1
- package/dist/schemas/imageUploadRequest.js +2 -1
- package/dist/schemas/imageUploadRequest.js.map +1 -1
- package/dist/schemas/imageUploadResponse.js +2 -1
- package/dist/schemas/imageUploadResponse.js.map +1 -1
- package/dist/schemas/index.js +442 -426
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/instance.js +2 -1
- package/dist/schemas/instance.js.map +1 -1
- package/dist/schemas/instanceBlockView.js +2 -1
- package/dist/schemas/instanceWithoutFederationState.js +2 -1
- package/dist/schemas/instanceWithoutFederationState.js.map +1 -1
- package/dist/schemas/languageView.js +2 -1
- package/dist/schemas/languageView.js.map +1 -1
- package/dist/schemas/leaveConversationRequest.js +2 -1
- package/dist/schemas/leaveConversationRequest.js.map +1 -1
- package/dist/schemas/likeCommentRequest.js +2 -1
- package/dist/schemas/likeCommentRequest.js.map +1 -1
- package/dist/schemas/likePostRequest.js +2 -1
- package/dist/schemas/likePostRequest.js.map +1 -1
- package/dist/schemas/listCommentLikesResponse.js +2 -1
- package/dist/schemas/listCommentLikesResponseNextPage.js +2 -1
- package/dist/schemas/listCommentLikesResponseNextPage.js.map +1 -1
- package/dist/schemas/listCommentsResponse.js +2 -1
- package/dist/schemas/listCommentsResponseNextPage.js +2 -1
- package/dist/schemas/listCommentsResponseNextPage.js.map +1 -1
- package/dist/schemas/listCommunitiesResponse.js +2 -1
- package/dist/schemas/listCommunitiesResponseNextPage.js +2 -1
- package/dist/schemas/listCommunitiesResponseNextPage.js.map +1 -1
- package/dist/schemas/listPostLikesResponse.js +2 -1
- package/dist/schemas/listPostLikesResponseNextPage.js +2 -1
- package/dist/schemas/listPostLikesResponseNextPage.js.map +1 -1
- package/dist/schemas/listPostsResponse.js +2 -1
- package/dist/schemas/listPostsResponseNextPage.js +2 -1
- package/dist/schemas/listPostsResponseNextPage.js.map +1 -1
- package/dist/schemas/listPrivateMessagesResponse.js +2 -1
- package/dist/schemas/localUser.js +2 -1
- package/dist/schemas/localUserAcceptPrivateMessages.js +4 -1
- package/dist/schemas/localUserAcceptPrivateMessages.js.map +1 -1
- package/dist/schemas/localUserAiVisibility.js +4 -1
- package/dist/schemas/localUserAiVisibility.js.map +1 -1
- package/dist/schemas/localUserBotVisibility.js +4 -1
- package/dist/schemas/localUserBotVisibility.js.map +1 -1
- package/dist/schemas/localUserDefaultCommentSortType.js +4 -1
- package/dist/schemas/localUserDefaultCommentSortType.js.map +1 -1
- package/dist/schemas/localUserDefaultListingType.js +4 -1
- package/dist/schemas/localUserDefaultListingType.js.map +1 -1
- package/dist/schemas/localUserDefaultSortType.js +4 -1
- package/dist/schemas/localUserDefaultSortType.js.map +1 -1
- package/dist/schemas/localUserNsflVisibility.js +4 -1
- package/dist/schemas/localUserNsflVisibility.js.map +1 -1
- package/dist/schemas/localUserNsfwVisibility.js +4 -1
- package/dist/schemas/localUserNsfwVisibility.js.map +1 -1
- package/dist/schemas/localUserView.js +2 -1
- package/dist/schemas/lockCommentRequest.js +2 -1
- package/dist/schemas/lockCommentRequest.js.map +1 -1
- package/dist/schemas/lockPostRequest.js +2 -1
- package/dist/schemas/lockPostRequest.js.map +1 -1
- package/dist/schemas/markCommentAsAnswerRequest.js +2 -1
- package/dist/schemas/markCommentAsAnswerRequest.js.map +1 -1
- package/dist/schemas/markCommentAsReadRequest.js +2 -1
- package/dist/schemas/markCommentAsReadRequest.js.map +1 -1
- package/dist/schemas/markPostAsReadRequest.js +2 -1
- package/dist/schemas/markPostAsReadRequest.js.map +1 -1
- package/dist/schemas/markPrivateMessageAsReadRequest.js +2 -1
- package/dist/schemas/markPrivateMessageAsReadRequest.js.map +1 -1
- package/dist/schemas/mediaView.js +2 -1
- package/dist/schemas/mediaView.js.map +1 -1
- package/dist/schemas/miniCrossPosts.js +2 -1
- package/dist/schemas/miniCrossPosts.js.map +1 -1
- package/dist/schemas/modAdd.js +2 -1
- package/dist/schemas/modAddCommunity.js +2 -1
- package/dist/schemas/modAddCommunityCommunityId.js +2 -1
- package/dist/schemas/modAddCommunityCommunityId.js.map +1 -1
- package/dist/schemas/modAddCommunityModPersonId.js +2 -1
- package/dist/schemas/modAddCommunityModPersonId.js.map +1 -1
- package/dist/schemas/modAddCommunityOtherPersonId.js +2 -1
- package/dist/schemas/modAddCommunityOtherPersonId.js.map +1 -1
- package/dist/schemas/modAddCommunityView.js +2 -1
- package/dist/schemas/modAddCommunityViewCommunity.js +2 -1
- package/dist/schemas/modAddCommunityViewModdedPerson.js +2 -1
- package/dist/schemas/modAddCommunityViewModerator.js +2 -1
- package/dist/schemas/modAddModPersonId.js +2 -1
- package/dist/schemas/modAddModPersonId.js.map +1 -1
- package/dist/schemas/modAddOtherPersonId.js +2 -1
- package/dist/schemas/modAddOtherPersonId.js.map +1 -1
- package/dist/schemas/modAddView.js +2 -1
- package/dist/schemas/modAddViewModdedPerson.js +2 -1
- package/dist/schemas/modAddViewModerator.js +2 -1
- package/dist/schemas/modBan.js +2 -1
- package/dist/schemas/modBanExpires.js +2 -1
- package/dist/schemas/modBanExpires.js.map +1 -1
- package/dist/schemas/modBanFromCommunity.js +2 -1
- package/dist/schemas/modBanFromCommunityCommunityId.js +2 -1
- package/dist/schemas/modBanFromCommunityCommunityId.js.map +1 -1
- package/dist/schemas/modBanFromCommunityExpires.js +2 -1
- package/dist/schemas/modBanFromCommunityExpires.js.map +1 -1
- package/dist/schemas/modBanFromCommunityModPersonId.js +2 -1
- package/dist/schemas/modBanFromCommunityModPersonId.js.map +1 -1
- package/dist/schemas/modBanFromCommunityOtherPersonId.js +2 -1
- package/dist/schemas/modBanFromCommunityOtherPersonId.js.map +1 -1
- package/dist/schemas/modBanFromCommunityReason.js +2 -1
- package/dist/schemas/modBanFromCommunityReason.js.map +1 -1
- package/dist/schemas/modBanFromCommunityView.js +2 -1
- package/dist/schemas/modBanFromCommunityViewBannedPerson.js +2 -1
- package/dist/schemas/modBanFromCommunityViewCommunity.js +2 -1
- package/dist/schemas/modBanFromCommunityViewModerator.js +2 -1
- package/dist/schemas/modBanModPersonId.js +2 -1
- package/dist/schemas/modBanModPersonId.js.map +1 -1
- package/dist/schemas/modBanOtherPersonId.js +2 -1
- package/dist/schemas/modBanOtherPersonId.js.map +1 -1
- package/dist/schemas/modBanReason.js +2 -1
- package/dist/schemas/modBanReason.js.map +1 -1
- package/dist/schemas/modBanView.js +2 -1
- package/dist/schemas/modBanViewBannedPerson.js +2 -1
- package/dist/schemas/modBanViewModerator.js +2 -1
- package/dist/schemas/modCommunityRequest.js +2 -1
- package/dist/schemas/modCommunityRequest.js.map +1 -1
- package/dist/schemas/modCommunityResponse.js +2 -1
- package/dist/schemas/modFeaturePost.js +2 -1
- package/dist/schemas/modFeaturePostModPersonId.js +2 -1
- package/dist/schemas/modFeaturePostModPersonId.js.map +1 -1
- package/dist/schemas/modFeaturePostPostId.js +2 -1
- package/dist/schemas/modFeaturePostPostId.js.map +1 -1
- package/dist/schemas/modFeaturePostView.js +2 -1
- package/dist/schemas/modFeaturePostViewCommunity.js +2 -1
- package/dist/schemas/modFeaturePostViewModerator.js +2 -1
- package/dist/schemas/modFeaturePostViewPost.js +2 -1
- package/dist/schemas/modHideCommunity.js +2 -1
- package/dist/schemas/modHideCommunityCommunityId.js +2 -1
- package/dist/schemas/modHideCommunityCommunityId.js.map +1 -1
- package/dist/schemas/modHideCommunityModPersonId.js +2 -1
- package/dist/schemas/modHideCommunityModPersonId.js.map +1 -1
- package/dist/schemas/modHideCommunityReason.js +2 -1
- package/dist/schemas/modHideCommunityReason.js.map +1 -1
- package/dist/schemas/modHideCommunityView.js +2 -1
- package/dist/schemas/modLockPost.js +2 -1
- package/dist/schemas/modLockPostModPersonId.js +2 -1
- package/dist/schemas/modLockPostModPersonId.js.map +1 -1
- package/dist/schemas/modLockPostPostId.js +2 -1
- package/dist/schemas/modLockPostPostId.js.map +1 -1
- package/dist/schemas/modLockPostView.js +2 -1
- package/dist/schemas/modLockPostViewCommunity.js +2 -1
- package/dist/schemas/modLockPostViewModerator.js +2 -1
- package/dist/schemas/modLockPostViewPost.js +2 -1
- package/dist/schemas/modRemoveComment.js +2 -1
- package/dist/schemas/modRemoveCommentCommentId.js +2 -1
- package/dist/schemas/modRemoveCommentCommentId.js.map +1 -1
- package/dist/schemas/modRemoveCommentModPersonId.js +2 -1
- package/dist/schemas/modRemoveCommentModPersonId.js.map +1 -1
- package/dist/schemas/modRemoveCommentReason.js +2 -1
- package/dist/schemas/modRemoveCommentReason.js.map +1 -1
- package/dist/schemas/modRemoveCommentView.js +2 -1
- package/dist/schemas/modRemoveCommentViewComment.js +2 -1
- package/dist/schemas/modRemoveCommentViewCommenter.js +2 -1
- package/dist/schemas/modRemoveCommentViewCommunity.js +2 -1
- package/dist/schemas/modRemoveCommentViewModerator.js +2 -1
- package/dist/schemas/modRemoveCommentViewPost.js +2 -1
- package/dist/schemas/modRemoveCommunity.js +2 -1
- package/dist/schemas/modRemoveCommunityCommunityId.js +2 -1
- package/dist/schemas/modRemoveCommunityCommunityId.js.map +1 -1
- package/dist/schemas/modRemoveCommunityModPersonId.js +2 -1
- package/dist/schemas/modRemoveCommunityModPersonId.js.map +1 -1
- package/dist/schemas/modRemoveCommunityReason.js +2 -1
- package/dist/schemas/modRemoveCommunityReason.js.map +1 -1
- package/dist/schemas/modRemoveCommunityView.js +2 -1
- package/dist/schemas/modRemoveCommunityViewCommunity.js +2 -1
- package/dist/schemas/modRemoveCommunityViewModerator.js +2 -1
- package/dist/schemas/modRemovePost.js +2 -1
- package/dist/schemas/modRemovePostModPersonId.js +2 -1
- package/dist/schemas/modRemovePostModPersonId.js.map +1 -1
- package/dist/schemas/modRemovePostPostId.js +2 -1
- package/dist/schemas/modRemovePostPostId.js.map +1 -1
- package/dist/schemas/modRemovePostReason.js +2 -1
- package/dist/schemas/modRemovePostReason.js.map +1 -1
- package/dist/schemas/modRemovePostView.js +2 -1
- package/dist/schemas/modRemovePostViewCommunity.js +2 -1
- package/dist/schemas/modRemovePostViewModerator.js +2 -1
- package/dist/schemas/modRemovePostViewPost.js +2 -1
- package/dist/schemas/modTransferCommunity.js +2 -1
- package/dist/schemas/modTransferCommunityCommunityId.js +2 -1
- package/dist/schemas/modTransferCommunityCommunityId.js.map +1 -1
- package/dist/schemas/modTransferCommunityModPersonId.js +2 -1
- package/dist/schemas/modTransferCommunityModPersonId.js.map +1 -1
- package/dist/schemas/modTransferCommunityOtherPersonId.js +2 -1
- package/dist/schemas/modTransferCommunityOtherPersonId.js.map +1 -1
- package/dist/schemas/modTransferCommunityView.js +2 -1
- package/dist/schemas/modTransferCommunityViewModdedPerson.js +2 -1
- package/dist/schemas/modTransferCommunityViewModerator.js +2 -1
- package/dist/schemas/myUserInfo.js +2 -1
- package/dist/schemas/newUserExtraField.js +2 -1
- package/dist/schemas/newUserExtraFieldId.js +2 -1
- package/dist/schemas/newUserExtraFieldId.js.map +1 -1
- package/dist/schemas/newUserExtraFieldLabel.js +2 -1
- package/dist/schemas/newUserExtraFieldLabel.js.map +1 -1
- package/dist/schemas/newUserExtraFieldText.js +2 -1
- package/dist/schemas/newUserExtraFieldText.js.map +1 -1
- package/dist/schemas/paginationMetadata.js +2 -1
- package/dist/schemas/paginationMetadata.js.map +1 -1
- package/dist/schemas/person.js +2 -1
- package/dist/schemas/personAggregates.js +2 -1
- package/dist/schemas/personAggregates.js.map +1 -1
- package/dist/schemas/personAvatar.js +2 -1
- package/dist/schemas/personAvatar.js.map +1 -1
- package/dist/schemas/personBanner.js +2 -1
- package/dist/schemas/personBanner.js.map +1 -1
- package/dist/schemas/personBlockView.js +2 -1
- package/dist/schemas/personTitle.js +2 -1
- package/dist/schemas/personTitle.js.map +1 -1
- package/dist/schemas/personView.js +2 -1
- package/dist/schemas/pollChoice.js +2 -1
- package/dist/schemas/pollChoice.js.map +1 -1
- package/dist/schemas/pollVoteRequest.js +2 -1
- package/dist/schemas/pollVoteRequest.js.map +1 -1
- package/dist/schemas/pollVoteResponse.js +2 -1
- package/dist/schemas/post.js +2 -1
- package/dist/schemas/postAggregates.js +2 -1
- package/dist/schemas/postAggregates.js.map +1 -1
- package/dist/schemas/postEmojiReactions.js +2 -1
- package/dist/schemas/postEvent.js +2 -1
- package/dist/schemas/postEventBuyTicketsLink.js +2 -1
- package/dist/schemas/postEventBuyTicketsLink.js.map +1 -1
- package/dist/schemas/postEventExternalParticipationUrl.js +2 -1
- package/dist/schemas/postEventExternalParticipationUrl.js.map +1 -1
- package/dist/schemas/postEventLocation.js +2 -1
- package/dist/schemas/postEventLocationAnyOf.js +2 -1
- package/dist/schemas/postEventLocationAnyOf.js.map +1 -1
- package/dist/schemas/postEventOnlineLink.js +2 -1
- package/dist/schemas/postEventOnlineLink.js.map +1 -1
- package/dist/schemas/postFlair.js +2 -1
- package/dist/schemas/postFlair.js.map +1 -1
- package/dist/schemas/postLikeView.js +2 -1
- package/dist/schemas/postPoll.js +2 -1
- package/dist/schemas/postPollMode.js +4 -1
- package/dist/schemas/postPollMode.js.map +1 -1
- package/dist/schemas/postPostType.js +4 -1
- package/dist/schemas/postPostType.js.map +1 -1
- package/dist/schemas/postReplyView.js +2 -1
- package/dist/schemas/postReplyViewSubscribed.js +4 -1
- package/dist/schemas/postReplyViewSubscribed.js.map +1 -1
- package/dist/schemas/postReport.js +2 -1
- package/dist/schemas/postReport.js.map +1 -1
- package/dist/schemas/postReportResponse.js +2 -1
- package/dist/schemas/postReportView.js +2 -1
- package/dist/schemas/postReportViewSubscribed.js +4 -1
- package/dist/schemas/postReportViewSubscribed.js.map +1 -1
- package/dist/schemas/postSetFlairRequest.js +2 -1
- package/dist/schemas/postSetFlairRequestFlairIdList.js +2 -1
- package/dist/schemas/postSetFlairRequestFlairIdList.js.map +1 -1
- package/dist/schemas/postSetFlairResponse.js +2 -1
- package/dist/schemas/postSetFlairResponseSubscribed.js +4 -1
- package/dist/schemas/postSetFlairResponseSubscribed.js.map +1 -1
- package/dist/schemas/postTags.js +2 -1
- package/dist/schemas/postTags.js.map +1 -1
- package/dist/schemas/postView.js +2 -1
- package/dist/schemas/postViewSubscribed.js +4 -1
- package/dist/schemas/postViewSubscribed.js.map +1 -1
- package/dist/schemas/privateMessage.js +2 -1
- package/dist/schemas/privateMessage.js.map +1 -1
- package/dist/schemas/privateMessageResponse.js +2 -1
- package/dist/schemas/privateMessageView.js +2 -1
- package/dist/schemas/reactions.js +2 -1
- package/dist/schemas/reactionsUrl.js +2 -1
- package/dist/schemas/reactionsUrl.js.map +1 -1
- package/dist/schemas/registrationApproveRequest.js +2 -1
- package/dist/schemas/registrationApproveRequest.js.map +1 -1
- package/dist/schemas/removeCommentRequest.js +2 -1
- package/dist/schemas/removeCommentRequest.js.map +1 -1
- package/dist/schemas/removePostRequest.js +2 -1
- package/dist/schemas/removePostRequest.js.map +1 -1
- package/dist/schemas/reportCommentRequest.js +2 -1
- package/dist/schemas/reportCommentRequest.js.map +1 -1
- package/dist/schemas/reportPostRequest.js +2 -1
- package/dist/schemas/reportPostRequest.js.map +1 -1
- package/dist/schemas/reportPrivateMessageRequest.js +2 -1
- package/dist/schemas/reportPrivateMessageRequest.js.map +1 -1
- package/dist/schemas/resolveObjectResponse.js +2 -1
- package/dist/schemas/saveCommentRequest.js +2 -1
- package/dist/schemas/saveCommentRequest.js.map +1 -1
- package/dist/schemas/savePostRequest.js +2 -1
- package/dist/schemas/savePostRequest.js.map +1 -1
- package/dist/schemas/searchResponse.js +2 -1
- package/dist/schemas/searchResponseType.js +4 -1
- package/dist/schemas/searchResponseType.js.map +1 -1
- package/dist/schemas/site.js +2 -1
- package/dist/schemas/siteIcon.js +2 -1
- package/dist/schemas/siteIcon.js.map +1 -1
- package/dist/schemas/siteMetadataView.js +2 -1
- package/dist/schemas/siteMetadataView.js.map +1 -1
- package/dist/schemas/siteRegistrationMode.js +4 -1
- package/dist/schemas/siteRegistrationMode.js.map +1 -1
- package/dist/schemas/subscribeCommentRequest.js +2 -1
- package/dist/schemas/subscribeCommentRequest.js.map +1 -1
- package/dist/schemas/subscribeCommunityRequest.js +2 -1
- package/dist/schemas/subscribeCommunityRequest.js.map +1 -1
- package/dist/schemas/subscribePostRequest.js +2 -1
- package/dist/schemas/subscribePostRequest.js.map +1 -1
- package/dist/schemas/successResponse.js +2 -1
- package/dist/schemas/successResponse.js.map +1 -1
- package/dist/schemas/topicListResponse.js +2 -1
- package/dist/schemas/topicView.js +2 -1
- package/dist/schemas/topicViewParentTopicId.js +2 -1
- package/dist/schemas/topicViewParentTopicId.js.map +1 -1
- package/dist/schemas/unprocessableEntityResponse.js +2 -1
- package/dist/schemas/userBanRequest.js +2 -1
- package/dist/schemas/userBanRequestBanIpAddress.js +2 -1
- package/dist/schemas/userBanRequestBanIpAddress.js.map +1 -1
- package/dist/schemas/userBanRequestPurgeContent.js +2 -1
- package/dist/schemas/userBanRequestPurgeContent.js.map +1 -1
- package/dist/schemas/userBanRequestReason.js +2 -1
- package/dist/schemas/userBanRequestReason.js.map +1 -1
- package/dist/schemas/userBanResponse.js +2 -1
- package/dist/schemas/userBlockRequest.js +2 -1
- package/dist/schemas/userBlockRequest.js.map +1 -1
- package/dist/schemas/userBlockResponse.js +2 -1
- package/dist/schemas/userExtraField.js +2 -1
- package/dist/schemas/userExtraField.js.map +1 -1
- package/dist/schemas/userLoginRequest.js +2 -1
- package/dist/schemas/userLoginRequest.js.map +1 -1
- package/dist/schemas/userLoginResponse.js +2 -1
- package/dist/schemas/userLoginResponse.js.map +1 -1
- package/dist/schemas/userMarkAllNotifsReadResponse.js +2 -1
- package/dist/schemas/userMarkAllNotifsReadResponse.js.map +1 -1
- package/dist/schemas/userMarkAllReadResponse.js +2 -1
- package/dist/schemas/userMeResponse.js +2 -1
- package/dist/schemas/userMediaResponse.js +2 -1
- package/dist/schemas/userMediaResponseNextPage.js +2 -1
- package/dist/schemas/userMediaResponseNextPage.js.map +1 -1
- package/dist/schemas/userMentionsResponse.js +2 -1
- package/dist/schemas/userMentionsResponseNextPage.js +2 -1
- package/dist/schemas/userMentionsResponseNextPage.js.map +1 -1
- package/dist/schemas/userNotificationItemView.js +2 -1
- package/dist/schemas/userNotificationItemViewStatus.js +4 -1
- package/dist/schemas/userNotificationItemViewStatus.js.map +1 -1
- package/dist/schemas/userNotificationStateRequest.js +2 -1
- package/dist/schemas/userNotificationStateRequest.js.map +1 -1
- package/dist/schemas/userNotificationsCountResponse.js +2 -1
- package/dist/schemas/userNotificationsCountResponse.js.map +1 -1
- package/dist/schemas/userNotificationsCounts.js +2 -1
- package/dist/schemas/userNotificationsCounts.js.map +1 -1
- package/dist/schemas/userNotificationsResponse.js +2 -1
- package/dist/schemas/userNotificationsResponseNextPage.js +2 -1
- package/dist/schemas/userNotificationsResponseNextPage.js.map +1 -1
- package/dist/schemas/userNotificationsResponseStatus.js +4 -1
- package/dist/schemas/userNotificationsResponseStatus.js.map +1 -1
- package/dist/schemas/userRegistration.js +2 -1
- package/dist/schemas/userRegistrationAnswer.js +2 -1
- package/dist/schemas/userRegistrationAnswer.js.map +1 -1
- package/dist/schemas/userRegistrationEmail.js +2 -1
- package/dist/schemas/userRegistrationEmail.js.map +1 -1
- package/dist/schemas/userRegistrationIpAddress.js +2 -1
- package/dist/schemas/userRegistrationIpAddress.js.map +1 -1
- package/dist/schemas/userRegistrationStatus.js +4 -1
- package/dist/schemas/userRegistrationStatus.js.map +1 -1
- package/dist/schemas/userRepliesResponse.js +2 -1
- package/dist/schemas/userRepliesResponseNextPage.js +2 -1
- package/dist/schemas/userRepliesResponseNextPage.js.map +1 -1
- package/dist/schemas/userSaveSettingsRequest.js +2 -1
- package/dist/schemas/userSaveSettingsRequestAcceptPrivateMessages.js +4 -1
- package/dist/schemas/userSaveSettingsRequestAcceptPrivateMessages.js.map +1 -1
- package/dist/schemas/userSaveSettingsRequestAvatar.js +2 -1
- package/dist/schemas/userSaveSettingsRequestAvatar.js.map +1 -1
- package/dist/schemas/userSaveSettingsRequestBotVisibility.js +4 -1
- package/dist/schemas/userSaveSettingsRequestBotVisibility.js.map +1 -1
- package/dist/schemas/userSaveSettingsRequestCommunityKeywordFilter.js +2 -1
- package/dist/schemas/userSaveSettingsRequestCommunityKeywordFilter.js.map +1 -1
- package/dist/schemas/userSaveSettingsRequestCover.js +2 -1
- package/dist/schemas/userSaveSettingsRequestCover.js.map +1 -1
- package/dist/schemas/userSaveSettingsRequestDefaultCommentSortType.js +4 -1
- package/dist/schemas/userSaveSettingsRequestDefaultCommentSortType.js.map +1 -1
- package/dist/schemas/userSaveSettingsRequestDefaultSortType.js +4 -1
- package/dist/schemas/userSaveSettingsRequestDefaultSortType.js.map +1 -1
- package/dist/schemas/userSaveSettingsRequestGenaiVisibility.js +4 -1
- package/dist/schemas/userSaveSettingsRequestGenaiVisibility.js.map +1 -1
- package/dist/schemas/userSaveSettingsRequestNsflVisibility.js +4 -1
- package/dist/schemas/userSaveSettingsRequestNsflVisibility.js.map +1 -1
- package/dist/schemas/userSaveSettingsRequestNsfwVisibility.js +4 -1
- package/dist/schemas/userSaveSettingsRequestNsfwVisibility.js.map +1 -1
- package/dist/schemas/userSaveSettingsResponse.js +2 -1
- package/dist/schemas/userSetFlairRequest.js +2 -1
- package/dist/schemas/userSetFlairRequestFlairText.js +2 -1
- package/dist/schemas/userSetFlairRequestFlairText.js.map +1 -1
- package/dist/schemas/userSetFlairResponse.js +2 -1
- package/dist/schemas/userSetNoteRequest.js +2 -1
- package/dist/schemas/userSetNoteRequestNote.js +2 -1
- package/dist/schemas/userSetNoteRequestNote.js.map +1 -1
- package/dist/schemas/userSetNoteResponse.js +2 -1
- package/dist/schemas/userSubscribeRequest.js +2 -1
- package/dist/schemas/userSubscribeRequest.js.map +1 -1
- package/dist/schemas/userSubscribeResponse.js +2 -1
- package/dist/schemas/userUnbanRequest.js +2 -1
- package/dist/schemas/userUnbanRequest.js.map +1 -1
- package/dist/schemas/userUnreadCountsResponse.js +2 -1
- package/dist/schemas/userUnreadCountsResponse.js.map +1 -1
- package/dist/schemas/widthHeight.js +2 -1
- package/dist/schemas/widthHeight.js.map +1 -1
- package/dist/zod/admin/admin.js +52 -16
- package/dist/zod/admin/admin.js.map +1 -1
- package/dist/zod/comment/comment.js +280 -241
- package/dist/zod/comment/comment.js.map +1 -1
- package/dist/zod/community/community.js +158 -121
- package/dist/zod/community/community.js.map +1 -1
- package/dist/zod/feed/feed.js +54 -18
- package/dist/zod/feed/feed.js.map +1 -1
- package/dist/zod/misc/misc.js +246 -208
- package/dist/zod/misc/misc.js.map +1 -1
- package/dist/zod/post/post.js +578 -534
- package/dist/zod/post/post.js.map +1 -1
- package/dist/zod/private-message/private-message.js +112 -76
- package/dist/zod/private-message/private-message.js.map +1 -1
- package/dist/zod/site/site.js +76 -40
- package/dist/zod/site/site.js.map +1 -1
- package/dist/zod/topic/topic.js +41 -5
- package/dist/zod/topic/topic.js.map +1 -1
- package/dist/zod/upload/upload.js +45 -9
- package/dist/zod/upload/upload.js.map +1 -1
- package/dist/zod/user/user.js +351 -311
- package/dist/zod/user/user.js.map +1 -1
- package/dist/zod-index.js +27 -11
- package/dist/zod-index.js.map +1 -1
- package/package.json +7 -4
- package/src/__tests__/create-client.test.ts +317 -0
- package/src/client/admin/admin.ts +5 -55
- package/src/client/comment/comment.ts +29 -372
- package/src/client/community/community.ts +34 -444
- package/src/client/feed/feed.ts +13 -164
- package/src/client/misc/misc.ts +11 -133
- package/src/client/post/post.ts +41 -528
- package/src/client/private-message/private-message.ts +17 -216
- package/src/client/site/site.ts +11 -118
- package/src/client/topic/topic.ts +3 -29
- package/src/client/upload/upload.ts +9 -127
- package/src/client/user/user.ts +42 -528
- package/src/create-client.ts +35 -19
- package/src/index.ts +1 -14
- package/src/mutator/custom-fetch.ts +20 -6
package/dist/zod-index.js
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
17
|
// Re-export generated Zod validation schemas (tags-split)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
__exportStar(require("./zod/admin/admin"), exports);
|
|
19
|
+
__exportStar(require("./zod/comment/comment"), exports);
|
|
20
|
+
__exportStar(require("./zod/community/community"), exports);
|
|
21
|
+
__exportStar(require("./zod/feed/feed"), exports);
|
|
22
|
+
__exportStar(require("./zod/misc/misc"), exports);
|
|
23
|
+
__exportStar(require("./zod/post/post"), exports);
|
|
24
|
+
__exportStar(require("./zod/private-message/private-message"), exports);
|
|
25
|
+
__exportStar(require("./zod/site/site"), exports);
|
|
26
|
+
__exportStar(require("./zod/topic/topic"), exports);
|
|
27
|
+
__exportStar(require("./zod/upload/upload"), exports);
|
|
28
|
+
__exportStar(require("./zod/user/user"), exports);
|
|
13
29
|
//# sourceMappingURL=zod-index.js.map
|
package/dist/zod-index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-index.js","sourceRoot":"","sources":["../src/zod-index.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,
|
|
1
|
+
{"version":3,"file":"zod-index.js","sourceRoot":"","sources":["../src/zod-index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAA0D;AAC1D,oDAAkC;AAClC,wDAAsC;AACtC,4DAA0C;AAC1C,kDAAgC;AAChC,kDAAgC;AAChC,kDAAgC;AAChC,wEAAsD;AACtD,kDAAgC;AAChC,oDAAkC;AAClC,sDAAoC;AACpC,kDAAgC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blorp-labs/piefed-api-client",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-90bfbe5",
|
|
4
4
|
"description": "Typed TypeScript client for the PieFed API, generated from the OpenAPI spec",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"packageManager": "pnpm@10.6.5",
|
|
7
6
|
"main": "./dist/index.js",
|
|
8
7
|
"types": "./dist/index.d.ts",
|
|
@@ -23,14 +22,18 @@
|
|
|
23
22
|
"scripts": {
|
|
24
23
|
"generate": "orval --config orval.config.ts",
|
|
25
24
|
"build": "tsc",
|
|
26
|
-
"prepublishOnly": "pnpm build"
|
|
25
|
+
"prepublishOnly": "pnpm build",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"prepare": "husky"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"zod": "^3.23.8"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
33
|
+
"husky": "^9.1.7",
|
|
32
34
|
"orval": "^7.3.0",
|
|
33
|
-
"typescript": "^5.7.3"
|
|
35
|
+
"typescript": "^5.7.3",
|
|
36
|
+
"vitest": "^2.0.0"
|
|
34
37
|
},
|
|
35
38
|
"repository": {
|
|
36
39
|
"type": "git",
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
|
2
|
+
import { createClient } from '../create-client';
|
|
3
|
+
import { ApiError } from '../mutator/custom-fetch';
|
|
4
|
+
|
|
5
|
+
const BASE_URL = 'https://test.example.com';
|
|
6
|
+
|
|
7
|
+
function makeResponse(body: unknown, status = 200) {
|
|
8
|
+
return new Response(JSON.stringify(body), {
|
|
9
|
+
status,
|
|
10
|
+
headers: { 'Content-Type': 'application/json' },
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let fetchSpy: ReturnType<typeof vi.fn>;
|
|
15
|
+
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
fetchSpy = vi.fn().mockImplementation(() => Promise.resolve(makeResponse({ ok: true })));
|
|
18
|
+
vi.stubGlobal('fetch', fetchSpy);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
afterEach(() => vi.unstubAllGlobals());
|
|
22
|
+
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
// Helpers
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
function lastCall() {
|
|
28
|
+
return fetchSpy.mock.calls[fetchSpy.mock.calls.length - 1] as [string, RequestInit];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function lastUrl() {
|
|
32
|
+
return lastCall()[0];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function lastOptions() {
|
|
36
|
+
return lastCall()[1];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function lastHeaders(): Record<string, string> {
|
|
40
|
+
return (lastOptions().headers ?? {}) as Record<string, string>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// GET no-params (fn.length = 1): getApiAlphaSite(options?)
|
|
45
|
+
// ---------------------------------------------------------------------------
|
|
46
|
+
|
|
47
|
+
describe('getApiAlphaSite — GET, no params', () => {
|
|
48
|
+
it('forwards default headers', async () => {
|
|
49
|
+
const client = createClient(BASE_URL, {
|
|
50
|
+
headers: { Authorization: 'Bearer tok' },
|
|
51
|
+
});
|
|
52
|
+
await client.getApiAlphaSite();
|
|
53
|
+
expect(lastHeaders()['Authorization']).toBe('Bearer tok');
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
it('merges per-call headers on top of defaults (per-call wins)', async () => {
|
|
57
|
+
const client = createClient(BASE_URL, {
|
|
58
|
+
headers: { Authorization: 'Bearer default', 'X-Custom': 'base' },
|
|
59
|
+
});
|
|
60
|
+
await client.getApiAlphaSite({ headers: { Authorization: 'Bearer override' } });
|
|
61
|
+
expect(lastHeaders()['Authorization']).toBe('Bearer override');
|
|
62
|
+
expect(lastHeaders()['X-Custom']).toBe('base');
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('forwards default RequestInit options (e.g. cache)', async () => {
|
|
66
|
+
const client = createClient(BASE_URL, { cache: 'no-store' });
|
|
67
|
+
await client.getApiAlphaSite();
|
|
68
|
+
expect(lastOptions().cache).toBe('no-store');
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('per-call RequestInit options override defaults', async () => {
|
|
72
|
+
const client = createClient(BASE_URL, { cache: 'no-store' });
|
|
73
|
+
await client.getApiAlphaSite({ cache: 'force-cache' });
|
|
74
|
+
expect(lastOptions().cache).toBe('force-cache');
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('prepends baseUrl to the path', async () => {
|
|
78
|
+
const client = createClient(BASE_URL);
|
|
79
|
+
await client.getApiAlphaSite();
|
|
80
|
+
expect(lastUrl()).toBe(`${BASE_URL}/api/alpha/site`);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
// GET optional-params (fn.length = 2): getApiAlphaPostList(params?, options?)
|
|
86
|
+
// ---------------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
describe('getApiAlphaPostList — GET, optional params', () => {
|
|
89
|
+
it('forwards default headers when params are provided', async () => {
|
|
90
|
+
const client = createClient(BASE_URL, {
|
|
91
|
+
headers: { Authorization: 'Bearer tok' },
|
|
92
|
+
});
|
|
93
|
+
await client.getApiAlphaPostList({ page: 1 });
|
|
94
|
+
expect(lastHeaders()['Authorization']).toBe('Bearer tok');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('forwards default headers when params are omitted', async () => {
|
|
98
|
+
const client = createClient(BASE_URL, {
|
|
99
|
+
headers: { Authorization: 'Bearer tok' },
|
|
100
|
+
});
|
|
101
|
+
await client.getApiAlphaPostList();
|
|
102
|
+
expect(lastHeaders()['Authorization']).toBe('Bearer tok');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('merges per-call headers (options as second arg)', async () => {
|
|
106
|
+
const client = createClient(BASE_URL, {
|
|
107
|
+
headers: { Authorization: 'Bearer default' },
|
|
108
|
+
});
|
|
109
|
+
await client.getApiAlphaPostList(
|
|
110
|
+
{ page: 1 },
|
|
111
|
+
{ headers: { Authorization: 'Bearer override' } },
|
|
112
|
+
);
|
|
113
|
+
expect(lastHeaders()['Authorization']).toBe('Bearer override');
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it('constructs correct URL with query params', async () => {
|
|
117
|
+
const client = createClient(BASE_URL);
|
|
118
|
+
await client.getApiAlphaPostList({ page: 2 });
|
|
119
|
+
expect(lastUrl()).toContain(`${BASE_URL}/api/alpha/post/list`);
|
|
120
|
+
expect(lastUrl()).toContain('page=2');
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// ---------------------------------------------------------------------------
|
|
125
|
+
// GET required-params (fn.length = 2): getApiAlphaPost(params, options?)
|
|
126
|
+
// ---------------------------------------------------------------------------
|
|
127
|
+
|
|
128
|
+
describe('getApiAlphaPost — GET, required params', () => {
|
|
129
|
+
const params = { id: 42 };
|
|
130
|
+
|
|
131
|
+
it('forwards default headers', async () => {
|
|
132
|
+
const client = createClient(BASE_URL, {
|
|
133
|
+
headers: { Authorization: 'Bearer tok' },
|
|
134
|
+
});
|
|
135
|
+
await client.getApiAlphaPost(params);
|
|
136
|
+
expect(lastHeaders()['Authorization']).toBe('Bearer tok');
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('merges per-call headers', async () => {
|
|
140
|
+
const client = createClient(BASE_URL, {
|
|
141
|
+
headers: { Authorization: 'Bearer default' },
|
|
142
|
+
});
|
|
143
|
+
await client.getApiAlphaPost(params, { headers: { Authorization: 'Bearer override' } });
|
|
144
|
+
expect(lastHeaders()['Authorization']).toBe('Bearer override');
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it('forwards default cache option', async () => {
|
|
148
|
+
const client = createClient(BASE_URL, { cache: 'no-store' });
|
|
149
|
+
await client.getApiAlphaPost(params);
|
|
150
|
+
expect(lastOptions().cache).toBe('no-store');
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// ---------------------------------------------------------------------------
|
|
155
|
+
// POST required-body (fn.length = 2): postApiAlphaSiteBlock(body, options?)
|
|
156
|
+
// ---------------------------------------------------------------------------
|
|
157
|
+
|
|
158
|
+
describe('postApiAlphaSiteBlock — POST, required body', () => {
|
|
159
|
+
const body = { instance: 'spam.example.com', block: true };
|
|
160
|
+
|
|
161
|
+
it('sends the body correctly (not corrupted)', async () => {
|
|
162
|
+
const client = createClient(BASE_URL);
|
|
163
|
+
await client.postApiAlphaSiteBlock(body);
|
|
164
|
+
expect(lastOptions().body).toBe(JSON.stringify(body));
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
it('forwards default headers alongside Content-Type', async () => {
|
|
168
|
+
const client = createClient(BASE_URL, {
|
|
169
|
+
headers: { Authorization: 'Bearer tok' },
|
|
170
|
+
});
|
|
171
|
+
await client.postApiAlphaSiteBlock(body);
|
|
172
|
+
expect(lastHeaders()['Authorization']).toBe('Bearer tok');
|
|
173
|
+
expect(lastHeaders()['Content-Type']).toBe('application/json');
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
it('merges per-call headers without losing body', async () => {
|
|
177
|
+
const client = createClient(BASE_URL, {
|
|
178
|
+
headers: { Authorization: 'Bearer default' },
|
|
179
|
+
});
|
|
180
|
+
await client.postApiAlphaSiteBlock(body, {
|
|
181
|
+
headers: { Authorization: 'Bearer override' },
|
|
182
|
+
});
|
|
183
|
+
expect(lastHeaders()['Authorization']).toBe('Bearer override');
|
|
184
|
+
expect(lastOptions().body).toBe(JSON.stringify(body));
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
it('uses POST method', async () => {
|
|
188
|
+
const client = createClient(BASE_URL);
|
|
189
|
+
await client.postApiAlphaSiteBlock(body);
|
|
190
|
+
expect(lastOptions().method).toBe('POST');
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
// ---------------------------------------------------------------------------
|
|
195
|
+
// Error handling
|
|
196
|
+
// ---------------------------------------------------------------------------
|
|
197
|
+
|
|
198
|
+
describe('ApiError', () => {
|
|
199
|
+
it('throws ApiError with correct status and data on 4xx', async () => {
|
|
200
|
+
fetchSpy.mockImplementation(() => Promise.resolve(makeResponse({ error: 'not found' }, 404)));
|
|
201
|
+
const client = createClient(BASE_URL);
|
|
202
|
+
|
|
203
|
+
await expect(client.getApiAlphaSite()).rejects.toMatchObject({
|
|
204
|
+
name: 'ApiError',
|
|
205
|
+
status: 404,
|
|
206
|
+
data: { error: 'not found' },
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
it('throws ApiError on 5xx', async () => {
|
|
211
|
+
fetchSpy.mockImplementation(() => Promise.resolve(makeResponse({ error: 'server error' }, 500)));
|
|
212
|
+
const client = createClient(BASE_URL);
|
|
213
|
+
|
|
214
|
+
const err = await client.getApiAlphaSite().catch((e) => e);
|
|
215
|
+
expect(err).toBeInstanceOf(ApiError);
|
|
216
|
+
expect(err.status).toBe(500);
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
it('throws ApiError (not SyntaxError) when response body is non-JSON', async () => {
|
|
220
|
+
fetchSpy.mockImplementation(() =>
|
|
221
|
+
Promise.resolve(new Response('<html>Gateway Timeout</html>', { status: 504 })),
|
|
222
|
+
);
|
|
223
|
+
const client = createClient(BASE_URL);
|
|
224
|
+
|
|
225
|
+
const err = await client.getApiAlphaSite().catch((e) => e);
|
|
226
|
+
expect(err).toBeInstanceOf(ApiError);
|
|
227
|
+
expect(err.status).toBe(504);
|
|
228
|
+
expect(err.data).toBe('<html>Gateway Timeout</html>');
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
it('returns parsed JSON on success', async () => {
|
|
232
|
+
fetchSpy.mockImplementation(() =>
|
|
233
|
+
Promise.resolve(new Response('not json', { status: 200 })),
|
|
234
|
+
);
|
|
235
|
+
const client = createClient(BASE_URL);
|
|
236
|
+
|
|
237
|
+
const result = await client.getApiAlphaSite();
|
|
238
|
+
expect(result).toBe('not json');
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
// ---------------------------------------------------------------------------
|
|
243
|
+
// No-body responses (204 / 205 / 304)
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
245
|
+
|
|
246
|
+
describe('no-body responses', () => {
|
|
247
|
+
// customFetch returns {} for no-body statuses regardless of the expected return type.
|
|
248
|
+
// This is a known type hole: TypeScript promises GetSiteResponse but {} is returned at runtime.
|
|
249
|
+
// Endpoints that legitimately return 204 (some POSTs/DELETEs) are fine; for GET endpoints
|
|
250
|
+
// this would indicate a server bug that currently passes through silently.
|
|
251
|
+
it.each([204, 205])('status %i resolves to empty object', async (status) => {
|
|
252
|
+
fetchSpy.mockImplementation(() => Promise.resolve(new Response(null, { status })));
|
|
253
|
+
const client = createClient(BASE_URL);
|
|
254
|
+
const result = await client.getApiAlphaSite();
|
|
255
|
+
expect(result).toEqual({});
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
it('status 304 throws ApiError with empty data (not a body-read error)', async () => {
|
|
259
|
+
fetchSpy.mockImplementation(() => Promise.resolve(new Response(null, { status: 304 })));
|
|
260
|
+
const client = createClient(BASE_URL);
|
|
261
|
+
const err = await client.getApiAlphaSite().catch((e) => e);
|
|
262
|
+
expect(err).toBeInstanceOf(ApiError);
|
|
263
|
+
expect(err.status).toBe(304);
|
|
264
|
+
expect(err.data).toEqual({});
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
// ---------------------------------------------------------------------------
|
|
269
|
+
// AbortController
|
|
270
|
+
// ---------------------------------------------------------------------------
|
|
271
|
+
|
|
272
|
+
describe('AbortController', () => {
|
|
273
|
+
it('forwards signal to fetch', async () => {
|
|
274
|
+
const controller = new AbortController();
|
|
275
|
+
const client = createClient(BASE_URL);
|
|
276
|
+
await client.getApiAlphaSite({ signal: controller.signal });
|
|
277
|
+
expect(lastOptions().signal).toBe(controller.signal);
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
it('propagates abort error when signal is already aborted', async () => {
|
|
281
|
+
const controller = new AbortController();
|
|
282
|
+
controller.abort();
|
|
283
|
+
fetchSpy.mockImplementation((_url: string, opts: RequestInit) => {
|
|
284
|
+
if (opts.signal?.aborted) return Promise.reject(new DOMException('Aborted', 'AbortError'));
|
|
285
|
+
return Promise.resolve(makeResponse({ ok: true }));
|
|
286
|
+
});
|
|
287
|
+
const client = createClient(BASE_URL);
|
|
288
|
+
const err = await client.getApiAlphaSite({ signal: controller.signal }).catch((e) => e);
|
|
289
|
+
expect(err.name).toBe('AbortError');
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
// ---------------------------------------------------------------------------
|
|
294
|
+
// baseUrl
|
|
295
|
+
// ---------------------------------------------------------------------------
|
|
296
|
+
|
|
297
|
+
describe('baseUrl construction', () => {
|
|
298
|
+
it('trims trailing slash from baseUrl', async () => {
|
|
299
|
+
const client = createClient('https://test.example.com/');
|
|
300
|
+
await client.getApiAlphaSite();
|
|
301
|
+
expect(lastUrl()).toBe('https://test.example.com/api/alpha/site');
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
it('different clients use their own baseUrl', async () => {
|
|
305
|
+
const a = createClient('https://instance-a.com');
|
|
306
|
+
const b = createClient('https://instance-b.com');
|
|
307
|
+
|
|
308
|
+
await a.getApiAlphaSite();
|
|
309
|
+
const urlA = lastUrl();
|
|
310
|
+
|
|
311
|
+
await b.getApiAlphaSite();
|
|
312
|
+
const urlB = lastUrl();
|
|
313
|
+
|
|
314
|
+
expect(urlA).toBe('https://instance-a.com/api/alpha/site');
|
|
315
|
+
expect(urlB).toBe('https://instance-b.com/api/alpha/site');
|
|
316
|
+
});
|
|
317
|
+
});
|
|
@@ -5,11 +5,9 @@
|
|
|
5
5
|
* OpenAPI spec version: alpha 1.6
|
|
6
6
|
*/
|
|
7
7
|
import type {
|
|
8
|
-
DefaultError,
|
|
9
8
|
GetApiAlphaAdminRegistrationApplicationListParams,
|
|
10
9
|
GetRegistrationListResponse,
|
|
11
|
-
RegistrationApproveRequest
|
|
12
|
-
UnprocessableEntityResponse
|
|
10
|
+
RegistrationApproveRequest
|
|
13
11
|
} from '../../schemas';
|
|
14
12
|
|
|
15
13
|
import { customFetch } from '../../mutator/custom-fetch';
|
|
@@ -17,30 +15,6 @@ import { customFetch } from '../../mutator/custom-fetch';
|
|
|
17
15
|
/**
|
|
18
16
|
* @summary Get the list of applications ready for admin review
|
|
19
17
|
*/
|
|
20
|
-
export type getApiAlphaAdminRegistrationApplicationListResponse200 = {
|
|
21
|
-
data: GetRegistrationListResponse
|
|
22
|
-
status: 200
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type getApiAlphaAdminRegistrationApplicationListResponse400 = {
|
|
26
|
-
data: DefaultError
|
|
27
|
-
status: 400
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type getApiAlphaAdminRegistrationApplicationListResponse422 = {
|
|
31
|
-
data: UnprocessableEntityResponse
|
|
32
|
-
status: 422
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type getApiAlphaAdminRegistrationApplicationListResponseSuccess = (getApiAlphaAdminRegistrationApplicationListResponse200) & {
|
|
36
|
-
headers: Headers;
|
|
37
|
-
};
|
|
38
|
-
export type getApiAlphaAdminRegistrationApplicationListResponseError = (getApiAlphaAdminRegistrationApplicationListResponse400 | getApiAlphaAdminRegistrationApplicationListResponse422) & {
|
|
39
|
-
headers: Headers;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export type getApiAlphaAdminRegistrationApplicationListResponse = (getApiAlphaAdminRegistrationApplicationListResponseSuccess | getApiAlphaAdminRegistrationApplicationListResponseError)
|
|
43
|
-
|
|
44
18
|
export const getGetApiAlphaAdminRegistrationApplicationListUrl = (params?: GetApiAlphaAdminRegistrationApplicationListParams,) => {
|
|
45
19
|
const normalizedParams = new URLSearchParams();
|
|
46
20
|
|
|
@@ -56,9 +30,9 @@ export const getGetApiAlphaAdminRegistrationApplicationListUrl = (params?: GetAp
|
|
|
56
30
|
return stringifiedParams.length > 0 ? `/api/alpha/admin/registration_application/list?${stringifiedParams}` : `/api/alpha/admin/registration_application/list`
|
|
57
31
|
}
|
|
58
32
|
|
|
59
|
-
export const getApiAlphaAdminRegistrationApplicationList = async (params?: GetApiAlphaAdminRegistrationApplicationListParams, options?: RequestInit): Promise<
|
|
33
|
+
export const getApiAlphaAdminRegistrationApplicationList = async (params?: GetApiAlphaAdminRegistrationApplicationListParams, options?: RequestInit): Promise<GetRegistrationListResponse> => {
|
|
60
34
|
|
|
61
|
-
return customFetch<
|
|
35
|
+
return customFetch<GetRegistrationListResponse>(getGetApiAlphaAdminRegistrationApplicationListUrl(params),
|
|
62
36
|
{
|
|
63
37
|
...options,
|
|
64
38
|
method: 'GET'
|
|
@@ -71,30 +45,6 @@ export const getApiAlphaAdminRegistrationApplicationList = async (params?: GetAp
|
|
|
71
45
|
/**
|
|
72
46
|
* @summary Approve or deny a registration
|
|
73
47
|
*/
|
|
74
|
-
export type putApiAlphaAdminRegistrationApplicationApproveResponse200 = {
|
|
75
|
-
data: void
|
|
76
|
-
status: 200
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export type putApiAlphaAdminRegistrationApplicationApproveResponse400 = {
|
|
80
|
-
data: DefaultError
|
|
81
|
-
status: 400
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export type putApiAlphaAdminRegistrationApplicationApproveResponse422 = {
|
|
85
|
-
data: UnprocessableEntityResponse
|
|
86
|
-
status: 422
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export type putApiAlphaAdminRegistrationApplicationApproveResponseSuccess = (putApiAlphaAdminRegistrationApplicationApproveResponse200) & {
|
|
90
|
-
headers: Headers;
|
|
91
|
-
};
|
|
92
|
-
export type putApiAlphaAdminRegistrationApplicationApproveResponseError = (putApiAlphaAdminRegistrationApplicationApproveResponse400 | putApiAlphaAdminRegistrationApplicationApproveResponse422) & {
|
|
93
|
-
headers: Headers;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export type putApiAlphaAdminRegistrationApplicationApproveResponse = (putApiAlphaAdminRegistrationApplicationApproveResponseSuccess | putApiAlphaAdminRegistrationApplicationApproveResponseError)
|
|
97
|
-
|
|
98
48
|
export const getPutApiAlphaAdminRegistrationApplicationApproveUrl = () => {
|
|
99
49
|
|
|
100
50
|
|
|
@@ -103,9 +53,9 @@ export const getPutApiAlphaAdminRegistrationApplicationApproveUrl = () => {
|
|
|
103
53
|
return `/api/alpha/admin/registration_application/approve`
|
|
104
54
|
}
|
|
105
55
|
|
|
106
|
-
export const putApiAlphaAdminRegistrationApplicationApprove = async (registrationApproveRequest: RegistrationApproveRequest, options?: RequestInit): Promise<
|
|
56
|
+
export const putApiAlphaAdminRegistrationApplicationApprove = async (registrationApproveRequest: RegistrationApproveRequest, options?: RequestInit): Promise<void> => {
|
|
107
57
|
|
|
108
|
-
return customFetch<
|
|
58
|
+
return customFetch<void>(getPutApiAlphaAdminRegistrationApplicationApproveUrl(),
|
|
109
59
|
{
|
|
110
60
|
...options,
|
|
111
61
|
method: 'PUT',
|