@atproto/api 0.2.11 → 0.3.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/README.md +2 -2
- package/dist/client/index.d.ts +77 -0
- package/dist/client/lexicons.d.ts +480 -0
- package/dist/client/types/app/bsky/actor/defs.d.ts +2 -0
- package/dist/client/types/app/bsky/actor/searchActor.d.ts +22 -0
- package/dist/client/types/app/bsky/actor/searchActorTypeahead.d.ts +20 -0
- package/dist/client/types/app/bsky/actor/updateProfile.d.ts +10 -3
- package/dist/client/types/app/bsky/feed/bookmarkFeed.d.ts +17 -0
- package/dist/client/types/app/bsky/feed/generator.d.ts +13 -0
- package/dist/client/types/app/bsky/feed/getActorFeeds.d.ts +22 -0
- package/dist/client/types/app/bsky/feed/getBookmarkedFeeds.d.ts +21 -0
- package/dist/client/types/app/bsky/feed/getFeed.d.ts +22 -0
- package/dist/client/types/app/bsky/feed/getFeedSkeleton.d.ts +22 -0
- package/dist/client/types/app/bsky/feed/unbookmarkFeed.d.ts +17 -0
- package/dist/client/types/app/bsky/graph/defs.d.ts +42 -0
- package/dist/client/types/app/bsky/graph/getList.d.ts +23 -0
- package/dist/client/types/app/bsky/graph/getListMutes.d.ts +21 -0
- package/dist/client/types/app/bsky/graph/getLists.d.ts +22 -0
- package/dist/client/types/app/bsky/graph/list.d.ts +14 -0
- package/dist/client/types/app/bsky/graph/listitem.d.ts +9 -0
- package/dist/client/types/app/bsky/graph/muteActorList.d.ts +17 -0
- package/dist/client/types/app/bsky/graph/unmuteActorList.d.ts +17 -0
- package/dist/client/types/app/bsky/unspecced/getPopular.d.ts +1 -0
- package/dist/client/types/com/atproto/admin/defs.d.ts +4 -1
- package/dist/client/types/com/atproto/admin/disableAccountInvites.d.ts +17 -0
- package/dist/client/types/com/atproto/admin/enableAccountInvites.d.ts +17 -0
- package/dist/client/types/com/atproto/admin/getInviteCodeUsage.d.ts +29 -0
- package/dist/client/types/com/atproto/repo/importRepo.d.ts +19 -0
- package/dist/client/types/com/atproto/repo/rebaseRepo.d.ts +21 -0
- package/dist/client/types/com/atproto/repo/uploadRepo.d.ts +19 -0
- package/dist/client/types/com/atproto/server/getUserInviteCodes.d.ts +31 -0
- package/dist/index.js +1997 -561
- package/dist/index.js.map +4 -4
- package/dist/src/client/index.d.ts +462 -0
- package/dist/src/client/lexicons.d.ts +2910 -0
- package/dist/src/client/schemas.d.ts +17 -0
- package/dist/src/client/types/app/bsky/actor/createScene.d.ts +32 -0
- package/dist/src/client/types/app/bsky/actor/getProfile.d.ts +36 -0
- package/dist/src/client/types/app/bsky/actor/getSuggestions.d.ts +36 -0
- package/dist/src/client/types/app/bsky/actor/profile.d.ts +15 -0
- package/dist/src/client/types/app/bsky/actor/ref.d.ts +14 -0
- package/dist/src/client/types/app/bsky/actor/search.d.ts +32 -0
- package/dist/src/client/types/app/bsky/actor/searchTypeahead.d.ts +28 -0
- package/dist/src/client/types/app/bsky/actor/updateProfile.d.ts +48 -0
- package/dist/src/client/types/app/bsky/badge.d.ts +22 -0
- package/dist/src/client/types/app/bsky/badgeAccept.d.ts +11 -0
- package/dist/src/client/types/app/bsky/badgeOffer.d.ts +11 -0
- package/dist/src/client/types/app/bsky/declaration.d.ts +6 -0
- package/dist/src/client/types/app/bsky/embed/external.d.ts +26 -0
- package/dist/src/client/types/app/bsky/embed/images.d.ts +23 -0
- package/dist/src/client/types/app/bsky/feed/embed.d.ts +36 -0
- package/dist/src/client/types/app/bsky/feed/feedViewPost.d.ts +26 -0
- package/dist/src/client/types/app/bsky/feed/getAuthorFeed.d.ts +22 -0
- package/dist/src/client/types/app/bsky/feed/getPostThread.d.ts +43 -0
- package/dist/src/client/types/app/bsky/feed/getRepostedBy.d.ts +35 -0
- package/dist/src/client/types/app/bsky/feed/getTimeline.d.ts +22 -0
- package/dist/src/client/types/app/bsky/feed/getVotes.d.ts +33 -0
- package/dist/src/client/types/app/bsky/feed/mediaEmbed.d.ts +18 -0
- package/dist/src/client/types/app/bsky/feed/post.d.ts +54 -0
- package/dist/src/client/types/app/bsky/feed/repost.d.ts +6 -0
- package/dist/src/client/types/app/bsky/feed/setVote.d.ts +25 -0
- package/dist/src/client/types/app/bsky/feed/trend.d.ts +6 -0
- package/dist/src/client/types/app/bsky/feed/vote.d.ts +7 -0
- package/dist/src/client/types/app/bsky/follow.d.ts +9 -0
- package/dist/src/client/types/app/bsky/getAuthorFeed.d.ts +56 -0
- package/dist/src/client/types/app/bsky/getBadgeMembers.d.ts +29 -0
- package/dist/src/client/types/app/bsky/getHomeFeed.d.ts +56 -0
- package/dist/src/client/types/app/bsky/getLikedBy.d.ts +29 -0
- package/dist/src/client/types/app/bsky/getNotificationCount.d.ts +16 -0
- package/dist/src/client/types/app/bsky/getNotifications.d.ts +33 -0
- package/dist/src/client/types/app/bsky/getPostThread.d.ts +55 -0
- package/dist/src/client/types/app/bsky/getProfile.d.ts +26 -0
- package/dist/src/client/types/app/bsky/getRepostedBy.d.ts +29 -0
- package/dist/src/client/types/app/bsky/getTimeline.d.ts +56 -0
- package/dist/src/client/types/app/bsky/getUserFollowers.d.ts +31 -0
- package/dist/src/client/types/app/bsky/getUserFollows.d.ts +31 -0
- package/dist/src/client/types/app/bsky/getUsersSearch.d.ts +26 -0
- package/dist/src/client/types/app/bsky/getUsersTypeahead.d.ts +22 -0
- package/dist/src/client/types/app/bsky/graph/assertCreator.d.ts +1 -0
- package/dist/src/client/types/app/bsky/graph/assertMember.d.ts +1 -0
- package/dist/src/client/types/app/bsky/graph/assertion.d.ts +7 -0
- package/dist/src/client/types/app/bsky/graph/confirmation.d.ts +8 -0
- package/dist/src/client/types/app/bsky/graph/follow.d.ts +6 -0
- package/dist/src/client/types/app/bsky/graph/getAssertions.d.ts +43 -0
- package/dist/src/client/types/app/bsky/graph/getFollowers.d.ts +34 -0
- package/dist/src/client/types/app/bsky/graph/getFollows.d.ts +33 -0
- package/dist/src/client/types/app/bsky/graph/getMembers.d.ts +33 -0
- package/dist/src/client/types/app/bsky/graph/getMemberships.d.ts +33 -0
- package/dist/src/client/types/app/bsky/invite.d.ts +10 -0
- package/dist/src/client/types/app/bsky/inviteAccept.d.ts +14 -0
- package/dist/src/client/types/app/bsky/like.d.ts +10 -0
- package/dist/src/client/types/app/bsky/mediaEmbed.d.ts +15 -0
- package/dist/src/client/types/app/bsky/notification/getCount.d.ts +17 -0
- package/dist/src/client/types/app/bsky/notification/list.d.ts +32 -0
- package/dist/src/client/types/app/bsky/notification/updateSeen.d.ts +17 -0
- package/dist/src/client/types/app/bsky/post.d.ts +23 -0
- package/dist/src/client/types/app/bsky/postNotificationsSeen.d.ts +20 -0
- package/dist/src/client/types/app/bsky/profile.d.ts +5 -0
- package/dist/src/client/types/app/bsky/repost.d.ts +10 -0
- package/dist/src/client/types/app/bsky/system/actorScene.d.ts +1 -0
- package/dist/src/client/types/app/bsky/system/actorUser.d.ts +1 -0
- package/dist/src/client/types/app/bsky/system/declRef.d.ts +5 -0
- package/dist/src/client/types/app/bsky/system/declaration.d.ts +4 -0
- package/dist/src/client/types/app/bsky/updateProfile.d.ts +23 -0
- package/dist/src/client/types/com/atproto/account/create.d.ts +41 -0
- package/dist/src/client/types/com/atproto/account/createInviteCode.d.ts +22 -0
- package/dist/src/client/types/com/atproto/account/delete.d.ts +13 -0
- package/dist/src/client/types/com/atproto/account/get.d.ts +12 -0
- package/dist/src/client/types/com/atproto/account/requestPasswordReset.d.ts +17 -0
- package/dist/src/client/types/com/atproto/account/resetPassword.d.ts +24 -0
- package/dist/src/client/types/com/atproto/blob/upload.d.ts +19 -0
- package/dist/src/client/types/com/atproto/createAccount.d.ts +40 -0
- package/dist/src/client/types/com/atproto/createInviteCode.d.ts +20 -0
- package/dist/src/client/types/com/atproto/createSession.d.ts +24 -0
- package/dist/src/client/types/com/atproto/data/uploadFile.d.ts +19 -0
- package/dist/src/client/types/com/atproto/deleteAccount.d.ts +20 -0
- package/dist/src/client/types/com/atproto/deleteSession.d.ts +17 -0
- package/dist/src/client/types/com/atproto/getAccount.d.ts +16 -0
- package/dist/src/client/types/com/atproto/getAccountsConfig.d.ts +17 -0
- package/dist/src/client/types/com/atproto/getSession.d.ts +17 -0
- package/dist/src/client/types/com/atproto/handle/resolve.d.ts +18 -0
- package/dist/src/client/types/com/atproto/refreshSession.d.ts +20 -0
- package/dist/src/client/types/com/atproto/repo/batchWrite.d.ts +39 -0
- package/dist/src/client/types/com/atproto/repo/createRecord.d.ts +26 -0
- package/dist/src/client/types/com/atproto/repo/deleteRecord.d.ts +19 -0
- package/dist/src/client/types/com/atproto/repo/describe.d.ts +22 -0
- package/dist/src/client/types/com/atproto/repo/getRecord.d.ts +23 -0
- package/dist/src/client/types/com/atproto/repo/listRecords.d.ts +30 -0
- package/dist/src/client/types/com/atproto/repo/putRecord.d.ts +27 -0
- package/dist/src/client/types/com/atproto/repo/strongRef.d.ts +5 -0
- package/dist/src/client/types/com/atproto/repoBatchWrite.d.ts +36 -0
- package/dist/src/client/types/com/atproto/repoCreateRecord.d.ts +24 -0
- package/dist/src/client/types/com/atproto/repoDeleteRecord.d.ts +18 -0
- package/dist/src/client/types/com/atproto/repoDescribe.d.ts +21 -0
- package/dist/src/client/types/com/atproto/repoGetRecord.d.ts +22 -0
- package/dist/src/client/types/com/atproto/repoListRecords.d.ts +27 -0
- package/dist/src/client/types/com/atproto/repoPutRecord.d.ts +25 -0
- package/dist/src/client/types/com/atproto/requestAccountPasswordReset.d.ts +19 -0
- package/dist/src/client/types/com/atproto/resetAccountPassword.d.ts +26 -0
- package/dist/src/client/types/com/atproto/resolveHandle.d.ts +17 -0
- package/dist/src/client/types/com/atproto/resolveName.d.ts +17 -0
- package/dist/src/client/types/com/atproto/server/getAccountsConfig.d.ts +24 -0
- package/dist/src/client/types/com/atproto/session/create.d.ts +26 -0
- package/dist/src/client/types/com/atproto/session/delete.d.ts +13 -0
- package/dist/src/client/types/com/atproto/session/get.d.ts +18 -0
- package/dist/src/client/types/com/atproto/session/refresh.d.ts +21 -0
- package/dist/src/client/types/com/atproto/sync/getRepo.d.ts +15 -0
- package/dist/src/client/types/com/atproto/sync/getRoot.d.ts +18 -0
- package/dist/src/client/types/com/atproto/sync/updateRepo.d.ts +15 -0
- package/dist/src/client/types/com/atproto/syncGetRepo.d.ts +15 -0
- package/dist/src/client/types/com/atproto/syncGetRoot.d.ts +17 -0
- package/dist/src/client/types/com/atproto/syncUpdateRepo.d.ts +15 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/schemas.d.ts +19 -0
- package/dist/src/session.d.ts +42 -0
- package/dist/src/types/app/bsky/acceptedBadge.d.ts +10 -0
- package/dist/src/types/app/bsky/badge.d.ts +22 -0
- package/dist/src/types/app/bsky/badgeAccept.d.ts +11 -0
- package/dist/src/types/app/bsky/badgeOffer.d.ts +11 -0
- package/dist/src/types/app/bsky/declaration.d.ts +6 -0
- package/dist/src/types/app/bsky/follow.d.ts +9 -0
- package/dist/src/types/app/bsky/getAuthorFeed.d.ts +56 -0
- package/dist/src/types/app/bsky/getBadgeMembers.d.ts +29 -0
- package/dist/src/types/app/bsky/getHomeFeed.d.ts +56 -0
- package/dist/src/types/app/bsky/getLikedBy.d.ts +29 -0
- package/dist/src/types/app/bsky/getNotificationCount.d.ts +16 -0
- package/dist/src/types/app/bsky/getNotifications.d.ts +33 -0
- package/dist/src/types/app/bsky/getPostThread.d.ts +55 -0
- package/dist/src/types/app/bsky/getProfile.d.ts +42 -0
- package/dist/src/types/app/bsky/getRepostedBy.d.ts +29 -0
- package/dist/src/types/app/bsky/getUserFollowers.d.ts +31 -0
- package/dist/src/types/app/bsky/getUserFollows.d.ts +31 -0
- package/dist/src/types/app/bsky/getUsersSearch.d.ts +26 -0
- package/dist/src/types/app/bsky/getUsersTypeahead.d.ts +22 -0
- package/dist/src/types/app/bsky/invite.d.ts +10 -0
- package/dist/src/types/app/bsky/inviteAccept.d.ts +14 -0
- package/dist/src/types/app/bsky/like.d.ts +10 -0
- package/dist/src/types/app/bsky/mediaEmbed.d.ts +15 -0
- package/dist/src/types/app/bsky/post.d.ts +23 -0
- package/dist/src/types/app/bsky/postNotificationsSeen.d.ts +19 -0
- package/dist/src/types/app/bsky/profile.d.ts +11 -0
- package/dist/src/types/app/bsky/repost.d.ts +10 -0
- package/dist/src/types/app/bsky/updateProfile.d.ts +27 -0
- package/dist/src/types/com/atproto/createAccount.d.ts +39 -0
- package/dist/src/types/com/atproto/createInviteCode.d.ts +19 -0
- package/dist/src/types/com/atproto/createSession.d.ts +23 -0
- package/dist/src/types/com/atproto/deleteAccount.d.ts +19 -0
- package/dist/src/types/com/atproto/deleteSession.d.ts +16 -0
- package/dist/src/types/com/atproto/getAccount.d.ts +19 -0
- package/dist/src/types/com/atproto/getAccountsConfig.d.ts +17 -0
- package/dist/src/types/com/atproto/getSession.d.ts +17 -0
- package/dist/src/types/com/atproto/refreshSession.d.ts +19 -0
- package/dist/src/types/com/atproto/repoBatchWrite.d.ts +35 -0
- package/dist/src/types/com/atproto/repoCreateRecord.d.ts +23 -0
- package/dist/src/types/com/atproto/repoDeleteRecord.d.ts +15 -0
- package/dist/src/types/com/atproto/repoDescribe.d.ts +21 -0
- package/dist/src/types/com/atproto/repoGetRecord.d.ts +22 -0
- package/dist/src/types/com/atproto/repoListRecords.d.ts +27 -0
- package/dist/src/types/com/atproto/repoPutRecord.d.ts +24 -0
- package/dist/src/types/com/atproto/requestAccountPasswordReset.d.ts +18 -0
- package/dist/src/types/com/atproto/resetAccountPassword.d.ts +25 -0
- package/dist/src/types/com/atproto/resolveName.d.ts +17 -0
- package/dist/src/types/com/atproto/syncGetRepo.d.ts +15 -0
- package/dist/src/types/com/atproto/syncGetRoot.d.ts +17 -0
- package/dist/src/types/com/atproto/syncUpdateRepo.d.ts +14 -0
- package/dist/src/types/todo/adx/createAccount.d.ts +36 -0
- package/dist/src/types/todo/adx/createInviteCode.d.ts +19 -0
- package/dist/src/types/todo/adx/createSession.d.ts +22 -0
- package/dist/src/types/todo/adx/deleteAccount.d.ts +19 -0
- package/dist/src/types/todo/adx/deleteSession.d.ts +19 -0
- package/dist/src/types/todo/adx/getAccount.d.ts +19 -0
- package/dist/src/types/todo/adx/getAccountsConfig.d.ts +17 -0
- package/dist/src/types/todo/adx/getSession.d.ts +17 -0
- package/dist/src/types/todo/adx/repoBatchWrite.d.ts +34 -0
- package/dist/src/types/todo/adx/repoCreateRecord.d.ts +22 -0
- package/dist/src/types/todo/adx/repoDeleteRecord.d.ts +15 -0
- package/dist/src/types/todo/adx/repoDescribe.d.ts +21 -0
- package/dist/src/types/todo/adx/repoGetRecord.d.ts +20 -0
- package/dist/src/types/todo/adx/repoListRecords.d.ts +25 -0
- package/dist/src/types/todo/adx/repoPutRecord.d.ts +23 -0
- package/dist/src/types/todo/adx/requestAccountPasswordReset.d.ts +18 -0
- package/dist/src/types/todo/adx/resetAccountPassword.d.ts +25 -0
- package/dist/src/types/todo/adx/resolveName.d.ts +17 -0
- package/dist/src/types/todo/adx/syncGetRepo.d.ts +15 -0
- package/dist/src/types/todo/adx/syncGetRoot.d.ts +17 -0
- package/dist/src/types/todo/adx/syncUpdateRepo.d.ts +14 -0
- package/dist/src/types/todo/social/badge.d.ts +23 -0
- package/dist/src/types/todo/social/follow.d.ts +5 -0
- package/dist/src/types/todo/social/getAuthorFeed.d.ts +55 -0
- package/dist/src/types/todo/social/getFeed.d.ts +55 -0
- package/dist/src/types/todo/social/getHomeFeed.d.ts +55 -0
- package/dist/src/types/todo/social/getLikedBy.d.ts +26 -0
- package/dist/src/types/todo/social/getNotificationCount.d.ts +16 -0
- package/dist/src/types/todo/social/getNotifications.d.ts +31 -0
- package/dist/src/types/todo/social/getPostThread.d.ts +54 -0
- package/dist/src/types/todo/social/getProfile.d.ts +40 -0
- package/dist/src/types/todo/social/getRepostedBy.d.ts +26 -0
- package/dist/src/types/todo/social/getUserFollowers.d.ts +30 -0
- package/dist/src/types/todo/social/getUserFollows.d.ts +30 -0
- package/dist/src/types/todo/social/like.d.ts +5 -0
- package/dist/src/types/todo/social/mediaEmbed.d.ts +15 -0
- package/dist/src/types/todo/social/post.d.ts +18 -0
- package/dist/src/types/todo/social/postNotificationsSeen.d.ts +19 -0
- package/dist/src/types/todo/social/profile.d.ts +10 -0
- package/dist/src/types/todo/social/repost.d.ts +5 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +6 -1
- package/src/client/index.ts +240 -0
- package/src/client/lexicons.ts +488 -0
- package/src/client/types/app/bsky/actor/defs.ts +2 -0
- package/src/client/types/app/bsky/graph/defs.ts +95 -0
- package/src/client/types/app/bsky/graph/getList.ts +40 -0
- package/src/client/types/app/bsky/graph/getListMutes.ts +38 -0
- package/src/client/types/app/bsky/graph/getLists.ts +39 -0
- package/src/client/types/app/bsky/graph/list.ts +32 -0
- package/src/client/types/app/bsky/graph/listitem.ts +27 -0
- package/src/client/types/app/bsky/graph/muteActorList.ts +32 -0
- package/src/client/types/app/bsky/graph/unmuteActorList.ts +32 -0
- package/src/client/types/app/bsky/unspecced/getPopular.ts +1 -0
- package/src/client/types/com/atproto/admin/defs.ts +5 -0
- package/src/client/types/com/atproto/admin/disableAccountInvites.ts +32 -0
- package/src/client/types/com/atproto/admin/enableAccountInvites.ts +32 -0
- package/src/client/types/com/atproto/repo/rebaseRepo.ts +42 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/helpers/bsky.d.ts +0 -20
- package/dist/mixins/bsky.d.ts +0 -23
- package/dist/rich-text/sanitize.d.ts +0 -4
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJS = (cb,
|
|
9
|
-
return
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
10
|
};
|
|
11
11
|
var __export = (target, all) => {
|
|
12
12
|
for (var name2 in all)
|
|
@@ -20,11 +20,11 @@ var __copyProps = (to, from3, except, desc) => {
|
|
|
20
20
|
}
|
|
21
21
|
return to;
|
|
22
22
|
};
|
|
23
|
-
var __toESM = (
|
|
24
|
-
isNodeMode || !
|
|
25
|
-
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
26
|
));
|
|
27
|
-
var __toCommonJS = (
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
29
|
// ../../node_modules/iso-datestring-validator/dist/index.js
|
|
30
30
|
var require_dist = __commonJS({
|
|
@@ -78,6 +78,7 @@ var require_dist = __commonJS({
|
|
|
78
78
|
// src/index.ts
|
|
79
79
|
var src_exports4 = {};
|
|
80
80
|
__export(src_exports4, {
|
|
81
|
+
APP_BSKY_GRAPH: () => APP_BSKY_GRAPH,
|
|
81
82
|
ActorNS: () => ActorNS,
|
|
82
83
|
AdminNS: () => AdminNS,
|
|
83
84
|
AppBskyActorDefs: () => defs_exports5,
|
|
@@ -102,13 +103,21 @@ __export(src_exports4, {
|
|
|
102
103
|
AppBskyFeedPost: () => post_exports,
|
|
103
104
|
AppBskyFeedRepost: () => repost_exports,
|
|
104
105
|
AppBskyGraphBlock: () => block_exports,
|
|
106
|
+
AppBskyGraphDefs: () => defs_exports7,
|
|
105
107
|
AppBskyGraphFollow: () => follow_exports,
|
|
106
108
|
AppBskyGraphGetBlocks: () => getBlocks_exports2,
|
|
107
109
|
AppBskyGraphGetFollowers: () => getFollowers_exports,
|
|
108
110
|
AppBskyGraphGetFollows: () => getFollows_exports,
|
|
111
|
+
AppBskyGraphGetList: () => getList_exports,
|
|
112
|
+
AppBskyGraphGetListMutes: () => getListMutes_exports,
|
|
113
|
+
AppBskyGraphGetLists: () => getLists_exports,
|
|
109
114
|
AppBskyGraphGetMutes: () => getMutes_exports,
|
|
115
|
+
AppBskyGraphList: () => list_exports,
|
|
116
|
+
AppBskyGraphListitem: () => listitem_exports,
|
|
110
117
|
AppBskyGraphMuteActor: () => muteActor_exports,
|
|
118
|
+
AppBskyGraphMuteActorList: () => muteActorList_exports,
|
|
111
119
|
AppBskyGraphUnmuteActor: () => unmuteActor_exports,
|
|
120
|
+
AppBskyGraphUnmuteActorList: () => unmuteActorList_exports,
|
|
112
121
|
AppBskyNotificationGetUnreadCount: () => getUnreadCount_exports,
|
|
113
122
|
AppBskyNotificationListNotifications: () => listNotifications_exports,
|
|
114
123
|
AppBskyNotificationUpdateSeen: () => updateSeen_exports,
|
|
@@ -127,7 +136,9 @@ __export(src_exports4, {
|
|
|
127
136
|
COM_ATPROTO_ADMIN: () => COM_ATPROTO_ADMIN,
|
|
128
137
|
COM_ATPROTO_MODERATION: () => COM_ATPROTO_MODERATION,
|
|
129
138
|
ComAtprotoAdminDefs: () => defs_exports,
|
|
139
|
+
ComAtprotoAdminDisableAccountInvites: () => disableAccountInvites_exports,
|
|
130
140
|
ComAtprotoAdminDisableInviteCodes: () => disableInviteCodes_exports,
|
|
141
|
+
ComAtprotoAdminEnableAccountInvites: () => enableAccountInvites_exports,
|
|
131
142
|
ComAtprotoAdminGetInviteCodes: () => getInviteCodes_exports,
|
|
132
143
|
ComAtprotoAdminGetModerationAction: () => getModerationAction_exports,
|
|
133
144
|
ComAtprotoAdminGetModerationActions: () => getModerationActions_exports,
|
|
@@ -155,6 +166,7 @@ __export(src_exports4, {
|
|
|
155
166
|
ComAtprotoRepoGetRecord: () => getRecord_exports2,
|
|
156
167
|
ComAtprotoRepoListRecords: () => listRecords_exports,
|
|
157
168
|
ComAtprotoRepoPutRecord: () => putRecord_exports,
|
|
169
|
+
ComAtprotoRepoRebaseRepo: () => rebaseRepo_exports,
|
|
158
170
|
ComAtprotoRepoStrongRef: () => strongRef_exports,
|
|
159
171
|
ComAtprotoRepoUploadBlob: () => uploadBlob_exports,
|
|
160
172
|
ComAtprotoServerCreateAccount: () => createAccount_exports,
|
|
@@ -194,6 +206,8 @@ __export(src_exports4, {
|
|
|
194
206
|
IdentityNS: () => IdentityNS,
|
|
195
207
|
LabelNS: () => LabelNS,
|
|
196
208
|
LikeRecord: () => LikeRecord,
|
|
209
|
+
ListRecord: () => ListRecord,
|
|
210
|
+
ListitemRecord: () => ListitemRecord,
|
|
197
211
|
ModerationNS: () => ModerationNS,
|
|
198
212
|
NotificationNS: () => NotificationNS,
|
|
199
213
|
PostRecord: () => PostRecord,
|
|
@@ -1450,6 +1464,15 @@ var util;
|
|
|
1450
1464
|
return value;
|
|
1451
1465
|
};
|
|
1452
1466
|
})(util || (util = {}));
|
|
1467
|
+
var objectUtil;
|
|
1468
|
+
(function(objectUtil2) {
|
|
1469
|
+
objectUtil2.mergeShapes = (first, second) => {
|
|
1470
|
+
return {
|
|
1471
|
+
...first,
|
|
1472
|
+
...second
|
|
1473
|
+
};
|
|
1474
|
+
};
|
|
1475
|
+
})(objectUtil || (objectUtil = {}));
|
|
1453
1476
|
var ZodParsedType = util.arrayToEnum([
|
|
1454
1477
|
"string",
|
|
1455
1478
|
"nan",
|
|
@@ -1487,6 +1510,8 @@ var getParsedType = (data) => {
|
|
|
1487
1510
|
return ZodParsedType.function;
|
|
1488
1511
|
case "bigint":
|
|
1489
1512
|
return ZodParsedType.bigint;
|
|
1513
|
+
case "symbol":
|
|
1514
|
+
return ZodParsedType.symbol;
|
|
1490
1515
|
case "object":
|
|
1491
1516
|
if (Array.isArray(data)) {
|
|
1492
1517
|
return ZodParsedType.array;
|
|
@@ -1526,7 +1551,8 @@ var ZodIssueCode = util.arrayToEnum([
|
|
|
1526
1551
|
"too_small",
|
|
1527
1552
|
"too_big",
|
|
1528
1553
|
"invalid_intersection_types",
|
|
1529
|
-
"not_multiple_of"
|
|
1554
|
+
"not_multiple_of",
|
|
1555
|
+
"not_finite"
|
|
1530
1556
|
]);
|
|
1531
1557
|
var quotelessJson = (obj) => {
|
|
1532
1558
|
const json = JSON.stringify(obj, null, 2);
|
|
@@ -1656,7 +1682,12 @@ var errorMap = (issue, _ctx) => {
|
|
|
1656
1682
|
break;
|
|
1657
1683
|
case ZodIssueCode.invalid_string:
|
|
1658
1684
|
if (typeof issue.validation === "object") {
|
|
1659
|
-
if ("
|
|
1685
|
+
if ("includes" in issue.validation) {
|
|
1686
|
+
message = `Invalid input: must include "${issue.validation.includes}"`;
|
|
1687
|
+
if (typeof issue.validation.position === "number") {
|
|
1688
|
+
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
|
|
1689
|
+
}
|
|
1690
|
+
} else if ("startsWith" in issue.validation) {
|
|
1660
1691
|
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
|
|
1661
1692
|
} else if ("endsWith" in issue.validation) {
|
|
1662
1693
|
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
|
|
@@ -1671,25 +1702,27 @@ var errorMap = (issue, _ctx) => {
|
|
|
1671
1702
|
break;
|
|
1672
1703
|
case ZodIssueCode.too_small:
|
|
1673
1704
|
if (issue.type === "array")
|
|
1674
|
-
message = `Array must contain ${issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
|
|
1705
|
+
message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
|
|
1675
1706
|
else if (issue.type === "string")
|
|
1676
|
-
message = `String must contain ${issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
1707
|
+
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
1677
1708
|
else if (issue.type === "number")
|
|
1678
|
-
message = `Number must be
|
|
1709
|
+
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
1679
1710
|
else if (issue.type === "date")
|
|
1680
|
-
message = `Date must be
|
|
1711
|
+
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
|
|
1681
1712
|
else
|
|
1682
1713
|
message = "Invalid input";
|
|
1683
1714
|
break;
|
|
1684
1715
|
case ZodIssueCode.too_big:
|
|
1685
1716
|
if (issue.type === "array")
|
|
1686
|
-
message = `Array must contain ${issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
|
|
1717
|
+
message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
|
|
1687
1718
|
else if (issue.type === "string")
|
|
1688
|
-
message = `String must contain ${issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
|
1719
|
+
message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
|
1689
1720
|
else if (issue.type === "number")
|
|
1690
|
-
message = `Number must be
|
|
1721
|
+
message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
|
|
1722
|
+
else if (issue.type === "bigint")
|
|
1723
|
+
message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
|
|
1691
1724
|
else if (issue.type === "date")
|
|
1692
|
-
message = `Date must be
|
|
1725
|
+
message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
|
|
1693
1726
|
else
|
|
1694
1727
|
message = "Invalid input";
|
|
1695
1728
|
break;
|
|
@@ -1702,6 +1735,9 @@ var errorMap = (issue, _ctx) => {
|
|
|
1702
1735
|
case ZodIssueCode.not_multiple_of:
|
|
1703
1736
|
message = `Number must be a multiple of ${issue.multipleOf}`;
|
|
1704
1737
|
break;
|
|
1738
|
+
case ZodIssueCode.not_finite:
|
|
1739
|
+
message = "Number must be finite";
|
|
1740
|
+
break;
|
|
1705
1741
|
default:
|
|
1706
1742
|
message = _ctx.defaultError;
|
|
1707
1743
|
util.assertNever(issue);
|
|
@@ -1808,7 +1844,7 @@ var OK = (value) => ({ status: "valid", value });
|
|
|
1808
1844
|
var isAborted = (x) => x.status === "aborted";
|
|
1809
1845
|
var isDirty = (x) => x.status === "dirty";
|
|
1810
1846
|
var isValid = (x) => x.status === "valid";
|
|
1811
|
-
var isAsync = (x) => typeof Promise !==
|
|
1847
|
+
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
1812
1848
|
var errorUtil;
|
|
1813
1849
|
(function(errorUtil2) {
|
|
1814
1850
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
@@ -1816,13 +1852,21 @@ var errorUtil;
|
|
|
1816
1852
|
})(errorUtil || (errorUtil = {}));
|
|
1817
1853
|
var ParseInputLazyPath = class {
|
|
1818
1854
|
constructor(parent, value, path, key) {
|
|
1855
|
+
this._cachedPath = [];
|
|
1819
1856
|
this.parent = parent;
|
|
1820
1857
|
this.data = value;
|
|
1821
1858
|
this._path = path;
|
|
1822
1859
|
this._key = key;
|
|
1823
1860
|
}
|
|
1824
1861
|
get path() {
|
|
1825
|
-
|
|
1862
|
+
if (!this._cachedPath.length) {
|
|
1863
|
+
if (this._key instanceof Array) {
|
|
1864
|
+
this._cachedPath.push(...this._path, ...this._key);
|
|
1865
|
+
} else {
|
|
1866
|
+
this._cachedPath.push(...this._path, this._key);
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
return this._cachedPath;
|
|
1826
1870
|
}
|
|
1827
1871
|
};
|
|
1828
1872
|
var handleResult = (ctx, result) => {
|
|
@@ -1832,8 +1876,16 @@ var handleResult = (ctx, result) => {
|
|
|
1832
1876
|
if (!ctx.common.issues.length) {
|
|
1833
1877
|
throw new Error("Validation failed but no issues detected.");
|
|
1834
1878
|
}
|
|
1835
|
-
|
|
1836
|
-
|
|
1879
|
+
return {
|
|
1880
|
+
success: false,
|
|
1881
|
+
get error() {
|
|
1882
|
+
if (this._error)
|
|
1883
|
+
return this._error;
|
|
1884
|
+
const error = new ZodError(ctx.common.issues);
|
|
1885
|
+
this._error = error;
|
|
1886
|
+
return this._error;
|
|
1887
|
+
}
|
|
1888
|
+
};
|
|
1837
1889
|
}
|
|
1838
1890
|
};
|
|
1839
1891
|
function processCreateParams(params2) {
|
|
@@ -1858,7 +1910,6 @@ function processCreateParams(params2) {
|
|
|
1858
1910
|
var ZodType = class {
|
|
1859
1911
|
constructor(def2) {
|
|
1860
1912
|
this.spa = this.safeParseAsync;
|
|
1861
|
-
this.superRefine = this._refinement;
|
|
1862
1913
|
this._def = def2;
|
|
1863
1914
|
this.parse = this.parse.bind(this);
|
|
1864
1915
|
this.safeParse = this.safeParse.bind(this);
|
|
@@ -1876,8 +1927,11 @@ var ZodType = class {
|
|
|
1876
1927
|
this.or = this.or.bind(this);
|
|
1877
1928
|
this.and = this.and.bind(this);
|
|
1878
1929
|
this.transform = this.transform.bind(this);
|
|
1930
|
+
this.brand = this.brand.bind(this);
|
|
1879
1931
|
this.default = this.default.bind(this);
|
|
1932
|
+
this.catch = this.catch.bind(this);
|
|
1880
1933
|
this.describe = this.describe.bind(this);
|
|
1934
|
+
this.pipe = this.pipe.bind(this);
|
|
1881
1935
|
this.isNullable = this.isNullable.bind(this);
|
|
1882
1936
|
this.isOptional = this.isOptional.bind(this);
|
|
1883
1937
|
}
|
|
@@ -1963,7 +2017,7 @@ var ZodType = class {
|
|
|
1963
2017
|
data,
|
|
1964
2018
|
parsedType: getParsedType(data)
|
|
1965
2019
|
};
|
|
1966
|
-
const maybeAsyncResult = this._parse({ data, path:
|
|
2020
|
+
const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });
|
|
1967
2021
|
const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));
|
|
1968
2022
|
return handleResult(ctx, result);
|
|
1969
2023
|
}
|
|
@@ -2018,29 +2072,33 @@ var ZodType = class {
|
|
|
2018
2072
|
effect: { type: "refinement", refinement }
|
|
2019
2073
|
});
|
|
2020
2074
|
}
|
|
2075
|
+
superRefine(refinement) {
|
|
2076
|
+
return this._refinement(refinement);
|
|
2077
|
+
}
|
|
2021
2078
|
optional() {
|
|
2022
|
-
return ZodOptional.create(this);
|
|
2079
|
+
return ZodOptional.create(this, this._def);
|
|
2023
2080
|
}
|
|
2024
2081
|
nullable() {
|
|
2025
|
-
return ZodNullable.create(this);
|
|
2082
|
+
return ZodNullable.create(this, this._def);
|
|
2026
2083
|
}
|
|
2027
2084
|
nullish() {
|
|
2028
|
-
return this.
|
|
2085
|
+
return this.nullable().optional();
|
|
2029
2086
|
}
|
|
2030
2087
|
array() {
|
|
2031
|
-
return ZodArray.create(this);
|
|
2088
|
+
return ZodArray.create(this, this._def);
|
|
2032
2089
|
}
|
|
2033
2090
|
promise() {
|
|
2034
|
-
return ZodPromise.create(this);
|
|
2091
|
+
return ZodPromise.create(this, this._def);
|
|
2035
2092
|
}
|
|
2036
2093
|
or(option) {
|
|
2037
|
-
return ZodUnion.create([this, option]);
|
|
2094
|
+
return ZodUnion.create([this, option], this._def);
|
|
2038
2095
|
}
|
|
2039
2096
|
and(incoming) {
|
|
2040
|
-
return ZodIntersection.create(this, incoming);
|
|
2097
|
+
return ZodIntersection.create(this, incoming, this._def);
|
|
2041
2098
|
}
|
|
2042
2099
|
transform(transform) {
|
|
2043
2100
|
return new ZodEffects({
|
|
2101
|
+
...processCreateParams(this._def),
|
|
2044
2102
|
schema: this,
|
|
2045
2103
|
typeName: ZodFirstPartyTypeKind.ZodEffects,
|
|
2046
2104
|
effect: { type: "transform", transform }
|
|
@@ -2049,6 +2107,7 @@ var ZodType = class {
|
|
|
2049
2107
|
default(def2) {
|
|
2050
2108
|
const defaultValueFunc = typeof def2 === "function" ? def2 : () => def2;
|
|
2051
2109
|
return new ZodDefault({
|
|
2110
|
+
...processCreateParams(this._def),
|
|
2052
2111
|
innerType: this,
|
|
2053
2112
|
defaultValue: defaultValueFunc,
|
|
2054
2113
|
typeName: ZodFirstPartyTypeKind.ZodDefault
|
|
@@ -2058,7 +2117,16 @@ var ZodType = class {
|
|
|
2058
2117
|
return new ZodBranded({
|
|
2059
2118
|
typeName: ZodFirstPartyTypeKind.ZodBranded,
|
|
2060
2119
|
type: this,
|
|
2061
|
-
...processCreateParams(
|
|
2120
|
+
...processCreateParams(this._def)
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2123
|
+
catch(def2) {
|
|
2124
|
+
const catchValueFunc = typeof def2 === "function" ? def2 : () => def2;
|
|
2125
|
+
return new ZodCatch({
|
|
2126
|
+
...processCreateParams(this._def),
|
|
2127
|
+
innerType: this,
|
|
2128
|
+
catchValue: catchValueFunc,
|
|
2129
|
+
typeName: ZodFirstPartyTypeKind.ZodCatch
|
|
2062
2130
|
});
|
|
2063
2131
|
}
|
|
2064
2132
|
describe(description) {
|
|
@@ -2068,6 +2136,9 @@ var ZodType = class {
|
|
|
2068
2136
|
description
|
|
2069
2137
|
});
|
|
2070
2138
|
}
|
|
2139
|
+
pipe(target) {
|
|
2140
|
+
return ZodPipeline.create(this, target);
|
|
2141
|
+
}
|
|
2071
2142
|
isOptional() {
|
|
2072
2143
|
return this.safeParse(void 0).success;
|
|
2073
2144
|
}
|
|
@@ -2076,8 +2147,43 @@ var ZodType = class {
|
|
|
2076
2147
|
}
|
|
2077
2148
|
};
|
|
2078
2149
|
var cuidRegex = /^c[^\s-]{8,}$/i;
|
|
2150
|
+
var cuid2Regex = /^[a-z][a-z0-9]*$/;
|
|
2151
|
+
var ulidRegex = /[0-9A-HJKMNP-TV-Z]{26}/;
|
|
2079
2152
|
var uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
2080
|
-
var emailRegex = /^(([^<>()[\]
|
|
2153
|
+
var emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/;
|
|
2154
|
+
var emojiRegex = /^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u;
|
|
2155
|
+
var ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;
|
|
2156
|
+
var ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
|
|
2157
|
+
var datetimeRegex = (args) => {
|
|
2158
|
+
if (args.precision) {
|
|
2159
|
+
if (args.offset) {
|
|
2160
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
|
2161
|
+
} else {
|
|
2162
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${args.precision}}Z$`);
|
|
2163
|
+
}
|
|
2164
|
+
} else if (args.precision === 0) {
|
|
2165
|
+
if (args.offset) {
|
|
2166
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
|
2167
|
+
} else {
|
|
2168
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
|
|
2169
|
+
}
|
|
2170
|
+
} else {
|
|
2171
|
+
if (args.offset) {
|
|
2172
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$`);
|
|
2173
|
+
} else {
|
|
2174
|
+
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$`);
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
};
|
|
2178
|
+
function isValidIP(ip, version2) {
|
|
2179
|
+
if ((version2 === "v4" || !version2) && ipv4Regex.test(ip)) {
|
|
2180
|
+
return true;
|
|
2181
|
+
}
|
|
2182
|
+
if ((version2 === "v6" || !version2) && ipv6Regex.test(ip)) {
|
|
2183
|
+
return true;
|
|
2184
|
+
}
|
|
2185
|
+
return false;
|
|
2186
|
+
}
|
|
2081
2187
|
var ZodString = class extends ZodType {
|
|
2082
2188
|
constructor() {
|
|
2083
2189
|
super(...arguments);
|
|
@@ -2091,8 +2197,19 @@ var ZodString = class extends ZodType {
|
|
|
2091
2197
|
...this._def,
|
|
2092
2198
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
2093
2199
|
});
|
|
2200
|
+
this.toLowerCase = () => new ZodString({
|
|
2201
|
+
...this._def,
|
|
2202
|
+
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
2203
|
+
});
|
|
2204
|
+
this.toUpperCase = () => new ZodString({
|
|
2205
|
+
...this._def,
|
|
2206
|
+
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
2207
|
+
});
|
|
2094
2208
|
}
|
|
2095
2209
|
_parse(input) {
|
|
2210
|
+
if (this._def.coerce) {
|
|
2211
|
+
input.data = String(input.data);
|
|
2212
|
+
}
|
|
2096
2213
|
const parsedType = this._getType(input);
|
|
2097
2214
|
if (parsedType !== ZodParsedType.string) {
|
|
2098
2215
|
const ctx2 = this._getOrReturnCtx(input);
|
|
@@ -2117,6 +2234,7 @@ var ZodString = class extends ZodType {
|
|
|
2117
2234
|
minimum: check.value,
|
|
2118
2235
|
type: "string",
|
|
2119
2236
|
inclusive: true,
|
|
2237
|
+
exact: false,
|
|
2120
2238
|
message: check.message
|
|
2121
2239
|
});
|
|
2122
2240
|
status.dirty();
|
|
@@ -2129,10 +2247,37 @@ var ZodString = class extends ZodType {
|
|
|
2129
2247
|
maximum: check.value,
|
|
2130
2248
|
type: "string",
|
|
2131
2249
|
inclusive: true,
|
|
2250
|
+
exact: false,
|
|
2132
2251
|
message: check.message
|
|
2133
2252
|
});
|
|
2134
2253
|
status.dirty();
|
|
2135
2254
|
}
|
|
2255
|
+
} else if (check.kind === "length") {
|
|
2256
|
+
const tooBig = input.data.length > check.value;
|
|
2257
|
+
const tooSmall = input.data.length < check.value;
|
|
2258
|
+
if (tooBig || tooSmall) {
|
|
2259
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2260
|
+
if (tooBig) {
|
|
2261
|
+
addIssueToContext(ctx, {
|
|
2262
|
+
code: ZodIssueCode.too_big,
|
|
2263
|
+
maximum: check.value,
|
|
2264
|
+
type: "string",
|
|
2265
|
+
inclusive: true,
|
|
2266
|
+
exact: true,
|
|
2267
|
+
message: check.message
|
|
2268
|
+
});
|
|
2269
|
+
} else if (tooSmall) {
|
|
2270
|
+
addIssueToContext(ctx, {
|
|
2271
|
+
code: ZodIssueCode.too_small,
|
|
2272
|
+
minimum: check.value,
|
|
2273
|
+
type: "string",
|
|
2274
|
+
inclusive: true,
|
|
2275
|
+
exact: true,
|
|
2276
|
+
message: check.message
|
|
2277
|
+
});
|
|
2278
|
+
}
|
|
2279
|
+
status.dirty();
|
|
2280
|
+
}
|
|
2136
2281
|
} else if (check.kind === "email") {
|
|
2137
2282
|
if (!emailRegex.test(input.data)) {
|
|
2138
2283
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
@@ -2143,6 +2288,16 @@ var ZodString = class extends ZodType {
|
|
|
2143
2288
|
});
|
|
2144
2289
|
status.dirty();
|
|
2145
2290
|
}
|
|
2291
|
+
} else if (check.kind === "emoji") {
|
|
2292
|
+
if (!emojiRegex.test(input.data)) {
|
|
2293
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2294
|
+
addIssueToContext(ctx, {
|
|
2295
|
+
validation: "emoji",
|
|
2296
|
+
code: ZodIssueCode.invalid_string,
|
|
2297
|
+
message: check.message
|
|
2298
|
+
});
|
|
2299
|
+
status.dirty();
|
|
2300
|
+
}
|
|
2146
2301
|
} else if (check.kind === "uuid") {
|
|
2147
2302
|
if (!uuidRegex.test(input.data)) {
|
|
2148
2303
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
@@ -2163,6 +2318,26 @@ var ZodString = class extends ZodType {
|
|
|
2163
2318
|
});
|
|
2164
2319
|
status.dirty();
|
|
2165
2320
|
}
|
|
2321
|
+
} else if (check.kind === "cuid2") {
|
|
2322
|
+
if (!cuid2Regex.test(input.data)) {
|
|
2323
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2324
|
+
addIssueToContext(ctx, {
|
|
2325
|
+
validation: "cuid2",
|
|
2326
|
+
code: ZodIssueCode.invalid_string,
|
|
2327
|
+
message: check.message
|
|
2328
|
+
});
|
|
2329
|
+
status.dirty();
|
|
2330
|
+
}
|
|
2331
|
+
} else if (check.kind === "ulid") {
|
|
2332
|
+
if (!ulidRegex.test(input.data)) {
|
|
2333
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2334
|
+
addIssueToContext(ctx, {
|
|
2335
|
+
validation: "ulid",
|
|
2336
|
+
code: ZodIssueCode.invalid_string,
|
|
2337
|
+
message: check.message
|
|
2338
|
+
});
|
|
2339
|
+
status.dirty();
|
|
2340
|
+
}
|
|
2166
2341
|
} else if (check.kind === "url") {
|
|
2167
2342
|
try {
|
|
2168
2343
|
new URL(input.data);
|
|
@@ -2189,6 +2364,20 @@ var ZodString = class extends ZodType {
|
|
|
2189
2364
|
}
|
|
2190
2365
|
} else if (check.kind === "trim") {
|
|
2191
2366
|
input.data = input.data.trim();
|
|
2367
|
+
} else if (check.kind === "includes") {
|
|
2368
|
+
if (!input.data.includes(check.value, check.position)) {
|
|
2369
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2370
|
+
addIssueToContext(ctx, {
|
|
2371
|
+
code: ZodIssueCode.invalid_string,
|
|
2372
|
+
validation: { includes: check.value, position: check.position },
|
|
2373
|
+
message: check.message
|
|
2374
|
+
});
|
|
2375
|
+
status.dirty();
|
|
2376
|
+
}
|
|
2377
|
+
} else if (check.kind === "toLowerCase") {
|
|
2378
|
+
input.data = input.data.toLowerCase();
|
|
2379
|
+
} else if (check.kind === "toUpperCase") {
|
|
2380
|
+
input.data = input.data.toUpperCase();
|
|
2192
2381
|
} else if (check.kind === "startsWith") {
|
|
2193
2382
|
if (!input.data.startsWith(check.value)) {
|
|
2194
2383
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
@@ -2209,6 +2398,27 @@ var ZodString = class extends ZodType {
|
|
|
2209
2398
|
});
|
|
2210
2399
|
status.dirty();
|
|
2211
2400
|
}
|
|
2401
|
+
} else if (check.kind === "datetime") {
|
|
2402
|
+
const regex = datetimeRegex(check);
|
|
2403
|
+
if (!regex.test(input.data)) {
|
|
2404
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2405
|
+
addIssueToContext(ctx, {
|
|
2406
|
+
code: ZodIssueCode.invalid_string,
|
|
2407
|
+
validation: "datetime",
|
|
2408
|
+
message: check.message
|
|
2409
|
+
});
|
|
2410
|
+
status.dirty();
|
|
2411
|
+
}
|
|
2412
|
+
} else if (check.kind === "ip") {
|
|
2413
|
+
if (!isValidIP(input.data, check.version)) {
|
|
2414
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2415
|
+
addIssueToContext(ctx, {
|
|
2416
|
+
validation: "ip",
|
|
2417
|
+
code: ZodIssueCode.invalid_string,
|
|
2418
|
+
message: check.message
|
|
2419
|
+
});
|
|
2420
|
+
status.dirty();
|
|
2421
|
+
}
|
|
2212
2422
|
} else {
|
|
2213
2423
|
util.assertNever(check);
|
|
2214
2424
|
}
|
|
@@ -2227,12 +2437,41 @@ var ZodString = class extends ZodType {
|
|
|
2227
2437
|
url(message) {
|
|
2228
2438
|
return this._addCheck({ kind: "url", ...errorUtil.errToObj(message) });
|
|
2229
2439
|
}
|
|
2440
|
+
emoji(message) {
|
|
2441
|
+
return this._addCheck({ kind: "emoji", ...errorUtil.errToObj(message) });
|
|
2442
|
+
}
|
|
2230
2443
|
uuid(message) {
|
|
2231
2444
|
return this._addCheck({ kind: "uuid", ...errorUtil.errToObj(message) });
|
|
2232
2445
|
}
|
|
2233
2446
|
cuid(message) {
|
|
2234
2447
|
return this._addCheck({ kind: "cuid", ...errorUtil.errToObj(message) });
|
|
2235
2448
|
}
|
|
2449
|
+
cuid2(message) {
|
|
2450
|
+
return this._addCheck({ kind: "cuid2", ...errorUtil.errToObj(message) });
|
|
2451
|
+
}
|
|
2452
|
+
ulid(message) {
|
|
2453
|
+
return this._addCheck({ kind: "ulid", ...errorUtil.errToObj(message) });
|
|
2454
|
+
}
|
|
2455
|
+
ip(options) {
|
|
2456
|
+
return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
|
|
2457
|
+
}
|
|
2458
|
+
datetime(options) {
|
|
2459
|
+
var _a;
|
|
2460
|
+
if (typeof options === "string") {
|
|
2461
|
+
return this._addCheck({
|
|
2462
|
+
kind: "datetime",
|
|
2463
|
+
precision: null,
|
|
2464
|
+
offset: false,
|
|
2465
|
+
message: options
|
|
2466
|
+
});
|
|
2467
|
+
}
|
|
2468
|
+
return this._addCheck({
|
|
2469
|
+
kind: "datetime",
|
|
2470
|
+
precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === "undefined" ? null : options === null || options === void 0 ? void 0 : options.precision,
|
|
2471
|
+
offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,
|
|
2472
|
+
...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
|
|
2473
|
+
});
|
|
2474
|
+
}
|
|
2236
2475
|
regex(regex, message) {
|
|
2237
2476
|
return this._addCheck({
|
|
2238
2477
|
kind: "regex",
|
|
@@ -2240,6 +2479,14 @@ var ZodString = class extends ZodType {
|
|
|
2240
2479
|
...errorUtil.errToObj(message)
|
|
2241
2480
|
});
|
|
2242
2481
|
}
|
|
2482
|
+
includes(value, options) {
|
|
2483
|
+
return this._addCheck({
|
|
2484
|
+
kind: "includes",
|
|
2485
|
+
value,
|
|
2486
|
+
position: options === null || options === void 0 ? void 0 : options.position,
|
|
2487
|
+
...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message)
|
|
2488
|
+
});
|
|
2489
|
+
}
|
|
2243
2490
|
startsWith(value, message) {
|
|
2244
2491
|
return this._addCheck({
|
|
2245
2492
|
kind: "startsWith",
|
|
@@ -2269,7 +2516,14 @@ var ZodString = class extends ZodType {
|
|
|
2269
2516
|
});
|
|
2270
2517
|
}
|
|
2271
2518
|
length(len, message) {
|
|
2272
|
-
return this.
|
|
2519
|
+
return this._addCheck({
|
|
2520
|
+
kind: "length",
|
|
2521
|
+
value: len,
|
|
2522
|
+
...errorUtil.errToObj(message)
|
|
2523
|
+
});
|
|
2524
|
+
}
|
|
2525
|
+
get isDatetime() {
|
|
2526
|
+
return !!this._def.checks.find((ch) => ch.kind === "datetime");
|
|
2273
2527
|
}
|
|
2274
2528
|
get isEmail() {
|
|
2275
2529
|
return !!this._def.checks.find((ch) => ch.kind === "email");
|
|
@@ -2277,12 +2531,24 @@ var ZodString = class extends ZodType {
|
|
|
2277
2531
|
get isURL() {
|
|
2278
2532
|
return !!this._def.checks.find((ch) => ch.kind === "url");
|
|
2279
2533
|
}
|
|
2534
|
+
get isEmoji() {
|
|
2535
|
+
return !!this._def.checks.find((ch) => ch.kind === "emoji");
|
|
2536
|
+
}
|
|
2280
2537
|
get isUUID() {
|
|
2281
2538
|
return !!this._def.checks.find((ch) => ch.kind === "uuid");
|
|
2282
2539
|
}
|
|
2283
2540
|
get isCUID() {
|
|
2284
2541
|
return !!this._def.checks.find((ch) => ch.kind === "cuid");
|
|
2285
2542
|
}
|
|
2543
|
+
get isCUID2() {
|
|
2544
|
+
return !!this._def.checks.find((ch) => ch.kind === "cuid2");
|
|
2545
|
+
}
|
|
2546
|
+
get isULID() {
|
|
2547
|
+
return !!this._def.checks.find((ch) => ch.kind === "ulid");
|
|
2548
|
+
}
|
|
2549
|
+
get isIP() {
|
|
2550
|
+
return !!this._def.checks.find((ch) => ch.kind === "ip");
|
|
2551
|
+
}
|
|
2286
2552
|
get minLength() {
|
|
2287
2553
|
let min = null;
|
|
2288
2554
|
for (const ch of this._def.checks) {
|
|
@@ -2305,9 +2571,11 @@ var ZodString = class extends ZodType {
|
|
|
2305
2571
|
}
|
|
2306
2572
|
};
|
|
2307
2573
|
ZodString.create = (params2) => {
|
|
2574
|
+
var _a;
|
|
2308
2575
|
return new ZodString({
|
|
2309
2576
|
checks: [],
|
|
2310
2577
|
typeName: ZodFirstPartyTypeKind.ZodString,
|
|
2578
|
+
coerce: (_a = params2 === null || params2 === void 0 ? void 0 : params2.coerce) !== null && _a !== void 0 ? _a : false,
|
|
2311
2579
|
...processCreateParams(params2)
|
|
2312
2580
|
});
|
|
2313
2581
|
};
|
|
@@ -2327,6 +2595,9 @@ var ZodNumber = class extends ZodType {
|
|
|
2327
2595
|
this.step = this.multipleOf;
|
|
2328
2596
|
}
|
|
2329
2597
|
_parse(input) {
|
|
2598
|
+
if (this._def.coerce) {
|
|
2599
|
+
input.data = Number(input.data);
|
|
2600
|
+
}
|
|
2330
2601
|
const parsedType = this._getType(input);
|
|
2331
2602
|
if (parsedType !== ZodParsedType.number) {
|
|
2332
2603
|
const ctx2 = this._getOrReturnCtx(input);
|
|
@@ -2360,6 +2631,7 @@ var ZodNumber = class extends ZodType {
|
|
|
2360
2631
|
minimum: check.value,
|
|
2361
2632
|
type: "number",
|
|
2362
2633
|
inclusive: check.inclusive,
|
|
2634
|
+
exact: false,
|
|
2363
2635
|
message: check.message
|
|
2364
2636
|
});
|
|
2365
2637
|
status.dirty();
|
|
@@ -2373,6 +2645,7 @@ var ZodNumber = class extends ZodType {
|
|
|
2373
2645
|
maximum: check.value,
|
|
2374
2646
|
type: "number",
|
|
2375
2647
|
inclusive: check.inclusive,
|
|
2648
|
+
exact: false,
|
|
2376
2649
|
message: check.message
|
|
2377
2650
|
});
|
|
2378
2651
|
status.dirty();
|
|
@@ -2387,6 +2660,15 @@ var ZodNumber = class extends ZodType {
|
|
|
2387
2660
|
});
|
|
2388
2661
|
status.dirty();
|
|
2389
2662
|
}
|
|
2663
|
+
} else if (check.kind === "finite") {
|
|
2664
|
+
if (!Number.isFinite(input.data)) {
|
|
2665
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2666
|
+
addIssueToContext(ctx, {
|
|
2667
|
+
code: ZodIssueCode.not_finite,
|
|
2668
|
+
message: check.message
|
|
2669
|
+
});
|
|
2670
|
+
status.dirty();
|
|
2671
|
+
}
|
|
2390
2672
|
} else {
|
|
2391
2673
|
util.assertNever(check);
|
|
2392
2674
|
}
|
|
@@ -2470,6 +2752,25 @@ var ZodNumber = class extends ZodType {
|
|
|
2470
2752
|
message: errorUtil.toString(message)
|
|
2471
2753
|
});
|
|
2472
2754
|
}
|
|
2755
|
+
finite(message) {
|
|
2756
|
+
return this._addCheck({
|
|
2757
|
+
kind: "finite",
|
|
2758
|
+
message: errorUtil.toString(message)
|
|
2759
|
+
});
|
|
2760
|
+
}
|
|
2761
|
+
safe(message) {
|
|
2762
|
+
return this._addCheck({
|
|
2763
|
+
kind: "min",
|
|
2764
|
+
inclusive: true,
|
|
2765
|
+
value: Number.MIN_SAFE_INTEGER,
|
|
2766
|
+
message: errorUtil.toString(message)
|
|
2767
|
+
})._addCheck({
|
|
2768
|
+
kind: "max",
|
|
2769
|
+
inclusive: true,
|
|
2770
|
+
value: Number.MAX_SAFE_INTEGER,
|
|
2771
|
+
message: errorUtil.toString(message)
|
|
2772
|
+
});
|
|
2773
|
+
}
|
|
2473
2774
|
get minValue() {
|
|
2474
2775
|
let min = null;
|
|
2475
2776
|
for (const ch of this._def.checks) {
|
|
@@ -2491,101 +2792,88 @@ var ZodNumber = class extends ZodType {
|
|
|
2491
2792
|
return max;
|
|
2492
2793
|
}
|
|
2493
2794
|
get isInt() {
|
|
2494
|
-
return !!this._def.checks.find((ch) => ch.kind === "int");
|
|
2795
|
+
return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
|
|
2796
|
+
}
|
|
2797
|
+
get isFinite() {
|
|
2798
|
+
let max = null, min = null;
|
|
2799
|
+
for (const ch of this._def.checks) {
|
|
2800
|
+
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
|
|
2801
|
+
return true;
|
|
2802
|
+
} else if (ch.kind === "min") {
|
|
2803
|
+
if (min === null || ch.value > min)
|
|
2804
|
+
min = ch.value;
|
|
2805
|
+
} else if (ch.kind === "max") {
|
|
2806
|
+
if (max === null || ch.value < max)
|
|
2807
|
+
max = ch.value;
|
|
2808
|
+
}
|
|
2809
|
+
}
|
|
2810
|
+
return Number.isFinite(min) && Number.isFinite(max);
|
|
2495
2811
|
}
|
|
2496
2812
|
};
|
|
2497
2813
|
ZodNumber.create = (params2) => {
|
|
2498
2814
|
return new ZodNumber({
|
|
2499
2815
|
checks: [],
|
|
2500
2816
|
typeName: ZodFirstPartyTypeKind.ZodNumber,
|
|
2817
|
+
coerce: (params2 === null || params2 === void 0 ? void 0 : params2.coerce) || false,
|
|
2501
2818
|
...processCreateParams(params2)
|
|
2502
2819
|
});
|
|
2503
2820
|
};
|
|
2504
2821
|
var ZodBigInt = class extends ZodType {
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
addIssueToContext(ctx, {
|
|
2510
|
-
code: ZodIssueCode.invalid_type,
|
|
2511
|
-
expected: ZodParsedType.bigint,
|
|
2512
|
-
received: ctx.parsedType
|
|
2513
|
-
});
|
|
2514
|
-
return INVALID;
|
|
2515
|
-
}
|
|
2516
|
-
return OK(input.data);
|
|
2822
|
+
constructor() {
|
|
2823
|
+
super(...arguments);
|
|
2824
|
+
this.min = this.gte;
|
|
2825
|
+
this.max = this.lte;
|
|
2517
2826
|
}
|
|
2518
|
-
};
|
|
2519
|
-
ZodBigInt.create = (params2) => {
|
|
2520
|
-
return new ZodBigInt({
|
|
2521
|
-
typeName: ZodFirstPartyTypeKind.ZodBigInt,
|
|
2522
|
-
...processCreateParams(params2)
|
|
2523
|
-
});
|
|
2524
|
-
};
|
|
2525
|
-
var ZodBoolean = class extends ZodType {
|
|
2526
2827
|
_parse(input) {
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
const ctx = this._getOrReturnCtx(input);
|
|
2530
|
-
addIssueToContext(ctx, {
|
|
2531
|
-
code: ZodIssueCode.invalid_type,
|
|
2532
|
-
expected: ZodParsedType.boolean,
|
|
2533
|
-
received: ctx.parsedType
|
|
2534
|
-
});
|
|
2535
|
-
return INVALID;
|
|
2828
|
+
if (this._def.coerce) {
|
|
2829
|
+
input.data = BigInt(input.data);
|
|
2536
2830
|
}
|
|
2537
|
-
return OK(input.data);
|
|
2538
|
-
}
|
|
2539
|
-
};
|
|
2540
|
-
ZodBoolean.create = (params2) => {
|
|
2541
|
-
return new ZodBoolean({
|
|
2542
|
-
typeName: ZodFirstPartyTypeKind.ZodBoolean,
|
|
2543
|
-
...processCreateParams(params2)
|
|
2544
|
-
});
|
|
2545
|
-
};
|
|
2546
|
-
var ZodDate = class extends ZodType {
|
|
2547
|
-
_parse(input) {
|
|
2548
2831
|
const parsedType = this._getType(input);
|
|
2549
|
-
if (parsedType !== ZodParsedType.
|
|
2832
|
+
if (parsedType !== ZodParsedType.bigint) {
|
|
2550
2833
|
const ctx2 = this._getOrReturnCtx(input);
|
|
2551
2834
|
addIssueToContext(ctx2, {
|
|
2552
2835
|
code: ZodIssueCode.invalid_type,
|
|
2553
|
-
expected: ZodParsedType.
|
|
2836
|
+
expected: ZodParsedType.bigint,
|
|
2554
2837
|
received: ctx2.parsedType
|
|
2555
2838
|
});
|
|
2556
2839
|
return INVALID;
|
|
2557
2840
|
}
|
|
2558
|
-
if (isNaN(input.data.getTime())) {
|
|
2559
|
-
const ctx2 = this._getOrReturnCtx(input);
|
|
2560
|
-
addIssueToContext(ctx2, {
|
|
2561
|
-
code: ZodIssueCode.invalid_date
|
|
2562
|
-
});
|
|
2563
|
-
return INVALID;
|
|
2564
|
-
}
|
|
2565
|
-
const status = new ParseStatus();
|
|
2566
2841
|
let ctx = void 0;
|
|
2842
|
+
const status = new ParseStatus();
|
|
2567
2843
|
for (const check of this._def.checks) {
|
|
2568
2844
|
if (check.kind === "min") {
|
|
2569
|
-
|
|
2845
|
+
const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
|
|
2846
|
+
if (tooSmall) {
|
|
2570
2847
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
2571
2848
|
addIssueToContext(ctx, {
|
|
2572
2849
|
code: ZodIssueCode.too_small,
|
|
2573
|
-
|
|
2574
|
-
inclusive: true,
|
|
2850
|
+
type: "bigint",
|
|
2575
2851
|
minimum: check.value,
|
|
2576
|
-
|
|
2852
|
+
inclusive: check.inclusive,
|
|
2853
|
+
message: check.message
|
|
2577
2854
|
});
|
|
2578
2855
|
status.dirty();
|
|
2579
2856
|
}
|
|
2580
2857
|
} else if (check.kind === "max") {
|
|
2581
|
-
|
|
2858
|
+
const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
|
|
2859
|
+
if (tooBig) {
|
|
2582
2860
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
2583
2861
|
addIssueToContext(ctx, {
|
|
2584
2862
|
code: ZodIssueCode.too_big,
|
|
2585
|
-
|
|
2586
|
-
inclusive: true,
|
|
2863
|
+
type: "bigint",
|
|
2587
2864
|
maximum: check.value,
|
|
2588
|
-
|
|
2865
|
+
inclusive: check.inclusive,
|
|
2866
|
+
message: check.message
|
|
2867
|
+
});
|
|
2868
|
+
status.dirty();
|
|
2869
|
+
}
|
|
2870
|
+
} else if (check.kind === "multipleOf") {
|
|
2871
|
+
if (input.data % check.value !== BigInt(0)) {
|
|
2872
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2873
|
+
addIssueToContext(ctx, {
|
|
2874
|
+
code: ZodIssueCode.not_multiple_of,
|
|
2875
|
+
multipleOf: check.value,
|
|
2876
|
+
message: check.message
|
|
2589
2877
|
});
|
|
2590
2878
|
status.dirty();
|
|
2591
2879
|
}
|
|
@@ -2593,18 +2881,201 @@ var ZodDate = class extends ZodType {
|
|
|
2593
2881
|
util.assertNever(check);
|
|
2594
2882
|
}
|
|
2595
2883
|
}
|
|
2596
|
-
return {
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2884
|
+
return { status: status.value, value: input.data };
|
|
2885
|
+
}
|
|
2886
|
+
gte(value, message) {
|
|
2887
|
+
return this.setLimit("min", value, true, errorUtil.toString(message));
|
|
2888
|
+
}
|
|
2889
|
+
gt(value, message) {
|
|
2890
|
+
return this.setLimit("min", value, false, errorUtil.toString(message));
|
|
2891
|
+
}
|
|
2892
|
+
lte(value, message) {
|
|
2893
|
+
return this.setLimit("max", value, true, errorUtil.toString(message));
|
|
2894
|
+
}
|
|
2895
|
+
lt(value, message) {
|
|
2896
|
+
return this.setLimit("max", value, false, errorUtil.toString(message));
|
|
2897
|
+
}
|
|
2898
|
+
setLimit(kind, value, inclusive, message) {
|
|
2899
|
+
return new ZodBigInt({
|
|
2900
|
+
...this._def,
|
|
2901
|
+
checks: [
|
|
2902
|
+
...this._def.checks,
|
|
2903
|
+
{
|
|
2904
|
+
kind,
|
|
2905
|
+
value,
|
|
2906
|
+
inclusive,
|
|
2907
|
+
message: errorUtil.toString(message)
|
|
2908
|
+
}
|
|
2909
|
+
]
|
|
2910
|
+
});
|
|
2600
2911
|
}
|
|
2601
2912
|
_addCheck(check) {
|
|
2602
|
-
return new
|
|
2913
|
+
return new ZodBigInt({
|
|
2603
2914
|
...this._def,
|
|
2604
2915
|
checks: [...this._def.checks, check]
|
|
2605
2916
|
});
|
|
2606
2917
|
}
|
|
2607
|
-
|
|
2918
|
+
positive(message) {
|
|
2919
|
+
return this._addCheck({
|
|
2920
|
+
kind: "min",
|
|
2921
|
+
value: BigInt(0),
|
|
2922
|
+
inclusive: false,
|
|
2923
|
+
message: errorUtil.toString(message)
|
|
2924
|
+
});
|
|
2925
|
+
}
|
|
2926
|
+
negative(message) {
|
|
2927
|
+
return this._addCheck({
|
|
2928
|
+
kind: "max",
|
|
2929
|
+
value: BigInt(0),
|
|
2930
|
+
inclusive: false,
|
|
2931
|
+
message: errorUtil.toString(message)
|
|
2932
|
+
});
|
|
2933
|
+
}
|
|
2934
|
+
nonpositive(message) {
|
|
2935
|
+
return this._addCheck({
|
|
2936
|
+
kind: "max",
|
|
2937
|
+
value: BigInt(0),
|
|
2938
|
+
inclusive: true,
|
|
2939
|
+
message: errorUtil.toString(message)
|
|
2940
|
+
});
|
|
2941
|
+
}
|
|
2942
|
+
nonnegative(message) {
|
|
2943
|
+
return this._addCheck({
|
|
2944
|
+
kind: "min",
|
|
2945
|
+
value: BigInt(0),
|
|
2946
|
+
inclusive: true,
|
|
2947
|
+
message: errorUtil.toString(message)
|
|
2948
|
+
});
|
|
2949
|
+
}
|
|
2950
|
+
multipleOf(value, message) {
|
|
2951
|
+
return this._addCheck({
|
|
2952
|
+
kind: "multipleOf",
|
|
2953
|
+
value,
|
|
2954
|
+
message: errorUtil.toString(message)
|
|
2955
|
+
});
|
|
2956
|
+
}
|
|
2957
|
+
get minValue() {
|
|
2958
|
+
let min = null;
|
|
2959
|
+
for (const ch of this._def.checks) {
|
|
2960
|
+
if (ch.kind === "min") {
|
|
2961
|
+
if (min === null || ch.value > min)
|
|
2962
|
+
min = ch.value;
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
return min;
|
|
2966
|
+
}
|
|
2967
|
+
get maxValue() {
|
|
2968
|
+
let max = null;
|
|
2969
|
+
for (const ch of this._def.checks) {
|
|
2970
|
+
if (ch.kind === "max") {
|
|
2971
|
+
if (max === null || ch.value < max)
|
|
2972
|
+
max = ch.value;
|
|
2973
|
+
}
|
|
2974
|
+
}
|
|
2975
|
+
return max;
|
|
2976
|
+
}
|
|
2977
|
+
};
|
|
2978
|
+
ZodBigInt.create = (params2) => {
|
|
2979
|
+
var _a;
|
|
2980
|
+
return new ZodBigInt({
|
|
2981
|
+
checks: [],
|
|
2982
|
+
typeName: ZodFirstPartyTypeKind.ZodBigInt,
|
|
2983
|
+
coerce: (_a = params2 === null || params2 === void 0 ? void 0 : params2.coerce) !== null && _a !== void 0 ? _a : false,
|
|
2984
|
+
...processCreateParams(params2)
|
|
2985
|
+
});
|
|
2986
|
+
};
|
|
2987
|
+
var ZodBoolean = class extends ZodType {
|
|
2988
|
+
_parse(input) {
|
|
2989
|
+
if (this._def.coerce) {
|
|
2990
|
+
input.data = Boolean(input.data);
|
|
2991
|
+
}
|
|
2992
|
+
const parsedType = this._getType(input);
|
|
2993
|
+
if (parsedType !== ZodParsedType.boolean) {
|
|
2994
|
+
const ctx = this._getOrReturnCtx(input);
|
|
2995
|
+
addIssueToContext(ctx, {
|
|
2996
|
+
code: ZodIssueCode.invalid_type,
|
|
2997
|
+
expected: ZodParsedType.boolean,
|
|
2998
|
+
received: ctx.parsedType
|
|
2999
|
+
});
|
|
3000
|
+
return INVALID;
|
|
3001
|
+
}
|
|
3002
|
+
return OK(input.data);
|
|
3003
|
+
}
|
|
3004
|
+
};
|
|
3005
|
+
ZodBoolean.create = (params2) => {
|
|
3006
|
+
return new ZodBoolean({
|
|
3007
|
+
typeName: ZodFirstPartyTypeKind.ZodBoolean,
|
|
3008
|
+
coerce: (params2 === null || params2 === void 0 ? void 0 : params2.coerce) || false,
|
|
3009
|
+
...processCreateParams(params2)
|
|
3010
|
+
});
|
|
3011
|
+
};
|
|
3012
|
+
var ZodDate = class extends ZodType {
|
|
3013
|
+
_parse(input) {
|
|
3014
|
+
if (this._def.coerce) {
|
|
3015
|
+
input.data = new Date(input.data);
|
|
3016
|
+
}
|
|
3017
|
+
const parsedType = this._getType(input);
|
|
3018
|
+
if (parsedType !== ZodParsedType.date) {
|
|
3019
|
+
const ctx2 = this._getOrReturnCtx(input);
|
|
3020
|
+
addIssueToContext(ctx2, {
|
|
3021
|
+
code: ZodIssueCode.invalid_type,
|
|
3022
|
+
expected: ZodParsedType.date,
|
|
3023
|
+
received: ctx2.parsedType
|
|
3024
|
+
});
|
|
3025
|
+
return INVALID;
|
|
3026
|
+
}
|
|
3027
|
+
if (isNaN(input.data.getTime())) {
|
|
3028
|
+
const ctx2 = this._getOrReturnCtx(input);
|
|
3029
|
+
addIssueToContext(ctx2, {
|
|
3030
|
+
code: ZodIssueCode.invalid_date
|
|
3031
|
+
});
|
|
3032
|
+
return INVALID;
|
|
3033
|
+
}
|
|
3034
|
+
const status = new ParseStatus();
|
|
3035
|
+
let ctx = void 0;
|
|
3036
|
+
for (const check of this._def.checks) {
|
|
3037
|
+
if (check.kind === "min") {
|
|
3038
|
+
if (input.data.getTime() < check.value) {
|
|
3039
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
3040
|
+
addIssueToContext(ctx, {
|
|
3041
|
+
code: ZodIssueCode.too_small,
|
|
3042
|
+
message: check.message,
|
|
3043
|
+
inclusive: true,
|
|
3044
|
+
exact: false,
|
|
3045
|
+
minimum: check.value,
|
|
3046
|
+
type: "date"
|
|
3047
|
+
});
|
|
3048
|
+
status.dirty();
|
|
3049
|
+
}
|
|
3050
|
+
} else if (check.kind === "max") {
|
|
3051
|
+
if (input.data.getTime() > check.value) {
|
|
3052
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
3053
|
+
addIssueToContext(ctx, {
|
|
3054
|
+
code: ZodIssueCode.too_big,
|
|
3055
|
+
message: check.message,
|
|
3056
|
+
inclusive: true,
|
|
3057
|
+
exact: false,
|
|
3058
|
+
maximum: check.value,
|
|
3059
|
+
type: "date"
|
|
3060
|
+
});
|
|
3061
|
+
status.dirty();
|
|
3062
|
+
}
|
|
3063
|
+
} else {
|
|
3064
|
+
util.assertNever(check);
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
return {
|
|
3068
|
+
status: status.value,
|
|
3069
|
+
value: new Date(input.data.getTime())
|
|
3070
|
+
};
|
|
3071
|
+
}
|
|
3072
|
+
_addCheck(check) {
|
|
3073
|
+
return new ZodDate({
|
|
3074
|
+
...this._def,
|
|
3075
|
+
checks: [...this._def.checks, check]
|
|
3076
|
+
});
|
|
3077
|
+
}
|
|
3078
|
+
min(minDate, message) {
|
|
2608
3079
|
return this._addCheck({
|
|
2609
3080
|
kind: "min",
|
|
2610
3081
|
value: minDate.getTime(),
|
|
@@ -2642,10 +3113,32 @@ var ZodDate = class extends ZodType {
|
|
|
2642
3113
|
ZodDate.create = (params2) => {
|
|
2643
3114
|
return new ZodDate({
|
|
2644
3115
|
checks: [],
|
|
3116
|
+
coerce: (params2 === null || params2 === void 0 ? void 0 : params2.coerce) || false,
|
|
2645
3117
|
typeName: ZodFirstPartyTypeKind.ZodDate,
|
|
2646
3118
|
...processCreateParams(params2)
|
|
2647
3119
|
});
|
|
2648
3120
|
};
|
|
3121
|
+
var ZodSymbol = class extends ZodType {
|
|
3122
|
+
_parse(input) {
|
|
3123
|
+
const parsedType = this._getType(input);
|
|
3124
|
+
if (parsedType !== ZodParsedType.symbol) {
|
|
3125
|
+
const ctx = this._getOrReturnCtx(input);
|
|
3126
|
+
addIssueToContext(ctx, {
|
|
3127
|
+
code: ZodIssueCode.invalid_type,
|
|
3128
|
+
expected: ZodParsedType.symbol,
|
|
3129
|
+
received: ctx.parsedType
|
|
3130
|
+
});
|
|
3131
|
+
return INVALID;
|
|
3132
|
+
}
|
|
3133
|
+
return OK(input.data);
|
|
3134
|
+
}
|
|
3135
|
+
};
|
|
3136
|
+
ZodSymbol.create = (params2) => {
|
|
3137
|
+
return new ZodSymbol({
|
|
3138
|
+
typeName: ZodFirstPartyTypeKind.ZodSymbol,
|
|
3139
|
+
...processCreateParams(params2)
|
|
3140
|
+
});
|
|
3141
|
+
};
|
|
2649
3142
|
var ZodUndefined = class extends ZodType {
|
|
2650
3143
|
_parse(input) {
|
|
2651
3144
|
const parsedType = this._getType(input);
|
|
@@ -2768,6 +3261,22 @@ var ZodArray = class extends ZodType {
|
|
|
2768
3261
|
});
|
|
2769
3262
|
return INVALID;
|
|
2770
3263
|
}
|
|
3264
|
+
if (def2.exactLength !== null) {
|
|
3265
|
+
const tooBig = ctx.data.length > def2.exactLength.value;
|
|
3266
|
+
const tooSmall = ctx.data.length < def2.exactLength.value;
|
|
3267
|
+
if (tooBig || tooSmall) {
|
|
3268
|
+
addIssueToContext(ctx, {
|
|
3269
|
+
code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,
|
|
3270
|
+
minimum: tooSmall ? def2.exactLength.value : void 0,
|
|
3271
|
+
maximum: tooBig ? def2.exactLength.value : void 0,
|
|
3272
|
+
type: "array",
|
|
3273
|
+
inclusive: true,
|
|
3274
|
+
exact: true,
|
|
3275
|
+
message: def2.exactLength.message
|
|
3276
|
+
});
|
|
3277
|
+
status.dirty();
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
2771
3280
|
if (def2.minLength !== null) {
|
|
2772
3281
|
if (ctx.data.length < def2.minLength.value) {
|
|
2773
3282
|
addIssueToContext(ctx, {
|
|
@@ -2775,6 +3284,7 @@ var ZodArray = class extends ZodType {
|
|
|
2775
3284
|
minimum: def2.minLength.value,
|
|
2776
3285
|
type: "array",
|
|
2777
3286
|
inclusive: true,
|
|
3287
|
+
exact: false,
|
|
2778
3288
|
message: def2.minLength.message
|
|
2779
3289
|
});
|
|
2780
3290
|
status.dirty();
|
|
@@ -2787,19 +3297,20 @@ var ZodArray = class extends ZodType {
|
|
|
2787
3297
|
maximum: def2.maxLength.value,
|
|
2788
3298
|
type: "array",
|
|
2789
3299
|
inclusive: true,
|
|
3300
|
+
exact: false,
|
|
2790
3301
|
message: def2.maxLength.message
|
|
2791
3302
|
});
|
|
2792
3303
|
status.dirty();
|
|
2793
3304
|
}
|
|
2794
3305
|
}
|
|
2795
3306
|
if (ctx.common.async) {
|
|
2796
|
-
return Promise.all(ctx.data.map((item, i) => {
|
|
3307
|
+
return Promise.all([...ctx.data].map((item, i) => {
|
|
2797
3308
|
return def2.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
|
2798
3309
|
})).then((result2) => {
|
|
2799
3310
|
return ParseStatus.mergeArray(status, result2);
|
|
2800
3311
|
});
|
|
2801
3312
|
}
|
|
2802
|
-
const result = ctx.data.map((item, i) => {
|
|
3313
|
+
const result = [...ctx.data].map((item, i) => {
|
|
2803
3314
|
return def2.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
|
2804
3315
|
});
|
|
2805
3316
|
return ParseStatus.mergeArray(status, result);
|
|
@@ -2820,7 +3331,10 @@ var ZodArray = class extends ZodType {
|
|
|
2820
3331
|
});
|
|
2821
3332
|
}
|
|
2822
3333
|
length(len, message) {
|
|
2823
|
-
return
|
|
3334
|
+
return new ZodArray({
|
|
3335
|
+
...this._def,
|
|
3336
|
+
exactLength: { value: len, message: errorUtil.toString(message) }
|
|
3337
|
+
});
|
|
2824
3338
|
}
|
|
2825
3339
|
nonempty(message) {
|
|
2826
3340
|
return this.min(1, message);
|
|
@@ -2831,28 +3345,11 @@ ZodArray.create = (schema2, params2) => {
|
|
|
2831
3345
|
type: schema2,
|
|
2832
3346
|
minLength: null,
|
|
2833
3347
|
maxLength: null,
|
|
3348
|
+
exactLength: null,
|
|
2834
3349
|
typeName: ZodFirstPartyTypeKind.ZodArray,
|
|
2835
3350
|
...processCreateParams(params2)
|
|
2836
3351
|
});
|
|
2837
3352
|
};
|
|
2838
|
-
var objectUtil;
|
|
2839
|
-
(function(objectUtil2) {
|
|
2840
|
-
objectUtil2.mergeShapes = (first, second) => {
|
|
2841
|
-
return {
|
|
2842
|
-
...first,
|
|
2843
|
-
...second
|
|
2844
|
-
};
|
|
2845
|
-
};
|
|
2846
|
-
})(objectUtil || (objectUtil = {}));
|
|
2847
|
-
var AugmentFactory = (def2) => (augmentation) => {
|
|
2848
|
-
return new ZodObject({
|
|
2849
|
-
...def2,
|
|
2850
|
-
shape: () => ({
|
|
2851
|
-
...def2.shape(),
|
|
2852
|
-
...augmentation
|
|
2853
|
-
})
|
|
2854
|
-
});
|
|
2855
|
-
};
|
|
2856
3353
|
function deepPartialify(schema2) {
|
|
2857
3354
|
if (schema2 instanceof ZodObject) {
|
|
2858
3355
|
const newShape = {};
|
|
@@ -2865,7 +3362,10 @@ function deepPartialify(schema2) {
|
|
|
2865
3362
|
shape: () => newShape
|
|
2866
3363
|
});
|
|
2867
3364
|
} else if (schema2 instanceof ZodArray) {
|
|
2868
|
-
return ZodArray
|
|
3365
|
+
return new ZodArray({
|
|
3366
|
+
...schema2._def,
|
|
3367
|
+
type: deepPartialify(schema2.element)
|
|
3368
|
+
});
|
|
2869
3369
|
} else if (schema2 instanceof ZodOptional) {
|
|
2870
3370
|
return ZodOptional.create(deepPartialify(schema2.unwrap()));
|
|
2871
3371
|
} else if (schema2 instanceof ZodNullable) {
|
|
@@ -2881,8 +3381,7 @@ var ZodObject = class extends ZodType {
|
|
|
2881
3381
|
super(...arguments);
|
|
2882
3382
|
this._cached = null;
|
|
2883
3383
|
this.nonstrict = this.passthrough;
|
|
2884
|
-
this.augment =
|
|
2885
|
-
this.extend = AugmentFactory(this._def);
|
|
3384
|
+
this.augment = this.extend;
|
|
2886
3385
|
}
|
|
2887
3386
|
_getCached() {
|
|
2888
3387
|
if (this._cached !== null)
|
|
@@ -3011,18 +3510,30 @@ var ZodObject = class extends ZodType {
|
|
|
3011
3510
|
unknownKeys: "passthrough"
|
|
3012
3511
|
});
|
|
3013
3512
|
}
|
|
3014
|
-
|
|
3015
|
-
return
|
|
3513
|
+
extend(augmentation) {
|
|
3514
|
+
return new ZodObject({
|
|
3515
|
+
...this._def,
|
|
3516
|
+
shape: () => ({
|
|
3517
|
+
...this._def.shape(),
|
|
3518
|
+
...augmentation
|
|
3519
|
+
})
|
|
3520
|
+
});
|
|
3016
3521
|
}
|
|
3017
3522
|
merge(merging) {
|
|
3018
3523
|
const merged = new ZodObject({
|
|
3019
3524
|
unknownKeys: merging._def.unknownKeys,
|
|
3020
3525
|
catchall: merging._def.catchall,
|
|
3021
|
-
shape: () =>
|
|
3526
|
+
shape: () => ({
|
|
3527
|
+
...this._def.shape(),
|
|
3528
|
+
...merging._def.shape()
|
|
3529
|
+
}),
|
|
3022
3530
|
typeName: ZodFirstPartyTypeKind.ZodObject
|
|
3023
3531
|
});
|
|
3024
3532
|
return merged;
|
|
3025
3533
|
}
|
|
3534
|
+
setKey(key, schema2) {
|
|
3535
|
+
return this.augment({ [key]: schema2 });
|
|
3536
|
+
}
|
|
3026
3537
|
catchall(index) {
|
|
3027
3538
|
return new ZodObject({
|
|
3028
3539
|
...this._def,
|
|
@@ -3031,9 +3542,10 @@ var ZodObject = class extends ZodType {
|
|
|
3031
3542
|
}
|
|
3032
3543
|
pick(mask) {
|
|
3033
3544
|
const shape = {};
|
|
3034
|
-
util.objectKeys(mask).
|
|
3035
|
-
if (this.shape[key])
|
|
3545
|
+
util.objectKeys(mask).forEach((key) => {
|
|
3546
|
+
if (mask[key] && this.shape[key]) {
|
|
3036
3547
|
shape[key] = this.shape[key];
|
|
3548
|
+
}
|
|
3037
3549
|
});
|
|
3038
3550
|
return new ZodObject({
|
|
3039
3551
|
...this._def,
|
|
@@ -3042,8 +3554,8 @@ var ZodObject = class extends ZodType {
|
|
|
3042
3554
|
}
|
|
3043
3555
|
omit(mask) {
|
|
3044
3556
|
const shape = {};
|
|
3045
|
-
util.objectKeys(this.shape).
|
|
3046
|
-
if (
|
|
3557
|
+
util.objectKeys(this.shape).forEach((key) => {
|
|
3558
|
+
if (!mask[key]) {
|
|
3047
3559
|
shape[key] = this.shape[key];
|
|
3048
3560
|
}
|
|
3049
3561
|
});
|
|
@@ -3057,39 +3569,33 @@ var ZodObject = class extends ZodType {
|
|
|
3057
3569
|
}
|
|
3058
3570
|
partial(mask) {
|
|
3059
3571
|
const newShape = {};
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
newShape[key] = this.shape[key].optional();
|
|
3066
|
-
}
|
|
3067
|
-
});
|
|
3068
|
-
return new ZodObject({
|
|
3069
|
-
...this._def,
|
|
3070
|
-
shape: () => newShape
|
|
3071
|
-
});
|
|
3072
|
-
} else {
|
|
3073
|
-
for (const key in this.shape) {
|
|
3074
|
-
const fieldSchema = this.shape[key];
|
|
3572
|
+
util.objectKeys(this.shape).forEach((key) => {
|
|
3573
|
+
const fieldSchema = this.shape[key];
|
|
3574
|
+
if (mask && !mask[key]) {
|
|
3575
|
+
newShape[key] = fieldSchema;
|
|
3576
|
+
} else {
|
|
3075
3577
|
newShape[key] = fieldSchema.optional();
|
|
3076
3578
|
}
|
|
3077
|
-
}
|
|
3579
|
+
});
|
|
3078
3580
|
return new ZodObject({
|
|
3079
3581
|
...this._def,
|
|
3080
3582
|
shape: () => newShape
|
|
3081
3583
|
});
|
|
3082
3584
|
}
|
|
3083
|
-
required() {
|
|
3585
|
+
required(mask) {
|
|
3084
3586
|
const newShape = {};
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3587
|
+
util.objectKeys(this.shape).forEach((key) => {
|
|
3588
|
+
if (mask && !mask[key]) {
|
|
3589
|
+
newShape[key] = this.shape[key];
|
|
3590
|
+
} else {
|
|
3591
|
+
const fieldSchema = this.shape[key];
|
|
3592
|
+
let newField = fieldSchema;
|
|
3593
|
+
while (newField instanceof ZodOptional) {
|
|
3594
|
+
newField = newField._def.innerType;
|
|
3595
|
+
}
|
|
3596
|
+
newShape[key] = newField;
|
|
3090
3597
|
}
|
|
3091
|
-
|
|
3092
|
-
}
|
|
3598
|
+
});
|
|
3093
3599
|
return new ZodObject({
|
|
3094
3600
|
...this._def,
|
|
3095
3601
|
shape: () => newShape
|
|
@@ -3217,6 +3723,27 @@ ZodUnion.create = (types, params2) => {
|
|
|
3217
3723
|
...processCreateParams(params2)
|
|
3218
3724
|
});
|
|
3219
3725
|
};
|
|
3726
|
+
var getDiscriminator = (type) => {
|
|
3727
|
+
if (type instanceof ZodLazy) {
|
|
3728
|
+
return getDiscriminator(type.schema);
|
|
3729
|
+
} else if (type instanceof ZodEffects) {
|
|
3730
|
+
return getDiscriminator(type.innerType());
|
|
3731
|
+
} else if (type instanceof ZodLiteral) {
|
|
3732
|
+
return [type.value];
|
|
3733
|
+
} else if (type instanceof ZodEnum) {
|
|
3734
|
+
return type.options;
|
|
3735
|
+
} else if (type instanceof ZodNativeEnum) {
|
|
3736
|
+
return Object.keys(type.enum);
|
|
3737
|
+
} else if (type instanceof ZodDefault) {
|
|
3738
|
+
return getDiscriminator(type._def.innerType);
|
|
3739
|
+
} else if (type instanceof ZodUndefined) {
|
|
3740
|
+
return [void 0];
|
|
3741
|
+
} else if (type instanceof ZodNull) {
|
|
3742
|
+
return [null];
|
|
3743
|
+
} else {
|
|
3744
|
+
return null;
|
|
3745
|
+
}
|
|
3746
|
+
};
|
|
3220
3747
|
var ZodDiscriminatedUnion = class extends ZodType {
|
|
3221
3748
|
_parse(input) {
|
|
3222
3749
|
const { ctx } = this._processInputParams(input);
|
|
@@ -3230,11 +3757,11 @@ var ZodDiscriminatedUnion = class extends ZodType {
|
|
|
3230
3757
|
}
|
|
3231
3758
|
const discriminator = this.discriminator;
|
|
3232
3759
|
const discriminatorValue = ctx.data[discriminator];
|
|
3233
|
-
const option = this.
|
|
3760
|
+
const option = this.optionsMap.get(discriminatorValue);
|
|
3234
3761
|
if (!option) {
|
|
3235
3762
|
addIssueToContext(ctx, {
|
|
3236
3763
|
code: ZodIssueCode.invalid_union_discriminator,
|
|
3237
|
-
options: this.
|
|
3764
|
+
options: Array.from(this.optionsMap.keys()),
|
|
3238
3765
|
path: [discriminator]
|
|
3239
3766
|
});
|
|
3240
3767
|
return INVALID;
|
|
@@ -3256,29 +3783,31 @@ var ZodDiscriminatedUnion = class extends ZodType {
|
|
|
3256
3783
|
get discriminator() {
|
|
3257
3784
|
return this._def.discriminator;
|
|
3258
3785
|
}
|
|
3259
|
-
get validDiscriminatorValues() {
|
|
3260
|
-
return Array.from(this.options.keys());
|
|
3261
|
-
}
|
|
3262
3786
|
get options() {
|
|
3263
3787
|
return this._def.options;
|
|
3264
3788
|
}
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3789
|
+
get optionsMap() {
|
|
3790
|
+
return this._def.optionsMap;
|
|
3791
|
+
}
|
|
3792
|
+
static create(discriminator, options, params2) {
|
|
3793
|
+
const optionsMap = /* @__PURE__ */ new Map();
|
|
3794
|
+
for (const type of options) {
|
|
3795
|
+
const discriminatorValues = getDiscriminator(type.shape[discriminator]);
|
|
3796
|
+
if (!discriminatorValues) {
|
|
3797
|
+
throw new Error(`A discriminator value for key \`${discriminator}\` could not be extracted from all schema options`);
|
|
3798
|
+
}
|
|
3799
|
+
for (const value of discriminatorValues) {
|
|
3800
|
+
if (optionsMap.has(value)) {
|
|
3801
|
+
throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);
|
|
3802
|
+
}
|
|
3803
|
+
optionsMap.set(value, type);
|
|
3804
|
+
}
|
|
3277
3805
|
}
|
|
3278
3806
|
return new ZodDiscriminatedUnion({
|
|
3279
3807
|
typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,
|
|
3280
3808
|
discriminator,
|
|
3281
3809
|
options,
|
|
3810
|
+
optionsMap,
|
|
3282
3811
|
...processCreateParams(params2)
|
|
3283
3812
|
});
|
|
3284
3813
|
}
|
|
@@ -3390,6 +3919,7 @@ var ZodTuple = class extends ZodType {
|
|
|
3390
3919
|
code: ZodIssueCode.too_small,
|
|
3391
3920
|
minimum: this._def.items.length,
|
|
3392
3921
|
inclusive: true,
|
|
3922
|
+
exact: false,
|
|
3393
3923
|
type: "array"
|
|
3394
3924
|
});
|
|
3395
3925
|
return INVALID;
|
|
@@ -3400,11 +3930,12 @@ var ZodTuple = class extends ZodType {
|
|
|
3400
3930
|
code: ZodIssueCode.too_big,
|
|
3401
3931
|
maximum: this._def.items.length,
|
|
3402
3932
|
inclusive: true,
|
|
3933
|
+
exact: false,
|
|
3403
3934
|
type: "array"
|
|
3404
3935
|
});
|
|
3405
3936
|
status.dirty();
|
|
3406
3937
|
}
|
|
3407
|
-
const items = ctx.data.map((item, itemIndex) => {
|
|
3938
|
+
const items = [...ctx.data].map((item, itemIndex) => {
|
|
3408
3939
|
const schema2 = this._def.items[itemIndex] || this._def.rest;
|
|
3409
3940
|
if (!schema2)
|
|
3410
3941
|
return null;
|
|
@@ -3570,6 +4101,7 @@ var ZodSet = class extends ZodType {
|
|
|
3570
4101
|
minimum: def2.minSize.value,
|
|
3571
4102
|
type: "set",
|
|
3572
4103
|
inclusive: true,
|
|
4104
|
+
exact: false,
|
|
3573
4105
|
message: def2.minSize.message
|
|
3574
4106
|
});
|
|
3575
4107
|
status.dirty();
|
|
@@ -3582,6 +4114,7 @@ var ZodSet = class extends ZodType {
|
|
|
3582
4114
|
maximum: def2.maxSize.value,
|
|
3583
4115
|
type: "set",
|
|
3584
4116
|
inclusive: true,
|
|
4117
|
+
exact: false,
|
|
3585
4118
|
message: def2.maxSize.message
|
|
3586
4119
|
});
|
|
3587
4120
|
status.dirty();
|
|
@@ -3769,6 +4302,7 @@ var ZodLiteral = class extends ZodType {
|
|
|
3769
4302
|
if (input.data !== this._def.value) {
|
|
3770
4303
|
const ctx = this._getOrReturnCtx(input);
|
|
3771
4304
|
addIssueToContext(ctx, {
|
|
4305
|
+
received: ctx.data,
|
|
3772
4306
|
code: ZodIssueCode.invalid_literal,
|
|
3773
4307
|
expected: this._def.value
|
|
3774
4308
|
});
|
|
@@ -3842,6 +4376,12 @@ var ZodEnum = class extends ZodType {
|
|
|
3842
4376
|
}
|
|
3843
4377
|
return enumValues;
|
|
3844
4378
|
}
|
|
4379
|
+
extract(values) {
|
|
4380
|
+
return ZodEnum.create(values);
|
|
4381
|
+
}
|
|
4382
|
+
exclude(values) {
|
|
4383
|
+
return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));
|
|
4384
|
+
}
|
|
3845
4385
|
};
|
|
3846
4386
|
ZodEnum.create = createZodEnum;
|
|
3847
4387
|
var ZodNativeEnum = class extends ZodType {
|
|
@@ -3880,6 +4420,9 @@ ZodNativeEnum.create = (values, params2) => {
|
|
|
3880
4420
|
});
|
|
3881
4421
|
};
|
|
3882
4422
|
var ZodPromise = class extends ZodType {
|
|
4423
|
+
unwrap() {
|
|
4424
|
+
return this._def.type;
|
|
4425
|
+
}
|
|
3883
4426
|
_parse(input) {
|
|
3884
4427
|
const { ctx } = this._processInputParams(input);
|
|
3885
4428
|
if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
|
|
@@ -3910,6 +4453,9 @@ var ZodEffects = class extends ZodType {
|
|
|
3910
4453
|
innerType() {
|
|
3911
4454
|
return this._def.schema;
|
|
3912
4455
|
}
|
|
4456
|
+
sourceType() {
|
|
4457
|
+
return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
4458
|
+
}
|
|
3913
4459
|
_parse(input) {
|
|
3914
4460
|
const { status, ctx } = this._processInputParams(input);
|
|
3915
4461
|
const effect = this._def.effect || null;
|
|
@@ -4077,26 +4623,80 @@ var ZodDefault = class extends ZodType {
|
|
|
4077
4623
|
}
|
|
4078
4624
|
};
|
|
4079
4625
|
ZodDefault.create = (type, params2) => {
|
|
4080
|
-
return new
|
|
4626
|
+
return new ZodDefault({
|
|
4081
4627
|
innerType: type,
|
|
4082
|
-
typeName: ZodFirstPartyTypeKind.
|
|
4628
|
+
typeName: ZodFirstPartyTypeKind.ZodDefault,
|
|
4629
|
+
defaultValue: typeof params2.default === "function" ? params2.default : () => params2.default,
|
|
4083
4630
|
...processCreateParams(params2)
|
|
4084
4631
|
});
|
|
4085
4632
|
};
|
|
4086
|
-
var
|
|
4633
|
+
var ZodCatch = class extends ZodType {
|
|
4087
4634
|
_parse(input) {
|
|
4088
|
-
const
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4635
|
+
const { ctx } = this._processInputParams(input);
|
|
4636
|
+
const newCtx = {
|
|
4637
|
+
...ctx,
|
|
4638
|
+
common: {
|
|
4639
|
+
...ctx.common,
|
|
4640
|
+
issues: []
|
|
4641
|
+
}
|
|
4642
|
+
};
|
|
4643
|
+
const result = this._def.innerType._parse({
|
|
4644
|
+
data: newCtx.data,
|
|
4645
|
+
path: newCtx.path,
|
|
4646
|
+
parent: {
|
|
4647
|
+
...newCtx
|
|
4648
|
+
}
|
|
4649
|
+
});
|
|
4650
|
+
if (isAsync(result)) {
|
|
4651
|
+
return result.then((result2) => {
|
|
4652
|
+
return {
|
|
4653
|
+
status: "valid",
|
|
4654
|
+
value: result2.status === "valid" ? result2.value : this._def.catchValue({
|
|
4655
|
+
get error() {
|
|
4656
|
+
return new ZodError(newCtx.common.issues);
|
|
4657
|
+
},
|
|
4658
|
+
input: newCtx.data
|
|
4659
|
+
})
|
|
4660
|
+
};
|
|
4095
4661
|
});
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4662
|
+
} else {
|
|
4663
|
+
return {
|
|
4664
|
+
status: "valid",
|
|
4665
|
+
value: result.status === "valid" ? result.value : this._def.catchValue({
|
|
4666
|
+
get error() {
|
|
4667
|
+
return new ZodError(newCtx.common.issues);
|
|
4668
|
+
},
|
|
4669
|
+
input: newCtx.data
|
|
4670
|
+
})
|
|
4671
|
+
};
|
|
4672
|
+
}
|
|
4673
|
+
}
|
|
4674
|
+
removeCatch() {
|
|
4675
|
+
return this._def.innerType;
|
|
4676
|
+
}
|
|
4677
|
+
};
|
|
4678
|
+
ZodCatch.create = (type, params2) => {
|
|
4679
|
+
return new ZodCatch({
|
|
4680
|
+
innerType: type,
|
|
4681
|
+
typeName: ZodFirstPartyTypeKind.ZodCatch,
|
|
4682
|
+
catchValue: typeof params2.catch === "function" ? params2.catch : () => params2.catch,
|
|
4683
|
+
...processCreateParams(params2)
|
|
4684
|
+
});
|
|
4685
|
+
};
|
|
4686
|
+
var ZodNaN = class extends ZodType {
|
|
4687
|
+
_parse(input) {
|
|
4688
|
+
const parsedType = this._getType(input);
|
|
4689
|
+
if (parsedType !== ZodParsedType.nan) {
|
|
4690
|
+
const ctx = this._getOrReturnCtx(input);
|
|
4691
|
+
addIssueToContext(ctx, {
|
|
4692
|
+
code: ZodIssueCode.invalid_type,
|
|
4693
|
+
expected: ZodParsedType.nan,
|
|
4694
|
+
received: ctx.parsedType
|
|
4695
|
+
});
|
|
4696
|
+
return INVALID;
|
|
4697
|
+
}
|
|
4698
|
+
return { status: "valid", value: input.data };
|
|
4699
|
+
}
|
|
4100
4700
|
};
|
|
4101
4701
|
ZodNaN.create = (params2) => {
|
|
4102
4702
|
return new ZodNaN({
|
|
@@ -4119,13 +4719,70 @@ var ZodBranded = class extends ZodType {
|
|
|
4119
4719
|
return this._def.type;
|
|
4120
4720
|
}
|
|
4121
4721
|
};
|
|
4722
|
+
var ZodPipeline = class extends ZodType {
|
|
4723
|
+
_parse(input) {
|
|
4724
|
+
const { status, ctx } = this._processInputParams(input);
|
|
4725
|
+
if (ctx.common.async) {
|
|
4726
|
+
const handleAsync = async () => {
|
|
4727
|
+
const inResult = await this._def.in._parseAsync({
|
|
4728
|
+
data: ctx.data,
|
|
4729
|
+
path: ctx.path,
|
|
4730
|
+
parent: ctx
|
|
4731
|
+
});
|
|
4732
|
+
if (inResult.status === "aborted")
|
|
4733
|
+
return INVALID;
|
|
4734
|
+
if (inResult.status === "dirty") {
|
|
4735
|
+
status.dirty();
|
|
4736
|
+
return DIRTY(inResult.value);
|
|
4737
|
+
} else {
|
|
4738
|
+
return this._def.out._parseAsync({
|
|
4739
|
+
data: inResult.value,
|
|
4740
|
+
path: ctx.path,
|
|
4741
|
+
parent: ctx
|
|
4742
|
+
});
|
|
4743
|
+
}
|
|
4744
|
+
};
|
|
4745
|
+
return handleAsync();
|
|
4746
|
+
} else {
|
|
4747
|
+
const inResult = this._def.in._parseSync({
|
|
4748
|
+
data: ctx.data,
|
|
4749
|
+
path: ctx.path,
|
|
4750
|
+
parent: ctx
|
|
4751
|
+
});
|
|
4752
|
+
if (inResult.status === "aborted")
|
|
4753
|
+
return INVALID;
|
|
4754
|
+
if (inResult.status === "dirty") {
|
|
4755
|
+
status.dirty();
|
|
4756
|
+
return {
|
|
4757
|
+
status: "dirty",
|
|
4758
|
+
value: inResult.value
|
|
4759
|
+
};
|
|
4760
|
+
} else {
|
|
4761
|
+
return this._def.out._parseSync({
|
|
4762
|
+
data: inResult.value,
|
|
4763
|
+
path: ctx.path,
|
|
4764
|
+
parent: ctx
|
|
4765
|
+
});
|
|
4766
|
+
}
|
|
4767
|
+
}
|
|
4768
|
+
}
|
|
4769
|
+
static create(a, b) {
|
|
4770
|
+
return new ZodPipeline({
|
|
4771
|
+
in: a,
|
|
4772
|
+
out: b,
|
|
4773
|
+
typeName: ZodFirstPartyTypeKind.ZodPipeline
|
|
4774
|
+
});
|
|
4775
|
+
}
|
|
4776
|
+
};
|
|
4122
4777
|
var custom = (check, params2 = {}, fatal) => {
|
|
4123
4778
|
if (check)
|
|
4124
4779
|
return ZodAny.create().superRefine((data, ctx) => {
|
|
4780
|
+
var _a, _b;
|
|
4125
4781
|
if (!check(data)) {
|
|
4126
|
-
const p = typeof params2 === "function" ? params2(data) : params2;
|
|
4782
|
+
const p = typeof params2 === "function" ? params2(data) : typeof params2 === "string" ? { message: params2 } : params2;
|
|
4783
|
+
const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;
|
|
4127
4784
|
const p2 = typeof p === "string" ? { message: p } : p;
|
|
4128
|
-
ctx.addIssue({ code: "custom", ...p2, fatal });
|
|
4785
|
+
ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
|
|
4129
4786
|
}
|
|
4130
4787
|
});
|
|
4131
4788
|
return ZodAny.create();
|
|
@@ -4141,6 +4798,7 @@ var ZodFirstPartyTypeKind;
|
|
|
4141
4798
|
ZodFirstPartyTypeKind2["ZodBigInt"] = "ZodBigInt";
|
|
4142
4799
|
ZodFirstPartyTypeKind2["ZodBoolean"] = "ZodBoolean";
|
|
4143
4800
|
ZodFirstPartyTypeKind2["ZodDate"] = "ZodDate";
|
|
4801
|
+
ZodFirstPartyTypeKind2["ZodSymbol"] = "ZodSymbol";
|
|
4144
4802
|
ZodFirstPartyTypeKind2["ZodUndefined"] = "ZodUndefined";
|
|
4145
4803
|
ZodFirstPartyTypeKind2["ZodNull"] = "ZodNull";
|
|
4146
4804
|
ZodFirstPartyTypeKind2["ZodAny"] = "ZodAny";
|
|
@@ -4165,18 +4823,21 @@ var ZodFirstPartyTypeKind;
|
|
|
4165
4823
|
ZodFirstPartyTypeKind2["ZodOptional"] = "ZodOptional";
|
|
4166
4824
|
ZodFirstPartyTypeKind2["ZodNullable"] = "ZodNullable";
|
|
4167
4825
|
ZodFirstPartyTypeKind2["ZodDefault"] = "ZodDefault";
|
|
4826
|
+
ZodFirstPartyTypeKind2["ZodCatch"] = "ZodCatch";
|
|
4168
4827
|
ZodFirstPartyTypeKind2["ZodPromise"] = "ZodPromise";
|
|
4169
4828
|
ZodFirstPartyTypeKind2["ZodBranded"] = "ZodBranded";
|
|
4829
|
+
ZodFirstPartyTypeKind2["ZodPipeline"] = "ZodPipeline";
|
|
4170
4830
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
4171
4831
|
var instanceOfType = (cls, params2 = {
|
|
4172
4832
|
message: `Input not instance of ${cls.name}`
|
|
4173
|
-
}) => custom((data) => data instanceof cls, params2
|
|
4833
|
+
}) => custom((data) => data instanceof cls, params2);
|
|
4174
4834
|
var stringType = ZodString.create;
|
|
4175
4835
|
var numberType = ZodNumber.create;
|
|
4176
4836
|
var nanType = ZodNaN.create;
|
|
4177
4837
|
var bigIntType = ZodBigInt.create;
|
|
4178
4838
|
var booleanType = ZodBoolean.create;
|
|
4179
4839
|
var dateType = ZodDate.create;
|
|
4840
|
+
var symbolType = ZodSymbol.create;
|
|
4180
4841
|
var undefinedType = ZodUndefined.create;
|
|
4181
4842
|
var nullType = ZodNull.create;
|
|
4182
4843
|
var anyType = ZodAny.create;
|
|
@@ -4203,14 +4864,23 @@ var effectsType = ZodEffects.create;
|
|
|
4203
4864
|
var optionalType = ZodOptional.create;
|
|
4204
4865
|
var nullableType = ZodNullable.create;
|
|
4205
4866
|
var preprocessType = ZodEffects.createWithPreprocess;
|
|
4867
|
+
var pipelineType = ZodPipeline.create;
|
|
4206
4868
|
var ostring = () => stringType().optional();
|
|
4207
4869
|
var onumber = () => numberType().optional();
|
|
4208
4870
|
var oboolean = () => booleanType().optional();
|
|
4871
|
+
var coerce2 = {
|
|
4872
|
+
string: (arg) => ZodString.create({ ...arg, coerce: true }),
|
|
4873
|
+
number: (arg) => ZodNumber.create({ ...arg, coerce: true }),
|
|
4874
|
+
boolean: (arg) => ZodBoolean.create({
|
|
4875
|
+
...arg,
|
|
4876
|
+
coerce: true
|
|
4877
|
+
}),
|
|
4878
|
+
bigint: (arg) => ZodBigInt.create({ ...arg, coerce: true }),
|
|
4879
|
+
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
4880
|
+
};
|
|
4209
4881
|
var NEVER = INVALID;
|
|
4210
|
-
var
|
|
4882
|
+
var z = /* @__PURE__ */ Object.freeze({
|
|
4211
4883
|
__proto__: null,
|
|
4212
|
-
getParsedType,
|
|
4213
|
-
ZodParsedType,
|
|
4214
4884
|
defaultErrorMap: errorMap,
|
|
4215
4885
|
setErrorMap,
|
|
4216
4886
|
getErrorMap,
|
|
@@ -4225,12 +4895,21 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
4225
4895
|
isDirty,
|
|
4226
4896
|
isValid,
|
|
4227
4897
|
isAsync,
|
|
4898
|
+
get util() {
|
|
4899
|
+
return util;
|
|
4900
|
+
},
|
|
4901
|
+
get objectUtil() {
|
|
4902
|
+
return objectUtil;
|
|
4903
|
+
},
|
|
4904
|
+
ZodParsedType,
|
|
4905
|
+
getParsedType,
|
|
4228
4906
|
ZodType,
|
|
4229
4907
|
ZodString,
|
|
4230
4908
|
ZodNumber,
|
|
4231
4909
|
ZodBigInt,
|
|
4232
4910
|
ZodBoolean,
|
|
4233
4911
|
ZodDate,
|
|
4912
|
+
ZodSymbol,
|
|
4234
4913
|
ZodUndefined,
|
|
4235
4914
|
ZodNull,
|
|
4236
4915
|
ZodAny,
|
|
@@ -4238,9 +4917,6 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
4238
4917
|
ZodNever,
|
|
4239
4918
|
ZodVoid,
|
|
4240
4919
|
ZodArray,
|
|
4241
|
-
get objectUtil() {
|
|
4242
|
-
return objectUtil;
|
|
4243
|
-
},
|
|
4244
4920
|
ZodObject,
|
|
4245
4921
|
ZodUnion,
|
|
4246
4922
|
ZodDiscriminatedUnion,
|
|
@@ -4260,9 +4936,11 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
4260
4936
|
ZodOptional,
|
|
4261
4937
|
ZodNullable,
|
|
4262
4938
|
ZodDefault,
|
|
4939
|
+
ZodCatch,
|
|
4263
4940
|
ZodNaN,
|
|
4264
4941
|
BRAND,
|
|
4265
4942
|
ZodBranded,
|
|
4943
|
+
ZodPipeline,
|
|
4266
4944
|
custom,
|
|
4267
4945
|
Schema: ZodType,
|
|
4268
4946
|
ZodSchema: ZodType,
|
|
@@ -4270,6 +4948,7 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
4270
4948
|
get ZodFirstPartyTypeKind() {
|
|
4271
4949
|
return ZodFirstPartyTypeKind;
|
|
4272
4950
|
},
|
|
4951
|
+
coerce: coerce2,
|
|
4273
4952
|
any: anyType,
|
|
4274
4953
|
array: arrayType,
|
|
4275
4954
|
bigint: bigIntType,
|
|
@@ -4295,12 +4974,14 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
4295
4974
|
onumber,
|
|
4296
4975
|
optional: optionalType,
|
|
4297
4976
|
ostring,
|
|
4977
|
+
pipeline: pipelineType,
|
|
4298
4978
|
preprocess: preprocessType,
|
|
4299
4979
|
promise: promiseType,
|
|
4300
4980
|
record: recordType,
|
|
4301
4981
|
set: setType,
|
|
4302
4982
|
strictObject: strictObjectType,
|
|
4303
4983
|
string: stringType,
|
|
4984
|
+
symbol: symbolType,
|
|
4304
4985
|
transformer: effectsType,
|
|
4305
4986
|
tuple: tupleType,
|
|
4306
4987
|
"undefined": undefinedType,
|
|
@@ -4314,16 +4995,16 @@ var mod = /* @__PURE__ */ Object.freeze({
|
|
|
4314
4995
|
});
|
|
4315
4996
|
|
|
4316
4997
|
// ../common-web/src/types.ts
|
|
4317
|
-
var cidSchema =
|
|
4998
|
+
var cidSchema = z.any().refine((obj) => CID.asCID(obj) !== null, {
|
|
4318
4999
|
message: "Not a CID"
|
|
4319
5000
|
}).transform((obj) => CID.asCID(obj));
|
|
4320
5001
|
var schema = {
|
|
4321
5002
|
cid: cidSchema,
|
|
4322
|
-
bytes:
|
|
4323
|
-
string:
|
|
4324
|
-
array:
|
|
4325
|
-
map:
|
|
4326
|
-
unknown:
|
|
5003
|
+
bytes: z.instanceof(Uint8Array),
|
|
5004
|
+
string: z.string(),
|
|
5005
|
+
array: z.array(z.unknown()),
|
|
5006
|
+
map: z.record(z.string(), z.unknown()),
|
|
5007
|
+
unknown: z.unknown()
|
|
4327
5008
|
};
|
|
4328
5009
|
var def = {
|
|
4329
5010
|
cid: {
|
|
@@ -5531,7 +6212,7 @@ var ensureValidNsid = (nsid2) => {
|
|
|
5531
6212
|
throw new InvalidNsidError("NSID domain part too long (max 63 chars)");
|
|
5532
6213
|
}
|
|
5533
6214
|
if (l.length > 128 && i + 1 == labels.length) {
|
|
5534
|
-
throw new InvalidNsidError("NSID name part too long (max
|
|
6215
|
+
throw new InvalidNsidError("NSID name part too long (max 128 chars)");
|
|
5535
6216
|
}
|
|
5536
6217
|
if (l.endsWith("-")) {
|
|
5537
6218
|
throw new InvalidNsidError("NSID parts can not end with hyphen");
|
|
@@ -5728,22 +6409,22 @@ function parseRelative(str) {
|
|
|
5728
6409
|
}
|
|
5729
6410
|
|
|
5730
6411
|
// ../lexicon/src/types.ts
|
|
5731
|
-
var lexBoolean =
|
|
5732
|
-
type:
|
|
5733
|
-
description:
|
|
5734
|
-
default:
|
|
5735
|
-
const:
|
|
6412
|
+
var lexBoolean = z.object({
|
|
6413
|
+
type: z.literal("boolean"),
|
|
6414
|
+
description: z.string().optional(),
|
|
6415
|
+
default: z.boolean().optional(),
|
|
6416
|
+
const: z.boolean().optional()
|
|
5736
6417
|
});
|
|
5737
|
-
var lexInteger =
|
|
5738
|
-
type:
|
|
5739
|
-
description:
|
|
5740
|
-
default:
|
|
5741
|
-
minimum:
|
|
5742
|
-
maximum:
|
|
5743
|
-
enum:
|
|
5744
|
-
const:
|
|
6418
|
+
var lexInteger = z.object({
|
|
6419
|
+
type: z.literal("integer"),
|
|
6420
|
+
description: z.string().optional(),
|
|
6421
|
+
default: z.number().int().optional(),
|
|
6422
|
+
minimum: z.number().int().optional(),
|
|
6423
|
+
maximum: z.number().int().optional(),
|
|
6424
|
+
enum: z.number().int().array().optional(),
|
|
6425
|
+
const: z.number().int().optional()
|
|
5745
6426
|
});
|
|
5746
|
-
var lexStringFormat =
|
|
6427
|
+
var lexStringFormat = z.enum([
|
|
5747
6428
|
"datetime",
|
|
5748
6429
|
"uri",
|
|
5749
6430
|
"at-uri",
|
|
@@ -5753,132 +6434,132 @@ var lexStringFormat = mod.enum([
|
|
|
5753
6434
|
"nsid",
|
|
5754
6435
|
"cid"
|
|
5755
6436
|
]);
|
|
5756
|
-
var lexString =
|
|
5757
|
-
type:
|
|
6437
|
+
var lexString = z.object({
|
|
6438
|
+
type: z.literal("string"),
|
|
5758
6439
|
format: lexStringFormat.optional(),
|
|
5759
|
-
description:
|
|
5760
|
-
default:
|
|
5761
|
-
minLength:
|
|
5762
|
-
maxLength:
|
|
5763
|
-
minGraphemes:
|
|
5764
|
-
maxGraphemes:
|
|
5765
|
-
enum:
|
|
5766
|
-
const:
|
|
5767
|
-
knownValues:
|
|
6440
|
+
description: z.string().optional(),
|
|
6441
|
+
default: z.string().optional(),
|
|
6442
|
+
minLength: z.number().int().optional(),
|
|
6443
|
+
maxLength: z.number().int().optional(),
|
|
6444
|
+
minGraphemes: z.number().int().optional(),
|
|
6445
|
+
maxGraphemes: z.number().int().optional(),
|
|
6446
|
+
enum: z.string().array().optional(),
|
|
6447
|
+
const: z.string().optional(),
|
|
6448
|
+
knownValues: z.string().array().optional()
|
|
5768
6449
|
});
|
|
5769
|
-
var lexUnknown =
|
|
5770
|
-
type:
|
|
5771
|
-
description:
|
|
6450
|
+
var lexUnknown = z.object({
|
|
6451
|
+
type: z.literal("unknown"),
|
|
6452
|
+
description: z.string().optional()
|
|
5772
6453
|
});
|
|
5773
|
-
var lexPrimitive =
|
|
6454
|
+
var lexPrimitive = z.discriminatedUnion("type", [
|
|
5774
6455
|
lexBoolean,
|
|
5775
6456
|
lexInteger,
|
|
5776
6457
|
lexString,
|
|
5777
6458
|
lexUnknown
|
|
5778
6459
|
]);
|
|
5779
|
-
var lexBytes =
|
|
5780
|
-
type:
|
|
5781
|
-
description:
|
|
5782
|
-
maxLength:
|
|
5783
|
-
minLength:
|
|
6460
|
+
var lexBytes = z.object({
|
|
6461
|
+
type: z.literal("bytes"),
|
|
6462
|
+
description: z.string().optional(),
|
|
6463
|
+
maxLength: z.number().optional(),
|
|
6464
|
+
minLength: z.number().optional()
|
|
5784
6465
|
});
|
|
5785
|
-
var lexCidLink =
|
|
5786
|
-
type:
|
|
5787
|
-
description:
|
|
6466
|
+
var lexCidLink = z.object({
|
|
6467
|
+
type: z.literal("cid-link"),
|
|
6468
|
+
description: z.string().optional()
|
|
5788
6469
|
});
|
|
5789
|
-
var lexIpldType =
|
|
5790
|
-
var lexRef =
|
|
5791
|
-
type:
|
|
5792
|
-
description:
|
|
5793
|
-
ref:
|
|
6470
|
+
var lexIpldType = z.discriminatedUnion("type", [lexBytes, lexCidLink]);
|
|
6471
|
+
var lexRef = z.object({
|
|
6472
|
+
type: z.literal("ref"),
|
|
6473
|
+
description: z.string().optional(),
|
|
6474
|
+
ref: z.string()
|
|
5794
6475
|
});
|
|
5795
|
-
var lexRefUnion =
|
|
5796
|
-
type:
|
|
5797
|
-
description:
|
|
5798
|
-
refs:
|
|
5799
|
-
closed:
|
|
6476
|
+
var lexRefUnion = z.object({
|
|
6477
|
+
type: z.literal("union"),
|
|
6478
|
+
description: z.string().optional(),
|
|
6479
|
+
refs: z.string().array(),
|
|
6480
|
+
closed: z.boolean().optional()
|
|
5800
6481
|
});
|
|
5801
|
-
var lexRefVariant =
|
|
5802
|
-
var lexBlob =
|
|
5803
|
-
type:
|
|
5804
|
-
description:
|
|
5805
|
-
accept:
|
|
5806
|
-
maxSize:
|
|
6482
|
+
var lexRefVariant = z.discriminatedUnion("type", [lexRef, lexRefUnion]);
|
|
6483
|
+
var lexBlob = z.object({
|
|
6484
|
+
type: z.literal("blob"),
|
|
6485
|
+
description: z.string().optional(),
|
|
6486
|
+
accept: z.string().array().optional(),
|
|
6487
|
+
maxSize: z.number().optional()
|
|
5807
6488
|
});
|
|
5808
|
-
var lexArray =
|
|
5809
|
-
type:
|
|
5810
|
-
description:
|
|
5811
|
-
items:
|
|
5812
|
-
minLength:
|
|
5813
|
-
maxLength:
|
|
6489
|
+
var lexArray = z.object({
|
|
6490
|
+
type: z.literal("array"),
|
|
6491
|
+
description: z.string().optional(),
|
|
6492
|
+
items: z.union([lexPrimitive, lexIpldType, lexBlob, lexRefVariant]),
|
|
6493
|
+
minLength: z.number().int().optional(),
|
|
6494
|
+
maxLength: z.number().int().optional()
|
|
5814
6495
|
});
|
|
5815
6496
|
var lexPrimitiveArray = lexArray.merge(
|
|
5816
|
-
|
|
6497
|
+
z.object({
|
|
5817
6498
|
items: lexPrimitive
|
|
5818
6499
|
})
|
|
5819
6500
|
);
|
|
5820
|
-
var lexToken =
|
|
5821
|
-
type:
|
|
5822
|
-
description:
|
|
6501
|
+
var lexToken = z.object({
|
|
6502
|
+
type: z.literal("token"),
|
|
6503
|
+
description: z.string().optional()
|
|
5823
6504
|
});
|
|
5824
|
-
var lexObject =
|
|
5825
|
-
type:
|
|
5826
|
-
description:
|
|
5827
|
-
required:
|
|
5828
|
-
nullable:
|
|
5829
|
-
properties:
|
|
5830
|
-
|
|
6505
|
+
var lexObject = z.object({
|
|
6506
|
+
type: z.literal("object"),
|
|
6507
|
+
description: z.string().optional(),
|
|
6508
|
+
required: z.string().array().optional(),
|
|
6509
|
+
nullable: z.string().array().optional(),
|
|
6510
|
+
properties: z.record(
|
|
6511
|
+
z.union([lexRefVariant, lexIpldType, lexArray, lexBlob, lexPrimitive])
|
|
5831
6512
|
).optional()
|
|
5832
6513
|
});
|
|
5833
|
-
var lexXrpcParameters =
|
|
5834
|
-
type:
|
|
5835
|
-
description:
|
|
5836
|
-
required:
|
|
5837
|
-
properties:
|
|
6514
|
+
var lexXrpcParameters = z.object({
|
|
6515
|
+
type: z.literal("params"),
|
|
6516
|
+
description: z.string().optional(),
|
|
6517
|
+
required: z.string().array().optional(),
|
|
6518
|
+
properties: z.record(z.union([lexPrimitive, lexPrimitiveArray]))
|
|
5838
6519
|
});
|
|
5839
|
-
var lexXrpcBody =
|
|
5840
|
-
description:
|
|
5841
|
-
encoding:
|
|
5842
|
-
schema:
|
|
6520
|
+
var lexXrpcBody = z.object({
|
|
6521
|
+
description: z.string().optional(),
|
|
6522
|
+
encoding: z.string(),
|
|
6523
|
+
schema: z.union([lexRefVariant, lexObject]).optional()
|
|
5843
6524
|
});
|
|
5844
|
-
var lexXrpcSubscriptionMessage =
|
|
5845
|
-
description:
|
|
5846
|
-
schema:
|
|
6525
|
+
var lexXrpcSubscriptionMessage = z.object({
|
|
6526
|
+
description: z.string().optional(),
|
|
6527
|
+
schema: z.union([lexRefVariant, lexObject]).optional()
|
|
5847
6528
|
});
|
|
5848
|
-
var lexXrpcError =
|
|
5849
|
-
name:
|
|
5850
|
-
description:
|
|
6529
|
+
var lexXrpcError = z.object({
|
|
6530
|
+
name: z.string(),
|
|
6531
|
+
description: z.string().optional()
|
|
5851
6532
|
});
|
|
5852
|
-
var lexXrpcQuery =
|
|
5853
|
-
type:
|
|
5854
|
-
description:
|
|
6533
|
+
var lexXrpcQuery = z.object({
|
|
6534
|
+
type: z.literal("query"),
|
|
6535
|
+
description: z.string().optional(),
|
|
5855
6536
|
parameters: lexXrpcParameters.optional(),
|
|
5856
6537
|
output: lexXrpcBody.optional(),
|
|
5857
6538
|
errors: lexXrpcError.array().optional()
|
|
5858
6539
|
});
|
|
5859
|
-
var lexXrpcProcedure =
|
|
5860
|
-
type:
|
|
5861
|
-
description:
|
|
6540
|
+
var lexXrpcProcedure = z.object({
|
|
6541
|
+
type: z.literal("procedure"),
|
|
6542
|
+
description: z.string().optional(),
|
|
5862
6543
|
parameters: lexXrpcParameters.optional(),
|
|
5863
6544
|
input: lexXrpcBody.optional(),
|
|
5864
6545
|
output: lexXrpcBody.optional(),
|
|
5865
6546
|
errors: lexXrpcError.array().optional()
|
|
5866
6547
|
});
|
|
5867
|
-
var lexXrpcSubscription =
|
|
5868
|
-
type:
|
|
5869
|
-
description:
|
|
6548
|
+
var lexXrpcSubscription = z.object({
|
|
6549
|
+
type: z.literal("subscription"),
|
|
6550
|
+
description: z.string().optional(),
|
|
5870
6551
|
parameters: lexXrpcParameters.optional(),
|
|
5871
6552
|
message: lexXrpcSubscriptionMessage.optional(),
|
|
5872
6553
|
infos: lexXrpcError.array().optional(),
|
|
5873
6554
|
errors: lexXrpcError.array().optional()
|
|
5874
6555
|
});
|
|
5875
|
-
var lexRecord =
|
|
5876
|
-
type:
|
|
5877
|
-
description:
|
|
5878
|
-
key:
|
|
6556
|
+
var lexRecord = z.object({
|
|
6557
|
+
type: z.literal("record"),
|
|
6558
|
+
description: z.string().optional(),
|
|
6559
|
+
key: z.string().optional(),
|
|
5879
6560
|
record: lexObject
|
|
5880
6561
|
});
|
|
5881
|
-
var lexUserType =
|
|
6562
|
+
var lexUserType = z.discriminatedUnion("type", [
|
|
5882
6563
|
lexRecord,
|
|
5883
6564
|
lexXrpcQuery,
|
|
5884
6565
|
lexXrpcProcedure,
|
|
@@ -5894,20 +6575,20 @@ var lexUserType = mod.union([
|
|
|
5894
6575
|
lexCidLink,
|
|
5895
6576
|
lexUnknown
|
|
5896
6577
|
]);
|
|
5897
|
-
var lexiconDoc =
|
|
5898
|
-
lexicon:
|
|
5899
|
-
id:
|
|
6578
|
+
var lexiconDoc = z.object({
|
|
6579
|
+
lexicon: z.literal(1),
|
|
6580
|
+
id: z.string().refine((v) => NSID.isValid(v), {
|
|
5900
6581
|
message: "Must be a valid NSID"
|
|
5901
6582
|
}),
|
|
5902
|
-
revision:
|
|
5903
|
-
description:
|
|
5904
|
-
defs:
|
|
6583
|
+
revision: z.number().optional(),
|
|
6584
|
+
description: z.string().optional(),
|
|
6585
|
+
defs: z.record(lexUserType)
|
|
5905
6586
|
}).superRefine((doc, ctx) => {
|
|
5906
6587
|
for (const defId in doc.defs) {
|
|
5907
6588
|
const def2 = doc.defs[defId];
|
|
5908
6589
|
if (defId !== "main" && (def2.type === "record" || def2.type === "procedure" || def2.type === "query" || def2.type === "subscription")) {
|
|
5909
6590
|
ctx.addIssue({
|
|
5910
|
-
code:
|
|
6591
|
+
code: z.ZodIssueCode.custom,
|
|
5911
6592
|
message: `Records, procedures, queries, and subscriptions must be the main definition.`
|
|
5912
6593
|
});
|
|
5913
6594
|
}
|
|
@@ -5919,7 +6600,7 @@ function isObj(obj) {
|
|
|
5919
6600
|
function hasProp(data, prop) {
|
|
5920
6601
|
return prop in data;
|
|
5921
6602
|
}
|
|
5922
|
-
var discriminatedObject =
|
|
6603
|
+
var discriminatedObject = z.object({ $type: z.string() });
|
|
5923
6604
|
function isDiscriminatedObject(value) {
|
|
5924
6605
|
return discriminatedObject.safeParse(value).success;
|
|
5925
6606
|
}
|
|
@@ -6287,17 +6968,17 @@ function unknown(lexicons2, path, def2, value) {
|
|
|
6287
6968
|
}
|
|
6288
6969
|
|
|
6289
6970
|
// ../lexicon/src/blob-refs.ts
|
|
6290
|
-
var typedJsonBlobRef =
|
|
6291
|
-
$type:
|
|
6971
|
+
var typedJsonBlobRef = z.object({
|
|
6972
|
+
$type: z.literal("blob"),
|
|
6292
6973
|
ref: schema.cid,
|
|
6293
|
-
mimeType:
|
|
6294
|
-
size:
|
|
6974
|
+
mimeType: z.string(),
|
|
6975
|
+
size: z.number()
|
|
6295
6976
|
}).strict();
|
|
6296
|
-
var untypedJsonBlobRef =
|
|
6297
|
-
cid:
|
|
6298
|
-
mimeType:
|
|
6977
|
+
var untypedJsonBlobRef = z.object({
|
|
6978
|
+
cid: z.string(),
|
|
6979
|
+
mimeType: z.string()
|
|
6299
6980
|
}).strict();
|
|
6300
|
-
var jsonBlobRef =
|
|
6981
|
+
var jsonBlobRef = z.union([typedJsonBlobRef, untypedJsonBlobRef]);
|
|
6301
6982
|
var BlobRef = class {
|
|
6302
6983
|
constructor(ref, mimeType, size, original) {
|
|
6303
6984
|
this.ref = ref;
|
|
@@ -6815,9 +7496,9 @@ var jsonStringToLex = (val) => {
|
|
|
6815
7496
|
};
|
|
6816
7497
|
|
|
6817
7498
|
// ../xrpc/src/types.ts
|
|
6818
|
-
var errorResponseBody =
|
|
6819
|
-
error:
|
|
6820
|
-
message:
|
|
7499
|
+
var errorResponseBody = z.object({
|
|
7500
|
+
error: z.string().optional(),
|
|
7501
|
+
message: z.string().optional()
|
|
6821
7502
|
});
|
|
6822
7503
|
var ResponseType = /* @__PURE__ */ ((ResponseType2) => {
|
|
6823
7504
|
ResponseType2[ResponseType2["Unknown"] = 1] = "Unknown";
|
|
@@ -7308,7 +7989,8 @@ var schemaDict = {
|
|
|
7308
7989
|
knownValues: [
|
|
7309
7990
|
"lex:com.atproto.admin.defs#takedown",
|
|
7310
7991
|
"lex:com.atproto.admin.defs#flag",
|
|
7311
|
-
"lex:com.atproto.admin.defs#acknowledge"
|
|
7992
|
+
"lex:com.atproto.admin.defs#acknowledge",
|
|
7993
|
+
"lex:com.atproto.admin.defs#escalate"
|
|
7312
7994
|
]
|
|
7313
7995
|
},
|
|
7314
7996
|
takedown: {
|
|
@@ -7323,6 +8005,10 @@ var schemaDict = {
|
|
|
7323
8005
|
type: "token",
|
|
7324
8006
|
description: "Moderation action type: Acknowledge. Indicates that the content was reviewed and not considered to violate PDS rules."
|
|
7325
8007
|
},
|
|
8008
|
+
escalate: {
|
|
8009
|
+
type: "token",
|
|
8010
|
+
description: "Moderation action type: Escalate. Indicates that the content has been flagged for additional review."
|
|
8011
|
+
},
|
|
7326
8012
|
reportView: {
|
|
7327
8013
|
type: "object",
|
|
7328
8014
|
required: [
|
|
@@ -7450,6 +8136,9 @@ var schemaDict = {
|
|
|
7450
8136
|
invitedBy: {
|
|
7451
8137
|
type: "ref",
|
|
7452
8138
|
ref: "lex:com.atproto.server.defs#inviteCode"
|
|
8139
|
+
},
|
|
8140
|
+
invitesDisabled: {
|
|
8141
|
+
type: "boolean"
|
|
7453
8142
|
}
|
|
7454
8143
|
}
|
|
7455
8144
|
},
|
|
@@ -7505,6 +8194,9 @@ var schemaDict = {
|
|
|
7505
8194
|
type: "ref",
|
|
7506
8195
|
ref: "lex:com.atproto.server.defs#inviteCode"
|
|
7507
8196
|
}
|
|
8197
|
+
},
|
|
8198
|
+
invitesDisabled: {
|
|
8199
|
+
type: "boolean"
|
|
7508
8200
|
}
|
|
7509
8201
|
}
|
|
7510
8202
|
},
|
|
@@ -7707,6 +8399,29 @@ var schemaDict = {
|
|
|
7707
8399
|
}
|
|
7708
8400
|
}
|
|
7709
8401
|
},
|
|
8402
|
+
ComAtprotoAdminDisableAccountInvites: {
|
|
8403
|
+
lexicon: 1,
|
|
8404
|
+
id: "com.atproto.admin.disableAccountInvites",
|
|
8405
|
+
defs: {
|
|
8406
|
+
main: {
|
|
8407
|
+
type: "procedure",
|
|
8408
|
+
description: "Disable an account from receiving new invite codes, but does not invalidate existing codes",
|
|
8409
|
+
input: {
|
|
8410
|
+
encoding: "application/json",
|
|
8411
|
+
schema: {
|
|
8412
|
+
type: "object",
|
|
8413
|
+
required: ["account"],
|
|
8414
|
+
properties: {
|
|
8415
|
+
account: {
|
|
8416
|
+
type: "string",
|
|
8417
|
+
format: "did"
|
|
8418
|
+
}
|
|
8419
|
+
}
|
|
8420
|
+
}
|
|
8421
|
+
}
|
|
8422
|
+
}
|
|
8423
|
+
}
|
|
8424
|
+
},
|
|
7710
8425
|
ComAtprotoAdminDisableInviteCodes: {
|
|
7711
8426
|
lexicon: 1,
|
|
7712
8427
|
id: "com.atproto.admin.disableInviteCodes",
|
|
@@ -7737,6 +8452,29 @@ var schemaDict = {
|
|
|
7737
8452
|
}
|
|
7738
8453
|
}
|
|
7739
8454
|
},
|
|
8455
|
+
ComAtprotoAdminEnableAccountInvites: {
|
|
8456
|
+
lexicon: 1,
|
|
8457
|
+
id: "com.atproto.admin.enableAccountInvites",
|
|
8458
|
+
defs: {
|
|
8459
|
+
main: {
|
|
8460
|
+
type: "procedure",
|
|
8461
|
+
description: "Re-enable an accounts ability to receive invite codes",
|
|
8462
|
+
input: {
|
|
8463
|
+
encoding: "application/json",
|
|
8464
|
+
schema: {
|
|
8465
|
+
type: "object",
|
|
8466
|
+
required: ["account"],
|
|
8467
|
+
properties: {
|
|
8468
|
+
account: {
|
|
8469
|
+
type: "string",
|
|
8470
|
+
format: "did"
|
|
8471
|
+
}
|
|
8472
|
+
}
|
|
8473
|
+
}
|
|
8474
|
+
}
|
|
8475
|
+
}
|
|
8476
|
+
}
|
|
8477
|
+
},
|
|
7740
8478
|
ComAtprotoAdminGetInviteCodes: {
|
|
7741
8479
|
lexicon: 1,
|
|
7742
8480
|
id: "com.atproto.admin.getInviteCodes",
|
|
@@ -9059,6 +9797,40 @@ var schemaDict = {
|
|
|
9059
9797
|
}
|
|
9060
9798
|
}
|
|
9061
9799
|
},
|
|
9800
|
+
ComAtprotoRepoRebaseRepo: {
|
|
9801
|
+
lexicon: 1,
|
|
9802
|
+
id: "com.atproto.repo.rebaseRepo",
|
|
9803
|
+
defs: {
|
|
9804
|
+
main: {
|
|
9805
|
+
type: "procedure",
|
|
9806
|
+
description: "Simple rebase of repo that deletes history",
|
|
9807
|
+
input: {
|
|
9808
|
+
encoding: "application/json",
|
|
9809
|
+
schema: {
|
|
9810
|
+
type: "object",
|
|
9811
|
+
required: ["repo"],
|
|
9812
|
+
properties: {
|
|
9813
|
+
repo: {
|
|
9814
|
+
type: "string",
|
|
9815
|
+
format: "at-identifier",
|
|
9816
|
+
description: "The handle or DID of the repo."
|
|
9817
|
+
},
|
|
9818
|
+
swapCommit: {
|
|
9819
|
+
type: "string",
|
|
9820
|
+
format: "cid",
|
|
9821
|
+
description: "Compare and swap with the previous commit by cid."
|
|
9822
|
+
}
|
|
9823
|
+
}
|
|
9824
|
+
}
|
|
9825
|
+
},
|
|
9826
|
+
errors: [
|
|
9827
|
+
{
|
|
9828
|
+
name: "InvalidSwap"
|
|
9829
|
+
}
|
|
9830
|
+
]
|
|
9831
|
+
}
|
|
9832
|
+
}
|
|
9833
|
+
},
|
|
9062
9834
|
ComAtprotoRepoStrongRef: {
|
|
9063
9835
|
lexicon: 1,
|
|
9064
9836
|
id: "com.atproto.repo.strongRef",
|
|
@@ -10491,6 +11263,10 @@ var schemaDict = {
|
|
|
10491
11263
|
muted: {
|
|
10492
11264
|
type: "boolean"
|
|
10493
11265
|
},
|
|
11266
|
+
mutedByList: {
|
|
11267
|
+
type: "ref",
|
|
11268
|
+
ref: "lex:app.bsky.graph.defs#listViewBasic"
|
|
11269
|
+
},
|
|
10494
11270
|
blockedBy: {
|
|
10495
11271
|
type: "boolean"
|
|
10496
11272
|
},
|
|
@@ -11674,6 +12450,114 @@ var schemaDict = {
|
|
|
11674
12450
|
}
|
|
11675
12451
|
}
|
|
11676
12452
|
},
|
|
12453
|
+
AppBskyGraphDefs: {
|
|
12454
|
+
lexicon: 1,
|
|
12455
|
+
id: "app.bsky.graph.defs",
|
|
12456
|
+
defs: {
|
|
12457
|
+
listViewBasic: {
|
|
12458
|
+
type: "object",
|
|
12459
|
+
required: ["uri", "creator", "name", "purpose"],
|
|
12460
|
+
properties: {
|
|
12461
|
+
uri: {
|
|
12462
|
+
type: "string",
|
|
12463
|
+
format: "at-uri"
|
|
12464
|
+
},
|
|
12465
|
+
name: {
|
|
12466
|
+
type: "string",
|
|
12467
|
+
maxLength: 64,
|
|
12468
|
+
minLength: 1
|
|
12469
|
+
},
|
|
12470
|
+
purpose: {
|
|
12471
|
+
type: "ref",
|
|
12472
|
+
ref: "lex:app.bsky.graph.defs#listPurpose"
|
|
12473
|
+
},
|
|
12474
|
+
avatar: {
|
|
12475
|
+
type: "string"
|
|
12476
|
+
},
|
|
12477
|
+
viewer: {
|
|
12478
|
+
type: "ref",
|
|
12479
|
+
ref: "lex:app.bsky.graph.defs#listViewerState"
|
|
12480
|
+
},
|
|
12481
|
+
indexedAt: {
|
|
12482
|
+
type: "string",
|
|
12483
|
+
format: "datetime"
|
|
12484
|
+
}
|
|
12485
|
+
}
|
|
12486
|
+
},
|
|
12487
|
+
listView: {
|
|
12488
|
+
type: "object",
|
|
12489
|
+
required: ["uri", "creator", "name", "purpose", "indexedAt"],
|
|
12490
|
+
properties: {
|
|
12491
|
+
uri: {
|
|
12492
|
+
type: "string",
|
|
12493
|
+
format: "at-uri"
|
|
12494
|
+
},
|
|
12495
|
+
creator: {
|
|
12496
|
+
type: "ref",
|
|
12497
|
+
ref: "lex:app.bsky.actor.defs#profileView"
|
|
12498
|
+
},
|
|
12499
|
+
name: {
|
|
12500
|
+
type: "string",
|
|
12501
|
+
maxLength: 64,
|
|
12502
|
+
minLength: 1
|
|
12503
|
+
},
|
|
12504
|
+
purpose: {
|
|
12505
|
+
type: "ref",
|
|
12506
|
+
ref: "lex:app.bsky.graph.defs#listPurpose"
|
|
12507
|
+
},
|
|
12508
|
+
description: {
|
|
12509
|
+
type: "string",
|
|
12510
|
+
maxGraphemes: 300,
|
|
12511
|
+
maxLength: 3e3
|
|
12512
|
+
},
|
|
12513
|
+
descriptionFacets: {
|
|
12514
|
+
type: "array",
|
|
12515
|
+
items: {
|
|
12516
|
+
type: "ref",
|
|
12517
|
+
ref: "lex:app.bsky.richtext.facet"
|
|
12518
|
+
}
|
|
12519
|
+
},
|
|
12520
|
+
avatar: {
|
|
12521
|
+
type: "string"
|
|
12522
|
+
},
|
|
12523
|
+
viewer: {
|
|
12524
|
+
type: "ref",
|
|
12525
|
+
ref: "lex:app.bsky.graph.defs#listViewerState"
|
|
12526
|
+
},
|
|
12527
|
+
indexedAt: {
|
|
12528
|
+
type: "string",
|
|
12529
|
+
format: "datetime"
|
|
12530
|
+
}
|
|
12531
|
+
}
|
|
12532
|
+
},
|
|
12533
|
+
listItemView: {
|
|
12534
|
+
type: "object",
|
|
12535
|
+
required: ["subject"],
|
|
12536
|
+
properties: {
|
|
12537
|
+
subject: {
|
|
12538
|
+
type: "ref",
|
|
12539
|
+
ref: "lex:app.bsky.actor.defs#profileView"
|
|
12540
|
+
}
|
|
12541
|
+
}
|
|
12542
|
+
},
|
|
12543
|
+
listPurpose: {
|
|
12544
|
+
type: "string",
|
|
12545
|
+
knownValues: ["app.bsky.graph.defs#modlist"]
|
|
12546
|
+
},
|
|
12547
|
+
modlist: {
|
|
12548
|
+
type: "token",
|
|
12549
|
+
description: "A list of actors to apply an aggregate moderation action (mute/block) on"
|
|
12550
|
+
},
|
|
12551
|
+
listViewerState: {
|
|
12552
|
+
type: "object",
|
|
12553
|
+
properties: {
|
|
12554
|
+
muted: {
|
|
12555
|
+
type: "boolean"
|
|
12556
|
+
}
|
|
12557
|
+
}
|
|
12558
|
+
}
|
|
12559
|
+
}
|
|
12560
|
+
},
|
|
11677
12561
|
AppBskyGraphFollow: {
|
|
11678
12562
|
lexicon: 1,
|
|
11679
12563
|
id: "app.bsky.graph.follow",
|
|
@@ -11846,16 +12730,21 @@ var schemaDict = {
|
|
|
11846
12730
|
}
|
|
11847
12731
|
}
|
|
11848
12732
|
},
|
|
11849
|
-
|
|
12733
|
+
AppBskyGraphGetList: {
|
|
11850
12734
|
lexicon: 1,
|
|
11851
|
-
id: "app.bsky.graph.
|
|
12735
|
+
id: "app.bsky.graph.getList",
|
|
11852
12736
|
defs: {
|
|
11853
12737
|
main: {
|
|
11854
12738
|
type: "query",
|
|
11855
|
-
description: "
|
|
12739
|
+
description: "Fetch a list of actors",
|
|
11856
12740
|
parameters: {
|
|
11857
12741
|
type: "params",
|
|
12742
|
+
required: ["list"],
|
|
11858
12743
|
properties: {
|
|
12744
|
+
list: {
|
|
12745
|
+
type: "string",
|
|
12746
|
+
format: "at-uri"
|
|
12747
|
+
},
|
|
11859
12748
|
limit: {
|
|
11860
12749
|
type: "integer",
|
|
11861
12750
|
minimum: 1,
|
|
@@ -11871,16 +12760,20 @@ var schemaDict = {
|
|
|
11871
12760
|
encoding: "application/json",
|
|
11872
12761
|
schema: {
|
|
11873
12762
|
type: "object",
|
|
11874
|
-
required: ["
|
|
12763
|
+
required: ["list", "items"],
|
|
11875
12764
|
properties: {
|
|
11876
12765
|
cursor: {
|
|
11877
12766
|
type: "string"
|
|
11878
12767
|
},
|
|
11879
|
-
|
|
12768
|
+
list: {
|
|
12769
|
+
type: "ref",
|
|
12770
|
+
ref: "lex:app.bsky.graph.defs#listView"
|
|
12771
|
+
},
|
|
12772
|
+
items: {
|
|
11880
12773
|
type: "array",
|
|
11881
12774
|
items: {
|
|
11882
12775
|
type: "ref",
|
|
11883
|
-
ref: "lex:app.bsky.
|
|
12776
|
+
ref: "lex:app.bsky.graph.defs#listItemView"
|
|
11884
12777
|
}
|
|
11885
12778
|
}
|
|
11886
12779
|
}
|
|
@@ -11889,22 +12782,255 @@ var schemaDict = {
|
|
|
11889
12782
|
}
|
|
11890
12783
|
}
|
|
11891
12784
|
},
|
|
11892
|
-
|
|
12785
|
+
AppBskyGraphGetListMutes: {
|
|
11893
12786
|
lexicon: 1,
|
|
11894
|
-
id: "app.bsky.graph.
|
|
12787
|
+
id: "app.bsky.graph.getListMutes",
|
|
11895
12788
|
defs: {
|
|
11896
12789
|
main: {
|
|
11897
|
-
type: "
|
|
11898
|
-
description: "
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
12790
|
+
type: "query",
|
|
12791
|
+
description: "Which lists is the requester's account muting?",
|
|
12792
|
+
parameters: {
|
|
12793
|
+
type: "params",
|
|
12794
|
+
properties: {
|
|
12795
|
+
limit: {
|
|
12796
|
+
type: "integer",
|
|
12797
|
+
minimum: 1,
|
|
12798
|
+
maximum: 100,
|
|
12799
|
+
default: 50
|
|
12800
|
+
},
|
|
12801
|
+
cursor: {
|
|
12802
|
+
type: "string"
|
|
12803
|
+
}
|
|
12804
|
+
}
|
|
12805
|
+
},
|
|
12806
|
+
output: {
|
|
12807
|
+
encoding: "application/json",
|
|
12808
|
+
schema: {
|
|
12809
|
+
type: "object",
|
|
12810
|
+
required: ["lists"],
|
|
12811
|
+
properties: {
|
|
12812
|
+
cursor: {
|
|
12813
|
+
type: "string"
|
|
12814
|
+
},
|
|
12815
|
+
lists: {
|
|
12816
|
+
type: "array",
|
|
12817
|
+
items: {
|
|
12818
|
+
type: "ref",
|
|
12819
|
+
ref: "lex:app.bsky.graph.defs#listView"
|
|
12820
|
+
}
|
|
12821
|
+
}
|
|
12822
|
+
}
|
|
12823
|
+
}
|
|
12824
|
+
}
|
|
12825
|
+
}
|
|
12826
|
+
}
|
|
12827
|
+
},
|
|
12828
|
+
AppBskyGraphGetLists: {
|
|
12829
|
+
lexicon: 1,
|
|
12830
|
+
id: "app.bsky.graph.getLists",
|
|
12831
|
+
defs: {
|
|
12832
|
+
main: {
|
|
12833
|
+
type: "query",
|
|
12834
|
+
description: "Fetch a list of lists that belong to an actor",
|
|
12835
|
+
parameters: {
|
|
12836
|
+
type: "params",
|
|
12837
|
+
required: ["actor"],
|
|
12838
|
+
properties: {
|
|
12839
|
+
actor: {
|
|
12840
|
+
type: "string",
|
|
12841
|
+
format: "at-identifier"
|
|
12842
|
+
},
|
|
12843
|
+
limit: {
|
|
12844
|
+
type: "integer",
|
|
12845
|
+
minimum: 1,
|
|
12846
|
+
maximum: 100,
|
|
12847
|
+
default: 50
|
|
12848
|
+
},
|
|
12849
|
+
cursor: {
|
|
12850
|
+
type: "string"
|
|
12851
|
+
}
|
|
12852
|
+
}
|
|
12853
|
+
},
|
|
12854
|
+
output: {
|
|
12855
|
+
encoding: "application/json",
|
|
12856
|
+
schema: {
|
|
12857
|
+
type: "object",
|
|
12858
|
+
required: ["lists"],
|
|
12859
|
+
properties: {
|
|
12860
|
+
cursor: {
|
|
12861
|
+
type: "string"
|
|
12862
|
+
},
|
|
12863
|
+
lists: {
|
|
12864
|
+
type: "array",
|
|
12865
|
+
items: {
|
|
12866
|
+
type: "ref",
|
|
12867
|
+
ref: "lex:app.bsky.graph.defs#listView"
|
|
12868
|
+
}
|
|
12869
|
+
}
|
|
12870
|
+
}
|
|
12871
|
+
}
|
|
12872
|
+
}
|
|
12873
|
+
}
|
|
12874
|
+
}
|
|
12875
|
+
},
|
|
12876
|
+
AppBskyGraphGetMutes: {
|
|
12877
|
+
lexicon: 1,
|
|
12878
|
+
id: "app.bsky.graph.getMutes",
|
|
12879
|
+
defs: {
|
|
12880
|
+
main: {
|
|
12881
|
+
type: "query",
|
|
12882
|
+
description: "Who does the viewer mute?",
|
|
12883
|
+
parameters: {
|
|
12884
|
+
type: "params",
|
|
12885
|
+
properties: {
|
|
12886
|
+
limit: {
|
|
12887
|
+
type: "integer",
|
|
12888
|
+
minimum: 1,
|
|
12889
|
+
maximum: 100,
|
|
12890
|
+
default: 50
|
|
12891
|
+
},
|
|
12892
|
+
cursor: {
|
|
12893
|
+
type: "string"
|
|
12894
|
+
}
|
|
12895
|
+
}
|
|
12896
|
+
},
|
|
12897
|
+
output: {
|
|
12898
|
+
encoding: "application/json",
|
|
12899
|
+
schema: {
|
|
12900
|
+
type: "object",
|
|
12901
|
+
required: ["mutes"],
|
|
12902
|
+
properties: {
|
|
12903
|
+
cursor: {
|
|
12904
|
+
type: "string"
|
|
12905
|
+
},
|
|
12906
|
+
mutes: {
|
|
12907
|
+
type: "array",
|
|
12908
|
+
items: {
|
|
12909
|
+
type: "ref",
|
|
12910
|
+
ref: "lex:app.bsky.actor.defs#profileView"
|
|
12911
|
+
}
|
|
12912
|
+
}
|
|
12913
|
+
}
|
|
12914
|
+
}
|
|
12915
|
+
}
|
|
12916
|
+
}
|
|
12917
|
+
}
|
|
12918
|
+
},
|
|
12919
|
+
AppBskyGraphList: {
|
|
12920
|
+
lexicon: 1,
|
|
12921
|
+
id: "app.bsky.graph.list",
|
|
12922
|
+
defs: {
|
|
12923
|
+
main: {
|
|
12924
|
+
type: "record",
|
|
12925
|
+
description: "A declaration of a list of actors.",
|
|
12926
|
+
key: "tid",
|
|
12927
|
+
record: {
|
|
12928
|
+
type: "object",
|
|
12929
|
+
required: ["name", "purpose", "createdAt"],
|
|
12930
|
+
properties: {
|
|
12931
|
+
purpose: {
|
|
12932
|
+
type: "ref",
|
|
12933
|
+
ref: "lex:app.bsky.graph.defs#listPurpose"
|
|
12934
|
+
},
|
|
12935
|
+
name: {
|
|
12936
|
+
type: "string",
|
|
12937
|
+
maxLength: 64,
|
|
12938
|
+
minLength: 1
|
|
12939
|
+
},
|
|
12940
|
+
description: {
|
|
12941
|
+
type: "string",
|
|
12942
|
+
maxGraphemes: 300,
|
|
12943
|
+
maxLength: 3e3
|
|
12944
|
+
},
|
|
12945
|
+
descriptionFacets: {
|
|
12946
|
+
type: "array",
|
|
12947
|
+
items: {
|
|
12948
|
+
type: "ref",
|
|
12949
|
+
ref: "lex:app.bsky.richtext.facet"
|
|
12950
|
+
}
|
|
12951
|
+
},
|
|
12952
|
+
avatar: {
|
|
12953
|
+
type: "blob",
|
|
12954
|
+
accept: ["image/png", "image/jpeg"],
|
|
12955
|
+
maxSize: 1e6
|
|
12956
|
+
},
|
|
12957
|
+
createdAt: {
|
|
12958
|
+
type: "string",
|
|
12959
|
+
format: "datetime"
|
|
12960
|
+
}
|
|
12961
|
+
}
|
|
12962
|
+
}
|
|
12963
|
+
}
|
|
12964
|
+
}
|
|
12965
|
+
},
|
|
12966
|
+
AppBskyGraphListitem: {
|
|
12967
|
+
lexicon: 1,
|
|
12968
|
+
id: "app.bsky.graph.listitem",
|
|
12969
|
+
defs: {
|
|
12970
|
+
main: {
|
|
12971
|
+
type: "record",
|
|
12972
|
+
description: "An item under a declared list of actors",
|
|
12973
|
+
key: "tid",
|
|
12974
|
+
record: {
|
|
12975
|
+
type: "object",
|
|
12976
|
+
required: ["subject", "list", "createdAt"],
|
|
12977
|
+
properties: {
|
|
12978
|
+
subject: {
|
|
12979
|
+
type: "string",
|
|
12980
|
+
format: "did"
|
|
12981
|
+
},
|
|
12982
|
+
list: {
|
|
12983
|
+
type: "string",
|
|
12984
|
+
format: "at-uri"
|
|
12985
|
+
},
|
|
12986
|
+
createdAt: {
|
|
12987
|
+
type: "string",
|
|
12988
|
+
format: "datetime"
|
|
12989
|
+
}
|
|
12990
|
+
}
|
|
12991
|
+
}
|
|
12992
|
+
}
|
|
12993
|
+
}
|
|
12994
|
+
},
|
|
12995
|
+
AppBskyGraphMuteActor: {
|
|
12996
|
+
lexicon: 1,
|
|
12997
|
+
id: "app.bsky.graph.muteActor",
|
|
12998
|
+
defs: {
|
|
12999
|
+
main: {
|
|
13000
|
+
type: "procedure",
|
|
13001
|
+
description: "Mute an actor by did or handle.",
|
|
13002
|
+
input: {
|
|
13003
|
+
encoding: "application/json",
|
|
13004
|
+
schema: {
|
|
13005
|
+
type: "object",
|
|
13006
|
+
required: ["actor"],
|
|
13007
|
+
properties: {
|
|
13008
|
+
actor: {
|
|
13009
|
+
type: "string",
|
|
13010
|
+
format: "at-identifier"
|
|
13011
|
+
}
|
|
13012
|
+
}
|
|
13013
|
+
}
|
|
13014
|
+
}
|
|
13015
|
+
}
|
|
13016
|
+
}
|
|
13017
|
+
},
|
|
13018
|
+
AppBskyGraphMuteActorList: {
|
|
13019
|
+
lexicon: 1,
|
|
13020
|
+
id: "app.bsky.graph.muteActorList",
|
|
13021
|
+
defs: {
|
|
13022
|
+
main: {
|
|
13023
|
+
type: "procedure",
|
|
13024
|
+
description: "Mute a list of actors.",
|
|
13025
|
+
input: {
|
|
13026
|
+
encoding: "application/json",
|
|
13027
|
+
schema: {
|
|
13028
|
+
type: "object",
|
|
13029
|
+
required: ["list"],
|
|
13030
|
+
properties: {
|
|
13031
|
+
list: {
|
|
13032
|
+
type: "string",
|
|
13033
|
+
format: "at-uri"
|
|
11908
13034
|
}
|
|
11909
13035
|
}
|
|
11910
13036
|
}
|
|
@@ -11935,6 +13061,29 @@ var schemaDict = {
|
|
|
11935
13061
|
}
|
|
11936
13062
|
}
|
|
11937
13063
|
},
|
|
13064
|
+
AppBskyGraphUnmuteActorList: {
|
|
13065
|
+
lexicon: 1,
|
|
13066
|
+
id: "app.bsky.graph.unmuteActorList",
|
|
13067
|
+
defs: {
|
|
13068
|
+
main: {
|
|
13069
|
+
type: "procedure",
|
|
13070
|
+
description: "Unmute a list of actors.",
|
|
13071
|
+
input: {
|
|
13072
|
+
encoding: "application/json",
|
|
13073
|
+
schema: {
|
|
13074
|
+
type: "object",
|
|
13075
|
+
required: ["list"],
|
|
13076
|
+
properties: {
|
|
13077
|
+
list: {
|
|
13078
|
+
type: "string",
|
|
13079
|
+
format: "at-uri"
|
|
13080
|
+
}
|
|
13081
|
+
}
|
|
13082
|
+
}
|
|
13083
|
+
}
|
|
13084
|
+
}
|
|
13085
|
+
}
|
|
13086
|
+
},
|
|
11938
13087
|
AppBskyNotificationGetUnreadCount: {
|
|
11939
13088
|
lexicon: 1,
|
|
11940
13089
|
id: "app.bsky.notification.getUnreadCount",
|
|
@@ -12166,6 +13315,10 @@ var schemaDict = {
|
|
|
12166
13315
|
parameters: {
|
|
12167
13316
|
type: "params",
|
|
12168
13317
|
properties: {
|
|
13318
|
+
includeNsfw: {
|
|
13319
|
+
type: "boolean",
|
|
13320
|
+
default: false
|
|
13321
|
+
},
|
|
12169
13322
|
limit: {
|
|
12170
13323
|
type: "integer",
|
|
12171
13324
|
minimum: 1,
|
|
@@ -12203,12 +13356,34 @@ var schemaDict = {
|
|
|
12203
13356
|
var schemas = Object.values(schemaDict);
|
|
12204
13357
|
var lexicons = new Lexicons(schemas);
|
|
12205
13358
|
|
|
13359
|
+
// src/client/types/com/atproto/admin/disableAccountInvites.ts
|
|
13360
|
+
var disableAccountInvites_exports = {};
|
|
13361
|
+
__export(disableAccountInvites_exports, {
|
|
13362
|
+
toKnownErr: () => toKnownErr
|
|
13363
|
+
});
|
|
13364
|
+
function toKnownErr(e) {
|
|
13365
|
+
if (e instanceof XRPCError) {
|
|
13366
|
+
}
|
|
13367
|
+
return e;
|
|
13368
|
+
}
|
|
13369
|
+
|
|
12206
13370
|
// src/client/types/com/atproto/admin/disableInviteCodes.ts
|
|
12207
13371
|
var disableInviteCodes_exports = {};
|
|
12208
13372
|
__export(disableInviteCodes_exports, {
|
|
12209
|
-
toKnownErr: () =>
|
|
13373
|
+
toKnownErr: () => toKnownErr2
|
|
12210
13374
|
});
|
|
12211
|
-
function
|
|
13375
|
+
function toKnownErr2(e) {
|
|
13376
|
+
if (e instanceof XRPCError) {
|
|
13377
|
+
}
|
|
13378
|
+
return e;
|
|
13379
|
+
}
|
|
13380
|
+
|
|
13381
|
+
// src/client/types/com/atproto/admin/enableAccountInvites.ts
|
|
13382
|
+
var enableAccountInvites_exports = {};
|
|
13383
|
+
__export(enableAccountInvites_exports, {
|
|
13384
|
+
toKnownErr: () => toKnownErr3
|
|
13385
|
+
});
|
|
13386
|
+
function toKnownErr3(e) {
|
|
12212
13387
|
if (e instanceof XRPCError) {
|
|
12213
13388
|
}
|
|
12214
13389
|
return e;
|
|
@@ -12217,9 +13392,9 @@ function toKnownErr(e) {
|
|
|
12217
13392
|
// src/client/types/com/atproto/admin/getInviteCodes.ts
|
|
12218
13393
|
var getInviteCodes_exports = {};
|
|
12219
13394
|
__export(getInviteCodes_exports, {
|
|
12220
|
-
toKnownErr: () =>
|
|
13395
|
+
toKnownErr: () => toKnownErr4
|
|
12221
13396
|
});
|
|
12222
|
-
function
|
|
13397
|
+
function toKnownErr4(e) {
|
|
12223
13398
|
if (e instanceof XRPCError) {
|
|
12224
13399
|
}
|
|
12225
13400
|
return e;
|
|
@@ -12228,9 +13403,9 @@ function toKnownErr2(e) {
|
|
|
12228
13403
|
// src/client/types/com/atproto/admin/getModerationAction.ts
|
|
12229
13404
|
var getModerationAction_exports = {};
|
|
12230
13405
|
__export(getModerationAction_exports, {
|
|
12231
|
-
toKnownErr: () =>
|
|
13406
|
+
toKnownErr: () => toKnownErr5
|
|
12232
13407
|
});
|
|
12233
|
-
function
|
|
13408
|
+
function toKnownErr5(e) {
|
|
12234
13409
|
if (e instanceof XRPCError) {
|
|
12235
13410
|
}
|
|
12236
13411
|
return e;
|
|
@@ -12239,9 +13414,9 @@ function toKnownErr3(e) {
|
|
|
12239
13414
|
// src/client/types/com/atproto/admin/getModerationActions.ts
|
|
12240
13415
|
var getModerationActions_exports = {};
|
|
12241
13416
|
__export(getModerationActions_exports, {
|
|
12242
|
-
toKnownErr: () =>
|
|
13417
|
+
toKnownErr: () => toKnownErr6
|
|
12243
13418
|
});
|
|
12244
|
-
function
|
|
13419
|
+
function toKnownErr6(e) {
|
|
12245
13420
|
if (e instanceof XRPCError) {
|
|
12246
13421
|
}
|
|
12247
13422
|
return e;
|
|
@@ -12250,9 +13425,9 @@ function toKnownErr4(e) {
|
|
|
12250
13425
|
// src/client/types/com/atproto/admin/getModerationReport.ts
|
|
12251
13426
|
var getModerationReport_exports = {};
|
|
12252
13427
|
__export(getModerationReport_exports, {
|
|
12253
|
-
toKnownErr: () =>
|
|
13428
|
+
toKnownErr: () => toKnownErr7
|
|
12254
13429
|
});
|
|
12255
|
-
function
|
|
13430
|
+
function toKnownErr7(e) {
|
|
12256
13431
|
if (e instanceof XRPCError) {
|
|
12257
13432
|
}
|
|
12258
13433
|
return e;
|
|
@@ -12261,9 +13436,9 @@ function toKnownErr5(e) {
|
|
|
12261
13436
|
// src/client/types/com/atproto/admin/getModerationReports.ts
|
|
12262
13437
|
var getModerationReports_exports = {};
|
|
12263
13438
|
__export(getModerationReports_exports, {
|
|
12264
|
-
toKnownErr: () =>
|
|
13439
|
+
toKnownErr: () => toKnownErr8
|
|
12265
13440
|
});
|
|
12266
|
-
function
|
|
13441
|
+
function toKnownErr8(e) {
|
|
12267
13442
|
if (e instanceof XRPCError) {
|
|
12268
13443
|
}
|
|
12269
13444
|
return e;
|
|
@@ -12272,9 +13447,9 @@ function toKnownErr6(e) {
|
|
|
12272
13447
|
// src/client/types/com/atproto/admin/getRecord.ts
|
|
12273
13448
|
var getRecord_exports = {};
|
|
12274
13449
|
__export(getRecord_exports, {
|
|
12275
|
-
toKnownErr: () =>
|
|
13450
|
+
toKnownErr: () => toKnownErr9
|
|
12276
13451
|
});
|
|
12277
|
-
function
|
|
13452
|
+
function toKnownErr9(e) {
|
|
12278
13453
|
if (e instanceof XRPCError) {
|
|
12279
13454
|
}
|
|
12280
13455
|
return e;
|
|
@@ -12283,9 +13458,9 @@ function toKnownErr7(e) {
|
|
|
12283
13458
|
// src/client/types/com/atproto/admin/getRepo.ts
|
|
12284
13459
|
var getRepo_exports = {};
|
|
12285
13460
|
__export(getRepo_exports, {
|
|
12286
|
-
toKnownErr: () =>
|
|
13461
|
+
toKnownErr: () => toKnownErr10
|
|
12287
13462
|
});
|
|
12288
|
-
function
|
|
13463
|
+
function toKnownErr10(e) {
|
|
12289
13464
|
if (e instanceof XRPCError) {
|
|
12290
13465
|
}
|
|
12291
13466
|
return e;
|
|
@@ -12294,9 +13469,9 @@ function toKnownErr8(e) {
|
|
|
12294
13469
|
// src/client/types/com/atproto/admin/resolveModerationReports.ts
|
|
12295
13470
|
var resolveModerationReports_exports = {};
|
|
12296
13471
|
__export(resolveModerationReports_exports, {
|
|
12297
|
-
toKnownErr: () =>
|
|
13472
|
+
toKnownErr: () => toKnownErr11
|
|
12298
13473
|
});
|
|
12299
|
-
function
|
|
13474
|
+
function toKnownErr11(e) {
|
|
12300
13475
|
if (e instanceof XRPCError) {
|
|
12301
13476
|
}
|
|
12302
13477
|
return e;
|
|
@@ -12305,9 +13480,9 @@ function toKnownErr9(e) {
|
|
|
12305
13480
|
// src/client/types/com/atproto/admin/reverseModerationAction.ts
|
|
12306
13481
|
var reverseModerationAction_exports = {};
|
|
12307
13482
|
__export(reverseModerationAction_exports, {
|
|
12308
|
-
toKnownErr: () =>
|
|
13483
|
+
toKnownErr: () => toKnownErr12
|
|
12309
13484
|
});
|
|
12310
|
-
function
|
|
13485
|
+
function toKnownErr12(e) {
|
|
12311
13486
|
if (e instanceof XRPCError) {
|
|
12312
13487
|
}
|
|
12313
13488
|
return e;
|
|
@@ -12316,9 +13491,9 @@ function toKnownErr10(e) {
|
|
|
12316
13491
|
// src/client/types/com/atproto/admin/searchRepos.ts
|
|
12317
13492
|
var searchRepos_exports = {};
|
|
12318
13493
|
__export(searchRepos_exports, {
|
|
12319
|
-
toKnownErr: () =>
|
|
13494
|
+
toKnownErr: () => toKnownErr13
|
|
12320
13495
|
});
|
|
12321
|
-
function
|
|
13496
|
+
function toKnownErr13(e) {
|
|
12322
13497
|
if (e instanceof XRPCError) {
|
|
12323
13498
|
}
|
|
12324
13499
|
return e;
|
|
@@ -12328,14 +13503,14 @@ function toKnownErr11(e) {
|
|
|
12328
13503
|
var takeModerationAction_exports = {};
|
|
12329
13504
|
__export(takeModerationAction_exports, {
|
|
12330
13505
|
SubjectHasActionError: () => SubjectHasActionError,
|
|
12331
|
-
toKnownErr: () =>
|
|
13506
|
+
toKnownErr: () => toKnownErr14
|
|
12332
13507
|
});
|
|
12333
13508
|
var SubjectHasActionError = class extends XRPCError {
|
|
12334
13509
|
constructor(src2) {
|
|
12335
13510
|
super(src2.status, src2.error, src2.message);
|
|
12336
13511
|
}
|
|
12337
13512
|
};
|
|
12338
|
-
function
|
|
13513
|
+
function toKnownErr14(e) {
|
|
12339
13514
|
if (e instanceof XRPCError) {
|
|
12340
13515
|
if (e.error === "SubjectHasAction")
|
|
12341
13516
|
return new SubjectHasActionError(e);
|
|
@@ -12346,9 +13521,9 @@ function toKnownErr12(e) {
|
|
|
12346
13521
|
// src/client/types/com/atproto/admin/updateAccountEmail.ts
|
|
12347
13522
|
var updateAccountEmail_exports = {};
|
|
12348
13523
|
__export(updateAccountEmail_exports, {
|
|
12349
|
-
toKnownErr: () =>
|
|
13524
|
+
toKnownErr: () => toKnownErr15
|
|
12350
13525
|
});
|
|
12351
|
-
function
|
|
13526
|
+
function toKnownErr15(e) {
|
|
12352
13527
|
if (e instanceof XRPCError) {
|
|
12353
13528
|
}
|
|
12354
13529
|
return e;
|
|
@@ -12357,9 +13532,9 @@ function toKnownErr13(e) {
|
|
|
12357
13532
|
// src/client/types/com/atproto/admin/updateAccountHandle.ts
|
|
12358
13533
|
var updateAccountHandle_exports = {};
|
|
12359
13534
|
__export(updateAccountHandle_exports, {
|
|
12360
|
-
toKnownErr: () =>
|
|
13535
|
+
toKnownErr: () => toKnownErr16
|
|
12361
13536
|
});
|
|
12362
|
-
function
|
|
13537
|
+
function toKnownErr16(e) {
|
|
12363
13538
|
if (e instanceof XRPCError) {
|
|
12364
13539
|
}
|
|
12365
13540
|
return e;
|
|
@@ -12368,9 +13543,9 @@ function toKnownErr14(e) {
|
|
|
12368
13543
|
// src/client/types/com/atproto/identity/resolveHandle.ts
|
|
12369
13544
|
var resolveHandle_exports = {};
|
|
12370
13545
|
__export(resolveHandle_exports, {
|
|
12371
|
-
toKnownErr: () =>
|
|
13546
|
+
toKnownErr: () => toKnownErr17
|
|
12372
13547
|
});
|
|
12373
|
-
function
|
|
13548
|
+
function toKnownErr17(e) {
|
|
12374
13549
|
if (e instanceof XRPCError) {
|
|
12375
13550
|
}
|
|
12376
13551
|
return e;
|
|
@@ -12379,9 +13554,9 @@ function toKnownErr15(e) {
|
|
|
12379
13554
|
// src/client/types/com/atproto/identity/updateHandle.ts
|
|
12380
13555
|
var updateHandle_exports = {};
|
|
12381
13556
|
__export(updateHandle_exports, {
|
|
12382
|
-
toKnownErr: () =>
|
|
13557
|
+
toKnownErr: () => toKnownErr18
|
|
12383
13558
|
});
|
|
12384
|
-
function
|
|
13559
|
+
function toKnownErr18(e) {
|
|
12385
13560
|
if (e instanceof XRPCError) {
|
|
12386
13561
|
}
|
|
12387
13562
|
return e;
|
|
@@ -12390,9 +13565,9 @@ function toKnownErr16(e) {
|
|
|
12390
13565
|
// src/client/types/com/atproto/label/queryLabels.ts
|
|
12391
13566
|
var queryLabels_exports = {};
|
|
12392
13567
|
__export(queryLabels_exports, {
|
|
12393
|
-
toKnownErr: () =>
|
|
13568
|
+
toKnownErr: () => toKnownErr19
|
|
12394
13569
|
});
|
|
12395
|
-
function
|
|
13570
|
+
function toKnownErr19(e) {
|
|
12396
13571
|
if (e instanceof XRPCError) {
|
|
12397
13572
|
}
|
|
12398
13573
|
return e;
|
|
@@ -12401,9 +13576,9 @@ function toKnownErr17(e) {
|
|
|
12401
13576
|
// src/client/types/com/atproto/moderation/createReport.ts
|
|
12402
13577
|
var createReport_exports = {};
|
|
12403
13578
|
__export(createReport_exports, {
|
|
12404
|
-
toKnownErr: () =>
|
|
13579
|
+
toKnownErr: () => toKnownErr20
|
|
12405
13580
|
});
|
|
12406
|
-
function
|
|
13581
|
+
function toKnownErr20(e) {
|
|
12407
13582
|
if (e instanceof XRPCError) {
|
|
12408
13583
|
}
|
|
12409
13584
|
return e;
|
|
@@ -12416,7 +13591,7 @@ __export(applyWrites_exports, {
|
|
|
12416
13591
|
isCreate: () => isCreate,
|
|
12417
13592
|
isDelete: () => isDelete,
|
|
12418
13593
|
isUpdate: () => isUpdate,
|
|
12419
|
-
toKnownErr: () =>
|
|
13594
|
+
toKnownErr: () => toKnownErr21,
|
|
12420
13595
|
validateCreate: () => validateCreate,
|
|
12421
13596
|
validateDelete: () => validateDelete,
|
|
12422
13597
|
validateUpdate: () => validateUpdate
|
|
@@ -12436,7 +13611,7 @@ var InvalidSwapError = class extends XRPCError {
|
|
|
12436
13611
|
super(src2.status, src2.error, src2.message);
|
|
12437
13612
|
}
|
|
12438
13613
|
};
|
|
12439
|
-
function
|
|
13614
|
+
function toKnownErr21(e) {
|
|
12440
13615
|
if (e instanceof XRPCError) {
|
|
12441
13616
|
if (e.error === "InvalidSwap")
|
|
12442
13617
|
return new InvalidSwapError(e);
|
|
@@ -12466,14 +13641,14 @@ function validateDelete(v) {
|
|
|
12466
13641
|
var createRecord_exports = {};
|
|
12467
13642
|
__export(createRecord_exports, {
|
|
12468
13643
|
InvalidSwapError: () => InvalidSwapError2,
|
|
12469
|
-
toKnownErr: () =>
|
|
13644
|
+
toKnownErr: () => toKnownErr22
|
|
12470
13645
|
});
|
|
12471
13646
|
var InvalidSwapError2 = class extends XRPCError {
|
|
12472
13647
|
constructor(src2) {
|
|
12473
13648
|
super(src2.status, src2.error, src2.message);
|
|
12474
13649
|
}
|
|
12475
13650
|
};
|
|
12476
|
-
function
|
|
13651
|
+
function toKnownErr22(e) {
|
|
12477
13652
|
if (e instanceof XRPCError) {
|
|
12478
13653
|
if (e.error === "InvalidSwap")
|
|
12479
13654
|
return new InvalidSwapError2(e);
|
|
@@ -12485,14 +13660,14 @@ function toKnownErr20(e) {
|
|
|
12485
13660
|
var deleteRecord_exports = {};
|
|
12486
13661
|
__export(deleteRecord_exports, {
|
|
12487
13662
|
InvalidSwapError: () => InvalidSwapError3,
|
|
12488
|
-
toKnownErr: () =>
|
|
13663
|
+
toKnownErr: () => toKnownErr23
|
|
12489
13664
|
});
|
|
12490
13665
|
var InvalidSwapError3 = class extends XRPCError {
|
|
12491
13666
|
constructor(src2) {
|
|
12492
13667
|
super(src2.status, src2.error, src2.message);
|
|
12493
13668
|
}
|
|
12494
13669
|
};
|
|
12495
|
-
function
|
|
13670
|
+
function toKnownErr23(e) {
|
|
12496
13671
|
if (e instanceof XRPCError) {
|
|
12497
13672
|
if (e.error === "InvalidSwap")
|
|
12498
13673
|
return new InvalidSwapError3(e);
|
|
@@ -12503,9 +13678,9 @@ function toKnownErr21(e) {
|
|
|
12503
13678
|
// src/client/types/com/atproto/repo/describeRepo.ts
|
|
12504
13679
|
var describeRepo_exports = {};
|
|
12505
13680
|
__export(describeRepo_exports, {
|
|
12506
|
-
toKnownErr: () =>
|
|
13681
|
+
toKnownErr: () => toKnownErr24
|
|
12507
13682
|
});
|
|
12508
|
-
function
|
|
13683
|
+
function toKnownErr24(e) {
|
|
12509
13684
|
if (e instanceof XRPCError) {
|
|
12510
13685
|
}
|
|
12511
13686
|
return e;
|
|
@@ -12514,9 +13689,9 @@ function toKnownErr22(e) {
|
|
|
12514
13689
|
// src/client/types/com/atproto/repo/getRecord.ts
|
|
12515
13690
|
var getRecord_exports2 = {};
|
|
12516
13691
|
__export(getRecord_exports2, {
|
|
12517
|
-
toKnownErr: () =>
|
|
13692
|
+
toKnownErr: () => toKnownErr25
|
|
12518
13693
|
});
|
|
12519
|
-
function
|
|
13694
|
+
function toKnownErr25(e) {
|
|
12520
13695
|
if (e instanceof XRPCError) {
|
|
12521
13696
|
}
|
|
12522
13697
|
return e;
|
|
@@ -12526,10 +13701,10 @@ function toKnownErr23(e) {
|
|
|
12526
13701
|
var listRecords_exports = {};
|
|
12527
13702
|
__export(listRecords_exports, {
|
|
12528
13703
|
isRecord: () => isRecord,
|
|
12529
|
-
toKnownErr: () =>
|
|
13704
|
+
toKnownErr: () => toKnownErr26,
|
|
12530
13705
|
validateRecord: () => validateRecord
|
|
12531
13706
|
});
|
|
12532
|
-
function
|
|
13707
|
+
function toKnownErr26(e) {
|
|
12533
13708
|
if (e instanceof XRPCError) {
|
|
12534
13709
|
}
|
|
12535
13710
|
return e;
|
|
@@ -12545,14 +13720,14 @@ function validateRecord(v) {
|
|
|
12545
13720
|
var putRecord_exports = {};
|
|
12546
13721
|
__export(putRecord_exports, {
|
|
12547
13722
|
InvalidSwapError: () => InvalidSwapError4,
|
|
12548
|
-
toKnownErr: () =>
|
|
13723
|
+
toKnownErr: () => toKnownErr27
|
|
12549
13724
|
});
|
|
12550
13725
|
var InvalidSwapError4 = class extends XRPCError {
|
|
12551
13726
|
constructor(src2) {
|
|
12552
13727
|
super(src2.status, src2.error, src2.message);
|
|
12553
13728
|
}
|
|
12554
13729
|
};
|
|
12555
|
-
function
|
|
13730
|
+
function toKnownErr27(e) {
|
|
12556
13731
|
if (e instanceof XRPCError) {
|
|
12557
13732
|
if (e.error === "InvalidSwap")
|
|
12558
13733
|
return new InvalidSwapError4(e);
|
|
@@ -12560,12 +13735,31 @@ function toKnownErr25(e) {
|
|
|
12560
13735
|
return e;
|
|
12561
13736
|
}
|
|
12562
13737
|
|
|
13738
|
+
// src/client/types/com/atproto/repo/rebaseRepo.ts
|
|
13739
|
+
var rebaseRepo_exports = {};
|
|
13740
|
+
__export(rebaseRepo_exports, {
|
|
13741
|
+
InvalidSwapError: () => InvalidSwapError5,
|
|
13742
|
+
toKnownErr: () => toKnownErr28
|
|
13743
|
+
});
|
|
13744
|
+
var InvalidSwapError5 = class extends XRPCError {
|
|
13745
|
+
constructor(src2) {
|
|
13746
|
+
super(src2.status, src2.error, src2.message);
|
|
13747
|
+
}
|
|
13748
|
+
};
|
|
13749
|
+
function toKnownErr28(e) {
|
|
13750
|
+
if (e instanceof XRPCError) {
|
|
13751
|
+
if (e.error === "InvalidSwap")
|
|
13752
|
+
return new InvalidSwapError5(e);
|
|
13753
|
+
}
|
|
13754
|
+
return e;
|
|
13755
|
+
}
|
|
13756
|
+
|
|
12563
13757
|
// src/client/types/com/atproto/repo/uploadBlob.ts
|
|
12564
13758
|
var uploadBlob_exports = {};
|
|
12565
13759
|
__export(uploadBlob_exports, {
|
|
12566
|
-
toKnownErr: () =>
|
|
13760
|
+
toKnownErr: () => toKnownErr29
|
|
12567
13761
|
});
|
|
12568
|
-
function
|
|
13762
|
+
function toKnownErr29(e) {
|
|
12569
13763
|
if (e instanceof XRPCError) {
|
|
12570
13764
|
}
|
|
12571
13765
|
return e;
|
|
@@ -12579,7 +13773,7 @@ __export(createAccount_exports, {
|
|
|
12579
13773
|
InvalidInviteCodeError: () => InvalidInviteCodeError,
|
|
12580
13774
|
InvalidPasswordError: () => InvalidPasswordError,
|
|
12581
13775
|
UnsupportedDomainError: () => UnsupportedDomainError,
|
|
12582
|
-
toKnownErr: () =>
|
|
13776
|
+
toKnownErr: () => toKnownErr30
|
|
12583
13777
|
});
|
|
12584
13778
|
var InvalidHandleError2 = class extends XRPCError {
|
|
12585
13779
|
constructor(src2) {
|
|
@@ -12606,7 +13800,7 @@ var UnsupportedDomainError = class extends XRPCError {
|
|
|
12606
13800
|
super(src2.status, src2.error, src2.message);
|
|
12607
13801
|
}
|
|
12608
13802
|
};
|
|
12609
|
-
function
|
|
13803
|
+
function toKnownErr30(e) {
|
|
12610
13804
|
if (e instanceof XRPCError) {
|
|
12611
13805
|
if (e.error === "InvalidHandle")
|
|
12612
13806
|
return new InvalidHandleError2(e);
|
|
@@ -12627,7 +13821,7 @@ var createAppPassword_exports = {};
|
|
|
12627
13821
|
__export(createAppPassword_exports, {
|
|
12628
13822
|
AccountTakedownError: () => AccountTakedownError,
|
|
12629
13823
|
isAppPassword: () => isAppPassword,
|
|
12630
|
-
toKnownErr: () =>
|
|
13824
|
+
toKnownErr: () => toKnownErr31,
|
|
12631
13825
|
validateAppPassword: () => validateAppPassword
|
|
12632
13826
|
});
|
|
12633
13827
|
var AccountTakedownError = class extends XRPCError {
|
|
@@ -12635,7 +13829,7 @@ var AccountTakedownError = class extends XRPCError {
|
|
|
12635
13829
|
super(src2.status, src2.error, src2.message);
|
|
12636
13830
|
}
|
|
12637
13831
|
};
|
|
12638
|
-
function
|
|
13832
|
+
function toKnownErr31(e) {
|
|
12639
13833
|
if (e instanceof XRPCError) {
|
|
12640
13834
|
if (e.error === "AccountTakedown")
|
|
12641
13835
|
return new AccountTakedownError(e);
|
|
@@ -12655,9 +13849,9 @@ function validateAppPassword(v) {
|
|
|
12655
13849
|
// src/client/types/com/atproto/server/createInviteCode.ts
|
|
12656
13850
|
var createInviteCode_exports = {};
|
|
12657
13851
|
__export(createInviteCode_exports, {
|
|
12658
|
-
toKnownErr: () =>
|
|
13852
|
+
toKnownErr: () => toKnownErr32
|
|
12659
13853
|
});
|
|
12660
|
-
function
|
|
13854
|
+
function toKnownErr32(e) {
|
|
12661
13855
|
if (e instanceof XRPCError) {
|
|
12662
13856
|
}
|
|
12663
13857
|
return e;
|
|
@@ -12667,10 +13861,10 @@ function toKnownErr29(e) {
|
|
|
12667
13861
|
var createInviteCodes_exports = {};
|
|
12668
13862
|
__export(createInviteCodes_exports, {
|
|
12669
13863
|
isAccountCodes: () => isAccountCodes,
|
|
12670
|
-
toKnownErr: () =>
|
|
13864
|
+
toKnownErr: () => toKnownErr33,
|
|
12671
13865
|
validateAccountCodes: () => validateAccountCodes
|
|
12672
13866
|
});
|
|
12673
|
-
function
|
|
13867
|
+
function toKnownErr33(e) {
|
|
12674
13868
|
if (e instanceof XRPCError) {
|
|
12675
13869
|
}
|
|
12676
13870
|
return e;
|
|
@@ -12689,14 +13883,14 @@ function validateAccountCodes(v) {
|
|
|
12689
13883
|
var createSession_exports = {};
|
|
12690
13884
|
__export(createSession_exports, {
|
|
12691
13885
|
AccountTakedownError: () => AccountTakedownError2,
|
|
12692
|
-
toKnownErr: () =>
|
|
13886
|
+
toKnownErr: () => toKnownErr34
|
|
12693
13887
|
});
|
|
12694
13888
|
var AccountTakedownError2 = class extends XRPCError {
|
|
12695
13889
|
constructor(src2) {
|
|
12696
13890
|
super(src2.status, src2.error, src2.message);
|
|
12697
13891
|
}
|
|
12698
13892
|
};
|
|
12699
|
-
function
|
|
13893
|
+
function toKnownErr34(e) {
|
|
12700
13894
|
if (e instanceof XRPCError) {
|
|
12701
13895
|
if (e.error === "AccountTakedown")
|
|
12702
13896
|
return new AccountTakedownError2(e);
|
|
@@ -12709,7 +13903,7 @@ var deleteAccount_exports = {};
|
|
|
12709
13903
|
__export(deleteAccount_exports, {
|
|
12710
13904
|
ExpiredTokenError: () => ExpiredTokenError,
|
|
12711
13905
|
InvalidTokenError: () => InvalidTokenError,
|
|
12712
|
-
toKnownErr: () =>
|
|
13906
|
+
toKnownErr: () => toKnownErr35
|
|
12713
13907
|
});
|
|
12714
13908
|
var ExpiredTokenError = class extends XRPCError {
|
|
12715
13909
|
constructor(src2) {
|
|
@@ -12721,7 +13915,7 @@ var InvalidTokenError = class extends XRPCError {
|
|
|
12721
13915
|
super(src2.status, src2.error, src2.message);
|
|
12722
13916
|
}
|
|
12723
13917
|
};
|
|
12724
|
-
function
|
|
13918
|
+
function toKnownErr35(e) {
|
|
12725
13919
|
if (e instanceof XRPCError) {
|
|
12726
13920
|
if (e.error === "ExpiredToken")
|
|
12727
13921
|
return new ExpiredTokenError(e);
|
|
@@ -12734,9 +13928,9 @@ function toKnownErr32(e) {
|
|
|
12734
13928
|
// src/client/types/com/atproto/server/deleteSession.ts
|
|
12735
13929
|
var deleteSession_exports = {};
|
|
12736
13930
|
__export(deleteSession_exports, {
|
|
12737
|
-
toKnownErr: () =>
|
|
13931
|
+
toKnownErr: () => toKnownErr36
|
|
12738
13932
|
});
|
|
12739
|
-
function
|
|
13933
|
+
function toKnownErr36(e) {
|
|
12740
13934
|
if (e instanceof XRPCError) {
|
|
12741
13935
|
}
|
|
12742
13936
|
return e;
|
|
@@ -12746,10 +13940,10 @@ function toKnownErr33(e) {
|
|
|
12746
13940
|
var describeServer_exports = {};
|
|
12747
13941
|
__export(describeServer_exports, {
|
|
12748
13942
|
isLinks: () => isLinks,
|
|
12749
|
-
toKnownErr: () =>
|
|
13943
|
+
toKnownErr: () => toKnownErr37,
|
|
12750
13944
|
validateLinks: () => validateLinks
|
|
12751
13945
|
});
|
|
12752
|
-
function
|
|
13946
|
+
function toKnownErr37(e) {
|
|
12753
13947
|
if (e instanceof XRPCError) {
|
|
12754
13948
|
}
|
|
12755
13949
|
return e;
|
|
@@ -12765,14 +13959,14 @@ function validateLinks(v) {
|
|
|
12765
13959
|
var getAccountInviteCodes_exports = {};
|
|
12766
13960
|
__export(getAccountInviteCodes_exports, {
|
|
12767
13961
|
DuplicateCreateError: () => DuplicateCreateError,
|
|
12768
|
-
toKnownErr: () =>
|
|
13962
|
+
toKnownErr: () => toKnownErr38
|
|
12769
13963
|
});
|
|
12770
13964
|
var DuplicateCreateError = class extends XRPCError {
|
|
12771
13965
|
constructor(src2) {
|
|
12772
13966
|
super(src2.status, src2.error, src2.message);
|
|
12773
13967
|
}
|
|
12774
13968
|
};
|
|
12775
|
-
function
|
|
13969
|
+
function toKnownErr38(e) {
|
|
12776
13970
|
if (e instanceof XRPCError) {
|
|
12777
13971
|
if (e.error === "DuplicateCreate")
|
|
12778
13972
|
return new DuplicateCreateError(e);
|
|
@@ -12783,9 +13977,9 @@ function toKnownErr35(e) {
|
|
|
12783
13977
|
// src/client/types/com/atproto/server/getSession.ts
|
|
12784
13978
|
var getSession_exports = {};
|
|
12785
13979
|
__export(getSession_exports, {
|
|
12786
|
-
toKnownErr: () =>
|
|
13980
|
+
toKnownErr: () => toKnownErr39
|
|
12787
13981
|
});
|
|
12788
|
-
function
|
|
13982
|
+
function toKnownErr39(e) {
|
|
12789
13983
|
if (e instanceof XRPCError) {
|
|
12790
13984
|
}
|
|
12791
13985
|
return e;
|
|
@@ -12796,7 +13990,7 @@ var listAppPasswords_exports = {};
|
|
|
12796
13990
|
__export(listAppPasswords_exports, {
|
|
12797
13991
|
AccountTakedownError: () => AccountTakedownError3,
|
|
12798
13992
|
isAppPassword: () => isAppPassword2,
|
|
12799
|
-
toKnownErr: () =>
|
|
13993
|
+
toKnownErr: () => toKnownErr40,
|
|
12800
13994
|
validateAppPassword: () => validateAppPassword2
|
|
12801
13995
|
});
|
|
12802
13996
|
var AccountTakedownError3 = class extends XRPCError {
|
|
@@ -12804,7 +13998,7 @@ var AccountTakedownError3 = class extends XRPCError {
|
|
|
12804
13998
|
super(src2.status, src2.error, src2.message);
|
|
12805
13999
|
}
|
|
12806
14000
|
};
|
|
12807
|
-
function
|
|
14001
|
+
function toKnownErr40(e) {
|
|
12808
14002
|
if (e instanceof XRPCError) {
|
|
12809
14003
|
if (e.error === "AccountTakedown")
|
|
12810
14004
|
return new AccountTakedownError3(e);
|
|
@@ -12822,14 +14016,14 @@ function validateAppPassword2(v) {
|
|
|
12822
14016
|
var refreshSession_exports = {};
|
|
12823
14017
|
__export(refreshSession_exports, {
|
|
12824
14018
|
AccountTakedownError: () => AccountTakedownError4,
|
|
12825
|
-
toKnownErr: () =>
|
|
14019
|
+
toKnownErr: () => toKnownErr41
|
|
12826
14020
|
});
|
|
12827
14021
|
var AccountTakedownError4 = class extends XRPCError {
|
|
12828
14022
|
constructor(src2) {
|
|
12829
14023
|
super(src2.status, src2.error, src2.message);
|
|
12830
14024
|
}
|
|
12831
14025
|
};
|
|
12832
|
-
function
|
|
14026
|
+
function toKnownErr41(e) {
|
|
12833
14027
|
if (e instanceof XRPCError) {
|
|
12834
14028
|
if (e.error === "AccountTakedown")
|
|
12835
14029
|
return new AccountTakedownError4(e);
|
|
@@ -12840,9 +14034,9 @@ function toKnownErr38(e) {
|
|
|
12840
14034
|
// src/client/types/com/atproto/server/requestAccountDelete.ts
|
|
12841
14035
|
var requestAccountDelete_exports = {};
|
|
12842
14036
|
__export(requestAccountDelete_exports, {
|
|
12843
|
-
toKnownErr: () =>
|
|
14037
|
+
toKnownErr: () => toKnownErr42
|
|
12844
14038
|
});
|
|
12845
|
-
function
|
|
14039
|
+
function toKnownErr42(e) {
|
|
12846
14040
|
if (e instanceof XRPCError) {
|
|
12847
14041
|
}
|
|
12848
14042
|
return e;
|
|
@@ -12851,9 +14045,9 @@ function toKnownErr39(e) {
|
|
|
12851
14045
|
// src/client/types/com/atproto/server/requestPasswordReset.ts
|
|
12852
14046
|
var requestPasswordReset_exports = {};
|
|
12853
14047
|
__export(requestPasswordReset_exports, {
|
|
12854
|
-
toKnownErr: () =>
|
|
14048
|
+
toKnownErr: () => toKnownErr43
|
|
12855
14049
|
});
|
|
12856
|
-
function
|
|
14050
|
+
function toKnownErr43(e) {
|
|
12857
14051
|
if (e instanceof XRPCError) {
|
|
12858
14052
|
}
|
|
12859
14053
|
return e;
|
|
@@ -12864,7 +14058,7 @@ var resetPassword_exports = {};
|
|
|
12864
14058
|
__export(resetPassword_exports, {
|
|
12865
14059
|
ExpiredTokenError: () => ExpiredTokenError2,
|
|
12866
14060
|
InvalidTokenError: () => InvalidTokenError2,
|
|
12867
|
-
toKnownErr: () =>
|
|
14061
|
+
toKnownErr: () => toKnownErr44
|
|
12868
14062
|
});
|
|
12869
14063
|
var ExpiredTokenError2 = class extends XRPCError {
|
|
12870
14064
|
constructor(src2) {
|
|
@@ -12876,7 +14070,7 @@ var InvalidTokenError2 = class extends XRPCError {
|
|
|
12876
14070
|
super(src2.status, src2.error, src2.message);
|
|
12877
14071
|
}
|
|
12878
14072
|
};
|
|
12879
|
-
function
|
|
14073
|
+
function toKnownErr44(e) {
|
|
12880
14074
|
if (e instanceof XRPCError) {
|
|
12881
14075
|
if (e.error === "ExpiredToken")
|
|
12882
14076
|
return new ExpiredTokenError2(e);
|
|
@@ -12889,9 +14083,9 @@ function toKnownErr41(e) {
|
|
|
12889
14083
|
// src/client/types/com/atproto/server/revokeAppPassword.ts
|
|
12890
14084
|
var revokeAppPassword_exports = {};
|
|
12891
14085
|
__export(revokeAppPassword_exports, {
|
|
12892
|
-
toKnownErr: () =>
|
|
14086
|
+
toKnownErr: () => toKnownErr45
|
|
12893
14087
|
});
|
|
12894
|
-
function
|
|
14088
|
+
function toKnownErr45(e) {
|
|
12895
14089
|
if (e instanceof XRPCError) {
|
|
12896
14090
|
}
|
|
12897
14091
|
return e;
|
|
@@ -12900,9 +14094,9 @@ function toKnownErr42(e) {
|
|
|
12900
14094
|
// src/client/types/com/atproto/sync/getBlob.ts
|
|
12901
14095
|
var getBlob_exports = {};
|
|
12902
14096
|
__export(getBlob_exports, {
|
|
12903
|
-
toKnownErr: () =>
|
|
14097
|
+
toKnownErr: () => toKnownErr46
|
|
12904
14098
|
});
|
|
12905
|
-
function
|
|
14099
|
+
function toKnownErr46(e) {
|
|
12906
14100
|
if (e instanceof XRPCError) {
|
|
12907
14101
|
}
|
|
12908
14102
|
return e;
|
|
@@ -12911,9 +14105,9 @@ function toKnownErr43(e) {
|
|
|
12911
14105
|
// src/client/types/com/atproto/sync/getBlocks.ts
|
|
12912
14106
|
var getBlocks_exports = {};
|
|
12913
14107
|
__export(getBlocks_exports, {
|
|
12914
|
-
toKnownErr: () =>
|
|
14108
|
+
toKnownErr: () => toKnownErr47
|
|
12915
14109
|
});
|
|
12916
|
-
function
|
|
14110
|
+
function toKnownErr47(e) {
|
|
12917
14111
|
if (e instanceof XRPCError) {
|
|
12918
14112
|
}
|
|
12919
14113
|
return e;
|
|
@@ -12922,9 +14116,9 @@ function toKnownErr44(e) {
|
|
|
12922
14116
|
// src/client/types/com/atproto/sync/getCheckout.ts
|
|
12923
14117
|
var getCheckout_exports = {};
|
|
12924
14118
|
__export(getCheckout_exports, {
|
|
12925
|
-
toKnownErr: () =>
|
|
14119
|
+
toKnownErr: () => toKnownErr48
|
|
12926
14120
|
});
|
|
12927
|
-
function
|
|
14121
|
+
function toKnownErr48(e) {
|
|
12928
14122
|
if (e instanceof XRPCError) {
|
|
12929
14123
|
}
|
|
12930
14124
|
return e;
|
|
@@ -12933,9 +14127,9 @@ function toKnownErr45(e) {
|
|
|
12933
14127
|
// src/client/types/com/atproto/sync/getCommitPath.ts
|
|
12934
14128
|
var getCommitPath_exports = {};
|
|
12935
14129
|
__export(getCommitPath_exports, {
|
|
12936
|
-
toKnownErr: () =>
|
|
14130
|
+
toKnownErr: () => toKnownErr49
|
|
12937
14131
|
});
|
|
12938
|
-
function
|
|
14132
|
+
function toKnownErr49(e) {
|
|
12939
14133
|
if (e instanceof XRPCError) {
|
|
12940
14134
|
}
|
|
12941
14135
|
return e;
|
|
@@ -12944,9 +14138,9 @@ function toKnownErr46(e) {
|
|
|
12944
14138
|
// src/client/types/com/atproto/sync/getHead.ts
|
|
12945
14139
|
var getHead_exports = {};
|
|
12946
14140
|
__export(getHead_exports, {
|
|
12947
|
-
toKnownErr: () =>
|
|
14141
|
+
toKnownErr: () => toKnownErr50
|
|
12948
14142
|
});
|
|
12949
|
-
function
|
|
14143
|
+
function toKnownErr50(e) {
|
|
12950
14144
|
if (e instanceof XRPCError) {
|
|
12951
14145
|
}
|
|
12952
14146
|
return e;
|
|
@@ -12955,9 +14149,9 @@ function toKnownErr47(e) {
|
|
|
12955
14149
|
// src/client/types/com/atproto/sync/getRecord.ts
|
|
12956
14150
|
var getRecord_exports3 = {};
|
|
12957
14151
|
__export(getRecord_exports3, {
|
|
12958
|
-
toKnownErr: () =>
|
|
14152
|
+
toKnownErr: () => toKnownErr51
|
|
12959
14153
|
});
|
|
12960
|
-
function
|
|
14154
|
+
function toKnownErr51(e) {
|
|
12961
14155
|
if (e instanceof XRPCError) {
|
|
12962
14156
|
}
|
|
12963
14157
|
return e;
|
|
@@ -12966,9 +14160,9 @@ function toKnownErr48(e) {
|
|
|
12966
14160
|
// src/client/types/com/atproto/sync/getRepo.ts
|
|
12967
14161
|
var getRepo_exports2 = {};
|
|
12968
14162
|
__export(getRepo_exports2, {
|
|
12969
|
-
toKnownErr: () =>
|
|
14163
|
+
toKnownErr: () => toKnownErr52
|
|
12970
14164
|
});
|
|
12971
|
-
function
|
|
14165
|
+
function toKnownErr52(e) {
|
|
12972
14166
|
if (e instanceof XRPCError) {
|
|
12973
14167
|
}
|
|
12974
14168
|
return e;
|
|
@@ -12977,9 +14171,9 @@ function toKnownErr49(e) {
|
|
|
12977
14171
|
// src/client/types/com/atproto/sync/listBlobs.ts
|
|
12978
14172
|
var listBlobs_exports = {};
|
|
12979
14173
|
__export(listBlobs_exports, {
|
|
12980
|
-
toKnownErr: () =>
|
|
14174
|
+
toKnownErr: () => toKnownErr53
|
|
12981
14175
|
});
|
|
12982
|
-
function
|
|
14176
|
+
function toKnownErr53(e) {
|
|
12983
14177
|
if (e instanceof XRPCError) {
|
|
12984
14178
|
}
|
|
12985
14179
|
return e;
|
|
@@ -12989,10 +14183,10 @@ function toKnownErr50(e) {
|
|
|
12989
14183
|
var listRepos_exports = {};
|
|
12990
14184
|
__export(listRepos_exports, {
|
|
12991
14185
|
isRepo: () => isRepo,
|
|
12992
|
-
toKnownErr: () =>
|
|
14186
|
+
toKnownErr: () => toKnownErr54,
|
|
12993
14187
|
validateRepo: () => validateRepo
|
|
12994
14188
|
});
|
|
12995
|
-
function
|
|
14189
|
+
function toKnownErr54(e) {
|
|
12996
14190
|
if (e instanceof XRPCError) {
|
|
12997
14191
|
}
|
|
12998
14192
|
return e;
|
|
@@ -13007,9 +14201,9 @@ function validateRepo(v) {
|
|
|
13007
14201
|
// src/client/types/com/atproto/sync/notifyOfUpdate.ts
|
|
13008
14202
|
var notifyOfUpdate_exports = {};
|
|
13009
14203
|
__export(notifyOfUpdate_exports, {
|
|
13010
|
-
toKnownErr: () =>
|
|
14204
|
+
toKnownErr: () => toKnownErr55
|
|
13011
14205
|
});
|
|
13012
|
-
function
|
|
14206
|
+
function toKnownErr55(e) {
|
|
13013
14207
|
if (e instanceof XRPCError) {
|
|
13014
14208
|
}
|
|
13015
14209
|
return e;
|
|
@@ -13018,9 +14212,9 @@ function toKnownErr52(e) {
|
|
|
13018
14212
|
// src/client/types/com/atproto/sync/requestCrawl.ts
|
|
13019
14213
|
var requestCrawl_exports = {};
|
|
13020
14214
|
__export(requestCrawl_exports, {
|
|
13021
|
-
toKnownErr: () =>
|
|
14215
|
+
toKnownErr: () => toKnownErr56
|
|
13022
14216
|
});
|
|
13023
|
-
function
|
|
14217
|
+
function toKnownErr56(e) {
|
|
13024
14218
|
if (e instanceof XRPCError) {
|
|
13025
14219
|
}
|
|
13026
14220
|
return e;
|
|
@@ -13029,9 +14223,9 @@ function toKnownErr53(e) {
|
|
|
13029
14223
|
// src/client/types/app/bsky/actor/getProfile.ts
|
|
13030
14224
|
var getProfile_exports = {};
|
|
13031
14225
|
__export(getProfile_exports, {
|
|
13032
|
-
toKnownErr: () =>
|
|
14226
|
+
toKnownErr: () => toKnownErr57
|
|
13033
14227
|
});
|
|
13034
|
-
function
|
|
14228
|
+
function toKnownErr57(e) {
|
|
13035
14229
|
if (e instanceof XRPCError) {
|
|
13036
14230
|
}
|
|
13037
14231
|
return e;
|
|
@@ -13040,9 +14234,9 @@ function toKnownErr54(e) {
|
|
|
13040
14234
|
// src/client/types/app/bsky/actor/getProfiles.ts
|
|
13041
14235
|
var getProfiles_exports = {};
|
|
13042
14236
|
__export(getProfiles_exports, {
|
|
13043
|
-
toKnownErr: () =>
|
|
14237
|
+
toKnownErr: () => toKnownErr58
|
|
13044
14238
|
});
|
|
13045
|
-
function
|
|
14239
|
+
function toKnownErr58(e) {
|
|
13046
14240
|
if (e instanceof XRPCError) {
|
|
13047
14241
|
}
|
|
13048
14242
|
return e;
|
|
@@ -13051,9 +14245,9 @@ function toKnownErr55(e) {
|
|
|
13051
14245
|
// src/client/types/app/bsky/actor/getSuggestions.ts
|
|
13052
14246
|
var getSuggestions_exports = {};
|
|
13053
14247
|
__export(getSuggestions_exports, {
|
|
13054
|
-
toKnownErr: () =>
|
|
14248
|
+
toKnownErr: () => toKnownErr59
|
|
13055
14249
|
});
|
|
13056
|
-
function
|
|
14250
|
+
function toKnownErr59(e) {
|
|
13057
14251
|
if (e instanceof XRPCError) {
|
|
13058
14252
|
}
|
|
13059
14253
|
return e;
|
|
@@ -13062,9 +14256,9 @@ function toKnownErr56(e) {
|
|
|
13062
14256
|
// src/client/types/app/bsky/actor/searchActors.ts
|
|
13063
14257
|
var searchActors_exports = {};
|
|
13064
14258
|
__export(searchActors_exports, {
|
|
13065
|
-
toKnownErr: () =>
|
|
14259
|
+
toKnownErr: () => toKnownErr60
|
|
13066
14260
|
});
|
|
13067
|
-
function
|
|
14261
|
+
function toKnownErr60(e) {
|
|
13068
14262
|
if (e instanceof XRPCError) {
|
|
13069
14263
|
}
|
|
13070
14264
|
return e;
|
|
@@ -13073,9 +14267,9 @@ function toKnownErr57(e) {
|
|
|
13073
14267
|
// src/client/types/app/bsky/actor/searchActorsTypeahead.ts
|
|
13074
14268
|
var searchActorsTypeahead_exports = {};
|
|
13075
14269
|
__export(searchActorsTypeahead_exports, {
|
|
13076
|
-
toKnownErr: () =>
|
|
14270
|
+
toKnownErr: () => toKnownErr61
|
|
13077
14271
|
});
|
|
13078
|
-
function
|
|
14272
|
+
function toKnownErr61(e) {
|
|
13079
14273
|
if (e instanceof XRPCError) {
|
|
13080
14274
|
}
|
|
13081
14275
|
return e;
|
|
@@ -13086,7 +14280,7 @@ var getAuthorFeed_exports = {};
|
|
|
13086
14280
|
__export(getAuthorFeed_exports, {
|
|
13087
14281
|
BlockedActorError: () => BlockedActorError,
|
|
13088
14282
|
BlockedByActorError: () => BlockedByActorError,
|
|
13089
|
-
toKnownErr: () =>
|
|
14283
|
+
toKnownErr: () => toKnownErr62
|
|
13090
14284
|
});
|
|
13091
14285
|
var BlockedActorError = class extends XRPCError {
|
|
13092
14286
|
constructor(src2) {
|
|
@@ -13098,7 +14292,7 @@ var BlockedByActorError = class extends XRPCError {
|
|
|
13098
14292
|
super(src2.status, src2.error, src2.message);
|
|
13099
14293
|
}
|
|
13100
14294
|
};
|
|
13101
|
-
function
|
|
14295
|
+
function toKnownErr62(e) {
|
|
13102
14296
|
if (e instanceof XRPCError) {
|
|
13103
14297
|
if (e.error === "BlockedActor")
|
|
13104
14298
|
return new BlockedActorError(e);
|
|
@@ -13112,10 +14306,10 @@ function toKnownErr59(e) {
|
|
|
13112
14306
|
var getLikes_exports = {};
|
|
13113
14307
|
__export(getLikes_exports, {
|
|
13114
14308
|
isLike: () => isLike,
|
|
13115
|
-
toKnownErr: () =>
|
|
14309
|
+
toKnownErr: () => toKnownErr63,
|
|
13116
14310
|
validateLike: () => validateLike
|
|
13117
14311
|
});
|
|
13118
|
-
function
|
|
14312
|
+
function toKnownErr63(e) {
|
|
13119
14313
|
if (e instanceof XRPCError) {
|
|
13120
14314
|
}
|
|
13121
14315
|
return e;
|
|
@@ -13131,14 +14325,14 @@ function validateLike(v) {
|
|
|
13131
14325
|
var getPostThread_exports = {};
|
|
13132
14326
|
__export(getPostThread_exports, {
|
|
13133
14327
|
NotFoundError: () => NotFoundError,
|
|
13134
|
-
toKnownErr: () =>
|
|
14328
|
+
toKnownErr: () => toKnownErr64
|
|
13135
14329
|
});
|
|
13136
14330
|
var NotFoundError = class extends XRPCError {
|
|
13137
14331
|
constructor(src2) {
|
|
13138
14332
|
super(src2.status, src2.error, src2.message);
|
|
13139
14333
|
}
|
|
13140
14334
|
};
|
|
13141
|
-
function
|
|
14335
|
+
function toKnownErr64(e) {
|
|
13142
14336
|
if (e instanceof XRPCError) {
|
|
13143
14337
|
if (e.error === "NotFound")
|
|
13144
14338
|
return new NotFoundError(e);
|
|
@@ -13149,9 +14343,9 @@ function toKnownErr61(e) {
|
|
|
13149
14343
|
// src/client/types/app/bsky/feed/getPosts.ts
|
|
13150
14344
|
var getPosts_exports = {};
|
|
13151
14345
|
__export(getPosts_exports, {
|
|
13152
|
-
toKnownErr: () =>
|
|
14346
|
+
toKnownErr: () => toKnownErr65
|
|
13153
14347
|
});
|
|
13154
|
-
function
|
|
14348
|
+
function toKnownErr65(e) {
|
|
13155
14349
|
if (e instanceof XRPCError) {
|
|
13156
14350
|
}
|
|
13157
14351
|
return e;
|
|
@@ -13160,9 +14354,9 @@ function toKnownErr62(e) {
|
|
|
13160
14354
|
// src/client/types/app/bsky/feed/getRepostedBy.ts
|
|
13161
14355
|
var getRepostedBy_exports = {};
|
|
13162
14356
|
__export(getRepostedBy_exports, {
|
|
13163
|
-
toKnownErr: () =>
|
|
14357
|
+
toKnownErr: () => toKnownErr66
|
|
13164
14358
|
});
|
|
13165
|
-
function
|
|
14359
|
+
function toKnownErr66(e) {
|
|
13166
14360
|
if (e instanceof XRPCError) {
|
|
13167
14361
|
}
|
|
13168
14362
|
return e;
|
|
@@ -13171,9 +14365,9 @@ function toKnownErr63(e) {
|
|
|
13171
14365
|
// src/client/types/app/bsky/feed/getTimeline.ts
|
|
13172
14366
|
var getTimeline_exports = {};
|
|
13173
14367
|
__export(getTimeline_exports, {
|
|
13174
|
-
toKnownErr: () =>
|
|
14368
|
+
toKnownErr: () => toKnownErr67
|
|
13175
14369
|
});
|
|
13176
|
-
function
|
|
14370
|
+
function toKnownErr67(e) {
|
|
13177
14371
|
if (e instanceof XRPCError) {
|
|
13178
14372
|
}
|
|
13179
14373
|
return e;
|
|
@@ -13182,9 +14376,9 @@ function toKnownErr64(e) {
|
|
|
13182
14376
|
// src/client/types/app/bsky/graph/getBlocks.ts
|
|
13183
14377
|
var getBlocks_exports2 = {};
|
|
13184
14378
|
__export(getBlocks_exports2, {
|
|
13185
|
-
toKnownErr: () =>
|
|
14379
|
+
toKnownErr: () => toKnownErr68
|
|
13186
14380
|
});
|
|
13187
|
-
function
|
|
14381
|
+
function toKnownErr68(e) {
|
|
13188
14382
|
if (e instanceof XRPCError) {
|
|
13189
14383
|
}
|
|
13190
14384
|
return e;
|
|
@@ -13193,9 +14387,9 @@ function toKnownErr65(e) {
|
|
|
13193
14387
|
// src/client/types/app/bsky/graph/getFollowers.ts
|
|
13194
14388
|
var getFollowers_exports = {};
|
|
13195
14389
|
__export(getFollowers_exports, {
|
|
13196
|
-
toKnownErr: () =>
|
|
14390
|
+
toKnownErr: () => toKnownErr69
|
|
13197
14391
|
});
|
|
13198
|
-
function
|
|
14392
|
+
function toKnownErr69(e) {
|
|
13199
14393
|
if (e instanceof XRPCError) {
|
|
13200
14394
|
}
|
|
13201
14395
|
return e;
|
|
@@ -13204,9 +14398,42 @@ function toKnownErr66(e) {
|
|
|
13204
14398
|
// src/client/types/app/bsky/graph/getFollows.ts
|
|
13205
14399
|
var getFollows_exports = {};
|
|
13206
14400
|
__export(getFollows_exports, {
|
|
13207
|
-
toKnownErr: () =>
|
|
14401
|
+
toKnownErr: () => toKnownErr70
|
|
13208
14402
|
});
|
|
13209
|
-
function
|
|
14403
|
+
function toKnownErr70(e) {
|
|
14404
|
+
if (e instanceof XRPCError) {
|
|
14405
|
+
}
|
|
14406
|
+
return e;
|
|
14407
|
+
}
|
|
14408
|
+
|
|
14409
|
+
// src/client/types/app/bsky/graph/getList.ts
|
|
14410
|
+
var getList_exports = {};
|
|
14411
|
+
__export(getList_exports, {
|
|
14412
|
+
toKnownErr: () => toKnownErr71
|
|
14413
|
+
});
|
|
14414
|
+
function toKnownErr71(e) {
|
|
14415
|
+
if (e instanceof XRPCError) {
|
|
14416
|
+
}
|
|
14417
|
+
return e;
|
|
14418
|
+
}
|
|
14419
|
+
|
|
14420
|
+
// src/client/types/app/bsky/graph/getListMutes.ts
|
|
14421
|
+
var getListMutes_exports = {};
|
|
14422
|
+
__export(getListMutes_exports, {
|
|
14423
|
+
toKnownErr: () => toKnownErr72
|
|
14424
|
+
});
|
|
14425
|
+
function toKnownErr72(e) {
|
|
14426
|
+
if (e instanceof XRPCError) {
|
|
14427
|
+
}
|
|
14428
|
+
return e;
|
|
14429
|
+
}
|
|
14430
|
+
|
|
14431
|
+
// src/client/types/app/bsky/graph/getLists.ts
|
|
14432
|
+
var getLists_exports = {};
|
|
14433
|
+
__export(getLists_exports, {
|
|
14434
|
+
toKnownErr: () => toKnownErr73
|
|
14435
|
+
});
|
|
14436
|
+
function toKnownErr73(e) {
|
|
13210
14437
|
if (e instanceof XRPCError) {
|
|
13211
14438
|
}
|
|
13212
14439
|
return e;
|
|
@@ -13215,9 +14442,9 @@ function toKnownErr67(e) {
|
|
|
13215
14442
|
// src/client/types/app/bsky/graph/getMutes.ts
|
|
13216
14443
|
var getMutes_exports = {};
|
|
13217
14444
|
__export(getMutes_exports, {
|
|
13218
|
-
toKnownErr: () =>
|
|
14445
|
+
toKnownErr: () => toKnownErr74
|
|
13219
14446
|
});
|
|
13220
|
-
function
|
|
14447
|
+
function toKnownErr74(e) {
|
|
13221
14448
|
if (e instanceof XRPCError) {
|
|
13222
14449
|
}
|
|
13223
14450
|
return e;
|
|
@@ -13226,9 +14453,20 @@ function toKnownErr68(e) {
|
|
|
13226
14453
|
// src/client/types/app/bsky/graph/muteActor.ts
|
|
13227
14454
|
var muteActor_exports = {};
|
|
13228
14455
|
__export(muteActor_exports, {
|
|
13229
|
-
toKnownErr: () =>
|
|
14456
|
+
toKnownErr: () => toKnownErr75
|
|
13230
14457
|
});
|
|
13231
|
-
function
|
|
14458
|
+
function toKnownErr75(e) {
|
|
14459
|
+
if (e instanceof XRPCError) {
|
|
14460
|
+
}
|
|
14461
|
+
return e;
|
|
14462
|
+
}
|
|
14463
|
+
|
|
14464
|
+
// src/client/types/app/bsky/graph/muteActorList.ts
|
|
14465
|
+
var muteActorList_exports = {};
|
|
14466
|
+
__export(muteActorList_exports, {
|
|
14467
|
+
toKnownErr: () => toKnownErr76
|
|
14468
|
+
});
|
|
14469
|
+
function toKnownErr76(e) {
|
|
13232
14470
|
if (e instanceof XRPCError) {
|
|
13233
14471
|
}
|
|
13234
14472
|
return e;
|
|
@@ -13237,9 +14475,20 @@ function toKnownErr69(e) {
|
|
|
13237
14475
|
// src/client/types/app/bsky/graph/unmuteActor.ts
|
|
13238
14476
|
var unmuteActor_exports = {};
|
|
13239
14477
|
__export(unmuteActor_exports, {
|
|
13240
|
-
toKnownErr: () =>
|
|
14478
|
+
toKnownErr: () => toKnownErr77
|
|
14479
|
+
});
|
|
14480
|
+
function toKnownErr77(e) {
|
|
14481
|
+
if (e instanceof XRPCError) {
|
|
14482
|
+
}
|
|
14483
|
+
return e;
|
|
14484
|
+
}
|
|
14485
|
+
|
|
14486
|
+
// src/client/types/app/bsky/graph/unmuteActorList.ts
|
|
14487
|
+
var unmuteActorList_exports = {};
|
|
14488
|
+
__export(unmuteActorList_exports, {
|
|
14489
|
+
toKnownErr: () => toKnownErr78
|
|
13241
14490
|
});
|
|
13242
|
-
function
|
|
14491
|
+
function toKnownErr78(e) {
|
|
13243
14492
|
if (e instanceof XRPCError) {
|
|
13244
14493
|
}
|
|
13245
14494
|
return e;
|
|
@@ -13248,9 +14497,9 @@ function toKnownErr70(e) {
|
|
|
13248
14497
|
// src/client/types/app/bsky/notification/getUnreadCount.ts
|
|
13249
14498
|
var getUnreadCount_exports = {};
|
|
13250
14499
|
__export(getUnreadCount_exports, {
|
|
13251
|
-
toKnownErr: () =>
|
|
14500
|
+
toKnownErr: () => toKnownErr79
|
|
13252
14501
|
});
|
|
13253
|
-
function
|
|
14502
|
+
function toKnownErr79(e) {
|
|
13254
14503
|
if (e instanceof XRPCError) {
|
|
13255
14504
|
}
|
|
13256
14505
|
return e;
|
|
@@ -13260,10 +14509,10 @@ function toKnownErr71(e) {
|
|
|
13260
14509
|
var listNotifications_exports = {};
|
|
13261
14510
|
__export(listNotifications_exports, {
|
|
13262
14511
|
isNotification: () => isNotification,
|
|
13263
|
-
toKnownErr: () =>
|
|
14512
|
+
toKnownErr: () => toKnownErr80,
|
|
13264
14513
|
validateNotification: () => validateNotification
|
|
13265
14514
|
});
|
|
13266
|
-
function
|
|
14515
|
+
function toKnownErr80(e) {
|
|
13267
14516
|
if (e instanceof XRPCError) {
|
|
13268
14517
|
}
|
|
13269
14518
|
return e;
|
|
@@ -13281,9 +14530,9 @@ function validateNotification(v) {
|
|
|
13281
14530
|
// src/client/types/app/bsky/notification/updateSeen.ts
|
|
13282
14531
|
var updateSeen_exports = {};
|
|
13283
14532
|
__export(updateSeen_exports, {
|
|
13284
|
-
toKnownErr: () =>
|
|
14533
|
+
toKnownErr: () => toKnownErr81
|
|
13285
14534
|
});
|
|
13286
|
-
function
|
|
14535
|
+
function toKnownErr81(e) {
|
|
13287
14536
|
if (e instanceof XRPCError) {
|
|
13288
14537
|
}
|
|
13289
14538
|
return e;
|
|
@@ -13292,9 +14541,9 @@ function toKnownErr73(e) {
|
|
|
13292
14541
|
// src/client/types/app/bsky/unspecced/getPopular.ts
|
|
13293
14542
|
var getPopular_exports = {};
|
|
13294
14543
|
__export(getPopular_exports, {
|
|
13295
|
-
toKnownErr: () =>
|
|
14544
|
+
toKnownErr: () => toKnownErr82
|
|
13296
14545
|
});
|
|
13297
|
-
function
|
|
14546
|
+
function toKnownErr82(e) {
|
|
13298
14547
|
if (e instanceof XRPCError) {
|
|
13299
14548
|
}
|
|
13300
14549
|
return e;
|
|
@@ -13304,6 +14553,7 @@ function toKnownErr74(e) {
|
|
|
13304
14553
|
var defs_exports = {};
|
|
13305
14554
|
__export(defs_exports, {
|
|
13306
14555
|
ACKNOWLEDGE: () => ACKNOWLEDGE,
|
|
14556
|
+
ESCALATE: () => ESCALATE,
|
|
13307
14557
|
FLAG: () => FLAG,
|
|
13308
14558
|
TAKEDOWN: () => TAKEDOWN,
|
|
13309
14559
|
isActionReversal: () => isActionReversal,
|
|
@@ -13366,6 +14616,7 @@ function validateActionReversal(v) {
|
|
|
13366
14616
|
var TAKEDOWN = "com.atproto.admin.defs#takedown";
|
|
13367
14617
|
var FLAG = "com.atproto.admin.defs#flag";
|
|
13368
14618
|
var ACKNOWLEDGE = "com.atproto.admin.defs#acknowledge";
|
|
14619
|
+
var ESCALATE = "com.atproto.admin.defs#escalate";
|
|
13369
14620
|
function isReportView(v) {
|
|
13370
14621
|
return isObj2(v) && hasProp2(v, "$type") && v.$type === "com.atproto.admin.defs#reportView";
|
|
13371
14622
|
}
|
|
@@ -13912,6 +15163,45 @@ function validateRecord6(v) {
|
|
|
13912
15163
|
return lexicons.validate("app.bsky.graph.block#main", v);
|
|
13913
15164
|
}
|
|
13914
15165
|
|
|
15166
|
+
// src/client/types/app/bsky/graph/defs.ts
|
|
15167
|
+
var defs_exports7 = {};
|
|
15168
|
+
__export(defs_exports7, {
|
|
15169
|
+
MODLIST: () => MODLIST,
|
|
15170
|
+
isListItemView: () => isListItemView,
|
|
15171
|
+
isListView: () => isListView,
|
|
15172
|
+
isListViewBasic: () => isListViewBasic,
|
|
15173
|
+
isListViewerState: () => isListViewerState,
|
|
15174
|
+
validateListItemView: () => validateListItemView,
|
|
15175
|
+
validateListView: () => validateListView,
|
|
15176
|
+
validateListViewBasic: () => validateListViewBasic,
|
|
15177
|
+
validateListViewerState: () => validateListViewerState
|
|
15178
|
+
});
|
|
15179
|
+
function isListViewBasic(v) {
|
|
15180
|
+
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.graph.defs#listViewBasic";
|
|
15181
|
+
}
|
|
15182
|
+
function validateListViewBasic(v) {
|
|
15183
|
+
return lexicons.validate("app.bsky.graph.defs#listViewBasic", v);
|
|
15184
|
+
}
|
|
15185
|
+
function isListView(v) {
|
|
15186
|
+
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.graph.defs#listView";
|
|
15187
|
+
}
|
|
15188
|
+
function validateListView(v) {
|
|
15189
|
+
return lexicons.validate("app.bsky.graph.defs#listView", v);
|
|
15190
|
+
}
|
|
15191
|
+
function isListItemView(v) {
|
|
15192
|
+
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.graph.defs#listItemView";
|
|
15193
|
+
}
|
|
15194
|
+
function validateListItemView(v) {
|
|
15195
|
+
return lexicons.validate("app.bsky.graph.defs#listItemView", v);
|
|
15196
|
+
}
|
|
15197
|
+
var MODLIST = "app.bsky.graph.defs#modlist";
|
|
15198
|
+
function isListViewerState(v) {
|
|
15199
|
+
return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.graph.defs#listViewerState";
|
|
15200
|
+
}
|
|
15201
|
+
function validateListViewerState(v) {
|
|
15202
|
+
return lexicons.validate("app.bsky.graph.defs#listViewerState", v);
|
|
15203
|
+
}
|
|
15204
|
+
|
|
13915
15205
|
// src/client/types/app/bsky/graph/follow.ts
|
|
13916
15206
|
var follow_exports = {};
|
|
13917
15207
|
__export(follow_exports, {
|
|
@@ -13925,6 +15215,32 @@ function validateRecord7(v) {
|
|
|
13925
15215
|
return lexicons.validate("app.bsky.graph.follow#main", v);
|
|
13926
15216
|
}
|
|
13927
15217
|
|
|
15218
|
+
// src/client/types/app/bsky/graph/list.ts
|
|
15219
|
+
var list_exports = {};
|
|
15220
|
+
__export(list_exports, {
|
|
15221
|
+
isRecord: () => isRecord8,
|
|
15222
|
+
validateRecord: () => validateRecord8
|
|
15223
|
+
});
|
|
15224
|
+
function isRecord8(v) {
|
|
15225
|
+
return isObj2(v) && hasProp2(v, "$type") && (v.$type === "app.bsky.graph.list#main" || v.$type === "app.bsky.graph.list");
|
|
15226
|
+
}
|
|
15227
|
+
function validateRecord8(v) {
|
|
15228
|
+
return lexicons.validate("app.bsky.graph.list#main", v);
|
|
15229
|
+
}
|
|
15230
|
+
|
|
15231
|
+
// src/client/types/app/bsky/graph/listitem.ts
|
|
15232
|
+
var listitem_exports = {};
|
|
15233
|
+
__export(listitem_exports, {
|
|
15234
|
+
isRecord: () => isRecord9,
|
|
15235
|
+
validateRecord: () => validateRecord9
|
|
15236
|
+
});
|
|
15237
|
+
function isRecord9(v) {
|
|
15238
|
+
return isObj2(v) && hasProp2(v, "$type") && (v.$type === "app.bsky.graph.listitem#main" || v.$type === "app.bsky.graph.listitem");
|
|
15239
|
+
}
|
|
15240
|
+
function validateRecord9(v) {
|
|
15241
|
+
return lexicons.validate("app.bsky.graph.listitem#main", v);
|
|
15242
|
+
}
|
|
15243
|
+
|
|
13928
15244
|
// src/client/types/app/bsky/richtext/facet.ts
|
|
13929
15245
|
var facet_exports = {};
|
|
13930
15246
|
__export(facet_exports, {
|
|
@@ -13966,7 +15282,8 @@ function validateByteSlice(v) {
|
|
|
13966
15282
|
var COM_ATPROTO_ADMIN = {
|
|
13967
15283
|
DefsTakedown: "com.atproto.admin.defs#takedown",
|
|
13968
15284
|
DefsFlag: "com.atproto.admin.defs#flag",
|
|
13969
|
-
DefsAcknowledge: "com.atproto.admin.defs#acknowledge"
|
|
15285
|
+
DefsAcknowledge: "com.atproto.admin.defs#acknowledge",
|
|
15286
|
+
DefsEscalate: "com.atproto.admin.defs#escalate"
|
|
13970
15287
|
};
|
|
13971
15288
|
var COM_ATPROTO_MODERATION = {
|
|
13972
15289
|
DefsReasonSpam: "com.atproto.moderation.defs#reasonSpam",
|
|
@@ -13976,6 +15293,9 @@ var COM_ATPROTO_MODERATION = {
|
|
|
13976
15293
|
DefsReasonRude: "com.atproto.moderation.defs#reasonRude",
|
|
13977
15294
|
DefsReasonOther: "com.atproto.moderation.defs#reasonOther"
|
|
13978
15295
|
};
|
|
15296
|
+
var APP_BSKY_GRAPH = {
|
|
15297
|
+
DefsModlist: "app.bsky.graph.defs#modlist"
|
|
15298
|
+
};
|
|
13979
15299
|
var AtpBaseClient = class {
|
|
13980
15300
|
constructor() {
|
|
13981
15301
|
this.xrpc = new Client();
|
|
@@ -14018,74 +15338,84 @@ var AdminNS = class {
|
|
|
14018
15338
|
constructor(service) {
|
|
14019
15339
|
this._service = service;
|
|
14020
15340
|
}
|
|
15341
|
+
disableAccountInvites(data, opts) {
|
|
15342
|
+
return this._service.xrpc.call("com.atproto.admin.disableAccountInvites", opts?.qp, data, opts).catch((e) => {
|
|
15343
|
+
throw toKnownErr(e);
|
|
15344
|
+
});
|
|
15345
|
+
}
|
|
14021
15346
|
disableInviteCodes(data, opts) {
|
|
14022
15347
|
return this._service.xrpc.call("com.atproto.admin.disableInviteCodes", opts?.qp, data, opts).catch((e) => {
|
|
14023
|
-
throw
|
|
15348
|
+
throw toKnownErr2(e);
|
|
15349
|
+
});
|
|
15350
|
+
}
|
|
15351
|
+
enableAccountInvites(data, opts) {
|
|
15352
|
+
return this._service.xrpc.call("com.atproto.admin.enableAccountInvites", opts?.qp, data, opts).catch((e) => {
|
|
15353
|
+
throw toKnownErr3(e);
|
|
14024
15354
|
});
|
|
14025
15355
|
}
|
|
14026
15356
|
getInviteCodes(params2, opts) {
|
|
14027
15357
|
return this._service.xrpc.call("com.atproto.admin.getInviteCodes", params2, void 0, opts).catch((e) => {
|
|
14028
|
-
throw
|
|
15358
|
+
throw toKnownErr4(e);
|
|
14029
15359
|
});
|
|
14030
15360
|
}
|
|
14031
15361
|
getModerationAction(params2, opts) {
|
|
14032
15362
|
return this._service.xrpc.call("com.atproto.admin.getModerationAction", params2, void 0, opts).catch((e) => {
|
|
14033
|
-
throw
|
|
15363
|
+
throw toKnownErr5(e);
|
|
14034
15364
|
});
|
|
14035
15365
|
}
|
|
14036
15366
|
getModerationActions(params2, opts) {
|
|
14037
15367
|
return this._service.xrpc.call("com.atproto.admin.getModerationActions", params2, void 0, opts).catch((e) => {
|
|
14038
|
-
throw
|
|
15368
|
+
throw toKnownErr6(e);
|
|
14039
15369
|
});
|
|
14040
15370
|
}
|
|
14041
15371
|
getModerationReport(params2, opts) {
|
|
14042
15372
|
return this._service.xrpc.call("com.atproto.admin.getModerationReport", params2, void 0, opts).catch((e) => {
|
|
14043
|
-
throw
|
|
15373
|
+
throw toKnownErr7(e);
|
|
14044
15374
|
});
|
|
14045
15375
|
}
|
|
14046
15376
|
getModerationReports(params2, opts) {
|
|
14047
15377
|
return this._service.xrpc.call("com.atproto.admin.getModerationReports", params2, void 0, opts).catch((e) => {
|
|
14048
|
-
throw
|
|
15378
|
+
throw toKnownErr8(e);
|
|
14049
15379
|
});
|
|
14050
15380
|
}
|
|
14051
15381
|
getRecord(params2, opts) {
|
|
14052
15382
|
return this._service.xrpc.call("com.atproto.admin.getRecord", params2, void 0, opts).catch((e) => {
|
|
14053
|
-
throw
|
|
15383
|
+
throw toKnownErr9(e);
|
|
14054
15384
|
});
|
|
14055
15385
|
}
|
|
14056
15386
|
getRepo(params2, opts) {
|
|
14057
15387
|
return this._service.xrpc.call("com.atproto.admin.getRepo", params2, void 0, opts).catch((e) => {
|
|
14058
|
-
throw
|
|
15388
|
+
throw toKnownErr10(e);
|
|
14059
15389
|
});
|
|
14060
15390
|
}
|
|
14061
15391
|
resolveModerationReports(data, opts) {
|
|
14062
15392
|
return this._service.xrpc.call("com.atproto.admin.resolveModerationReports", opts?.qp, data, opts).catch((e) => {
|
|
14063
|
-
throw
|
|
15393
|
+
throw toKnownErr11(e);
|
|
14064
15394
|
});
|
|
14065
15395
|
}
|
|
14066
15396
|
reverseModerationAction(data, opts) {
|
|
14067
15397
|
return this._service.xrpc.call("com.atproto.admin.reverseModerationAction", opts?.qp, data, opts).catch((e) => {
|
|
14068
|
-
throw
|
|
15398
|
+
throw toKnownErr12(e);
|
|
14069
15399
|
});
|
|
14070
15400
|
}
|
|
14071
15401
|
searchRepos(params2, opts) {
|
|
14072
15402
|
return this._service.xrpc.call("com.atproto.admin.searchRepos", params2, void 0, opts).catch((e) => {
|
|
14073
|
-
throw
|
|
15403
|
+
throw toKnownErr13(e);
|
|
14074
15404
|
});
|
|
14075
15405
|
}
|
|
14076
15406
|
takeModerationAction(data, opts) {
|
|
14077
15407
|
return this._service.xrpc.call("com.atproto.admin.takeModerationAction", opts?.qp, data, opts).catch((e) => {
|
|
14078
|
-
throw
|
|
15408
|
+
throw toKnownErr14(e);
|
|
14079
15409
|
});
|
|
14080
15410
|
}
|
|
14081
15411
|
updateAccountEmail(data, opts) {
|
|
14082
15412
|
return this._service.xrpc.call("com.atproto.admin.updateAccountEmail", opts?.qp, data, opts).catch((e) => {
|
|
14083
|
-
throw
|
|
15413
|
+
throw toKnownErr15(e);
|
|
14084
15414
|
});
|
|
14085
15415
|
}
|
|
14086
15416
|
updateAccountHandle(data, opts) {
|
|
14087
15417
|
return this._service.xrpc.call("com.atproto.admin.updateAccountHandle", opts?.qp, data, opts).catch((e) => {
|
|
14088
|
-
throw
|
|
15418
|
+
throw toKnownErr16(e);
|
|
14089
15419
|
});
|
|
14090
15420
|
}
|
|
14091
15421
|
};
|
|
@@ -14095,12 +15425,12 @@ var IdentityNS = class {
|
|
|
14095
15425
|
}
|
|
14096
15426
|
resolveHandle(params2, opts) {
|
|
14097
15427
|
return this._service.xrpc.call("com.atproto.identity.resolveHandle", params2, void 0, opts).catch((e) => {
|
|
14098
|
-
throw
|
|
15428
|
+
throw toKnownErr17(e);
|
|
14099
15429
|
});
|
|
14100
15430
|
}
|
|
14101
15431
|
updateHandle(data, opts) {
|
|
14102
15432
|
return this._service.xrpc.call("com.atproto.identity.updateHandle", opts?.qp, data, opts).catch((e) => {
|
|
14103
|
-
throw
|
|
15433
|
+
throw toKnownErr18(e);
|
|
14104
15434
|
});
|
|
14105
15435
|
}
|
|
14106
15436
|
};
|
|
@@ -14110,7 +15440,7 @@ var LabelNS = class {
|
|
|
14110
15440
|
}
|
|
14111
15441
|
queryLabels(params2, opts) {
|
|
14112
15442
|
return this._service.xrpc.call("com.atproto.label.queryLabels", params2, void 0, opts).catch((e) => {
|
|
14113
|
-
throw
|
|
15443
|
+
throw toKnownErr19(e);
|
|
14114
15444
|
});
|
|
14115
15445
|
}
|
|
14116
15446
|
};
|
|
@@ -14120,7 +15450,7 @@ var ModerationNS = class {
|
|
|
14120
15450
|
}
|
|
14121
15451
|
createReport(data, opts) {
|
|
14122
15452
|
return this._service.xrpc.call("com.atproto.moderation.createReport", opts?.qp, data, opts).catch((e) => {
|
|
14123
|
-
throw
|
|
15453
|
+
throw toKnownErr20(e);
|
|
14124
15454
|
});
|
|
14125
15455
|
}
|
|
14126
15456
|
};
|
|
@@ -14130,42 +15460,47 @@ var RepoNS = class {
|
|
|
14130
15460
|
}
|
|
14131
15461
|
applyWrites(data, opts) {
|
|
14132
15462
|
return this._service.xrpc.call("com.atproto.repo.applyWrites", opts?.qp, data, opts).catch((e) => {
|
|
14133
|
-
throw
|
|
15463
|
+
throw toKnownErr21(e);
|
|
14134
15464
|
});
|
|
14135
15465
|
}
|
|
14136
15466
|
createRecord(data, opts) {
|
|
14137
15467
|
return this._service.xrpc.call("com.atproto.repo.createRecord", opts?.qp, data, opts).catch((e) => {
|
|
14138
|
-
throw
|
|
15468
|
+
throw toKnownErr22(e);
|
|
14139
15469
|
});
|
|
14140
15470
|
}
|
|
14141
15471
|
deleteRecord(data, opts) {
|
|
14142
15472
|
return this._service.xrpc.call("com.atproto.repo.deleteRecord", opts?.qp, data, opts).catch((e) => {
|
|
14143
|
-
throw
|
|
15473
|
+
throw toKnownErr23(e);
|
|
14144
15474
|
});
|
|
14145
15475
|
}
|
|
14146
15476
|
describeRepo(params2, opts) {
|
|
14147
15477
|
return this._service.xrpc.call("com.atproto.repo.describeRepo", params2, void 0, opts).catch((e) => {
|
|
14148
|
-
throw
|
|
15478
|
+
throw toKnownErr24(e);
|
|
14149
15479
|
});
|
|
14150
15480
|
}
|
|
14151
15481
|
getRecord(params2, opts) {
|
|
14152
15482
|
return this._service.xrpc.call("com.atproto.repo.getRecord", params2, void 0, opts).catch((e) => {
|
|
14153
|
-
throw
|
|
15483
|
+
throw toKnownErr25(e);
|
|
14154
15484
|
});
|
|
14155
15485
|
}
|
|
14156
15486
|
listRecords(params2, opts) {
|
|
14157
15487
|
return this._service.xrpc.call("com.atproto.repo.listRecords", params2, void 0, opts).catch((e) => {
|
|
14158
|
-
throw
|
|
15488
|
+
throw toKnownErr26(e);
|
|
14159
15489
|
});
|
|
14160
15490
|
}
|
|
14161
15491
|
putRecord(data, opts) {
|
|
14162
15492
|
return this._service.xrpc.call("com.atproto.repo.putRecord", opts?.qp, data, opts).catch((e) => {
|
|
14163
|
-
throw
|
|
15493
|
+
throw toKnownErr27(e);
|
|
15494
|
+
});
|
|
15495
|
+
}
|
|
15496
|
+
rebaseRepo(data, opts) {
|
|
15497
|
+
return this._service.xrpc.call("com.atproto.repo.rebaseRepo", opts?.qp, data, opts).catch((e) => {
|
|
15498
|
+
throw toKnownErr28(e);
|
|
14164
15499
|
});
|
|
14165
15500
|
}
|
|
14166
15501
|
uploadBlob(data, opts) {
|
|
14167
15502
|
return this._service.xrpc.call("com.atproto.repo.uploadBlob", opts?.qp, data, opts).catch((e) => {
|
|
14168
|
-
throw
|
|
15503
|
+
throw toKnownErr29(e);
|
|
14169
15504
|
});
|
|
14170
15505
|
}
|
|
14171
15506
|
};
|
|
@@ -14175,82 +15510,82 @@ var ServerNS = class {
|
|
|
14175
15510
|
}
|
|
14176
15511
|
createAccount(data, opts) {
|
|
14177
15512
|
return this._service.xrpc.call("com.atproto.server.createAccount", opts?.qp, data, opts).catch((e) => {
|
|
14178
|
-
throw
|
|
15513
|
+
throw toKnownErr30(e);
|
|
14179
15514
|
});
|
|
14180
15515
|
}
|
|
14181
15516
|
createAppPassword(data, opts) {
|
|
14182
15517
|
return this._service.xrpc.call("com.atproto.server.createAppPassword", opts?.qp, data, opts).catch((e) => {
|
|
14183
|
-
throw
|
|
15518
|
+
throw toKnownErr31(e);
|
|
14184
15519
|
});
|
|
14185
15520
|
}
|
|
14186
15521
|
createInviteCode(data, opts) {
|
|
14187
15522
|
return this._service.xrpc.call("com.atproto.server.createInviteCode", opts?.qp, data, opts).catch((e) => {
|
|
14188
|
-
throw
|
|
15523
|
+
throw toKnownErr32(e);
|
|
14189
15524
|
});
|
|
14190
15525
|
}
|
|
14191
15526
|
createInviteCodes(data, opts) {
|
|
14192
15527
|
return this._service.xrpc.call("com.atproto.server.createInviteCodes", opts?.qp, data, opts).catch((e) => {
|
|
14193
|
-
throw
|
|
15528
|
+
throw toKnownErr33(e);
|
|
14194
15529
|
});
|
|
14195
15530
|
}
|
|
14196
15531
|
createSession(data, opts) {
|
|
14197
15532
|
return this._service.xrpc.call("com.atproto.server.createSession", opts?.qp, data, opts).catch((e) => {
|
|
14198
|
-
throw
|
|
15533
|
+
throw toKnownErr34(e);
|
|
14199
15534
|
});
|
|
14200
15535
|
}
|
|
14201
15536
|
deleteAccount(data, opts) {
|
|
14202
15537
|
return this._service.xrpc.call("com.atproto.server.deleteAccount", opts?.qp, data, opts).catch((e) => {
|
|
14203
|
-
throw
|
|
15538
|
+
throw toKnownErr35(e);
|
|
14204
15539
|
});
|
|
14205
15540
|
}
|
|
14206
15541
|
deleteSession(data, opts) {
|
|
14207
15542
|
return this._service.xrpc.call("com.atproto.server.deleteSession", opts?.qp, data, opts).catch((e) => {
|
|
14208
|
-
throw
|
|
15543
|
+
throw toKnownErr36(e);
|
|
14209
15544
|
});
|
|
14210
15545
|
}
|
|
14211
15546
|
describeServer(params2, opts) {
|
|
14212
15547
|
return this._service.xrpc.call("com.atproto.server.describeServer", params2, void 0, opts).catch((e) => {
|
|
14213
|
-
throw
|
|
15548
|
+
throw toKnownErr37(e);
|
|
14214
15549
|
});
|
|
14215
15550
|
}
|
|
14216
15551
|
getAccountInviteCodes(params2, opts) {
|
|
14217
15552
|
return this._service.xrpc.call("com.atproto.server.getAccountInviteCodes", params2, void 0, opts).catch((e) => {
|
|
14218
|
-
throw
|
|
15553
|
+
throw toKnownErr38(e);
|
|
14219
15554
|
});
|
|
14220
15555
|
}
|
|
14221
15556
|
getSession(params2, opts) {
|
|
14222
15557
|
return this._service.xrpc.call("com.atproto.server.getSession", params2, void 0, opts).catch((e) => {
|
|
14223
|
-
throw
|
|
15558
|
+
throw toKnownErr39(e);
|
|
14224
15559
|
});
|
|
14225
15560
|
}
|
|
14226
15561
|
listAppPasswords(params2, opts) {
|
|
14227
15562
|
return this._service.xrpc.call("com.atproto.server.listAppPasswords", params2, void 0, opts).catch((e) => {
|
|
14228
|
-
throw
|
|
15563
|
+
throw toKnownErr40(e);
|
|
14229
15564
|
});
|
|
14230
15565
|
}
|
|
14231
15566
|
refreshSession(data, opts) {
|
|
14232
15567
|
return this._service.xrpc.call("com.atproto.server.refreshSession", opts?.qp, data, opts).catch((e) => {
|
|
14233
|
-
throw
|
|
15568
|
+
throw toKnownErr41(e);
|
|
14234
15569
|
});
|
|
14235
15570
|
}
|
|
14236
15571
|
requestAccountDelete(data, opts) {
|
|
14237
15572
|
return this._service.xrpc.call("com.atproto.server.requestAccountDelete", opts?.qp, data, opts).catch((e) => {
|
|
14238
|
-
throw
|
|
15573
|
+
throw toKnownErr42(e);
|
|
14239
15574
|
});
|
|
14240
15575
|
}
|
|
14241
15576
|
requestPasswordReset(data, opts) {
|
|
14242
15577
|
return this._service.xrpc.call("com.atproto.server.requestPasswordReset", opts?.qp, data, opts).catch((e) => {
|
|
14243
|
-
throw
|
|
15578
|
+
throw toKnownErr43(e);
|
|
14244
15579
|
});
|
|
14245
15580
|
}
|
|
14246
15581
|
resetPassword(data, opts) {
|
|
14247
15582
|
return this._service.xrpc.call("com.atproto.server.resetPassword", opts?.qp, data, opts).catch((e) => {
|
|
14248
|
-
throw
|
|
15583
|
+
throw toKnownErr44(e);
|
|
14249
15584
|
});
|
|
14250
15585
|
}
|
|
14251
15586
|
revokeAppPassword(data, opts) {
|
|
14252
15587
|
return this._service.xrpc.call("com.atproto.server.revokeAppPassword", opts?.qp, data, opts).catch((e) => {
|
|
14253
|
-
throw
|
|
15588
|
+
throw toKnownErr45(e);
|
|
14254
15589
|
});
|
|
14255
15590
|
}
|
|
14256
15591
|
};
|
|
@@ -14260,57 +15595,57 @@ var SyncNS = class {
|
|
|
14260
15595
|
}
|
|
14261
15596
|
getBlob(params2, opts) {
|
|
14262
15597
|
return this._service.xrpc.call("com.atproto.sync.getBlob", params2, void 0, opts).catch((e) => {
|
|
14263
|
-
throw
|
|
15598
|
+
throw toKnownErr46(e);
|
|
14264
15599
|
});
|
|
14265
15600
|
}
|
|
14266
15601
|
getBlocks(params2, opts) {
|
|
14267
15602
|
return this._service.xrpc.call("com.atproto.sync.getBlocks", params2, void 0, opts).catch((e) => {
|
|
14268
|
-
throw
|
|
15603
|
+
throw toKnownErr47(e);
|
|
14269
15604
|
});
|
|
14270
15605
|
}
|
|
14271
15606
|
getCheckout(params2, opts) {
|
|
14272
15607
|
return this._service.xrpc.call("com.atproto.sync.getCheckout", params2, void 0, opts).catch((e) => {
|
|
14273
|
-
throw
|
|
15608
|
+
throw toKnownErr48(e);
|
|
14274
15609
|
});
|
|
14275
15610
|
}
|
|
14276
15611
|
getCommitPath(params2, opts) {
|
|
14277
15612
|
return this._service.xrpc.call("com.atproto.sync.getCommitPath", params2, void 0, opts).catch((e) => {
|
|
14278
|
-
throw
|
|
15613
|
+
throw toKnownErr49(e);
|
|
14279
15614
|
});
|
|
14280
15615
|
}
|
|
14281
15616
|
getHead(params2, opts) {
|
|
14282
15617
|
return this._service.xrpc.call("com.atproto.sync.getHead", params2, void 0, opts).catch((e) => {
|
|
14283
|
-
throw
|
|
15618
|
+
throw toKnownErr50(e);
|
|
14284
15619
|
});
|
|
14285
15620
|
}
|
|
14286
15621
|
getRecord(params2, opts) {
|
|
14287
15622
|
return this._service.xrpc.call("com.atproto.sync.getRecord", params2, void 0, opts).catch((e) => {
|
|
14288
|
-
throw
|
|
15623
|
+
throw toKnownErr51(e);
|
|
14289
15624
|
});
|
|
14290
15625
|
}
|
|
14291
15626
|
getRepo(params2, opts) {
|
|
14292
15627
|
return this._service.xrpc.call("com.atproto.sync.getRepo", params2, void 0, opts).catch((e) => {
|
|
14293
|
-
throw
|
|
15628
|
+
throw toKnownErr52(e);
|
|
14294
15629
|
});
|
|
14295
15630
|
}
|
|
14296
15631
|
listBlobs(params2, opts) {
|
|
14297
15632
|
return this._service.xrpc.call("com.atproto.sync.listBlobs", params2, void 0, opts).catch((e) => {
|
|
14298
|
-
throw
|
|
15633
|
+
throw toKnownErr53(e);
|
|
14299
15634
|
});
|
|
14300
15635
|
}
|
|
14301
15636
|
listRepos(params2, opts) {
|
|
14302
15637
|
return this._service.xrpc.call("com.atproto.sync.listRepos", params2, void 0, opts).catch((e) => {
|
|
14303
|
-
throw
|
|
15638
|
+
throw toKnownErr54(e);
|
|
14304
15639
|
});
|
|
14305
15640
|
}
|
|
14306
15641
|
notifyOfUpdate(params2, opts) {
|
|
14307
15642
|
return this._service.xrpc.call("com.atproto.sync.notifyOfUpdate", params2, void 0, opts).catch((e) => {
|
|
14308
|
-
throw
|
|
15643
|
+
throw toKnownErr55(e);
|
|
14309
15644
|
});
|
|
14310
15645
|
}
|
|
14311
15646
|
requestCrawl(params2, opts) {
|
|
14312
15647
|
return this._service.xrpc.call("com.atproto.sync.requestCrawl", params2, void 0, opts).catch((e) => {
|
|
14313
|
-
throw
|
|
15648
|
+
throw toKnownErr56(e);
|
|
14314
15649
|
});
|
|
14315
15650
|
}
|
|
14316
15651
|
};
|
|
@@ -14339,27 +15674,27 @@ var ActorNS = class {
|
|
|
14339
15674
|
}
|
|
14340
15675
|
getProfile(params2, opts) {
|
|
14341
15676
|
return this._service.xrpc.call("app.bsky.actor.getProfile", params2, void 0, opts).catch((e) => {
|
|
14342
|
-
throw
|
|
15677
|
+
throw toKnownErr57(e);
|
|
14343
15678
|
});
|
|
14344
15679
|
}
|
|
14345
15680
|
getProfiles(params2, opts) {
|
|
14346
15681
|
return this._service.xrpc.call("app.bsky.actor.getProfiles", params2, void 0, opts).catch((e) => {
|
|
14347
|
-
throw
|
|
15682
|
+
throw toKnownErr58(e);
|
|
14348
15683
|
});
|
|
14349
15684
|
}
|
|
14350
15685
|
getSuggestions(params2, opts) {
|
|
14351
15686
|
return this._service.xrpc.call("app.bsky.actor.getSuggestions", params2, void 0, opts).catch((e) => {
|
|
14352
|
-
throw
|
|
15687
|
+
throw toKnownErr59(e);
|
|
14353
15688
|
});
|
|
14354
15689
|
}
|
|
14355
15690
|
searchActors(params2, opts) {
|
|
14356
15691
|
return this._service.xrpc.call("app.bsky.actor.searchActors", params2, void 0, opts).catch((e) => {
|
|
14357
|
-
throw
|
|
15692
|
+
throw toKnownErr60(e);
|
|
14358
15693
|
});
|
|
14359
15694
|
}
|
|
14360
15695
|
searchActorsTypeahead(params2, opts) {
|
|
14361
15696
|
return this._service.xrpc.call("app.bsky.actor.searchActorsTypeahead", params2, void 0, opts).catch((e) => {
|
|
14362
|
-
throw
|
|
15697
|
+
throw toKnownErr61(e);
|
|
14363
15698
|
});
|
|
14364
15699
|
}
|
|
14365
15700
|
};
|
|
@@ -14414,32 +15749,32 @@ var FeedNS = class {
|
|
|
14414
15749
|
}
|
|
14415
15750
|
getAuthorFeed(params2, opts) {
|
|
14416
15751
|
return this._service.xrpc.call("app.bsky.feed.getAuthorFeed", params2, void 0, opts).catch((e) => {
|
|
14417
|
-
throw
|
|
15752
|
+
throw toKnownErr62(e);
|
|
14418
15753
|
});
|
|
14419
15754
|
}
|
|
14420
15755
|
getLikes(params2, opts) {
|
|
14421
15756
|
return this._service.xrpc.call("app.bsky.feed.getLikes", params2, void 0, opts).catch((e) => {
|
|
14422
|
-
throw
|
|
15757
|
+
throw toKnownErr63(e);
|
|
14423
15758
|
});
|
|
14424
15759
|
}
|
|
14425
15760
|
getPostThread(params2, opts) {
|
|
14426
15761
|
return this._service.xrpc.call("app.bsky.feed.getPostThread", params2, void 0, opts).catch((e) => {
|
|
14427
|
-
throw
|
|
15762
|
+
throw toKnownErr64(e);
|
|
14428
15763
|
});
|
|
14429
15764
|
}
|
|
14430
15765
|
getPosts(params2, opts) {
|
|
14431
15766
|
return this._service.xrpc.call("app.bsky.feed.getPosts", params2, void 0, opts).catch((e) => {
|
|
14432
|
-
throw
|
|
15767
|
+
throw toKnownErr65(e);
|
|
14433
15768
|
});
|
|
14434
15769
|
}
|
|
14435
15770
|
getRepostedBy(params2, opts) {
|
|
14436
15771
|
return this._service.xrpc.call("app.bsky.feed.getRepostedBy", params2, void 0, opts).catch((e) => {
|
|
14437
|
-
throw
|
|
15772
|
+
throw toKnownErr66(e);
|
|
14438
15773
|
});
|
|
14439
15774
|
}
|
|
14440
15775
|
getTimeline(params2, opts) {
|
|
14441
15776
|
return this._service.xrpc.call("app.bsky.feed.getTimeline", params2, void 0, opts).catch((e) => {
|
|
14442
|
-
throw
|
|
15777
|
+
throw toKnownErr67(e);
|
|
14443
15778
|
});
|
|
14444
15779
|
}
|
|
14445
15780
|
};
|
|
@@ -14559,35 +15894,62 @@ var GraphNS = class {
|
|
|
14559
15894
|
this._service = service;
|
|
14560
15895
|
this.block = new BlockRecord(service);
|
|
14561
15896
|
this.follow = new FollowRecord(service);
|
|
15897
|
+
this.list = new ListRecord(service);
|
|
15898
|
+
this.listitem = new ListitemRecord(service);
|
|
14562
15899
|
}
|
|
14563
15900
|
getBlocks(params2, opts) {
|
|
14564
15901
|
return this._service.xrpc.call("app.bsky.graph.getBlocks", params2, void 0, opts).catch((e) => {
|
|
14565
|
-
throw
|
|
15902
|
+
throw toKnownErr68(e);
|
|
14566
15903
|
});
|
|
14567
15904
|
}
|
|
14568
15905
|
getFollowers(params2, opts) {
|
|
14569
15906
|
return this._service.xrpc.call("app.bsky.graph.getFollowers", params2, void 0, opts).catch((e) => {
|
|
14570
|
-
throw
|
|
15907
|
+
throw toKnownErr69(e);
|
|
14571
15908
|
});
|
|
14572
15909
|
}
|
|
14573
15910
|
getFollows(params2, opts) {
|
|
14574
15911
|
return this._service.xrpc.call("app.bsky.graph.getFollows", params2, void 0, opts).catch((e) => {
|
|
14575
|
-
throw
|
|
15912
|
+
throw toKnownErr70(e);
|
|
15913
|
+
});
|
|
15914
|
+
}
|
|
15915
|
+
getList(params2, opts) {
|
|
15916
|
+
return this._service.xrpc.call("app.bsky.graph.getList", params2, void 0, opts).catch((e) => {
|
|
15917
|
+
throw toKnownErr71(e);
|
|
15918
|
+
});
|
|
15919
|
+
}
|
|
15920
|
+
getListMutes(params2, opts) {
|
|
15921
|
+
return this._service.xrpc.call("app.bsky.graph.getListMutes", params2, void 0, opts).catch((e) => {
|
|
15922
|
+
throw toKnownErr72(e);
|
|
15923
|
+
});
|
|
15924
|
+
}
|
|
15925
|
+
getLists(params2, opts) {
|
|
15926
|
+
return this._service.xrpc.call("app.bsky.graph.getLists", params2, void 0, opts).catch((e) => {
|
|
15927
|
+
throw toKnownErr73(e);
|
|
14576
15928
|
});
|
|
14577
15929
|
}
|
|
14578
15930
|
getMutes(params2, opts) {
|
|
14579
15931
|
return this._service.xrpc.call("app.bsky.graph.getMutes", params2, void 0, opts).catch((e) => {
|
|
14580
|
-
throw
|
|
15932
|
+
throw toKnownErr74(e);
|
|
14581
15933
|
});
|
|
14582
15934
|
}
|
|
14583
15935
|
muteActor(data, opts) {
|
|
14584
15936
|
return this._service.xrpc.call("app.bsky.graph.muteActor", opts?.qp, data, opts).catch((e) => {
|
|
14585
|
-
throw
|
|
15937
|
+
throw toKnownErr75(e);
|
|
15938
|
+
});
|
|
15939
|
+
}
|
|
15940
|
+
muteActorList(data, opts) {
|
|
15941
|
+
return this._service.xrpc.call("app.bsky.graph.muteActorList", opts?.qp, data, opts).catch((e) => {
|
|
15942
|
+
throw toKnownErr76(e);
|
|
14586
15943
|
});
|
|
14587
15944
|
}
|
|
14588
15945
|
unmuteActor(data, opts) {
|
|
14589
15946
|
return this._service.xrpc.call("app.bsky.graph.unmuteActor", opts?.qp, data, opts).catch((e) => {
|
|
14590
|
-
throw
|
|
15947
|
+
throw toKnownErr77(e);
|
|
15948
|
+
});
|
|
15949
|
+
}
|
|
15950
|
+
unmuteActorList(data, opts) {
|
|
15951
|
+
return this._service.xrpc.call("app.bsky.graph.unmuteActorList", opts?.qp, data, opts).catch((e) => {
|
|
15952
|
+
throw toKnownErr78(e);
|
|
14591
15953
|
});
|
|
14592
15954
|
}
|
|
14593
15955
|
};
|
|
@@ -14665,23 +16027,97 @@ var FollowRecord = class {
|
|
|
14665
16027
|
);
|
|
14666
16028
|
}
|
|
14667
16029
|
};
|
|
16030
|
+
var ListRecord = class {
|
|
16031
|
+
constructor(service) {
|
|
16032
|
+
this._service = service;
|
|
16033
|
+
}
|
|
16034
|
+
async list(params2) {
|
|
16035
|
+
const res = await this._service.xrpc.call("com.atproto.repo.listRecords", {
|
|
16036
|
+
collection: "app.bsky.graph.list",
|
|
16037
|
+
...params2
|
|
16038
|
+
});
|
|
16039
|
+
return res.data;
|
|
16040
|
+
}
|
|
16041
|
+
async get(params2) {
|
|
16042
|
+
const res = await this._service.xrpc.call("com.atproto.repo.getRecord", {
|
|
16043
|
+
collection: "app.bsky.graph.list",
|
|
16044
|
+
...params2
|
|
16045
|
+
});
|
|
16046
|
+
return res.data;
|
|
16047
|
+
}
|
|
16048
|
+
async create(params2, record, headers) {
|
|
16049
|
+
record.$type = "app.bsky.graph.list";
|
|
16050
|
+
const res = await this._service.xrpc.call(
|
|
16051
|
+
"com.atproto.repo.createRecord",
|
|
16052
|
+
void 0,
|
|
16053
|
+
{ collection: "app.bsky.graph.list", ...params2, record },
|
|
16054
|
+
{ encoding: "application/json", headers }
|
|
16055
|
+
);
|
|
16056
|
+
return res.data;
|
|
16057
|
+
}
|
|
16058
|
+
async delete(params2, headers) {
|
|
16059
|
+
await this._service.xrpc.call(
|
|
16060
|
+
"com.atproto.repo.deleteRecord",
|
|
16061
|
+
void 0,
|
|
16062
|
+
{ collection: "app.bsky.graph.list", ...params2 },
|
|
16063
|
+
{ headers }
|
|
16064
|
+
);
|
|
16065
|
+
}
|
|
16066
|
+
};
|
|
16067
|
+
var ListitemRecord = class {
|
|
16068
|
+
constructor(service) {
|
|
16069
|
+
this._service = service;
|
|
16070
|
+
}
|
|
16071
|
+
async list(params2) {
|
|
16072
|
+
const res = await this._service.xrpc.call("com.atproto.repo.listRecords", {
|
|
16073
|
+
collection: "app.bsky.graph.listitem",
|
|
16074
|
+
...params2
|
|
16075
|
+
});
|
|
16076
|
+
return res.data;
|
|
16077
|
+
}
|
|
16078
|
+
async get(params2) {
|
|
16079
|
+
const res = await this._service.xrpc.call("com.atproto.repo.getRecord", {
|
|
16080
|
+
collection: "app.bsky.graph.listitem",
|
|
16081
|
+
...params2
|
|
16082
|
+
});
|
|
16083
|
+
return res.data;
|
|
16084
|
+
}
|
|
16085
|
+
async create(params2, record, headers) {
|
|
16086
|
+
record.$type = "app.bsky.graph.listitem";
|
|
16087
|
+
const res = await this._service.xrpc.call(
|
|
16088
|
+
"com.atproto.repo.createRecord",
|
|
16089
|
+
void 0,
|
|
16090
|
+
{ collection: "app.bsky.graph.listitem", ...params2, record },
|
|
16091
|
+
{ encoding: "application/json", headers }
|
|
16092
|
+
);
|
|
16093
|
+
return res.data;
|
|
16094
|
+
}
|
|
16095
|
+
async delete(params2, headers) {
|
|
16096
|
+
await this._service.xrpc.call(
|
|
16097
|
+
"com.atproto.repo.deleteRecord",
|
|
16098
|
+
void 0,
|
|
16099
|
+
{ collection: "app.bsky.graph.listitem", ...params2 },
|
|
16100
|
+
{ headers }
|
|
16101
|
+
);
|
|
16102
|
+
}
|
|
16103
|
+
};
|
|
14668
16104
|
var NotificationNS = class {
|
|
14669
16105
|
constructor(service) {
|
|
14670
16106
|
this._service = service;
|
|
14671
16107
|
}
|
|
14672
16108
|
getUnreadCount(params2, opts) {
|
|
14673
16109
|
return this._service.xrpc.call("app.bsky.notification.getUnreadCount", params2, void 0, opts).catch((e) => {
|
|
14674
|
-
throw
|
|
16110
|
+
throw toKnownErr79(e);
|
|
14675
16111
|
});
|
|
14676
16112
|
}
|
|
14677
16113
|
listNotifications(params2, opts) {
|
|
14678
16114
|
return this._service.xrpc.call("app.bsky.notification.listNotifications", params2, void 0, opts).catch((e) => {
|
|
14679
|
-
throw
|
|
16115
|
+
throw toKnownErr80(e);
|
|
14680
16116
|
});
|
|
14681
16117
|
}
|
|
14682
16118
|
updateSeen(data, opts) {
|
|
14683
16119
|
return this._service.xrpc.call("app.bsky.notification.updateSeen", opts?.qp, data, opts).catch((e) => {
|
|
14684
|
-
throw
|
|
16120
|
+
throw toKnownErr81(e);
|
|
14685
16121
|
});
|
|
14686
16122
|
}
|
|
14687
16123
|
};
|
|
@@ -14696,7 +16132,7 @@ var UnspeccedNS = class {
|
|
|
14696
16132
|
}
|
|
14697
16133
|
getPopular(params2, opts) {
|
|
14698
16134
|
return this._service.xrpc.call("app.bsky.unspecced.getPopular", params2, void 0, opts).catch((e) => {
|
|
14699
|
-
throw
|
|
16135
|
+
throw toKnownErr82(e);
|
|
14700
16136
|
});
|
|
14701
16137
|
}
|
|
14702
16138
|
};
|