@amityco/ts-sdk 7.5.4-2d34fd5f.0 → 7.5.4-3506dd3.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 +2 -8
- package/dist/@types/domains/content.d.ts.map +1 -1
- package/dist/@types/domains/feed.d.ts +1 -2
- package/dist/@types/domains/feed.d.ts.map +1 -1
- package/dist/@types/domains/file.d.ts +1 -3
- package/dist/@types/domains/file.d.ts.map +1 -1
- package/dist/@types/domains/post.d.ts +0 -3
- package/dist/@types/domains/post.d.ts.map +1 -1
- package/dist/communityRepository/api/deleteCommunity.d.ts.map +1 -1
- package/dist/communityRepository/api/getCommunity.d.ts +2 -2
- package/dist/communityRepository/api/getCommunity.d.ts.map +1 -1
- package/dist/communityRepository/observers/getCommunity.d.ts.map +1 -1
- package/dist/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.d.ts.map +1 -1
- package/dist/feedRepository/api/getCustomRankingGlobalFeed.d.ts +1 -1
- package/dist/feedRepository/api/getCustomRankingGlobalFeed.d.ts.map +1 -1
- package/dist/feedRepository/api/queryGlobalFeed.d.ts.map +1 -1
- package/dist/fileRepository/api/index.d.ts +0 -1
- package/dist/fileRepository/api/index.d.ts.map +1 -1
- package/dist/index.cjs.js +9 -121
- package/dist/index.esm.js +9 -121
- package/dist/index.umd.js +2 -2
- package/dist/messagePreview/utils/getSubChannelMessagePreviewWithUser.d.ts +1 -1
- package/dist/postRepository/api/index.d.ts +0 -1
- package/dist/postRepository/api/index.d.ts.map +1 -1
- package/dist/utils/linkedObject/postLinkedObject.d.ts.map +1 -1
- package/dist/utils/postTypePredicate.d.ts +0 -1
- package/dist/utils/postTypePredicate.d.ts.map +1 -1
- package/dist/utils/tests/dummy/comment.d.ts +1 -1
- package/package.json +1 -1
- package/src/@types/domains/content.ts +0 -10
- package/src/@types/domains/feed.ts +1 -2
- package/src/@types/domains/file.ts +0 -5
- package/src/@types/domains/post.ts +0 -4
- package/src/communityRepository/api/deleteCommunity.ts +1 -2
- package/src/communityRepository/api/getCommunity.ts +7 -5
- package/src/communityRepository/observers/getCommunity.ts +12 -24
- package/src/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.ts +2 -1
- package/src/feedRepository/api/getCustomRankingGlobalFeed.ts +1 -1
- package/src/feedRepository/api/queryGlobalFeed.ts +1 -3
- package/src/fileRepository/api/index.ts +0 -1
- package/src/postRepository/api/index.ts +0 -2
- package/src/postRepository/api/queryPosts.ts +1 -1
- package/src/postRepository/observers/getPosts/PostPaginationController.ts +1 -1
- package/src/utils/linkedObject/postLinkedObject.ts +1 -12
- package/src/utils/postTypePredicate.ts +0 -10
- package/dist/fileRepository/api/uploadClip.d.ts +0 -17
- package/dist/fileRepository/api/uploadClip.d.ts.map +0 -1
- package/dist/postRepository/api/createClipPost.d.ts +0 -32
- package/dist/postRepository/api/createClipPost.d.ts.map +0 -1
- package/src/fileRepository/api/uploadClip.ts +0 -71
- package/src/postRepository/api/createClipPost.ts +0 -62
|
@@ -19,7 +19,7 @@ export declare enum ContentFlagReasonEnum {
|
|
|
19
19
|
declare global {
|
|
20
20
|
namespace Amity {
|
|
21
21
|
type ContentFlagReason = Exclude<`${ContentFlagReasonEnum}`, `${ContentFlagReasonEnum.Others}`> | (string & {});
|
|
22
|
-
type ContentType = 'text' | 'image' | 'file' | 'video' | 'poll' | 'json' | 'liveStream' |
|
|
22
|
+
type ContentType = 'text' | 'image' | 'file' | 'video' | 'poll' | 'json' | 'liveStream' | string;
|
|
23
23
|
type ContentFeedType = ValueOf<typeof ContentFeedType>;
|
|
24
24
|
type ContentDataText = {
|
|
25
25
|
text: string;
|
|
@@ -42,19 +42,13 @@ declare global {
|
|
|
42
42
|
[K in Amity.VideoSize]?: Amity.File<'video'>['fileId'];
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
type ContentDataClip = {
|
|
46
|
-
thumbnailFileId: Amity.File<'image'>['fileId'];
|
|
47
|
-
fileId: Amity.File<'clip'>['fileId'];
|
|
48
|
-
isMuted?: boolean;
|
|
49
|
-
displayMode?: Amity.ClipDisplayMode;
|
|
50
|
-
};
|
|
51
45
|
type ContentDataPoll = {
|
|
52
46
|
pollId: Amity.Poll['pollId'];
|
|
53
47
|
};
|
|
54
48
|
type ContentDataStream = {
|
|
55
49
|
streamId: Amity.Stream['streamId'];
|
|
56
50
|
};
|
|
57
|
-
type ContentData<T extends ContentType> = T extends 'text' ? ContentDataText : T extends 'file' ? ContentDataFile : T extends 'image' ? ContentDataImage : T extends 'video' ? ContentDataVideo : T extends 'poll' ? ContentDataPoll : T extends 'liveStream' ? ContentDataStream : T extends '
|
|
51
|
+
type ContentData<T extends ContentType> = T extends 'text' ? ContentDataText : T extends 'file' ? ContentDataFile : T extends 'image' ? ContentDataImage : T extends 'video' ? ContentDataVideo : T extends 'poll' ? ContentDataPoll : T extends 'liveStream' ? ContentDataStream : T extends 'json' ? Record<string, unknown> : T extends string ? string | Record<string, unknown> : never;
|
|
58
52
|
type Content<T extends ContentType> = {
|
|
59
53
|
dataType?: T;
|
|
60
54
|
dataTypes?: T[];
|
|
@@ -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,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,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,iBAAiB,GAClB,OAAO,CAAC,GAAG,qBAAqB,EAAE,EAAE,GAAG,qBAAqB,CAAC,MAAM,EAAE,CAAC,GACt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AAC;SACvB,CAAC;QAEF,KAAK,kBAAkB,GAAG;YACxB,WAAW,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;SACH,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"}
|
|
@@ -9,9 +9,8 @@ declare global {
|
|
|
9
9
|
postCount: number;
|
|
10
10
|
} & Amity.Timestamps;
|
|
11
11
|
type QueryGlobalFeed = {
|
|
12
|
-
|
|
12
|
+
dataType?: 'video' | 'image' | 'file' | 'liveStream';
|
|
13
13
|
queryToken?: string;
|
|
14
|
-
resolveParent?: boolean;
|
|
15
14
|
};
|
|
16
15
|
}
|
|
17
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/feed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,IAAI,GAAG;YACV,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,EAAE,WAAW,GAAG,WAAW,CAAC;YACpC,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC;YACxD,QAAQ,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;SACnB,GAAG,KAAK,CAAC,UAAU,CAAC;QAErB,KAAK,eAAe,GAAG;YACrB,
|
|
1
|
+
{"version":3,"file":"feed.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/feed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,IAAI,GAAG;YACV,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,EAAE,WAAW,GAAG,WAAW,CAAC;YACpC,UAAU,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC;YACxD,QAAQ,EAAE,MAAM,CAAC;YACjB,SAAS,EAAE,MAAM,CAAC;SACnB,GAAG,KAAK,CAAC,UAAU,CAAC;QAErB,KAAK,eAAe,GAAG;YACrB,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;YACrD,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH;CACF"}
|
|
@@ -2,7 +2,6 @@ export declare const FileType: Readonly<{
|
|
|
2
2
|
FILE: "file";
|
|
3
3
|
IMAGE: "image";
|
|
4
4
|
VIDEO: "video";
|
|
5
|
-
CLIP: "clip";
|
|
6
5
|
}>;
|
|
7
6
|
export declare const VideoResolution: Readonly<{
|
|
8
7
|
'1080P': "1080p";
|
|
@@ -43,8 +42,7 @@ declare global {
|
|
|
43
42
|
isFull: boolean;
|
|
44
43
|
};
|
|
45
44
|
type VideoMetadata = Record<string, never>;
|
|
46
|
-
type
|
|
47
|
-
type MetadataFor<T extends FileType> = T extends 'file' ? FileMetadata : T extends 'image' ? ImageMetadata : T extends 'video' ? VideoMetadata : T extends 'clip' ? ClipMetadata : never;
|
|
45
|
+
type MetadataFor<T extends FileType> = T extends 'file' ? FileMetadata : T extends 'image' ? ImageMetadata : T extends 'video' ? VideoMetadata : never;
|
|
48
46
|
type File<T extends FileType = any> = Amity.FilePayload<T>;
|
|
49
47
|
}
|
|
50
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/file.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/file.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;EAInB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;EAKjC,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;EAKpB,CAAC;AAEH,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,cAAc,GAAG,GAAG,kBAAkB,EAAE,CAAC;QAE9C,KAAK,QAAQ,GAAG,OAAO,CAAC,OAAO,QAAQ,CAAC,CAAC;QAEzC,KAAK,eAAe,GAAG,OAAO,CAAC,OAAO,eAAe,CAAC,CAAC;QAEvD,KAAK,sBAAsB,GAAG,OAAO,CAAC,OAAO,sBAAsB,CAAC,CAAC;QAErE,KAAK,SAAS,GAAG,OAAO,CAAC,OAAO,SAAS,CAAC,CAAC;QAE3C,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAE1C,KAAK,aAAa,GAAG;YACnB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC9B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC7B,KAAK,EAAE,MAAM,CAAC;YACd,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,OAAO,CAAC;SACjB,CAAC;QAEF,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAE3C,KAAK,WAAW,CAAC,CAAC,SAAS,QAAQ,IAAI,CAAC,SAAS,MAAM,GACnD,YAAY,GACZ,CAAC,SAAS,OAAO,GACjB,aAAa,GACb,CAAC,SAAS,OAAO,GACjB,aAAa,GACb,KAAK,CAAC;QAEV,KAAK,IAAI,CAAC,CAAC,SAAS,QAAQ,GAAG,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;KAC5D;CACF"}
|
|
@@ -5,7 +5,6 @@ export declare const PostContentType: Readonly<{
|
|
|
5
5
|
VIDEO: "video";
|
|
6
6
|
LIVESTREAM: "liveStream";
|
|
7
7
|
POLL: "poll";
|
|
8
|
-
CLIP: "clip";
|
|
9
8
|
}>;
|
|
10
9
|
declare global {
|
|
11
10
|
namespace Amity {
|
|
@@ -57,10 +56,8 @@ declare global {
|
|
|
57
56
|
getVideoInfo: () => Amity.File<'video'> | undefined;
|
|
58
57
|
getVideoThumbnailInfo: () => Amity.File<'image'> | undefined;
|
|
59
58
|
getFileInfo: () => Amity.File<'file'> | undefined;
|
|
60
|
-
getClipInfo: () => Amity.File<'clip'> | undefined;
|
|
61
59
|
};
|
|
62
60
|
type Post<T extends PostContentType = any> = Amity.InternalPost<T> & Amity.PostLinkObject;
|
|
63
|
-
type ClipDisplayMode = 'fill' | 'fit';
|
|
64
61
|
type QueryPosts = {
|
|
65
62
|
targetId: string;
|
|
66
63
|
targetType: Amity.InternalPost['targetType'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/post.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/post.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;EAO1B,CAAC;AAEH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QAEd,KAAK,cAAc,GAAG,KAAK,CAAC,IAAI,C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AAC,CACvC,CAAC;QAEF,KAAK,qCAAqC,GAAG,KAAK,CAAC,mBAAmB,CACpE,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,eAAe;QAC7C,wBAAwB,CACzB,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteCommunity.d.ts","sourceRoot":"","sources":["../../../src/communityRepository/api/deleteCommunity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deleteCommunity.d.ts","sourceRoot":"","sources":["../../../src/communityRepository/api/deleteCommunity.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,gBACb,MAAM,SAAS,CAAC,aAAa,CAAC,KAC1C,QAAQ,MAAM,SAAS,CAmBzB,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @async
|
|
14
14
|
*/
|
|
15
15
|
export declare const getCommunity: {
|
|
16
|
-
(communityId: Amity.Community['communityId'], type?: Amity.JoinRequestType, includeDiscoverablePrivateCommunity?: boolean): Promise<Amity.Cached<Amity.
|
|
16
|
+
(communityId: Amity.Community['communityId'], type?: Amity.JoinRequestType, includeDiscoverablePrivateCommunity?: boolean): Promise<Amity.Cached<Amity.Community>>;
|
|
17
17
|
/**
|
|
18
18
|
* ```js
|
|
19
19
|
* import { CommunityRepository } from '@amityco/ts-sdk'
|
|
@@ -27,6 +27,6 @@ export declare const getCommunity: {
|
|
|
27
27
|
*
|
|
28
28
|
* @category Community API
|
|
29
29
|
*/
|
|
30
|
-
locally(communityId: Amity.Community['communityId']): Amity.Cached<Amity.
|
|
30
|
+
locally(communityId: Amity.Community['communityId']): Amity.Cached<Amity.Community> | undefined;
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=getCommunity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCommunity.d.ts","sourceRoot":"","sources":["../../../src/communityRepository/api/getCommunity.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY;kBACV,MAAM,SAAS,CAAC,aAAa,CAAC,SACpC,MAAM,eAAe,wCACU,OAAO,GAC5C,QAAQ,MAAM,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"getCommunity.d.ts","sourceRoot":"","sources":["../../../src/communityRepository/api/getCommunity.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY;kBACV,MAAM,SAAS,CAAC,aAAa,CAAC,SACpC,MAAM,eAAe,wCACU,OAAO,GAC5C,QAAQ,MAAM,MAAM,CAAC,MAAM,SAAS,CAAC,CAAC;IAiCzC;;;;;;;;;;;;OAYG;yBAEY,MAAM,SAAS,CAAC,aAAa,CAAC,GAC1C,MAAM,MAAM,CAAC,MAAM,SAAS,CAAC,GAAG,SAAS;CAjB3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCommunity.d.ts","sourceRoot":"","sources":["../../../src/communityRepository/observers/getCommunity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getCommunity.d.ts","sourceRoot":"","sources":["../../../src/communityRepository/observers/getCommunity.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,YAAY,gBACV,MAAM,SAAS,CAAC,aAAa,CAAC,YACjC,MAAM,kBAAkB,CAAC,MAAM,SAAS,CAAC,KAClD,MAAM,YAaR,CAAC"}
|
package/dist/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JoinRequestsPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"JoinRequestsPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAGlF;;;GAGG;AACH,qBAAa,gCAAiC,SAAQ,oBAAoB,CACxE,aAAa,EACb,KAAK,CAAC,yBAAyB,CAChC;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,yBAAyB,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;CAczF"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* */
|
|
15
15
|
export declare const getCustomRankingGlobalFeed: {
|
|
16
16
|
(query?: {
|
|
17
|
-
dataTypes?: ('video' | 'image' | 'file' | 'liveStream'
|
|
17
|
+
dataTypes?: ('video' | 'image' | 'file' | 'liveStream')[];
|
|
18
18
|
limit?: number;
|
|
19
19
|
queryToken?: string;
|
|
20
20
|
}): Promise<Omit<Amity.Cached<Amity.Paged<Amity.Post>> & Amity.Pagination, 'nextPage' | 'prevPage'>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCustomRankingGlobalFeed.d.ts","sourceRoot":"","sources":["../../../src/feedRepository/api/getCustomRankingGlobalFeed.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;KAaK;AACL,eAAO,MAAM,0BAA0B;aAAkB;QACvD,SAAS,CAAC,EAAE,CAAC,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"getCustomRankingGlobalFeed.d.ts","sourceRoot":"","sources":["../../../src/feedRepository/api/getCustomRankingGlobalFeed.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;KAaK;AACL,eAAO,MAAM,0BAA0B;aAAkB;QACvD,SAAS,CAAC,EAAE,CAAC,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC,EAAE,CAAC;QAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,QACF,KAAK,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,MAAM,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC,CACxF;IAyCD;;;;;;;;;;;;;SAaK;oBAEK,WAAW,iCAAiC,CAAC,CAAC,CAAC,CAAC,GAEtD,KAAK,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,MAAM,UAAU,EAAE,UAAU,GAAG,UAAU,CAAC,GACvF,SAAS;CArBZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryGlobalFeed.d.ts","sourceRoot":"","sources":["../../../src/feedRepository/api/queryGlobalFeed.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;KAaK;AACL,eAAO,MAAM,eAAe;aAClB,MAAM,eAAe,GAC5B,QACD,KAAK,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CACxF;
|
|
1
|
+
{"version":3,"file":"queryGlobalFeed.d.ts","sourceRoot":"","sources":["../../../src/feedRepository/api/queryGlobalFeed.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;KAaK;AACL,eAAO,MAAM,eAAe;aAClB,MAAM,eAAe,GAC5B,QACD,KAAK,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CACxF;IA8CD;;;;;;;;;;;;;SAaK;oBAEK,WAAW,sBAAsB,CAAC,CAAC,CAAC,CAAC,GAE3C,KAAK,MAAM,MAAM,CAAC,MAAM,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,GACvF,SAAS;CArBZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fileRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fileRepository/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -33,7 +33,6 @@ const FileType = Object.freeze({
|
|
|
33
33
|
FILE: 'file',
|
|
34
34
|
IMAGE: 'image',
|
|
35
35
|
VIDEO: 'video',
|
|
36
|
-
CLIP: 'clip',
|
|
37
36
|
});
|
|
38
37
|
const VideoResolution = Object.freeze({
|
|
39
38
|
'1080P': '1080p',
|
|
@@ -117,7 +116,6 @@ const PostContentType = Object.freeze({
|
|
|
117
116
|
VIDEO: 'video',
|
|
118
117
|
LIVESTREAM: 'liveStream',
|
|
119
118
|
POLL: 'poll',
|
|
120
|
-
CLIP: 'clip',
|
|
121
119
|
});
|
|
122
120
|
|
|
123
121
|
exports.InvitationTypeEnum = void 0;
|
|
@@ -6693,13 +6691,6 @@ function isAmityVideoPost(post) {
|
|
|
6693
6691
|
'videoFileId' in post.data &&
|
|
6694
6692
|
'thumbnailFileId' in post.data &&
|
|
6695
6693
|
post.dataType === 'video');
|
|
6696
|
-
}
|
|
6697
|
-
function isAmityClipPost(post) {
|
|
6698
|
-
return !!(post.data &&
|
|
6699
|
-
typeof post.data !== 'string' &&
|
|
6700
|
-
'fileId' in post.data &&
|
|
6701
|
-
'thumbnailFileId' in post.data &&
|
|
6702
|
-
post.dataType === 'clip');
|
|
6703
6694
|
}
|
|
6704
6695
|
|
|
6705
6696
|
const postLinkedObject = (post) => {
|
|
@@ -6754,12 +6745,6 @@ const postLinkedObject = (post) => {
|
|
|
6754
6745
|
return isAmityFilePost(post)
|
|
6755
6746
|
? (_b = pullFromCache(['file', 'get', (_a = post === null || post === void 0 ? void 0 : post.data) === null || _a === void 0 ? void 0 : _a.fileId])) === null || _b === void 0 ? void 0 : _b.data
|
|
6756
6747
|
: undefined;
|
|
6757
|
-
},
|
|
6758
|
-
getClipInfo() {
|
|
6759
|
-
var _a, _b;
|
|
6760
|
-
return isAmityClipPost(post)
|
|
6761
|
-
? (_b = pullFromCache(['file', 'get', (_a = post === null || post === void 0 ? void 0 : post.data) === null || _a === void 0 ? void 0 : _a.fileId])) === null || _b === void 0 ? void 0 : _b.data
|
|
6762
|
-
: undefined;
|
|
6763
6748
|
} });
|
|
6764
6749
|
};
|
|
6765
6750
|
|
|
@@ -7740,7 +7725,7 @@ class PaginationController {
|
|
|
7740
7725
|
*/
|
|
7741
7726
|
class JoinRequestsPaginationController extends PaginationController {
|
|
7742
7727
|
async getRequest(queryParams, token) {
|
|
7743
|
-
const { limit =
|
|
7728
|
+
const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT, communityId } = queryParams, params = __rest(queryParams, ["limit", "communityId"]);
|
|
7744
7729
|
const options = token ? { token } : { limit };
|
|
7745
7730
|
const { data: queryResponse } = await this.http.get(`/api/v4/communities/${communityId}/join`, {
|
|
7746
7731
|
params: Object.assign(Object.assign({}, params), { options }),
|
|
@@ -13730,57 +13715,6 @@ const updateAltText = async (fileId, altText) => {
|
|
|
13730
13715
|
};
|
|
13731
13716
|
/* end_public_function */
|
|
13732
13717
|
|
|
13733
|
-
/* begin_public_function
|
|
13734
|
-
id: file.upload.clip
|
|
13735
|
-
*/
|
|
13736
|
-
/**
|
|
13737
|
-
* ```js
|
|
13738
|
-
* import { FileRepository } from '@amityco/ts-sdk'
|
|
13739
|
-
* const created = await FileRepository.uploadClip(formData)
|
|
13740
|
-
* ```
|
|
13741
|
-
*
|
|
13742
|
-
* Creates an {@link Amity.File}
|
|
13743
|
-
*
|
|
13744
|
-
* @param formData The data necessary to create a new {@link Amity.File}
|
|
13745
|
-
* @param onProgress The callback to track the upload progress
|
|
13746
|
-
* @returns The newly created {@link Amity.File}
|
|
13747
|
-
*
|
|
13748
|
-
* @category File API
|
|
13749
|
-
* @async
|
|
13750
|
-
*/
|
|
13751
|
-
const uploadClip = async (formData, feedType, onProgress) => {
|
|
13752
|
-
const client = getActiveClient();
|
|
13753
|
-
client.log('file/uploadClip', formData);
|
|
13754
|
-
const file = formData.get('files');
|
|
13755
|
-
if (!file)
|
|
13756
|
-
throw new Error('The formData object must have a `files` key.');
|
|
13757
|
-
const accessType = GlobalFileAccessType$1.getInstance().getFileAccessType();
|
|
13758
|
-
formData.append('accessType', accessType);
|
|
13759
|
-
formData.append('preferredFilename', file.name);
|
|
13760
|
-
if (feedType) {
|
|
13761
|
-
formData.append('feedType', feedType);
|
|
13762
|
-
}
|
|
13763
|
-
const headers = 'getHeaders' in formData
|
|
13764
|
-
? formData.getHeaders()
|
|
13765
|
-
: { 'content-type': 'multipart/form-data' };
|
|
13766
|
-
const { data } = await client.upload.post('/api/v4/clips', formData, {
|
|
13767
|
-
headers,
|
|
13768
|
-
onUploadProgress({ loaded, total = 100 }) {
|
|
13769
|
-
onProgress && onProgress(Math.round((loaded * 100) / total));
|
|
13770
|
-
},
|
|
13771
|
-
});
|
|
13772
|
-
// API-FIX: payload should be serialized properly
|
|
13773
|
-
// const { files } = data
|
|
13774
|
-
const cachedAt = client.cache && Date.now();
|
|
13775
|
-
if (client.cache)
|
|
13776
|
-
ingestInCache({ files: data }, { cachedAt });
|
|
13777
|
-
return {
|
|
13778
|
-
data,
|
|
13779
|
-
cachedAt,
|
|
13780
|
-
};
|
|
13781
|
-
};
|
|
13782
|
-
/* end_public_function */
|
|
13783
|
-
|
|
13784
13718
|
var index$k = /*#__PURE__*/Object.freeze({
|
|
13785
13719
|
__proto__: null,
|
|
13786
13720
|
getFile: getFile,
|
|
@@ -13789,8 +13723,7 @@ var index$k = /*#__PURE__*/Object.freeze({
|
|
|
13789
13723
|
fileUrlWithSize: fileUrlWithSize,
|
|
13790
13724
|
uploadVideo: uploadVideo,
|
|
13791
13725
|
uploadImage: uploadImage,
|
|
13792
|
-
updateAltText: updateAltText
|
|
13793
|
-
uploadClip: uploadClip
|
|
13726
|
+
updateAltText: updateAltText
|
|
13794
13727
|
});
|
|
13795
13728
|
|
|
13796
13729
|
/**
|
|
@@ -19675,7 +19608,7 @@ const getCommunity$1 = async (communityId, type, includeDiscoverablePrivateCommu
|
|
|
19675
19608
|
}
|
|
19676
19609
|
const { communities } = data;
|
|
19677
19610
|
return {
|
|
19678
|
-
data: communities.find(community => community.communityId === communityId),
|
|
19611
|
+
data: LinkedObject.community(communities.find(community => community.communityId === communityId)),
|
|
19679
19612
|
cachedAt,
|
|
19680
19613
|
};
|
|
19681
19614
|
};
|
|
@@ -19701,7 +19634,7 @@ getCommunity$1.locally = (communityId) => {
|
|
|
19701
19634
|
if (!cached)
|
|
19702
19635
|
return;
|
|
19703
19636
|
return {
|
|
19704
|
-
data: cached.data,
|
|
19637
|
+
data: LinkedObject.community(cached.data),
|
|
19705
19638
|
cachedAt: cached.cachedAt,
|
|
19706
19639
|
};
|
|
19707
19640
|
};
|
|
@@ -19737,7 +19670,7 @@ const deleteCommunity = async (communityId) => {
|
|
|
19737
19670
|
files: [],
|
|
19738
19671
|
users: [],
|
|
19739
19672
|
});
|
|
19740
|
-
return
|
|
19673
|
+
return deleted.data;
|
|
19741
19674
|
};
|
|
19742
19675
|
/* end_public_function */
|
|
19743
19676
|
|
|
@@ -21247,11 +21180,7 @@ const getCommunity = (communityId, callback) => {
|
|
|
21247
21180
|
onCommunityUserUnbanned,
|
|
21248
21181
|
onCommunityUserChanged,
|
|
21249
21182
|
convertEventPayload(onLocalCommunityJoin, 'targetId', 'community'),
|
|
21250
|
-
]
|
|
21251
|
-
callbackDataSelector: (data) => {
|
|
21252
|
-
return LinkedObject.community(data);
|
|
21253
|
-
},
|
|
21254
|
-
});
|
|
21183
|
+
]);
|
|
21255
21184
|
};
|
|
21256
21185
|
/* end_public_function */
|
|
21257
21186
|
|
|
@@ -22390,14 +22319,14 @@ var index$a = /*#__PURE__*/Object.freeze({
|
|
|
22390
22319
|
const queryGlobalFeed = async (query) => {
|
|
22391
22320
|
const client = getActiveClient();
|
|
22392
22321
|
client.log('feed/queryGlobalFeed', query);
|
|
22393
|
-
const _a = query !== null && query !== void 0 ? query : {}, { queryToken
|
|
22322
|
+
const _a = query !== null && query !== void 0 ? query : {}, { queryToken } = _a, params = __rest(_a, ["queryToken"]);
|
|
22394
22323
|
const options = (() => {
|
|
22395
22324
|
if (queryToken)
|
|
22396
22325
|
return { token: queryToken };
|
|
22397
22326
|
return undefined;
|
|
22398
22327
|
})();
|
|
22399
22328
|
const { data: queryPayload } = await client.http.get(`/api/v4/me/global-feeds`, {
|
|
22400
|
-
params: Object.assign(Object.assign({}, params), {
|
|
22329
|
+
params: Object.assign(Object.assign({}, params), { options }),
|
|
22401
22330
|
});
|
|
22402
22331
|
const { paging } = queryPayload, payload = __rest(queryPayload, ["paging"]);
|
|
22403
22332
|
const data = prepareMembershipPayload(payload, 'communityUsers');
|
|
@@ -22983,46 +22912,6 @@ const isPostFlaggedByMe = async (postId) => {
|
|
|
22983
22912
|
};
|
|
22984
22913
|
/* end_public_function */
|
|
22985
22914
|
|
|
22986
|
-
/* begin_public_function
|
|
22987
|
-
id: post.create.clip_post
|
|
22988
|
-
*/
|
|
22989
|
-
/**
|
|
22990
|
-
* ```js
|
|
22991
|
-
* import { PostRepository } from '@amityco/ts-sdk'
|
|
22992
|
-
* const created = await PostRepository.createClipPost({
|
|
22993
|
-
* targetType: 'user',
|
|
22994
|
-
* targetId: 'foobar',
|
|
22995
|
-
* dataType: 'clip',
|
|
22996
|
-
* data: { text: 'hello world' },
|
|
22997
|
-
* attachments: [{ type: 'clip', fileId: 'fileId123', displayMode: 'fill', isMuted: false }]
|
|
22998
|
-
* }))
|
|
22999
|
-
* ```
|
|
23000
|
-
*
|
|
23001
|
-
* Creates an {@link Amity.Post}
|
|
23002
|
-
*
|
|
23003
|
-
* @param bundle The data necessary to create a new {@link Amity.Post}
|
|
23004
|
-
* @returns The newly created {@link Amity.Post}
|
|
23005
|
-
*
|
|
23006
|
-
* @category Post API
|
|
23007
|
-
* @async
|
|
23008
|
-
*/
|
|
23009
|
-
const createClipPost = async (bundle) => {
|
|
23010
|
-
const client = getActiveClient();
|
|
23011
|
-
client.log('post/createPost', bundle);
|
|
23012
|
-
const { data: payload } = await client.http.post('/api/v4/posts', bundle);
|
|
23013
|
-
fireEvent('post.created', payload);
|
|
23014
|
-
const data = prepareMembershipPayload(payload, 'communityUsers');
|
|
23015
|
-
const cachedAt = client.cache && Date.now();
|
|
23016
|
-
if (client.cache)
|
|
23017
|
-
ingestInCache(data, { cachedAt });
|
|
23018
|
-
const { posts } = data;
|
|
23019
|
-
return {
|
|
23020
|
-
data: LinkedObject.post(posts[0]),
|
|
23021
|
-
cachedAt,
|
|
23022
|
-
};
|
|
23023
|
-
};
|
|
23024
|
-
/* end_public_function */
|
|
23025
|
-
|
|
23026
22915
|
/* begin_public_function
|
|
23027
22916
|
id: comment.get_by_ids
|
|
23028
22917
|
*/
|
|
@@ -24111,7 +24000,7 @@ class PostPaginationController extends PaginationController {
|
|
|
24111
24000
|
type: params.sortBy || queryParams.limit ? 'pagination' : undefined,
|
|
24112
24001
|
};
|
|
24113
24002
|
const options = token ? Object.assign(Object.assign({}, baseOptions), { token }) : Object.assign(Object.assign({}, baseOptions), { limit });
|
|
24114
|
-
const { data: queryResponse } = await this.http.get(`/api/
|
|
24003
|
+
const { data: queryResponse } = await this.http.get(`/api/v4/posts`, {
|
|
24115
24004
|
params: Object.assign(Object.assign({}, params), { isDeleted: inferIsDeleted(includeDeleted),
|
|
24116
24005
|
/*
|
|
24117
24006
|
* when creating post like image, file, video BE will create 2 posts
|
|
@@ -24923,7 +24812,6 @@ var index$7 = /*#__PURE__*/Object.freeze({
|
|
|
24923
24812
|
flagPost: flagPost,
|
|
24924
24813
|
unflagPost: unflagPost,
|
|
24925
24814
|
isPostFlaggedByMe: isPostFlaggedByMe,
|
|
24926
|
-
createClipPost: createClipPost,
|
|
24927
24815
|
onPostCreated: onPostCreated,
|
|
24928
24816
|
onPostUpdated: onPostUpdated,
|
|
24929
24817
|
onPostDeleted: onPostDeleted,
|