@iveri/contracts 0.147.0 → 0.149.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 +5 -0
- package/dist/api/clinic/clinic-refusal.enum.d.ts +3 -1
- package/dist/api/clinic/clinic-refusal.enum.js +2 -0
- package/dist/api/gym/gym-me.type.d.ts +2 -0
- package/dist/api/gym/gym-public.type.d.ts +4 -0
- package/dist/api/gym/gym-refusal.enum.d.ts +6 -1
- package/dist/api/gym/gym-refusal.enum.js +5 -0
- package/dist/api/gym/gym-room.type.d.ts +13 -0
- package/dist/api/gym/gym-schedule.type.d.ts +32 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -322,6 +322,11 @@ Conduit's outbox.
|
|
|
322
322
|
`UniboxAgents` under `@iveri/contracts/unibox`, so the inbox picks agents by name.
|
|
323
323
|
- Version `0.139.0` adds a trainer's notes on a member: `GymTrainerNote`, `GymTrainerNotes`, `SaveGymTrainerNoteRequest`,
|
|
324
324
|
`GymMyTrainerNote` and the `GymRefusal` member `not-their-trainer` under `@iveri/contracts/gym`.
|
|
325
|
+
- Version `0.149.0` lets a gym member choose their numbered place in a class: `placeChoice` / `placeColumns` on
|
|
326
|
+
`GymRoom`, `GymSession` and `PublicGymSession`, `spotNumber` on the booking requests, `MoveGymBookingPlaceRequest`,
|
|
327
|
+
`GymSessionPlaces`, `GymMyBooking.canChangePlace` and the `GymRefusal` member `place-taken`.
|
|
328
|
+
- Version `0.148.0` adds the `ClinicRefusal` member `beyond-booking-horizon`, for a date past how far ahead a clinic
|
|
329
|
+
takes bookings.
|
|
325
330
|
- Version `0.146.0` adds the Unibox AI agent's daily token cap (`AiAgentSetting.dailyTokenCap`,
|
|
326
331
|
`AgentRunRequest.dailyTokenCap`, the `AgentRunOutcome` members `cap-reached` and `cap-pending`, `AgentRunDailySpend`
|
|
327
332
|
and `UniboxAiUsageMetric`), and a clinic's automatic deposit refund on a client's cancellation:
|
|
@@ -16,5 +16,7 @@ export declare enum ClinicRefusal {
|
|
|
16
16
|
/** A refund of this online payment is still being confirmed with the bank; wait for it before asking again. */
|
|
17
17
|
ONLINE_REFUND_PENDING = "online-refund-pending",
|
|
18
18
|
/** This clinic cannot give online payments back from here; the money goes back from the payment provider. */
|
|
19
|
-
ONLINE_REFUND_UNAVAILABLE = "online-refund-unavailable"
|
|
19
|
+
ONLINE_REFUND_UNAVAILABLE = "online-refund-unavailable",
|
|
20
|
+
/** The date is further ahead than the clinic takes bookings; `details.bookingHorizonDays` says how far. */
|
|
21
|
+
BEYOND_BOOKING_HORIZON = "beyond-booking-horizon"
|
|
20
22
|
}
|
|
@@ -18,4 +18,6 @@ export var ClinicRefusal;
|
|
|
18
18
|
ClinicRefusal["ONLINE_REFUND_PENDING"] = "online-refund-pending";
|
|
19
19
|
/** This clinic cannot give online payments back from here; the money goes back from the payment provider. */
|
|
20
20
|
ClinicRefusal["ONLINE_REFUND_UNAVAILABLE"] = "online-refund-unavailable";
|
|
21
|
+
/** The date is further ahead than the clinic takes bookings; `details.bookingHorizonDays` says how far. */
|
|
22
|
+
ClinicRefusal["BEYOND_BOOKING_HORIZON"] = "beyond-booking-horizon";
|
|
21
23
|
})(ClinicRefusal || (ClinicRefusal = {}));
|
|
@@ -103,6 +103,8 @@ export interface GymMyBooking {
|
|
|
103
103
|
waitlistPosition: Nullable<number>;
|
|
104
104
|
session: PublicGymSession;
|
|
105
105
|
canCancel: boolean;
|
|
106
|
+
/** A confirmed place in a class whose room lets members choose, before it starts: it can move to a free one. */
|
|
107
|
+
canChangePlace: boolean;
|
|
106
108
|
/** Cancelling now would keep what the booking cost. */
|
|
107
109
|
isLateCancel: boolean;
|
|
108
110
|
/**
|
|
@@ -99,6 +99,10 @@ export interface PublicGymSession {
|
|
|
99
99
|
startsAt: IsoDateTime;
|
|
100
100
|
endsAt: IsoDateTime;
|
|
101
101
|
capacity: number;
|
|
102
|
+
/** The room lets members choose their numbered place. */
|
|
103
|
+
placeChoice: boolean;
|
|
104
|
+
/** Places per row, to draw the room as a grid; null draws a plain list. */
|
|
105
|
+
placeColumns: Nullable<number>;
|
|
102
106
|
placesLeft: number;
|
|
103
107
|
waitlistCount: number;
|
|
104
108
|
}
|
|
@@ -56,5 +56,10 @@ export declare enum GymRefusal {
|
|
|
56
56
|
* Only a trainer who has a personal session with the member (booked, attended or missed) writes notes about them;
|
|
57
57
|
* the screen was stale, for example the only session was called off.
|
|
58
58
|
*/
|
|
59
|
-
NOT_THEIR_TRAINER = "not-their-trainer"
|
|
59
|
+
NOT_THEIR_TRAINER = "not-their-trainer",
|
|
60
|
+
/**
|
|
61
|
+
* Somebody else holds that numbered place in the class (or took it a moment ago). The member or the desk picks
|
|
62
|
+
* another; the class itself may still have room.
|
|
63
|
+
*/
|
|
64
|
+
PLACE_TAKEN = "place-taken"
|
|
60
65
|
}
|
|
@@ -58,4 +58,9 @@ export var GymRefusal;
|
|
|
58
58
|
* the screen was stale, for example the only session was called off.
|
|
59
59
|
*/
|
|
60
60
|
GymRefusal["NOT_THEIR_TRAINER"] = "not-their-trainer";
|
|
61
|
+
/**
|
|
62
|
+
* Somebody else holds that numbered place in the class (or took it a moment ago). The member or the desk picks
|
|
63
|
+
* another; the class itself may still have room.
|
|
64
|
+
*/
|
|
65
|
+
GymRefusal["PLACE_TAKEN"] = "place-taken";
|
|
61
66
|
})(GymRefusal || (GymRefusal = {}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IsoDateTime } from '../../type/iso-date-time.type.js';
|
|
2
|
+
import type { Nullable } from '../../type/nil.type.js';
|
|
2
3
|
import type { UUID } from '../../type/uuid.type.js';
|
|
3
4
|
import type { LocalizedText } from '../clinic/localized-text.type.js';
|
|
4
5
|
import type { GymResourceStatus } from './gym-resource-status.enum.js';
|
|
@@ -9,6 +10,13 @@ export interface GymRoom {
|
|
|
9
10
|
capacity: number;
|
|
10
11
|
/** An open area like the gym floor, where two sessions can run at once. */
|
|
11
12
|
isShared: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Members choose which numbered place they get when they book a class here (bikes, mats, reformers). Off, the
|
|
15
|
+
* lowest free place is given, as it always was.
|
|
16
|
+
*/
|
|
17
|
+
placeChoice: boolean;
|
|
18
|
+
/** How many places stand in one row, to draw the room as a grid; null draws them as a plain list. */
|
|
19
|
+
placeColumns: Nullable<number>;
|
|
12
20
|
status: GymResourceStatus;
|
|
13
21
|
createdAt: IsoDateTime;
|
|
14
22
|
updatedAt: IsoDateTime;
|
|
@@ -18,10 +26,15 @@ export interface CreateGymRoomRequest {
|
|
|
18
26
|
name: LocalizedText;
|
|
19
27
|
capacity: number;
|
|
20
28
|
isShared?: boolean;
|
|
29
|
+
placeChoice?: boolean;
|
|
30
|
+
/** 1 to 20. */
|
|
31
|
+
placeColumns?: Nullable<number>;
|
|
21
32
|
}
|
|
22
33
|
export interface UpdateGymRoomRequest {
|
|
23
34
|
name?: LocalizedText;
|
|
24
35
|
capacity?: number;
|
|
25
36
|
isShared?: boolean;
|
|
37
|
+
placeChoice?: boolean;
|
|
38
|
+
placeColumns?: Nullable<number>;
|
|
26
39
|
status?: GymResourceStatus;
|
|
27
40
|
}
|
|
@@ -58,6 +58,10 @@ export interface GymSession {
|
|
|
58
58
|
startsAt: IsoDateTime;
|
|
59
59
|
endsAt: IsoDateTime;
|
|
60
60
|
capacity: number;
|
|
61
|
+
/** The room lets members choose their numbered place; always false for personal training. */
|
|
62
|
+
placeChoice: boolean;
|
|
63
|
+
/** The room's places per row, to draw it as a grid; null draws a plain list. */
|
|
64
|
+
placeColumns: Nullable<number>;
|
|
61
65
|
bookedCount: number;
|
|
62
66
|
waitlistCount: number;
|
|
63
67
|
status: GymSessionStatus;
|
|
@@ -130,6 +134,34 @@ export interface CreateGymPersonalSessionRequest {
|
|
|
130
134
|
}
|
|
131
135
|
export interface CreateGymBookingRequest {
|
|
132
136
|
memberId: UUID;
|
|
137
|
+
/**
|
|
138
|
+
* The place to give, where the room lets members choose (`placeChoice`). Omitted, the lowest free place is given.
|
|
139
|
+
* A place somebody holds is refused with `GymRefusal.PLACE_TAKEN`.
|
|
140
|
+
*/
|
|
141
|
+
spotNumber?: number;
|
|
142
|
+
}
|
|
143
|
+
/** A member taking a place in a class. Both fields are optional; a body is not needed at all. */
|
|
144
|
+
export interface BookMyGymSessionRequest {
|
|
145
|
+
/** As `CreateGymBookingRequest.spotNumber`; ignored where the room gives places itself. */
|
|
146
|
+
spotNumber?: number;
|
|
147
|
+
}
|
|
148
|
+
/** Moving a confirmed place to another free one in the same class, before it starts. */
|
|
149
|
+
export interface MoveGymBookingPlaceRequest {
|
|
150
|
+
spotNumber: number;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Which places of a class are taken, for a member choosing one. It names nobody: only the numbers, and which one is the
|
|
154
|
+
* reader's own.
|
|
155
|
+
*/
|
|
156
|
+
export interface GymSessionPlaces {
|
|
157
|
+
sessionId: UUID;
|
|
158
|
+
placeChoice: boolean;
|
|
159
|
+
capacity: number;
|
|
160
|
+
placeColumns: Nullable<number>;
|
|
161
|
+
/** Every place held by somebody else, ascending. */
|
|
162
|
+
takenSpotNumbers: number[];
|
|
163
|
+
/** The reader's own place, or null when they hold none. */
|
|
164
|
+
mySpotNumber: Nullable<number>;
|
|
133
165
|
}
|
|
134
166
|
export interface SetGymAttendanceRequest {
|
|
135
167
|
status: GymBookingStatus.ATTENDED | GymBookingStatus.NO_SHOW;
|