@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/dist/@types/domains/community.d.ts +3 -0
- package/dist/@types/domains/community.d.ts.map +1 -1
- package/dist/communityRepository/api/queryCommunities.d.ts.map +1 -1
- package/dist/communityRepository/observers/getCommunities/CommunitiesPaginationController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesPaginationController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesPaginationController.d.ts.map +1 -1
- package/dist/communityRepository/observers/semanticSearch/SemanticSearchCommunityPaginationController.d.ts.map +1 -1
- package/dist/index.cjs.js +8 -6
- package/dist/index.esm.js +8 -6
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/@types/domains/community.ts +9 -2
- package/src/communityRepository/api/queryCommunities.ts +1 -0
- package/src/communityRepository/observers/getCommunities/CommunitiesPaginationController.ts +1 -0
- package/src/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesPaginationController.ts +6 -1
- package/src/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesPaginationController.ts +6 -1
- package/src/communityRepository/observers/semanticSearch/SemanticSearchCommunityPaginationController.ts +1 -0
package/package.json
CHANGED
|
@@ -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<{
|
|
175
|
-
|
|
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
|
|
|
@@ -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 {
|
|
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 {
|
|
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;
|