@amityco/ts-sdk 0.0.1-beta.37 → 0.0.1-beta.38
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/.eslintrc.json +3 -5
- package/dist/@types/core/events.d.ts +1 -0
- package/dist/@types/core/events.d.ts.map +1 -1
- package/dist/@types/domains/category.d.ts +7 -0
- package/dist/@types/domains/category.d.ts.map +1 -1
- package/dist/@types/domains/community.d.ts +12 -0
- package/dist/@types/domains/community.d.ts.map +1 -1
- package/dist/@types/global.d.ts +5 -0
- package/dist/@types/global.d.ts.map +1 -1
- package/dist/category/api/queryCategories.d.ts +1 -5
- package/dist/category/api/queryCategories.d.ts.map +1 -1
- package/dist/category/observers/index.d.ts +2 -0
- package/dist/category/observers/index.d.ts.map +1 -0
- package/dist/category/observers/liveCategories.d.ts +18 -0
- package/dist/category/observers/liveCategories.d.ts.map +1 -0
- package/dist/category/observers/tests/liveCategories.test.d.ts +2 -0
- package/dist/category/observers/tests/liveCategories.test.d.ts.map +1 -0
- package/dist/channel/api/tests/getChannels.test.d.ts +2 -0
- package/dist/channel/api/tests/getChannels.test.d.ts.map +1 -0
- package/dist/channel/api/tests/leaveChannel.test.d.ts +2 -0
- package/dist/channel/api/tests/leaveChannel.test.d.ts.map +1 -0
- package/dist/channel/observers/liveChannel.d.ts.map +1 -1
- package/dist/client/api/accessTokenExpiryWatcher.d.ts +4 -1
- package/dist/client/api/accessTokenExpiryWatcher.d.ts.map +1 -1
- package/dist/client/api/getToken.d.ts +3 -1
- package/dist/client/api/getToken.d.ts.map +1 -1
- package/dist/client/utils/setClientToken.d.ts +3 -3
- package/dist/comment/api/deleteComment.d.ts.map +1 -1
- package/dist/comment/api/getComment.d.ts.map +1 -1
- package/dist/comment/observers/index.d.ts +1 -0
- package/dist/comment/observers/index.d.ts.map +1 -1
- package/dist/comment/observers/liveComment.d.ts +21 -0
- package/dist/comment/observers/liveComment.d.ts.map +1 -0
- package/dist/comment/observers/tests/liveComment.test.d.ts +2 -0
- package/dist/comment/observers/tests/liveComment.test.d.ts.map +1 -0
- package/dist/community/api/queryCommunities.d.ts +1 -10
- package/dist/community/api/queryCommunities.d.ts.map +1 -1
- package/dist/community/events/index.d.ts +1 -0
- package/dist/community/events/index.d.ts.map +1 -1
- package/dist/community/events/onCommunityUserChanged.d.ts +17 -0
- package/dist/community/events/onCommunityUserChanged.d.ts.map +1 -0
- package/dist/community/events/utils.d.ts +1 -0
- package/dist/community/events/utils.d.ts.map +1 -1
- package/dist/community/observers/index.d.ts +1 -0
- package/dist/community/observers/index.d.ts.map +1 -1
- package/dist/community/observers/liveCommunities.d.ts +20 -0
- package/dist/community/observers/liveCommunities.d.ts.map +1 -0
- package/dist/community/observers/tests/liveCommunities.test.d.ts +2 -0
- package/dist/community/observers/tests/liveCommunities.test.d.ts.map +1 -0
- package/dist/core/events.d.ts +3 -3
- package/dist/core/events.d.ts.map +1 -1
- package/dist/core/query/sorting.d.ts +6 -0
- package/dist/core/query/sorting.d.ts.map +1 -1
- package/dist/core/transports/http.d.ts +0 -5
- package/dist/core/transports/http.d.ts.map +1 -1
- package/dist/file/api/test/createImage.test.d.ts +2 -0
- package/dist/file/api/test/createImage.test.d.ts.map +1 -0
- package/dist/file/api/test/createVideo.test.d.ts +2 -0
- package/dist/file/api/test/createVideo.test.d.ts.map +1 -0
- package/dist/index.cjs.js +441 -195
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +436 -195
- package/dist/index.umd.js +4 -4
- package/dist/message/observers/liveMessage.d.ts.map +1 -1
- package/dist/post/observers/index.d.ts +1 -0
- package/dist/post/observers/index.d.ts.map +1 -1
- package/dist/post/observers/livePost.d.ts +21 -0
- package/dist/post/observers/livePost.d.ts.map +1 -0
- package/dist/post/observers/tests/livePost.test.d.ts +2 -0
- package/dist/post/observers/tests/livePost.test.d.ts.map +1 -0
- package/dist/subChannel/api/tests/deleteSubChannel.test.d.ts +2 -0
- package/dist/subChannel/api/tests/deleteSubChannel.test.d.ts.map +1 -0
- package/dist/subChannel/api/tests/getSubChannel.test.d.ts +2 -0
- package/dist/subChannel/api/tests/getSubChannel.test.d.ts.map +1 -0
- package/dist/subChannel/api/tests/getSubChannels.test.d.ts +2 -0
- package/dist/subChannel/api/tests/getSubChannels.test.d.ts.map +1 -0
- package/dist/subChannel/api/tests/updateSubChannel.test.d.ts +2 -0
- package/dist/subChannel/api/tests/updateSubChannel.test.d.ts.map +1 -0
- package/dist/subChannel/observers/liveSubChannel.d.ts.map +1 -1
- package/dist/user/api/tests/updateUser.test.d.ts +2 -0
- package/dist/user/api/tests/updateUser.test.d.ts.map +1 -0
- package/dist/user/observers/liveUser.d.ts.map +1 -1
- package/dist/utils/liveObject.d.ts +2 -0
- package/dist/utils/liveObject.d.ts.map +1 -0
- package/dist/utils/tests/dummy/category.d.ts +64 -0
- package/dist/utils/tests/dummy/category.d.ts.map +1 -0
- package/dist/utils/tests/dummy/channel.d.ts +50 -0
- package/dist/utils/tests/dummy/channel.d.ts.map +1 -1
- package/dist/utils/tests/dummy/community.d.ts +132 -0
- package/dist/utils/tests/dummy/community.d.ts.map +1 -1
- package/dist/utils/tests/dummy/file.d.ts +3 -0
- package/dist/utils/tests/dummy/file.d.ts.map +1 -1
- package/dist/utils/tests/dummy/index.d.ts +1 -0
- package/dist/utils/tests/dummy/index.d.ts.map +1 -1
- package/dist/utils/tests/dummy/post.d.ts +2 -0
- package/dist/utils/tests/dummy/post.d.ts.map +1 -1
- package/dist/utils/tests/dummy/subChannel.d.ts +0 -20
- package/dist/utils/tests/dummy/subChannel.d.ts.map +1 -1
- package/dist/utils/tests/dummy/user.d.ts +18 -0
- package/dist/utils/tests/dummy/user.d.ts.map +1 -1
- package/dist/utils/tests/liveObject.test.d.ts +2 -0
- package/dist/utils/tests/liveObject.test.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/@types/core/events.ts +1 -0
- package/src/@types/domains/category.ts +13 -0
- package/src/@types/domains/community.ts +25 -0
- package/src/@types/global.ts +5 -0
- package/src/category/api/queryCategories.ts +3 -5
- package/src/category/observers/index.ts +1 -0
- package/src/category/observers/liveCategories.ts +141 -0
- package/src/category/observers/tests/liveCategories.test.ts +147 -0
- package/src/channel/api/tests/createChannel.test.ts +30 -6
- package/src/channel/api/tests/getChannel.test.ts +3 -1
- package/src/channel/api/tests/getChannels.test.ts +97 -0
- package/src/channel/api/tests/joinChannel.test.ts +62 -3
- package/src/channel/api/tests/leaveChannel.test.ts +90 -0
- package/src/channel/api/tests/queryChannels.test.ts +38 -1
- package/src/channel/observers/liveChannel.ts +8 -80
- package/src/client/api/accessTokenExpiryWatcher.ts +7 -5
- package/src/client/api/tests/accessTokenExpiryWatcher.test.ts +8 -5
- package/src/comment/api/deleteComment.ts +5 -5
- package/src/comment/api/getComment.ts +8 -3
- package/src/comment/observers/index.ts +1 -0
- package/src/comment/observers/liveComment.ts +43 -0
- package/src/comment/observers/tests/liveComment.test.ts +95 -0
- package/src/community/api/queryCommunities.ts +3 -10
- package/src/community/api/test/addCommunityMember.test.ts +14 -2
- package/src/community/api/test/joinCommunity.test.ts +14 -2
- package/src/community/api/test/leaveCommunity.test.ts +11 -1
- package/src/community/api/test/removeCommunityMembers.test.ts +11 -1
- package/src/community/events/index.ts +1 -0
- package/src/community/events/onCommunityUserChanged.ts +20 -0
- package/src/community/events/test/onCommunityJoined.test.ts +1 -1
- package/src/community/events/test/onCommunityUserAdded.test.ts +1 -1
- package/src/community/events/test/onCommunityUserBanned.test.ts +1 -1
- package/src/community/events/test/onCommunityUserUnbaned.test.ts +1 -1
- package/src/community/events/test/utils.test.ts +52 -3
- package/src/community/events/utils.ts +49 -0
- package/src/community/observers/index.ts +1 -0
- package/src/community/observers/liveCommunities.ts +188 -0
- package/src/community/observers/tests/liveCommunities.test.ts +284 -0
- package/src/core/query/sorting.ts +8 -0
- package/src/core/transports/http.ts +17 -13
- package/src/core/transports/test/http.test.ts +49 -60
- package/src/file/api/createFile.ts +1 -1
- package/src/file/api/createImage.ts +1 -1
- package/src/file/api/createVideo.ts +1 -1
- package/src/file/api/test/createImage.test.ts +69 -0
- package/src/file/api/test/createVideo.test.ts +81 -0
- package/src/index.ts +1 -0
- package/src/message/observers/liveMessage.ts +11 -83
- package/src/message/tests/observers/liveMessage.test.ts +1 -143
- package/src/post/observers/index.ts +1 -0
- package/src/post/observers/livePost.ts +47 -0
- package/src/post/observers/tests/livePost.test.ts +97 -0
- package/src/stream/api/tests/createStream.test.ts +3 -11
- package/src/stream/api/tests/deleteStream.test.ts +5 -3
- package/src/subChannel/api/tests/createSubChannel.test.ts +21 -14
- package/src/subChannel/api/tests/deleteSubChannel.test.ts +112 -0
- package/src/subChannel/api/tests/getSubChannel.test.ts +97 -0
- package/src/subChannel/api/tests/getSubChannels.test.ts +97 -0
- package/src/subChannel/api/tests/updateSubChannel.test.ts +86 -0
- package/src/subChannel/observers/liveSubChannel.ts +6 -56
- package/src/subChannel/observers/tests/liveSubChannel.test.ts +0 -82
- package/src/user/api/tests/updateUser.test.ts +60 -0
- package/src/user/observers/liveUser.ts +9 -61
- package/src/user/tests/observers/liveUser.test.ts +1 -154
- package/src/utils/liveObject.ts +86 -0
- package/src/utils/tests/dummy/category.ts +57 -0
- package/src/utils/tests/dummy/channel.ts +51 -1
- package/src/utils/tests/dummy/community.ts +94 -0
- package/src/utils/tests/dummy/file.ts +32 -0
- package/src/utils/tests/dummy/index.ts +1 -0
- package/src/utils/tests/dummy/post.ts +56 -45
- package/src/utils/tests/dummy/stream.ts +73 -73
- package/src/utils/tests/dummy/subChannel.ts +0 -22
- package/src/utils/tests/dummy/user.ts +21 -0
- package/src/utils/tests/liveObject.test.ts +172 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liveMessage.d.ts","sourceRoot":"","sources":["../../../src/message/observers/liveMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"liveMessage.d.ts","sourceRoot":"","sources":["../../../src/message/observers/liveMessage.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,cACX,MAAM,OAAO,CAAC,WAAW,CAAC,YAC3B,MAAM,kBAAkB,CAAC,MAAM,OAAO,CAAC,KAChD,MAAM,YAWR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/post/observers/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/post/observers/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ```js
|
|
3
|
+
* import { livePost } from '@amityco/ts-sdk';
|
|
4
|
+
*
|
|
5
|
+
* let post;
|
|
6
|
+
*
|
|
7
|
+
* const unsubscribe = livePost(postId, response => {
|
|
8
|
+
* post = response.data;
|
|
9
|
+
* });
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Observe all mutation on a given {@link Amity.Post}
|
|
13
|
+
*
|
|
14
|
+
* @param postId the ID of the message to observe
|
|
15
|
+
* @param callback the function to call when new data are available
|
|
16
|
+
* @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the sub channel
|
|
17
|
+
*
|
|
18
|
+
* @category Post Live Object
|
|
19
|
+
*/
|
|
20
|
+
export declare const livePost: (postId: Amity.Post['postId'], callback: Amity.LiveObjectCallback<Amity.Post>) => Amity.Unsubscriber;
|
|
21
|
+
//# sourceMappingURL=livePost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"livePost.d.ts","sourceRoot":"","sources":["../../../src/post/observers/livePost.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,QAAQ,WACX,MAAM,IAAI,CAAC,QAAQ,CAAC,YAClB,MAAM,kBAAkB,CAAC,MAAM,IAAI,CAAC,KAC7C,MAAM,YAWR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"livePost.test.d.ts","sourceRoot":"","sources":["../../../../src/post/observers/tests/livePost.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteSubChannel.test.d.ts","sourceRoot":"","sources":["../../../../src/subChannel/api/tests/deleteSubChannel.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSubChannel.test.d.ts","sourceRoot":"","sources":["../../../../src/subChannel/api/tests/getSubChannel.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSubChannels.test.d.ts","sourceRoot":"","sources":["../../../../src/subChannel/api/tests/getSubChannels.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateSubChannel.test.d.ts","sourceRoot":"","sources":["../../../../src/subChannel/api/tests/updateSubChannel.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liveSubChannel.d.ts","sourceRoot":"","sources":["../../../src/subChannel/observers/liveSubChannel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"liveSubChannel.d.ts","sourceRoot":"","sources":["../../../src/subChannel/observers/liveSubChannel.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,iBACX,MAAM,UAAU,CAAC,cAAc,CAAC,YACpC,MAAM,kBAAkB,CAAC,MAAM,UAAU,CAAC,KACnD,MAAM,YAMR,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateUser.test.d.ts","sourceRoot":"","sources":["../../../../src/user/api/tests/updateUser.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liveUser.d.ts","sourceRoot":"","sources":["../../../src/user/observers/liveUser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"liveUser.d.ts","sourceRoot":"","sources":["../../../src/user/observers/liveUser.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,QAAQ,WACX,MAAM,IAAI,CAAC,QAAQ,CAAC,YAClB,MAAM,kBAAkB,CAAC,MAAM,IAAI,CAAC,KAC7C,MAAM,YASR,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const liveObject: <T extends Amity.User | Amity.File<any> | Amity.Role | Amity.Channel<any> | Amity.SubChannel | Amity.Membership<"channel"> | Amity.Message<any> | Amity.Community | Amity.Category | Amity.Membership<"community"> | Amity.Post<any> | Amity.Comment<any> | Amity.Poll | Amity.Stream | Amity.FollowStatus, K extends keyof T>(id: T[K], callback: Amity.LiveObjectCallback<T>, key: K, fetcher: (id: T[K]) => Promise<Amity.Cached<T>>, eventHandlers: ((callback: Amity.Listener<T>) => Amity.Unsubscriber)[]) => Amity.Unsubscriber;
|
|
2
|
+
//# sourceMappingURL=liveObject.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveObject.d.ts","sourceRoot":"","sources":["../../src/utils/liveObject.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU,4dAQiC,MAAM,YAAY,QACvE,MAAM,YAkER,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare const category11: {
|
|
2
|
+
name: string;
|
|
3
|
+
updatedAt: string;
|
|
4
|
+
createdAt: string;
|
|
5
|
+
isDeleted: boolean;
|
|
6
|
+
categoryId: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const category12: {
|
|
9
|
+
name: string;
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
isDeleted: boolean;
|
|
13
|
+
categoryId: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const category13: {
|
|
16
|
+
name: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
isDeleted: boolean;
|
|
20
|
+
categoryId: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const category21: {
|
|
23
|
+
name: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
isDeleted: boolean;
|
|
27
|
+
categoryId: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const category22: {
|
|
30
|
+
name: string;
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
createdAt: string;
|
|
33
|
+
isDeleted: boolean;
|
|
34
|
+
categoryId: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const categoryQueryResponse: {
|
|
37
|
+
data: {
|
|
38
|
+
categories: {
|
|
39
|
+
name: string;
|
|
40
|
+
updatedAt: string;
|
|
41
|
+
createdAt: string;
|
|
42
|
+
isDeleted: boolean;
|
|
43
|
+
categoryId: string;
|
|
44
|
+
}[];
|
|
45
|
+
paging: {
|
|
46
|
+
next: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export declare const categoryQueryResponsePage2: {
|
|
51
|
+
data: {
|
|
52
|
+
categories: {
|
|
53
|
+
name: string;
|
|
54
|
+
updatedAt: string;
|
|
55
|
+
createdAt: string;
|
|
56
|
+
isDeleted: boolean;
|
|
57
|
+
categoryId: string;
|
|
58
|
+
}[];
|
|
59
|
+
paging: {
|
|
60
|
+
next: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=category.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/category.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;CAMtB,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;CAOjC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;CAOtC,CAAC"}
|
|
@@ -6,6 +6,8 @@ export declare const mockPage: {
|
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
8
|
export declare const channelRaw1: Amity.ChannelRaw;
|
|
9
|
+
export declare const channelRawLive1: Amity.ChannelRaw;
|
|
10
|
+
export declare const channelRawConversation1: Amity.ChannelRaw;
|
|
9
11
|
export declare const channelRaw2: Amity.ChannelRaw;
|
|
10
12
|
export declare const channelRaw3: Amity.ChannelRaw;
|
|
11
13
|
export declare const channel1: Amity.Channel;
|
|
@@ -35,6 +37,18 @@ export declare const channelQueryResponse: {
|
|
|
35
37
|
users: never[];
|
|
36
38
|
};
|
|
37
39
|
};
|
|
40
|
+
export declare const getChannelsResponse: {
|
|
41
|
+
data: {
|
|
42
|
+
paging: {
|
|
43
|
+
previous: string;
|
|
44
|
+
next: string;
|
|
45
|
+
};
|
|
46
|
+
channels: Amity.ChannelRaw<any>[];
|
|
47
|
+
channelUsers: never[];
|
|
48
|
+
files: never[];
|
|
49
|
+
users: never[];
|
|
50
|
+
};
|
|
51
|
+
};
|
|
38
52
|
export declare const channelQueryResponsePage2: {
|
|
39
53
|
data: {
|
|
40
54
|
paging: {
|
|
@@ -47,6 +61,30 @@ export declare const channelQueryResponsePage2: {
|
|
|
47
61
|
users: never[];
|
|
48
62
|
};
|
|
49
63
|
};
|
|
64
|
+
export declare const channelTagQueryResponse: {
|
|
65
|
+
data: {
|
|
66
|
+
paging: {
|
|
67
|
+
previous: string;
|
|
68
|
+
next: string;
|
|
69
|
+
};
|
|
70
|
+
channels: Amity.ChannelRaw<any>[];
|
|
71
|
+
channelUsers: never[];
|
|
72
|
+
files: never[];
|
|
73
|
+
users: never[];
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export declare const channelExcludeTagQueryResponse: {
|
|
77
|
+
data: {
|
|
78
|
+
paging: {
|
|
79
|
+
previous: string;
|
|
80
|
+
next: string;
|
|
81
|
+
};
|
|
82
|
+
channels: Amity.ChannelRaw<any>[];
|
|
83
|
+
channelUsers: never[];
|
|
84
|
+
files: never[];
|
|
85
|
+
users: never[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
50
88
|
export declare const channelUserQueryResponse: {
|
|
51
89
|
data: {
|
|
52
90
|
paging: {
|
|
@@ -102,4 +140,16 @@ export declare const channelPayload: {
|
|
|
102
140
|
users: Amity.User[];
|
|
103
141
|
files: Amity.File<"image">[];
|
|
104
142
|
};
|
|
143
|
+
export declare const liveChannelPayload: {
|
|
144
|
+
channels: Amity.ChannelRaw<any>[];
|
|
145
|
+
channelUsers: Amity.MembershipRaw<"channel", false>[];
|
|
146
|
+
users: Amity.User[];
|
|
147
|
+
files: Amity.File<"image">[];
|
|
148
|
+
};
|
|
149
|
+
export declare const conversationChannelPayload: {
|
|
150
|
+
channels: Amity.ChannelRaw<any>[];
|
|
151
|
+
channelUsers: Amity.MembershipRaw<"channel", false>[];
|
|
152
|
+
users: Amity.User[];
|
|
153
|
+
files: Amity.File<"image">[];
|
|
154
|
+
};
|
|
105
155
|
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/channel.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,UAAU,CAevF;AA+BD,eAAO,MAAM,QAAQ;;;;;CAKpB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/channel.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,UAAU,CAevF;AA+BD,eAAO,MAAM,QAAQ;;;;;CAKpB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,UAAsD,CAAC;AAEvF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,UAAiD,CAAC;AAEtF,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,UAE1C,CAAC;AAEH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,UAI9B,CAAC;AAEH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,UAE9B,CAAC;AAEH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,OAK3B,CAAC;AAEH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,OAK3B,CAAC;AAEH,eAAO,MAAM,cAAc,uCAA2B,CAAC;AACvD,eAAO,MAAM,WAAW,6BAAoD,CAAC;AAE7E,eAAO,MAAM,eAAe,uCAI1B,CAAC;AACH,eAAO,MAAM,YAAY,6BAAqD,CAAC;AAE/E,eAAO,MAAM,eAAe,uCAI1B,CAAC;AACH,eAAO,MAAM,YAAY,6BAAqD,CAAC;AAE/E,eAAO,MAAM,YAAY,uCAIvB,CAAC;AAEH,eAAO,MAAM,oBAAoB,uCAI/B,CAAC;AACH,eAAO,MAAM,iBAAiB,6BAA0D,CAAC;AAEzF,eAAO,MAAM,mBAAmB,uCAG9B,CAAC;AACH,eAAO,MAAM,gBAAgB,6BAAyD,CAAC;AAEvF,eAAO,MAAM,sBAAsB,uCAGjC,CAAC;AACH,eAAO,MAAM,mBAAmB,6BAA4D,CAAC;AAE7F,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAQhC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;CAQ/B,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;CAQrC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;CAQnC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;CAQ1C,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;CAQpC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAQzC,CAAC;AAEF,eAAO,MAAM,gBAAgB,+BAAsD,CAAC;AAEpF,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAQzC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAQzC,CAAC;AAGF,eAAO,MAAM,cAAc;;;;;CAK1B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;CAKtC,CAAC"}
|
|
@@ -33,4 +33,136 @@ export declare const communityUserModel: {
|
|
|
33
33
|
roles: string[];
|
|
34
34
|
permissions: Amity.Permission[];
|
|
35
35
|
}[];
|
|
36
|
+
export declare const communityRaw1: {
|
|
37
|
+
path: string;
|
|
38
|
+
isOfficial: boolean;
|
|
39
|
+
isPublic: boolean;
|
|
40
|
+
onlyAdminCanPost: boolean;
|
|
41
|
+
postsCount: number;
|
|
42
|
+
membersCount: number;
|
|
43
|
+
moderatorMemberCount: number;
|
|
44
|
+
updatedAt: string;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
isDeleted: boolean;
|
|
47
|
+
needApprovalOnPostCreation: boolean;
|
|
48
|
+
displayName: string;
|
|
49
|
+
tags: string[];
|
|
50
|
+
metadata: {};
|
|
51
|
+
hasFlaggedComment: boolean;
|
|
52
|
+
hasFlaggedPost: boolean;
|
|
53
|
+
communityId: string;
|
|
54
|
+
channelId: string;
|
|
55
|
+
userId: string;
|
|
56
|
+
isJoined: boolean;
|
|
57
|
+
avatarFileId: string;
|
|
58
|
+
categoryIds: string[];
|
|
59
|
+
};
|
|
60
|
+
export declare const communityRaw2: {
|
|
61
|
+
path: string;
|
|
62
|
+
isOfficial: boolean;
|
|
63
|
+
isPublic: boolean;
|
|
64
|
+
onlyAdminCanPost: boolean;
|
|
65
|
+
postsCount: number;
|
|
66
|
+
membersCount: number;
|
|
67
|
+
moderatorMemberCount: number;
|
|
68
|
+
updatedAt: string;
|
|
69
|
+
createdAt: string;
|
|
70
|
+
isDeleted: boolean;
|
|
71
|
+
needApprovalOnPostCreation: boolean;
|
|
72
|
+
displayName: string;
|
|
73
|
+
tags: never[];
|
|
74
|
+
metadata: {};
|
|
75
|
+
hasFlaggedComment: boolean;
|
|
76
|
+
hasFlaggedPost: boolean;
|
|
77
|
+
communityId: string;
|
|
78
|
+
channelId: string;
|
|
79
|
+
userId: string;
|
|
80
|
+
isJoined: boolean;
|
|
81
|
+
avatarFileId: string;
|
|
82
|
+
categoryIds: never[];
|
|
83
|
+
};
|
|
84
|
+
export declare const communityQueryResponse: {
|
|
85
|
+
data: {
|
|
86
|
+
communities: {
|
|
87
|
+
path: string;
|
|
88
|
+
isOfficial: boolean;
|
|
89
|
+
isPublic: boolean;
|
|
90
|
+
onlyAdminCanPost: boolean;
|
|
91
|
+
postsCount: number;
|
|
92
|
+
membersCount: number;
|
|
93
|
+
moderatorMemberCount: number;
|
|
94
|
+
updatedAt: string;
|
|
95
|
+
createdAt: string;
|
|
96
|
+
isDeleted: boolean;
|
|
97
|
+
needApprovalOnPostCreation: boolean;
|
|
98
|
+
displayName: string;
|
|
99
|
+
tags: string[];
|
|
100
|
+
metadata: {};
|
|
101
|
+
hasFlaggedComment: boolean;
|
|
102
|
+
hasFlaggedPost: boolean;
|
|
103
|
+
communityId: string;
|
|
104
|
+
channelId: string;
|
|
105
|
+
userId: string;
|
|
106
|
+
isJoined: boolean;
|
|
107
|
+
avatarFileId: string;
|
|
108
|
+
categoryIds: string[];
|
|
109
|
+
}[];
|
|
110
|
+
communityUsers: Amity.MembershipRaw<"community", false>[];
|
|
111
|
+
categories: {
|
|
112
|
+
name: string;
|
|
113
|
+
metadata: {};
|
|
114
|
+
updatedAt: string;
|
|
115
|
+
createdAt: string;
|
|
116
|
+
isDeleted: boolean;
|
|
117
|
+
categoryId: string;
|
|
118
|
+
}[];
|
|
119
|
+
users: Amity.User[];
|
|
120
|
+
feeds: never[];
|
|
121
|
+
paging: {
|
|
122
|
+
next: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
export declare const communityQueryResponsePage2: {
|
|
127
|
+
data: {
|
|
128
|
+
communities: {
|
|
129
|
+
path: string;
|
|
130
|
+
isOfficial: boolean;
|
|
131
|
+
isPublic: boolean;
|
|
132
|
+
onlyAdminCanPost: boolean;
|
|
133
|
+
postsCount: number;
|
|
134
|
+
membersCount: number;
|
|
135
|
+
moderatorMemberCount: number;
|
|
136
|
+
updatedAt: string;
|
|
137
|
+
createdAt: string;
|
|
138
|
+
isDeleted: boolean;
|
|
139
|
+
needApprovalOnPostCreation: boolean;
|
|
140
|
+
displayName: string;
|
|
141
|
+
tags: string[];
|
|
142
|
+
metadata: {};
|
|
143
|
+
hasFlaggedComment: boolean;
|
|
144
|
+
hasFlaggedPost: boolean;
|
|
145
|
+
communityId: string;
|
|
146
|
+
channelId: string;
|
|
147
|
+
userId: string;
|
|
148
|
+
isJoined: boolean;
|
|
149
|
+
avatarFileId: string;
|
|
150
|
+
categoryIds: string[];
|
|
151
|
+
}[];
|
|
152
|
+
communityUsers: Amity.MembershipRaw<"community", false>[];
|
|
153
|
+
categories: {
|
|
154
|
+
name: string;
|
|
155
|
+
metadata: {};
|
|
156
|
+
updatedAt: string;
|
|
157
|
+
createdAt: string;
|
|
158
|
+
isDeleted: boolean;
|
|
159
|
+
categoryId: string;
|
|
160
|
+
}[];
|
|
161
|
+
users: Amity.User[];
|
|
162
|
+
feeds: never[];
|
|
163
|
+
paging: {
|
|
164
|
+
next: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
36
168
|
//# sourceMappingURL=community.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"community.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/community.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,SAajC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,SAoB/B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,SAI/B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAa5D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAO5D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAK5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,gBAKpC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;CAUtC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;GAG9B,CAAC"}
|
|
1
|
+
{"version":3,"file":"community.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/community.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,SAajC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,SAoB/B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,SAI/B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAa5D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAO5D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAK5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,gBAKpC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;CAUtC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;GAG9B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;CAuBzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;CAuBzB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBlC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/file.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAmBtC,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAetC,CAAC;AAEF,eAAO,MAAM,kBAAkB,gBAK9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,gBAI/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,QAA2B,CAAC;AAC7C,eAAO,MAAM,mBAAmB;;;CAAiC,CAAC;AAElE,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AAEvB,cAAc,QAAQ,CAAC;AAEvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAE3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAE7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,QAA2B,CAAC;AAC7C,eAAO,MAAM,mBAAmB;;;CAAiC,CAAC;AAElE,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AAEvB,cAAc,QAAQ,CAAC;AAEvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAE3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAE7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAE3B,cAAc,UAAU,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export declare function generatePost(params?: Partial<Amity.Post>): Amity.Post;
|
|
2
|
+
export declare function generateComment(params?: Partial<Amity.Comment>): Amity.Comment;
|
|
1
3
|
export declare const post11: Amity.Post;
|
|
2
4
|
export declare const comment11: Amity.Comment;
|
|
3
5
|
export declare const post12: Amity.Post;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/post.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/post.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAwBrE;AAED,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,OAAO,CA0B9E;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAAqB,CAAC;AAEjD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,OAA2B,CAAC;AAE1D,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAG1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAG1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAM1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAO1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAI1B,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;CAMjB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,cAGlC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,WAM/B,CAAC;AAIF,eAAO,MAAM,iBAAiB;;;;;;;;;;;CAS7B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;CAQlC,CAAC"}
|
|
@@ -1,23 +1,3 @@
|
|
|
1
1
|
export declare function generateRawSubChannel(params?: Partial<Amity.RawSubChannel>): Amity.RawSubChannel;
|
|
2
2
|
export declare function generateSubChannel(params?: Record<string, any>): Amity.SubChannel;
|
|
3
|
-
export declare const createSubChannelError400400: {
|
|
4
|
-
status: string;
|
|
5
|
-
message: string;
|
|
6
|
-
code: number;
|
|
7
|
-
data: {
|
|
8
|
-
detail: {
|
|
9
|
-
channelId: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export declare const createSubChannelError400301: {
|
|
14
|
-
status: string;
|
|
15
|
-
message: string;
|
|
16
|
-
code: number;
|
|
17
|
-
data: {
|
|
18
|
-
detail: {
|
|
19
|
-
channelId: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
3
|
//# sourceMappingURL=subChannel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subChannel.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/subChannel.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,aAAa,CAkBhG;AAED,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,UAAU,CAKjF
|
|
1
|
+
{"version":3,"file":"subChannel.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/subChannel.ts"],"names":[],"mappings":"AAGA,wBAAgB,qBAAqB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,aAAa,CAkBhG;AAED,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,UAAU,CAKjF"}
|
|
@@ -12,6 +12,24 @@ export declare const userQueryResponse: {
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
+
export declare const userUpdateResponse: {
|
|
16
|
+
data: {
|
|
17
|
+
users: {
|
|
18
|
+
isDeleted: boolean;
|
|
19
|
+
displayName: string;
|
|
20
|
+
userId: string;
|
|
21
|
+
metadata: {};
|
|
22
|
+
roles: never[];
|
|
23
|
+
permissions: never[];
|
|
24
|
+
flagCount: number;
|
|
25
|
+
hashFlag: null;
|
|
26
|
+
avatarCustomUrl: string;
|
|
27
|
+
avatarFileId: null;
|
|
28
|
+
isGlobalBan: boolean;
|
|
29
|
+
}[];
|
|
30
|
+
files: never[];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
15
33
|
export declare const users: Amity.User[];
|
|
16
34
|
export declare const userPayload: Amity.UserPayload;
|
|
17
35
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/user.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAS1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAG1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAG1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAG1B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;CAS7B,CAAC;AACF,eAAO,MAAM,KAAK,cAAmC,CAAC;AAGtD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,WAG/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/user.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAS1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAG1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAG1B,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,IAG1B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;CAS7B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;CAmB9B,CAAC;AACF,eAAO,MAAM,KAAK,cAAmC,CAAC;AAGtD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,WAG/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveObject.test.d.ts","sourceRoot":"","sources":["../../../src/utils/tests/liveObject.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amityco/ts-sdk",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.38",
|
|
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",
|
|
@@ -36,14 +36,15 @@
|
|
|
36
36
|
"@rollup/plugin-commonjs": "^22.0.2",
|
|
37
37
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
38
38
|
"@rollup/plugin-replace": "^4.0.0",
|
|
39
|
-
"@types/axios": "^0.14.0",
|
|
40
39
|
"@types/debug": "^4.1.7",
|
|
41
40
|
"@types/jest": "^27.5.1",
|
|
42
41
|
"@types/node": "^18.6.4",
|
|
43
42
|
"@types/socket.io-client": "^1.4.34",
|
|
44
43
|
"chalk": "^4.1.2",
|
|
45
44
|
"concurrently": "^6.1.0",
|
|
45
|
+
"form-data": "^4.0.0",
|
|
46
46
|
"jest": "^28.1.0",
|
|
47
|
+
"nock": "^13.3.0",
|
|
47
48
|
"rimraf": "^3.0.2",
|
|
48
49
|
"rollup": "^2.77.2",
|
|
49
50
|
"rollup-plugin-terser": "^7.0.2",
|
|
@@ -54,12 +55,11 @@
|
|
|
54
55
|
"dependencies": {
|
|
55
56
|
"@react-native-async-storage/async-storage": "^1.17.7",
|
|
56
57
|
"agentkeepalive": "^4.2.1",
|
|
57
|
-
"axios": "^
|
|
58
|
+
"axios": "^1.2.3",
|
|
58
59
|
"debug": "^4.3.4",
|
|
59
60
|
"js-base64": "^3.7.2",
|
|
60
61
|
"mitt": "^3.0.0",
|
|
61
62
|
"mqtt": "^4.3.7",
|
|
62
|
-
"qs": "^6.11.0",
|
|
63
63
|
"react-native-uuid": "^2.0.1",
|
|
64
64
|
"socket.io-client": "2.2.0",
|
|
65
65
|
"ts-jest": "^28.0.3"
|
|
@@ -80,6 +80,7 @@ declare global {
|
|
|
80
80
|
'community.left': Amity.CommunityMembershipPayload;
|
|
81
81
|
'community.userAdded': Amity.CommunityMembershipPayload;
|
|
82
82
|
'community.userRemoved': Amity.CommunityMembershipPayload;
|
|
83
|
+
'community.userChanged': Amity.CommunityMembershipPayload;
|
|
83
84
|
'community.userBanned': Amity.CommunityMembershipPayload;
|
|
84
85
|
'community.userUnbanned': Amity.CommunityMembershipPayload;
|
|
85
86
|
};
|
|
@@ -9,5 +9,18 @@ declare global {
|
|
|
9
9
|
} & Amity.Metadata &
|
|
10
10
|
Amity.Timestamps &
|
|
11
11
|
Amity.SoftDelete;
|
|
12
|
+
|
|
13
|
+
type QueryCategories = {
|
|
14
|
+
isDeleted?: Amity.Category['isDeleted'];
|
|
15
|
+
sortBy?: 'name' | 'firstCreated' | 'lastCreated';
|
|
16
|
+
page?: Amity.Page;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type CategoryLiveCollection = Amity.LiveCollectionParams<Omit<QueryCategories, 'page'>>;
|
|
20
|
+
|
|
21
|
+
type CategoryLiveCollectionCache = Amity.LiveCollectionCache<
|
|
22
|
+
Amity.Category['categoryId'],
|
|
23
|
+
Pick<QueryCategories, 'page'>
|
|
24
|
+
>;
|
|
12
25
|
}
|
|
13
26
|
}
|
|
@@ -23,6 +23,14 @@ export const DefaultCommunityPostSetting = 'ONLY_ADMIN_CAN_POST';
|
|
|
23
23
|
|
|
24
24
|
declare global {
|
|
25
25
|
namespace Amity {
|
|
26
|
+
type CommunityActionType =
|
|
27
|
+
| 'onCreate'
|
|
28
|
+
| 'onUpdate'
|
|
29
|
+
| 'onDelete'
|
|
30
|
+
| 'onJoin'
|
|
31
|
+
| 'onLeft'
|
|
32
|
+
| 'onMemberCountChanged';
|
|
33
|
+
|
|
26
34
|
type RawCommunity = {
|
|
27
35
|
communityId: string;
|
|
28
36
|
|
|
@@ -55,5 +63,22 @@ declare global {
|
|
|
55
63
|
type Community = Omit<Amity.RawCommunity, 'onlyAdminCanPost' | 'needApprovalOnPostCreation'> & {
|
|
56
64
|
postSetting?: ValueOf<typeof CommunityPostSettings>;
|
|
57
65
|
};
|
|
66
|
+
|
|
67
|
+
type QueryCommunities = {
|
|
68
|
+
displayName?: string;
|
|
69
|
+
membership?: 'all' | 'member' | 'notMember';
|
|
70
|
+
categoryId?: Amity.Category['categoryId'];
|
|
71
|
+
isDeleted?: Amity.Community['isDeleted'];
|
|
72
|
+
tags?: Amity.Taggable['tags'];
|
|
73
|
+
sortBy?: 'displayName' | 'firstCreated' | 'lastCreated';
|
|
74
|
+
page?: Amity.Page;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
type CommunityLiveCollection = Amity.LiveCollectionParams<Omit<QueryCommunities, 'page'>>;
|
|
78
|
+
|
|
79
|
+
type CommunityLiveCollectionCache = Amity.LiveCollectionCache<
|
|
80
|
+
Amity.Community['communityId'],
|
|
81
|
+
Pick<QueryCommunities, 'page'>
|
|
82
|
+
>;
|
|
58
83
|
}
|
|
59
84
|
}
|
package/src/@types/global.ts
CHANGED
|
@@ -37,6 +37,11 @@ declare global {
|
|
|
37
37
|
*
|
|
38
38
|
*/
|
|
39
39
|
declare module 'axios' {
|
|
40
|
+
export interface AxiosDefaults {
|
|
41
|
+
// expires at iso string for access token
|
|
42
|
+
metadata?: { tokenExpiry: string };
|
|
43
|
+
}
|
|
44
|
+
|
|
40
45
|
export interface AxiosRequestConfig {
|
|
41
46
|
// expires at iso string for access token
|
|
42
47
|
metadata?: { tokenExpiry: string };
|