@amityco/ts-sdk 7.5.1-3566b16.0 → 7.5.1-3d3fd19.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk",
3
- "version": "7.5.1-3566b16.0",
3
+ "version": "7.5.1-3d3fd19.0",
4
4
  "license": "CC-BY-ND-4.0",
5
5
  "author": "amity.co <developers@amity.co> (https://amity.co)",
6
6
  "description": "Amity Social Cloud Typescript SDK",
@@ -122,6 +122,7 @@ declare global {
122
122
  sortBy?: Amity.CommunitySortBy | Amity.CommunitySortByEnum;
123
123
  page?: string;
124
124
  limit?: number;
125
+ includeDiscoverablePrivateCommunity?: boolean;
125
126
  };
126
127
 
127
128
  type QueryJoinCommunity = {
@@ -171,8 +172,14 @@ declare global {
171
172
 
172
173
  type CommunityLiveCollection = Amity.LiveCollectionParams<Omit<QueryCommunities, 'page'>>;
173
174
 
174
- type RecommendedCommunityLiveCollection = Amity.LiveCollectionParams<{ limit?: number }>;
175
- type TrendingCommunityLiveCollection = Amity.LiveCollectionParams<{ limit?: number }>;
175
+ type RecommendedCommunityLiveCollection = Amity.LiveCollectionParams<{
176
+ limit?: number;
177
+ includeDiscoverablePrivateCommunity?: boolean;
178
+ }>;
179
+ type TrendingCommunityLiveCollection = Amity.LiveCollectionParams<{
180
+ limit?: number;
181
+ includeDiscoverablePrivateCommunity?: boolean;
182
+ }>;
176
183
 
177
184
  type JoinRequestLiveCollection = Amity.LiveCollectionParams<QueryJoinRequest>;
178
185
 
@@ -50,6 +50,7 @@ export const queryCommunities = async (
50
50
  ...restParams,
51
51
  isDeleted: inferIsDeleted(includeDeleted),
52
52
  filter: membership,
53
+ includeDiscoverablePrivateCommunity: params?.includeDiscoverablePrivateCommunity ?? true,
53
54
  options,
54
55
  },
55
56
  },
@@ -21,6 +21,7 @@ export class CommunitiesPaginationController extends PaginationController<
21
21
  ...params,
22
22
  isDeleted: inferIsDeleted(params.includeDeleted),
23
23
  filter: params.membership,
24
+ includeDiscoverablePrivateCommunity: params.includeDiscoverablePrivateCommunity ?? true,
24
25
  options,
25
26
  },
26
27
  },
@@ -14,7 +14,11 @@ export class RecommendedCommunitiesPaginationController extends PaginationContro
14
14
  queryParams: Amity.RecommendedCommunityLiveCollection,
15
15
  token: string | undefined,
16
16
  ) {
17
- const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT, ...params } = queryParams;
17
+ const {
18
+ limit = COLLECTION_DEFAULT_PAGINATION_LIMIT,
19
+ includeDiscoverablePrivateCommunity,
20
+ ...params
21
+ } = queryParams;
18
22
  const options = token ? { token } : { limit };
19
23
 
20
24
  const { data: queryResponse } = await this.http.get<Amity.CommunityPayload & Amity.Pagination>(
@@ -23,6 +27,7 @@ export class RecommendedCommunitiesPaginationController extends PaginationContro
23
27
  params: {
24
28
  ...params,
25
29
  options,
30
+ includeDiscoverablePrivateCommunity: includeDiscoverablePrivateCommunity ?? true,
26
31
  },
27
32
  },
28
33
  );
@@ -11,7 +11,11 @@ export class TrendingCommunitiesPaginationController extends PaginationControlle
11
11
  Amity.TrendingCommunityLiveCollection
12
12
  > {
13
13
  async getRequest(queryParams: Amity.TrendingCommunityLiveCollection, token: string | undefined) {
14
- const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT, ...params } = queryParams;
14
+ const {
15
+ limit = COLLECTION_DEFAULT_PAGINATION_LIMIT,
16
+ includeDiscoverablePrivateCommunity,
17
+ ...params
18
+ } = queryParams;
15
19
  const options = token ? { token } : { limit };
16
20
 
17
21
  const { data: queryResponse } = await this.http.get<Amity.CommunityPayload & Amity.Pagination>(
@@ -20,6 +24,7 @@ export class TrendingCommunitiesPaginationController extends PaginationControlle
20
24
  params: {
21
25
  ...params,
22
26
  options,
27
+ includeDiscoverablePrivateCommunity: includeDiscoverablePrivateCommunity ?? true,
23
28
  },
24
29
  },
25
30
  );
@@ -29,6 +29,7 @@ export class SemanticSearchCommunityPaginationController extends PaginationContr
29
29
  ...params,
30
30
  filter: communityMembershipStatus ?? AmityCommunityMemberStatusFilter.ALL,
31
31
  options,
32
+ includeDiscoverablePrivateCommunity: params.includeDiscoverablePrivateCommunity ?? true,
32
33
  },
33
34
  });
34
35
  return queryResponse;