@amityco/ts-sdk 7.9.1-4cf111eb.0 → 7.9.1-7d6c59d.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.
@@ -1 +1 @@
1
- {"version":3,"file":"getCommunity.d.ts","sourceRoot":"","sources":["../../../src/communityRepository/observers/getCommunity.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,YAAY,gBACV,MAAM,SAAS,CAAC,aAAa,CAAC,YACjC,MAAM,kBAAkB,CAAC,MAAM,SAAS,CAAC,KAClD,MAAM,YAwBR,CAAC"}
1
+ {"version":3,"file":"getCommunity.d.ts","sourceRoot":"","sources":["../../../src/communityRepository/observers/getCommunity.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,YAAY,gBACV,MAAM,SAAS,CAAC,aAAa,CAAC,YACjC,MAAM,kBAAkB,CAAC,MAAM,SAAS,CAAC,KAClD,MAAM,YAyBR,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -13249,13 +13249,15 @@ const getInvitations = (params, callback, config) => {
13249
13249
 
13250
13250
  const communityLinkedObject = (community) => {
13251
13251
  return Object.assign(Object.assign({}, community), { get categories() {
13252
- var _a, _b;
13253
- return (_b = (_a = community === null || community === void 0 ? void 0 : community.categoryIds) === null || _a === void 0 ? void 0 : _a.map(categoryId => {
13252
+ var _a;
13253
+ return ((_a = community === null || community === void 0 ? void 0 : community.categoryIds) !== null && _a !== void 0 ? _a : [])
13254
+ .map(categoryId => {
13254
13255
  const cacheData = pullFromCache(['category', 'get', categoryId]);
13255
13256
  if (cacheData === null || cacheData === void 0 ? void 0 : cacheData.data)
13256
13257
  return categoryLinkedObject(cacheData.data);
13257
13258
  return undefined;
13258
- })) === null || _b === void 0 ? void 0 : _b.filter(category => !!category);
13259
+ })
13260
+ .filter(category => !!category);
13259
13261
  }, createInvitations: async (userIds) => {
13260
13262
  await createInvitations({
13261
13263
  type: "communityMemberInvite" /* InvitationTypeEnum.CommunityMemberInvite */,
@@ -22079,6 +22081,8 @@ const getCommunity = (communityId, callback) => {
22079
22081
  convertEventPayload(onLocalCommunityJoin, 'targetId', 'community'),
22080
22082
  ], {
22081
22083
  callbackDataSelector: (data) => {
22084
+ if (!data)
22085
+ return data;
22082
22086
  return LinkedObject.community(data);
22083
22087
  },
22084
22088
  });
package/dist/index.esm.js CHANGED
@@ -29341,13 +29341,15 @@ const getInvitations = (params, callback, config) => {
29341
29341
 
29342
29342
  const communityLinkedObject = (community) => {
29343
29343
  return Object.assign(Object.assign({}, community), { get categories() {
29344
- var _a, _b;
29345
- return (_b = (_a = community === null || community === void 0 ? void 0 : community.categoryIds) === null || _a === void 0 ? void 0 : _a.map(categoryId => {
29344
+ var _a;
29345
+ return ((_a = community === null || community === void 0 ? void 0 : community.categoryIds) !== null && _a !== void 0 ? _a : [])
29346
+ .map(categoryId => {
29346
29347
  const cacheData = pullFromCache(['category', 'get', categoryId]);
29347
29348
  if (cacheData === null || cacheData === void 0 ? void 0 : cacheData.data)
29348
29349
  return categoryLinkedObject(cacheData.data);
29349
29350
  return undefined;
29350
- })) === null || _b === void 0 ? void 0 : _b.filter(category => !!category);
29351
+ })
29352
+ .filter(category => !!category);
29351
29353
  }, createInvitations: async (userIds) => {
29352
29354
  await createInvitations({
29353
29355
  type: "communityMemberInvite" /* InvitationTypeEnum.CommunityMemberInvite */,
@@ -38171,6 +38173,8 @@ const getCommunity = (communityId, callback) => {
38171
38173
  convertEventPayload(onLocalCommunityJoin, 'targetId', 'community'),
38172
38174
  ], {
38173
38175
  callbackDataSelector: (data) => {
38176
+ if (!data)
38177
+ return data;
38174
38178
  return LinkedObject.community(data);
38175
38179
  },
38176
38180
  });