@amityco/ts-sdk-react-native 6.26.1 → 6.26.2
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/commentRepository/observers/getComments/CommentPaginationController.d.ts.map +1 -1
- package/dist/commentRepository/utils/payload.d.ts +1 -1
- package/dist/commentRepository/utils/payload.d.ts.map +1 -1
- package/dist/index.cjs.js +15 -5
- package/dist/index.esm.js +15 -5
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
- package/src/commentRepository/observers/getComments/CommentPaginationController.ts +6 -1
- package/src/commentRepository/utils/payload.ts +16 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/commentRepository/observers/getComments/CommentPaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAIlF,qBAAa,2BAA4B,SAAQ,oBAAoB,CACnE,SAAS,EACT,KAAK,CAAC,qBAAqB,CAC5B;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,qBAAqB,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;
|
|
1
|
+
{"version":3,"file":"CommentPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/commentRepository/observers/getComments/CommentPaginationController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAIlF,qBAAa,2BAA4B,SAAQ,oBAAoB,CACnE,SAAS,EACT,KAAK,CAAC,qBAAqB,CAC5B;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,qBAAqB,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;CAqBrF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function prepareCommentPayload(
|
|
1
|
+
export declare function prepareCommentPayload(commentPayload: Amity.CommentPayload): Amity.ProcessedCommentPayload;
|
|
2
2
|
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/utils/payload.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CACnC,
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/utils/payload.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,KAAK,CAAC,cAAc,GACnC,KAAK,CAAC,uBAAuB,CAgB/B"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -118,8 +118,8 @@ const PostContentType = Object.freeze({
|
|
|
118
118
|
|
|
119
119
|
function getVersion() {
|
|
120
120
|
try {
|
|
121
|
-
// the string ''v6.26.
|
|
122
|
-
return 'v6.26.
|
|
121
|
+
// the string ''v6.26.2-cjs'' should be replaced by actual value by @rollup/plugin-replace
|
|
122
|
+
return 'v6.26.2-cjs';
|
|
123
123
|
}
|
|
124
124
|
catch (error) {
|
|
125
125
|
return '__dev__';
|
|
@@ -21708,7 +21708,10 @@ const getComment = (commentId, callback) => {
|
|
|
21708
21708
|
class CommentPaginationController extends PaginationController {
|
|
21709
21709
|
async getRequest(queryParams, token) {
|
|
21710
21710
|
const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT, includeDeleted } = queryParams, params = __rest(queryParams, ["limit", "includeDeleted"]);
|
|
21711
|
-
const
|
|
21711
|
+
const baseOptions = {
|
|
21712
|
+
type: params.sortBy || queryParams.limit ? 'pagination' : undefined,
|
|
21713
|
+
};
|
|
21714
|
+
const options = token ? Object.assign(Object.assign({}, baseOptions), { token }) : Object.assign(Object.assign({}, baseOptions), { limit });
|
|
21712
21715
|
const { data: queryResponse } = await this.http.get(`/api/v3/comments`, {
|
|
21713
21716
|
params: Object.assign(Object.assign({}, params), { isDeleted: inferIsDeleted(includeDeleted), options }),
|
|
21714
21717
|
});
|
|
@@ -21778,8 +21781,15 @@ class CommentQueryStreamController extends QueryStreamController {
|
|
|
21778
21781
|
}
|
|
21779
21782
|
}
|
|
21780
21783
|
|
|
21781
|
-
function prepareCommentPayload(
|
|
21782
|
-
|
|
21784
|
+
function prepareCommentPayload(commentPayload) {
|
|
21785
|
+
const { comments } = commentPayload;
|
|
21786
|
+
return Object.assign(Object.assign({}, commentPayload), { comments: comments.map(comment => {
|
|
21787
|
+
if (comment.hasOwnProperty('myReactions'))
|
|
21788
|
+
return comment;
|
|
21789
|
+
// Sometimes `myReactions` field will not come with BE response because that field is empty
|
|
21790
|
+
// We need to put it with an empty array manually to make it show up in client side
|
|
21791
|
+
return Object.assign({ myReactions: [] }, comment);
|
|
21792
|
+
}) });
|
|
21783
21793
|
}
|
|
21784
21794
|
|
|
21785
21795
|
class CommentLiveCollectionController extends LiveCollectionController {
|
package/dist/index.esm.js
CHANGED
|
@@ -84,8 +84,8 @@ const PostContentType = Object.freeze({
|
|
|
84
84
|
|
|
85
85
|
function getVersion() {
|
|
86
86
|
try {
|
|
87
|
-
// the string ''v6.26.
|
|
88
|
-
return 'v6.26.
|
|
87
|
+
// the string ''v6.26.2-esm'' should be replaced by actual value by @rollup/plugin-replace
|
|
88
|
+
return 'v6.26.2-esm';
|
|
89
89
|
}
|
|
90
90
|
catch (error) {
|
|
91
91
|
return '__dev__';
|
|
@@ -37779,7 +37779,10 @@ const getComment = (commentId, callback) => {
|
|
|
37779
37779
|
class CommentPaginationController extends PaginationController {
|
|
37780
37780
|
async getRequest(queryParams, token) {
|
|
37781
37781
|
const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT, includeDeleted } = queryParams, params = __rest(queryParams, ["limit", "includeDeleted"]);
|
|
37782
|
-
const
|
|
37782
|
+
const baseOptions = {
|
|
37783
|
+
type: params.sortBy || queryParams.limit ? 'pagination' : undefined,
|
|
37784
|
+
};
|
|
37785
|
+
const options = token ? Object.assign(Object.assign({}, baseOptions), { token }) : Object.assign(Object.assign({}, baseOptions), { limit });
|
|
37783
37786
|
const { data: queryResponse } = await this.http.get(`/api/v3/comments`, {
|
|
37784
37787
|
params: Object.assign(Object.assign({}, params), { isDeleted: inferIsDeleted(includeDeleted), options }),
|
|
37785
37788
|
});
|
|
@@ -37849,8 +37852,15 @@ class CommentQueryStreamController extends QueryStreamController {
|
|
|
37849
37852
|
}
|
|
37850
37853
|
}
|
|
37851
37854
|
|
|
37852
|
-
function prepareCommentPayload(
|
|
37853
|
-
|
|
37855
|
+
function prepareCommentPayload(commentPayload) {
|
|
37856
|
+
const { comments } = commentPayload;
|
|
37857
|
+
return Object.assign(Object.assign({}, commentPayload), { comments: comments.map(comment => {
|
|
37858
|
+
if (comment.hasOwnProperty('myReactions'))
|
|
37859
|
+
return comment;
|
|
37860
|
+
// Sometimes `myReactions` field will not come with BE response because that field is empty
|
|
37861
|
+
// We need to put it with an empty array manually to make it show up in client side
|
|
37862
|
+
return Object.assign({ myReactions: [] }, comment);
|
|
37863
|
+
}) });
|
|
37854
37864
|
}
|
|
37855
37865
|
|
|
37856
37866
|
class CommentLiveCollectionController extends LiveCollectionController {
|