@iveri/contracts 0.110.0 → 0.112.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/README.md +4 -0
- package/dist/api/clinic/clinic-appointment.type.d.ts +5 -0
- package/dist/api/clinic/clinic-my-appointment.type.d.ts +5 -0
- package/dist/api/gym/gym-trainer-time-off.type.d.ts +43 -0
- package/dist/api/gym/gym-trainer-time-off.type.js +1 -0
- package/dist/api/gym/index.d.ts +1 -0
- package/dist/api/gym/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,10 @@ entry offers exactly `types` and `default`. The CommonJS build and the `typesVer
|
|
|
8
8
|
gone, so a consumer resolves the subpaths under `moduleResolution` `nodenext` or `bundler` — and
|
|
9
9
|
under Node 26 a CommonJS consumer still loads it, through `require`. See `CHANGELOG.md`.
|
|
10
10
|
|
|
11
|
+
Release `0.111.0` adds a gym trainer's time off to `@iveri/contracts/gym`: `GymTrainerTimeOff`, the sessions
|
|
12
|
+
the trainer still holds inside it (`GymTrainerTimeOffSession`), `CreateGymTrainerTimeOffRequest` and
|
|
13
|
+
`ListGymTrainerTimeOffQuery`. Additions only.
|
|
14
|
+
|
|
11
15
|
Release `0.106.0` adds `RealtimeResourceType.GYM_PERSON` (`gym.person`) and
|
|
12
16
|
`RealtimeEventType.GYM_PERSON_UPDATED`: a gym member's or trainer's own room, keyed by their
|
|
13
17
|
identity user id, so their apps learn at once that a conversation with the person they train with
|
|
@@ -41,6 +41,11 @@ export interface ClinicAppointment {
|
|
|
41
41
|
/** Until when the slot is held for an unpaid deposit. */
|
|
42
42
|
depositExpiresAt: Nullable<IsoDateTime>;
|
|
43
43
|
depositPaidAt: Nullable<IsoDateTime>;
|
|
44
|
+
/**
|
|
45
|
+
* When the visit was cancelled, by anybody or by an unpaid deposit releasing it. A deposit paid after this landed on
|
|
46
|
+
* a visit that was no longer happening.
|
|
47
|
+
*/
|
|
48
|
+
cancelledAt: Nullable<IsoDateTime>;
|
|
44
49
|
lines: ClinicAppointmentLine[];
|
|
45
50
|
note: Nullable<string>;
|
|
46
51
|
createdAt: IsoDateTime;
|
|
@@ -27,6 +27,11 @@ export interface MyClinicAppointment {
|
|
|
27
27
|
/** Until when the slot is held for an unpaid deposit. */
|
|
28
28
|
depositExpiresAt: Nullable<IsoDateTime>;
|
|
29
29
|
depositPaidAt: Nullable<IsoDateTime>;
|
|
30
|
+
/**
|
|
31
|
+
* When the visit was cancelled, by anybody or by an unpaid deposit releasing it. A deposit paid after this landed on
|
|
32
|
+
* a visit that was no longer happening.
|
|
33
|
+
*/
|
|
34
|
+
cancelledAt: Nullable<IsoDateTime>;
|
|
30
35
|
lines: ClinicAppointmentLine[];
|
|
31
36
|
note: Nullable<string>;
|
|
32
37
|
/** Whether the clinic's rules still let this client cancel it themselves. */
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IsoDateTime } from '../../type/iso-date-time.type.js';
|
|
2
|
+
import type { Nullable } from '../../type/nil.type.js';
|
|
3
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
4
|
+
import type { LocalizedText } from '../clinic/localized-text.type.js';
|
|
5
|
+
import type { GymSessionKind } from './gym-session-kind.enum.js';
|
|
6
|
+
/**
|
|
7
|
+
* A session the trainer still holds inside their time off: a class that needs somebody to cover it, or a personal
|
|
8
|
+
* session to move. Recording time off never cancels anything by itself.
|
|
9
|
+
*/
|
|
10
|
+
export interface GymTrainerTimeOffSession {
|
|
11
|
+
id: UUID;
|
|
12
|
+
kind: GymSessionKind;
|
|
13
|
+
branchId: UUID;
|
|
14
|
+
/** The class's name, or null for personal training. */
|
|
15
|
+
className: Nullable<LocalizedText>;
|
|
16
|
+
startsAt: IsoDateTime;
|
|
17
|
+
endsAt: IsoDateTime;
|
|
18
|
+
bookedCount: number;
|
|
19
|
+
}
|
|
20
|
+
/** A stretch of time a trainer is away. Nobody can book them for personal training inside it. */
|
|
21
|
+
export interface GymTrainerTimeOff {
|
|
22
|
+
id: UUID;
|
|
23
|
+
trainerId: UUID;
|
|
24
|
+
trainerName: string;
|
|
25
|
+
startsAt: IsoDateTime;
|
|
26
|
+
endsAt: IsoDateTime;
|
|
27
|
+
note: Nullable<string>;
|
|
28
|
+
sessionsToCover: GymTrainerTimeOffSession[];
|
|
29
|
+
createdAt: IsoDateTime;
|
|
30
|
+
}
|
|
31
|
+
/** Recording time off. A trainer may record their own; anybody else's needs `gym:schedule:manage`. */
|
|
32
|
+
export interface CreateGymTrainerTimeOffRequest {
|
|
33
|
+
trainerId: UUID;
|
|
34
|
+
startsAt: IsoDateTime;
|
|
35
|
+
endsAt: IsoDateTime;
|
|
36
|
+
note?: Nullable<string>;
|
|
37
|
+
}
|
|
38
|
+
/** Which time off to list: whatever overlaps `from` to `to`, for one trainer or for everybody. */
|
|
39
|
+
export interface ListGymTrainerTimeOffQuery {
|
|
40
|
+
from: IsoDateTime;
|
|
41
|
+
to: IsoDateTime;
|
|
42
|
+
trainerId?: UUID;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/api/gym/index.d.ts
CHANGED
|
@@ -40,5 +40,6 @@ export * from './gym-session-kind.enum.js';
|
|
|
40
40
|
export * from './gym-session-status.enum.js';
|
|
41
41
|
export * from './gym-signature-method.enum.js';
|
|
42
42
|
export * from './gym-staff.type.js';
|
|
43
|
+
export * from './gym-trainer-time-off.type.js';
|
|
43
44
|
export * from './gym-training.type.js';
|
|
44
45
|
export * from './gym-waiver.type.js';
|
package/dist/api/gym/index.js
CHANGED
|
@@ -40,5 +40,6 @@ export * from './gym-session-kind.enum.js';
|
|
|
40
40
|
export * from './gym-session-status.enum.js';
|
|
41
41
|
export * from './gym-signature-method.enum.js';
|
|
42
42
|
export * from './gym-staff.type.js';
|
|
43
|
+
export * from './gym-trainer-time-off.type.js';
|
|
43
44
|
export * from './gym-training.type.js';
|
|
44
45
|
export * from './gym-waiver.type.js';
|