@sublay/js 7.9.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.
Files changed (272) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +9 -0
  3. package/README.md +23 -14
  4. package/dist/index.d.mts +38 -7
  5. package/dist/index.d.ts +4363 -35
  6. package/dist/index.js +1 -1
  7. package/dist/index.mjs +1 -1
  8. package/package.json +29 -18
  9. package/dist/core/client.d.ts +0 -64
  10. package/dist/core/multipart.d.ts +0 -22
  11. package/dist/core/spaceReputationParams.d.ts +0 -57
  12. package/dist/interfaces/AppNotification.d.ts +0 -258
  13. package/dist/interfaces/ChatMessage.d.ts +0 -40
  14. package/dist/interfaces/Collection.d.ts +0 -10
  15. package/dist/interfaces/Comment.d.ts +0 -50
  16. package/dist/interfaces/Connection.d.ts +0 -67
  17. package/dist/interfaces/Conversation.d.ts +0 -27
  18. package/dist/interfaces/ConversationMember.d.ts +0 -17
  19. package/dist/interfaces/Entity.d.ts +0 -63
  20. package/dist/interfaces/Event.d.ts +0 -66
  21. package/dist/interfaces/File.d.ts +0 -39
  22. package/dist/interfaces/Follow.d.ts +0 -19
  23. package/dist/interfaces/HostedApp.d.ts +0 -11
  24. package/dist/interfaces/IPaginatedResponse.d.ts +0 -11
  25. package/dist/interfaces/ImageProcessing.d.ts +0 -62
  26. package/dist/interfaces/Mention.d.ts +0 -12
  27. package/dist/interfaces/OAuthIdentity.d.ts +0 -14
  28. package/dist/interfaces/Project.d.ts +0 -14
  29. package/dist/interfaces/Push.d.ts +0 -74
  30. package/dist/interfaces/Reaction.d.ts +0 -23
  31. package/dist/interfaces/Report.d.ts +0 -38
  32. package/dist/interfaces/ReputationGrant.d.ts +0 -85
  33. package/dist/interfaces/Rule.d.ts +0 -22
  34. package/dist/interfaces/Space.d.ts +0 -130
  35. package/dist/interfaces/SpaceMember.d.ts +0 -29
  36. package/dist/interfaces/SpaceReputation.d.ts +0 -100
  37. package/dist/interfaces/Table.d.ts +0 -63
  38. package/dist/interfaces/User.d.ts +0 -46
  39. package/dist/interfaces/UserSearch.d.ts +0 -13
  40. package/dist/interfaces/Workspace.d.ts +0 -178
  41. package/dist/modules/app-notifications/countUnreadNotifications.d.ts +0 -2
  42. package/dist/modules/app-notifications/fetchNotifications.d.ts +0 -8
  43. package/dist/modules/app-notifications/index.d.ts +0 -4
  44. package/dist/modules/app-notifications/markAllNotificationsAsRead.d.ts +0 -5
  45. package/dist/modules/app-notifications/markNotificationAsRead.d.ts +0 -5
  46. package/dist/modules/auth/changePassword.d.ts +0 -34
  47. package/dist/modules/auth/confirmAccountDeletion.d.ts +0 -11
  48. package/dist/modules/auth/index.d.ts +0 -13
  49. package/dist/modules/auth/requestAccountDeletion.d.ts +0 -14
  50. package/dist/modules/auth/requestNewAccessToken.d.ts +0 -16
  51. package/dist/modules/auth/requestPasswordReset.d.ts +0 -5
  52. package/dist/modules/auth/resetPassword.d.ts +0 -6
  53. package/dist/modules/auth/sendVerificationEmail.d.ts +0 -13
  54. package/dist/modules/auth/setPassword.d.ts +0 -9
  55. package/dist/modules/auth/signIn.d.ts +0 -12
  56. package/dist/modules/auth/signOut.d.ts +0 -103
  57. package/dist/modules/auth/signUp.d.ts +0 -24
  58. package/dist/modules/auth/verifyEmail.d.ts +0 -5
  59. package/dist/modules/auth/verifyExternalUser.d.ts +0 -11
  60. package/dist/modules/chat/addMember.d.ts +0 -8
  61. package/dist/modules/chat/changeMemberRole.d.ts +0 -9
  62. package/dist/modules/chat/createDirectConversation.d.ts +0 -7
  63. package/dist/modules/chat/createGroupConversation.d.ts +0 -10
  64. package/dist/modules/chat/deleteConversation.d.ts +0 -8
  65. package/dist/modules/chat/deleteMessage.d.ts +0 -11
  66. package/dist/modules/chat/editMessage.d.ts +0 -14
  67. package/dist/modules/chat/getConversation.d.ts +0 -6
  68. package/dist/modules/chat/getMessage.d.ts +0 -13
  69. package/dist/modules/chat/getUnreadCount.d.ts +0 -6
  70. package/dist/modules/chat/index.d.ts +0 -21
  71. package/dist/modules/chat/leaveConversation.d.ts +0 -7
  72. package/dist/modules/chat/listConversations.d.ts +0 -17
  73. package/dist/modules/chat/listMembers.d.ts +0 -11
  74. package/dist/modules/chat/listMessages.d.ts +0 -44
  75. package/dist/modules/chat/listReactions.d.ts +0 -24
  76. package/dist/modules/chat/markAsRead.d.ts +0 -9
  77. package/dist/modules/chat/muteConversation.d.ts +0 -23
  78. package/dist/modules/chat/removeMember.d.ts +0 -9
  79. package/dist/modules/chat/reportMessage.d.ts +0 -12
  80. package/dist/modules/chat/sendMessage.d.ts +0 -22
  81. package/dist/modules/chat/toggleReaction.d.ts +0 -16
  82. package/dist/modules/chat/updateConversation.d.ts +0 -12
  83. package/dist/modules/collections/addEntityToCollection.d.ts +0 -13
  84. package/dist/modules/collections/createNewCollection.d.ts +0 -8
  85. package/dist/modules/collections/deleteCollection.d.ts +0 -5
  86. package/dist/modules/collections/fetchCollectionEntities.d.ts +0 -13
  87. package/dist/modules/collections/fetchRootCollection.d.ts +0 -3
  88. package/dist/modules/collections/fetchSubCollections.d.ts +0 -6
  89. package/dist/modules/collections/index.d.ts +0 -8
  90. package/dist/modules/collections/removeEntityFromCollection.d.ts +0 -7
  91. package/dist/modules/collections/updateCollection.d.ts +0 -7
  92. package/dist/modules/comments/addReaction.d.ts +0 -8
  93. package/dist/modules/comments/createComment.d.ts +0 -15
  94. package/dist/modules/comments/deleteComment.d.ts +0 -5
  95. package/dist/modules/comments/fetchComment.d.ts +0 -8
  96. package/dist/modules/comments/fetchCommentByForeignId.d.ts +0 -7
  97. package/dist/modules/comments/fetchManyComments.d.ts +0 -26
  98. package/dist/modules/comments/fetchReactions.d.ts +0 -16
  99. package/dist/modules/comments/getUserReaction.d.ts +0 -9
  100. package/dist/modules/comments/index.d.ts +0 -10
  101. package/dist/modules/comments/removeReaction.d.ts +0 -6
  102. package/dist/modules/comments/updateComment.d.ts +0 -10
  103. package/dist/modules/connections/acceptConnection.d.ts +0 -6
  104. package/dist/modules/connections/declineConnection.d.ts +0 -6
  105. package/dist/modules/connections/fetchConnections.d.ts +0 -9
  106. package/dist/modules/connections/fetchConnectionsCount.d.ts +0 -3
  107. package/dist/modules/connections/fetchReceivedPendingConnections.d.ts +0 -8
  108. package/dist/modules/connections/fetchSentPendingConnections.d.ts +0 -8
  109. package/dist/modules/connections/index.d.ts +0 -7
  110. package/dist/modules/connections/removeConnection.d.ts +0 -5
  111. package/dist/modules/entities/addReaction.d.ts +0 -8
  112. package/dist/modules/entities/createEntity.d.ts +0 -23
  113. package/dist/modules/entities/deleteEntity.d.ts +0 -5
  114. package/dist/modules/entities/fetchDrafts.d.ts +0 -11
  115. package/dist/modules/entities/fetchEntity.d.ts +0 -8
  116. package/dist/modules/entities/fetchEntityByForeignId.d.ts +0 -8
  117. package/dist/modules/entities/fetchEntityByShortId.d.ts +0 -7
  118. package/dist/modules/entities/fetchManyEntities.d.ts +0 -65
  119. package/dist/modules/entities/fetchReactions.d.ts +0 -16
  120. package/dist/modules/entities/fetchTopComment.d.ts +0 -6
  121. package/dist/modules/entities/getUserReaction.d.ts +0 -9
  122. package/dist/modules/entities/index.d.ts +0 -15
  123. package/dist/modules/entities/isEntitySaved.d.ts +0 -12
  124. package/dist/modules/entities/publishDraft.d.ts +0 -6
  125. package/dist/modules/entities/removeReaction.d.ts +0 -6
  126. package/dist/modules/entities/updateEntity.d.ts +0 -18
  127. package/dist/modules/events/addHost.d.ts +0 -8
  128. package/dist/modules/events/addInvite.d.ts +0 -8
  129. package/dist/modules/events/cancelEvent.d.ts +0 -6
  130. package/dist/modules/events/createEvent.d.ts +0 -49
  131. package/dist/modules/events/deleteEvent.d.ts +0 -5
  132. package/dist/modules/events/fetchEvent.d.ts +0 -8
  133. package/dist/modules/events/fetchEventRsvps.d.ts +0 -19
  134. package/dist/modules/events/fetchInvitees.d.ts +0 -12
  135. package/dist/modules/events/fetchManyEvents.d.ts +0 -42
  136. package/dist/modules/events/index.d.ts +0 -14
  137. package/dist/modules/events/removeHost.d.ts +0 -8
  138. package/dist/modules/events/removeInvite.d.ts +0 -8
  139. package/dist/modules/events/setRsvp.d.ts +0 -7
  140. package/dist/modules/events/updateEvent.d.ts +0 -43
  141. package/dist/modules/events/withdrawRsvp.d.ts +0 -6
  142. package/dist/modules/follows/deleteFollow.d.ts +0 -5
  143. package/dist/modules/follows/fetchFollowers.d.ts +0 -9
  144. package/dist/modules/follows/fetchFollowersCount.d.ts +0 -5
  145. package/dist/modules/follows/fetchFollowing.d.ts +0 -9
  146. package/dist/modules/follows/fetchFollowingCount.d.ts +0 -5
  147. package/dist/modules/follows/index.d.ts +0 -5
  148. package/dist/modules/oauth/authorize.d.ts +0 -25
  149. package/dist/modules/oauth/index.d.ts +0 -4
  150. package/dist/modules/oauth/linkIdentity.d.ts +0 -14
  151. package/dist/modules/oauth/listIdentities.d.ts +0 -4
  152. package/dist/modules/oauth/unlinkIdentity.d.ts +0 -12
  153. package/dist/modules/push/getNotificationPreferences.d.ts +0 -11
  154. package/dist/modules/push/index.d.ts +0 -2
  155. package/dist/modules/push/updateNotificationPreferences.d.ts +0 -16
  156. package/dist/modules/reports/createReport.d.ts +0 -9
  157. package/dist/modules/reports/fetchModeratedReports.d.ts +0 -13
  158. package/dist/modules/reports/index.d.ts +0 -2
  159. package/dist/modules/reputation/createGrant.d.ts +0 -45
  160. package/dist/modules/reputation/index.d.ts +0 -2
  161. package/dist/modules/reputation/listGrants.d.ts +0 -45
  162. package/dist/modules/search/askContent.d.ts +0 -58
  163. package/dist/modules/search/index.d.ts +0 -5
  164. package/dist/modules/search/matchUsers.d.ts +0 -36
  165. package/dist/modules/search/searchContent.d.ts +0 -24
  166. package/dist/modules/search/searchSpaces.d.ts +0 -11
  167. package/dist/modules/search/searchUsers.d.ts +0 -11
  168. package/dist/modules/spaces/approveMembership.d.ts +0 -7
  169. package/dist/modules/spaces/banMember.d.ts +0 -13
  170. package/dist/modules/spaces/checkMyMembership.d.ts +0 -6
  171. package/dist/modules/spaces/checkSlugAvailability.d.ts +0 -8
  172. package/dist/modules/spaces/createRule.d.ts +0 -8
  173. package/dist/modules/spaces/createSpace.d.ts +0 -29
  174. package/dist/modules/spaces/declineMembership.d.ts +0 -7
  175. package/dist/modules/spaces/deleteRule.d.ts +0 -7
  176. package/dist/modules/spaces/deleteSpace.d.ts +0 -6
  177. package/dist/modules/spaces/fetchChildSpaces.d.ts +0 -11
  178. package/dist/modules/spaces/fetchDigestConfig.d.ts +0 -6
  179. package/dist/modules/spaces/fetchManyRules.d.ts +0 -6
  180. package/dist/modules/spaces/fetchManySpaces.d.ts +0 -17
  181. package/dist/modules/spaces/fetchMutualSpaces.d.ts +0 -11
  182. package/dist/modules/spaces/fetchRule.d.ts +0 -7
  183. package/dist/modules/spaces/fetchSpace.d.ts +0 -6
  184. package/dist/modules/spaces/fetchSpaceBreadcrumb.d.ts +0 -6
  185. package/dist/modules/spaces/fetchSpaceByShortId.d.ts +0 -6
  186. package/dist/modules/spaces/fetchSpaceBySlug.d.ts +0 -6
  187. package/dist/modules/spaces/fetchSpaceMembers.d.ts +0 -11
  188. package/dist/modules/spaces/fetchSpaceTeam.d.ts +0 -7
  189. package/dist/modules/spaces/fetchUserSpaces.d.ts +0 -17
  190. package/dist/modules/spaces/getSpaceConversation.d.ts +0 -6
  191. package/dist/modules/spaces/handleCommentReport.d.ts +0 -14
  192. package/dist/modules/spaces/handleEntityReport.d.ts +0 -17
  193. package/dist/modules/spaces/handleSpaceChatReport.d.ts +0 -18
  194. package/dist/modules/spaces/index.d.ts +0 -36
  195. package/dist/modules/spaces/joinSpace.d.ts +0 -6
  196. package/dist/modules/spaces/leaveSpace.d.ts +0 -6
  197. package/dist/modules/spaces/moderateSpaceChatMessage.d.ts +0 -12
  198. package/dist/modules/spaces/moderateSpaceComment.d.ts +0 -9
  199. package/dist/modules/spaces/moderateSpaceEntity.d.ts +0 -12
  200. package/dist/modules/spaces/reorderRules.d.ts +0 -7
  201. package/dist/modules/spaces/setSpaceEntityNsfw.d.ts +0 -16
  202. package/dist/modules/spaces/unbanMember.d.ts +0 -13
  203. package/dist/modules/spaces/updateDigestConfig.d.ts +0 -11
  204. package/dist/modules/spaces/updateMemberRole.d.ts +0 -8
  205. package/dist/modules/spaces/updateRule.d.ts +0 -9
  206. package/dist/modules/spaces/updateSpace.d.ts +0 -22
  207. package/dist/modules/storage/deleteFile.d.ts +0 -5
  208. package/dist/modules/storage/getFile.d.ts +0 -34
  209. package/dist/modules/storage/index.d.ts +0 -4
  210. package/dist/modules/storage/uploadFile.d.ts +0 -30
  211. package/dist/modules/storage/uploadImage.d.ts +0 -42
  212. package/dist/modules/tables/bulkCreate.d.ts +0 -4
  213. package/dist/modules/tables/bulkDelete.d.ts +0 -7
  214. package/dist/modules/tables/create.d.ts +0 -4
  215. package/dist/modules/tables/createTableAccessor.d.ts +0 -9
  216. package/dist/modules/tables/deleteRow.d.ts +0 -9
  217. package/dist/modules/tables/find.d.ts +0 -8
  218. package/dist/modules/tables/findOne.d.ts +0 -7
  219. package/dist/modules/tables/index.d.ts +0 -9
  220. package/dist/modules/tables/restore.d.ts +0 -6
  221. package/dist/modules/tables/update.d.ts +0 -4
  222. package/dist/modules/users/checkUsernameAvailability.d.ts +0 -8
  223. package/dist/modules/users/createBlock.d.ts +0 -19
  224. package/dist/modules/users/createFollow.d.ts +0 -7
  225. package/dist/modules/users/deleteBlock.d.ts +0 -13
  226. package/dist/modules/users/deleteFollow.d.ts +0 -6
  227. package/dist/modules/users/fetchBlockStatus.d.ts +0 -23
  228. package/dist/modules/users/fetchBlockedUsers.d.ts +0 -19
  229. package/dist/modules/users/fetchConnectionStatus.d.ts +0 -10
  230. package/dist/modules/users/fetchConnectionsByUserId.d.ts +0 -11
  231. package/dist/modules/users/fetchConnectionsCountByUserId.d.ts +0 -6
  232. package/dist/modules/users/fetchFollowStatus.d.ts +0 -14
  233. package/dist/modules/users/fetchFollowersByUserId.d.ts +0 -11
  234. package/dist/modules/users/fetchFollowersCountByUserId.d.ts +0 -8
  235. package/dist/modules/users/fetchFollowingByUserId.d.ts +0 -11
  236. package/dist/modules/users/fetchFollowingCountByUserId.d.ts +0 -8
  237. package/dist/modules/users/fetchUserByForeignId.d.ts +0 -8
  238. package/dist/modules/users/fetchUserById.d.ts +0 -8
  239. package/dist/modules/users/fetchUserByUsername.d.ts +0 -8
  240. package/dist/modules/users/fetchUserSuggestions.d.ts +0 -7
  241. package/dist/modules/users/index.d.ts +0 -22
  242. package/dist/modules/users/removeConnectionByUserId.d.ts +0 -10
  243. package/dist/modules/users/requestConnection.d.ts +0 -11
  244. package/dist/modules/users/updateUser.d.ts +0 -32
  245. package/dist/modules/workspaces/acceptInvite.d.ts +0 -13
  246. package/dist/modules/workspaces/acceptWorkspaceInvite.d.ts +0 -13
  247. package/dist/modules/workspaces/createInvite.d.ts +0 -17
  248. package/dist/modules/workspaces/createWorkspace.d.ts +0 -12
  249. package/dist/modules/workspaces/createWorkspaceInvite.d.ts +0 -66
  250. package/dist/modules/workspaces/declineInvite.d.ts +0 -12
  251. package/dist/modules/workspaces/declineWorkspaceInvite.d.ts +0 -14
  252. package/dist/modules/workspaces/deleteWorkspace.d.ts +0 -13
  253. package/dist/modules/workspaces/fetchManyWorkspaces.d.ts +0 -17
  254. package/dist/modules/workspaces/fetchMembers.d.ts +0 -13
  255. package/dist/modules/workspaces/fetchMyInvites.d.ts +0 -11
  256. package/dist/modules/workspaces/fetchMyWorkspaceInvites.d.ts +0 -15
  257. package/dist/modules/workspaces/fetchWorkspace.d.ts +0 -7
  258. package/dist/modules/workspaces/fetchWorkspaceAuthority.d.ts +0 -16
  259. package/dist/modules/workspaces/fetchWorkspaceInvites.d.ts +0 -17
  260. package/dist/modules/workspaces/fetchWorkspaceMemberStanding.d.ts +0 -15
  261. package/dist/modules/workspaces/fetchWorkspaceMembers.d.ts +0 -18
  262. package/dist/modules/workspaces/getAuthority.d.ts +0 -11
  263. package/dist/modules/workspaces/index.d.ts +0 -21
  264. package/dist/modules/workspaces/leaveWorkspace.d.ts +0 -12
  265. package/dist/modules/workspaces/removeWorkspaceMember.d.ts +0 -12
  266. package/dist/modules/workspaces/removeWorkspaceMemberFromSubtree.d.ts +0 -16
  267. package/dist/modules/workspaces/resendWorkspaceInvite.d.ts +0 -12
  268. package/dist/modules/workspaces/revokeWorkspaceInvite.d.ts +0 -13
  269. package/dist/modules/workspaces/transferWorkspaceOwnership.d.ts +0 -15
  270. package/dist/modules/workspaces/updateWorkspace.d.ts +0 -12
  271. package/dist/modules/workspaces/updateWorkspaceInheritFlag.d.ts +0 -13
  272. package/dist/modules/workspaces/updateWorkspaceMember.d.ts +0 -35
