@amityco/ts-sdk-react-native 6.32.1 → 6.32.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/events/utils.d.ts.map +1 -1
- package/dist/core/transports/http.d.ts.map +1 -1
- package/dist/index.cjs.js +7 -4
- package/dist/index.esm.js +7 -4
- package/dist/index.umd.js +2 -2
- package/dist/postRepository/events/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/commentRepository/events/utils.ts +2 -1
- package/src/core/transports/http.ts +2 -0
- package/src/postRepository/events/utils.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/events/utils.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,4BAA4B,UAChC,MAAM,MAAM,iBAAiB,YAC1B,MAAM,QAAQ,CAAC,MAAM,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/commentRepository/events/utils.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,4BAA4B,UAChC,MAAM,MAAM,iBAAiB,YAC1B,MAAM,QAAQ,CAAC,MAAM,eAAe,CAAC,uBA4DhD,CAAC;AAEF,eAAO,MAAM,iCAAiC,UACrC,MAAM,KACX,MAAM,kBAAkB,EACxB,2BAA2B,GAAG,8BAA8B,CAC7D,YACS,MAAM,QAAQ,CAAC,MAAM,eAAe,CAAC,uBAmEhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/core/transports/http.ts"],"names":[],"mappings":"AAeA,oBAAY,kBAAkB;IAC5B,WAAW,iBAAiB;IAC5B,gBAAgB,uBAAuB;IACvC,YAAY,kBAAkB;CAC/B;AAmDD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,aAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/core/transports/http.ts"],"names":[],"mappings":"AAeA,oBAAY,kBAAkB;IAC5B,WAAW,iBAAiB;IAC5B,gBAAgB,uBAAuB;IACvC,YAAY,kBAAkB;CAC/B;AAmDD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,aAAc,MAAM,kCA+GnD,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -123,8 +123,8 @@ const PostContentType = Object.freeze({
|
|
|
123
123
|
|
|
124
124
|
function getVersion() {
|
|
125
125
|
try {
|
|
126
|
-
// the string ''v6.32.
|
|
127
|
-
return 'v6.32.
|
|
126
|
+
// the string ''v6.32.2-cjs'' should be replaced by actual value by @rollup/plugin-replace
|
|
127
|
+
return 'v6.32.2-cjs';
|
|
128
128
|
}
|
|
129
129
|
catch (error) {
|
|
130
130
|
return '__dev__';
|
|
@@ -1736,6 +1736,7 @@ const createHttpTransport = (endpoint) => {
|
|
|
1736
1736
|
* https://github.com/axios/axios#request-config
|
|
1737
1737
|
*/
|
|
1738
1738
|
});
|
|
1739
|
+
instance.defaults.withCredentials = false;
|
|
1739
1740
|
instance.interceptors.request.use(config => {
|
|
1740
1741
|
// do not check expiration for token creation url
|
|
1741
1742
|
if (config.url === '/api/v5/sessions') {
|
|
@@ -13709,7 +13710,8 @@ const createPostEventSubscriber = (event, callback) => {
|
|
|
13709
13710
|
else {
|
|
13710
13711
|
const data = preparePostPayload(payload);
|
|
13711
13712
|
const { communities } = data;
|
|
13712
|
-
|
|
13713
|
+
// NOTE: The event data should be merge with existing cache rather than replace it
|
|
13714
|
+
ingestInCache(data, undefined, false);
|
|
13713
13715
|
if ((communities === null || communities === void 0 ? void 0 : communities[0]) && !['post.updated'].includes(event)) {
|
|
13714
13716
|
fireEvent('community.updated', {
|
|
13715
13717
|
communities,
|
|
@@ -13975,7 +13977,8 @@ const createCommentEventSubscriber = (event, callback) => {
|
|
|
13975
13977
|
const processed = ['comment.flagged', 'comment.unflagged'].includes(event)
|
|
13976
13978
|
? prepareCommentFromFlaggedEvent(payload)
|
|
13977
13979
|
: payload;
|
|
13978
|
-
|
|
13980
|
+
// NOTE: The event data should be merge with existing cache rather than replace it
|
|
13981
|
+
ingestInCache(processed, undefined, false);
|
|
13979
13982
|
const { comments } = processed;
|
|
13980
13983
|
if (comments.length > 0) {
|
|
13981
13984
|
const comment = pullFromCache([
|
package/dist/index.esm.js
CHANGED
|
@@ -89,8 +89,8 @@ const PostContentType = Object.freeze({
|
|
|
89
89
|
|
|
90
90
|
function getVersion() {
|
|
91
91
|
try {
|
|
92
|
-
// the string ''v6.32.
|
|
93
|
-
return 'v6.32.
|
|
92
|
+
// the string ''v6.32.2-esm'' should be replaced by actual value by @rollup/plugin-replace
|
|
93
|
+
return 'v6.32.2-esm';
|
|
94
94
|
}
|
|
95
95
|
catch (error) {
|
|
96
96
|
return '__dev__';
|
|
@@ -1702,6 +1702,7 @@ const createHttpTransport = (endpoint) => {
|
|
|
1702
1702
|
* https://github.com/axios/axios#request-config
|
|
1703
1703
|
*/
|
|
1704
1704
|
});
|
|
1705
|
+
instance.defaults.withCredentials = false;
|
|
1705
1706
|
instance.interceptors.request.use(config => {
|
|
1706
1707
|
// do not check expiration for token creation url
|
|
1707
1708
|
if (config.url === '/api/v5/sessions') {
|
|
@@ -29782,7 +29783,8 @@ const createPostEventSubscriber = (event, callback) => {
|
|
|
29782
29783
|
else {
|
|
29783
29784
|
const data = preparePostPayload(payload);
|
|
29784
29785
|
const { communities } = data;
|
|
29785
|
-
|
|
29786
|
+
// NOTE: The event data should be merge with existing cache rather than replace it
|
|
29787
|
+
ingestInCache(data, undefined, false);
|
|
29786
29788
|
if ((communities === null || communities === void 0 ? void 0 : communities[0]) && !['post.updated'].includes(event)) {
|
|
29787
29789
|
fireEvent('community.updated', {
|
|
29788
29790
|
communities,
|
|
@@ -30048,7 +30050,8 @@ const createCommentEventSubscriber = (event, callback) => {
|
|
|
30048
30050
|
const processed = ['comment.flagged', 'comment.unflagged'].includes(event)
|
|
30049
30051
|
? prepareCommentFromFlaggedEvent(payload)
|
|
30050
30052
|
: payload;
|
|
30051
|
-
|
|
30053
|
+
// NOTE: The event data should be merge with existing cache rather than replace it
|
|
30054
|
+
ingestInCache(processed, undefined, false);
|
|
30052
30055
|
const { comments } = processed;
|
|
30053
30056
|
if (comments.length > 0) {
|
|
30054
30057
|
const comment = pullFromCache([
|