@sparted/shared-library 1.7.7 → 1.7.8
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,3 +1,4 @@
|
|
|
1
|
+
import { BreakingNewsActivity } from './breaking-news';
|
|
1
2
|
import type { Campaign } from './campaign';
|
|
2
3
|
import type { LanguageCode } from './multilingual';
|
|
3
4
|
type Segment = {
|
|
@@ -20,5 +21,10 @@ export type SharedActivityMetadata = {
|
|
|
20
21
|
likeCount?: number;
|
|
21
22
|
};
|
|
22
23
|
};
|
|
23
|
-
export type CampaignActivity = SharedActivityMetadata & Campaign
|
|
24
|
+
export type CampaignActivity = SharedActivityMetadata & Campaign & {
|
|
25
|
+
type: 'campaign';
|
|
26
|
+
};
|
|
27
|
+
export type Activity = CampaignActivity & BreakingNewsActivity;
|
|
28
|
+
export declare const isActivityCampaign: (activity: CampaignActivity | BreakingNewsActivity) => activity is CampaignActivity;
|
|
29
|
+
export declare const isActivityBreakingNews: (activity: CampaignActivity | BreakingNewsActivity) => activity is BreakingNewsActivity;
|
|
24
30
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const isActivityCampaign = (activity) => activity.type === 'campaign';
|
|
6
|
+
const isActivityBreakingNews = (activity) => activity.type === 'breaking-news';
|
|
7
|
+
|
|
8
|
+
exports.isActivityBreakingNews = isActivityBreakingNews;
|
|
9
|
+
exports.isActivityCampaign = isActivityCampaign;
|
|
10
|
+
//# sourceMappingURL=activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.js","sources":["../../../src/business/types/activity.ts"],"sourcesContent":["import { BreakingNewsActivity } from './breaking-news';\nimport type { Campaign } from './campaign';\nimport type { LanguageCode } from './multilingual';\n\ntype Segment = {\n id: number;\n label: string;\n dimensionId: number;\n};\n\nexport type ActivityAudience = {\n groupId: number;\n type: 'all' | 'segmentation' | 'magic-code' | 'email-list';\n segments: Segment[];\n};\n\nexport type ActivityStatus = 'inactive' | 'archived' | 'upcoming' | 'live' | 'finished';\n\nexport type SharedActivityMetadata = {\n status: ActivityStatus;\n languages?: LanguageCode[];\n audiences?: ActivityAudience[];\n userEngagement?: {\n viewCount?: number;\n likeCount?: number;\n };\n};\n\nexport type CampaignActivity = SharedActivityMetadata & Campaign & { type: 'campaign' };\n\nexport type Activity = CampaignActivity & BreakingNewsActivity;\n\nexport const isActivityCampaign = (activity: CampaignActivity | BreakingNewsActivity): activity is CampaignActivity =>\n activity.type === 'campaign';\n\nexport const isActivityBreakingNews = (\n activity: CampaignActivity | BreakingNewsActivity,\n): activity is BreakingNewsActivity => activity.type === 'breaking-news';\n"],"names":[],"mappings":";;;;AAgCO,MAAM,kBAAkB,GAAG,CAAC,QAAiD,KAClF,QAAQ,CAAC,IAAI,KAAK,WAAW;AAExB,MAAM,sBAAsB,GAAG,CACpC,QAAiD,KACZ,QAAQ,CAAC,IAAI,KAAK;;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Media } from './media';
|
|
2
|
+
import { MultilingualLabel } from './multilingual';
|
|
3
|
+
export type BreakingNewsActivity = {
|
|
4
|
+
informations: {
|
|
5
|
+
name: MultilingualLabel;
|
|
6
|
+
description: MultilingualLabel;
|
|
7
|
+
isLongText: boolean;
|
|
8
|
+
text?: MultilingualLabel;
|
|
9
|
+
coverMedia?: Media;
|
|
10
|
+
};
|
|
11
|
+
notification: {
|
|
12
|
+
isRecurringNotification: boolean;
|
|
13
|
+
isNotificationActive: boolean;
|
|
14
|
+
notificationTime: string;
|
|
15
|
+
};
|
|
16
|
+
scheduling: {
|
|
17
|
+
startDate: string;
|
|
18
|
+
endDate: string;
|
|
19
|
+
};
|
|
20
|
+
userEngagement: {
|
|
21
|
+
isLiked: boolean;
|
|
22
|
+
lastViewed: string | null;
|
|
23
|
+
viewCount: number;
|
|
24
|
+
likeCount: number;
|
|
25
|
+
};
|
|
26
|
+
id: number;
|
|
27
|
+
type: 'breaking-news';
|
|
28
|
+
};
|
package/business/types/index.js
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var activity = require('./activity.js');
|
|
5
6
|
var content = require('./content.js');
|
|
6
7
|
var multilingual = require('./multilingual.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
11
|
+
exports.isActivityBreakingNews = activity.isActivityBreakingNews;
|
|
12
|
+
exports.isActivityCampaign = activity.isActivityCampaign;
|
|
10
13
|
exports.GAME_TYPE = content.GAME_TYPE;
|
|
11
14
|
exports.isGameErrorText = content.isGameErrorText;
|
|
12
15
|
exports.isGameMultipleChoiceQuestion = content.isGameMultipleChoiceQuestion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|