@sublay/js 7.8.0 → 7.9.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/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +23 -14
- package/dist/index.d.mts +374 -21
- package/dist/index.d.ts +4364 -31
- package/dist/index.js +53 -19
- package/dist/index.mjs +53 -19
- 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 -32
- package/dist/interfaces/Collection.d.ts +0 -10
- package/dist/interfaces/Comment.d.ts +0 -42
- 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 -55
- 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/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 -148
- 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 -8
- 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 -40
- 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/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 -17
- 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 -13
- 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 -11
- package/dist/modules/workspaces/fetchWorkspaceInvites.d.ts +0 -17
- package/dist/modules/workspaces/fetchWorkspaceMemberStanding.d.ts +0 -11
- package/dist/modules/workspaces/fetchWorkspaceMembers.d.ts +0 -13
- 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 -11
- 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 -17
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { WorkspaceRosterResponse, WorkspaceRosterCountsResponse } from "../../interfaces/Workspace";
|
|
3
|
-
export interface FetchMembersProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
include?: string;
|
|
6
|
-
countOnly?: boolean;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Unified roster read — one entry per distinct user, each with a `reasons`
|
|
10
|
-
* array. Always returned in full (never paginated). With `countOnly=true` the
|
|
11
|
-
* shape is `WorkspaceRosterCountsResponse` instead. Actor from the token.
|
|
12
|
-
*/
|
|
13
|
-
export declare function fetchMembers(client: SublayHttpClient, data: FetchMembersProps): Promise<WorkspaceRosterResponse | WorkspaceRosterCountsResponse>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { WorkspaceInvitation } from "../../interfaces/Workspace";
|
|
3
|
-
export interface FetchMyInvitesResponse {
|
|
4
|
-
data: WorkspaceInvitation[];
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* The bearer-token user's LIVE pending invites (`status='pending' AND expiresAt
|
|
8
|
-
* > now`), matched by `userId` from the token. Surfacing is NOT
|
|
9
|
-
* verification-gated (the verified check applies only at accept).
|
|
10
|
-
*/
|
|
11
|
-
export declare function fetchMyInvites(client: SublayHttpClient): Promise<FetchMyInvitesResponse>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { WorkspaceInvitation } from "../../interfaces/Workspace";
|
|
3
|
-
export interface FetchMyWorkspaceInvitesResponse {
|
|
4
|
-
data: WorkspaceInvitation[];
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* The bearer-token user's LIVE pending invites (`status='pending' AND expiresAt
|
|
8
|
-
* > now`), matched by `userId` from the token. Surfacing is NOT
|
|
9
|
-
* verification-gated (the verified check applies when the user ACTS on an
|
|
10
|
-
* invite — accept or decline).
|
|
11
|
-
*
|
|
12
|
-
* This is the INBOX read — invites addressed TO the caller. For the invites a
|
|
13
|
-
* workspace has ISSUED, use `fetchWorkspaceInvites`.
|
|
14
|
-
*/
|
|
15
|
-
export declare function fetchMyWorkspaceInvites(client: SublayHttpClient): Promise<FetchMyWorkspaceInvitesResponse>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Workspace } from "../../interfaces/Workspace";
|
|
3
|
-
export interface FetchWorkspaceProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
include?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function fetchWorkspace(client: SublayHttpClient, data: FetchWorkspaceProps): Promise<Workspace>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { WorkspaceAuthority } from "../../interfaces/Workspace";
|
|
3
|
-
export interface FetchWorkspaceAuthorityProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Authority-as-a-service read — the bearer-token user's resolved standing
|
|
8
|
-
* (`{ reasons, capabilities, permissions, rank }`) on the workspace. A
|
|
9
|
-
* permission check is a one-line `.includes()` on the result.
|
|
10
|
-
*/
|
|
11
|
-
export declare function fetchWorkspaceAuthority(client: SublayHttpClient, data: FetchWorkspaceAuthorityProps): Promise<WorkspaceAuthority>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { WorkspaceInvitation } from "../../interfaces/Workspace";
|
|
3
|
-
export interface FetchWorkspaceInvitesProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
}
|
|
6
|
-
export interface FetchWorkspaceInvitesResponse {
|
|
7
|
-
data: WorkspaceInvitation[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* List a workspace's LIVE pending invites (`status='pending' AND expiresAt >
|
|
11
|
-
* now`). Requires the `invite` capability (or owner). Always returned in full —
|
|
12
|
-
* this list is deliberately unpaginated.
|
|
13
|
-
*
|
|
14
|
-
* This is the OUTBOX read — invites this workspace ISSUED. For the invites
|
|
15
|
-
* addressed TO the caller, use `fetchMyWorkspaceInvites`.
|
|
16
|
-
*/
|
|
17
|
-
export declare function fetchWorkspaceInvites(client: SublayHttpClient, data: FetchWorkspaceInvitesProps): Promise<FetchWorkspaceInvitesResponse>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { WorkspaceMemberStanding } from "../../interfaces/Workspace";
|
|
3
|
-
export interface FetchWorkspaceMemberStandingProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
targetUserId: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Read one user's resolved standing on a workspace (`reasons`, `capabilities`,
|
|
9
|
-
* `permissions`, `rank`, `title`, `metadata`).
|
|
10
|
-
*/
|
|
11
|
-
export declare function fetchWorkspaceMemberStanding(client: SublayHttpClient, data: FetchWorkspaceMemberStandingProps): Promise<WorkspaceMemberStanding>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { WorkspaceRosterResponse, WorkspaceRosterCountsResponse } from "../../interfaces/Workspace";
|
|
3
|
-
export interface FetchWorkspaceMembersProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
include?: string;
|
|
6
|
-
countOnly?: boolean;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Unified roster read — one entry per distinct user, each with a `reasons`
|
|
10
|
-
* array. Always returned in full (never paginated). With `countOnly=true` the
|
|
11
|
-
* shape is `WorkspaceRosterCountsResponse` instead. Actor from the token.
|
|
12
|
-
*/
|
|
13
|
-
export declare function fetchWorkspaceMembers(client: SublayHttpClient, data: FetchWorkspaceMembersProps): Promise<WorkspaceRosterResponse | WorkspaceRosterCountsResponse>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { WorkspaceAuthority } from "../../interfaces/Workspace";
|
|
3
|
-
export interface GetAuthorityProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Authority-as-a-service read — the bearer-token user's resolved standing
|
|
8
|
-
* (`{ reasons, capabilities, permissions, rank }`) on the workspace. A
|
|
9
|
-
* permission check is a one-line `.includes()` on the result.
|
|
10
|
-
*/
|
|
11
|
-
export declare function getAuthority(client: SublayHttpClient, data: GetAuthorityProps): Promise<WorkspaceAuthority>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { createWorkspace } from "./createWorkspace";
|
|
2
|
-
export { fetchWorkspace } from "./fetchWorkspace";
|
|
3
|
-
export { fetchManyWorkspaces } from "./fetchManyWorkspaces";
|
|
4
|
-
export { updateWorkspace } from "./updateWorkspace";
|
|
5
|
-
export { updateWorkspaceInheritFlag } from "./updateWorkspaceInheritFlag";
|
|
6
|
-
export { deleteWorkspace } from "./deleteWorkspace";
|
|
7
|
-
export { transferWorkspaceOwnership } from "./transferWorkspaceOwnership";
|
|
8
|
-
export { fetchWorkspaceMembers } from "./fetchWorkspaceMembers";
|
|
9
|
-
export { fetchWorkspaceMemberStanding } from "./fetchWorkspaceMemberStanding";
|
|
10
|
-
export { updateWorkspaceMember } from "./updateWorkspaceMember";
|
|
11
|
-
export { removeWorkspaceMember } from "./removeWorkspaceMember";
|
|
12
|
-
export { leaveWorkspace } from "./leaveWorkspace";
|
|
13
|
-
export { removeWorkspaceMemberFromSubtree } from "./removeWorkspaceMemberFromSubtree";
|
|
14
|
-
export { createWorkspaceInvite } from "./createWorkspaceInvite";
|
|
15
|
-
export { fetchWorkspaceInvites } from "./fetchWorkspaceInvites";
|
|
16
|
-
export { revokeWorkspaceInvite } from "./revokeWorkspaceInvite";
|
|
17
|
-
export { resendWorkspaceInvite } from "./resendWorkspaceInvite";
|
|
18
|
-
export { acceptWorkspaceInvite } from "./acceptWorkspaceInvite";
|
|
19
|
-
export { declineWorkspaceInvite } from "./declineWorkspaceInvite";
|
|
20
|
-
export { fetchMyWorkspaceInvites } from "./fetchMyWorkspaceInvites";
|
|
21
|
-
export { fetchWorkspaceAuthority } from "./fetchWorkspaceAuthority";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface LeaveWorkspaceProps {
|
|
3
|
-
workspaceId: string;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* The bearer-token user leaves this workspace — removes THEIR OWN direct
|
|
7
|
-
* membership on THIS node only (owning a child is unaffected). An owner cannot
|
|
8
|
-
* leave (409 `workspace/sole-owner`); transfer or delete first. No `userId` is
|
|
9
|
-
* sent — the server derives the leaver from the token.
|
|
10
|
-
*/
|
|
11
|
-
export declare function leaveWorkspace(client: SublayHttpClient, data: LeaveWorkspaceProps): Promise<void>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface RemoveWorkspaceMemberProps {
|
|
3
|
-
workspaceId: string;
|
|
4
|
-
targetUserId: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Remove a member from this workspace. Requires the `remove-member` capability
|
|
8
|
-
* and is rank-bounded. The workspace owner cannot be removed (409
|
|
9
|
-
* `workspace/sole-owner`) — transfer ownership first. No `userId` body is sent;
|
|
10
|
-
* the actor comes from the token.
|
|
11
|
-
*/
|
|
12
|
-
export declare function removeWorkspaceMember(client: SublayHttpClient, data: RemoveWorkspaceMemberProps): Promise<void>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { RemoveWorkspaceMemberFromSubtreeResponse } from "../../interfaces/Workspace";
|
|
3
|
-
export interface RemoveWorkspaceMemberFromSubtreeProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
targetUserId: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Removes the target user's direct memberships on this workspace and every
|
|
9
|
-
* descendant. Requires `remove-member` (rank-bounded per node). Blocks (409
|
|
10
|
-
* `workspace/owns-descendants`) with a report if the user OWNS any descendant
|
|
11
|
-
* workspace — transfer or delete those first. The actor comes from the token.
|
|
12
|
-
*
|
|
13
|
-
* A NON-owner's sweep can be PARTIAL: it stops at sealed sub-workspaces. Check
|
|
14
|
-
* `skippedCount` / `skipped` before treating the user as fully offboarded.
|
|
15
|
-
*/
|
|
16
|
-
export declare function removeWorkspaceMemberFromSubtree(client: SublayHttpClient, data: RemoveWorkspaceMemberFromSubtreeProps): Promise<RemoveWorkspaceMemberFromSubtreeResponse>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { WorkspaceInvitation } from "../../interfaces/Workspace";
|
|
3
|
-
export interface ResendWorkspaceInviteProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
inviteId: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Resend / refresh a pending invitation (valid on any `pending` invite, even one
|
|
9
|
-
* past `expiresAt` — resets a 14-day expiry and resends the email). A terminal
|
|
10
|
-
* invite (accepted/declined/revoked) → 409. Requires `invite` (or owner).
|
|
11
|
-
*/
|
|
12
|
-
export declare function resendWorkspaceInvite(client: SublayHttpClient, data: ResendWorkspaceInviteProps): Promise<WorkspaceInvitation>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface RevokeWorkspaceInviteProps {
|
|
3
|
-
workspaceId: string;
|
|
4
|
-
inviteId: string;
|
|
5
|
-
}
|
|
6
|
-
export interface RevokeWorkspaceInviteResponse {
|
|
7
|
-
success: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Revoke a pending invitation. Requires the `invite` capability (or owner).
|
|
11
|
-
* Note the verb-suffixed POST route — this is not a `DELETE`.
|
|
12
|
-
*/
|
|
13
|
-
export declare function revokeWorkspaceInvite(client: SublayHttpClient, data: RevokeWorkspaceInviteProps): Promise<RevokeWorkspaceInviteResponse>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Workspace, WorkspaceCapability } from "../../interfaces/Workspace";
|
|
3
|
-
export interface TransferWorkspaceOwnershipProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
newOwnerId: string;
|
|
6
|
-
previousOwnerDisposition?: "demote" | "remove";
|
|
7
|
-
previousOwnerRank?: number;
|
|
8
|
-
previousOwnerCapabilities?: WorkspaceCapability[];
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Hand the workspace to a new owner. Owner-only (own owner or an ancestor
|
|
12
|
-
* owner). The actor is the bearer-token user — no `userId` is sent;
|
|
13
|
-
* `newOwnerId` addresses the TARGET, not the actor.
|
|
14
|
-
*/
|
|
15
|
-
export declare function transferWorkspaceOwnership(client: SublayHttpClient, data: TransferWorkspaceOwnershipProps): Promise<Workspace>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Workspace } from "../../interfaces/Workspace";
|
|
3
|
-
export interface UpdateWorkspaceProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
metadata?: Record<string, any>;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Edit a workspace's name / metadata. Requires the `edit-workspace` capability
|
|
10
|
-
* (or ownership). The actor is the bearer-token user — no `userId` is sent.
|
|
11
|
-
*/
|
|
12
|
-
export declare function updateWorkspace(client: SublayHttpClient, data: UpdateWorkspaceProps): Promise<Workspace>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Workspace } from "../../interfaces/Workspace";
|
|
3
|
-
export interface UpdateWorkspaceInheritFlagProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
inheritsFromParent: boolean;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Flip whether capabilities held on an ancestor "reach" into this workspace.
|
|
9
|
-
* Owner-only in both directions (own owner or an ancestor owner), and blocked
|
|
10
|
-
* (403 `workspace/inherit-enforced`) when the project enforces its default.
|
|
11
|
-
* The actor is the bearer-token user — no `userId` is sent.
|
|
12
|
-
*/
|
|
13
|
-
export declare function updateWorkspaceInheritFlag(client: SublayHttpClient, data: UpdateWorkspaceInheritFlagProps): Promise<Workspace>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { WorkspaceCapability, WorkspaceMember } from "../../interfaces/Workspace";
|
|
3
|
-
export interface UpdateWorkspaceMemberProps {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
targetUserId: string;
|
|
6
|
-
capabilities?: WorkspaceCapability[];
|
|
7
|
-
permissions?: string[];
|
|
8
|
-
rank?: number;
|
|
9
|
-
title?: string | null;
|
|
10
|
-
metadata?: Record<string, any>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Edit a member's grant / profile. Powerful fields need `edit-member-access`
|
|
14
|
-
* plus rank + no-escalation rules; cosmetic fields need only
|
|
15
|
-
* `edit-member-profile`. No `userId` is sent — the actor comes from the token.
|
|
16
|
-
*/
|
|
17
|
-
export declare function updateWorkspaceMember(client: SublayHttpClient, data: UpdateWorkspaceMemberProps): Promise<WorkspaceMember>;
|