@sparted/shared-library 1.7.34 → 1.7.35

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,4 +1,4 @@
1
- import type { Content } from './content';
1
+ import type { Content, GameType } from './content';
2
2
  import type { Image } from './media';
3
3
  import type { MultilingualLabel } from './multilingual';
4
4
  import type { Points } from './score';
@@ -67,6 +67,7 @@ export type CampaignCardAchievement = {
67
67
  export type SessionInsight = {
68
68
  earnablePoints: number;
69
69
  timeSpent: number;
70
+ gameTypes: GameType[];
70
71
  };
71
72
  export type LiveCampaignCard = {
72
73
  campaign: CampaignCardDetails;
@@ -1 +1 @@
1
- {"version":3,"file":"campaign.js","sources":["../../../src/business/types/campaign.ts"],"sourcesContent":["import type { Content } from './content';\nimport type { Image } from './media';\nimport type { MultilingualLabel } from './multilingual';\nimport type { Points } from './score';\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 CampaignCardDetails = {\n id: number;\n coverImage: string;\n title: MultilingualLabel;\n utcStartDate: string;\n utcEndDate: string;\n contentCount: number;\n};\n\nexport type WikiCardPlayerInteraction = {\n contentPlayedCount: number;\n favorite: boolean;\n};\n\nexport type WikiCard = {\n activityDetails: CampaignCardDetails;\n playerInteraction: WikiCardPlayerInteraction;\n};\n\nexport type WikiContentCardDetails = {\n id: number;\n coverImage: string;\n title: MultilingualLabel;\n session: number;\n};\n\nexport type WikiContentCard = {\n contentDetails: WikiContentCardDetails;\n points: Points;\n};\n\nexport type CampaignCardAchievement = {\n currentSession: number;\n playable: boolean;\n points: Points;\n};\n\nexport type SessionInsight = {\n earnablePoints: number;\n timeSpent: number;\n};\n\nexport type LiveCampaignCard = {\n campaign: CampaignCardDetails;\n achievement: CampaignCardAchievement;\n sessionInsight: SessionInsight;\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 && 'activityDetails' in item && 'playerInteraction' in item;\n"],"names":[],"mappings":";;;;AA0FO,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,iBAAiB,IAAI,IAAI,IAAI,mBAAmB,IAAI;;;;;;"}
1
+ {"version":3,"file":"campaign.js","sources":["../../../src/business/types/campaign.ts"],"sourcesContent":["import type { Content, GameType } from './content';\nimport type { Image } from './media';\nimport type { MultilingualLabel } from './multilingual';\nimport type { Points } from './score';\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 CampaignCardDetails = {\n id: number;\n coverImage: string;\n title: MultilingualLabel;\n utcStartDate: string;\n utcEndDate: string;\n contentCount: number;\n};\n\nexport type WikiCardPlayerInteraction = {\n contentPlayedCount: number;\n favorite: boolean;\n};\n\nexport type WikiCard = {\n activityDetails: CampaignCardDetails;\n playerInteraction: WikiCardPlayerInteraction;\n};\n\nexport type WikiContentCardDetails = {\n id: number;\n coverImage: string;\n title: MultilingualLabel;\n session: number;\n};\n\nexport type WikiContentCard = {\n contentDetails: WikiContentCardDetails;\n points: Points;\n};\n\nexport type CampaignCardAchievement = {\n currentSession: number;\n playable: boolean;\n points: Points;\n};\n\nexport type SessionInsight = {\n earnablePoints: number;\n timeSpent: number;\n gameTypes: GameType[];\n};\n\nexport type LiveCampaignCard = {\n campaign: CampaignCardDetails;\n achievement: CampaignCardAchievement;\n sessionInsight: SessionInsight;\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 && 'activityDetails' in item && 'playerInteraction' in item;\n"],"names":[],"mappings":";;;;AA2FO,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,iBAAiB,IAAI,IAAI,IAAI,mBAAmB,IAAI;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparted/shared-library",
3
- "version": "1.7.34",
3
+ "version": "1.7.35",
4
4
  "repository": "git@github.com:Sparted/shared-library.git",
5
5
  "author": {
6
6
  "name": "Sparted",