@sublay/js 7.9.0 → 7.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +23 -14
- package/dist/index.d.mts +38 -7
- package/dist/index.d.ts +4363 -35
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +29 -18
- package/dist/core/client.d.ts +0 -64
- package/dist/core/multipart.d.ts +0 -22
- package/dist/core/spaceReputationParams.d.ts +0 -57
- package/dist/interfaces/AppNotification.d.ts +0 -258
- package/dist/interfaces/ChatMessage.d.ts +0 -40
- package/dist/interfaces/Collection.d.ts +0 -10
- package/dist/interfaces/Comment.d.ts +0 -50
- package/dist/interfaces/Connection.d.ts +0 -67
- package/dist/interfaces/Conversation.d.ts +0 -27
- package/dist/interfaces/ConversationMember.d.ts +0 -17
- package/dist/interfaces/Entity.d.ts +0 -63
- package/dist/interfaces/Event.d.ts +0 -66
- package/dist/interfaces/File.d.ts +0 -39
- package/dist/interfaces/Follow.d.ts +0 -19
- package/dist/interfaces/HostedApp.d.ts +0 -11
- package/dist/interfaces/IPaginatedResponse.d.ts +0 -11
- package/dist/interfaces/ImageProcessing.d.ts +0 -62
- package/dist/interfaces/Mention.d.ts +0 -12
- package/dist/interfaces/OAuthIdentity.d.ts +0 -14
- package/dist/interfaces/Project.d.ts +0 -14
- package/dist/interfaces/Push.d.ts +0 -74
- package/dist/interfaces/Reaction.d.ts +0 -23
- package/dist/interfaces/Report.d.ts +0 -38
- package/dist/interfaces/ReputationGrant.d.ts +0 -85
- package/dist/interfaces/Rule.d.ts +0 -22
- package/dist/interfaces/Space.d.ts +0 -130
- package/dist/interfaces/SpaceMember.d.ts +0 -29
- package/dist/interfaces/SpaceReputation.d.ts +0 -100
- package/dist/interfaces/Table.d.ts +0 -63
- package/dist/interfaces/User.d.ts +0 -46
- package/dist/interfaces/UserSearch.d.ts +0 -13
- package/dist/interfaces/Workspace.d.ts +0 -178
- package/dist/modules/app-notifications/countUnreadNotifications.d.ts +0 -2
- package/dist/modules/app-notifications/fetchNotifications.d.ts +0 -8
- package/dist/modules/app-notifications/index.d.ts +0 -4
- package/dist/modules/app-notifications/markAllNotificationsAsRead.d.ts +0 -5
- package/dist/modules/app-notifications/markNotificationAsRead.d.ts +0 -5
- package/dist/modules/auth/changePassword.d.ts +0 -34
- package/dist/modules/auth/confirmAccountDeletion.d.ts +0 -11
- package/dist/modules/auth/index.d.ts +0 -13
- package/dist/modules/auth/requestAccountDeletion.d.ts +0 -14
- package/dist/modules/auth/requestNewAccessToken.d.ts +0 -16
- package/dist/modules/auth/requestPasswordReset.d.ts +0 -5
- package/dist/modules/auth/resetPassword.d.ts +0 -6
- package/dist/modules/auth/sendVerificationEmail.d.ts +0 -13
- package/dist/modules/auth/setPassword.d.ts +0 -9
- package/dist/modules/auth/signIn.d.ts +0 -12
- package/dist/modules/auth/signOut.d.ts +0 -103
- package/dist/modules/auth/signUp.d.ts +0 -24
- package/dist/modules/auth/verifyEmail.d.ts +0 -5
- package/dist/modules/auth/verifyExternalUser.d.ts +0 -11
- package/dist/modules/chat/addMember.d.ts +0 -8
- package/dist/modules/chat/changeMemberRole.d.ts +0 -9
- package/dist/modules/chat/createDirectConversation.d.ts +0 -7
- package/dist/modules/chat/createGroupConversation.d.ts +0 -10
- package/dist/modules/chat/deleteConversation.d.ts +0 -8
- package/dist/modules/chat/deleteMessage.d.ts +0 -11
- package/dist/modules/chat/editMessage.d.ts +0 -14
- package/dist/modules/chat/getConversation.d.ts +0 -6
- package/dist/modules/chat/getMessage.d.ts +0 -13
- package/dist/modules/chat/getUnreadCount.d.ts +0 -6
- package/dist/modules/chat/index.d.ts +0 -21
- package/dist/modules/chat/leaveConversation.d.ts +0 -7
- package/dist/modules/chat/listConversations.d.ts +0 -17
- package/dist/modules/chat/listMembers.d.ts +0 -11
- package/dist/modules/chat/listMessages.d.ts +0 -44
- package/dist/modules/chat/listReactions.d.ts +0 -24
- package/dist/modules/chat/markAsRead.d.ts +0 -9
- package/dist/modules/chat/muteConversation.d.ts +0 -23
- package/dist/modules/chat/removeMember.d.ts +0 -9
- package/dist/modules/chat/reportMessage.d.ts +0 -12
- package/dist/modules/chat/sendMessage.d.ts +0 -22
- package/dist/modules/chat/toggleReaction.d.ts +0 -16
- package/dist/modules/chat/updateConversation.d.ts +0 -12
- package/dist/modules/collections/addEntityToCollection.d.ts +0 -13
- package/dist/modules/collections/createNewCollection.d.ts +0 -8
- package/dist/modules/collections/deleteCollection.d.ts +0 -5
- package/dist/modules/collections/fetchCollectionEntities.d.ts +0 -13
- package/dist/modules/collections/fetchRootCollection.d.ts +0 -3
- package/dist/modules/collections/fetchSubCollections.d.ts +0 -6
- package/dist/modules/collections/index.d.ts +0 -8
- package/dist/modules/collections/removeEntityFromCollection.d.ts +0 -7
- package/dist/modules/collections/updateCollection.d.ts +0 -7
- package/dist/modules/comments/addReaction.d.ts +0 -8
- package/dist/modules/comments/createComment.d.ts +0 -15
- package/dist/modules/comments/deleteComment.d.ts +0 -5
- package/dist/modules/comments/fetchComment.d.ts +0 -8
- package/dist/modules/comments/fetchCommentByForeignId.d.ts +0 -7
- package/dist/modules/comments/fetchManyComments.d.ts +0 -26
- package/dist/modules/comments/fetchReactions.d.ts +0 -16
- package/dist/modules/comments/getUserReaction.d.ts +0 -9
- package/dist/modules/comments/index.d.ts +0 -10
- package/dist/modules/comments/removeReaction.d.ts +0 -6
- package/dist/modules/comments/updateComment.d.ts +0 -10
- package/dist/modules/connections/acceptConnection.d.ts +0 -6
- package/dist/modules/connections/declineConnection.d.ts +0 -6
- package/dist/modules/connections/fetchConnections.d.ts +0 -9
- package/dist/modules/connections/fetchConnectionsCount.d.ts +0 -3
- package/dist/modules/connections/fetchReceivedPendingConnections.d.ts +0 -8
- package/dist/modules/connections/fetchSentPendingConnections.d.ts +0 -8
- package/dist/modules/connections/index.d.ts +0 -7
- package/dist/modules/connections/removeConnection.d.ts +0 -5
- package/dist/modules/entities/addReaction.d.ts +0 -8
- package/dist/modules/entities/createEntity.d.ts +0 -23
- package/dist/modules/entities/deleteEntity.d.ts +0 -5
- package/dist/modules/entities/fetchDrafts.d.ts +0 -11
- package/dist/modules/entities/fetchEntity.d.ts +0 -8
- package/dist/modules/entities/fetchEntityByForeignId.d.ts +0 -8
- package/dist/modules/entities/fetchEntityByShortId.d.ts +0 -7
- package/dist/modules/entities/fetchManyEntities.d.ts +0 -65
- package/dist/modules/entities/fetchReactions.d.ts +0 -16
- package/dist/modules/entities/fetchTopComment.d.ts +0 -6
- package/dist/modules/entities/getUserReaction.d.ts +0 -9
- package/dist/modules/entities/index.d.ts +0 -15
- package/dist/modules/entities/isEntitySaved.d.ts +0 -12
- package/dist/modules/entities/publishDraft.d.ts +0 -6
- package/dist/modules/entities/removeReaction.d.ts +0 -6
- package/dist/modules/entities/updateEntity.d.ts +0 -18
- package/dist/modules/events/addHost.d.ts +0 -8
- package/dist/modules/events/addInvite.d.ts +0 -8
- package/dist/modules/events/cancelEvent.d.ts +0 -6
- package/dist/modules/events/createEvent.d.ts +0 -49
- package/dist/modules/events/deleteEvent.d.ts +0 -5
- package/dist/modules/events/fetchEvent.d.ts +0 -8
- package/dist/modules/events/fetchEventRsvps.d.ts +0 -19
- package/dist/modules/events/fetchInvitees.d.ts +0 -12
- package/dist/modules/events/fetchManyEvents.d.ts +0 -42
- package/dist/modules/events/index.d.ts +0 -14
- package/dist/modules/events/removeHost.d.ts +0 -8
- package/dist/modules/events/removeInvite.d.ts +0 -8
- package/dist/modules/events/setRsvp.d.ts +0 -7
- package/dist/modules/events/updateEvent.d.ts +0 -43
- package/dist/modules/events/withdrawRsvp.d.ts +0 -6
- package/dist/modules/follows/deleteFollow.d.ts +0 -5
- package/dist/modules/follows/fetchFollowers.d.ts +0 -9
- package/dist/modules/follows/fetchFollowersCount.d.ts +0 -5
- package/dist/modules/follows/fetchFollowing.d.ts +0 -9
- package/dist/modules/follows/fetchFollowingCount.d.ts +0 -5
- package/dist/modules/follows/index.d.ts +0 -5
- package/dist/modules/oauth/authorize.d.ts +0 -25
- package/dist/modules/oauth/index.d.ts +0 -4
- package/dist/modules/oauth/linkIdentity.d.ts +0 -14
- package/dist/modules/oauth/listIdentities.d.ts +0 -4
- package/dist/modules/oauth/unlinkIdentity.d.ts +0 -12
- package/dist/modules/push/getNotificationPreferences.d.ts +0 -11
- package/dist/modules/push/index.d.ts +0 -2
- package/dist/modules/push/updateNotificationPreferences.d.ts +0 -16
- package/dist/modules/reports/createReport.d.ts +0 -9
- package/dist/modules/reports/fetchModeratedReports.d.ts +0 -13
- package/dist/modules/reports/index.d.ts +0 -2
- package/dist/modules/reputation/createGrant.d.ts +0 -45
- package/dist/modules/reputation/index.d.ts +0 -2
- package/dist/modules/reputation/listGrants.d.ts +0 -45
- package/dist/modules/search/askContent.d.ts +0 -58
- package/dist/modules/search/index.d.ts +0 -5
- package/dist/modules/search/matchUsers.d.ts +0 -36
- package/dist/modules/search/searchContent.d.ts +0 -24
- package/dist/modules/search/searchSpaces.d.ts +0 -11
- package/dist/modules/search/searchUsers.d.ts +0 -11
- package/dist/modules/spaces/approveMembership.d.ts +0 -7
- package/dist/modules/spaces/banMember.d.ts +0 -13
- package/dist/modules/spaces/checkMyMembership.d.ts +0 -6
- package/dist/modules/spaces/checkSlugAvailability.d.ts +0 -8
- package/dist/modules/spaces/createRule.d.ts +0 -8
- package/dist/modules/spaces/createSpace.d.ts +0 -29
- package/dist/modules/spaces/declineMembership.d.ts +0 -7
- package/dist/modules/spaces/deleteRule.d.ts +0 -7
- package/dist/modules/spaces/deleteSpace.d.ts +0 -6
- package/dist/modules/spaces/fetchChildSpaces.d.ts +0 -11
- package/dist/modules/spaces/fetchDigestConfig.d.ts +0 -6
- package/dist/modules/spaces/fetchManyRules.d.ts +0 -6
- package/dist/modules/spaces/fetchManySpaces.d.ts +0 -17
- package/dist/modules/spaces/fetchMutualSpaces.d.ts +0 -11
- package/dist/modules/spaces/fetchRule.d.ts +0 -7
- package/dist/modules/spaces/fetchSpace.d.ts +0 -6
- package/dist/modules/spaces/fetchSpaceBreadcrumb.d.ts +0 -6
- package/dist/modules/spaces/fetchSpaceByShortId.d.ts +0 -6
- package/dist/modules/spaces/fetchSpaceBySlug.d.ts +0 -6
- package/dist/modules/spaces/fetchSpaceMembers.d.ts +0 -11
- package/dist/modules/spaces/fetchSpaceTeam.d.ts +0 -7
- package/dist/modules/spaces/fetchUserSpaces.d.ts +0 -17
- package/dist/modules/spaces/getSpaceConversation.d.ts +0 -6
- package/dist/modules/spaces/handleCommentReport.d.ts +0 -14
- package/dist/modules/spaces/handleEntityReport.d.ts +0 -17
- package/dist/modules/spaces/handleSpaceChatReport.d.ts +0 -18
- package/dist/modules/spaces/index.d.ts +0 -36
- package/dist/modules/spaces/joinSpace.d.ts +0 -6
- package/dist/modules/spaces/leaveSpace.d.ts +0 -6
- package/dist/modules/spaces/moderateSpaceChatMessage.d.ts +0 -12
- package/dist/modules/spaces/moderateSpaceComment.d.ts +0 -9
- package/dist/modules/spaces/moderateSpaceEntity.d.ts +0 -12
- package/dist/modules/spaces/reorderRules.d.ts +0 -7
- package/dist/modules/spaces/setSpaceEntityNsfw.d.ts +0 -16
- package/dist/modules/spaces/unbanMember.d.ts +0 -13
- package/dist/modules/spaces/updateDigestConfig.d.ts +0 -11
- package/dist/modules/spaces/updateMemberRole.d.ts +0 -8
- package/dist/modules/spaces/updateRule.d.ts +0 -9
- package/dist/modules/spaces/updateSpace.d.ts +0 -22
- package/dist/modules/storage/deleteFile.d.ts +0 -5
- package/dist/modules/storage/getFile.d.ts +0 -34
- package/dist/modules/storage/index.d.ts +0 -4
- package/dist/modules/storage/uploadFile.d.ts +0 -30
- package/dist/modules/storage/uploadImage.d.ts +0 -42
- package/dist/modules/tables/bulkCreate.d.ts +0 -4
- package/dist/modules/tables/bulkDelete.d.ts +0 -7
- package/dist/modules/tables/create.d.ts +0 -4
- package/dist/modules/tables/createTableAccessor.d.ts +0 -9
- package/dist/modules/tables/deleteRow.d.ts +0 -9
- package/dist/modules/tables/find.d.ts +0 -8
- package/dist/modules/tables/findOne.d.ts +0 -7
- package/dist/modules/tables/index.d.ts +0 -9
- package/dist/modules/tables/restore.d.ts +0 -6
- package/dist/modules/tables/update.d.ts +0 -4
- package/dist/modules/users/checkUsernameAvailability.d.ts +0 -8
- package/dist/modules/users/createBlock.d.ts +0 -19
- package/dist/modules/users/createFollow.d.ts +0 -7
- package/dist/modules/users/deleteBlock.d.ts +0 -13
- package/dist/modules/users/deleteFollow.d.ts +0 -6
- package/dist/modules/users/fetchBlockStatus.d.ts +0 -23
- package/dist/modules/users/fetchBlockedUsers.d.ts +0 -19
- package/dist/modules/users/fetchConnectionStatus.d.ts +0 -10
- package/dist/modules/users/fetchConnectionsByUserId.d.ts +0 -11
- package/dist/modules/users/fetchConnectionsCountByUserId.d.ts +0 -6
- package/dist/modules/users/fetchFollowStatus.d.ts +0 -14
- package/dist/modules/users/fetchFollowersByUserId.d.ts +0 -11
- package/dist/modules/users/fetchFollowersCountByUserId.d.ts +0 -8
- package/dist/modules/users/fetchFollowingByUserId.d.ts +0 -11
- package/dist/modules/users/fetchFollowingCountByUserId.d.ts +0 -8
- package/dist/modules/users/fetchUserByForeignId.d.ts +0 -8
- package/dist/modules/users/fetchUserById.d.ts +0 -8
- package/dist/modules/users/fetchUserByUsername.d.ts +0 -8
- package/dist/modules/users/fetchUserSuggestions.d.ts +0 -7
- package/dist/modules/users/index.d.ts +0 -22
- package/dist/modules/users/removeConnectionByUserId.d.ts +0 -10
- package/dist/modules/users/requestConnection.d.ts +0 -11
- package/dist/modules/users/updateUser.d.ts +0 -32
- package/dist/modules/workspaces/acceptInvite.d.ts +0 -13
- package/dist/modules/workspaces/acceptWorkspaceInvite.d.ts +0 -13
- package/dist/modules/workspaces/createInvite.d.ts +0 -17
- package/dist/modules/workspaces/createWorkspace.d.ts +0 -12
- package/dist/modules/workspaces/createWorkspaceInvite.d.ts +0 -66
- package/dist/modules/workspaces/declineInvite.d.ts +0 -12
- package/dist/modules/workspaces/declineWorkspaceInvite.d.ts +0 -14
- package/dist/modules/workspaces/deleteWorkspace.d.ts +0 -13
- package/dist/modules/workspaces/fetchManyWorkspaces.d.ts +0 -17
- package/dist/modules/workspaces/fetchMembers.d.ts +0 -13
- package/dist/modules/workspaces/fetchMyInvites.d.ts +0 -11
- package/dist/modules/workspaces/fetchMyWorkspaceInvites.d.ts +0 -15
- package/dist/modules/workspaces/fetchWorkspace.d.ts +0 -7
- package/dist/modules/workspaces/fetchWorkspaceAuthority.d.ts +0 -16
- package/dist/modules/workspaces/fetchWorkspaceInvites.d.ts +0 -17
- package/dist/modules/workspaces/fetchWorkspaceMemberStanding.d.ts +0 -15
- package/dist/modules/workspaces/fetchWorkspaceMembers.d.ts +0 -18
- package/dist/modules/workspaces/getAuthority.d.ts +0 -11
- package/dist/modules/workspaces/index.d.ts +0 -21
- package/dist/modules/workspaces/leaveWorkspace.d.ts +0 -12
- package/dist/modules/workspaces/removeWorkspaceMember.d.ts +0 -12
- package/dist/modules/workspaces/removeWorkspaceMemberFromSubtree.d.ts +0 -16
- package/dist/modules/workspaces/resendWorkspaceInvite.d.ts +0 -12
- package/dist/modules/workspaces/revokeWorkspaceInvite.d.ts +0 -13
- package/dist/modules/workspaces/transferWorkspaceOwnership.d.ts +0 -15
- package/dist/modules/workspaces/updateWorkspace.d.ts +0 -12
- package/dist/modules/workspaces/updateWorkspaceInheritFlag.d.ts +0 -13
- package/dist/modules/workspaces/updateWorkspaceMember.d.ts +0 -35
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { User } from "./User";
|
|
2
|
-
export interface Connection {
|
|
3
|
-
id: string;
|
|
4
|
-
message?: string;
|
|
5
|
-
createdAt: string;
|
|
6
|
-
}
|
|
7
|
-
/** Returned by `POST /users/:userId/connection` (requestConnection). */
|
|
8
|
-
export interface ConnectionRequestResponse {
|
|
9
|
-
id: string;
|
|
10
|
-
status: string;
|
|
11
|
-
createdAt: string;
|
|
12
|
-
}
|
|
13
|
-
export interface EstablishedConnection {
|
|
14
|
-
id: string;
|
|
15
|
-
connectedUser: User;
|
|
16
|
-
connectedAt: string;
|
|
17
|
-
}
|
|
18
|
-
export interface PendingConnection extends Connection {
|
|
19
|
-
user: User;
|
|
20
|
-
type: "received" | "sent";
|
|
21
|
-
}
|
|
22
|
-
export interface ConnectionRequestParams {
|
|
23
|
-
userId: string;
|
|
24
|
-
message?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface ConnectionActionResponse {
|
|
27
|
-
id: string;
|
|
28
|
-
status: string;
|
|
29
|
-
createdAt?: string;
|
|
30
|
-
respondedAt?: string;
|
|
31
|
-
}
|
|
32
|
-
export interface ConnectionWithdrawResponse {
|
|
33
|
-
message: string;
|
|
34
|
-
}
|
|
35
|
-
export interface ConnectionCountResponse {
|
|
36
|
-
count: number;
|
|
37
|
-
}
|
|
38
|
-
export interface RemoveConnectionByUserIdResponse {
|
|
39
|
-
id?: string;
|
|
40
|
-
status?: string;
|
|
41
|
-
respondedAt?: string;
|
|
42
|
-
message?: string;
|
|
43
|
-
action?: "withdraw" | "disconnect" | "decline";
|
|
44
|
-
}
|
|
45
|
-
export interface ConnectionStatusNone {
|
|
46
|
-
status: "none";
|
|
47
|
-
}
|
|
48
|
-
export interface ConnectionStatusPending {
|
|
49
|
-
status: "pending";
|
|
50
|
-
type: "sent" | "received";
|
|
51
|
-
connectionId: string;
|
|
52
|
-
createdAt: string;
|
|
53
|
-
}
|
|
54
|
-
export interface ConnectionStatusConnected {
|
|
55
|
-
status: "connected";
|
|
56
|
-
connectionId: string;
|
|
57
|
-
connectedAt: string;
|
|
58
|
-
requestedAt: string;
|
|
59
|
-
}
|
|
60
|
-
export interface ConnectionStatusDeclined {
|
|
61
|
-
status: "declined";
|
|
62
|
-
type: "sent" | "received";
|
|
63
|
-
connectionId: string;
|
|
64
|
-
respondedAt: string;
|
|
65
|
-
}
|
|
66
|
-
export type ConnectionStatusResponse = ConnectionStatusNone | ConnectionStatusPending | ConnectionStatusConnected | ConnectionStatusDeclined;
|
|
67
|
-
export type ConnectionStatus = "none" | "pending-sent" | "pending-received" | "connected" | "declined-sent" | "declined-received";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { File } from "./File";
|
|
2
|
-
import { ChatMessage } from "./ChatMessage";
|
|
3
|
-
import { ConversationMember } from "./ConversationMember";
|
|
4
|
-
import { User } from "./User";
|
|
5
|
-
export interface Conversation {
|
|
6
|
-
id: string;
|
|
7
|
-
projectId: string;
|
|
8
|
-
type: "direct" | "group" | "space";
|
|
9
|
-
name: string | null;
|
|
10
|
-
description: string | null;
|
|
11
|
-
spaceId: string | null;
|
|
12
|
-
createdById: string | null;
|
|
13
|
-
avatarFileId: string | null;
|
|
14
|
-
lastMessageAt: string | null;
|
|
15
|
-
postingPermission: "members" | "admins" | null;
|
|
16
|
-
metadata: Record<string, any>;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
updatedAt: string;
|
|
19
|
-
memberCount?: number;
|
|
20
|
-
currentMember?: ConversationMember;
|
|
21
|
-
avatarFile?: File;
|
|
22
|
-
}
|
|
23
|
-
export interface ConversationPreview extends Conversation {
|
|
24
|
-
unreadCount: number;
|
|
25
|
-
lastMessage: ChatMessage | null;
|
|
26
|
-
otherMembers?: Pick<User, "id" | "name" | "username" | "avatar">[];
|
|
27
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { User } from "./User";
|
|
2
|
-
export type ConversationMemberRole = "admin" | "member";
|
|
3
|
-
export interface ConversationMember {
|
|
4
|
-
id: string;
|
|
5
|
-
projectId: string;
|
|
6
|
-
conversationId: string;
|
|
7
|
-
userId: string;
|
|
8
|
-
role: ConversationMemberRole | null;
|
|
9
|
-
lastReadAt: string | null;
|
|
10
|
-
mutedUntil?: string | null;
|
|
11
|
-
mutedForever?: boolean;
|
|
12
|
-
isActive: boolean;
|
|
13
|
-
leftAt: string | null;
|
|
14
|
-
createdAt: string;
|
|
15
|
-
updatedAt: string;
|
|
16
|
-
user?: User;
|
|
17
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { GrantSummary } from "./ReputationGrant";
|
|
2
|
-
import { Mention } from "./Mention";
|
|
3
|
-
import { User } from "./User";
|
|
4
|
-
import { Space } from "./Space";
|
|
5
|
-
import { ReactionCounts, ReactionType } from "./Reaction";
|
|
6
|
-
import { File } from "./File";
|
|
7
|
-
export interface TopComment {
|
|
8
|
-
id: string;
|
|
9
|
-
user: User;
|
|
10
|
-
upvotesCount: number;
|
|
11
|
-
content: string;
|
|
12
|
-
createdAt: string;
|
|
13
|
-
}
|
|
14
|
-
export interface Entity {
|
|
15
|
-
id: string;
|
|
16
|
-
foreignId: string | null;
|
|
17
|
-
shortId: string;
|
|
18
|
-
projectId: string;
|
|
19
|
-
sourceId: string | null;
|
|
20
|
-
spaceId: string | null;
|
|
21
|
-
space?: Space | null;
|
|
22
|
-
userId: string | null;
|
|
23
|
-
user?: User | null;
|
|
24
|
-
title: string | null;
|
|
25
|
-
content: string | null;
|
|
26
|
-
mentions: Mention[];
|
|
27
|
-
attachments: Record<string, any>[];
|
|
28
|
-
files?: File[];
|
|
29
|
-
keywords: string[];
|
|
30
|
-
upvotes: string[];
|
|
31
|
-
downvotes: string[];
|
|
32
|
-
reactionCounts: ReactionCounts;
|
|
33
|
-
userReaction?: ReactionType | null;
|
|
34
|
-
repliesCount: number;
|
|
35
|
-
views: number;
|
|
36
|
-
score: number;
|
|
37
|
-
scoreUpdatedAt: string;
|
|
38
|
-
location: {
|
|
39
|
-
type: "Point";
|
|
40
|
-
coordinates: [number, number];
|
|
41
|
-
} | null;
|
|
42
|
-
metadata: Record<string, any>;
|
|
43
|
-
nsfw: boolean;
|
|
44
|
-
nsfwEffective: boolean;
|
|
45
|
-
topComment: TopComment | null;
|
|
46
|
-
isSaved?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Reputation-grant summary. Opt-in — present exactly when the read requested
|
|
49
|
-
* `include=grants`. Once requested the server always returns the object,
|
|
50
|
-
* zero-filled rather than omitted, on projects with no grants and on projects
|
|
51
|
-
* without the reputation bundle alike.
|
|
52
|
-
*/
|
|
53
|
-
grants?: GrantSummary;
|
|
54
|
-
isDraft: boolean | null;
|
|
55
|
-
moderationStatus: "approved" | "removed" | null;
|
|
56
|
-
moderatedAt: string | null;
|
|
57
|
-
moderatedById: string | null;
|
|
58
|
-
moderatedByType: "client" | "user" | null;
|
|
59
|
-
moderationReason: string | null;
|
|
60
|
-
createdAt: string;
|
|
61
|
-
updatedAt: string;
|
|
62
|
-
deletedAt: string | null;
|
|
63
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { User } from "./User";
|
|
2
|
-
import { Space } from "./Space";
|
|
3
|
-
import { File } from "./File";
|
|
4
|
-
export type EventType = "online" | "physical" | "hybrid";
|
|
5
|
-
export type EventVisibility = "public" | "members" | "invite";
|
|
6
|
-
export type EventStatus = "active" | "cancelled";
|
|
7
|
-
export type RsvpStatus = "going" | "maybe" | "not_going";
|
|
8
|
-
export interface RsvpCounts {
|
|
9
|
-
going: number;
|
|
10
|
-
maybe: number;
|
|
11
|
-
not_going: number;
|
|
12
|
-
}
|
|
13
|
-
export interface Event {
|
|
14
|
-
id: string;
|
|
15
|
-
shortId: string;
|
|
16
|
-
projectId: string;
|
|
17
|
-
userId: string | null;
|
|
18
|
-
user?: User | null;
|
|
19
|
-
title: string;
|
|
20
|
-
description: string | null;
|
|
21
|
-
startTime: string;
|
|
22
|
-
endTime: string | null;
|
|
23
|
-
timezone: string | null;
|
|
24
|
-
type: EventType;
|
|
25
|
-
url: string | null;
|
|
26
|
-
venueName: string | null;
|
|
27
|
-
address: string | null;
|
|
28
|
-
location: {
|
|
29
|
-
type: "Point";
|
|
30
|
-
coordinates: [number, number];
|
|
31
|
-
} | null;
|
|
32
|
-
spaceId: string | null;
|
|
33
|
-
space?: Space | null;
|
|
34
|
-
visibility: EventVisibility;
|
|
35
|
-
status: EventStatus;
|
|
36
|
-
allowMaybe: boolean;
|
|
37
|
-
guestListVisible: boolean;
|
|
38
|
-
capacity: number | null;
|
|
39
|
-
hostIds: string[];
|
|
40
|
-
coverImageId: string | null;
|
|
41
|
-
files?: File[];
|
|
42
|
-
rsvpCounts: RsvpCounts;
|
|
43
|
-
userRsvp?: RsvpStatus | null;
|
|
44
|
-
metadata: Record<string, any>;
|
|
45
|
-
createdAt: string;
|
|
46
|
-
updatedAt: string;
|
|
47
|
-
deletedAt: string | null;
|
|
48
|
-
}
|
|
49
|
-
export interface EventRsvp {
|
|
50
|
-
id: string;
|
|
51
|
-
eventId: string;
|
|
52
|
-
userId: string;
|
|
53
|
-
user?: User | null;
|
|
54
|
-
status: RsvpStatus;
|
|
55
|
-
createdAt: string;
|
|
56
|
-
updatedAt: string;
|
|
57
|
-
}
|
|
58
|
-
export interface EventInvite {
|
|
59
|
-
id: string;
|
|
60
|
-
eventId: string;
|
|
61
|
-
userId: string;
|
|
62
|
-
user?: User | null;
|
|
63
|
-
invitedAt: string;
|
|
64
|
-
createdAt: string;
|
|
65
|
-
updatedAt: string;
|
|
66
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export interface FileImageVariant {
|
|
2
|
-
path: string;
|
|
3
|
-
publicPath: string;
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
size: number;
|
|
7
|
-
format: string;
|
|
8
|
-
}
|
|
9
|
-
export interface FileImage {
|
|
10
|
-
fileId: string;
|
|
11
|
-
originalWidth: number;
|
|
12
|
-
originalHeight: number;
|
|
13
|
-
variants: Record<string, FileImageVariant>;
|
|
14
|
-
processingStatus: "completed" | "failed";
|
|
15
|
-
processingError: string | null;
|
|
16
|
-
format: string;
|
|
17
|
-
quality: number;
|
|
18
|
-
exifStripped: boolean;
|
|
19
|
-
createdAt: string;
|
|
20
|
-
updatedAt: string;
|
|
21
|
-
}
|
|
22
|
-
export interface File {
|
|
23
|
-
id: string;
|
|
24
|
-
projectId: string;
|
|
25
|
-
userId: string | null;
|
|
26
|
-
entityId: string | null;
|
|
27
|
-
commentId: string | null;
|
|
28
|
-
chatMessageId: string | null;
|
|
29
|
-
spaceId: string | null;
|
|
30
|
-
type: "image" | "video" | "document" | "other";
|
|
31
|
-
originalPath: string;
|
|
32
|
-
originalSize: number;
|
|
33
|
-
originalMimeType: string;
|
|
34
|
-
position: number;
|
|
35
|
-
metadata: Record<string, any>;
|
|
36
|
-
image?: FileImage;
|
|
37
|
-
createdAt: string;
|
|
38
|
-
updatedAt: string;
|
|
39
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { User } from "./User";
|
|
2
|
-
export interface Follow {
|
|
3
|
-
id: string;
|
|
4
|
-
projectId: string;
|
|
5
|
-
followerId: string;
|
|
6
|
-
followedId: string;
|
|
7
|
-
createdAt: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* An entry in a follower/following list. The list endpoints
|
|
11
|
-
* (`/follows/(followers|following)` and `/users/:userId/(followers|following)`)
|
|
12
|
-
* return the follow id, the populated other user, and when the follow happened
|
|
13
|
-
* — NOT the raw {@link Follow} row.
|
|
14
|
-
*/
|
|
15
|
-
export interface FollowListItem {
|
|
16
|
-
followId: string;
|
|
17
|
-
user: User;
|
|
18
|
-
followedAt: string;
|
|
19
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export type ImageFit = "cover" | "contain" | "inside" | "outside";
|
|
2
|
-
export type ImageFormat = "webp" | "jpeg" | "png" | "original";
|
|
3
|
-
interface BaseImageOptions {
|
|
4
|
-
/** 1–100. Output quality. */
|
|
5
|
-
quality?: number;
|
|
6
|
-
format?: ImageFormat;
|
|
7
|
-
stripExif?: boolean;
|
|
8
|
-
}
|
|
9
|
-
/** Mode 1 — explicit width/height per named variant. */
|
|
10
|
-
export interface ExactDimensionsOptions extends BaseImageOptions {
|
|
11
|
-
mode: "exact-dimensions";
|
|
12
|
-
/** Keyed by variant name, e.g. `{ thumbnail: { width, height } }`. 50–10000. */
|
|
13
|
-
dimensions: Record<string, {
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
}>;
|
|
17
|
-
fit?: ImageFit;
|
|
18
|
-
}
|
|
19
|
-
/** Mode 2a — fixed aspect ratio, sized by width per variant. */
|
|
20
|
-
export interface AspectRatioWidthOptions extends BaseImageOptions {
|
|
21
|
-
mode: "aspect-ratio-width-based";
|
|
22
|
-
aspectRatio: {
|
|
23
|
-
width: number;
|
|
24
|
-
height: number;
|
|
25
|
-
};
|
|
26
|
-
/** Keyed by variant name → target width (50–10000). */
|
|
27
|
-
widths: Record<string, number>;
|
|
28
|
-
fit?: ImageFit;
|
|
29
|
-
}
|
|
30
|
-
/** Mode 2b — fixed aspect ratio, sized by height per variant. */
|
|
31
|
-
export interface AspectRatioHeightOptions extends BaseImageOptions {
|
|
32
|
-
mode: "aspect-ratio-height-based";
|
|
33
|
-
aspectRatio: {
|
|
34
|
-
width: number;
|
|
35
|
-
height: number;
|
|
36
|
-
};
|
|
37
|
-
/** Keyed by variant name → target height (50–10000). */
|
|
38
|
-
heights: Record<string, number>;
|
|
39
|
-
fit?: ImageFit;
|
|
40
|
-
}
|
|
41
|
-
/** Mode 3 — preserve the source aspect ratio, bounded per variant. */
|
|
42
|
-
export interface OriginalAspectOptions extends BaseImageOptions {
|
|
43
|
-
mode: "original-aspect";
|
|
44
|
-
/** Keyed by variant name → bounding size (50–10000). */
|
|
45
|
-
sizes: Record<string, number>;
|
|
46
|
-
/** Server restricts this mode to `inside` | `outside`. */
|
|
47
|
-
fit?: "inside" | "outside";
|
|
48
|
-
}
|
|
49
|
-
/** Mode 4 — multiple aspect ratios, sized per variant. */
|
|
50
|
-
export interface MultiAspectRatioOptions extends BaseImageOptions {
|
|
51
|
-
mode: "multi-aspect-ratio";
|
|
52
|
-
/** 1–10 aspect ratios. */
|
|
53
|
-
aspectRatios: {
|
|
54
|
-
width: number;
|
|
55
|
-
height: number;
|
|
56
|
-
}[];
|
|
57
|
-
/** Keyed by variant name → target size (50–10000). */
|
|
58
|
-
sizes: Record<string, number>;
|
|
59
|
-
fit?: ImageFit;
|
|
60
|
-
}
|
|
61
|
-
export type ImageOptions = ExactDimensionsOptions | AspectRatioWidthOptions | AspectRatioHeightOptions | OriginalAspectOptions | MultiAspectRatioOptions;
|
|
62
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface OAuthIdentity {
|
|
2
|
-
id: string;
|
|
3
|
-
provider: string;
|
|
4
|
-
providerAccountId: string;
|
|
5
|
-
email: string | null;
|
|
6
|
-
name: string | null;
|
|
7
|
-
avatar: string | null;
|
|
8
|
-
isVerified: boolean;
|
|
9
|
-
createdAt: string;
|
|
10
|
-
}
|
|
11
|
-
export interface ListIdentitiesResponse {
|
|
12
|
-
identities: OAuthIdentity[];
|
|
13
|
-
hasPassword: boolean;
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface Project {
|
|
2
|
-
id: string;
|
|
3
|
-
clientId: string;
|
|
4
|
-
name: string;
|
|
5
|
-
integrations: {
|
|
6
|
-
id: string;
|
|
7
|
-
projectId: string;
|
|
8
|
-
name: string;
|
|
9
|
-
data: Record<string, any>;
|
|
10
|
-
createdAt: string;
|
|
11
|
-
}[];
|
|
12
|
-
createdAt: string;
|
|
13
|
-
updatedAt: string;
|
|
14
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Every push event type — the full app-notification type set plus the chat
|
|
3
|
-
* `message` event (push-only). Mirrors the server's `PUSH_EVENT_TYPES` exactly
|
|
4
|
-
* (server `src/constants/push/pushEvents.ts`); these are the only names a
|
|
5
|
-
* `disabledTypes` set may contain.
|
|
6
|
-
*/
|
|
7
|
-
export declare const PUSH_EVENT_TYPES: readonly ["entity-comment", "comment-reply", "entity-mention", "comment-mention", "entity-reaction", "comment-reaction", "entity-reaction-milestone-specific", "entity-reaction-milestone-total", "comment-reaction-milestone-specific", "comment-reaction-milestone-total", "new-follow", "connection-request", "connection-accepted", "space-membership-approved", "event-invite", "event-updated", "event-cancelled", "reputation-grant", "message"];
|
|
8
|
-
export type PushEventType = (typeof PUSH_EVENT_TYPES)[number];
|
|
9
|
-
/**
|
|
10
|
-
* The four conversation-mute duration choices. Send the CHOICE, never a raw
|
|
11
|
-
* timestamp — the server resolves it and represents "forever" via the explicit
|
|
12
|
-
* `mutedForever` signal on the returned member. Mirrors the server's
|
|
13
|
-
* `MUTE_DURATIONS` (server `src/helpers/push/muteDuration.ts`).
|
|
14
|
-
*/
|
|
15
|
-
export declare const MUTE_DURATIONS: readonly ["8h", "24h", "1w", "forever"];
|
|
16
|
-
export type MuteDuration = (typeof MUTE_DURATIONS)[number];
|
|
17
|
-
/** Response of read/update notification preferences. */
|
|
18
|
-
export interface NotificationPreferences {
|
|
19
|
-
disabledTypes: PushEventType[];
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* A Web Push subscription in its SERIALIZED form — the JSON the server reads,
|
|
23
|
-
* not the live browser object.
|
|
24
|
-
*
|
|
25
|
-
* A `PushSubscription` straight from `PushManager.subscribe()` does NOT satisfy
|
|
26
|
-
* this type. It exposes its keys only through `getKey(name)`; there is no `keys`
|
|
27
|
-
* property to read, so it is not assignable here under strict TypeScript, and
|
|
28
|
-
* passing one through a cast sends a body the server rejects.
|
|
29
|
-
*
|
|
30
|
-
* To produce a value of this type:
|
|
31
|
-
*
|
|
32
|
-
* 1. **Serialize** the subscription with `subscription.toJSON()`.
|
|
33
|
-
* 2. **Confirm** `endpoint`, `keys.p256dh` and `keys.auth` are all present —
|
|
34
|
-
* `PushSubscriptionJSON` types every one of them as optional, while the
|
|
35
|
-
* server requires all three as non-empty strings and 400s otherwise.
|
|
36
|
-
*
|
|
37
|
-
* ```ts
|
|
38
|
-
* const json = subscription.toJSON();
|
|
39
|
-
* if (!json.endpoint || !json.keys?.p256dh || !json.keys?.auth) {
|
|
40
|
-
* throw new Error("Incomplete Web Push subscription");
|
|
41
|
-
* }
|
|
42
|
-
* const webPushSubscription: WebPushSubscription = {
|
|
43
|
-
* endpoint: json.endpoint,
|
|
44
|
-
* keys: { p256dh: json.keys.p256dh, auth: json.keys.auth },
|
|
45
|
-
* };
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* Mirrors the server's `webPushSubscriptionSchema`
|
|
49
|
-
* (server `src/v7/validation/push-notifications/push-notifications.schema.ts`).
|
|
50
|
-
*/
|
|
51
|
-
export interface WebPushSubscription {
|
|
52
|
-
endpoint: string;
|
|
53
|
-
keys: {
|
|
54
|
-
p256dh: string;
|
|
55
|
-
auth: string;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Identifies one physical device. Mirrors the server's device-identifier body
|
|
60
|
-
* exactly (server `src/v7/validation/push-notifications/push-notifications.schema.ts`):
|
|
61
|
-
* a provider token for `ios`/`android`, a Web Push subscription for `web`. The
|
|
62
|
-
* union encodes the server's own cross-check — it rejects the same
|
|
63
|
-
* combinations the server's `superRefine` rejects.
|
|
64
|
-
*
|
|
65
|
-
* Passed to `auth.signOut` to unbind that device's push binding in the same
|
|
66
|
-
* transaction as the sign-out.
|
|
67
|
-
*/
|
|
68
|
-
export type PushDeviceIdentifier = {
|
|
69
|
-
platform: "ios" | "android";
|
|
70
|
-
token: string;
|
|
71
|
-
} | {
|
|
72
|
-
platform: "web";
|
|
73
|
-
subscription: WebPushSubscription;
|
|
74
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { User } from "./User";
|
|
2
|
-
export type ReactionType = "upvote" | "downvote" | "like" | "love" | "wow" | "sad" | "angry" | "funny";
|
|
3
|
-
export interface ReactionCounts {
|
|
4
|
-
upvote: number;
|
|
5
|
-
downvote: number;
|
|
6
|
-
like: number;
|
|
7
|
-
love: number;
|
|
8
|
-
wow: number;
|
|
9
|
-
sad: number;
|
|
10
|
-
angry: number;
|
|
11
|
-
funny: number;
|
|
12
|
-
}
|
|
13
|
-
export interface Reaction {
|
|
14
|
-
id: string;
|
|
15
|
-
projectId: string;
|
|
16
|
-
targetType: "entity" | "comment";
|
|
17
|
-
targetId: string;
|
|
18
|
-
userId: string;
|
|
19
|
-
reactionType: ReactionType;
|
|
20
|
-
createdAt: string;
|
|
21
|
-
updatedAt: string;
|
|
22
|
-
user?: User;
|
|
23
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Entity } from "./Entity";
|
|
2
|
-
import { Comment } from "./Comment";
|
|
3
|
-
import { Space } from "./Space";
|
|
4
|
-
export type ReportTargetType = "entity" | "comment" | "message";
|
|
5
|
-
/**
|
|
6
|
-
* The reasons the API accepts on a report. Server-enforced — anything outside
|
|
7
|
-
* this set is rejected with `report/invalid-body`. Use `other` plus `details`
|
|
8
|
-
* for anything the taxonomy doesn't cover.
|
|
9
|
-
*/
|
|
10
|
-
export type ReportReason = "spam" | "inappropriateContent" | "harassment" | "misinformation" | "hateSpeech" | "violence" | "illegalActivity" | "selfHarm" | "other";
|
|
11
|
-
export type ReportStatus = "pending" | "on-hold" | "escalated" | "dismissed" | "actioned";
|
|
12
|
-
export interface UserReport {
|
|
13
|
-
id: string;
|
|
14
|
-
projectId: string;
|
|
15
|
-
reportId: string;
|
|
16
|
-
userId: string;
|
|
17
|
-
reason: string;
|
|
18
|
-
details: string | null;
|
|
19
|
-
createdAt: string;
|
|
20
|
-
}
|
|
21
|
-
export interface Report {
|
|
22
|
-
id: string;
|
|
23
|
-
projectId: string;
|
|
24
|
-
spaceId: string | null;
|
|
25
|
-
targetId: string;
|
|
26
|
-
targetType: ReportTargetType;
|
|
27
|
-
status: ReportStatus;
|
|
28
|
-
reporterCount: number;
|
|
29
|
-
createdAt: string;
|
|
30
|
-
updatedAt: string;
|
|
31
|
-
userReports?: UserReport[];
|
|
32
|
-
target?: Entity | Comment | null;
|
|
33
|
-
space?: Space | null;
|
|
34
|
-
}
|
|
35
|
-
export interface CreateReportResponse {
|
|
36
|
-
message: string;
|
|
37
|
-
code: "report/created" | "report/updated" | "report/already-reported";
|
|
38
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { User } from "./User";
|
|
2
|
-
/** The three grantable target kinds. Polymorphic — `targetId` carries no FK. */
|
|
3
|
-
export type ReputationGrantTargetType = "entity" | "comment" | "chat-message";
|
|
4
|
-
/**
|
|
5
|
-
* Who created the grant. `"user"` is a debited transfer (reputation moved out
|
|
6
|
-
* of `senderId`'s bucket); `"app"` is a mint issued by the project itself with
|
|
7
|
-
* a null `senderId`. Persisted rather than inferred from `senderId`, which is
|
|
8
|
-
* also null for a transfer whose sender was later deleted.
|
|
9
|
-
*/
|
|
10
|
-
export type ReputationGrantSourceType = "user" | "app";
|
|
11
|
-
/**
|
|
12
|
-
* The "which item was rewarded" pair, as a both-or-neither union.
|
|
13
|
-
*
|
|
14
|
-
* Modelled as a two-branch union rather than two independent optional fields so
|
|
15
|
-
* a half-filled target — `{ targetType }` with no `targetId`, or the reverse —
|
|
16
|
-
* does not compile. The server answers that shape with
|
|
17
|
-
* `400 reputation-grant/invalid-body` on the write (a shared
|
|
18
|
-
* `bothOrNeitherTarget` refinement) and
|
|
19
|
-
* `400 reputation-grant/invalid-filter` on the list, so the union turns a
|
|
20
|
-
* guaranteed round trip into a red squiggle.
|
|
21
|
-
*
|
|
22
|
-
* The empty branch is `?: undefined`, NOT `?: null` — deliberately, and for the
|
|
23
|
-
* same reason `metadata` is not nullable: `grantBodyFields.targetType` is
|
|
24
|
-
* `.optional()` with no `.nullable()`, so an explicit `targetType: null` is
|
|
25
|
-
* rejected. Omit both keys to mean "no target".
|
|
26
|
-
*
|
|
27
|
-
* Building the pair conditionally needs one accommodation: an inline
|
|
28
|
-
* conditional spread of just these two keys widens both to `T | undefined` and
|
|
29
|
-
* then matches neither branch. Either branch the whole argument, or name this
|
|
30
|
-
* type on a helper and spread that:
|
|
31
|
-
*
|
|
32
|
-
* ```ts
|
|
33
|
-
* const target: ReputationGrantTargetFilter = item
|
|
34
|
-
* ? { targetType: "entity", targetId: item.id }
|
|
35
|
-
* : {};
|
|
36
|
-
* await listGrants(client, { ...base, ...target });
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export type ReputationGrantTargetFilter = {
|
|
40
|
-
/** The kind of item rewarded. Requires `targetId` alongside it. */
|
|
41
|
-
targetType: ReputationGrantTargetType;
|
|
42
|
-
/** The rewarded item's id. Requires `targetType` alongside it. */
|
|
43
|
-
targetId: string;
|
|
44
|
-
} | {
|
|
45
|
-
targetType?: undefined;
|
|
46
|
-
targetId?: undefined;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Per-item reputation-grant summary. Covers positive grants only — negative
|
|
50
|
-
* grants (app deductions) are invisible on every public read surface.
|
|
51
|
-
*/
|
|
52
|
-
export interface GrantSummary {
|
|
53
|
-
/** Sum of positive grant amounts on the item. */
|
|
54
|
-
total: number;
|
|
55
|
-
/** Number of positive grants on the item. */
|
|
56
|
-
count: number;
|
|
57
|
-
/** The calling user's own summed positive grants on the item. */
|
|
58
|
-
viewerTotal: number;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* A single reputation movement. Rows are append-only — nothing updates or
|
|
62
|
-
* soft-deletes them — so the table is the audit log behind every balance.
|
|
63
|
-
*/
|
|
64
|
-
export interface ReputationGrant {
|
|
65
|
-
id: string;
|
|
66
|
-
sourceType: ReputationGrantSourceType;
|
|
67
|
-
/** Null for an app mint, and for a transfer whose sender was deleted. */
|
|
68
|
-
senderId: string | null;
|
|
69
|
-
/** Populated when the list is called with `include: "user"`. */
|
|
70
|
-
sender?: User | null;
|
|
71
|
-
recipientId: string;
|
|
72
|
-
/** Populated when the list is called with `include: "user"`. */
|
|
73
|
-
recipient?: User | null;
|
|
74
|
-
/** Non-zero. Negative only when `sourceType` is `"app"`. */
|
|
75
|
-
amount: number;
|
|
76
|
-
/** The bucket both legs moved in; null = the project-general bucket. */
|
|
77
|
-
spaceId: string | null;
|
|
78
|
-
/** Both null or both non-null. */
|
|
79
|
-
targetType: ReputationGrantTargetType | null;
|
|
80
|
-
targetId: string | null;
|
|
81
|
-
note: string | null;
|
|
82
|
-
metadata: Record<string, any> | null;
|
|
83
|
-
createdAt: string;
|
|
84
|
-
updatedAt: string;
|
|
85
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface Rule {
|
|
2
|
-
id: string;
|
|
3
|
-
projectId: string;
|
|
4
|
-
spaceId: string;
|
|
5
|
-
title: string;
|
|
6
|
-
description: string | null;
|
|
7
|
-
order: number;
|
|
8
|
-
lastApprovedBy: string | null;
|
|
9
|
-
createdAt: string;
|
|
10
|
-
updatedAt: string;
|
|
11
|
-
}
|
|
12
|
-
export interface FetchManyRulesResponse {
|
|
13
|
-
data: Rule[];
|
|
14
|
-
count: number;
|
|
15
|
-
}
|
|
16
|
-
export interface DeleteRuleResponse {
|
|
17
|
-
message: string;
|
|
18
|
-
deletedRule: {
|
|
19
|
-
id: string;
|
|
20
|
-
title: string;
|
|
21
|
-
};
|
|
22
|
-
}
|