@amityco/ts-sdk-react-native 6.33.0 → 6.33.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/@types/domains/message.d.ts +1 -0
- package/dist/@types/domains/message.d.ts.map +1 -1
- package/dist/@types/domains/user.d.ts +4 -2
- package/dist/@types/domains/user.d.ts.map +1 -1
- package/dist/index.cjs.js +20 -9
- package/dist/index.esm.js +20 -9
- package/dist/index.umd.js +3 -3
- package/dist/userRepository/constants/index.d.ts +5 -0
- package/dist/userRepository/constants/index.d.ts.map +1 -0
- package/dist/userRepository/index.d.ts +1 -0
- package/dist/userRepository/index.d.ts.map +1 -1
- package/dist/utils/linkedObject/messageLinkedObject.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/@types/domains/message.ts +1 -0
- package/src/@types/domains/user.ts +6 -2
- package/src/postRepository/observers/getGlobalPinnedPosts.ts +3 -3
- package/src/reactionRepository/observers/getReactions/getReactions.ts +3 -3
- package/src/userRepository/constants/index.ts +4 -0
- package/src/userRepository/index.ts +1 -0
- package/src/utils/linkedObject/messageLinkedObject.ts +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/userRepository/constants/index.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB;IAClC,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/userRepository/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAE/C,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/userRepository/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAE/C,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/messageLinkedObject.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"messageLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/messageLinkedObject.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,mBAAmB,YAAa,MAAM,eAAe,KAAG,MAAM,OAe1E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AmityUserSearchMatchType } from '~/userRepository';
|
|
2
|
+
|
|
1
3
|
export {};
|
|
2
4
|
|
|
3
5
|
declare global {
|
|
@@ -9,6 +11,8 @@ declare global {
|
|
|
9
11
|
DisplayName = 'displayName',
|
|
10
12
|
}
|
|
11
13
|
|
|
14
|
+
type UserSearchMatchType = AmityUserSearchMatchType;
|
|
15
|
+
|
|
12
16
|
type UserSortBy = `${Amity.UserSortByEnum}`;
|
|
13
17
|
|
|
14
18
|
const enum SearchUserSortByEnum {
|
|
@@ -67,7 +71,7 @@ declare global {
|
|
|
67
71
|
sortBy?: Amity.UserSortBy | Amity.UserSortByEnum;
|
|
68
72
|
limit?: number;
|
|
69
73
|
page?: string;
|
|
70
|
-
matchType?:
|
|
74
|
+
matchType?: UserSearchMatchType;
|
|
71
75
|
};
|
|
72
76
|
|
|
73
77
|
type QuerySearchUsers = {
|
|
@@ -76,7 +80,7 @@ declare global {
|
|
|
76
80
|
sortBy?: Amity.SearchUserSortBy | Amity.SearchUserSortByEnum;
|
|
77
81
|
limit?: number;
|
|
78
82
|
page?: string;
|
|
79
|
-
matchType?:
|
|
83
|
+
matchType?: UserSearchMatchType;
|
|
80
84
|
};
|
|
81
85
|
|
|
82
86
|
type UserLiveCollection = Amity.LiveCollectionParams<Omit<Amity.QueryUsers, 'page'>>;
|
|
@@ -18,9 +18,9 @@ export const getGlobalPinnedPosts = (
|
|
|
18
18
|
) => {
|
|
19
19
|
const { log, cache } = getActiveClient();
|
|
20
20
|
|
|
21
|
-
if (!cache) {
|
|
22
|
-
|
|
23
|
-
}
|
|
21
|
+
// if (!cache) {
|
|
22
|
+
// console.log(ENABLE_CACHE_MESSAGE);
|
|
23
|
+
// }
|
|
24
24
|
|
|
25
25
|
const timestamp = Date.now();
|
|
26
26
|
log(`getGlobalPinnedPosts(tmpid: ${timestamp}) > listen`);
|
|
@@ -34,9 +34,9 @@ export const getReactions = (
|
|
|
34
34
|
): Amity.Unsubscriber => {
|
|
35
35
|
const { log, cache } = getActiveClient();
|
|
36
36
|
|
|
37
|
-
if (!cache) {
|
|
38
|
-
|
|
39
|
-
}
|
|
37
|
+
// if (!cache) {
|
|
38
|
+
// console.log('For using Live Collection feature you need to enable Cache!');
|
|
39
|
+
// }
|
|
40
40
|
|
|
41
41
|
const timestamp = Date.now();
|
|
42
42
|
log(`getReactions(tmpid: ${timestamp}) > listen`);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { pullFromCache } from '~/cache/api';
|
|
1
2
|
import { getMessageReadCount } from '~/messageRepository/utils/getMessageReadCount';
|
|
2
3
|
import { markReadMessage } from '~/messageRepository/utils/markReadMessage';
|
|
3
4
|
|
|
@@ -11,6 +12,9 @@ export const messageLinkedObject = (message: Amity.InternalMessage): Amity.Messa
|
|
|
11
12
|
get deliveredCount() {
|
|
12
13
|
return getMessageReadCount(message).deliveredCount;
|
|
13
14
|
},
|
|
15
|
+
get creator() {
|
|
16
|
+
return pullFromCache<Amity.InternalUser>(['user', 'get', message.creatorId])?.data;
|
|
17
|
+
},
|
|
14
18
|
markRead: () => markReadMessage(message),
|
|
15
19
|
};
|
|
16
20
|
};
|