@sublay/js 7.3.0 → 7.4.0

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.
@@ -2,3 +2,4 @@ export { searchContent } from "./searchContent";
2
2
  export { searchUsers } from "./searchUsers";
3
3
  export { searchSpaces } from "./searchSpaces";
4
4
  export { askContent } from "./askContent";
5
+ export { matchUsers } from "./matchUsers";
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sublay/js",
3
- "version": "7.3.0",
3
+ "version": "7.4.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [