@amityco/ts-sdk 7.25.1-460c8451.0 → 7.25.1-c3c4e7d7.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/index.cjs.js
CHANGED
|
@@ -13042,10 +13042,38 @@ const postLinkedObject = (post) => {
|
|
|
13042
13042
|
const event = (_b = pullFromCache(['event', 'get', eventId])) === null || _b === void 0 ? void 0 : _b.data;
|
|
13043
13043
|
if (!event)
|
|
13044
13044
|
return;
|
|
13045
|
-
//
|
|
13046
|
-
//
|
|
13047
|
-
|
|
13048
|
-
|
|
13045
|
+
// Inlined event linked-object construction. Calling eventLinkedObject()
|
|
13046
|
+
// here would create a static import cycle (eventLinkObject already
|
|
13047
|
+
// imports postLinkedObject for its `event.post` getter). Snapshot
|
|
13048
|
+
// consumers get the raw event fields plus the getters they need for the
|
|
13049
|
+
// in-post event card (creator, targetCommunity, coverImage, room). The
|
|
13050
|
+
// full linked-object surface — including RSVP methods and `event.post` —
|
|
13051
|
+
// is available via EventRepository.getEvent(eventId).
|
|
13052
|
+
return Object.assign(Object.assign({}, event), { get creator() {
|
|
13053
|
+
const cacheData = pullFromCache(['user', 'get', event.userId]);
|
|
13054
|
+
if (!(cacheData === null || cacheData === void 0 ? void 0 : cacheData.data))
|
|
13055
|
+
return undefined;
|
|
13056
|
+
return userLinkedObject(cacheData.data);
|
|
13057
|
+
},
|
|
13058
|
+
get targetCommunity() {
|
|
13059
|
+
var _a;
|
|
13060
|
+
if (!event.originId)
|
|
13061
|
+
return undefined;
|
|
13062
|
+
const cacheData = (_a = pullFromCache([
|
|
13063
|
+
'community',
|
|
13064
|
+
'get',
|
|
13065
|
+
event.originId,
|
|
13066
|
+
])) === null || _a === void 0 ? void 0 : _a.data;
|
|
13067
|
+
if (!cacheData)
|
|
13068
|
+
return undefined;
|
|
13069
|
+
return communityLinkedObject(cacheData);
|
|
13070
|
+
},
|
|
13071
|
+
get coverImage() {
|
|
13072
|
+
var _a;
|
|
13073
|
+
if (!event.coverImageFileId)
|
|
13074
|
+
return undefined;
|
|
13075
|
+
return (_a = pullFromCache(['file', 'get', event.coverImageFileId])) === null || _a === void 0 ? void 0 : _a.data;
|
|
13076
|
+
} });
|
|
13049
13077
|
},
|
|
13050
13078
|
});
|
|
13051
13079
|
};
|
package/dist/index.esm.js
CHANGED
|
@@ -13042,10 +13042,38 @@ const postLinkedObject = (post) => {
|
|
|
13042
13042
|
const event = (_b = pullFromCache(['event', 'get', eventId])) === null || _b === void 0 ? void 0 : _b.data;
|
|
13043
13043
|
if (!event)
|
|
13044
13044
|
return;
|
|
13045
|
-
//
|
|
13046
|
-
//
|
|
13047
|
-
|
|
13048
|
-
|
|
13045
|
+
// Inlined event linked-object construction. Calling eventLinkedObject()
|
|
13046
|
+
// here would create a static import cycle (eventLinkObject already
|
|
13047
|
+
// imports postLinkedObject for its `event.post` getter). Snapshot
|
|
13048
|
+
// consumers get the raw event fields plus the getters they need for the
|
|
13049
|
+
// in-post event card (creator, targetCommunity, coverImage, room). The
|
|
13050
|
+
// full linked-object surface — including RSVP methods and `event.post` —
|
|
13051
|
+
// is available via EventRepository.getEvent(eventId).
|
|
13052
|
+
return Object.assign(Object.assign({}, event), { get creator() {
|
|
13053
|
+
const cacheData = pullFromCache(['user', 'get', event.userId]);
|
|
13054
|
+
if (!(cacheData === null || cacheData === void 0 ? void 0 : cacheData.data))
|
|
13055
|
+
return undefined;
|
|
13056
|
+
return userLinkedObject(cacheData.data);
|
|
13057
|
+
},
|
|
13058
|
+
get targetCommunity() {
|
|
13059
|
+
var _a;
|
|
13060
|
+
if (!event.originId)
|
|
13061
|
+
return undefined;
|
|
13062
|
+
const cacheData = (_a = pullFromCache([
|
|
13063
|
+
'community',
|
|
13064
|
+
'get',
|
|
13065
|
+
event.originId,
|
|
13066
|
+
])) === null || _a === void 0 ? void 0 : _a.data;
|
|
13067
|
+
if (!cacheData)
|
|
13068
|
+
return undefined;
|
|
13069
|
+
return communityLinkedObject(cacheData);
|
|
13070
|
+
},
|
|
13071
|
+
get coverImage() {
|
|
13072
|
+
var _a;
|
|
13073
|
+
if (!event.coverImageFileId)
|
|
13074
|
+
return undefined;
|
|
13075
|
+
return (_a = pullFromCache(['file', 'get', event.coverImageFileId])) === null || _a === void 0 ? void 0 : _a.data;
|
|
13076
|
+
} });
|
|
13049
13077
|
},
|
|
13050
13078
|
});
|
|
13051
13079
|
};
|