@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.
Files changed (268) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +9 -0
  3. package/README.md +23 -14
  4. package/dist/index.d.mts +374 -21
  5. package/dist/index.d.ts +4364 -31
  6. package/dist/index.js +53 -19
  7. package/dist/index.mjs +53 -19
  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 -32
  14. package/dist/interfaces/Collection.d.ts +0 -10
  15. package/dist/interfaces/Comment.d.ts +0 -42
  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 -55
  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/Rule.d.ts +0 -22
  33. package/dist/interfaces/Space.d.ts +0 -130
  34. package/dist/interfaces/SpaceMember.d.ts +0 -29
  35. package/dist/interfaces/SpaceReputation.d.ts +0 -100
  36. package/dist/interfaces/Table.d.ts +0 -63
  37. package/dist/interfaces/User.d.ts +0 -46
  38. package/dist/interfaces/UserSearch.d.ts +0 -13
  39. package/dist/interfaces/Workspace.d.ts +0 -148
  40. package/dist/modules/app-notifications/countUnreadNotifications.d.ts +0 -2
  41. package/dist/modules/app-notifications/fetchNotifications.d.ts +0 -8
  42. package/dist/modules/app-notifications/index.d.ts +0 -4
  43. package/dist/modules/app-notifications/markAllNotificationsAsRead.d.ts +0 -5
  44. package/dist/modules/app-notifications/markNotificationAsRead.d.ts +0 -5
  45. package/dist/modules/auth/changePassword.d.ts +0 -34
  46. package/dist/modules/auth/confirmAccountDeletion.d.ts +0 -11
  47. package/dist/modules/auth/index.d.ts +0 -13
  48. package/dist/modules/auth/requestAccountDeletion.d.ts +0 -14
  49. package/dist/modules/auth/requestNewAccessToken.d.ts +0 -16
  50. package/dist/modules/auth/requestPasswordReset.d.ts +0 -5
  51. package/dist/modules/auth/resetPassword.d.ts +0 -6
  52. package/dist/modules/auth/sendVerificationEmail.d.ts +0 -13
  53. package/dist/modules/auth/setPassword.d.ts +0 -9
  54. package/dist/modules/auth/signIn.d.ts +0 -12
  55. package/dist/modules/auth/signOut.d.ts +0 -103
  56. package/dist/modules/auth/signUp.d.ts +0 -24
  57. package/dist/modules/auth/verifyEmail.d.ts +0 -5
  58. package/dist/modules/auth/verifyExternalUser.d.ts +0 -11
  59. package/dist/modules/chat/addMember.d.ts +0 -8
  60. package/dist/modules/chat/changeMemberRole.d.ts +0 -9
  61. package/dist/modules/chat/createDirectConversation.d.ts +0 -7
  62. package/dist/modules/chat/createGroupConversation.d.ts +0 -10
  63. package/dist/modules/chat/deleteConversation.d.ts +0 -8
  64. package/dist/modules/chat/deleteMessage.d.ts +0 -11
  65. package/dist/modules/chat/editMessage.d.ts +0 -14
  66. package/dist/modules/chat/getConversation.d.ts +0 -6
  67. package/dist/modules/chat/getMessage.d.ts +0 -8
  68. package/dist/modules/chat/getUnreadCount.d.ts +0 -6
  69. package/dist/modules/chat/index.d.ts +0 -21
  70. package/dist/modules/chat/leaveConversation.d.ts +0 -7
  71. package/dist/modules/chat/listConversations.d.ts +0 -17
  72. package/dist/modules/chat/listMembers.d.ts +0 -11
  73. package/dist/modules/chat/listMessages.d.ts +0 -40
  74. package/dist/modules/chat/listReactions.d.ts +0 -24
  75. package/dist/modules/chat/markAsRead.d.ts +0 -9
  76. package/dist/modules/chat/muteConversation.d.ts +0 -23
  77. package/dist/modules/chat/removeMember.d.ts +0 -9
  78. package/dist/modules/chat/reportMessage.d.ts +0 -12
  79. package/dist/modules/chat/sendMessage.d.ts +0 -22
  80. package/dist/modules/chat/toggleReaction.d.ts +0 -16
  81. package/dist/modules/chat/updateConversation.d.ts +0 -12
  82. package/dist/modules/collections/addEntityToCollection.d.ts +0 -13
  83. package/dist/modules/collections/createNewCollection.d.ts +0 -8
  84. package/dist/modules/collections/deleteCollection.d.ts +0 -5
  85. package/dist/modules/collections/fetchCollectionEntities.d.ts +0 -13
  86. package/dist/modules/collections/fetchRootCollection.d.ts +0 -3
  87. package/dist/modules/collections/fetchSubCollections.d.ts +0 -6
  88. package/dist/modules/collections/index.d.ts +0 -8
  89. package/dist/modules/collections/removeEntityFromCollection.d.ts +0 -7
  90. package/dist/modules/collections/updateCollection.d.ts +0 -7
  91. package/dist/modules/comments/addReaction.d.ts +0 -8
  92. package/dist/modules/comments/createComment.d.ts +0 -15
  93. package/dist/modules/comments/deleteComment.d.ts +0 -5
  94. package/dist/modules/comments/fetchComment.d.ts +0 -8
  95. package/dist/modules/comments/fetchCommentByForeignId.d.ts +0 -7
  96. package/dist/modules/comments/fetchManyComments.d.ts +0 -26
  97. package/dist/modules/comments/fetchReactions.d.ts +0 -16
  98. package/dist/modules/comments/getUserReaction.d.ts +0 -9
  99. package/dist/modules/comments/index.d.ts +0 -10
  100. package/dist/modules/comments/removeReaction.d.ts +0 -6
  101. package/dist/modules/comments/updateComment.d.ts +0 -10
  102. package/dist/modules/connections/acceptConnection.d.ts +0 -6
  103. package/dist/modules/connections/declineConnection.d.ts +0 -6
  104. package/dist/modules/connections/fetchConnections.d.ts +0 -9
  105. package/dist/modules/connections/fetchConnectionsCount.d.ts +0 -3
  106. package/dist/modules/connections/fetchReceivedPendingConnections.d.ts +0 -8
  107. package/dist/modules/connections/fetchSentPendingConnections.d.ts +0 -8
  108. package/dist/modules/connections/index.d.ts +0 -7
  109. package/dist/modules/connections/removeConnection.d.ts +0 -5
  110. package/dist/modules/entities/addReaction.d.ts +0 -8
  111. package/dist/modules/entities/createEntity.d.ts +0 -23
  112. package/dist/modules/entities/deleteEntity.d.ts +0 -5
  113. package/dist/modules/entities/fetchDrafts.d.ts +0 -11
  114. package/dist/modules/entities/fetchEntity.d.ts +0 -8
  115. package/dist/modules/entities/fetchEntityByForeignId.d.ts +0 -8
  116. package/dist/modules/entities/fetchEntityByShortId.d.ts +0 -7
  117. package/dist/modules/entities/fetchManyEntities.d.ts +0 -65
  118. package/dist/modules/entities/fetchReactions.d.ts +0 -16
  119. package/dist/modules/entities/fetchTopComment.d.ts +0 -6
  120. package/dist/modules/entities/getUserReaction.d.ts +0 -9
  121. package/dist/modules/entities/index.d.ts +0 -15
  122. package/dist/modules/entities/isEntitySaved.d.ts +0 -12
  123. package/dist/modules/entities/publishDraft.d.ts +0 -6
  124. package/dist/modules/entities/removeReaction.d.ts +0 -6
  125. package/dist/modules/entities/updateEntity.d.ts +0 -18
  126. package/dist/modules/events/addHost.d.ts +0 -8
  127. package/dist/modules/events/addInvite.d.ts +0 -8
  128. package/dist/modules/events/cancelEvent.d.ts +0 -6
  129. package/dist/modules/events/createEvent.d.ts +0 -49
  130. package/dist/modules/events/deleteEvent.d.ts +0 -5
  131. package/dist/modules/events/fetchEvent.d.ts +0 -8
  132. package/dist/modules/events/fetchEventRsvps.d.ts +0 -19
  133. package/dist/modules/events/fetchInvitees.d.ts +0 -12
  134. package/dist/modules/events/fetchManyEvents.d.ts +0 -42
  135. package/dist/modules/events/index.d.ts +0 -14
  136. package/dist/modules/events/removeHost.d.ts +0 -8
  137. package/dist/modules/events/removeInvite.d.ts +0 -8
  138. package/dist/modules/events/setRsvp.d.ts +0 -7
  139. package/dist/modules/events/updateEvent.d.ts +0 -43
  140. package/dist/modules/events/withdrawRsvp.d.ts +0 -6
  141. package/dist/modules/follows/deleteFollow.d.ts +0 -5
  142. package/dist/modules/follows/fetchFollowers.d.ts +0 -9
  143. package/dist/modules/follows/fetchFollowersCount.d.ts +0 -5
  144. package/dist/modules/follows/fetchFollowing.d.ts +0 -9
  145. package/dist/modules/follows/fetchFollowingCount.d.ts +0 -5
  146. package/dist/modules/follows/index.d.ts +0 -5
  147. package/dist/modules/oauth/authorize.d.ts +0 -25
  148. package/dist/modules/oauth/index.d.ts +0 -4
  149. package/dist/modules/oauth/linkIdentity.d.ts +0 -14
  150. package/dist/modules/oauth/listIdentities.d.ts +0 -4
  151. package/dist/modules/oauth/unlinkIdentity.d.ts +0 -12
  152. package/dist/modules/push/getNotificationPreferences.d.ts +0 -11
  153. package/dist/modules/push/index.d.ts +0 -2
  154. package/dist/modules/push/updateNotificationPreferences.d.ts +0 -16
  155. package/dist/modules/reports/createReport.d.ts +0 -9
  156. package/dist/modules/reports/fetchModeratedReports.d.ts +0 -13
  157. package/dist/modules/reports/index.d.ts +0 -2
  158. package/dist/modules/search/askContent.d.ts +0 -58
  159. package/dist/modules/search/index.d.ts +0 -5
  160. package/dist/modules/search/matchUsers.d.ts +0 -36
  161. package/dist/modules/search/searchContent.d.ts +0 -24
  162. package/dist/modules/search/searchSpaces.d.ts +0 -11
  163. package/dist/modules/search/searchUsers.d.ts +0 -11
  164. package/dist/modules/spaces/approveMembership.d.ts +0 -7
  165. package/dist/modules/spaces/banMember.d.ts +0 -13
  166. package/dist/modules/spaces/checkMyMembership.d.ts +0 -6
  167. package/dist/modules/spaces/checkSlugAvailability.d.ts +0 -8
  168. package/dist/modules/spaces/createRule.d.ts +0 -8
  169. package/dist/modules/spaces/createSpace.d.ts +0 -29
  170. package/dist/modules/spaces/declineMembership.d.ts +0 -7
  171. package/dist/modules/spaces/deleteRule.d.ts +0 -7
  172. package/dist/modules/spaces/deleteSpace.d.ts +0 -6
  173. package/dist/modules/spaces/fetchChildSpaces.d.ts +0 -11
  174. package/dist/modules/spaces/fetchDigestConfig.d.ts +0 -6
  175. package/dist/modules/spaces/fetchManyRules.d.ts +0 -6
  176. package/dist/modules/spaces/fetchManySpaces.d.ts +0 -17
  177. package/dist/modules/spaces/fetchMutualSpaces.d.ts +0 -11
  178. package/dist/modules/spaces/fetchRule.d.ts +0 -7
  179. package/dist/modules/spaces/fetchSpace.d.ts +0 -6
  180. package/dist/modules/spaces/fetchSpaceBreadcrumb.d.ts +0 -6
  181. package/dist/modules/spaces/fetchSpaceByShortId.d.ts +0 -6
  182. package/dist/modules/spaces/fetchSpaceBySlug.d.ts +0 -6
  183. package/dist/modules/spaces/fetchSpaceMembers.d.ts +0 -11
  184. package/dist/modules/spaces/fetchSpaceTeam.d.ts +0 -7
  185. package/dist/modules/spaces/fetchUserSpaces.d.ts +0 -17
  186. package/dist/modules/spaces/getSpaceConversation.d.ts +0 -6
  187. package/dist/modules/spaces/handleCommentReport.d.ts +0 -14
  188. package/dist/modules/spaces/handleEntityReport.d.ts +0 -17
  189. package/dist/modules/spaces/handleSpaceChatReport.d.ts +0 -18
  190. package/dist/modules/spaces/index.d.ts +0 -36
  191. package/dist/modules/spaces/joinSpace.d.ts +0 -6
  192. package/dist/modules/spaces/leaveSpace.d.ts +0 -6
  193. package/dist/modules/spaces/moderateSpaceChatMessage.d.ts +0 -12
  194. package/dist/modules/spaces/moderateSpaceComment.d.ts +0 -9
  195. package/dist/modules/spaces/moderateSpaceEntity.d.ts +0 -12
  196. package/dist/modules/spaces/reorderRules.d.ts +0 -7
  197. package/dist/modules/spaces/setSpaceEntityNsfw.d.ts +0 -16
  198. package/dist/modules/spaces/unbanMember.d.ts +0 -13
  199. package/dist/modules/spaces/updateDigestConfig.d.ts +0 -11
  200. package/dist/modules/spaces/updateMemberRole.d.ts +0 -8
  201. package/dist/modules/spaces/updateRule.d.ts +0 -9
  202. package/dist/modules/spaces/updateSpace.d.ts +0 -22
  203. package/dist/modules/storage/deleteFile.d.ts +0 -5
  204. package/dist/modules/storage/getFile.d.ts +0 -34
  205. package/dist/modules/storage/index.d.ts +0 -4
  206. package/dist/modules/storage/uploadFile.d.ts +0 -30
  207. package/dist/modules/storage/uploadImage.d.ts +0 -42
  208. package/dist/modules/tables/bulkCreate.d.ts +0 -4
  209. package/dist/modules/tables/bulkDelete.d.ts +0 -7
  210. package/dist/modules/tables/create.d.ts +0 -4
  211. package/dist/modules/tables/createTableAccessor.d.ts +0 -9
  212. package/dist/modules/tables/deleteRow.d.ts +0 -9
  213. package/dist/modules/tables/find.d.ts +0 -8
  214. package/dist/modules/tables/findOne.d.ts +0 -7
  215. package/dist/modules/tables/index.d.ts +0 -9
  216. package/dist/modules/tables/restore.d.ts +0 -6
  217. package/dist/modules/tables/update.d.ts +0 -4
  218. package/dist/modules/users/checkUsernameAvailability.d.ts +0 -8
  219. package/dist/modules/users/createBlock.d.ts +0 -19
  220. package/dist/modules/users/createFollow.d.ts +0 -7
  221. package/dist/modules/users/deleteBlock.d.ts +0 -13
  222. package/dist/modules/users/deleteFollow.d.ts +0 -6
  223. package/dist/modules/users/fetchBlockStatus.d.ts +0 -23
  224. package/dist/modules/users/fetchBlockedUsers.d.ts +0 -19
  225. package/dist/modules/users/fetchConnectionStatus.d.ts +0 -10
  226. package/dist/modules/users/fetchConnectionsByUserId.d.ts +0 -11
  227. package/dist/modules/users/fetchConnectionsCountByUserId.d.ts +0 -6
  228. package/dist/modules/users/fetchFollowStatus.d.ts +0 -14
  229. package/dist/modules/users/fetchFollowersByUserId.d.ts +0 -11
  230. package/dist/modules/users/fetchFollowersCountByUserId.d.ts +0 -8
  231. package/dist/modules/users/fetchFollowingByUserId.d.ts +0 -11
  232. package/dist/modules/users/fetchFollowingCountByUserId.d.ts +0 -8
  233. package/dist/modules/users/fetchUserByForeignId.d.ts +0 -8
  234. package/dist/modules/users/fetchUserById.d.ts +0 -8
  235. package/dist/modules/users/fetchUserByUsername.d.ts +0 -8
  236. package/dist/modules/users/fetchUserSuggestions.d.ts +0 -7
  237. package/dist/modules/users/index.d.ts +0 -22
  238. package/dist/modules/users/removeConnectionByUserId.d.ts +0 -10
  239. package/dist/modules/users/requestConnection.d.ts +0 -11
  240. package/dist/modules/users/updateUser.d.ts +0 -32
  241. package/dist/modules/workspaces/acceptInvite.d.ts +0 -13
  242. package/dist/modules/workspaces/acceptWorkspaceInvite.d.ts +0 -13
  243. package/dist/modules/workspaces/createInvite.d.ts +0 -17
  244. package/dist/modules/workspaces/createWorkspace.d.ts +0 -12
  245. package/dist/modules/workspaces/createWorkspaceInvite.d.ts +0 -17
  246. package/dist/modules/workspaces/declineInvite.d.ts +0 -12
  247. package/dist/modules/workspaces/declineWorkspaceInvite.d.ts +0 -14
  248. package/dist/modules/workspaces/deleteWorkspace.d.ts +0 -13
  249. package/dist/modules/workspaces/fetchManyWorkspaces.d.ts +0 -13
  250. package/dist/modules/workspaces/fetchMembers.d.ts +0 -13
  251. package/dist/modules/workspaces/fetchMyInvites.d.ts +0 -11
  252. package/dist/modules/workspaces/fetchMyWorkspaceInvites.d.ts +0 -15
  253. package/dist/modules/workspaces/fetchWorkspace.d.ts +0 -7
  254. package/dist/modules/workspaces/fetchWorkspaceAuthority.d.ts +0 -11
  255. package/dist/modules/workspaces/fetchWorkspaceInvites.d.ts +0 -17
  256. package/dist/modules/workspaces/fetchWorkspaceMemberStanding.d.ts +0 -11
  257. package/dist/modules/workspaces/fetchWorkspaceMembers.d.ts +0 -13
  258. package/dist/modules/workspaces/getAuthority.d.ts +0 -11
  259. package/dist/modules/workspaces/index.d.ts +0 -21
  260. package/dist/modules/workspaces/leaveWorkspace.d.ts +0 -11
  261. package/dist/modules/workspaces/removeWorkspaceMember.d.ts +0 -12
  262. package/dist/modules/workspaces/removeWorkspaceMemberFromSubtree.d.ts +0 -16
  263. package/dist/modules/workspaces/resendWorkspaceInvite.d.ts +0 -12
  264. package/dist/modules/workspaces/revokeWorkspaceInvite.d.ts +0 -13
  265. package/dist/modules/workspaces/transferWorkspaceOwnership.d.ts +0 -15
  266. package/dist/modules/workspaces/updateWorkspace.d.ts +0 -12
  267. package/dist/modules/workspaces/updateWorkspaceInheritFlag.d.ts +0 -13
  268. package/dist/modules/workspaces/updateWorkspaceMember.d.ts +0 -17
