@sparted/shared-library 1.7.84 → 1.7.85
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.
|
@@ -82,6 +82,8 @@ export type LiveCampaignScheduling = {
|
|
|
82
82
|
};
|
|
83
83
|
export type LiveCampaignDetails = BaseCampaignCardDetails & LiveCampaignScheduling;
|
|
84
84
|
export type LiveCampaignAchievement = {
|
|
85
|
+
playedSessions: number[];
|
|
86
|
+
playedSessionsCount: number;
|
|
85
87
|
lastSessionPlayed: number;
|
|
86
88
|
lastPlayedAt: string;
|
|
87
89
|
stars: Stars;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"campaign.js","sources":["../../../src/business/types/campaign.ts"],"sourcesContent":["import type { CampaignStats } from './achievement';\nimport { ActivityStatus } from './activity';\nimport type { Content, GameType } from './content';\nimport type { Image } from './media';\nimport type { MultilingualLabel } from './multilingual';\nimport type { PlayerProfile, PlayerWithParticipation } from './player';\nimport type { Points, Stars, Streaks } from './score';\n\nexport type WithCampaignContentId<T> = T & { campaignContentId: number };\n\nexport type CampaignInformations = {\n coverImage: Image;\n name: MultilingualLabel;\n description: MultilingualLabel;\n disclaimer?: MultilingualLabel;\n lastSave: Date;\n};\n\nexport type BaseCampaignScheduling = {\n type: 'flexible' | 'intense';\n launchDate: string;\n endDate?: string;\n extraDays: number;\n enabledWeekDays: number[];\n disabledDates: string[];\n};\n\nexport type ManualCampaignScheduling = BaseCampaignScheduling & {\n mode: 'manual';\n orderedSessions: Content[][];\n};\n\nexport type RandomCampaignScheduling = BaseCampaignScheduling & {\n mode: 'random';\n nbSessions: number;\n contents: Content[];\n};\n\nexport type CampaignScheduling = ManualCampaignScheduling | RandomCampaignScheduling;\n\nexport type Campaign = {\n id: number;\n informations: CampaignInformations;\n scheduling: CampaignScheduling;\n type: 'campaign';\n};\n\nexport type BaseCampaignCardDetails = {\n id: number;\n status: ActivityStatus;\n cover: string;\n title: MultilingualLabel;\n description: MultilingualLabel;\n disclaimer?: MultilingualLabel;\n utcStartDate: string;\n utcEndDate: string;\n contentCount: number;\n isRandom: boolean;\n playableDays?: Date[];\n};\n\nexport type WikiCardDetails = BaseCampaignCardDetails;\n\nexport type WikiCardPlayerInteraction = {\n contentPlayedIds: number[];\n favorite: boolean;\n};\n\nexport type WikiCard = {\n details: WikiCardDetails;\n playerInteraction: WikiCardPlayerInteraction;\n};\n\nexport type WikiContentCardDetails = {\n id: number;\n campaignContentId: number;\n coverImage: string;\n title: MultilingualLabel;\n explanation?: MultilingualLabel;\n session: number;\n};\n\nexport type WikiContentCard = {\n contentDetails: WikiContentCardDetails;\n points: Points;\n};\n\nexport type LiveCampaignScheduling = {\n type: 'flexible' | 'intense';\n extraDays: number;\n enabledWeekDays: number[];\n disabledDates: string[];\n sessionCount: number;\n};\n\nexport type LiveCampaignDetails = BaseCampaignCardDetails & LiveCampaignScheduling;\n\nexport type LiveCampaignAchievement = {\n lastSessionPlayed: number;\n lastPlayedAt: string;\n stars: Stars;\n points: Points;\n streaks?: Streaks;\n};\n\nexport type SessionInsight = {\n sessionNumber: number;\n gameTypes: GameType[];\n};\n\nexport type StreakSession = {\n day: 1 | 2 | 3 | 4 | 5 | 6 | 7;\n status: CalendarStatus;\n streakCount?: number;\n};\n\nexport type LiveCampaign = {\n details: LiveCampaignDetails;\n achievement: LiveCampaignAchievement;\n sessionInsights: SessionInsight[];\n leaderPlayer?: PlayerProfile;\n streakSessions?: StreakSession[];\n};\n\nexport type CalendarStatus = 'played' | 'playable' | 'pending' | 'missed';\n\nexport type Calendar = {\n order: number;\n status: CalendarStatus;\n date: Date;\n};\n\nexport type CampaignDetails = {\n id: number;\n coverImage?: Image;\n name: MultilingualLabel;\n mode: 'manual' | 'random';\n launchDate: string;\n endDate: string;\n enabledWeekDays: number[];\n disabledDates: Date[];\n lastNotificationDate: Date;\n nbPlayers: number;\n nbSessions: number;\n nbQuestions: number;\n players: PlayerWithParticipation[];\n stats: CampaignStats;\n};\n\nexport const isCampaignSchedulingRandom = (scheduling: CampaignScheduling): scheduling is RandomCampaignScheduling =>\n scheduling.mode === 'random';\n\nexport const isCampaignSchedulingManual = (scheduling: CampaignScheduling): scheduling is ManualCampaignScheduling =>\n scheduling.mode === 'manual';\n\nexport const isWikiCard = (item: unknown): item is WikiCard =>\n typeof item === 'object' && item !== null && 'details' in item && 'playerInteraction' in item;\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"campaign.js","sources":["../../../src/business/types/campaign.ts"],"sourcesContent":["import type { CampaignStats } from './achievement';\nimport { ActivityStatus } from './activity';\nimport type { Content, GameType } from './content';\nimport type { Image } from './media';\nimport type { MultilingualLabel } from './multilingual';\nimport type { PlayerProfile, PlayerWithParticipation } from './player';\nimport type { Points, Stars, Streaks } from './score';\n\nexport type WithCampaignContentId<T> = T & { campaignContentId: number };\n\nexport type CampaignInformations = {\n coverImage: Image;\n name: MultilingualLabel;\n description: MultilingualLabel;\n disclaimer?: MultilingualLabel;\n lastSave: Date;\n};\n\nexport type BaseCampaignScheduling = {\n type: 'flexible' | 'intense';\n launchDate: string;\n endDate?: string;\n extraDays: number;\n enabledWeekDays: number[];\n disabledDates: string[];\n};\n\nexport type ManualCampaignScheduling = BaseCampaignScheduling & {\n mode: 'manual';\n orderedSessions: Content[][];\n};\n\nexport type RandomCampaignScheduling = BaseCampaignScheduling & {\n mode: 'random';\n nbSessions: number;\n contents: Content[];\n};\n\nexport type CampaignScheduling = ManualCampaignScheduling | RandomCampaignScheduling;\n\nexport type Campaign = {\n id: number;\n informations: CampaignInformations;\n scheduling: CampaignScheduling;\n type: 'campaign';\n};\n\nexport type BaseCampaignCardDetails = {\n id: number;\n status: ActivityStatus;\n cover: string;\n title: MultilingualLabel;\n description: MultilingualLabel;\n disclaimer?: MultilingualLabel;\n utcStartDate: string;\n utcEndDate: string;\n contentCount: number;\n isRandom: boolean;\n playableDays?: Date[];\n};\n\nexport type WikiCardDetails = BaseCampaignCardDetails;\n\nexport type WikiCardPlayerInteraction = {\n contentPlayedIds: number[];\n favorite: boolean;\n};\n\nexport type WikiCard = {\n details: WikiCardDetails;\n playerInteraction: WikiCardPlayerInteraction;\n};\n\nexport type WikiContentCardDetails = {\n id: number;\n campaignContentId: number;\n coverImage: string;\n title: MultilingualLabel;\n explanation?: MultilingualLabel;\n session: number;\n};\n\nexport type WikiContentCard = {\n contentDetails: WikiContentCardDetails;\n points: Points;\n};\n\nexport type LiveCampaignScheduling = {\n type: 'flexible' | 'intense';\n extraDays: number;\n enabledWeekDays: number[];\n disabledDates: string[];\n sessionCount: number;\n};\n\nexport type LiveCampaignDetails = BaseCampaignCardDetails & LiveCampaignScheduling;\n\nexport type LiveCampaignAchievement = {\n playedSessions: number[];\n playedSessionsCount: number;\n lastSessionPlayed: number;\n lastPlayedAt: string;\n stars: Stars;\n points: Points;\n streaks?: Streaks;\n};\n\nexport type SessionInsight = {\n sessionNumber: number;\n gameTypes: GameType[];\n};\n\nexport type StreakSession = {\n day: 1 | 2 | 3 | 4 | 5 | 6 | 7;\n status: CalendarStatus;\n streakCount?: number;\n};\n\nexport type LiveCampaign = {\n details: LiveCampaignDetails;\n achievement: LiveCampaignAchievement;\n sessionInsights: SessionInsight[];\n leaderPlayer?: PlayerProfile;\n streakSessions?: StreakSession[];\n};\n\nexport type CalendarStatus = 'played' | 'playable' | 'pending' | 'missed';\n\nexport type Calendar = {\n order: number;\n status: CalendarStatus;\n date: Date;\n};\n\nexport type CampaignDetails = {\n id: number;\n coverImage?: Image;\n name: MultilingualLabel;\n mode: 'manual' | 'random';\n launchDate: string;\n endDate: string;\n enabledWeekDays: number[];\n disabledDates: Date[];\n lastNotificationDate: Date;\n nbPlayers: number;\n nbSessions: number;\n nbQuestions: number;\n players: PlayerWithParticipation[];\n stats: CampaignStats;\n};\n\nexport const isCampaignSchedulingRandom = (scheduling: CampaignScheduling): scheduling is RandomCampaignScheduling =>\n scheduling.mode === 'random';\n\nexport const isCampaignSchedulingManual = (scheduling: CampaignScheduling): scheduling is ManualCampaignScheduling =>\n scheduling.mode === 'manual';\n\nexport const isWikiCard = (item: unknown): item is WikiCard =>\n typeof item === 'object' && item !== null && 'details' in item && 'playerInteraction' in item;\n"],"names":[],"mappings":";;;;AAuJO,MAAM,0BAA0B,GAAG,CAAC,UAA8B,KACvE,UAAU,CAAC,IAAI,KAAK,SAAS;AAExB,MAAM,0BAA0B,GAAG,CAAC,UAA8B,KACvE,UAAU,CAAC,IAAI,KAAK,SAAS;AAElB,MAAA,UAAU,GAAG,CAAC,IAAa,KACtC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,SAAS,IAAI,IAAI,IAAI,mBAAmB,IAAI;;;;;;"}
|