@sublay/js 7.9.0 → 7.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +23 -14
- package/dist/index.d.mts +38 -7
- package/dist/index.d.ts +4363 -35
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +29 -18
- package/dist/core/client.d.ts +0 -64
- package/dist/core/multipart.d.ts +0 -22
- package/dist/core/spaceReputationParams.d.ts +0 -57
- package/dist/interfaces/AppNotification.d.ts +0 -258
- package/dist/interfaces/ChatMessage.d.ts +0 -40
- package/dist/interfaces/Collection.d.ts +0 -10
- package/dist/interfaces/Comment.d.ts +0 -50
- package/dist/interfaces/Connection.d.ts +0 -67
- package/dist/interfaces/Conversation.d.ts +0 -27
- package/dist/interfaces/ConversationMember.d.ts +0 -17
- package/dist/interfaces/Entity.d.ts +0 -63
- package/dist/interfaces/Event.d.ts +0 -66
- package/dist/interfaces/File.d.ts +0 -39
- package/dist/interfaces/Follow.d.ts +0 -19
- package/dist/interfaces/HostedApp.d.ts +0 -11
- package/dist/interfaces/IPaginatedResponse.d.ts +0 -11
- package/dist/interfaces/ImageProcessing.d.ts +0 -62
- package/dist/interfaces/Mention.d.ts +0 -12
- package/dist/interfaces/OAuthIdentity.d.ts +0 -14
- package/dist/interfaces/Project.d.ts +0 -14
- package/dist/interfaces/Push.d.ts +0 -74
- package/dist/interfaces/Reaction.d.ts +0 -23
- package/dist/interfaces/Report.d.ts +0 -38
- package/dist/interfaces/ReputationGrant.d.ts +0 -85
- package/dist/interfaces/Rule.d.ts +0 -22
- package/dist/interfaces/Space.d.ts +0 -130
- package/dist/interfaces/SpaceMember.d.ts +0 -29
- package/dist/interfaces/SpaceReputation.d.ts +0 -100
- package/dist/interfaces/Table.d.ts +0 -63
- package/dist/interfaces/User.d.ts +0 -46
- package/dist/interfaces/UserSearch.d.ts +0 -13
- package/dist/interfaces/Workspace.d.ts +0 -178
- package/dist/modules/app-notifications/countUnreadNotifications.d.ts +0 -2
- package/dist/modules/app-notifications/fetchNotifications.d.ts +0 -8
- package/dist/modules/app-notifications/index.d.ts +0 -4
- package/dist/modules/app-notifications/markAllNotificationsAsRead.d.ts +0 -5
- package/dist/modules/app-notifications/markNotificationAsRead.d.ts +0 -5
- package/dist/modules/auth/changePassword.d.ts +0 -34
- package/dist/modules/auth/confirmAccountDeletion.d.ts +0 -11
- package/dist/modules/auth/index.d.ts +0 -13
- package/dist/modules/auth/requestAccountDeletion.d.ts +0 -14
- package/dist/modules/auth/requestNewAccessToken.d.ts +0 -16
- package/dist/modules/auth/requestPasswordReset.d.ts +0 -5
- package/dist/modules/auth/resetPassword.d.ts +0 -6
- package/dist/modules/auth/sendVerificationEmail.d.ts +0 -13
- package/dist/modules/auth/setPassword.d.ts +0 -9
- package/dist/modules/auth/signIn.d.ts +0 -12
- package/dist/modules/auth/signOut.d.ts +0 -103
- package/dist/modules/auth/signUp.d.ts +0 -24
- package/dist/modules/auth/verifyEmail.d.ts +0 -5
- package/dist/modules/auth/verifyExternalUser.d.ts +0 -11
- package/dist/modules/chat/addMember.d.ts +0 -8
- package/dist/modules/chat/changeMemberRole.d.ts +0 -9
- package/dist/modules/chat/createDirectConversation.d.ts +0 -7
- package/dist/modules/chat/createGroupConversation.d.ts +0 -10
- package/dist/modules/chat/deleteConversation.d.ts +0 -8
- package/dist/modules/chat/deleteMessage.d.ts +0 -11
- package/dist/modules/chat/editMessage.d.ts +0 -14
- package/dist/modules/chat/getConversation.d.ts +0 -6
- package/dist/modules/chat/getMessage.d.ts +0 -13
- package/dist/modules/chat/getUnreadCount.d.ts +0 -6
- package/dist/modules/chat/index.d.ts +0 -21
- package/dist/modules/chat/leaveConversation.d.ts +0 -7
- package/dist/modules/chat/listConversations.d.ts +0 -17
- package/dist/modules/chat/listMembers.d.ts +0 -11
- package/dist/modules/chat/listMessages.d.ts +0 -44
- package/dist/modules/chat/listReactions.d.ts +0 -24
- package/dist/modules/chat/markAsRead.d.ts +0 -9
- package/dist/modules/chat/muteConversation.d.ts +0 -23
- package/dist/modules/chat/removeMember.d.ts +0 -9
- package/dist/modules/chat/reportMessage.d.ts +0 -12
- package/dist/modules/chat/sendMessage.d.ts +0 -22
- package/dist/modules/chat/toggleReaction.d.ts +0 -16
- package/dist/modules/chat/updateConversation.d.ts +0 -12
- package/dist/modules/collections/addEntityToCollection.d.ts +0 -13
- package/dist/modules/collections/createNewCollection.d.ts +0 -8
- package/dist/modules/collections/deleteCollection.d.ts +0 -5
- package/dist/modules/collections/fetchCollectionEntities.d.ts +0 -13
- package/dist/modules/collections/fetchRootCollection.d.ts +0 -3
- package/dist/modules/collections/fetchSubCollections.d.ts +0 -6
- package/dist/modules/collections/index.d.ts +0 -8
- package/dist/modules/collections/removeEntityFromCollection.d.ts +0 -7
- package/dist/modules/collections/updateCollection.d.ts +0 -7
- package/dist/modules/comments/addReaction.d.ts +0 -8
- package/dist/modules/comments/createComment.d.ts +0 -15
- package/dist/modules/comments/deleteComment.d.ts +0 -5
- package/dist/modules/comments/fetchComment.d.ts +0 -8
- package/dist/modules/comments/fetchCommentByForeignId.d.ts +0 -7
- package/dist/modules/comments/fetchManyComments.d.ts +0 -26
- package/dist/modules/comments/fetchReactions.d.ts +0 -16
- package/dist/modules/comments/getUserReaction.d.ts +0 -9
- package/dist/modules/comments/index.d.ts +0 -10
- package/dist/modules/comments/removeReaction.d.ts +0 -6
- package/dist/modules/comments/updateComment.d.ts +0 -10
- package/dist/modules/connections/acceptConnection.d.ts +0 -6
- package/dist/modules/connections/declineConnection.d.ts +0 -6
- package/dist/modules/connections/fetchConnections.d.ts +0 -9
- package/dist/modules/connections/fetchConnectionsCount.d.ts +0 -3
- package/dist/modules/connections/fetchReceivedPendingConnections.d.ts +0 -8
- package/dist/modules/connections/fetchSentPendingConnections.d.ts +0 -8
- package/dist/modules/connections/index.d.ts +0 -7
- package/dist/modules/connections/removeConnection.d.ts +0 -5
- package/dist/modules/entities/addReaction.d.ts +0 -8
- package/dist/modules/entities/createEntity.d.ts +0 -23
- package/dist/modules/entities/deleteEntity.d.ts +0 -5
- package/dist/modules/entities/fetchDrafts.d.ts +0 -11
- package/dist/modules/entities/fetchEntity.d.ts +0 -8
- package/dist/modules/entities/fetchEntityByForeignId.d.ts +0 -8
- package/dist/modules/entities/fetchEntityByShortId.d.ts +0 -7
- package/dist/modules/entities/fetchManyEntities.d.ts +0 -65
- package/dist/modules/entities/fetchReactions.d.ts +0 -16
- package/dist/modules/entities/fetchTopComment.d.ts +0 -6
- package/dist/modules/entities/getUserReaction.d.ts +0 -9
- package/dist/modules/entities/index.d.ts +0 -15
- package/dist/modules/entities/isEntitySaved.d.ts +0 -12
- package/dist/modules/entities/publishDraft.d.ts +0 -6
- package/dist/modules/entities/removeReaction.d.ts +0 -6
- package/dist/modules/entities/updateEntity.d.ts +0 -18
- package/dist/modules/events/addHost.d.ts +0 -8
- package/dist/modules/events/addInvite.d.ts +0 -8
- package/dist/modules/events/cancelEvent.d.ts +0 -6
- package/dist/modules/events/createEvent.d.ts +0 -49
- package/dist/modules/events/deleteEvent.d.ts +0 -5
- package/dist/modules/events/fetchEvent.d.ts +0 -8
- package/dist/modules/events/fetchEventRsvps.d.ts +0 -19
- package/dist/modules/events/fetchInvitees.d.ts +0 -12
- package/dist/modules/events/fetchManyEvents.d.ts +0 -42
- package/dist/modules/events/index.d.ts +0 -14
- package/dist/modules/events/removeHost.d.ts +0 -8
- package/dist/modules/events/removeInvite.d.ts +0 -8
- package/dist/modules/events/setRsvp.d.ts +0 -7
- package/dist/modules/events/updateEvent.d.ts +0 -43
- package/dist/modules/events/withdrawRsvp.d.ts +0 -6
- package/dist/modules/follows/deleteFollow.d.ts +0 -5
- package/dist/modules/follows/fetchFollowers.d.ts +0 -9
- package/dist/modules/follows/fetchFollowersCount.d.ts +0 -5
- package/dist/modules/follows/fetchFollowing.d.ts +0 -9
- package/dist/modules/follows/fetchFollowingCount.d.ts +0 -5
- package/dist/modules/follows/index.d.ts +0 -5
- package/dist/modules/oauth/authorize.d.ts +0 -25
- package/dist/modules/oauth/index.d.ts +0 -4
- package/dist/modules/oauth/linkIdentity.d.ts +0 -14
- package/dist/modules/oauth/listIdentities.d.ts +0 -4
- package/dist/modules/oauth/unlinkIdentity.d.ts +0 -12
- package/dist/modules/push/getNotificationPreferences.d.ts +0 -11
- package/dist/modules/push/index.d.ts +0 -2
- package/dist/modules/push/updateNotificationPreferences.d.ts +0 -16
- package/dist/modules/reports/createReport.d.ts +0 -9
- package/dist/modules/reports/fetchModeratedReports.d.ts +0 -13
- package/dist/modules/reports/index.d.ts +0 -2
- package/dist/modules/reputation/createGrant.d.ts +0 -45
- package/dist/modules/reputation/index.d.ts +0 -2
- package/dist/modules/reputation/listGrants.d.ts +0 -45
- package/dist/modules/search/askContent.d.ts +0 -58
- package/dist/modules/search/index.d.ts +0 -5
- package/dist/modules/search/matchUsers.d.ts +0 -36
- package/dist/modules/search/searchContent.d.ts +0 -24
- package/dist/modules/search/searchSpaces.d.ts +0 -11
- package/dist/modules/search/searchUsers.d.ts +0 -11
- package/dist/modules/spaces/approveMembership.d.ts +0 -7
- package/dist/modules/spaces/banMember.d.ts +0 -13
- package/dist/modules/spaces/checkMyMembership.d.ts +0 -6
- package/dist/modules/spaces/checkSlugAvailability.d.ts +0 -8
- package/dist/modules/spaces/createRule.d.ts +0 -8
- package/dist/modules/spaces/createSpace.d.ts +0 -29
- package/dist/modules/spaces/declineMembership.d.ts +0 -7
- package/dist/modules/spaces/deleteRule.d.ts +0 -7
- package/dist/modules/spaces/deleteSpace.d.ts +0 -6
- package/dist/modules/spaces/fetchChildSpaces.d.ts +0 -11
- package/dist/modules/spaces/fetchDigestConfig.d.ts +0 -6
- package/dist/modules/spaces/fetchManyRules.d.ts +0 -6
- package/dist/modules/spaces/fetchManySpaces.d.ts +0 -17
- package/dist/modules/spaces/fetchMutualSpaces.d.ts +0 -11
- package/dist/modules/spaces/fetchRule.d.ts +0 -7
- package/dist/modules/spaces/fetchSpace.d.ts +0 -6
- package/dist/modules/spaces/fetchSpaceBreadcrumb.d.ts +0 -6
- package/dist/modules/spaces/fetchSpaceByShortId.d.ts +0 -6
- package/dist/modules/spaces/fetchSpaceBySlug.d.ts +0 -6
- package/dist/modules/spaces/fetchSpaceMembers.d.ts +0 -11
- package/dist/modules/spaces/fetchSpaceTeam.d.ts +0 -7
- package/dist/modules/spaces/fetchUserSpaces.d.ts +0 -17
- package/dist/modules/spaces/getSpaceConversation.d.ts +0 -6
- package/dist/modules/spaces/handleCommentReport.d.ts +0 -14
- package/dist/modules/spaces/handleEntityReport.d.ts +0 -17
- package/dist/modules/spaces/handleSpaceChatReport.d.ts +0 -18
- package/dist/modules/spaces/index.d.ts +0 -36
- package/dist/modules/spaces/joinSpace.d.ts +0 -6
- package/dist/modules/spaces/leaveSpace.d.ts +0 -6
- package/dist/modules/spaces/moderateSpaceChatMessage.d.ts +0 -12
- package/dist/modules/spaces/moderateSpaceComment.d.ts +0 -9
- package/dist/modules/spaces/moderateSpaceEntity.d.ts +0 -12
- package/dist/modules/spaces/reorderRules.d.ts +0 -7
- package/dist/modules/spaces/setSpaceEntityNsfw.d.ts +0 -16
- package/dist/modules/spaces/unbanMember.d.ts +0 -13
- package/dist/modules/spaces/updateDigestConfig.d.ts +0 -11
- package/dist/modules/spaces/updateMemberRole.d.ts +0 -8
- package/dist/modules/spaces/updateRule.d.ts +0 -9
- package/dist/modules/spaces/updateSpace.d.ts +0 -22
- package/dist/modules/storage/deleteFile.d.ts +0 -5
- package/dist/modules/storage/getFile.d.ts +0 -34
- package/dist/modules/storage/index.d.ts +0 -4
- package/dist/modules/storage/uploadFile.d.ts +0 -30
- package/dist/modules/storage/uploadImage.d.ts +0 -42
- package/dist/modules/tables/bulkCreate.d.ts +0 -4
- package/dist/modules/tables/bulkDelete.d.ts +0 -7
- package/dist/modules/tables/create.d.ts +0 -4
- package/dist/modules/tables/createTableAccessor.d.ts +0 -9
- package/dist/modules/tables/deleteRow.d.ts +0 -9
- package/dist/modules/tables/find.d.ts +0 -8
- package/dist/modules/tables/findOne.d.ts +0 -7
- package/dist/modules/tables/index.d.ts +0 -9
- package/dist/modules/tables/restore.d.ts +0 -6
- package/dist/modules/tables/update.d.ts +0 -4
- package/dist/modules/users/checkUsernameAvailability.d.ts +0 -8
- package/dist/modules/users/createBlock.d.ts +0 -19
- package/dist/modules/users/createFollow.d.ts +0 -7
- package/dist/modules/users/deleteBlock.d.ts +0 -13
- package/dist/modules/users/deleteFollow.d.ts +0 -6
- package/dist/modules/users/fetchBlockStatus.d.ts +0 -23
- package/dist/modules/users/fetchBlockedUsers.d.ts +0 -19
- package/dist/modules/users/fetchConnectionStatus.d.ts +0 -10
- package/dist/modules/users/fetchConnectionsByUserId.d.ts +0 -11
- package/dist/modules/users/fetchConnectionsCountByUserId.d.ts +0 -6
- package/dist/modules/users/fetchFollowStatus.d.ts +0 -14
- package/dist/modules/users/fetchFollowersByUserId.d.ts +0 -11
- package/dist/modules/users/fetchFollowersCountByUserId.d.ts +0 -8
- package/dist/modules/users/fetchFollowingByUserId.d.ts +0 -11
- package/dist/modules/users/fetchFollowingCountByUserId.d.ts +0 -8
- package/dist/modules/users/fetchUserByForeignId.d.ts +0 -8
- package/dist/modules/users/fetchUserById.d.ts +0 -8
- package/dist/modules/users/fetchUserByUsername.d.ts +0 -8
- package/dist/modules/users/fetchUserSuggestions.d.ts +0 -7
- package/dist/modules/users/index.d.ts +0 -22
- package/dist/modules/users/removeConnectionByUserId.d.ts +0 -10
- package/dist/modules/users/requestConnection.d.ts +0 -11
- package/dist/modules/users/updateUser.d.ts +0 -32
- package/dist/modules/workspaces/acceptInvite.d.ts +0 -13
- package/dist/modules/workspaces/acceptWorkspaceInvite.d.ts +0 -13
- package/dist/modules/workspaces/createInvite.d.ts +0 -17
- package/dist/modules/workspaces/createWorkspace.d.ts +0 -12
- package/dist/modules/workspaces/createWorkspaceInvite.d.ts +0 -66
- package/dist/modules/workspaces/declineInvite.d.ts +0 -12
- package/dist/modules/workspaces/declineWorkspaceInvite.d.ts +0 -14
- package/dist/modules/workspaces/deleteWorkspace.d.ts +0 -13
- package/dist/modules/workspaces/fetchManyWorkspaces.d.ts +0 -17
- package/dist/modules/workspaces/fetchMembers.d.ts +0 -13
- package/dist/modules/workspaces/fetchMyInvites.d.ts +0 -11
- package/dist/modules/workspaces/fetchMyWorkspaceInvites.d.ts +0 -15
- package/dist/modules/workspaces/fetchWorkspace.d.ts +0 -7
- package/dist/modules/workspaces/fetchWorkspaceAuthority.d.ts +0 -16
- package/dist/modules/workspaces/fetchWorkspaceInvites.d.ts +0 -17
- package/dist/modules/workspaces/fetchWorkspaceMemberStanding.d.ts +0 -15
- package/dist/modules/workspaces/fetchWorkspaceMembers.d.ts +0 -18
- package/dist/modules/workspaces/getAuthority.d.ts +0 -11
- package/dist/modules/workspaces/index.d.ts +0 -21
- package/dist/modules/workspaces/leaveWorkspace.d.ts +0 -12
- package/dist/modules/workspaces/removeWorkspaceMember.d.ts +0 -12
- package/dist/modules/workspaces/removeWorkspaceMemberFromSubtree.d.ts +0 -16
- package/dist/modules/workspaces/resendWorkspaceInvite.d.ts +0 -12
- package/dist/modules/workspaces/revokeWorkspaceInvite.d.ts +0 -13
- package/dist/modules/workspaces/transferWorkspaceOwnership.d.ts +0 -15
- package/dist/modules/workspaces/updateWorkspace.d.ts +0 -12
- package/dist/modules/workspaces/updateWorkspaceInheritFlag.d.ts +0 -13
- package/dist/modules/workspaces/updateWorkspaceMember.d.ts +0 -35
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface RequestNewAccessTokenProps {
|
|
3
|
-
/** Defaults to the SDK's stored refresh token (SDK-managed mode). */
|
|
4
|
-
refreshToken?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface RequestNewAccessTokenResponse {
|
|
7
|
-
accessToken: string;
|
|
8
|
-
/** The server rotates the refresh token on every refresh and returns the new one. */
|
|
9
|
-
refreshToken?: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Manually rotate the access token. The SDK auto-refreshes on 403 in
|
|
13
|
-
* SDK-managed mode, so this is rarely needed directly; it's exposed for parity
|
|
14
|
-
* and for host-managed callers that own their own refresh flow.
|
|
15
|
-
*/
|
|
16
|
-
export declare function requestNewAccessToken(client: SublayHttpClient, data?: RequestNewAccessTokenProps): Promise<RequestNewAccessTokenResponse>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface SendVerificationEmailProps {
|
|
3
|
-
/** "code" emails a short token; "link" emails a verification URL. Defaults to "code". */
|
|
4
|
-
mode?: "code" | "link";
|
|
5
|
-
tokenFormat?: "hex" | "numeric" | "alpha" | "alphanumeric";
|
|
6
|
-
tokenLength?: number;
|
|
7
|
-
/** For mode "link": where to send the user after the link is verified. */
|
|
8
|
-
redirectUrl?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface SendVerificationEmailResponse {
|
|
11
|
-
success: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare function sendVerificationEmail(client: SublayHttpClient, data?: SendVerificationEmailProps): Promise<SendVerificationEmailResponse>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface SetPasswordProps {
|
|
3
|
-
newPassword: string;
|
|
4
|
-
}
|
|
5
|
-
export interface SetPasswordResponse {
|
|
6
|
-
success: boolean;
|
|
7
|
-
message: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function setPassword(client: SublayHttpClient, data: SetPasswordProps): Promise<SetPasswordResponse>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { AuthUser } from "../../interfaces/User";
|
|
3
|
-
export interface SignInProps {
|
|
4
|
-
email: string;
|
|
5
|
-
password: string;
|
|
6
|
-
}
|
|
7
|
-
export interface SignInResponse {
|
|
8
|
-
user: AuthUser;
|
|
9
|
-
accessToken: string;
|
|
10
|
-
refreshToken: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function signIn(client: SublayHttpClient, data: SignInProps): Promise<SignInResponse>;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { PushDeviceIdentifier } from "../../interfaces/Push";
|
|
3
|
-
export interface SignOutProps {
|
|
4
|
-
/**
|
|
5
|
-
* Defaults to the SDK's stored refresh token (SDK-managed mode). Pass it
|
|
6
|
-
* explicitly in host-managed mode, where the SDK holds no refresh token.
|
|
7
|
-
*/
|
|
8
|
-
refreshToken?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Optional. When supplied — and the project has the `push` bundle — the
|
|
11
|
-
* server deletes this user's push binding for that device in the SAME
|
|
12
|
-
* transaction as the token-family destroy: signing out unbinds the device's
|
|
13
|
-
* push, or nothing happens at all.
|
|
14
|
-
*
|
|
15
|
-
* **Needs a refresh token to have any effect.** The unbind is scoped to the
|
|
16
|
-
* `sub` of the refresh token, which is what stops one account removing
|
|
17
|
-
* another account's binding on a shared device — so with no token there is no
|
|
18
|
-
* user to scope it to and the server answers `204` before it ever looks at
|
|
19
|
-
* `pushDevice`. When none can be resolved the field is DROPPED from the
|
|
20
|
-
* request rather than sent into that silent no-op, the sign-out proceeds
|
|
21
|
-
* normally, and the returned `pushUnbindSkipped` says so. Watch for it in
|
|
22
|
-
* **host-managed mode**: such a client is built with `getToken` and no
|
|
23
|
-
* `initialTokens`, and its `setTokens` is inert, so it starts with no refresh
|
|
24
|
-
* token and can never acquire one. Pass `refreshToken` explicitly alongside
|
|
25
|
-
* `pushDevice` there.
|
|
26
|
-
*
|
|
27
|
-
* If the unbind fails the request fails (HTTP 500, code
|
|
28
|
-
* `auth/device-deregistration-failed` or `auth/sign-out-failed`) and NOTHING
|
|
29
|
-
* is committed — the session survives so the caller can retry, and this call
|
|
30
|
-
* rethrows WITHOUT clearing the SDK's local tokens, so the credential that
|
|
31
|
-
* retry needs is still there.
|
|
32
|
-
*
|
|
33
|
-
* That is the ONLY failure that leaves you signed in. Every other one — a
|
|
34
|
-
* `429` from the rate limiter or a quota gate, a `423`, a `503`, a `400` on
|
|
35
|
-
* the body, a dropped connection — never touched a push binding, so it
|
|
36
|
-
* clears the local tokens and RESOLVES: a user must always be able to sign
|
|
37
|
-
* out. See `UNBIND_FAILURE_CODES`.
|
|
38
|
-
*
|
|
39
|
-
* Omit it and the request is byte-identical to before this field existed.
|
|
40
|
-
*/
|
|
41
|
-
pushDevice?: PushDeviceIdentifier;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Why the unbind did not happen. Present only when `pushUnbindSkipped` is
|
|
45
|
-
* `true`, and it exists because THE TWO SKIPS ARE RECOVERED DIFFERENTLY — a
|
|
46
|
-
* caller that cannot tell them apart can only ever pick the wrong remedy for
|
|
47
|
-
* one of them:
|
|
48
|
-
*
|
|
49
|
-
* - `no-refresh-token` — this SDK never asked. Nothing was destroyed either:
|
|
50
|
-
* with no token the server has no session to end, so the account, its
|
|
51
|
-
* credential and its binding are all still there. **Retryable**: re-issue
|
|
52
|
-
* the sign-out with an explicit `refreshToken` and the unbind happens.
|
|
53
|
-
* - `push-unbind-status-unknown` — the server was asked and could not answer.
|
|
54
|
-
* The sign-out itself DID commit, so the credential that would have driven a
|
|
55
|
-
* retry is gone; re-issuing achieves nothing. The binding clears when that
|
|
56
|
-
* account next registers on this device, or when the server prunes the token
|
|
57
|
-
* as undeliverable.
|
|
58
|
-
*/
|
|
59
|
-
export type PushUnbindSkipReason = "no-refresh-token" | "push-unbind-status-unknown";
|
|
60
|
-
export interface SignOutResult {
|
|
61
|
-
/**
|
|
62
|
-
* `true` whenever a `pushDevice` was supplied and the unbind did NOT happen,
|
|
63
|
-
* so this device's push binding for that account may still be live. Either
|
|
64
|
-
* the SDK declined to ask (no refresh token to scope the unbind to) or the
|
|
65
|
-
* server could not answer whether a binding exists; `pushUnbindSkipReason`
|
|
66
|
-
* says which, and the two are recovered differently.
|
|
67
|
-
*
|
|
68
|
-
* `false` means NO SKIP WAS REPORTED — by this SDK or by the server. It is
|
|
69
|
-
* not a promise that no skip happened, and the difference is not academic:
|
|
70
|
-
* the server declines the unbind for several reasons it answers with a plain
|
|
71
|
-
* `204`, and every one of them reads `false` here.
|
|
72
|
-
*
|
|
73
|
-
* - The refresh token is authentic but expired beyond the server's unbind
|
|
74
|
-
* window (90 days past `exp`), so there is no subject to scope the unbind
|
|
75
|
-
* to. Reachable from this SDK by passing an old `refreshToken` explicitly
|
|
76
|
-
* alongside `pushDevice`.
|
|
77
|
-
* - The refresh token is malformed or fails signature verification.
|
|
78
|
-
* - The project has no `push` bundle, so no binding can exist.
|
|
79
|
-
* - The unbind ran and matched zero rows — the binding was already gone, or
|
|
80
|
-
* was never registered under this device key.
|
|
81
|
-
*
|
|
82
|
-
* The server logs each of those under its own reason; only the case where it
|
|
83
|
-
* could not determine whether a binding exists is reported in the response,
|
|
84
|
-
* because that is the one where the binding may still be LIVE and nobody
|
|
85
|
-
* looked. The rest either prove there was nothing to remove or leave a device
|
|
86
|
-
* key the server cannot attribute to a user, and neither gives the caller
|
|
87
|
-
* anything to act on beyond what it already knows.
|
|
88
|
-
*
|
|
89
|
-
* A request that failed short of an unbind attempt reads `false` too — a
|
|
90
|
-
* gate's `429` or `423`, a `503`, a `400`, a dropped connection. Those clear
|
|
91
|
-
* the local tokens and resolve rather than reject (see `UNBIND_FAILURE_CODES`
|
|
92
|
-
* for why), and none of them is a REPORTED skip; they are logged with a
|
|
93
|
-
* warning instead.
|
|
94
|
-
*
|
|
95
|
-
* The sign-out itself is unaffected by the flag in both directions: a user
|
|
96
|
-
* must always be able to sign out, so a skipped unbind never fails the call
|
|
97
|
-
* and never leaves the local tokens in place.
|
|
98
|
-
*/
|
|
99
|
-
pushUnbindSkipped: boolean;
|
|
100
|
-
/** Set only when `pushUnbindSkipped` is `true`. See `PushUnbindSkipReason`. */
|
|
101
|
-
pushUnbindSkipReason?: PushUnbindSkipReason;
|
|
102
|
-
}
|
|
103
|
-
export declare function signOut(client: SublayHttpClient, data?: SignOutProps): Promise<SignOutResult>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { AuthUser } from "../../interfaces/User";
|
|
3
|
-
export interface SignUpProps {
|
|
4
|
-
email: string;
|
|
5
|
-
password: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
username?: string;
|
|
8
|
-
avatar?: string;
|
|
9
|
-
bio?: string;
|
|
10
|
-
location?: {
|
|
11
|
-
latitude: number;
|
|
12
|
-
longitude: number;
|
|
13
|
-
};
|
|
14
|
-
/** ISO 8601 datetime string. */
|
|
15
|
-
birthdate?: string;
|
|
16
|
-
metadata?: Record<string, any>;
|
|
17
|
-
secureMetadata?: Record<string, any>;
|
|
18
|
-
}
|
|
19
|
-
export interface SignUpResponse {
|
|
20
|
-
user: AuthUser;
|
|
21
|
-
accessToken: string;
|
|
22
|
-
refreshToken: string;
|
|
23
|
-
}
|
|
24
|
-
export declare function signUp(client: SublayHttpClient, data: SignUpProps): Promise<SignUpResponse>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { AuthUser } from "../../interfaces/User";
|
|
3
|
-
export interface VerifyExternalUserProps {
|
|
4
|
-
userJwt: string;
|
|
5
|
-
}
|
|
6
|
-
export interface VerifyExternalUserResponse {
|
|
7
|
-
user: AuthUser;
|
|
8
|
-
accessToken: string;
|
|
9
|
-
refreshToken: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function verifyExternalUser(client: SublayHttpClient, data: VerifyExternalUserProps): Promise<VerifyExternalUserResponse>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ConversationMember } from "../../interfaces/ConversationMember";
|
|
3
|
-
export interface AddMemberProps {
|
|
4
|
-
conversationId: string;
|
|
5
|
-
/** The member to add (the target). */
|
|
6
|
-
userId: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function addMember(client: SublayHttpClient, data: AddMemberProps): Promise<ConversationMember>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ConversationMember, ConversationMemberRole } from "../../interfaces/ConversationMember";
|
|
3
|
-
export interface ChangeMemberRoleProps {
|
|
4
|
-
conversationId: string;
|
|
5
|
-
/** The member whose role changes (the target). */
|
|
6
|
-
userId: string;
|
|
7
|
-
role: ConversationMemberRole;
|
|
8
|
-
}
|
|
9
|
-
export declare function changeMemberRole(client: SublayHttpClient, data: ChangeMemberRoleProps): Promise<ConversationMember>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Conversation } from "../../interfaces/Conversation";
|
|
3
|
-
export interface CreateDirectConversationProps {
|
|
4
|
-
/** The other participant (the target). */
|
|
5
|
-
userId: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function createDirectConversation(client: SublayHttpClient, data: CreateDirectConversationProps): Promise<Conversation>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Conversation } from "../../interfaces/Conversation";
|
|
3
|
-
export interface CreateGroupConversationProps {
|
|
4
|
-
name?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
/** Member user IDs to add to the group. Defaults to []. */
|
|
7
|
-
memberIds?: string[];
|
|
8
|
-
metadata?: Record<string, any>;
|
|
9
|
-
}
|
|
10
|
-
export declare function createGroupConversation(client: SublayHttpClient, data: CreateGroupConversationProps): Promise<Conversation>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface DeleteConversationProps {
|
|
3
|
-
conversationId: string;
|
|
4
|
-
}
|
|
5
|
-
export interface DeleteConversationResponse {
|
|
6
|
-
message: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function deleteConversation(client: SublayHttpClient, data: DeleteConversationProps): Promise<DeleteConversationResponse>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface DeleteMessageProps {
|
|
3
|
-
conversationId: string;
|
|
4
|
-
messageId: string;
|
|
5
|
-
}
|
|
6
|
-
export interface DeleteMessageResponse {
|
|
7
|
-
message: string;
|
|
8
|
-
/** Present when the author soft-deletes their own message. */
|
|
9
|
-
userDeletedAt?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function deleteMessage(client: SublayHttpClient, data: DeleteMessageProps): Promise<DeleteMessageResponse>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ChatMessage } from "../../interfaces/ChatMessage";
|
|
3
|
-
import { GifData } from "../../interfaces/Comment";
|
|
4
|
-
import { Mention } from "../../interfaces/Mention";
|
|
5
|
-
export interface EditMessageProps {
|
|
6
|
-
conversationId: string;
|
|
7
|
-
messageId: string;
|
|
8
|
-
content?: string;
|
|
9
|
-
/** A GIF attachment, or null to clear it. */
|
|
10
|
-
gif?: GifData | null;
|
|
11
|
-
mentions?: Mention[];
|
|
12
|
-
metadata?: Record<string, any> | null;
|
|
13
|
-
}
|
|
14
|
-
export declare function editMessage(client: SublayHttpClient, data: EditMessageProps): Promise<ChatMessage>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Conversation } from "../../interfaces/Conversation";
|
|
3
|
-
export interface GetConversationProps {
|
|
4
|
-
conversationId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function getConversation(client: SublayHttpClient, data: GetConversationProps): Promise<Conversation>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ChatMessage } from "../../interfaces/ChatMessage";
|
|
3
|
-
import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
|
|
4
|
-
export interface GetMessageProps extends SpaceReputationContextParams {
|
|
5
|
-
conversationId: string;
|
|
6
|
-
messageId: string;
|
|
7
|
-
/**
|
|
8
|
-
* Comma-separated associations to populate. Only `"grants"` is supported
|
|
9
|
-
* here — it attaches the message's reputation-grant summary.
|
|
10
|
-
*/
|
|
11
|
-
include?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function getMessage(client: SublayHttpClient, data: GetMessageProps): Promise<ChatMessage>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { listConversations } from "./listConversations";
|
|
2
|
-
export { createGroupConversation } from "./createGroupConversation";
|
|
3
|
-
export { createDirectConversation } from "./createDirectConversation";
|
|
4
|
-
export { getConversation } from "./getConversation";
|
|
5
|
-
export { updateConversation } from "./updateConversation";
|
|
6
|
-
export { deleteConversation } from "./deleteConversation";
|
|
7
|
-
export { getUnreadCount } from "./getUnreadCount";
|
|
8
|
-
export { listMembers } from "./listMembers";
|
|
9
|
-
export { addMember } from "./addMember";
|
|
10
|
-
export { removeMember } from "./removeMember";
|
|
11
|
-
export { leaveConversation } from "./leaveConversation";
|
|
12
|
-
export { changeMemberRole } from "./changeMemberRole";
|
|
13
|
-
export { listMessages } from "./listMessages";
|
|
14
|
-
export { sendMessage } from "./sendMessage";
|
|
15
|
-
export { getMessage } from "./getMessage";
|
|
16
|
-
export { editMessage } from "./editMessage";
|
|
17
|
-
export { deleteMessage } from "./deleteMessage";
|
|
18
|
-
export { toggleReaction } from "./toggleReaction";
|
|
19
|
-
export { listReactions } from "./listReactions";
|
|
20
|
-
export { markAsRead } from "./markAsRead";
|
|
21
|
-
export { muteConversation } from "./muteConversation";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ConversationPreview } from "../../interfaces/Conversation";
|
|
3
|
-
export interface ListConversationsProps {
|
|
4
|
-
/** Comma-separated conversation types, e.g. "direct,group,space". */
|
|
5
|
-
types?: string;
|
|
6
|
-
/** Cursor for keyset pagination: the `lastMessageAt` of the last item from the previous page (ISO datetime). */
|
|
7
|
-
cursor?: string;
|
|
8
|
-
/** Tie-breaker cursor: the `createdAt` of the last item from the previous page (ISO datetime). */
|
|
9
|
-
cursorCreatedAt?: string;
|
|
10
|
-
/** Default 20, max 50. */
|
|
11
|
-
limit?: number;
|
|
12
|
-
}
|
|
13
|
-
export interface ListConversationsResponse {
|
|
14
|
-
conversations: ConversationPreview[];
|
|
15
|
-
hasMore: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare function listConversations(client: SublayHttpClient, data?: ListConversationsProps): Promise<ListConversationsResponse>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ConversationMember } from "../../interfaces/ConversationMember";
|
|
3
|
-
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
|
|
5
|
-
export interface ListMembersProps extends SpaceReputationContextParams {
|
|
6
|
-
conversationId: string;
|
|
7
|
-
page?: number;
|
|
8
|
-
limit?: number;
|
|
9
|
-
role?: "admin" | "member";
|
|
10
|
-
}
|
|
11
|
-
export declare function listMembers(client: SublayHttpClient, data: ListMembersProps): Promise<PaginatedResponse<ConversationMember>>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ChatMessage } from "../../interfaces/ChatMessage";
|
|
3
|
-
import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
|
|
4
|
-
export interface MessageFilters {
|
|
5
|
-
/**
|
|
6
|
-
* Filter to messages that have thread replies (not quotings). `true` returns
|
|
7
|
-
* only messages with at least one thread reply; `false` returns only messages
|
|
8
|
-
* with none. Omit for no reply-count filtering.
|
|
9
|
-
*/
|
|
10
|
-
hasReplies?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface ListMessagesProps extends SpaceReputationContextParams {
|
|
13
|
-
conversationId: string;
|
|
14
|
-
/** Restrict to replies of this message (thread view). */
|
|
15
|
-
parentId?: string;
|
|
16
|
-
/** Keyset pagination: ISO timestamp; return messages created before this. Mutually exclusive with `after`. */
|
|
17
|
-
before?: string;
|
|
18
|
-
/** Keyset pagination: ISO timestamp; return messages created after this. Mutually exclusive with `before`. */
|
|
19
|
-
after?: string;
|
|
20
|
-
/** Page size (default 50, max 100). */
|
|
21
|
-
limit?: number;
|
|
22
|
-
sort?: "asc" | "desc";
|
|
23
|
-
/**
|
|
24
|
-
* Comma-separated associations to populate: `"files"` (message
|
|
25
|
-
* attachments) and `"grants"` (the reputation-grant summary). Combine
|
|
26
|
-
* them as `"files,grants"` — the server splits and trims this itself.
|
|
27
|
-
*/
|
|
28
|
-
include?: string;
|
|
29
|
-
/** Optional filters, e.g. `{ hasReplies: true }`. */
|
|
30
|
-
filters?: MessageFilters;
|
|
31
|
-
}
|
|
32
|
-
export interface ListMessagesResponse {
|
|
33
|
-
messages: ChatMessage[];
|
|
34
|
-
hasMore: boolean;
|
|
35
|
-
oldestCreatedAt: string | null;
|
|
36
|
-
newestCreatedAt: string | null;
|
|
37
|
-
/**
|
|
38
|
-
* Present only when a filter combination can't return results — e.g.
|
|
39
|
-
* `hasReplies: true` together with `parentId` (thread replies are one level
|
|
40
|
-
* deep and never have their own replies).
|
|
41
|
-
*/
|
|
42
|
-
notice?: string;
|
|
43
|
-
}
|
|
44
|
-
export declare function listMessages(client: SublayHttpClient, data: ListMessagesProps): Promise<ListMessagesResponse>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { User } from "../../interfaces/User";
|
|
3
|
-
import { PaginationMetadata } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
|
|
5
|
-
export interface ListReactionsProps extends SpaceReputationContextParams {
|
|
6
|
-
conversationId: string;
|
|
7
|
-
messageId: string;
|
|
8
|
-
/** The reaction emoji to list reactors for (required). */
|
|
9
|
-
emoji: string;
|
|
10
|
-
/** Page number (default 1). */
|
|
11
|
-
page?: number;
|
|
12
|
-
/** Page size (default 50, max 100). */
|
|
13
|
-
limit?: number;
|
|
14
|
-
}
|
|
15
|
-
export interface MessageReaction {
|
|
16
|
-
user: User;
|
|
17
|
-
emoji: string;
|
|
18
|
-
createdAt: Date;
|
|
19
|
-
}
|
|
20
|
-
export interface ListReactionsResponse {
|
|
21
|
-
data: MessageReaction[];
|
|
22
|
-
pagination: PaginationMetadata;
|
|
23
|
-
}
|
|
24
|
-
export declare function listReactions(client: SublayHttpClient, data: ListReactionsProps): Promise<ListReactionsResponse>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface MarkAsReadProps {
|
|
3
|
-
conversationId: string;
|
|
4
|
-
/** The message up to which the conversation is marked read (uuid, required). */
|
|
5
|
-
messageId: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function markAsRead(client: SublayHttpClient, data: MarkAsReadProps): Promise<{
|
|
8
|
-
message: string;
|
|
9
|
-
}>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ConversationMember } from "../../interfaces/ConversationMember";
|
|
3
|
-
import { MuteDuration } from "../../interfaces/Push";
|
|
4
|
-
export interface MuteConversationProps {
|
|
5
|
-
conversationId: string;
|
|
6
|
-
/**
|
|
7
|
-
* The duration CHOICE (`8h` / `24h` / `1w` / `forever`), or `null` to clear
|
|
8
|
-
* the mute. Never a raw timestamp — the server resolves it and represents
|
|
9
|
-
* "forever" via the returned member's explicit `mutedForever` signal.
|
|
10
|
-
*/
|
|
11
|
-
duration: MuteDuration | null;
|
|
12
|
-
}
|
|
13
|
-
export interface MuteConversationResponse {
|
|
14
|
-
currentMember: ConversationMember;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Set / clear the logged-in user's conversation mute.
|
|
18
|
-
*
|
|
19
|
-
* Mirrors `POST /:projectId/chat/conversations/:conversationId/mute`. The actor
|
|
20
|
-
* is derived from the user token (Rule A) — a user only mutes their own
|
|
21
|
-
* membership, so there is no `userId` param.
|
|
22
|
-
*/
|
|
23
|
-
export declare function muteConversation(client: SublayHttpClient, data: MuteConversationProps): Promise<MuteConversationResponse>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface RemoveMemberProps {
|
|
3
|
-
conversationId: string;
|
|
4
|
-
/** The member to remove (the target). */
|
|
5
|
-
userId: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function removeMember(client: SublayHttpClient, data: RemoveMemberProps): Promise<{
|
|
8
|
-
message: string;
|
|
9
|
-
}>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface ReportMessageProps {
|
|
3
|
-
conversationId: string;
|
|
4
|
-
messageId: string;
|
|
5
|
-
reason: string;
|
|
6
|
-
details?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ReportMessageResponse {
|
|
9
|
-
message: string;
|
|
10
|
-
code: string;
|
|
11
|
-
}
|
|
12
|
-
export declare function reportMessage(client: SublayHttpClient, data: ReportMessageProps): Promise<ReportMessageResponse>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ChatMessage } from "../../interfaces/ChatMessage";
|
|
3
|
-
import { GifData } from "../../interfaces/Comment";
|
|
4
|
-
import { Mention } from "../../interfaces/Mention";
|
|
5
|
-
import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
|
|
6
|
-
export interface SendMessageProps extends SpaceReputationContextParams {
|
|
7
|
-
conversationId: string;
|
|
8
|
-
content?: string;
|
|
9
|
-
gif?: GifData | null;
|
|
10
|
-
mentions?: Mention[];
|
|
11
|
-
parentMessageId?: string;
|
|
12
|
-
quotedMessageId?: string;
|
|
13
|
-
metadata?: Record<string, any>;
|
|
14
|
-
/** Client-generated id echoed back on the created message (not stored). */
|
|
15
|
-
localId?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Optional file attachments (browser `File`/`Blob`), up to 10. When present
|
|
18
|
-
* the request is sent as `multipart/form-data`; otherwise it's a JSON body.
|
|
19
|
-
*/
|
|
20
|
-
files?: (Blob | File)[];
|
|
21
|
-
}
|
|
22
|
-
export declare function sendMessage(client: SublayHttpClient, data: SendMessageProps): Promise<ChatMessage>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface ToggleReactionProps {
|
|
3
|
-
conversationId: string;
|
|
4
|
-
messageId: string;
|
|
5
|
-
/** The reaction emoji (required, 1–10 chars). */
|
|
6
|
-
emoji: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ToggleReactionResponse {
|
|
9
|
-
/** Updated emoji → count map for the message. */
|
|
10
|
-
reactionCounts: Record<string, number>;
|
|
11
|
-
/** Emojis the acting user has reacted with after the toggle. */
|
|
12
|
-
userReactions: string[];
|
|
13
|
-
/** +1 if the reaction was added, -1 if it was removed. */
|
|
14
|
-
delta: 1 | -1;
|
|
15
|
-
}
|
|
16
|
-
export declare function toggleReaction(client: SublayHttpClient, data: ToggleReactionProps): Promise<ToggleReactionResponse>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Conversation } from "../../interfaces/Conversation";
|
|
3
|
-
export interface UpdateConversationProps {
|
|
4
|
-
conversationId: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
/** File id for the conversation avatar, or null to clear it. */
|
|
8
|
-
avatarFileId?: string | null;
|
|
9
|
-
/** Space conversations only: who may post. */
|
|
10
|
-
postingPermission?: "members" | "admins";
|
|
11
|
-
}
|
|
12
|
-
export declare function updateConversation(client: SublayHttpClient, data: UpdateConversationProps): Promise<Conversation>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
export interface AddEntityToCollectionProps {
|
|
3
|
-
collectionId: string;
|
|
4
|
-
entityId: string;
|
|
5
|
-
}
|
|
6
|
-
export interface CollectionEntityMutationResponse {
|
|
7
|
-
success: boolean;
|
|
8
|
-
collection: {
|
|
9
|
-
id: string;
|
|
10
|
-
entityCount: number;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare function addEntityToCollection(client: SublayHttpClient, data: AddEntityToCollectionProps): Promise<CollectionEntityMutationResponse>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Collection } from "../../interfaces/Collection";
|
|
3
|
-
export interface CreateNewCollectionProps {
|
|
4
|
-
/** The parent collection under which to create the sub-collection. */
|
|
5
|
-
collectionId: string;
|
|
6
|
-
collectionName: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function createNewCollection(client: SublayHttpClient, data: CreateNewCollectionProps): Promise<Collection>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Entity } from "../../interfaces/Entity";
|
|
3
|
-
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
export interface FetchCollectionEntitiesProps {
|
|
5
|
-
collectionId: string;
|
|
6
|
-
page?: number;
|
|
7
|
-
limit?: number;
|
|
8
|
-
sortBy?: "new" | "added" | "top" | "hot";
|
|
9
|
-
sortDir?: "asc" | "desc";
|
|
10
|
-
/** Comma-separated list of associations to populate, e.g. "user". */
|
|
11
|
-
include?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function fetchCollectionEntities(client: SublayHttpClient, data: FetchCollectionEntitiesProps): Promise<PaginatedResponse<Entity>>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Collection } from "../../interfaces/Collection";
|
|
3
|
-
export interface FetchSubCollectionsProps {
|
|
4
|
-
collectionId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function fetchSubCollections(client: SublayHttpClient, data: FetchSubCollectionsProps): Promise<Collection[]>;
|