@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.
- package/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +23 -14
- package/dist/index.d.mts +374 -21
- package/dist/index.d.ts +4364 -31
- package/dist/index.js +53 -19
- package/dist/index.mjs +53 -19
- 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 -32
- package/dist/interfaces/Collection.d.ts +0 -10
- package/dist/interfaces/Comment.d.ts +0 -42
- 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 -55
- 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/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 -148
- 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 -8
- 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 -40
- 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/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 -17
- 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 -13
- 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 -11
- package/dist/modules/workspaces/fetchWorkspaceInvites.d.ts +0 -17
- package/dist/modules/workspaces/fetchWorkspaceMemberStanding.d.ts +0 -11
- package/dist/modules/workspaces/fetchWorkspaceMembers.d.ts +0 -13
- 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 -11
- 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 -17
|
@@ -1,40 +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
|
-
/** Comma-separated associations to populate, e.g. "files". */
|
|
24
|
-
include?: string;
|
|
25
|
-
/** Optional filters, e.g. `{ hasReplies: true }`. */
|
|
26
|
-
filters?: MessageFilters;
|
|
27
|
-
}
|
|
28
|
-
export interface ListMessagesResponse {
|
|
29
|
-
messages: ChatMessage[];
|
|
30
|
-
hasMore: boolean;
|
|
31
|
-
oldestCreatedAt: string | null;
|
|
32
|
-
newestCreatedAt: string | null;
|
|
33
|
-
/**
|
|
34
|
-
* Present only when a filter combination can't return results — e.g.
|
|
35
|
-
* `hasReplies: true` together with `parentId` (thread replies are one level
|
|
36
|
-
* deep and never have their own replies).
|
|
37
|
-
*/
|
|
38
|
-
notice?: string;
|
|
39
|
-
}
|
|
40
|
-
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[]>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { fetchRootCollection } from "./fetchRootCollection";
|
|
2
|
-
export { fetchSubCollections } from "./fetchSubCollections";
|
|
3
|
-
export { createNewCollection } from "./createNewCollection";
|
|
4
|
-
export { fetchCollectionEntities } from "./fetchCollectionEntities";
|
|
5
|
-
export { addEntityToCollection } from "./addEntityToCollection";
|
|
6
|
-
export { removeEntityFromCollection } from "./removeEntityFromCollection";
|
|
7
|
-
export { updateCollection } from "./updateCollection";
|
|
8
|
-
export { deleteCollection } from "./deleteCollection";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { CollectionEntityMutationResponse } from "./addEntityToCollection";
|
|
3
|
-
export interface RemoveEntityFromCollectionProps {
|
|
4
|
-
collectionId: string;
|
|
5
|
-
entityId: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function removeEntityFromCollection(client: SublayHttpClient, data: RemoveEntityFromCollectionProps): Promise<CollectionEntityMutationResponse>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Collection } from "../../interfaces/Collection";
|
|
3
|
-
export interface UpdateCollectionProps {
|
|
4
|
-
collectionId: string;
|
|
5
|
-
name: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function updateCollection(client: SublayHttpClient, data: UpdateCollectionProps): Promise<Collection>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ReactionType } from "../../interfaces/Reaction";
|
|
3
|
-
import { Comment } from "../../interfaces/Comment";
|
|
4
|
-
export interface AddCommentReactionProps {
|
|
5
|
-
commentId: string;
|
|
6
|
-
reactionType: ReactionType;
|
|
7
|
-
}
|
|
8
|
-
export declare function addReaction(client: SublayHttpClient, data: AddCommentReactionProps): Promise<Comment>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Comment, GifData } from "../../interfaces/Comment";
|
|
3
|
-
import { Mention } from "../../interfaces/Mention";
|
|
4
|
-
export interface CreateCommentProps {
|
|
5
|
-
entityId: string;
|
|
6
|
-
foreignId?: string;
|
|
7
|
-
content?: string;
|
|
8
|
-
gif?: GifData | null;
|
|
9
|
-
mentions?: Mention[];
|
|
10
|
-
parentId?: string | null;
|
|
11
|
-
referencedCommentId?: string;
|
|
12
|
-
attachments?: Record<string, any>[];
|
|
13
|
-
metadata?: Record<string, any>;
|
|
14
|
-
}
|
|
15
|
-
export declare function createComment(client: SublayHttpClient, data: CreateCommentProps): Promise<Comment>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Comment } from "../../interfaces/Comment";
|
|
3
|
-
import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
|
|
4
|
-
export interface FetchCommentProps extends SpaceReputationContextParams {
|
|
5
|
-
commentId: string;
|
|
6
|
-
include?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function fetchComment(client: SublayHttpClient, data: FetchCommentProps): Promise<Comment>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Comment } from "../../interfaces/Comment";
|
|
3
|
-
export interface FetchCommentByForeignIdProps {
|
|
4
|
-
foreignId: string;
|
|
5
|
-
include?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function fetchCommentByForeignId(client: SublayHttpClient, data: FetchCommentByForeignIdProps): Promise<Comment>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Comment } from "../../interfaces/Comment";
|
|
3
|
-
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
|
|
5
|
-
export interface FetchManyCommentsProps extends SpaceReputationContextParams {
|
|
6
|
-
entityId?: string;
|
|
7
|
-
userId?: string;
|
|
8
|
-
parentId?: string;
|
|
9
|
-
page?: number;
|
|
10
|
-
limit?: number;
|
|
11
|
-
sortBy?: "createdAt" | "top" | "controversial"
|
|
12
|
-
/** @deprecated Use "createdAt" instead. "new" is a directional alias for
|
|
13
|
-
* createdAt DESC, removed in v8; the server still accepts it (identical
|
|
14
|
-
* behavior) but responds with deprecation headers. */
|
|
15
|
-
| "new"
|
|
16
|
-
/** @deprecated Use "createdAt" with sortDir:"asc" instead. "old" is a
|
|
17
|
-
* directional alias for createdAt ASC, removed in v8; the server still
|
|
18
|
-
* accepts it (identical behavior) but responds with deprecation headers. */
|
|
19
|
-
| "old";
|
|
20
|
-
/** Sort direction for `sortBy: "createdAt"`. Defaults to "desc". */
|
|
21
|
-
sortDir?: "asc" | "desc";
|
|
22
|
-
include?: string;
|
|
23
|
-
sourceId?: string;
|
|
24
|
-
blockedFilter?: "exclude" | "include-outbound-blocked";
|
|
25
|
-
}
|
|
26
|
-
export declare function fetchManyComments(client: SublayHttpClient, data: FetchManyCommentsProps): Promise<PaginatedResponse<Comment>>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Reaction, ReactionType } from "../../interfaces/Reaction";
|
|
3
|
-
import { PaginationMetadata } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
|
|
5
|
-
export interface FetchCommentReactionsProps extends SpaceReputationContextParams {
|
|
6
|
-
commentId: string;
|
|
7
|
-
reactionType?: ReactionType;
|
|
8
|
-
page?: number;
|
|
9
|
-
limit?: number;
|
|
10
|
-
sortDir?: "asc" | "desc";
|
|
11
|
-
}
|
|
12
|
-
export interface FetchCommentReactionsResponse {
|
|
13
|
-
data: Reaction[];
|
|
14
|
-
pagination: PaginationMetadata;
|
|
15
|
-
}
|
|
16
|
-
export declare function fetchReactions(client: SublayHttpClient, data: FetchCommentReactionsProps): Promise<FetchCommentReactionsResponse>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ReactionType } from "../../interfaces/Reaction";
|
|
3
|
-
export interface GetUserCommentReactionProps {
|
|
4
|
-
commentId: string;
|
|
5
|
-
}
|
|
6
|
-
export interface UserCommentReactionResponse {
|
|
7
|
-
reactionType: ReactionType | null;
|
|
8
|
-
}
|
|
9
|
-
export declare function getUserReaction(client: SublayHttpClient, data: GetUserCommentReactionProps): Promise<UserCommentReactionResponse>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { createComment } from "./createComment";
|
|
2
|
-
export { fetchComment } from "./fetchComment";
|
|
3
|
-
export { fetchCommentByForeignId } from "./fetchCommentByForeignId";
|
|
4
|
-
export { updateComment } from "./updateComment";
|
|
5
|
-
export { deleteComment } from "./deleteComment";
|
|
6
|
-
export { fetchManyComments } from "./fetchManyComments";
|
|
7
|
-
export { addReaction } from "./addReaction";
|
|
8
|
-
export { removeReaction } from "./removeReaction";
|
|
9
|
-
export { fetchReactions } from "./fetchReactions";
|
|
10
|
-
export { getUserReaction } from "./getUserReaction";
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Comment } from "../../interfaces/Comment";
|
|
3
|
-
export interface RemoveCommentReactionProps {
|
|
4
|
-
commentId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function removeReaction(client: SublayHttpClient, data: RemoveCommentReactionProps): Promise<Comment>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Comment } from "../../interfaces/Comment";
|
|
3
|
-
export interface UpdateCommentProps {
|
|
4
|
-
commentId: string;
|
|
5
|
-
/** New text content. Cannot be empty. Omit to leave the content untouched. */
|
|
6
|
-
content?: string;
|
|
7
|
-
/** Replaces the comment's metadata wholesale (not merged). */
|
|
8
|
-
metadata?: Record<string, any>;
|
|
9
|
-
}
|
|
10
|
-
export declare function updateComment(client: SublayHttpClient, data: UpdateCommentProps): Promise<Comment>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ConnectionActionResponse } from "../../interfaces/Connection";
|
|
3
|
-
export interface AcceptConnectionProps {
|
|
4
|
-
connectionId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function acceptConnection(client: SublayHttpClient, data: AcceptConnectionProps): Promise<ConnectionActionResponse>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { ConnectionActionResponse } from "../../interfaces/Connection";
|
|
3
|
-
export interface DeclineConnectionProps {
|
|
4
|
-
connectionId: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function declineConnection(client: SublayHttpClient, data: DeclineConnectionProps): Promise<ConnectionActionResponse>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { EstablishedConnection } from "../../interfaces/Connection";
|
|
3
|
-
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
import { UserSearchParams } from "../../interfaces/UserSearch";
|
|
5
|
-
export interface FetchConnectionsProps extends UserSearchParams {
|
|
6
|
-
page?: number;
|
|
7
|
-
limit?: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function fetchConnections(client: SublayHttpClient, data: FetchConnectionsProps): Promise<PaginatedResponse<EstablishedConnection>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { PendingConnection } from "../../interfaces/Connection";
|
|
3
|
-
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
export interface FetchReceivedPendingConnectionsProps {
|
|
5
|
-
page?: number;
|
|
6
|
-
limit?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare function fetchReceivedPendingConnections(client: SublayHttpClient, data: FetchReceivedPendingConnectionsProps): Promise<PaginatedResponse<PendingConnection>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { PendingConnection } from "../../interfaces/Connection";
|
|
3
|
-
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
export interface FetchSentPendingConnectionsProps {
|
|
5
|
-
page?: number;
|
|
6
|
-
limit?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare function fetchSentPendingConnections(client: SublayHttpClient, data: FetchSentPendingConnectionsProps): Promise<PaginatedResponse<PendingConnection>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { fetchConnections } from "./fetchConnections";
|
|
2
|
-
export { fetchConnectionsCount } from "./fetchConnectionsCount";
|
|
3
|
-
export { fetchSentPendingConnections } from "./fetchSentPendingConnections";
|
|
4
|
-
export { fetchReceivedPendingConnections } from "./fetchReceivedPendingConnections";
|
|
5
|
-
export { acceptConnection } from "./acceptConnection";
|
|
6
|
-
export { declineConnection } from "./declineConnection";
|
|
7
|
-
export { removeConnection } from "./removeConnection";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Entity } from "../../interfaces/Entity";
|
|
3
|
-
import { ReactionType } from "../../interfaces/Reaction";
|
|
4
|
-
export interface AddEntityReactionProps {
|
|
5
|
-
entityId: string;
|
|
6
|
-
reactionType: ReactionType;
|
|
7
|
-
}
|
|
8
|
-
export declare function addReaction(client: SublayHttpClient, data: AddEntityReactionProps): Promise<Entity>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Entity } from "../../interfaces/Entity";
|
|
3
|
-
import { Mention } from "../../interfaces/Mention";
|
|
4
|
-
export interface CreateEntityProps {
|
|
5
|
-
foreignId?: string;
|
|
6
|
-
sourceId?: string;
|
|
7
|
-
spaceId?: string;
|
|
8
|
-
title?: string;
|
|
9
|
-
content?: string;
|
|
10
|
-
attachments?: Record<string, any>[];
|
|
11
|
-
keywords?: string[];
|
|
12
|
-
mentions?: Mention[];
|
|
13
|
-
location?: {
|
|
14
|
-
latitude: number;
|
|
15
|
-
longitude: number;
|
|
16
|
-
};
|
|
17
|
-
metadata?: Record<string, any>;
|
|
18
|
-
nsfw?: boolean;
|
|
19
|
-
isDraft?: boolean;
|
|
20
|
-
/** Create the entity without attributing it to the logged-in user (authorless). */
|
|
21
|
-
excludeUserId?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export declare function createEntity(client: SublayHttpClient, data: CreateEntityProps): Promise<Entity>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Entity } from "../../interfaces/Entity";
|
|
3
|
-
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
export interface FetchDraftsProps {
|
|
5
|
-
page?: number;
|
|
6
|
-
limit?: number;
|
|
7
|
-
sourceId?: string;
|
|
8
|
-
spaceId?: string;
|
|
9
|
-
include?: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function fetchDrafts(client: SublayHttpClient, data: FetchDraftsProps): Promise<PaginatedResponse<Entity>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Entity } from "../../interfaces/Entity";
|
|
3
|
-
import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
|
|
4
|
-
export interface FetchEntityProps extends SpaceReputationContextParams {
|
|
5
|
-
entityId: string;
|
|
6
|
-
include?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function fetchEntity(client: SublayHttpClient, data: FetchEntityProps): Promise<Entity>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Entity } from "../../interfaces/Entity";
|
|
3
|
-
export interface FetchEntityByForeignIdProps {
|
|
4
|
-
foreignId: string;
|
|
5
|
-
createIfNotFound?: boolean;
|
|
6
|
-
include?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function fetchEntityByForeignId(client: SublayHttpClient, data: FetchEntityByForeignIdProps): Promise<Entity>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Entity } from "../../interfaces/Entity";
|
|
3
|
-
export interface FetchEntityByShortIdProps {
|
|
4
|
-
shortId: string;
|
|
5
|
-
include?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function fetchEntityByShortId(client: SublayHttpClient, data: FetchEntityByShortIdProps): Promise<Entity>;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { SublayHttpClient } from "../../core/client";
|
|
2
|
-
import { Entity } from "../../interfaces/Entity";
|
|
3
|
-
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
import { SpaceReputationContextParams } from "../../interfaces/SpaceReputation";
|
|
5
|
-
export interface KeywordsFilters {
|
|
6
|
-
includes?: string[];
|
|
7
|
-
doesNotInclude?: string[];
|
|
8
|
-
}
|
|
9
|
-
export interface MetadataFilters {
|
|
10
|
-
includes?: {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
};
|
|
13
|
-
includesAny?: {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}[];
|
|
16
|
-
doesNotInclude?: {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
};
|
|
19
|
-
exists?: string[];
|
|
20
|
-
doesNotExist?: string[];
|
|
21
|
-
}
|
|
22
|
-
export interface TextFilters {
|
|
23
|
-
hasTitle?: "true" | "false";
|
|
24
|
-
includes?: string | string[];
|
|
25
|
-
doesNotInclude?: string | string[];
|
|
26
|
-
}
|
|
27
|
-
export interface AttachmentsFilters {
|
|
28
|
-
hasAttachments?: "true" | "false";
|
|
29
|
-
}
|
|
30
|
-
export interface LocationFilters {
|
|
31
|
-
latitude: string;
|
|
32
|
-
longitude: string;
|
|
33
|
-
radius: string;
|
|
34
|
-
}
|
|
35
|
-
export interface FetchManyEntitiesProps extends SpaceReputationContextParams {
|
|
36
|
-
sourceId?: string;
|
|
37
|
-
spaceId?: string;
|
|
38
|
-
sortBy?: "createdAt" | "hot" | "top" | "controversial"
|
|
39
|
-
/** @deprecated Use "createdAt" instead. "new" is a directional alias removed
|
|
40
|
-
* in v8; the server still accepts it (identical behavior) but responds with
|
|
41
|
-
* deprecation headers. */
|
|
42
|
-
| "new" | (string & {});
|
|
43
|
-
sortDir?: "asc" | "desc";
|
|
44
|
-
sortType?: "auto" | "numeric" | "text" | "boolean" | "timestamp";
|
|
45
|
-
sortByReaction?: "upvote" | "downvote" | "like" | "love" | "wow" | "sad" | "angry" | "funny";
|
|
46
|
-
page?: number;
|
|
47
|
-
limit?: number;
|
|
48
|
-
include?: string;
|
|
49
|
-
timeFrame?: "hour" | "day" | "week" | "month" | "year";
|
|
50
|
-
userId?: string;
|
|
51
|
-
followedOnly?: "true" | "false";
|
|
52
|
-
keywordsFilters?: KeywordsFilters;
|
|
53
|
-
metadataFilters?: MetadataFilters;
|
|
54
|
-
titleFilters?: TextFilters;
|
|
55
|
-
contentFilters?: {
|
|
56
|
-
hasContent?: "true" | "false";
|
|
57
|
-
includes?: string | string[];
|
|
58
|
-
doesNotInclude?: string | string[];
|
|
59
|
-
};
|
|
60
|
-
attachmentsFilters?: AttachmentsFilters;
|
|
61
|
-
locationFilters?: LocationFilters;
|
|
62
|
-
nsfwFilter?: "include-all" | "exclude" | "only";
|
|
63
|
-
blockedFilter?: "exclude" | "include-outbound-blocked";
|
|
64
|
-
}
|
|
65
|
-
export declare function fetchManyEntities(client: SublayHttpClient, data: FetchManyEntitiesProps): Promise<PaginatedResponse<Entity>>;
|