@amityco/ts-sdk-react-native 6.25.0 → 6.25.2-343f6e2.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/.env +26 -26
- package/dist/@types/core/model.d.ts +4 -0
- package/dist/@types/core/model.d.ts.map +1 -1
- package/dist/@types/core/payload.d.ts +6 -0
- package/dist/@types/core/payload.d.ts.map +1 -1
- package/dist/@types/domains/ad.d.ts +74 -0
- package/dist/@types/domains/ad.d.ts.map +1 -0
- package/dist/@types/domains/analytics.d.ts +3 -1
- package/dist/@types/domains/analytics.d.ts.map +1 -1
- package/dist/@types/index.d.ts +2 -0
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/adRepository/api/getNetworkAds.d.ts +2 -0
- package/dist/adRepository/api/getNetworkAds.d.ts.map +1 -0
- package/dist/adRepository/api/index.d.ts +2 -0
- package/dist/adRepository/api/index.d.ts.map +1 -0
- package/dist/adRepository/index.d.ts +2 -0
- package/dist/adRepository/index.d.ts.map +1 -0
- package/dist/analytic/service/analytic/AnalyticsEngine.d.ts +2 -0
- package/dist/analytic/service/analytic/AnalyticsEngine.d.ts.map +1 -1
- package/dist/analytic/service/analytic/AnalyticsEventCapturer.d.ts +3 -0
- package/dist/analytic/service/analytic/AnalyticsEventCapturer.d.ts.map +1 -1
- package/dist/client/api/getToken.d.ts +1 -1
- package/dist/client/api/getToken.d.ts.map +1 -1
- package/dist/core/model/idResolvers.d.ts.map +1 -1
- package/dist/core/model/index.d.ts.map +1 -1
- package/dist/index.cjs.js +155 -53
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +139 -38
- package/dist/index.umd.js +2 -2
- package/dist/reactionRepository/events/onReactionAdded.d.ts.map +1 -1
- package/dist/reactionRepository/events/onReactorAdded.d.ts.map +1 -1
- package/dist/utils/linkedObject/adLinkedObject.d.ts +2 -0
- package/dist/utils/linkedObject/adLinkedObject.d.ts.map +1 -0
- package/dist/utils/linkedObject/index.d.ts +1 -0
- package/dist/utils/linkedObject/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/@types/core/model.ts +6 -0
- package/src/@types/core/payload.ts +7 -0
- package/src/@types/domains/ad.ts +88 -0
- package/src/@types/domains/analytics.ts +2 -0
- package/src/@types/index.ts +2 -0
- package/src/adRepository/api/getNetworkAds.ts +24 -0
- package/src/adRepository/api/index.ts +1 -0
- package/src/adRepository/index.ts +1 -0
- package/src/analytic/service/analytic/AnalyticsEngine.ts +18 -0
- package/src/analytic/service/analytic/AnalyticsEventCapturer.ts +49 -8
- package/src/client/api/getToken.ts +1 -1
- package/src/client/api/login.ts +1 -1
- package/src/client/api/registerPushNotification.ts +1 -1
- package/src/core/model/idResolvers.ts +3 -0
- package/src/core/model/index.ts +2 -0
- package/src/index.ts +3 -0
- package/src/reactionRepository/events/onReactionAdded.ts +0 -1
- package/src/reactionRepository/events/onReactorAdded.ts +1 -0
- package/src/utils/linkedObject/adLinkedObject.ts +50 -0
- package/src/utils/linkedObject/index.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onReactionAdded.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactionAdded.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onReactionAdded.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactionAdded.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,eAAe,kBACX,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,wIAEzC,MAAM,YAuCR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onReactorAdded.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactorAdded.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,cAAc,kBACV,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,YAChC,MAAM,QAAQ,CAAC,MAAM,eAAe,CAAC,KAC9C,MAAM,
|
|
1
|
+
{"version":3,"file":"onReactorAdded.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactorAdded.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,cAAc,kBACV,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,YAChC,MAAM,QAAQ,CAAC,MAAM,eAAe,CAAC,KAC9C,MAAM,YAoER,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/adLinkedObject.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,OAAQ,MAAM,KAAK,KAAG,MAAM,EA8CtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,YAAY;;;;;;;;;;;;CAYxB,CAAC"}
|
package/package.json
CHANGED
package/src/@types/core/model.ts
CHANGED
|
@@ -49,6 +49,9 @@ declare global {
|
|
|
49
49
|
followCount: Amity.FollowCount;
|
|
50
50
|
|
|
51
51
|
feed: Amity.Feed;
|
|
52
|
+
|
|
53
|
+
ad: Pick<Amity.Ad, 'adId'>;
|
|
54
|
+
advertiser: Pick<Amity.AdvertiserItem, 'advertiserId'>;
|
|
52
55
|
};
|
|
53
56
|
|
|
54
57
|
type Model = ValueOf<Models>;
|
|
@@ -102,6 +105,9 @@ declare global {
|
|
|
102
105
|
followCount: Pick<Amity.FollowInfo, 'userId' | 'followerCount'>;
|
|
103
106
|
|
|
104
107
|
feed: Pick<Amity.Feed, 'targetId' | 'feedId'>;
|
|
108
|
+
|
|
109
|
+
ad: Pick<Amity.Ad, 'adId'>;
|
|
110
|
+
advertiser: Pick<Amity.AdvertiserItem, 'advertiserId'>;
|
|
105
111
|
};
|
|
106
112
|
}
|
|
107
113
|
}
|
|
@@ -34,6 +34,13 @@ declare global {
|
|
|
34
34
|
}[];
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
+
type AdPayload = {
|
|
38
|
+
ads: Amity.RawAd[];
|
|
39
|
+
advertisers: Amity.RawAdvertiser[];
|
|
40
|
+
files: Amity.File[];
|
|
41
|
+
settings: Amity.AdsSettings;
|
|
42
|
+
};
|
|
43
|
+
|
|
37
44
|
// API-FIX: backend should return a payload like { files: Amity.File<T>[] }
|
|
38
45
|
type CreateFilePayload<T extends Amity.FileType = any> = Amity.File<T>[];
|
|
39
46
|
type FilePayload<T extends Amity.FileType = any> = Amity.File<T>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
namespace Amity {
|
|
5
|
+
const enum AdPlacement {
|
|
6
|
+
FEED = 'feed',
|
|
7
|
+
STORY = 'story',
|
|
8
|
+
COMMENT = 'comment',
|
|
9
|
+
CHATLIST = 'chatlist',
|
|
10
|
+
CHAT = 'chat',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const enum SettingDisplayType {
|
|
14
|
+
Fixed = 'fixed',
|
|
15
|
+
TimeWindow = 'time-window',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type AdTarget = {
|
|
19
|
+
communityIds: Amity.Community['communityId'][];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type RawAd = {
|
|
23
|
+
adId: string;
|
|
24
|
+
advertiserId: string;
|
|
25
|
+
name: string;
|
|
26
|
+
placements: AdPlacement[];
|
|
27
|
+
headline: string;
|
|
28
|
+
description: string;
|
|
29
|
+
body: string;
|
|
30
|
+
image1_1: string;
|
|
31
|
+
image9_16: string;
|
|
32
|
+
callToAction: string;
|
|
33
|
+
callToActionUrl: string;
|
|
34
|
+
targets: Amity.AdTarget;
|
|
35
|
+
startAt: Amity.timestamp;
|
|
36
|
+
endAt: Amity.timestamp;
|
|
37
|
+
createdAt: Amity.timestamp;
|
|
38
|
+
updatedAt: Amity.timestamp;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
type RawAdvertiser = {
|
|
42
|
+
advertiserId: string;
|
|
43
|
+
name: string;
|
|
44
|
+
companyName: string;
|
|
45
|
+
avatarFileId: string;
|
|
46
|
+
adsCount: number;
|
|
47
|
+
createdAt: Amity.timestamp;
|
|
48
|
+
updatedAt: Amity.timestamp;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
type AdFrequency = {
|
|
52
|
+
type: Amity.SettingDisplayType;
|
|
53
|
+
value: number;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
type FrequencySettings = {
|
|
57
|
+
feed?: Amity.AdFrequency;
|
|
58
|
+
story?: Amity.AdFrequency;
|
|
59
|
+
comment?: Amity.AdFrequency;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
type AdsSettings = {
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
maxActiveAds: number;
|
|
65
|
+
frequency: Amity.FrequencySettings;
|
|
66
|
+
updatedAt: Amity.timestamp;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
type Advertiser = RawAdvertiser & {
|
|
70
|
+
avatar?: Amity.File<'image'>;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
type Ad = Omit<RawAd, 'image1_1' | 'image9_16'> & {
|
|
74
|
+
advertiser?: Amity.Advertiser;
|
|
75
|
+
image1_1?: Amity.File<'image'>;
|
|
76
|
+
image9_16?: Amity.File<'image'>;
|
|
77
|
+
// analytics: {
|
|
78
|
+
// markAsSeen: (placement: Amity.AdPlacement) => void;
|
|
79
|
+
// markLinkAsClicked: (placement: Amity.AdPlacement) => void;
|
|
80
|
+
// };
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
type NetworkAds = {
|
|
84
|
+
ads: Amity.Ad[];
|
|
85
|
+
settings: Amity.AdsSettings;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -10,6 +10,7 @@ declare global {
|
|
|
10
10
|
const enum AnalyticEventContentType {
|
|
11
11
|
Post = 'post',
|
|
12
12
|
Story = 'story',
|
|
13
|
+
Ad = 'ad',
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
type AnalyticEventModel = {
|
|
@@ -17,6 +18,7 @@ declare global {
|
|
|
17
18
|
contentType: AnalyticEventContentType;
|
|
18
19
|
activityType: AnalyticEventActivityType;
|
|
19
20
|
timestamp: Amity.timestamp;
|
|
21
|
+
metadata?: Record<string, string>;
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
type AnalyticPostData = {
|
package/src/@types/index.ts
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getActiveClient } from '~/client';
|
|
2
|
+
import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
3
|
+
import { pushToCache } from '~/cache/api';
|
|
4
|
+
import { LinkedObject } from '~/utils/linkedObject';
|
|
5
|
+
|
|
6
|
+
const convertToNetworkAds = (data: Amity.AdPayload): Amity.NetworkAds => {
|
|
7
|
+
const { ads, settings } = data;
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
ads: ads.map(LinkedObject.ad),
|
|
11
|
+
settings,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const getNetworkAds = async (): Promise<Amity.NetworkAds> => {
|
|
16
|
+
const client = getActiveClient();
|
|
17
|
+
|
|
18
|
+
const { data } = await client.http.get<Amity.AdPayload>('/api/v1/ads/me');
|
|
19
|
+
const { settings, ...rest } = data;
|
|
20
|
+
ingestInCache(rest as Omit<Amity.AdPayload, 'settings'>);
|
|
21
|
+
pushToCache(['ad', 'setting'], settings);
|
|
22
|
+
|
|
23
|
+
return convertToNetworkAds(data);
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getNetworkAds } from './getNetworkAds';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api';
|
|
@@ -33,6 +33,24 @@ class AnalyticsEngine {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
markAdAsViewed(ad: Amity.RawAd, placement: Amity.AdPlacement) {
|
|
37
|
+
if (
|
|
38
|
+
this._client.sessionState === Amity.SessionStates.ESTABLISHED ||
|
|
39
|
+
this._client.sessionState === Amity.SessionStates.TOKEN_EXPIRED
|
|
40
|
+
) {
|
|
41
|
+
this._eventCapturer.markAdAsViewed(ad, placement);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
markAdAsClicked(ad: Amity.RawAd, placement: Amity.AdPlacement) {
|
|
46
|
+
if (
|
|
47
|
+
this._client.sessionState === Amity.SessionStates.ESTABLISHED ||
|
|
48
|
+
this._client.sessionState === Amity.SessionStates.TOKEN_EXPIRED
|
|
49
|
+
) {
|
|
50
|
+
this._eventCapturer.markAdAsClicked(ad, placement);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
36
54
|
markStoryAsClicked(story: Amity.InternalStory) {
|
|
37
55
|
if (
|
|
38
56
|
this._client.sessionState === Amity.SessionStates.ESTABLISHED ||
|
|
@@ -48,8 +48,13 @@ export class AnalyticsEventCapturer {
|
|
|
48
48
|
return true;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
markAs(
|
|
52
|
+
itemId: string,
|
|
53
|
+
contentType: Amity.AnalyticEventContentType,
|
|
54
|
+
activityType: Amity.AnalyticEventActivityType,
|
|
55
|
+
metadata: Record<string, string> | undefined = undefined,
|
|
56
|
+
) {
|
|
57
|
+
if (!this.isAbleToEnqueue({ itemId, expireTime: this._expireTime })) return;
|
|
53
58
|
|
|
54
59
|
const now = new Date();
|
|
55
60
|
|
|
@@ -66,15 +71,25 @@ export class AnalyticsEventCapturer {
|
|
|
66
71
|
currentData.event.shift();
|
|
67
72
|
}
|
|
68
73
|
|
|
69
|
-
|
|
70
|
-
contentId:
|
|
71
|
-
contentType
|
|
72
|
-
activityType
|
|
74
|
+
const analyticItem: Amity.AnalyticEventModel = {
|
|
75
|
+
contentId: itemId,
|
|
76
|
+
contentType,
|
|
77
|
+
activityType,
|
|
73
78
|
timestamp: now.toISOString(),
|
|
74
|
-
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
if (metadata) {
|
|
82
|
+
analyticItem.metadata = metadata;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
currentData.event.push(analyticItem);
|
|
75
86
|
|
|
76
87
|
upsertInCache(ANALYTIC_CACHE_KEY, currentData);
|
|
77
|
-
this._recentViewed[
|
|
88
|
+
this._recentViewed[itemId] = now;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
markPostAsViewed(postId: Amity.InternalPost['postId']) {
|
|
92
|
+
this.markAs(postId, Amity.AnalyticEventContentType.Post, Amity.AnalyticEventActivityType.View);
|
|
78
93
|
}
|
|
79
94
|
|
|
80
95
|
markStory(story: Amity.InternalStory, activityType: Amity.AnalyticEventActivityType) {
|
|
@@ -163,4 +178,30 @@ export class AnalyticsEventCapturer {
|
|
|
163
178
|
markStoryAsClicked(story: Amity.InternalStory) {
|
|
164
179
|
this.markStory(story, Amity.AnalyticEventActivityType.Click);
|
|
165
180
|
}
|
|
181
|
+
|
|
182
|
+
markAdAsViewed(ad: Amity.RawAd, placement: Amity.AdPlacement) {
|
|
183
|
+
const metadata = {
|
|
184
|
+
placement,
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
this.markAs(
|
|
188
|
+
`${ad.adId}.${Amity.AnalyticEventActivityType.View}.${placement}`,
|
|
189
|
+
Amity.AnalyticEventContentType.Ad,
|
|
190
|
+
Amity.AnalyticEventActivityType.View,
|
|
191
|
+
metadata,
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
markAdAsClicked(ad: Amity.RawAd, placement: Amity.AdPlacement) {
|
|
196
|
+
const metadata = {
|
|
197
|
+
placement,
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
this.markAs(
|
|
201
|
+
`${ad.adId}.${Amity.AnalyticEventActivityType.View}.${placement}`,
|
|
202
|
+
Amity.AnalyticEventContentType.Ad,
|
|
203
|
+
Amity.AnalyticEventActivityType.Click,
|
|
204
|
+
metadata,
|
|
205
|
+
);
|
|
206
|
+
}
|
|
166
207
|
}
|
|
@@ -16,7 +16,7 @@ import { getDeviceInfo } from '~/core/device';
|
|
|
16
16
|
*/
|
|
17
17
|
export const getToken = async (params: {
|
|
18
18
|
userId: Amity.InternalUser['userId'];
|
|
19
|
-
displayName
|
|
19
|
+
displayName?: Amity.InternalUser['displayName'];
|
|
20
20
|
authToken?: string;
|
|
21
21
|
deviceId: Amity.Device['deviceId'];
|
|
22
22
|
}) => {
|
package/src/client/api/login.ts
CHANGED
|
@@ -14,7 +14,7 @@ export const registerPushNotification = async (deviceToken: string): Promise<boo
|
|
|
14
14
|
throw new ASCInvalidParameterError('Unsupported platform');
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const deviceId = getDeviceId();
|
|
17
|
+
const deviceId = await getDeviceId();
|
|
18
18
|
|
|
19
19
|
const {
|
|
20
20
|
data: { status, error },
|
|
@@ -53,6 +53,9 @@ const idResolvers: Resolvers = {
|
|
|
53
53
|
feed: ({ targetId, feedId }) => `${targetId}#${feedId}`,
|
|
54
54
|
story: ({ referenceId }) => referenceId!,
|
|
55
55
|
storyTarget: ({ targetId }) => targetId,
|
|
56
|
+
|
|
57
|
+
ad: ({ adId }) => adId,
|
|
58
|
+
advertiser: ({ advertiserId }) => advertiserId,
|
|
56
59
|
};
|
|
57
60
|
|
|
58
61
|
/**
|
package/src/core/model/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { getResolver } from '~/core/model';
|
|
|
6
6
|
import { onPostReactionAdded } from '~/postRepository/events';
|
|
7
7
|
import { onCommentReactionAdded } from '~/commentRepository/events';
|
|
8
8
|
import { prepareMessagePayload } from '~/messageRepository/utils';
|
|
9
|
-
import { reaction11 } from '~/utils/tests';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* ```js
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { pullFromCache } from '~/cache/api';
|
|
2
|
+
// import AnalyticsEngine from '~/analytic/service/analytic/AnalyticsEngine';
|
|
3
|
+
|
|
4
|
+
export const adLinkedObject = (ad: Amity.RawAd): Amity.Ad => {
|
|
5
|
+
// const analyticsEngineInstance = AnalyticsEngine.getInstance();
|
|
6
|
+
const { image9_16: image916, image1_1: image11, ...restAds } = ad;
|
|
7
|
+
return {
|
|
8
|
+
...restAds,
|
|
9
|
+
// analytics: {
|
|
10
|
+
// markAsSeen: (placement: Amity.AdPlacement) => {
|
|
11
|
+
// analyticsEngineInstance.markAdAsViewed(ad, placement);
|
|
12
|
+
// },
|
|
13
|
+
// markLinkAsClicked: (placement: Amity.AdPlacement) => {
|
|
14
|
+
// analyticsEngineInstance.markAdAsClicked(ad, placement);
|
|
15
|
+
// },
|
|
16
|
+
// },
|
|
17
|
+
get advertiser(): Amity.Advertiser | undefined {
|
|
18
|
+
const advertiserData = pullFromCache<Amity.RawAdvertiser>([
|
|
19
|
+
'advertiser',
|
|
20
|
+
'get',
|
|
21
|
+
ad.advertiserId,
|
|
22
|
+
])?.data;
|
|
23
|
+
|
|
24
|
+
if (!advertiserData) return;
|
|
25
|
+
|
|
26
|
+
const avatarFile = pullFromCache<Amity.File<'image'>>([
|
|
27
|
+
'file',
|
|
28
|
+
'get',
|
|
29
|
+
advertiserData.avatarFileId,
|
|
30
|
+
])?.data;
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
...advertiserData,
|
|
34
|
+
avatar: avatarFile,
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
get image1_1(): Amity.File<'image'> | undefined {
|
|
39
|
+
const cacheData = pullFromCache<Amity.File<'image'>>(['file', 'get', image11]);
|
|
40
|
+
if (!cacheData) return undefined;
|
|
41
|
+
return cacheData.data || undefined;
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
get image9_16(): Amity.File<'image'> | undefined {
|
|
45
|
+
const cacheData = pullFromCache<Amity.File<'image'>>(['file', 'get', image916]);
|
|
46
|
+
if (!cacheData) return undefined;
|
|
47
|
+
return cacheData.data || undefined;
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -8,8 +8,10 @@ import { messageLinkedObject } from './messageLinkedObject';
|
|
|
8
8
|
import { storyTargetLinkedObject } from './storyTargetLinkedObject';
|
|
9
9
|
import { reactorLinkedObject } from './reactorLinkedObject';
|
|
10
10
|
import { channelLinkedObject } from './channelLinkedObject';
|
|
11
|
+
import { adLinkedObject } from './adLinkedObject';
|
|
11
12
|
|
|
12
13
|
export const LinkedObject = {
|
|
14
|
+
ad: adLinkedObject,
|
|
13
15
|
comment: commentLinkedObject,
|
|
14
16
|
post: postLinkedObject,
|
|
15
17
|
user: userLinkedObject,
|