@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,42 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Event, EventType, EventStatus } from "../../interfaces/Event";
3
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
4
- export interface EventTextFilters {
5
- hasTitle?: "true" | "false";
6
- includes?: string | string[];
7
- doesNotInclude?: string | string[];
8
- }
9
- export interface EventDescriptionFilters {
10
- hasDescription?: "true" | "false";
11
- includes?: string | string[];
12
- doesNotInclude?: string | string[];
13
- }
14
- export interface EventLocationFilters {
15
- latitude: string;
16
- longitude: string;
17
- radius: string;
18
- }
19
- export interface FetchManyEventsProps {
20
- page?: number;
21
- limit?: number;
22
- sortBy?: "startTime" | "going";
23
- sortDir?: "asc" | "desc";
24
- timeWindow?: "upcoming" | "ongoing" | "past";
25
- startsAfter?: string;
26
- startsBefore?: string;
27
- spaceId?: string;
28
- hostId?: string;
29
- type?: EventType;
30
- status?: EventStatus;
31
- /**
32
- * Comma-separated RSVP statuses the logged-in user RSVP'd with, e.g.
33
- * "going,maybe". Filters to events the caller has that RSVP on.
34
- */
35
- myRsvp?: string;
36
- locationFilters?: EventLocationFilters;
37
- titleFilters?: EventTextFilters;
38
- descriptionFilters?: EventDescriptionFilters;
39
- /** Comma-separated associations to expand, e.g. "user,space,files,userRsvp". */
40
- include?: string;
41
- }
42
- export declare function fetchManyEvents(client: SublayHttpClient, data?: FetchManyEventsProps): Promise<PaginatedResponse<Event>>;
@@ -1,14 +0,0 @@
1
- export { createEvent } from "./createEvent";
2
- export { fetchEvent } from "./fetchEvent";
3
- export { fetchManyEvents } from "./fetchManyEvents";
4
- export { updateEvent } from "./updateEvent";
5
- export { cancelEvent } from "./cancelEvent";
6
- export { deleteEvent } from "./deleteEvent";
7
- export { setRsvp } from "./setRsvp";
8
- export { withdrawRsvp } from "./withdrawRsvp";
9
- export { addHost } from "./addHost";
10
- export { removeHost } from "./removeHost";
11
- export { addInvite } from "./addInvite";
12
- export { removeInvite } from "./removeInvite";
13
- export { fetchInvitees } from "./fetchInvitees";
14
- export { fetchEventRsvps } from "./fetchEventRsvps";
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Event } from "../../interfaces/Event";
3
- export interface RemoveHostProps {
4
- eventId: string;
5
- /** The host to remove. Rejected if it would leave the event with no hosts. */
6
- userId: string;
7
- }
8
- export declare function removeHost(client: SublayHttpClient, data: RemoveHostProps): Promise<Event>;
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Event } from "../../interfaces/Event";
3
- export interface RemoveInviteProps {
4
- eventId: string;
5
- /** The invitee to remove. Also drops their RSVP and revokes access. */
6
- userId: string;
7
- }
8
- export declare function removeInvite(client: SublayHttpClient, data: RemoveInviteProps): Promise<Event>;
@@ -1,7 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Event, RsvpStatus } from "../../interfaces/Event";
3
- export interface SetRsvpProps {
4
- eventId: string;
5
- status: RsvpStatus;
6
- }
7
- export declare function setRsvp(client: SublayHttpClient, data: SetRsvpProps): Promise<Event>;
@@ -1,43 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Event, EventType, EventVisibility } from "../../interfaces/Event";
3
- import type { EventCoverUpload, EventGalleryUpload } from "./createEvent";
4
- export interface UpdateEventProps {
5
- eventId: string;
6
- title?: string;
7
- description?: string;
8
- startTime?: string;
9
- endTime?: string;
10
- timezone?: string;
11
- type?: EventType;
12
- url?: string;
13
- venueName?: string;
14
- address?: string;
15
- location?: {
16
- latitude: number;
17
- longitude: number;
18
- };
19
- visibility?: EventVisibility;
20
- capacity?: number;
21
- allowMaybe?: boolean;
22
- guestListVisible?: boolean;
23
- metadata?: Record<string, any>;
24
- /**
25
- * File IDs of existing event images to REMOVE (gallery photos and/or the
26
- * current cover). Combine with `gallery` (append) + `cover` (replace) to fully
27
- * curate the image set in one update. Sent in the JSON body, or — when an
28
- * image file is also attached — as a JSON-string field the server parses.
29
- */
30
- removeImageIds?: string[];
31
- /**
32
- * New cover image (single) — REPLACES the existing cover. When present the
33
- * request is sent as `multipart/form-data`. Requires the `files-images` bundle.
34
- */
35
- cover?: EventCoverUpload;
36
- /**
37
- * Gallery images (multi) — APPENDED to the event's existing images. When
38
- * present the request is sent as `multipart/form-data`. Requires the
39
- * `files-images` bundle.
40
- */
41
- gallery?: EventGalleryUpload;
42
- }
43
- export declare function updateEvent(client: SublayHttpClient, data: UpdateEventProps): Promise<Event>;
@@ -1,6 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Event } from "../../interfaces/Event";
3
- export interface WithdrawRsvpProps {
4
- eventId: string;
5
- }
6
- export declare function withdrawRsvp(client: SublayHttpClient, data: WithdrawRsvpProps): Promise<Event>;
@@ -1,5 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface DeleteFollowByIdProps {
3
- followId: string;
4
- }
5
- export declare function deleteFollow(client: SublayHttpClient, data: DeleteFollowByIdProps): Promise<void>;
@@ -1,9 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { FollowListItem } from "../../interfaces/Follow";
3
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
4
- import { UserSearchParams } from "../../interfaces/UserSearch";
5
- export interface FetchFollowersProps extends UserSearchParams {
6
- page?: number;
7
- limit?: number;
8
- }
9
- export declare function fetchFollowers(client: SublayHttpClient, data: FetchFollowersProps): Promise<PaginatedResponse<FollowListItem>>;
@@ -1,5 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface FollowersCountResponse {
3
- count: number;
4
- }
5
- export declare function fetchFollowersCount(client: SublayHttpClient): Promise<FollowersCountResponse>;
@@ -1,9 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { FollowListItem } from "../../interfaces/Follow";
3
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
4
- import { UserSearchParams } from "../../interfaces/UserSearch";
5
- export interface FetchFollowingProps extends UserSearchParams {
6
- page?: number;
7
- limit?: number;
8
- }
9
- export declare function fetchFollowing(client: SublayHttpClient, data: FetchFollowingProps): Promise<PaginatedResponse<FollowListItem>>;
@@ -1,5 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface FollowingCountResponse {
3
- count: number;
4
- }
5
- export declare function fetchFollowingCount(client: SublayHttpClient): Promise<FollowingCountResponse>;
@@ -1,5 +0,0 @@
1
- export { fetchFollowing } from "./fetchFollowing";
2
- export { fetchFollowers } from "./fetchFollowers";
3
- export { fetchFollowingCount } from "./fetchFollowingCount";
4
- export { fetchFollowersCount } from "./fetchFollowersCount";
5
- export { deleteFollow } from "./deleteFollow";
@@ -1,25 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- /** Providers the server supports (mirrors the server's `oauthProviderSchema`). */
3
- export type OAuthProvider = "google" | "github" | "apple" | "facebook";
4
- export interface AuthorizeProps {
5
- provider: OAuthProvider;
6
- /**
7
- * Where the server should send the browser back to once auth completes. Must
8
- * be one of the project's allowed redirect URIs (configured in the dashboard).
9
- */
10
- redirectAfterAuth: string;
11
- }
12
- export interface AuthorizeResponse {
13
- /**
14
- * The provider's authorization URL. The host app redirects the browser here;
15
- * the provider then bounces to the server's `/oauth/callback`, which finishes
16
- * auth and redirects back to `redirectAfterAuth` with the session.
17
- */
18
- authorizationUrl: string;
19
- }
20
- /**
21
- * Begin an OAuth sign-in / sign-up flow (unauthenticated). Returns the
22
- * `authorizationUrl` for the host to redirect to — it does NOT return tokens;
23
- * the server's callback establishes the session.
24
- */
25
- export declare function authorize(client: SublayHttpClient, data: AuthorizeProps): Promise<AuthorizeResponse>;
@@ -1,4 +0,0 @@
1
- export { authorize } from "./authorize";
2
- export { linkIdentity } from "./linkIdentity";
3
- export { listIdentities } from "./listIdentities";
4
- export { unlinkIdentity } from "./unlinkIdentity";
@@ -1,14 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { AuthorizeResponse, OAuthProvider } from "./authorize";
3
- export interface LinkIdentityProps {
4
- provider: OAuthProvider;
5
- /** Allowed redirect URI to return the browser to after linking completes. */
6
- redirectAfterAuth: string;
7
- }
8
- /**
9
- * Link a new OAuth provider to the **current** user (authenticated). Same
10
- * redirect contract as {@link authorize}: returns the `authorizationUrl` for the
11
- * host to redirect to. The current user is taken from the auth token, never the
12
- * body.
13
- */
14
- export declare function linkIdentity(client: SublayHttpClient, data: LinkIdentityProps): Promise<AuthorizeResponse>;
@@ -1,4 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { ListIdentitiesResponse } from "../../interfaces/OAuthIdentity";
3
- /** List the current user's linked OAuth identities (authenticated). */
4
- export declare function listIdentities(client: SublayHttpClient): Promise<ListIdentitiesResponse>;
@@ -1,12 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface UnlinkIdentityProps {
3
- identityId: string;
4
- }
5
- export interface UnlinkIdentityResponse {
6
- success: boolean;
7
- }
8
- /**
9
- * Unlink one of the current user's OAuth identities (authenticated). The server
10
- * refuses to remove the last identity if the user has no password set.
11
- */
12
- export declare function unlinkIdentity(client: SublayHttpClient, data: UnlinkIdentityProps): Promise<UnlinkIdentityResponse>;
@@ -1,11 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { NotificationPreferences } from "../../interfaces/Push";
3
- /**
4
- * Read the logged-in user's push notification preferences (the set of event
5
- * types disabled for push). Returns an empty `disabledTypes` (all-on) when no
6
- * preference row exists.
7
- *
8
- * Mirrors `GET /:projectId/push-notifications/preferences`. The actor is derived
9
- * from the user token (Rule A) — no `userId` param.
10
- */
11
- export declare function getNotificationPreferences(client: SublayHttpClient): Promise<NotificationPreferences>;
@@ -1,2 +0,0 @@
1
- export { getNotificationPreferences } from "./getNotificationPreferences";
2
- export { updateNotificationPreferences } from "./updateNotificationPreferences";
@@ -1,16 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { NotificationPreferences, PushEventType } from "../../interfaces/Push";
3
- export interface UpdateNotificationPreferencesProps {
4
- /**
5
- * The set of push event types the user has opted OUT of. Server-exact type
6
- * names only (unknown names are rejected server-side); duplicates collapse.
7
- */
8
- disabledTypes: PushEventType[];
9
- }
10
- /**
11
- * Upsert the logged-in user's push notification preferences.
12
- *
13
- * Mirrors `PUT /:projectId/push-notifications/preferences`. The actor is derived
14
- * from the user token (Rule A) — no `userId` param.
15
- */
16
- export declare function updateNotificationPreferences(client: SublayHttpClient, data: UpdateNotificationPreferencesProps): Promise<NotificationPreferences>;
@@ -1,9 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { CreateReportResponse, ReportReason, ReportTargetType } from "../../interfaces/Report";
3
- export interface CreateReportProps {
4
- targetType: ReportTargetType;
5
- targetId: string;
6
- reason: ReportReason;
7
- details?: string;
8
- }
9
- export declare function createReport(client: SublayHttpClient, data: CreateReportProps): Promise<CreateReportResponse>;
@@ -1,13 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Report, ReportStatus, ReportTargetType } from "../../interfaces/Report";
3
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
4
- import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
5
- export interface FetchModeratedReportsProps extends SpaceReputationContextParams {
6
- spaceId?: string;
7
- targetType?: ReportTargetType;
8
- status?: ReportStatus;
9
- sortBy?: "new" | "old";
10
- page?: number;
11
- limit?: number;
12
- }
13
- export declare function fetchModeratedReports(client: SublayHttpClient, data: FetchModeratedReportsProps): Promise<PaginatedResponse<Report>>;
@@ -1,2 +0,0 @@
1
- export { createReport } from "./createReport";
2
- export { fetchModeratedReports } from "./fetchModeratedReports";
@@ -1,45 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { ReputationGrant, ReputationGrantTargetFilter } from "../../interfaces/ReputationGrant";
3
- interface CreateGrantBaseProps {
4
- /** The user receiving the reputation. Cannot be the logged-in user. */
5
- recipientId: string;
6
- /**
7
- * Positive integer. A user transfer can never mint (negatives) nor be a
8
- * no-op (zero) — minting is service-key-only and lives in `@sublay/node`.
9
- */
10
- amount: number;
11
- /** The bucket both legs move in. Omitted/null = the project-general bucket. */
12
- spaceId?: string | null;
13
- /**
14
- * Free-text reason. Trimmed and capped at 2000 characters server-side.
15
- * Genuinely nullable — an explicit `null` is accepted and means "no note".
16
- */
17
- note?: string | null;
18
- /**
19
- * Arbitrary JSON, capped at 1 MB server-side.
20
- *
21
- * NOT nullable — deliberately asymmetric with `note` directly above, not a
22
- * typo. The server's shared `metadataSchema` is `z.record(...).optional()`
23
- * with no `.nullable()`, so an explicit `metadata: null` is rejected with
24
- * `400 reputation-grant/invalid-body`. Omit the key to mean "no metadata".
25
- */
26
- metadata?: Record<string, any>;
27
- }
28
- /**
29
- * `targetType` and `targetId` are supplied together or not at all — the
30
- * both-or-neither pair is carried by {@link ReputationGrantTargetFilter}, which
31
- * makes the half-filled shape a compile error instead of a
32
- * `400 reputation-grant/invalid-body`.
33
- */
34
- export type CreateGrantProps = CreateGrantBaseProps & ReputationGrantTargetFilter;
35
- /**
36
- * Transfers reputation from the logged-in user to another user — a **debited
37
- * transfer**: the amount leaves the sender's bucket and lands in the
38
- * recipient's bucket in the same space. Nothing is created.
39
- *
40
- * There is no actor field: the sender is always the user the token belongs to.
41
- * Naming somebody else as the sender requires a service key, which this SDK
42
- * never holds.
43
- */
44
- export declare function createGrant(client: SublayHttpClient, data: CreateGrantProps): Promise<ReputationGrant>;
45
- export {};
@@ -1,2 +0,0 @@
1
- export { createGrant } from "./createGrant";
2
- export { listGrants } from "./listGrants";
@@ -1,45 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { GrantSummary, ReputationGrant, ReputationGrantTargetFilter } from "../../interfaces/ReputationGrant";
3
- import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
4
- import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
5
- interface ListGrantsBaseProps extends SpaceReputationContextParams {
6
- page?: number;
7
- limit?: number;
8
- /** What this user received. */
9
- recipientId?: string;
10
- /** What this user sent. */
11
- senderId?: string;
12
- /** Associations to expand. Only `"user"` is supported (hydrates both parties). */
13
- include?: string;
14
- }
15
- /**
16
- * The third filter shape — "who rewarded this item" — is the
17
- * {@link ReputationGrantTargetFilter} pair, so a half-filled target is a
18
- * compile error rather than a `400 reputation-grant/invalid-filter`.
19
- *
20
- * Mutual exclusivity between the three shapes is NOT expressed in the type: a
21
- * three-way exclusive union would multiply out across every pagination and
22
- * space-reputation field and make the props unreadable, for a rule the server
23
- * reports clearly. Only the both-or-neither pairing is typed.
24
- */
25
- export type ListGrantsProps = ListGrantsBaseProps & ReputationGrantTargetFilter;
26
- /**
27
- * The `summary` block rides alongside the page envelope, and only on the
28
- * target filter shape.
29
- */
30
- export interface ListGrantsResponse extends PaginatedResponse<ReputationGrant> {
31
- summary?: GrantSummary;
32
- }
33
- /**
34
- * Lists reputation grants.
35
- *
36
- * Exactly one filter shape per request — `recipientId`, `senderId`, or
37
- * `targetType` + `targetId`. Supplying none or combining two is a `400`; the
38
- * shapes are not AND-ed, which is what keeps the `summary` block reconcilable
39
- * with the rows beneath it.
40
- *
41
- * Only positive grants are ever returned. Negative grants are app moderation
42
- * deductions and are unreadable from every public surface.
43
- */
44
- export declare function listGrants(client: SublayHttpClient, data: ListGrantsProps): Promise<ListGrantsResponse>;
45
- export {};
@@ -1,58 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { ContentSearchResult } from "./searchContent";
3
- import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
4
- export interface AskContentProps extends SpaceReputationContextParams {
5
- query: string;
6
- sourceTypes?: ("entity" | "comment" | "message")[];
7
- spaceId?: string;
8
- /**
9
- * With a `spaceId`, also search every space nested under it (children,
10
- * grandchildren — the whole subtree, any depth). Ignored without a `spaceId`.
11
- * Defaults to false (exact-space search).
12
- */
13
- includeChildSpaces?: boolean;
14
- conversationId?: string;
15
- limit?: number;
16
- /** Abort the in-flight stream (e.g. when the user navigates away). */
17
- signal?: AbortSignal;
18
- }
19
- /**
20
- * A single Server-Sent Event from the `askContent` stream.
21
- * - `token` — an incremental chunk of the answer text.
22
- * - `sources` — the hydrated source records, emitted once after the answer.
23
- * - `done` — the stream finished successfully.
24
- * - `error` — the server reported an error (the stream ends after this).
25
- */
26
- export type AskContentEvent = {
27
- type: "token";
28
- content: string;
29
- } | {
30
- type: "sources";
31
- sources: ContentSearchResult[];
32
- } | {
33
- type: "done";
34
- } | {
35
- type: "error";
36
- error: string;
37
- };
38
- /**
39
- * Ask a question over your project's content (semantic RAG). The server answers
40
- * by streaming Server-Sent Events, so this is an **async generator**: iterate it
41
- * to consume the answer as it arrives.
42
- *
43
- * ```ts
44
- * let answer = "";
45
- * for await (const ev of client.search.askContent({ query: "How do refunds work?" })) {
46
- * if (ev.type === "token") answer += ev.content;
47
- * else if (ev.type === "sources") console.log("sources:", ev.sources);
48
- * else if (ev.type === "error") throw new Error(ev.error);
49
- * }
50
- * ```
51
- *
52
- * Cancel by passing an `AbortSignal`, or by `break`ing out of the loop.
53
- *
54
- * Note: this request uses `fetch` (not the axios instance), so it does not get
55
- * the automatic 403→refresh retry. The token is read fresh at call time via the
56
- * client's active auth mode.
57
- */
58
- export declare function askContent(client: SublayHttpClient, data: AskContentProps): AsyncGenerator<AskContentEvent, void, unknown>;
@@ -1,5 +0,0 @@
1
- export { searchContent } from "./searchContent";
2
- export { searchUsers } from "./searchUsers";
3
- export { searchSpaces } from "./searchSpaces";
4
- export { askContent } from "./askContent";
5
- export { matchUsers } from "./matchUsers";
@@ -1,36 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { User } from "../../interfaces/User";
3
- export interface MatchUsersProps {
4
- mode: "passive" | "directed";
5
- query?: string;
6
- limit?: number;
7
- spaceId?: string;
8
- includeChildSpaces?: boolean;
9
- includeSampleContent?: boolean;
10
- excludeSelf?: boolean;
11
- }
12
- export interface MatchFacetRef {
13
- id: string;
14
- hotness: number;
15
- }
16
- export interface SampleContent {
17
- sourceType: "entity" | "comment" | "message";
18
- recordId: string;
19
- content: string;
20
- similarity: number;
21
- }
22
- export interface MatchedFacet {
23
- similarity: number;
24
- askerFacet?: MatchFacetRef;
25
- candidateFacet: MatchFacetRef;
26
- sampleContent?: SampleContent[];
27
- }
28
- export interface UserMatchResult {
29
- user: User;
30
- score: number;
31
- matchedFacets: MatchedFacet[];
32
- }
33
- export interface MatchUsersResponse {
34
- results: UserMatchResult[];
35
- }
36
- export declare function matchUsers(client: SublayHttpClient, data: MatchUsersProps): Promise<MatchUsersResponse>;
@@ -1,24 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Entity } from "../../interfaces/Entity";
3
- import { Comment } from "../../interfaces/Comment";
4
- import { ChatMessage } from "../../interfaces/ChatMessage";
5
- import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
6
- export interface SearchContentProps extends SpaceReputationContextParams {
7
- query: string;
8
- sourceTypes?: ("entity" | "comment" | "message")[];
9
- spaceId?: string;
10
- /**
11
- * With a `spaceId`, also search every space nested under it (children,
12
- * grandchildren — the whole subtree, any depth). Ignored without a `spaceId`.
13
- * Defaults to false (exact-space search).
14
- */
15
- includeChildSpaces?: boolean;
16
- conversationId?: string;
17
- limit?: number;
18
- }
19
- export interface ContentSearchResult {
20
- sourceType: "entity" | "comment" | "message";
21
- similarity: number;
22
- record: Entity | Comment | ChatMessage;
23
- }
24
- export declare function searchContent(client: SublayHttpClient, data: SearchContentProps): Promise<ContentSearchResult[]>;
@@ -1,11 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Space } from "../../interfaces/Space";
3
- export interface SearchSpacesProps {
4
- query: string;
5
- limit?: number;
6
- }
7
- export interface SpaceSearchResult {
8
- similarity: number;
9
- record: Space;
10
- }
11
- export declare function searchSpaces(client: SublayHttpClient, data: SearchSpacesProps): Promise<SpaceSearchResult[]>;
@@ -1,11 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { User } from "../../interfaces/User";
3
- export interface SearchUsersProps {
4
- query: string;
5
- limit?: number;
6
- }
7
- export interface UserSearchResult {
8
- similarity: number;
9
- record: User;
10
- }
11
- export declare function searchUsers(client: SublayHttpClient, data: SearchUsersProps): Promise<UserSearchResult[]>;
@@ -1,7 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { ApproveMemberResponse } from "../../interfaces/Space";
3
- export interface ApproveMembershipProps {
4
- spaceId: string;
5
- memberId: string;
6
- }
7
- export declare function approveMembership(client: SublayHttpClient, data: ApproveMembershipProps): Promise<ApproveMemberResponse>;
@@ -1,13 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface BanMemberProps {
3
- spaceId: string;
4
- memberId: string;
5
- }
6
- export interface BanMemberResponse {
7
- message: string;
8
- membership: {
9
- id: string;
10
- status: "banned";
11
- };
12
- }
13
- export declare function banMember(client: SublayHttpClient, data: BanMemberProps): Promise<BanMemberResponse>;
@@ -1,6 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { CheckMyMembershipResponse } from "../../interfaces/Space";
3
- export interface CheckMyMembershipProps {
4
- spaceId: string;
5
- }
6
- export declare function checkMyMembership(client: SublayHttpClient, data: CheckMyMembershipProps): Promise<CheckMyMembershipResponse>;
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- export interface CheckSlugAvailabilityProps {
3
- slug: string;
4
- }
5
- export interface CheckSlugAvailabilityResponse {
6
- available: boolean;
7
- }
8
- export declare function checkSlugAvailability(client: SublayHttpClient, data: CheckSlugAvailabilityProps): Promise<CheckSlugAvailabilityResponse>;
@@ -1,8 +0,0 @@
1
- import { SublayHttpClient } from "../../core/client";
2
- import { Rule } from "../../interfaces/Rule";
3
- export interface CreateRuleProps {
4
- spaceId: string;
5
- title: string;
6
- description?: string;
7
- }
8
- export declare function createRule(client: SublayHttpClient, data: CreateRuleProps): Promise<Rule>;