@@ -1,30 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface UploadFileResponse {
3
- fileId: string;
4
- type: string;
5
- relativePath: string;
6
- publicPath: string;
7
- size: number;
8
- mimeType: string;
9
- /** ISO-8601 timestamp. */
10
- createdAt: string;
11
- }
12
- export interface UploadFileProps {
13
- /** The file to upload, as a browser `File` or `Blob`. */
14
- file: Blob | File;
15
- /** Optional filename for the multipart part (defaults to the `File.name` or `"upload"`). */
16
- filename?: string;
17
- /**
18
- * Storage path segments for the file, e.g. ["avatars", userId]. Required by
19
- * the server (`uploadFileBodySchema.pathParts`).
20
- */
21
- pathParts: string[];
22
- /** Ordering within the associated entity/comment/space. */
23
- position?: number;
24
- metadata?: Record<string, any>;
25
- /** Only one of entityId/commentId/spaceId may be set. */
26
- entityId?: string;
27
- commentId?: string;
28
- spaceId?: string;
29
- }
30
- export declare function uploadFile(client: SublayHttpClient, data: UploadFileProps): Promise<UploadFileResponse>;
@@ -1,42 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { ImageOptions } from "../../interfaces/ImageProcessing";
3
- export interface UploadedImageVariant {
4
- path: string;
5
- width: number;
6
- height: number;
7
- size: number;
8
- format: string;
9
- publicPath: string;
10
- }
11
- export interface UploadImageResponse {
12
- fileId: string;
13
- type: "image";
14
- originalPath: string;
15
- originalSize: number;
16
- originalWidth: number;
17
- originalHeight: number;
18
- variants: Record<string, UploadedImageVariant>;
19
- format: string;
20
- quality: number;
21
- /** ISO-8601 timestamp. */
22
- createdAt: string;
23
- }
24
- export interface UploadImageProps {
25
- /** The image to upload, as a browser `File` or `Blob`. */
26
- file: Blob | File;
27
- /** Optional filename for the multipart part (defaults to the `File.name` or `"upload"`). */
28
- filename?: string;
29
- /**
30
- * Image-processing configuration. A discriminated union on `mode` mirroring
31
- * the server's `uploadImageBodySchema` — see {@link ImageOptions}.
32
- */
33
- imageOptions: ImageOptions;
34
- /** Storage path segments, e.g. ["spaces", spaceId, "banner"]. */
35
- pathParts?: string[];
36
- /** Only one of entityId/commentId/spaceId/eventId may be set. */
37
- entityId?: string;
38
- commentId?: string;
39
- spaceId?: string;
40
- eventId?: string;
41
- }
42
- export declare function uploadImage(client: SublayHttpClient, data: UploadImageProps): Promise<UploadImageResponse>;
@@ -1,4 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { TableRow } from "../../interfaces/Table";
3
- /** POST /db/:tableName/bulk — insert many rows (capped at 100 server-side). */
4
- export declare function bulkCreate<T = TableRow>(client: SublayHttpClient, tableName: string, rows: Array<Partial<T> | Record<string, unknown>>): Promise<T[]>;
@@ -1,7 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { BulkDeleteProps, BulkDeleteResult } from "../../interfaces/Table";
3
- /**
4
- * DELETE /db/:tableName — bulk delete by id list and/or `filters` predicate
5
- * (at least one required). Paranoid tables soft-delete unless `force: true`.
6
- */
7
- export declare function bulkDelete(client: SublayHttpClient, tableName: string, params: BulkDeleteProps): Promise<BulkDeleteResult>;
@@ -1,4 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { TableRow } from "../../interfaces/Table";
3
- /** POST /db/:tableName — insert one row. */
4
- export declare function create<T = TableRow>(client: SublayHttpClient, tableName: string, data: Partial<T> | Record<string, unknown>): Promise<T>;
@@ -1,9 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { TableAccessor, TableRow } from "../../interfaces/Table";
3
- /**
4
- * Build the per-table row-operations accessor returned by
5
- * `client.table<T>(name)`. A thin factory that closes over the HTTP client and
6
- * the table name — the one structural novelty over the flat `bindModule`
7
- * namespace, which can't capture a per-call table name.
8
- */
9
- export declare function createTableAccessor<T = TableRow>(client: SublayHttpClient, tableName: string): TableAccessor<T>;
@@ -1,9 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { DeleteResult } from "../../interfaces/Table";
3
- /**
4
- * DELETE /db/:tableName/:rowId — soft-delete on a paranoid table by default;
5
- * `force: true` hard-deletes.
6
- */
7
- export declare function deleteRow(client: SublayHttpClient, tableName: string, rowId: string, opts?: {
8
- force?: boolean;
9
- }): Promise<DeleteResult>;
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
3
- import { TableQuery, TableRow } from "../../interfaces/Table";
4
- /**
5
- * GET /db/:tableName — paginated rows with the `{ data, pagination }` envelope.
6
- * `filters` is serialized to a JSON query param; `includeDeleted` to "true"/"false".
7
- */
8
- export declare function find<T = TableRow>(client: SublayHttpClient, tableName: string, query?: TableQuery): Promise<PaginatedResponse<T>>;
@@ -1,7 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { TableRow } from "../../interfaces/Table";
3
- /**
4
- * GET /db/:tableName/:rowId — a single row (soft-deleted rows 404). Throws on
5
- * 404 (axios), consistent with the other fetch-one methods in the SDK.
6
- */
7
- export declare function findOne<T = TableRow>(client: SublayHttpClient, tableName: string, rowId: string): Promise<T>;
@@ -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,17 +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
- 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 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 `userId`
11
- * body is sent.
12
- */
13
- export declare function deleteWorkspace(client: SublayHttpClient, data: DeleteWorkspaceProps): Promise<DeleteWorkspaceResponse>;
@@ -1,13 +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 `userId` is sent.
12
- */
13
- export declare function fetchManyWorkspaces(client: SublayHttpClient, data?: FetchManyWorkspacesProps): Promise<PaginatedResponse<Workspace>>;