@amityco/ts-sdk 7.33.1-ed90356d.0 → 7.33.2-1fd595a2.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/content.d.ts +5 -0
- package/dist/@types/domains/content.d.ts.map +1 -1
- package/dist/@types/domains/follow.d.ts +5 -0
- package/dist/@types/domains/follow.d.ts.map +1 -1
- package/dist/client/api/getFeedSettings.d.ts +3 -1
- package/dist/client/api/getFeedSettings.d.ts.map +1 -1
- package/dist/index.cjs.js +61 -10
- package/dist/index.esm.js +61 -10
- package/dist/index.umd.js +2 -2
- package/dist/userRepository/relationship/follow/observers/getFollowers/FollowerLiveCollectionController.d.ts.map +1 -1
- package/dist/userRepository/relationship/follow/observers/getFollowers/FollowerPaginationController.d.ts.map +1 -1
- package/dist/userRepository/relationship/follow/observers/getFollowers.d.ts +11 -1
- package/dist/userRepository/relationship/follow/observers/getFollowers.d.ts.map +1 -1
- package/dist/userRepository/relationship/follow/observers/getFollowings/FollowingLiveCollectionController.d.ts.map +1 -1
- package/dist/userRepository/relationship/follow/observers/getFollowings/FollowingPaginationController.d.ts.map +1 -1
- package/dist/userRepository/relationship/follow/observers/getFollowings.d.ts +11 -1
- package/dist/userRepository/relationship/follow/observers/getFollowings.d.ts.map +1 -1
- package/dist/userRepository/relationship/follow/observers/tests/getFollowsByUserIds.test.d.ts +2 -0
- package/dist/userRepository/relationship/follow/observers/tests/getFollowsByUserIds.test.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -132,6 +132,11 @@ declare global {
|
|
|
132
132
|
maxResolution: Amity.VideoResolution;
|
|
133
133
|
minResolution: Amity.VideoResolution;
|
|
134
134
|
};
|
|
135
|
+
/**
|
|
136
|
+
* Network switch for muted auto-play of feed videos.
|
|
137
|
+
* {@link getFeedSettings} returns `false` when the server omits it.
|
|
138
|
+
*/
|
|
139
|
+
autoPlay?: boolean;
|
|
135
140
|
};
|
|
136
141
|
type ContentSetting<T extends ContentType = 'text' | 'video'> = T extends 'text' ? ContentSettingText : T extends 'video' ? ContentSettingVideo : never;
|
|
137
142
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/content.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,oBAAY,qBAAqB;IAC/B,mBAAmB,iCAAiC;IACpD,iBAAiB,uBAAuB;IACxC,oBAAoB,2BAA2B;IAC/C,iBAAiB,yBAAyB;IAC1C,4BAA4B,oCAAoC;IAChE,sBAAsB,2CAA2C;IACjE,qBAAqB,6BAA6B;IAClD,WAAW,kBAAkB;IAC7B,gBAAgB,wCAAwC;IACxD,MAAM,WAAW;CAClB;AAED;;;GAGG;AACH,OAAO,EAAE,qBAAqB,IAAI,0BAA0B,EAAE,CAAC;AAE/D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,iBAAiB,GAClB,OAAO,CAAC,GAAG,qBAAqB,EAAE,EAAE,GAAG,qBAAqB,CAAC,MAAM,EAAE,CAAC,GACtE,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;QAElB;;;;;;WAMG;QACH,KAAK,kBAAkB,GAAG;YACxB,MAAM,EAAE,qBAAqB,CAAC;YAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC;QAEF,KAAK,WAAW,GACZ,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,YAAY,GACZ,MAAM,GACN,OAAO,GACP,KAAK,GACL,MAAM,CAAC;QAEX,KAAK,eAAe,GAAG,OAAO,CAAC,OAAO,eAAe,CAAC,CAAC;QAEvD,KAAK,eAAe,GAAG;YACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YACtB,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QAEF,KAAK,eAAe,GAAG;YACrB,MAAM,EAA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EAAE,MAAM,CAAC;YACpB,OAAO,EAAE,OAAO,CAAC;SAClB,CAAC;QAEF,KAAK,mBAAmB,GAAG;YACzB,WAAW,EAAE,OAAO,CAAC;YACrB,OAAO,EAAE,OAAO,CAAC;YACjB,kBAAkB,EAAE,MAAM,CAAC;YAC3B,eAAe,EAAE;gBACf,aAAa,EAAE,KAAK,CAAC,eAAe,CAAC;gBACrC,aAAa,EAAE,KAAK,CAAC,eAAe,CAAC;aACtC,CAAC;YACF;;;eAGG;YACH,QAAQ,CAAC,EAAE,OAAO,CAAC;SACpB,CAAC;QAEF,KAAK,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,GAAG,OAAO,IAAI,CAAC,SAAS,MAAM,GAC5E,kBAAkB,GAClB,CAAC,SAAS,OAAO,GACjB,mBAAmB,GACnB,KAAK,CAAC;KACX;CACF"}
|
|
@@ -38,6 +38,11 @@ declare global {
|
|
|
38
38
|
type QueryFollowers = {
|
|
39
39
|
userId: Amity.InternalUser['userId'];
|
|
40
40
|
status?: Exclude<Amity.FollowStatusType, 'none'>;
|
|
41
|
+
/**
|
|
42
|
+
* Only return relationships with these users (max 100). A user missing from
|
|
43
|
+
* the result has no relationship with `userId`.
|
|
44
|
+
*/
|
|
45
|
+
userIds?: Amity.InternalUser['userId'][];
|
|
41
46
|
page?: Amity.PageRaw;
|
|
42
47
|
};
|
|
43
48
|
type FollowerLiveCollection = Amity.LiveCollectionParams<Omit<QueryFollowers, 'page'>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"follow.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/follow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,WAAW,oBAAoB;YAC7B,WAAW,gBAAgB;YAC3B,UAAU,eAAe;YACzB,UAAU,eAAe;YACzB,UAAU,eAAe;YACzB,UAAU,eAAe;YACzB,YAAY,iBAAiB;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AC,YAAY,CAAC,QAAQ,CAAC,CAAC;YACrC,aAAa,EAAE,MAAM,CAAC;YACtB,cAAc,EAAE,MAAM,CAAC;YACvB,YAAY,EAAE,MAAM,CAAC;SACtB,CAAC;QAEF,KAAK,UAAU,GAAG;YAChB,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;SACjC,GAAG,WAAW,CAAC;QAEhB,KAAK,cAAc,GAAG;YACpB,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;YACrC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;YACjD;;;eAGG;YACH,OAAO,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzC,IAAI,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC;SACtB,CAAC;QAEF,KAAK,sBAAsB,GAAG,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;QAEvF,KAAK,2BAA2B,GAAG,KAAK,CAAC,mBAAmB,CAC1D,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,EAC1B,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAC7B,CAAC;QAEF,KAAK,eAAe,GAAG,cAAc,CAAC;QAEtC,KAAK,uBAAuB,GAAG,sBAAsB,CAAC;QAEtD,KAAK,4BAA4B,GAAG,2BAA2B,CAAC;KACjE;CACF"}
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* import { getFeedSettings } from '@amityco/ts-sdk'
|
|
4
4
|
* const feedSettings = await getFeedSettings()
|
|
5
5
|
* const postFeedSetting = feedSettings.post
|
|
6
|
+
* const isAutoPlayEnabled = postFeedSetting?.find(({ contentType }) => contentType === 'video')?.autoPlay
|
|
6
7
|
* ```
|
|
7
8
|
*
|
|
8
|
-
* Fetches a {@link Amity.FeedSettings} object
|
|
9
|
+
* Fetches a {@link Amity.FeedSettings} object. Video content settings always
|
|
10
|
+
* carry `autoPlay`, which is `false` when the server omits it.
|
|
9
11
|
*
|
|
10
12
|
* @returns A Promise of {@link Amity.FeedSettings} object
|
|
11
13
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFeedSettings.d.ts","sourceRoot":"","sources":["../../../src/client/api/getFeedSettings.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"getFeedSettings.d.ts","sourceRoot":"","sources":["../../../src/client/api/getFeedSettings.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,QAAa,QAAQ,MAAM,YAAY,CAmBlE,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -364,8 +364,8 @@ exports.AmityLiveViewerCountMode = void 0;
|
|
|
364
364
|
|
|
365
365
|
function getVersion() {
|
|
366
366
|
try {
|
|
367
|
-
// the string ''v7.33.
|
|
368
|
-
return 'v7.33.
|
|
367
|
+
// the string ''v7.33.1-cjs'' should be replaced by actual value by @rollup/plugin-replace
|
|
368
|
+
return 'v7.33.1-cjs';
|
|
369
369
|
}
|
|
370
370
|
catch (error) {
|
|
371
371
|
return '__dev__';
|
|
@@ -6257,9 +6257,11 @@ const validateTexts = async (texts) => {
|
|
|
6257
6257
|
* import { getFeedSettings } from '@amityco/ts-sdk'
|
|
6258
6258
|
* const feedSettings = await getFeedSettings()
|
|
6259
6259
|
* const postFeedSetting = feedSettings.post
|
|
6260
|
+
* const isAutoPlayEnabled = postFeedSetting?.find(({ contentType }) => contentType === 'video')?.autoPlay
|
|
6260
6261
|
* ```
|
|
6261
6262
|
*
|
|
6262
|
-
* Fetches a {@link Amity.FeedSettings} object
|
|
6263
|
+
* Fetches a {@link Amity.FeedSettings} object. Video content settings always
|
|
6264
|
+
* carry `autoPlay`, which is `false` when the server omits it.
|
|
6263
6265
|
*
|
|
6264
6266
|
* @returns A Promise of {@link Amity.FeedSettings} object
|
|
6265
6267
|
*
|
|
@@ -6270,7 +6272,14 @@ const getFeedSettings = async () => {
|
|
|
6270
6272
|
const client = getActiveClient();
|
|
6271
6273
|
const { data } = await client.http.get(`/api/v3/network-settings/feed-setting`);
|
|
6272
6274
|
return Object.fromEntries(data.feedSettings.map(({ feedType, contentSettings }) => {
|
|
6273
|
-
return [
|
|
6275
|
+
return [
|
|
6276
|
+
feedType,
|
|
6277
|
+
contentSettings === null || contentSettings === void 0 ? void 0 : contentSettings.map(setting => {
|
|
6278
|
+
var _a;
|
|
6279
|
+
return setting.contentType === 'video'
|
|
6280
|
+
? Object.assign(Object.assign({}, setting), { autoPlay: (_a = setting.autoPlay) !== null && _a !== void 0 ? _a : false }) : setting;
|
|
6281
|
+
}),
|
|
6282
|
+
];
|
|
6274
6283
|
}));
|
|
6275
6284
|
};
|
|
6276
6285
|
|
|
@@ -11727,12 +11736,19 @@ class PaginationController {
|
|
|
11727
11736
|
|
|
11728
11737
|
class FollowerPaginationController extends PaginationController {
|
|
11729
11738
|
async getRequest(queryParams, token) {
|
|
11730
|
-
|
|
11739
|
+
var _a;
|
|
11740
|
+
const { userId, userIds } = queryParams, rest = __rest(queryParams, ["userId", "userIds"]);
|
|
11741
|
+
// An empty `userIds` filter matches nobody; omitting it on the request would
|
|
11742
|
+
// return the unfiltered list instead.
|
|
11743
|
+
if ((userIds === null || userIds === void 0 ? void 0 : userIds.length) === 0)
|
|
11744
|
+
return { follows: [], users: [], files: [], paging: {} };
|
|
11745
|
+
// With `userIds` the whole result fits in one page, so default the limit to it.
|
|
11746
|
+
const { limit = (_a = userIds === null || userIds === void 0 ? void 0 : userIds.length) !== null && _a !== void 0 ? _a : COLLECTION_DEFAULT_PAGINATION_LIMIT } = rest, params = __rest(rest, ["limit"]);
|
|
11731
11747
|
const options = token ? { token } : { limit };
|
|
11732
11748
|
const client = getActiveClient();
|
|
11733
11749
|
const path = client.userId === userId ? `/api/v4/me/followers` : `/api/v4/users/${userId}/followers`;
|
|
11734
11750
|
const { data: queryResponse } = await this.http.get(path, {
|
|
11735
|
-
params: Object.assign(Object.assign({}, params), { options, isDeleted: false }),
|
|
11751
|
+
params: Object.assign(Object.assign(Object.assign({}, params), (userIds && { userIds })), { options, isDeleted: false }),
|
|
11736
11752
|
});
|
|
11737
11753
|
return queryResponse;
|
|
11738
11754
|
}
|
|
@@ -12008,6 +12024,10 @@ class FollowerLiveCollectionController extends LiveCollectionController {
|
|
|
12008
12024
|
if (this.query.status && this.query.status !== "all" /* Amity.FollowStatusTypeEnum.All */) {
|
|
12009
12025
|
followers = followers.filter(follower => follower.status === this.query.status);
|
|
12010
12026
|
}
|
|
12027
|
+
if (this.query.userIds) {
|
|
12028
|
+
const userIds = new Set(this.query.userIds);
|
|
12029
|
+
followers = followers.filter(follower => userIds.has(follower.from));
|
|
12030
|
+
}
|
|
12011
12031
|
followers = followers.filter(follower => {
|
|
12012
12032
|
var _a;
|
|
12013
12033
|
const fromUser = (_a = pullFromCache(['user', 'get', follower.from])) === null || _a === void 0 ? void 0 : _a.data;
|
|
@@ -12032,7 +12052,17 @@ class FollowerLiveCollectionController extends LiveCollectionController {
|
|
|
12032
12052
|
*
|
|
12033
12053
|
* Observe all mutations on a list of {@link Amity.FollowStatus} followers for a given userId
|
|
12034
12054
|
*
|
|
12035
|
-
*
|
|
12055
|
+
* To check the relationship with specific users (e.g. the authors on a loaded feed page),
|
|
12056
|
+
* pass `userIds` (max 100). The result then only contains those users, in a single page:
|
|
12057
|
+
*
|
|
12058
|
+
* ```js
|
|
12059
|
+
* getFollowers({ userId: client.userId, userIds: ['a', 'b', 'c'] }, ({ data }) => {
|
|
12060
|
+
* // users missing from `data` have no relationship
|
|
12061
|
+
* })
|
|
12062
|
+
* ```
|
|
12063
|
+
*
|
|
12064
|
+
* @param params.userId the user
|
|
12065
|
+
* @param params.userIds only return relationships with these users (max 100)
|
|
12036
12066
|
* @param callback the function to call when new data are available
|
|
12037
12067
|
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the messages
|
|
12038
12068
|
*
|
|
@@ -12058,12 +12088,19 @@ const getFollowers = (params, callback, config) => {
|
|
|
12058
12088
|
|
|
12059
12089
|
class FollowingPaginationController extends PaginationController {
|
|
12060
12090
|
async getRequest(queryParams, token) {
|
|
12061
|
-
|
|
12091
|
+
var _a;
|
|
12092
|
+
const { userId, userIds } = queryParams, rest = __rest(queryParams, ["userId", "userIds"]);
|
|
12093
|
+
// An empty `userIds` filter matches nobody; omitting it on the request would
|
|
12094
|
+
// return the unfiltered list instead.
|
|
12095
|
+
if ((userIds === null || userIds === void 0 ? void 0 : userIds.length) === 0)
|
|
12096
|
+
return { follows: [], users: [], files: [], paging: {} };
|
|
12097
|
+
// With `userIds` the whole result fits in one page, so default the limit to it.
|
|
12098
|
+
const { limit = (_a = userIds === null || userIds === void 0 ? void 0 : userIds.length) !== null && _a !== void 0 ? _a : COLLECTION_DEFAULT_PAGINATION_LIMIT } = rest, params = __rest(rest, ["limit"]);
|
|
12062
12099
|
const options = token ? { token } : { limit };
|
|
12063
12100
|
const client = getActiveClient();
|
|
12064
12101
|
const path = client.userId === userId ? `/api/v4/me/following` : `/api/v4/users/${userId}/following`;
|
|
12065
12102
|
const { data: queryResponse } = await this.http.get(path, {
|
|
12066
|
-
params: Object.assign(Object.assign({}, params), { options, isDeleted: false }),
|
|
12103
|
+
params: Object.assign(Object.assign(Object.assign({}, params), (userIds && { userIds })), { options, isDeleted: false }),
|
|
12067
12104
|
});
|
|
12068
12105
|
return queryResponse;
|
|
12069
12106
|
}
|
|
@@ -12215,6 +12252,10 @@ class FollowingLiveCollectionController extends LiveCollectionController {
|
|
|
12215
12252
|
if (this.query.status && this.query.status !== "all" /* Amity.FollowStatusTypeEnum.All */) {
|
|
12216
12253
|
followings = followings.filter(following => following.status === this.query.status);
|
|
12217
12254
|
}
|
|
12255
|
+
if (this.query.userIds) {
|
|
12256
|
+
const userIds = new Set(this.query.userIds);
|
|
12257
|
+
followings = followings.filter(following => userIds.has(following.to));
|
|
12258
|
+
}
|
|
12218
12259
|
followings = followings.filter(following => {
|
|
12219
12260
|
var _a;
|
|
12220
12261
|
const toUser = (_a = pullFromCache(['user', 'get', following.to])) === null || _a === void 0 ? void 0 : _a.data;
|
|
@@ -12239,7 +12280,17 @@ class FollowingLiveCollectionController extends LiveCollectionController {
|
|
|
12239
12280
|
*
|
|
12240
12281
|
* Observe all mutations on a list of {@link Amity.FollowStatus} followings for a given userId
|
|
12241
12282
|
*
|
|
12242
|
-
*
|
|
12283
|
+
* To check the relationship with specific users (e.g. the authors on a loaded feed page),
|
|
12284
|
+
* pass `userIds` (max 100). The result then only contains those users, in a single page:
|
|
12285
|
+
*
|
|
12286
|
+
* ```js
|
|
12287
|
+
* getFollowings({ userId: client.userId, userIds: ['a', 'b', 'c'] }, ({ data }) => {
|
|
12288
|
+
* // users missing from `data` have no relationship
|
|
12289
|
+
* })
|
|
12290
|
+
* ```
|
|
12291
|
+
*
|
|
12292
|
+
* @param params.userId the user
|
|
12293
|
+
* @param params.userIds only return relationships with these users (max 100)
|
|
12243
12294
|
* @param callback the function to call when new data are available
|
|
12244
12295
|
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the messages
|
|
12245
12296
|
*
|
package/dist/index.esm.js
CHANGED
|
@@ -348,8 +348,8 @@ var AmityLiveViewerCountMode;
|
|
|
348
348
|
|
|
349
349
|
function getVersion() {
|
|
350
350
|
try {
|
|
351
|
-
// the string ''v7.33.
|
|
352
|
-
return 'v7.33.
|
|
351
|
+
// the string ''v7.33.1-esm'' should be replaced by actual value by @rollup/plugin-replace
|
|
352
|
+
return 'v7.33.1-esm';
|
|
353
353
|
}
|
|
354
354
|
catch (error) {
|
|
355
355
|
return '__dev__';
|
|
@@ -6257,9 +6257,11 @@ const validateTexts = async (texts) => {
|
|
|
6257
6257
|
* import { getFeedSettings } from '@amityco/ts-sdk'
|
|
6258
6258
|
* const feedSettings = await getFeedSettings()
|
|
6259
6259
|
* const postFeedSetting = feedSettings.post
|
|
6260
|
+
* const isAutoPlayEnabled = postFeedSetting?.find(({ contentType }) => contentType === 'video')?.autoPlay
|
|
6260
6261
|
* ```
|
|
6261
6262
|
*
|
|
6262
|
-
* Fetches a {@link Amity.FeedSettings} object
|
|
6263
|
+
* Fetches a {@link Amity.FeedSettings} object. Video content settings always
|
|
6264
|
+
* carry `autoPlay`, which is `false` when the server omits it.
|
|
6263
6265
|
*
|
|
6264
6266
|
* @returns A Promise of {@link Amity.FeedSettings} object
|
|
6265
6267
|
*
|
|
@@ -6270,7 +6272,14 @@ const getFeedSettings = async () => {
|
|
|
6270
6272
|
const client = getActiveClient();
|
|
6271
6273
|
const { data } = await client.http.get(`/api/v3/network-settings/feed-setting`);
|
|
6272
6274
|
return Object.fromEntries(data.feedSettings.map(({ feedType, contentSettings }) => {
|
|
6273
|
-
return [
|
|
6275
|
+
return [
|
|
6276
|
+
feedType,
|
|
6277
|
+
contentSettings === null || contentSettings === void 0 ? void 0 : contentSettings.map(setting => {
|
|
6278
|
+
var _a;
|
|
6279
|
+
return setting.contentType === 'video'
|
|
6280
|
+
? Object.assign(Object.assign({}, setting), { autoPlay: (_a = setting.autoPlay) !== null && _a !== void 0 ? _a : false }) : setting;
|
|
6281
|
+
}),
|
|
6282
|
+
];
|
|
6274
6283
|
}));
|
|
6275
6284
|
};
|
|
6276
6285
|
|
|
@@ -11727,12 +11736,19 @@ class PaginationController {
|
|
|
11727
11736
|
|
|
11728
11737
|
class FollowerPaginationController extends PaginationController {
|
|
11729
11738
|
async getRequest(queryParams, token) {
|
|
11730
|
-
|
|
11739
|
+
var _a;
|
|
11740
|
+
const { userId, userIds } = queryParams, rest = __rest(queryParams, ["userId", "userIds"]);
|
|
11741
|
+
// An empty `userIds` filter matches nobody; omitting it on the request would
|
|
11742
|
+
// return the unfiltered list instead.
|
|
11743
|
+
if ((userIds === null || userIds === void 0 ? void 0 : userIds.length) === 0)
|
|
11744
|
+
return { follows: [], users: [], files: [], paging: {} };
|
|
11745
|
+
// With `userIds` the whole result fits in one page, so default the limit to it.
|
|
11746
|
+
const { limit = (_a = userIds === null || userIds === void 0 ? void 0 : userIds.length) !== null && _a !== void 0 ? _a : COLLECTION_DEFAULT_PAGINATION_LIMIT } = rest, params = __rest(rest, ["limit"]);
|
|
11731
11747
|
const options = token ? { token } : { limit };
|
|
11732
11748
|
const client = getActiveClient();
|
|
11733
11749
|
const path = client.userId === userId ? `/api/v4/me/followers` : `/api/v4/users/${userId}/followers`;
|
|
11734
11750
|
const { data: queryResponse } = await this.http.get(path, {
|
|
11735
|
-
params: Object.assign(Object.assign({}, params), { options, isDeleted: false }),
|
|
11751
|
+
params: Object.assign(Object.assign(Object.assign({}, params), (userIds && { userIds })), { options, isDeleted: false }),
|
|
11736
11752
|
});
|
|
11737
11753
|
return queryResponse;
|
|
11738
11754
|
}
|
|
@@ -12008,6 +12024,10 @@ class FollowerLiveCollectionController extends LiveCollectionController {
|
|
|
12008
12024
|
if (this.query.status && this.query.status !== "all" /* Amity.FollowStatusTypeEnum.All */) {
|
|
12009
12025
|
followers = followers.filter(follower => follower.status === this.query.status);
|
|
12010
12026
|
}
|
|
12027
|
+
if (this.query.userIds) {
|
|
12028
|
+
const userIds = new Set(this.query.userIds);
|
|
12029
|
+
followers = followers.filter(follower => userIds.has(follower.from));
|
|
12030
|
+
}
|
|
12011
12031
|
followers = followers.filter(follower => {
|
|
12012
12032
|
var _a;
|
|
12013
12033
|
const fromUser = (_a = pullFromCache(['user', 'get', follower.from])) === null || _a === void 0 ? void 0 : _a.data;
|
|
@@ -12032,7 +12052,17 @@ class FollowerLiveCollectionController extends LiveCollectionController {
|
|
|
12032
12052
|
*
|
|
12033
12053
|
* Observe all mutations on a list of {@link Amity.FollowStatus} followers for a given userId
|
|
12034
12054
|
*
|
|
12035
|
-
*
|
|
12055
|
+
* To check the relationship with specific users (e.g. the authors on a loaded feed page),
|
|
12056
|
+
* pass `userIds` (max 100). The result then only contains those users, in a single page:
|
|
12057
|
+
*
|
|
12058
|
+
* ```js
|
|
12059
|
+
* getFollowers({ userId: client.userId, userIds: ['a', 'b', 'c'] }, ({ data }) => {
|
|
12060
|
+
* // users missing from `data` have no relationship
|
|
12061
|
+
* })
|
|
12062
|
+
* ```
|
|
12063
|
+
*
|
|
12064
|
+
* @param params.userId the user
|
|
12065
|
+
* @param params.userIds only return relationships with these users (max 100)
|
|
12036
12066
|
* @param callback the function to call when new data are available
|
|
12037
12067
|
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the messages
|
|
12038
12068
|
*
|
|
@@ -12058,12 +12088,19 @@ const getFollowers = (params, callback, config) => {
|
|
|
12058
12088
|
|
|
12059
12089
|
class FollowingPaginationController extends PaginationController {
|
|
12060
12090
|
async getRequest(queryParams, token) {
|
|
12061
|
-
|
|
12091
|
+
var _a;
|
|
12092
|
+
const { userId, userIds } = queryParams, rest = __rest(queryParams, ["userId", "userIds"]);
|
|
12093
|
+
// An empty `userIds` filter matches nobody; omitting it on the request would
|
|
12094
|
+
// return the unfiltered list instead.
|
|
12095
|
+
if ((userIds === null || userIds === void 0 ? void 0 : userIds.length) === 0)
|
|
12096
|
+
return { follows: [], users: [], files: [], paging: {} };
|
|
12097
|
+
// With `userIds` the whole result fits in one page, so default the limit to it.
|
|
12098
|
+
const { limit = (_a = userIds === null || userIds === void 0 ? void 0 : userIds.length) !== null && _a !== void 0 ? _a : COLLECTION_DEFAULT_PAGINATION_LIMIT } = rest, params = __rest(rest, ["limit"]);
|
|
12062
12099
|
const options = token ? { token } : { limit };
|
|
12063
12100
|
const client = getActiveClient();
|
|
12064
12101
|
const path = client.userId === userId ? `/api/v4/me/following` : `/api/v4/users/${userId}/following`;
|
|
12065
12102
|
const { data: queryResponse } = await this.http.get(path, {
|
|
12066
|
-
params: Object.assign(Object.assign({}, params), { options, isDeleted: false }),
|
|
12103
|
+
params: Object.assign(Object.assign(Object.assign({}, params), (userIds && { userIds })), { options, isDeleted: false }),
|
|
12067
12104
|
});
|
|
12068
12105
|
return queryResponse;
|
|
12069
12106
|
}
|
|
@@ -12215,6 +12252,10 @@ class FollowingLiveCollectionController extends LiveCollectionController {
|
|
|
12215
12252
|
if (this.query.status && this.query.status !== "all" /* Amity.FollowStatusTypeEnum.All */) {
|
|
12216
12253
|
followings = followings.filter(following => following.status === this.query.status);
|
|
12217
12254
|
}
|
|
12255
|
+
if (this.query.userIds) {
|
|
12256
|
+
const userIds = new Set(this.query.userIds);
|
|
12257
|
+
followings = followings.filter(following => userIds.has(following.to));
|
|
12258
|
+
}
|
|
12218
12259
|
followings = followings.filter(following => {
|
|
12219
12260
|
var _a;
|
|
12220
12261
|
const toUser = (_a = pullFromCache(['user', 'get', following.to])) === null || _a === void 0 ? void 0 : _a.data;
|
|
@@ -12239,7 +12280,17 @@ class FollowingLiveCollectionController extends LiveCollectionController {
|
|
|
12239
12280
|
*
|
|
12240
12281
|
* Observe all mutations on a list of {@link Amity.FollowStatus} followings for a given userId
|
|
12241
12282
|
*
|
|
12242
|
-
*
|
|
12283
|
+
* To check the relationship with specific users (e.g. the authors on a loaded feed page),
|
|
12284
|
+
* pass `userIds` (max 100). The result then only contains those users, in a single page:
|
|
12285
|
+
*
|
|
12286
|
+
* ```js
|
|
12287
|
+
* getFollowings({ userId: client.userId, userIds: ['a', 'b', 'c'] }, ({ data }) => {
|
|
12288
|
+
* // users missing from `data` have no relationship
|
|
12289
|
+
* })
|
|
12290
|
+
* ```
|
|
12291
|
+
*
|
|
12292
|
+
* @param params.userId the user
|
|
12293
|
+
* @param params.userIds only return relationships with these users (max 100)
|
|
12243
12294
|
* @param callback the function to call when new data are available
|
|
12244
12295
|
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the messages
|
|
12245
12296
|
*
|