@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.
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 +3 -3
  7. package/dist/index.mjs +3 -3
  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,9 +0,0 @@
1
- export { find } from "./find";
2
- export { findOne } from "./findOne";
3
- export { create } from "./create";
4
- export { bulkCreate } from "./bulkCreate";
5
- export { update } from "./update";
6
- export { deleteRow } from "./deleteRow";
7
- export { bulkDelete } from "./bulkDelete";
8
- export { restore } from "./restore";
9
- export { createTableAccessor } from "./createTableAccessor";
@@ -1,6 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { TableRow } from "../../interfaces/Table";
3
- /**
4
- * POST /db/:tableName/:rowId/restore — clear `deletedAt` on a paranoid table.
5
- */
6
- export declare function restore<T = TableRow>(client: SublayHttpClient, tableName: string, rowId: string): Promise<T>;
@@ -1,4 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { TableRow } from "../../interfaces/Table";
3
- /** PATCH /db/:tableName/:rowId — update a row (server bumps updatedAt). */
4
- export declare function update<T = TableRow>(client: SublayHttpClient, tableName: string, rowId: string, data: Partial<T> | Record<string, unknown>): Promise<T>;
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface CheckUsernameAvailabilityProps {
3
- username: string;
4
- }
5
- export interface CheckUsernameAvailabilityResponse {
6
- available: boolean;
7
- }
8
- export declare function checkUsernameAvailability(client: SublayHttpClient, data: CheckUsernameAvailabilityProps): Promise<CheckUsernameAvailabilityResponse>;
@@ -1,19 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface CreateBlockProps {
3
- /** The user being blocked (the target). The blocker is the token holder. */
4
- userId: string;
5
- }
6
- export interface BlockResponse {
7
- id: string;
8
- blockerId: string;
9
- blockedId: string;
10
- createdAt: string;
11
- }
12
- /**
13
- * POST /users/:userId/block — block `:userId`.
14
- *
15
- * The blocker is derived from the token (Rule A — no `actingUserId`). Idempotent:
16
- * re-blocking an already-blocked user succeeds. Self-block is rejected server-side.
17
- * On a new block the server tears down existing follows/connections both ways.
18
- */
19
- export declare function createBlock(client: SublayHttpClient, data: CreateBlockProps): Promise<BlockResponse>;
@@ -1,7 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Follow } from "../../interfaces/Follow";
3
- export interface CreateFollowProps {
4
- /** The user being followed (the target). The follower is the token holder. */
5
- userId: string;
6
- }
7
- export declare function createFollow(client: SublayHttpClient, data: CreateFollowProps): Promise<Follow>;
@@ -1,13 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface DeleteBlockProps {
3
- /** The user being unblocked (the target). The blocker is the token holder. */
4
- userId: string;
5
- }
6
- /**
7
- * DELETE /users/:userId/block — unblock `:userId`.
8
- *
9
- * The blocker is derived from the token (Rule A — no `actingUserId`). Idempotent:
10
- * unblocking a user who isn't blocked succeeds. Restores nothing (torn-down
11
- * follows/connections are gone for good).
12
- */
13
- export declare function deleteBlock(client: SublayHttpClient, data: DeleteBlockProps): Promise<void>;
@@ -1,6 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface DeleteFollowProps {
3
- /** The user being unfollowed (the target). The follower is the token holder. */
4
- userId: string;
5
- }
6
- export declare function deleteFollow(client: SublayHttpClient, data: DeleteFollowProps): Promise<void>;
@@ -1,23 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface FetchBlockStatusProps {
3
- /**
4
- * The user whose block status is being checked (the target). The status is the
5
- * token holder's OUTBOUND state only: do *I* block `:userId`?
6
- */
7
- userId: string;
8
- }
9
- /**
10
- * The block-status response is outbound-only by design: it reports whether the
11
- * token holder blocks the target, and NEVER whether the target blocked the
12
- * caller (the inbound direction is deliberately not disclosed).
13
- */
14
- export interface BlockStatusResponse {
15
- blocked: boolean;
16
- blockId?: string;
17
- createdAt?: string;
18
- }
19
- /**
20
- * GET /users/:userId/block — the token holder's outbound block status toward
21
- * `:userId` (Rule A — no `actingUserId`).
22
- */
23
- export declare function fetchBlockStatus(client: SublayHttpClient, data: FetchBlockStatusProps): Promise<BlockStatusResponse>;
@@ -1,19 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { User } from "../../interfaces/User";
3
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
4
- export interface FetchBlockedUsersProps {
5
- page?: number;
6
- limit?: number;
7
- }
8
- /** An entry in the token holder's own block list (their outbound blocks). */
9
- export interface BlockedUserListItem {
10
- id: string;
11
- blockedUser: User | null;
12
- createdAt: string;
13
- }
14
- /**
15
- * GET /blocks — the token holder's own block list (their outbound blocks),
16
- * paginated. This is the private "manage / way back to unblock" surface (Rule A
17
- * — the subject is derived from the token, no `actingUserId`).
18
- */
19
- export declare function fetchBlockedUsers(client: SublayHttpClient, data?: FetchBlockedUsersProps): Promise<PaginatedResponse<BlockedUserListItem>>;
@@ -1,10 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { ConnectionStatusResponse } from "../../interfaces/Connection";
3
- export interface FetchConnectionStatusProps {
4
- /**
5
- * The other user in the connection (the target). The status is from the
6
- * perspective of the token holder.
7
- */
8
- userId: string;
9
- }
10
- export declare function fetchConnectionStatus(client: SublayHttpClient, data: FetchConnectionStatusProps): Promise<ConnectionStatusResponse>;
@@ -1,11 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { EstablishedConnection } from "../../interfaces/Connection";
3
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
4
- import { SpaceReputationUserParams } from "../../interfaces/SpaceReputation";
5
- import { UserSearchParams } from "../../interfaces/UserSearch";
6
- export interface FetchConnectionsByUserIdProps extends SpaceReputationUserParams, UserSearchParams {
7
- userId: string;
8
- page?: number;
9
- limit?: number;
10
- }
11
- export declare function fetchConnectionsByUserId(client: SublayHttpClient, data: FetchConnectionsByUserIdProps): Promise<PaginatedResponse<EstablishedConnection>>;
@@ -1,6 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { ConnectionCountResponse } from "../../interfaces/Connection";
3
- export interface FetchConnectionsCountByUserIdProps {
4
- userId: string;
5
- }
6
- export declare function fetchConnectionsCountByUserId(client: SublayHttpClient, data: FetchConnectionsCountByUserIdProps): Promise<ConnectionCountResponse>;
@@ -1,14 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface FetchFollowStatusProps {
3
- /**
4
- * The user whose follow relationship is being checked (the target). The
5
- * status is from the perspective of the token holder.
6
- */
7
- userId: string;
8
- }
9
- export interface FollowStatusResponse {
10
- isFollowing: boolean;
11
- followId?: string;
12
- followedAt?: string;
13
- }
14
- export declare function fetchFollowStatus(client: SublayHttpClient, data: FetchFollowStatusProps): Promise<FollowStatusResponse>;
@@ -1,11 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { FollowListItem } from "../../interfaces/Follow";
3
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
4
- import { SpaceReputationUserParams } from "../../interfaces/SpaceReputation";
5
- import { UserSearchParams } from "../../interfaces/UserSearch";
6
- export interface FetchFollowersByUserIdProps extends SpaceReputationUserParams, UserSearchParams {
7
- userId: string;
8
- page?: number;
9
- limit?: number;
10
- }
11
- export declare function fetchFollowersByUserId(client: SublayHttpClient, data: FetchFollowersByUserIdProps): Promise<PaginatedResponse<FollowListItem>>;
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface FetchFollowersCountByUserIdProps {
3
- userId: string;
4
- }
5
- export interface FollowersCountResponse {
6
- count: number;
7
- }
8
- export declare function fetchFollowersCountByUserId(client: SublayHttpClient, data: FetchFollowersCountByUserIdProps): Promise<FollowersCountResponse>;
@@ -1,11 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { FollowListItem } from "../../interfaces/Follow";
3
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
4
- import { SpaceReputationUserParams } from "../../interfaces/SpaceReputation";
5
- import { UserSearchParams } from "../../interfaces/UserSearch";
6
- export interface FetchFollowingByUserIdProps extends SpaceReputationUserParams, UserSearchParams {
7
- userId: string;
8
- page?: number;
9
- limit?: number;
10
- }
11
- export declare function fetchFollowingByUserId(client: SublayHttpClient, data: FetchFollowingByUserIdProps): Promise<PaginatedResponse<FollowListItem>>;
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface FetchFollowingCountByUserIdProps {
3
- userId: string;
4
- }
5
- export interface FollowingCountResponse {
6
- count: number;
7
- }
8
- export declare function fetchFollowingCountByUserId(client: SublayHttpClient, data: FetchFollowingCountByUserIdProps): Promise<FollowingCountResponse>;
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { User } from "../../interfaces/User";
3
- import { SpaceReputationUserParams } from "../../interfaces/SpaceReputation";
4
- export interface FetchUserByForeignIdProps extends SpaceReputationUserParams {
5
- foreignId: string;
6
- include?: string;
7
- }
8
- export declare function fetchUserByForeignId(client: SublayHttpClient, data: FetchUserByForeignIdProps): Promise<User>;
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { User } from "../../interfaces/User";
3
- import { SpaceReputationUserParams } from "../../interfaces/SpaceReputation";
4
- export interface FetchUserByIdProps extends SpaceReputationUserParams {
5
- userId: string;
6
- include?: string;
7
- }
8
- export declare function fetchUserById(client: SublayHttpClient, data: FetchUserByIdProps): Promise<User>;
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { User } from "../../interfaces/User";
3
- import { SpaceReputationUserParams } from "../../interfaces/SpaceReputation";
4
- export interface FetchUserByUsernameProps extends SpaceReputationUserParams {
5
- username: string;
6
- include?: string;
7
- }
8
- export declare function fetchUserByUsername(client: SublayHttpClient, data: FetchUserByUsernameProps): Promise<User>;
@@ -1,7 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { User } from "../../interfaces/User";
3
- import { SpaceReputationUserParams } from "../../interfaces/SpaceReputation";
4
- export interface FetchUserSuggestionsProps extends SpaceReputationUserParams {
5
- query: string;
6
- }
7
- export declare function fetchUserSuggestions(client: SublayHttpClient, data: FetchUserSuggestionsProps): Promise<User[]>;
@@ -1,22 +0,0 @@
1
- export { fetchUserById } from "./fetchUserById";
2
- export { fetchUserByForeignId } from "./fetchUserByForeignId";
3
- export { fetchUserByUsername } from "./fetchUserByUsername";
4
- export { fetchUserSuggestions } from "./fetchUserSuggestions";
5
- export { checkUsernameAvailability } from "./checkUsernameAvailability";
6
- export { updateUser } from "./updateUser";
7
- export { fetchFollowersByUserId } from "./fetchFollowersByUserId";
8
- export { fetchFollowersCountByUserId } from "./fetchFollowersCountByUserId";
9
- export { fetchFollowingByUserId } from "./fetchFollowingByUserId";
10
- export { fetchFollowingCountByUserId } from "./fetchFollowingCountByUserId";
11
- export { fetchConnectionsByUserId } from "./fetchConnectionsByUserId";
12
- export { fetchConnectionsCountByUserId } from "./fetchConnectionsCountByUserId";
13
- export { createFollow } from "./createFollow";
14
- export { deleteFollow } from "./deleteFollow";
15
- export { fetchFollowStatus } from "./fetchFollowStatus";
16
- export { requestConnection } from "./requestConnection";
17
- export { fetchConnectionStatus } from "./fetchConnectionStatus";
18
- export { removeConnectionByUserId } from "./removeConnectionByUserId";
19
- export { createBlock } from "./createBlock";
20
- export { deleteBlock } from "./deleteBlock";
21
- export { fetchBlockStatus } from "./fetchBlockStatus";
22
- export { fetchBlockedUsers } from "./fetchBlockedUsers";
@@ -1,10 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { RemoveConnectionByUserIdResponse } from "../../interfaces/Connection";
3
- export interface RemoveConnectionByUserIdProps {
4
- /**
5
- * The other user in the connection (the target). The token holder is the
6
- * user withdrawing/declining/disconnecting.
7
- */
8
- userId: string;
9
- }
10
- export declare function removeConnectionByUserId(client: SublayHttpClient, data: RemoveConnectionByUserIdProps): Promise<RemoveConnectionByUserIdResponse>;
@@ -1,11 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { ConnectionRequestResponse } from "../../interfaces/Connection";
3
- export interface RequestConnectionProps {
4
- /**
5
- * The user the connection is requested with (the target). The requester is
6
- * the token holder.
7
- */
8
- userId: string;
9
- message?: string;
10
- }
11
- export declare function requestConnection(client: SublayHttpClient, data: RequestConnectionProps): Promise<ConnectionRequestResponse>;
@@ -1,32 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { AuthUser } from "../../interfaces/User";
3
- import { ImageOptions } from "../../interfaces/ImageProcessing";
4
- /** A file plus the image-processing options the server requires alongside it. */
5
- export interface UserImageUpload {
6
- file: Blob | File;
7
- /** Image-processing config (must include `mode`) — see {@link ImageOptions}. */
8
- options: ImageOptions;
9
- }
10
- export interface UpdateUserProps {
11
- /** The user to update (the target). A user token may only update itself. */
12
- userId: string;
13
- name?: string;
14
- username?: string;
15
- avatar?: string;
16
- bio?: string;
17
- birthdate?: string;
18
- location?: {
19
- latitude: number;
20
- longitude: number;
21
- } | null;
22
- metadata?: Record<string, any>;
23
- secureMetadata?: Record<string, any>;
24
- /**
25
- * New avatar image. When present the request is sent as `multipart/form-data`.
26
- * The server processes the image per `options` and replaces the old avatar.
27
- */
28
- avatarFile?: UserImageUpload;
29
- /** New banner image; same contract as {@link UpdateUserProps.avatarFile}. */
30
- bannerFile?: UserImageUpload;
31
- }
32
- export declare function updateUser(client: SublayHttpClient, data: UpdateUserProps): Promise<AuthUser>;
@@ -1,13 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface AcceptInviteProps {
3
- inviteId: string;
4
- }
5
- export interface AcceptInviteResponse {
6
- success: boolean;
7
- workspaceId: string;
8
- }
9
- /**
10
- * Accept an invitation — identity-matched to the bearer-token user + verified
11
- * email required. Non-secret id. Idempotent when already a member/owner.
12
- */
13
- export declare function acceptInvite(client: SublayHttpClient, data: AcceptInviteProps): Promise<AcceptInviteResponse>;
@@ -1,13 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface AcceptWorkspaceInviteProps {
3
- inviteId: string;
4
- }
5
- export interface AcceptWorkspaceInviteResponse {
6
- success: boolean;
7
- workspaceId: string;
8
- }
9
- /**
10
- * Accept an invitation — identity-matched to the bearer-token user + verified
11
- * email required. Non-secret id. Idempotent when already a member/owner.
12
- */
13
- export declare function acceptWorkspaceInvite(client: SublayHttpClient, data: AcceptWorkspaceInviteProps): Promise<AcceptWorkspaceInviteResponse>;
@@ -1,17 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { WorkspaceCapability, WorkspaceInvitation } from "../../interfaces/Workspace";
3
- export interface CreateInviteProps {
4
- workspaceId: string;
5
- email?: string;
6
- userId?: string;
7
- username?: string;
8
- capabilities?: WorkspaceCapability[];
9
- permissions?: string[];
10
- rank: number;
11
- title?: string | null;
12
- }
13
- /**
14
- * Create an invitation (requires the `invite` capability on the workspace). The
15
- * inviter is the bearer-token user.
16
- */
17
- export declare function createInvite(client: SublayHttpClient, data: CreateInviteProps): Promise<WorkspaceInvitation>;
@@ -1,12 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Workspace } from "../../interfaces/Workspace";
3
- export interface CreateWorkspaceProps {
4
- name: string;
5
- metadata?: Record<string, any>;
6
- parentWorkspaceId?: string | null;
7
- }
8
- /**
9
- * Create a root or child workspace. The creator (the bearer-token user) becomes
10
- * the owner. Root creation requires a verified email.
11
- */
12
- export declare function createWorkspace(client: SublayHttpClient, data: CreateWorkspaceProps): Promise<Workspace>;
@@ -1,66 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { WorkspaceCapability, WorkspaceInvitation } from "../../interfaces/Workspace";
3
- export interface CreateWorkspaceInviteProps {
4
- workspaceId: string;
5
- email?: string;
6
- userId?: string;
7
- username?: string;
8
- capabilities?: WorkspaceCapability[];
9
- permissions?: string[];
10
- /**
11
- * The invited rank, ABSOLUTE — a position on this workspace's ladder (smaller
12
- * = more senior). The escape hatch, and what tier-constant apps want, since
13
- * they compute the number anyway.
14
- *
15
- * Optional, and mutually exclusive with `relativeRank` — sending both is a
16
- * 400. Sending NEITHER defaults to `relativeRank: 1`, one rung below the
17
- * inviter, which is well defined for every actor and can never fail the rank
18
- * floor.
19
- *
20
- * ⚠️ That default is for a NEW invitation. Re-inviting a target who already
21
- * has a live pending invite updates it in place, and there omitting both rank
22
- * fields PRESERVES the stored rank instead of re-defaulting it. See the
23
- * function doc below.
24
- */
25
- rank?: number;
26
- /**
27
- * The invited rank, RELATIVE to the inviter: `1` = one rung below me, `2` =
28
- * two rungs below, and so on. The documented happy path — every governance
29
- * rule about rank is relative, so this is what callers usually mean.
30
- *
31
- * Must be `>= 1` on a write. `0` would mean "a peer", which the assign rule
32
- * forbids (you cannot clone your own authority), and a negative offset would
33
- * mint someone senior to you; both are 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.
34
- *
35
- * The anchor is the inviter's OWN rank if they hold a member row on this
36
- * workspace, and apex (one step above rank 0) if they do not — so an owner's
37
- * `relativeRank: 1` lands on rank 0, while a rank-3 member's lands on rank 4.
38
- *
39
- * ⚠️ A SNAPSHOT, not a live link: the offset is resolved to an absolute rank
40
- * once, at invite time, and frozen. It does not track the inviter's later
41
- * promotions or demotions.
42
- */
43
- relativeRank?: number;
44
- title?: string | null;
45
- }
46
- /**
47
- * Create an invitation (requires the `invite` capability on the workspace). The
48
- * inviter is the bearer-token user.
49
- *
50
- * The invited rank comes in either coordinate — `rank` (absolute) or
51
- * `relativeRank` (an offset from the inviter) — never both. Omitting both
52
- * defaults to `relativeRank: 1`, one rung below the inviter, which is the
53
- * documented happy path and can never fail the rank floor.
54
- *
55
- * ⚠️ This route doubles as an UPSERT, and the default above applies only to a
56
- * NEW invitation. Re-inviting a target who already holds a live pending invite
57
- * refreshes THAT invitation in place — same id, expiry reset — and on that
58
- * branch an omitted grant field is PRESERVED, not re-defaulted or blanked:
59
- * `rank`, `capabilities`, `permissions` and `title` all keep their stored
60
- * values. A "Resend invitation" button that posts only the address therefore
61
- * cannot silently re-rank the invitee to one below whoever clicked it. An
62
- * explicit value still overwrites, and an explicit `relativeRank` re-resolves
63
- * against the CURRENT caller. Full semantics:
64
- * https://docs.sublay.io/api-reference/workspaces/invitations/create-invite
65
- */
66
- export declare function createWorkspaceInvite(client: SublayHttpClient, data: CreateWorkspaceInviteProps): Promise<WorkspaceInvitation>;
@@ -1,12 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface DeclineInviteProps {
3
- inviteId: string;
4
- }
5
- export interface DeclineInviteResponse {
6
- success: boolean;
7
- }
8
- /**
9
- * Decline an invitation — identity-matched to the bearer-token user (not
10
- * verification-gated).
11
- */
12
- export declare function declineInvite(client: SublayHttpClient, data: DeclineInviteProps): Promise<DeclineInviteResponse>;
@@ -1,14 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface DeclineWorkspaceInviteProps {
3
- inviteId: string;
4
- }
5
- export interface DeclineWorkspaceInviteResponse {
6
- success: boolean;
7
- }
8
- /**
9
- * Decline an invitation — identity-matched to the bearer-token user, and
10
- * verified-email-gated (the same gate as accept, so an unverified squatter on
11
- * someone else's address cannot burn their invite). An unverified decline
12
- * returns `403 workspace/email-not-verified`.
13
- */
14
- export declare function declineWorkspaceInvite(client: SublayHttpClient, data: DeclineWorkspaceInviteProps): Promise<DeclineWorkspaceInviteResponse>;
@@ -1,13 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface DeleteWorkspaceProps {
3
- workspaceId: string;
4
- }
5
- export interface DeleteWorkspaceResponse {
6
- message: string;
7
- }
8
- /**
9
- * Owner-only delete (own owner or an ancestor owner). Cascades the whole
10
- * subtree transactionally. The actor is the bearer-token user — no actor
11
- * field is sent.
12
- */
13
- export declare function deleteWorkspace(client: SublayHttpClient, data: DeleteWorkspaceProps): Promise<DeleteWorkspaceResponse>;
@@ -1,17 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Workspace } from "../../interfaces/Workspace";
3
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
4
- export interface FetchManyWorkspacesProps {
5
- page?: number;
6
- limit?: number;
7
- include?: string;
8
- }
9
- /**
10
- * List the bearer-token user's direct-membership + owned workspaces. The actor
11
- * is derived from the token — no actor field is sent.
12
- *
13
- * ⚠️ Only the fields declared above are accepted. The workspaces endpoints
14
- * refuse any undeclared top-level field with a 400 rather than ignoring it, so
15
- * do not spread an unrelated object into `data`.
16
- */
17
- export declare function fetchManyWorkspaces(client: SublayHttpClient, data?: FetchManyWorkspacesProps): Promise<PaginatedResponse<Workspace>>;
@@ -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,16 +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
- * ⚠️ No `relativeRank` on this read. It is an offset from the caller, and here
12
- * the caller IS the subject — so it could only ever be `0`. `rank` is the only
13
- * rank coordinate this endpoint exposes. `relativeRank` is meaningful on the
14
- * roster and member-standing reads, where the subject is somebody else.
15
- */
16
- 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>;