@@ -1,15 +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`, `relativeRank`, `title`, `metadata`).
10
- *
11
- * `relativeRank` is the target's `rank` as an offset from YOU (negative =
12
- * senior to you), and is fenced with `rank`: both are absent, not null, for a
13
- * caller who may not see the target's authority.
14
- */
15
- export declare function fetchWorkspaceMemberStanding(client: SublayHttpClient, data: FetchWorkspaceMemberStandingProps): Promise<WorkspaceMemberStanding>;
@@ -1,18 +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
- * Same-node `member` reasons carry both rank coordinates: absolute `rank` and
14
- * `relativeRank`, the offset from you (`1` = one rung below you, `-3` = three
15
- * above). Both are fenced together and both are absent for a caller who does
16
- * not operate people here. `descendant-member` reasons carry `rank` only.
17
- */
18
- 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,12 +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 ownership or remove the
9
- * workspace first. No actor field is sent; the server derives the leaver from
10
- * the token.
11
- */
12
- 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 actor field 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 actor field 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 actor field 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 actor field is sent.
12
- */
13
- export declare function updateWorkspaceInheritFlag(client: SublayHttpClient, data: UpdateWorkspaceInheritFlagProps): Promise<Workspace>;
@@ -1,35 +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
- /**
10
- * `rank`'s relative twin: an offset from the ACTOR (`1` = one rung below me),
11
- * resolved to an absolute rank at write time and stored absolute. Must be
12
- * `>= 1`; mutually exclusive with `rank` (sending both is a 400). Both rank fields are also capped at `2147483647` (int4), and the RESOLVED sum is bounded too — an in-range anchor plus an in-range offset can still overflow, which is a 400 rather than a 500.
13
- *
14
- * The anchor is the actor's own rank if they hold a member row on this
15
- * workspace, apex otherwise. A SNAPSHOT — frozen at write time, it does not
16
- * follow the actor's own rank afterwards.
17
- *
18
- * Unlike invite, edit has NO default: omitting BOTH still means "rank
19
- * unchanged", so editing someone's capabilities never moves them on the
20
- * ladder.
21
- */
22
- relativeRank?: number;
23
- title?: string | null;
24
- metadata?: Record<string, any>;
25
- }
26
- /**
27
- * Edit a member's grant / profile. Powerful fields need `edit-member-access`
28
- * plus rank + no-escalation rules; cosmetic fields need only
29
- * `edit-member-profile`. No actor field is sent — the actor comes from the token.
30
- *
31
- * Rank moves in either coordinate — `rank` (absolute) or `relativeRank` (an
32
- * offset from the actor) — never both. Omitting both leaves rank UNCHANGED;
33
- * unlike invite, edit has no value default.
34
- */
35
- export declare function updateWorkspaceMember(client: SublayHttpClient, data: UpdateWorkspaceMemberProps): Promise<WorkspaceMember>;