-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2cc933
commit eab8f84
Showing
29 changed files
with
623 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# training-events-types | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
|
||
## Building | ||
|
||
Run `nx build training-events-types` to build the library. | ||
|
||
## Running unit tests | ||
|
||
Run `nx test training-events-types` to execute the unit tests via [Jest](https://jestjs.io). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "@rovacc/training-events-types", | ||
"version": "0.0.1", | ||
"type": "commonjs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "training-events-types", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "libs/training-events-types/src", | ||
"projectType": "library", | ||
"targets": { | ||
"build": { | ||
"executor": "@nx/vite:build", | ||
"outputs": ["{options.outputPath}"], | ||
"options": { | ||
"outputPath": "dist/libs/training-events-types" | ||
} | ||
}, | ||
"test": { | ||
"executor": "@nx/vite:test", | ||
"outputs": ["coverage/libs/training-events-types"], | ||
"options": { | ||
"passWithNoTests": true, | ||
"reportsDirectory": "../../coverage/libs/training-events-types" | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nx/linter:eslint", | ||
"outputs": ["{options.outputFile}"], | ||
"options": { | ||
"lintFilePatterns": ["libs/training-events-types/**/*.ts"] | ||
} | ||
} | ||
}, | ||
"tags": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export { TrainingCompletedEvent, TrainingCompletedEventData } from "./training-completed" | ||
export { TrainingCptPerformedEvent, TrainingCptPerformedEventData } from "./training-cpt-performed" | ||
export { TrainingCptRequestedEvent, TrainingCptRequestedEventData } from "./training-cpt-requested" | ||
export { TrainingCptScheduledEvent, TrainingCptScheduledEventData } from "./training-cpt-scheduled" | ||
export { TrainingIntentConfirmationExpiredEvent, TrainingIntentConfirmationExpiredEventData } from "./training-intent-confirmation-expired" | ||
export { TrainingIntentConfirmationRejectedEvent, TrainingIntentConfirmationRejectedEventData } from "./training-intent-confirmation-rejected" | ||
export { TrainingIntentConfirmationRequestedEvent, TrainingIntentConfirmationRequestedEventData } from "./training-intent-confirmation-requested" | ||
export { TrainingIntentConfirmationRespondedEvent, TrainingIntentConfirmationRespondedEventData } from "./training-intent-confirmation-responded" | ||
export { TrainingIntentEvent, TrainingIntentEventData } from "./training-intent" | ||
export { TrainingMentorAssignedEvent, TrainingMentorAssignedEventData } from "./training-mentor-assigned" | ||
export { TrainingMentorReassignedEvent, TrainingMentorReassignedEventData } from "./training-mentor-reassigned" | ||
export { TrainingSessionPerformedEvent, TrainingSessionPerformedEventData } from "./training-session-performed" | ||
export { TrainingSessionScheduledEvent, TrainingSessionScheduledEventData } from "./training-session-scheduled" | ||
export { TrainingSoloPerformedEvent, TrainingSoloPerformedEventData } from "./training-solo-performed" | ||
export { TrainingSoloRequestedEvent, TrainingSoloRequestedEventData } from "./training-solo-requested" | ||
export { TrainingSoloScheduledEvent, TrainingSoloScheduledEventData } from "./training-solo-scheduled" | ||
export { TrainingTestAssignedEvent, TrainingTestAssignedEventData } from "./training-test-assigned" | ||
export { TrainingTestCompletedEvent, TrainingTestCompletedEventData } from "./training-test-completed" |
16 changes: 16 additions & 0 deletions
16
libs/training-events-types/src/events/training-completed.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
import { OutcomeReason, OutcomeReasonDetailed, TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-completed' | ||
|
||
export type TrainingCompletedEventData = { | ||
trainingId: string, | ||
name: typeof name | ||
payload: { | ||
reason: OutcomeReason | ||
reasonDetailed: OutcomeReasonDetailed | ||
} | ||
} | ||
|
||
export type TrainingCompletedEvent = TrainingEventMetadata & TrainingCompletedEventData | ||
|
17 changes: 17 additions & 0 deletions
17
libs/training-events-types/src/events/training-cpt-performed.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
import { Member, TrainingEventMetadata, TrainingReport } from "../types"; | ||
|
||
const name = 'training-cpt-performed' | ||
|
||
export type TrainingCptPerformedEventData = { | ||
trainingId: string, | ||
name: typeof name | ||
payload: { | ||
assessedBy: Member | ||
report: TrainingReport | ||
passed: boolean | ||
} | ||
} | ||
|
||
export type TrainingCptPerformedEvent = TrainingEventMetadata & TrainingCptPerformedEventData | ||
|
15 changes: 15 additions & 0 deletions
15
libs/training-events-types/src/events/training-cpt-requested.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
import { Member, TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-cpt-requested' | ||
|
||
export type TrainingCptRequestedEventData = { | ||
trainingId: string, | ||
name: typeof name | ||
payload: { | ||
requestedBy: Member | ||
} | ||
} | ||
|
||
export type TrainingCptRequestedEvent = TrainingEventMetadata & TrainingCptRequestedEventData | ||
|
15 changes: 15 additions & 0 deletions
15
libs/training-events-types/src/events/training-cpt-scheduled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
import { TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-cpt-scheduled' | ||
|
||
export type TrainingCptScheduledEventData = { | ||
trainingId: string, | ||
name: typeof name | ||
payload: { | ||
scheduledAt: Date | ||
} | ||
} | ||
|
||
export type TrainingCptScheduledEvent = TrainingEventMetadata & TrainingCptScheduledEventData | ||
|
13 changes: 13 additions & 0 deletions
13
libs/training-events-types/src/events/training-intent-confirmation-expired.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
import { TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-intent-confirmation-expired'; | ||
|
||
export type TrainingIntentConfirmationExpiredEventData = { | ||
name: typeof name | ||
trainingId: string | ||
payload: Record<string, never> | ||
} | ||
|
||
export type TrainingIntentConfirmationExpiredEvent = TrainingEventMetadata & TrainingIntentConfirmationExpiredEventData | ||
|
12 changes: 12 additions & 0 deletions
12
libs/training-events-types/src/events/training-intent-confirmation-rejected.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-intent-confirmation-rejected'; | ||
|
||
export type TrainingIntentConfirmationRejectedEventData = { | ||
name: typeof name | ||
trainingId: string | ||
payload: Record<string, never> | ||
} | ||
|
||
export type TrainingIntentConfirmationRejectedEvent = TrainingEventMetadata & TrainingIntentConfirmationRejectedEventData | ||
|
13 changes: 13 additions & 0 deletions
13
libs/training-events-types/src/events/training-intent-confirmation-requested.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
import { TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-intent-confirmation-requested'; | ||
|
||
export type TrainingIntentConfirmationRequestedEventData = { | ||
name: typeof name | ||
trainingId: string | ||
payload: Record<string, never> | ||
} | ||
|
||
export type TrainingIntentConfirmationRequestedEvent = TrainingEventMetadata & TrainingIntentConfirmationRequestedEventData | ||
|
13 changes: 13 additions & 0 deletions
13
libs/training-events-types/src/events/training-intent-confirmation-responded.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
import { TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-intent-confirmation-responded'; | ||
|
||
export type TrainingIntentConfirmationRespondedEventData = { | ||
name: typeof name | ||
trainingId: string | ||
payload: Record<string, never> | ||
} | ||
|
||
export type TrainingIntentConfirmationRespondedEvent = TrainingEventMetadata & TrainingIntentConfirmationRespondedEventData | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
import { TrainingEventMetadata, TrainingPurpose } from "../types"; | ||
|
||
const name = 'training-intent'; | ||
|
||
export type TrainingIntentEventData = { | ||
trainingId: string, | ||
name: typeof name | ||
payload: { | ||
student: number | ||
rating: number | ||
purpose: TrainingPurpose | ||
} | ||
} | ||
|
||
export type TrainingIntentEvent = TrainingEventMetadata & TrainingIntentEventData | ||
|
15 changes: 15 additions & 0 deletions
15
libs/training-events-types/src/events/training-mentor-assigned.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Member, TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-mentor-assigned' | ||
|
||
export type TrainingMentorAssignedEventData = { | ||
name: typeof name | ||
trainingId: string | ||
payload: { | ||
mentor: Member | ||
assignedBy: Member | ||
} | ||
} | ||
|
||
export type TrainingMentorAssignedEvent = TrainingEventMetadata & TrainingMentorAssignedEventData | ||
|
15 changes: 15 additions & 0 deletions
15
libs/training-events-types/src/events/training-mentor-reassigned.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Member, TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-mentor-reassigned' | ||
|
||
export type TrainingMentorReassignedEventData = { | ||
name: typeof name | ||
trainingId: string | ||
payload: { | ||
mentor: Member | ||
assignedBy: Member | ||
} | ||
} | ||
|
||
export type TrainingMentorReassignedEvent = TrainingEventMetadata & TrainingMentorReassignedEventData | ||
|
16 changes: 16 additions & 0 deletions
16
libs/training-events-types/src/events/training-session-performed.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Member, TrainingEventMetadata, TrainingReport } from "../types"; | ||
|
||
const name = 'training-session-performed' | ||
|
||
export type TrainingSessionPerformedEventData = { | ||
name: typeof name | ||
trainingId: string | ||
payload: { | ||
sessionId: string | ||
mentor: Member, | ||
report: TrainingReport | ||
} | ||
} | ||
|
||
export type TrainingSessionPerformedEvent = TrainingEventMetadata & TrainingSessionPerformedEventData | ||
|
15 changes: 15 additions & 0 deletions
15
libs/training-events-types/src/events/training-session-scheduled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-session-scheduled' | ||
|
||
export type TrainingSessionScheduledEventData = { | ||
name: typeof name | ||
trainingId: string | ||
payload: { | ||
sessionId: string | ||
scheduledAt: Date | ||
} | ||
} | ||
|
||
export type TrainingSessionScheduledEvent = TrainingEventMetadata & TrainingSessionScheduledEventData | ||
|
17 changes: 17 additions & 0 deletions
17
libs/training-events-types/src/events/training-solo-performed.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
import { Member, TrainingEventMetadata, TrainingReport } from "../types"; | ||
|
||
const name = 'training-solo-performed' | ||
|
||
export type TrainingSoloPerformedEventData = { | ||
trainingId: string, | ||
name: typeof name | ||
payload: { | ||
requestedBy: Member | ||
passed: boolean | ||
report: TrainingReport | ||
} | ||
} | ||
|
||
export type TrainingSoloPerformedEvent = TrainingEventMetadata & TrainingSoloPerformedEventData | ||
|
15 changes: 15 additions & 0 deletions
15
libs/training-events-types/src/events/training-solo-requested.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
import { Member, TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-solo-requested' | ||
|
||
export type TrainingSoloRequestedEventData = { | ||
trainingId: string, | ||
name: typeof name | ||
payload: { | ||
requestedBy: Member | ||
} | ||
} | ||
|
||
export type TrainingSoloRequestedEvent = TrainingEventMetadata & TrainingSoloRequestedEventData | ||
|
15 changes: 15 additions & 0 deletions
15
libs/training-events-types/src/events/training-solo-scheduled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
import { TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-solo-scheduled' | ||
|
||
export type TrainingSoloScheduledEventData = { | ||
trainingId: string, | ||
name: typeof name | ||
payload: { | ||
scheduledAt: Date | ||
} | ||
} | ||
|
||
export type TrainingSoloScheduledEvent = TrainingEventMetadata & TrainingSoloScheduledEventData | ||
|
15 changes: 15 additions & 0 deletions
15
libs/training-events-types/src/events/training-test-assigned.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
import { Member, TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-test-assigned' | ||
|
||
export type TrainingTestAssignedEventData = { | ||
trainingId: string, | ||
name: typeof name | ||
payload: { | ||
assignedBy: Member | ||
} | ||
} | ||
|
||
export type TrainingTestAssignedEvent = TrainingEventMetadata & TrainingTestAssignedEventData | ||
|
16 changes: 16 additions & 0 deletions
16
libs/training-events-types/src/events/training-test-completed.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestResult, TrainingEventMetadata } from "../types"; | ||
|
||
const name = 'training-test-completed' | ||
|
||
export type TrainingTestCompletedEventData = { | ||
trainingId: string, | ||
name: typeof name | ||
payload: { | ||
passed: boolean | ||
result: TestResult | ||
willExpireAt?: Date | ||
} | ||
} | ||
|
||
export type TrainingTestCompletedEvent = TrainingEventMetadata & TrainingTestCompletedEventData | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './types' | ||
export * from './events' |
Oops, something went wrong.