@sublay/js 7.4.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/index.d.mts CHANGED
@@ -555,7 +555,21 @@ interface PaginatedResponse<T> {
555
555
  pagination: PaginationMetadata;
556
556
  }
557
557
 
558
- interface FetchFollowersByUserIdProps extends SpaceReputationUserParams {
558
+ /**
559
+ * Shared optional params for text-searching a list of users
560
+ * (followers / following / connections).
561
+ *
562
+ * - `query` — free-text search term. When omitted, no filtering is applied.
563
+ * - `searchFields` — narrows which user field the term matches against. When
564
+ * omitted, the term matches either `username` OR `name` (case-insensitive
565
+ * substring). `"username"` / `"name"` restrict the match to that one field.
566
+ */
567
+ interface UserSearchParams {
568
+ query?: string;
569
+ searchFields?: "username" | "name";
570
+ }
571
+
572
+ interface FetchFollowersByUserIdProps extends SpaceReputationUserParams, UserSearchParams {
559
573
  userId: string;
560
574
  page?: number;
561
575
  limit?: number;
@@ -570,7 +584,7 @@ interface FollowersCountResponse$1 {
570
584
  }
571
585
  declare function fetchFollowersCountByUserId(client: SublayHttpClient, data: FetchFollowersCountByUserIdProps): Promise<FollowersCountResponse$1>;
572
586
 
573
- interface FetchFollowingByUserIdProps extends SpaceReputationUserParams {
587
+ interface FetchFollowingByUserIdProps extends SpaceReputationUserParams, UserSearchParams {
574
588
  userId: string;
575
589
  page?: number;
576
590
  limit?: number;
@@ -644,7 +658,7 @@ interface ConnectionStatusDeclined {
644
658
  }
645
659
  type ConnectionStatusResponse = ConnectionStatusNone | ConnectionStatusPending | ConnectionStatusConnected | ConnectionStatusDeclined;
646
660
 
647
- interface FetchConnectionsByUserIdProps extends SpaceReputationUserParams {
661
+ interface FetchConnectionsByUserIdProps extends SpaceReputationUserParams, UserSearchParams {
648
662
  userId: string;
649
663
  page?: number;
650
664
  limit?: number;
@@ -2148,13 +2162,13 @@ declare namespace Collections {
2148
2162
  export { Collections_addEntityToCollection as addEntityToCollection, Collections_createNewCollection as createNewCollection, Collections_deleteCollection as deleteCollection, Collections_fetchCollectionEntities as fetchCollectionEntities, Collections_fetchRootCollection as fetchRootCollection, Collections_fetchSubCollections as fetchSubCollections, Collections_removeEntityFromCollection as removeEntityFromCollection, Collections_updateCollection as updateCollection };
2149
2163
  }
2150
2164
 
2151
- interface FetchFollowingProps {
2165
+ interface FetchFollowingProps extends UserSearchParams {
2152
2166
  page?: number;
2153
2167
  limit?: number;
2154
2168
  }
2155
2169
  declare function fetchFollowing(client: SublayHttpClient, data: FetchFollowingProps): Promise<PaginatedResponse<FollowListItem>>;
2156
2170
 
2157
- interface FetchFollowersProps {
2171
+ interface FetchFollowersProps extends UserSearchParams {
2158
2172
  page?: number;
2159
2173
  limit?: number;
2160
2174
  }
@@ -2184,7 +2198,7 @@ declare namespace Follows {
2184
2198
  export { Follows_deleteFollow as deleteFollow, Follows_fetchFollowers as fetchFollowers, Follows_fetchFollowersCount as fetchFollowersCount, Follows_fetchFollowing as fetchFollowing, Follows_fetchFollowingCount as fetchFollowingCount };
2185
2199
  }
2186
2200
 
2187
- interface FetchConnectionsProps {
2201
+ interface FetchConnectionsProps extends UserSearchParams {
2188
2202
  page?: number;
2189
2203
  limit?: number;
2190
2204
  }
@@ -3258,4 +3272,4 @@ declare class SublayClient {
3258
3272
  clearTokens(): void;
3259
3273
  }
3260
3274
 
3261
- export { type AuthTokens, type BulkDeleteProps, type BulkDeleteResult, type ClientConfig, type DbFilter, type DbFilterOperator, type DeleteResult, type PaginatedResponse, type PaginationMetadata, type SpaceReputationContextParams, type SpaceReputationUserParams, SublayClient, type TableAccessor, type TableQuery, type TableRow };
3275
+ export { type AuthTokens, type BulkDeleteProps, type BulkDeleteResult, type ClientConfig, type DbFilter, type DbFilterOperator, type DeleteResult, type PaginatedResponse, type PaginationMetadata, type SpaceReputationContextParams, type SpaceReputationUserParams, SublayClient, type TableAccessor, type TableQuery, type TableRow, type UserSearchParams };
package/dist/index.d.ts CHANGED
@@ -51,4 +51,5 @@ export declare class SublayClient {
51
51
  export type { ClientConfig, AuthTokens } from "./core/client";
52
52
  export type { PaginatedResponse, PaginationMetadata, } from "./interfaces/IPaginatedResponse";
53
53
  export type { SpaceReputationContextParams, SpaceReputationUserParams, } from "./interfaces/SpaceReputation";
54
+ export type { UserSearchParams } from "./interfaces/UserSearch";
54
55
  export type { TableAccessor, TableRow, TableQuery, DbFilter, DbFilterOperator, BulkDeleteProps, DeleteResult, BulkDeleteResult, } from "./interfaces/Table";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Shared optional params for text-searching a list of users
3
+ * (followers / following / connections).
4
+ *
5
+ * - `query` — free-text search term. When omitted, no filtering is applied.
6
+ * - `searchFields` — narrows which user field the term matches against. When
7
+ * omitted, the term matches either `username` OR `name` (case-insensitive
8
+ * substring). `"username"` / `"name"` restrict the match to that one field.
9
+ */
10
+ export interface UserSearchParams {
11
+ query?: string;
12
+ searchFields?: "username" | "name";
13
+ }
@@ -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
- export interface FetchConnectionsProps {
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
- export interface FetchFollowersProps {
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
- export interface FetchFollowingProps {
4
+ import { UserSearchParams } from "../../interfaces/UserSearch";
5
+ export interface FetchFollowingProps extends UserSearchParams {
5
6
  page?: number;
6
7
  limit?: number;
7
8
  }
@@ -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
- export interface FetchConnectionsByUserIdProps extends SpaceReputationUserParams {
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
- export interface FetchFollowersByUserIdProps extends SpaceReputationUserParams {
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
- export interface FetchFollowingByUserIdProps extends SpaceReputationUserParams {
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sublay/js",
3
- "version": "7.4.0",
3
+ "version": "7.4.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [