@sublay/js 7.3.0 → 7.4.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/dist/core/spaceReputationParams.d.ts +57 -0
- package/dist/index.d.mts +114 -14
- package/dist/index.d.ts +1 -0
- package/dist/index.js +390 -29
- package/dist/index.mjs +390 -29
- package/dist/interfaces/SpaceReputation.d.ts +44 -6
- package/dist/interfaces/UserSearch.d.ts +13 -0
- package/dist/modules/connections/fetchConnections.d.ts +2 -1
- package/dist/modules/follows/fetchFollowers.d.ts +2 -1
- package/dist/modules/follows/fetchFollowing.d.ts +2 -1
- package/dist/modules/search/askContent.d.ts +6 -0
- package/dist/modules/search/index.d.ts +1 -0
- package/dist/modules/search/matchUsers.d.ts +36 -0
- package/dist/modules/search/searchContent.d.ts +6 -0
- package/dist/modules/users/fetchConnectionsByUserId.d.ts +2 -1
- package/dist/modules/users/fetchFollowersByUserId.d.ts +2 -1
- package/dist/modules/users/fetchFollowingByUserId.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SublayHttpClient } from "../../core/client";
|
|
2
2
|
import { EstablishedConnection } from "../../interfaces/Connection";
|
|
3
3
|
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
|
|
4
|
+
import { UserSearchParams } from "../../interfaces/UserSearch";
|
|
5
|
+
export interface FetchConnectionsProps extends UserSearchParams {
|
|
5
6
|
page?: number;
|
|
6
7
|
limit?: number;
|
|
7
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SublayHttpClient } from "../../core/client";
|
|
2
2
|
import { FollowListItem } from "../../interfaces/Follow";
|
|
3
3
|
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
|
|
4
|
+
import { UserSearchParams } from "../../interfaces/UserSearch";
|
|
5
|
+
export interface FetchFollowersProps extends UserSearchParams {
|
|
5
6
|
page?: number;
|
|
6
7
|
limit?: number;
|
|
7
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SublayHttpClient } from "../../core/client";
|
|
2
2
|
import { FollowListItem } from "../../interfaces/Follow";
|
|
3
3
|
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
|
-
|
|
4
|
+
import { UserSearchParams } from "../../interfaces/UserSearch";
|
|
5
|
+
export interface FetchFollowingProps extends UserSearchParams {
|
|
5
6
|
page?: number;
|
|
6
7
|
limit?: number;
|
|
7
8
|
}
|
|
@@ -5,6 +5,12 @@ export interface AskContentProps extends SpaceReputationContextParams {
|
|
|
5
5
|
query: string;
|
|
6
6
|
sourceTypes?: ("entity" | "comment" | "message")[];
|
|
7
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;
|
|
8
14
|
conversationId?: string;
|
|
9
15
|
limit?: number;
|
|
10
16
|
/** Abort the in-flight stream (e.g. when the user navigates away). */
|
|
@@ -0,0 +1,36 @@
|
|
|
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>;
|
|
@@ -7,6 +7,12 @@ export interface SearchContentProps extends SpaceReputationContextParams {
|
|
|
7
7
|
query: string;
|
|
8
8
|
sourceTypes?: ("entity" | "comment" | "message")[];
|
|
9
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;
|
|
10
16
|
conversationId?: string;
|
|
11
17
|
limit?: number;
|
|
12
18
|
}
|
|
@@ -2,7 +2,8 @@ import { SublayHttpClient } from "../../core/client";
|
|
|
2
2
|
import { EstablishedConnection } from "../../interfaces/Connection";
|
|
3
3
|
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
4
|
import { SpaceReputationUserParams } from "../../interfaces/SpaceReputation";
|
|
5
|
-
|
|
5
|
+
import { UserSearchParams } from "../../interfaces/UserSearch";
|
|
6
|
+
export interface FetchConnectionsByUserIdProps extends SpaceReputationUserParams, UserSearchParams {
|
|
6
7
|
userId: string;
|
|
7
8
|
page?: number;
|
|
8
9
|
limit?: number;
|
|
@@ -2,7 +2,8 @@ import { SublayHttpClient } from "../../core/client";
|
|
|
2
2
|
import { FollowListItem } from "../../interfaces/Follow";
|
|
3
3
|
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
4
|
import { SpaceReputationUserParams } from "../../interfaces/SpaceReputation";
|
|
5
|
-
|
|
5
|
+
import { UserSearchParams } from "../../interfaces/UserSearch";
|
|
6
|
+
export interface FetchFollowersByUserIdProps extends SpaceReputationUserParams, UserSearchParams {
|
|
6
7
|
userId: string;
|
|
7
8
|
page?: number;
|
|
8
9
|
limit?: number;
|
|
@@ -2,7 +2,8 @@ import { SublayHttpClient } from "../../core/client";
|
|
|
2
2
|
import { FollowListItem } from "../../interfaces/Follow";
|
|
3
3
|
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
4
4
|
import { SpaceReputationUserParams } from "../../interfaces/SpaceReputation";
|
|
5
|
-
|
|
5
|
+
import { UserSearchParams } from "../../interfaces/UserSearch";
|
|
6
|
+
export interface FetchFollowingByUserIdProps extends SpaceReputationUserParams, UserSearchParams {
|
|
6
7
|
userId: string;
|
|
7
8
|
page?: number;
|
|
8
9
|
limit?: number;
|