@iveri/contracts 0.54.0 → 0.60.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/dist/api/gym/gym-booking-refusal.enum.d.ts +14 -0
- package/dist/api/gym/gym-booking-refusal.enum.js +15 -0
- package/dist/api/gym/gym-booking-status.enum.d.ts +9 -0
- package/dist/api/gym/gym-booking-status.enum.js +10 -0
- package/dist/api/gym/gym-branch.type.d.ts +47 -0
- package/dist/api/gym/gym-branch.type.js +1 -0
- package/dist/api/gym/gym-busy-level.enum.d.ts +5 -0
- package/dist/api/gym/gym-busy-level.enum.js +6 -0
- package/dist/api/gym/gym-check-in-outcome.enum.d.ts +6 -0
- package/dist/api/gym/gym-check-in-outcome.enum.js +7 -0
- package/dist/api/gym/gym-check-in-refusal.enum.d.ts +12 -0
- package/dist/api/gym/gym-check-in-refusal.enum.js +13 -0
- package/dist/api/gym/gym-class-access.enum.d.ts +6 -0
- package/dist/api/gym/gym-class-access.enum.js +7 -0
- package/dist/api/gym/gym-class-level.enum.d.ts +6 -0
- package/dist/api/gym/gym-class-level.enum.js +7 -0
- package/dist/api/gym/gym-class-type.type.d.ts +35 -0
- package/dist/api/gym/gym-class-type.type.js +1 -0
- package/dist/api/gym/gym-common.type.d.ts +14 -0
- package/dist/api/gym/gym-common.type.js +1 -0
- package/dist/api/gym/gym-door.type.d.ts +65 -0
- package/dist/api/gym/gym-door.type.js +1 -0
- package/dist/api/gym/gym-duration-unit.enum.d.ts +4 -0
- package/dist/api/gym/gym-duration-unit.enum.js +5 -0
- package/dist/api/gym/gym-entry-kind.enum.d.ts +6 -0
- package/dist/api/gym/gym-entry-kind.enum.js +7 -0
- package/dist/api/gym/gym-equipment.enum.d.ts +11 -0
- package/dist/api/gym/gym-equipment.enum.js +12 -0
- package/dist/api/gym/gym-exercise-category.enum.d.ts +5 -0
- package/dist/api/gym/gym-exercise-category.enum.js +6 -0
- package/dist/api/gym/gym-exercise-measure.enum.d.ts +7 -0
- package/dist/api/gym/gym-exercise-measure.enum.js +8 -0
- package/dist/api/gym/gym-gallery.type.d.ts +17 -0
- package/dist/api/gym/gym-gallery.type.js +1 -0
- package/dist/api/gym/gym-lead-kind.enum.d.ts +5 -0
- package/dist/api/gym/gym-lead-kind.enum.js +6 -0
- package/dist/api/gym/gym-lead-status.enum.d.ts +7 -0
- package/dist/api/gym/gym-lead-status.enum.js +8 -0
- package/dist/api/gym/gym-lead.type.d.ts +32 -0
- package/dist/api/gym/gym-lead.type.js +1 -0
- package/dist/api/gym/gym-me.type.d.ts +115 -0
- package/dist/api/gym/gym-me.type.js +1 -0
- package/dist/api/gym/gym-member.type.d.ts +55 -0
- package/dist/api/gym/gym-member.type.js +1 -0
- package/dist/api/gym/gym-membership-status.enum.d.ts +14 -0
- package/dist/api/gym/gym-membership-status.enum.js +15 -0
- package/dist/api/gym/gym-membership.type.d.ts +93 -0
- package/dist/api/gym/gym-membership.type.js +1 -0
- package/dist/api/gym/gym-muscle-group.enum.d.ts +13 -0
- package/dist/api/gym/gym-muscle-group.enum.js +14 -0
- package/dist/api/gym/gym-payment-kind.enum.d.ts +4 -0
- package/dist/api/gym/gym-payment-kind.enum.js +5 -0
- package/dist/api/gym/gym-payment-method.enum.d.ts +6 -0
- package/dist/api/gym/gym-payment-method.enum.js +7 -0
- package/dist/api/gym/gym-payment.type.d.ts +59 -0
- package/dist/api/gym/gym-payment.type.js +1 -0
- package/dist/api/gym/gym-plan-activation.enum.d.ts +5 -0
- package/dist/api/gym/gym-plan-activation.enum.js +6 -0
- package/dist/api/gym/gym-plan.type.d.ts +72 -0
- package/dist/api/gym/gym-plan.type.js +1 -0
- package/dist/api/gym/gym-profile.type.d.ts +65 -0
- package/dist/api/gym/gym-profile.type.js +1 -0
- package/dist/api/gym/gym-promo-code.type.d.ts +33 -0
- package/dist/api/gym/gym-promo-code.type.js +1 -0
- package/dist/api/gym/gym-public.type.d.ts +114 -0
- package/dist/api/gym/gym-public.type.js +1 -0
- package/dist/api/gym/gym-record-kind.enum.d.ts +7 -0
- package/dist/api/gym/gym-record-kind.enum.js +8 -0
- package/dist/api/gym/gym-report.type.d.ts +73 -0
- package/dist/api/gym/gym-report.type.js +1 -0
- package/dist/api/gym/gym-resource-status.enum.d.ts +5 -0
- package/dist/api/gym/gym-resource-status.enum.js +6 -0
- package/dist/api/gym/gym-room.type.d.ts +27 -0
- package/dist/api/gym/gym-room.type.js +1 -0
- package/dist/api/gym/gym-schedule.type.d.ts +122 -0
- package/dist/api/gym/gym-schedule.type.js +1 -0
- package/dist/api/gym/gym-session-kind.enum.d.ts +4 -0
- package/dist/api/gym/gym-session-kind.enum.js +5 -0
- package/dist/api/gym/gym-session-status.enum.d.ts +4 -0
- package/dist/api/gym/gym-session-status.enum.js +5 -0
- package/dist/api/gym/gym-signature-method.enum.d.ts +4 -0
- package/dist/api/gym/gym-signature-method.enum.js +5 -0
- package/dist/api/gym/gym-staff.type.d.ts +46 -0
- package/dist/api/gym/gym-staff.type.js +1 -0
- package/dist/api/gym/gym-training.type.d.ts +179 -0
- package/dist/api/gym/gym-training.type.js +1 -0
- package/dist/api/gym/gym-waiver.type.d.ts +32 -0
- package/dist/api/gym/gym-waiver.type.js +1 -0
- package/dist/api/gym/index.d.ts +44 -0
- package/dist/api/gym/index.js +44 -0
- package/dist/api/realtime/realtime-event-type.enum.d.ts +7 -1
- package/dist/api/realtime/realtime-event-type.enum.js +6 -0
- package/dist/api/realtime/realtime-resource-type.enum.d.ts +7 -1
- package/dist/api/realtime/realtime-resource-type.enum.js +6 -0
- package/dist/api/social/index.d.ts +20 -0
- package/dist/api/social/index.js +20 -0
- package/dist/api/social/social-account.type.d.ts +24 -0
- package/dist/api/social/social-account.type.js +1 -0
- package/dist/api/social/social-activity-kind.enum.d.ts +13 -0
- package/dist/api/social/social-activity-kind.enum.js +14 -0
- package/dist/api/social/social-activity.type.d.ts +26 -0
- package/dist/api/social/social-activity.type.js +1 -0
- package/dist/api/social/social-appeal-status.enum.d.ts +7 -0
- package/dist/api/social/social-appeal-status.enum.js +8 -0
- package/dist/api/social/social-case-decision.enum.d.ts +13 -0
- package/dist/api/social/social-case-decision.enum.js +14 -0
- package/dist/api/social/social-case-status.enum.d.ts +4 -0
- package/dist/api/social/social-case-status.enum.js +5 -0
- package/dist/api/social/social-conversation.type.d.ts +45 -0
- package/dist/api/social/social-conversation.type.js +1 -0
- package/dist/api/social/social-export-status.enum.d.ts +6 -0
- package/dist/api/social/social-export-status.enum.js +7 -0
- package/dist/api/social/social-follow-state.enum.d.ts +7 -0
- package/dist/api/social/social-follow-state.enum.js +8 -0
- package/dist/api/social/social-image.type.d.ts +28 -0
- package/dist/api/social/social-image.type.js +1 -0
- package/dist/api/social/social-limits.constant.d.ts +23 -0
- package/dist/api/social/social-limits.constant.js +23 -0
- package/dist/api/social/social-member-status.enum.d.ts +12 -0
- package/dist/api/social/social-member-status.enum.js +13 -0
- package/dist/api/social/social-member.type.d.ts +79 -0
- package/dist/api/social/social-member.type.js +1 -0
- package/dist/api/social/social-moderation-reason.enum.d.ts +13 -0
- package/dist/api/social/social-moderation-reason.enum.js +14 -0
- package/dist/api/social/social-moderation.type.d.ts +166 -0
- package/dist/api/social/social-moderation.type.js +1 -0
- package/dist/api/social/social-post.type.d.ts +58 -0
- package/dist/api/social/social-post.type.js +1 -0
- package/dist/api/social/social-refusal.enum.d.ts +37 -0
- package/dist/api/social/social-refusal.enum.js +38 -0
- package/dist/api/social/social-report-reason.enum.d.ts +18 -0
- package/dist/api/social/social-report-reason.enum.js +19 -0
- package/dist/api/social/social-report-target.enum.d.ts +8 -0
- package/dist/api/social/social-report-target.enum.js +9 -0
- package/dist/api/social/social-story.type.d.ts +30 -0
- package/dist/api/social/social-story.type.js +1 -0
- package/dist/enum/user-permission.enum.d.ts +53 -1
- package/dist/enum/user-permission.enum.js +52 -0
- package/package.json +9 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Nullable } from '../../type/nil.type.js';
|
|
2
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
3
|
+
import type { LocalizedText } from '../clinic/localized-text.type.js';
|
|
4
|
+
import type { GymBranchOccupancy } from './gym-branch.type.js';
|
|
5
|
+
import type { GymExpiringMembership } from './gym-membership.type.js';
|
|
6
|
+
import type { GymOwingMembership } from './gym-payment.type.js';
|
|
7
|
+
import type { GymSession } from './gym-schedule.type.js';
|
|
8
|
+
/** What the owner opens the panel to find out. Lands on what needs doing. */
|
|
9
|
+
export interface GymOverview {
|
|
10
|
+
date: string;
|
|
11
|
+
currency: string;
|
|
12
|
+
activeMembers: number;
|
|
13
|
+
joinedThisMonth: number;
|
|
14
|
+
checkInsToday: number;
|
|
15
|
+
takingsTodayMinor: number;
|
|
16
|
+
newLeads: number;
|
|
17
|
+
owingMinor: number;
|
|
18
|
+
occupancy: GymBranchOccupancy[];
|
|
19
|
+
sessionsToday: GymSession[];
|
|
20
|
+
expiringSoon: GymExpiringMembership[];
|
|
21
|
+
owing: GymOwingMembership[];
|
|
22
|
+
}
|
|
23
|
+
export interface GymRevenueDay {
|
|
24
|
+
date: string;
|
|
25
|
+
amountMinor: number;
|
|
26
|
+
}
|
|
27
|
+
export interface GymRevenuePlan {
|
|
28
|
+
planId: UUID;
|
|
29
|
+
name: LocalizedText;
|
|
30
|
+
amountMinor: number;
|
|
31
|
+
count: number;
|
|
32
|
+
}
|
|
33
|
+
export interface GymRevenueReport {
|
|
34
|
+
from: string;
|
|
35
|
+
to: string;
|
|
36
|
+
currency: string;
|
|
37
|
+
totalMinor: number;
|
|
38
|
+
byDay: GymRevenueDay[];
|
|
39
|
+
byPlan: GymRevenuePlan[];
|
|
40
|
+
}
|
|
41
|
+
export interface GymMembersMonth {
|
|
42
|
+
/** `YYYY-MM`. */
|
|
43
|
+
month: string;
|
|
44
|
+
joined: number;
|
|
45
|
+
ended: number;
|
|
46
|
+
activeAtEnd: number;
|
|
47
|
+
}
|
|
48
|
+
export interface GymMembersReport {
|
|
49
|
+
months: GymMembersMonth[];
|
|
50
|
+
}
|
|
51
|
+
export interface GymClassFill {
|
|
52
|
+
classTypeId: UUID;
|
|
53
|
+
name: LocalizedText;
|
|
54
|
+
sessions: number;
|
|
55
|
+
fillPercent: Nullable<number>;
|
|
56
|
+
attended: number;
|
|
57
|
+
noShows: number;
|
|
58
|
+
}
|
|
59
|
+
export interface GymClassReport {
|
|
60
|
+
from: string;
|
|
61
|
+
to: string;
|
|
62
|
+
classes: GymClassFill[];
|
|
63
|
+
}
|
|
64
|
+
export interface GymPeakHour {
|
|
65
|
+
dayOfWeek: number;
|
|
66
|
+
hour: number;
|
|
67
|
+
checkIns: number;
|
|
68
|
+
}
|
|
69
|
+
export interface GymPeakHoursReport {
|
|
70
|
+
from: string;
|
|
71
|
+
to: string;
|
|
72
|
+
hours: GymPeakHour[];
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Whether a branch, room, class, plan or staff member is in use. Retiring keeps the history that names it. */
|
|
2
|
+
export var GymResourceStatus;
|
|
3
|
+
(function (GymResourceStatus) {
|
|
4
|
+
GymResourceStatus["ACTIVE"] = "active";
|
|
5
|
+
GymResourceStatus["INACTIVE"] = "inactive";
|
|
6
|
+
})(GymResourceStatus || (GymResourceStatus = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IsoDateTime } from '../../type/iso-date-time.type.js';
|
|
2
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
3
|
+
import type { LocalizedText } from '../clinic/localized-text.type.js';
|
|
4
|
+
import type { GymResourceStatus } from './gym-resource-status.enum.js';
|
|
5
|
+
export interface GymRoom {
|
|
6
|
+
id: UUID;
|
|
7
|
+
branchId: UUID;
|
|
8
|
+
name: LocalizedText;
|
|
9
|
+
capacity: number;
|
|
10
|
+
/** An open area like the gym floor, where two sessions can run at once. */
|
|
11
|
+
isShared: boolean;
|
|
12
|
+
status: GymResourceStatus;
|
|
13
|
+
createdAt: IsoDateTime;
|
|
14
|
+
updatedAt: IsoDateTime;
|
|
15
|
+
}
|
|
16
|
+
export interface CreateGymRoomRequest {
|
|
17
|
+
branchId: UUID;
|
|
18
|
+
name: LocalizedText;
|
|
19
|
+
capacity: number;
|
|
20
|
+
isShared?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface UpdateGymRoomRequest {
|
|
23
|
+
name?: LocalizedText;
|
|
24
|
+
capacity?: number;
|
|
25
|
+
isShared?: boolean;
|
|
26
|
+
status?: GymResourceStatus;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
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 { GymBookingStatus } from './gym-booking-status.enum.js';
|
|
6
|
+
import type { GymMediaImage } from './gym-common.type.js';
|
|
7
|
+
import type { GymResourceStatus } from './gym-resource-status.enum.js';
|
|
8
|
+
import type { GymSessionKind } from './gym-session-kind.enum.js';
|
|
9
|
+
import type { GymSessionStatus } from './gym-session-status.enum.js';
|
|
10
|
+
/** "Tuesdays at 18:00 in Studio 2 with this trainer", in the branch's own wall-clock time. */
|
|
11
|
+
export interface GymClassTemplate {
|
|
12
|
+
id: UUID;
|
|
13
|
+
branchId: UUID;
|
|
14
|
+
roomId: Nullable<UUID>;
|
|
15
|
+
classTypeId: UUID;
|
|
16
|
+
className: LocalizedText;
|
|
17
|
+
trainerId: UUID;
|
|
18
|
+
trainerName: string;
|
|
19
|
+
dayOfWeek: number;
|
|
20
|
+
startTime: string;
|
|
21
|
+
durationMinutes: number;
|
|
22
|
+
capacity: number;
|
|
23
|
+
validFrom: string;
|
|
24
|
+
validUntil: Nullable<string>;
|
|
25
|
+
status: GymResourceStatus;
|
|
26
|
+
createdAt: IsoDateTime;
|
|
27
|
+
updatedAt: IsoDateTime;
|
|
28
|
+
}
|
|
29
|
+
export interface CreateGymClassTemplateRequest {
|
|
30
|
+
branchId: UUID;
|
|
31
|
+
roomId?: Nullable<UUID>;
|
|
32
|
+
classTypeId: UUID;
|
|
33
|
+
trainerId: UUID;
|
|
34
|
+
dayOfWeek: number;
|
|
35
|
+
startTime: string;
|
|
36
|
+
durationMinutes?: number;
|
|
37
|
+
capacity?: number;
|
|
38
|
+
validFrom: string;
|
|
39
|
+
validUntil?: Nullable<string>;
|
|
40
|
+
}
|
|
41
|
+
export type UpdateGymClassTemplateRequest = Partial<Omit<CreateGymClassTemplateRequest, 'branchId'>> & {
|
|
42
|
+
status?: GymResourceStatus;
|
|
43
|
+
};
|
|
44
|
+
/** One dated occurrence: a class with many places, or personal training with one. */
|
|
45
|
+
export interface GymSession {
|
|
46
|
+
id: UUID;
|
|
47
|
+
kind: GymSessionKind;
|
|
48
|
+
branchId: UUID;
|
|
49
|
+
roomId: Nullable<UUID>;
|
|
50
|
+
roomName: Nullable<LocalizedText>;
|
|
51
|
+
classTypeId: Nullable<UUID>;
|
|
52
|
+
className: Nullable<LocalizedText>;
|
|
53
|
+
color: Nullable<string>;
|
|
54
|
+
trainerId: UUID;
|
|
55
|
+
trainerName: string;
|
|
56
|
+
trainerPhoto: Nullable<GymMediaImage>;
|
|
57
|
+
startsAt: IsoDateTime;
|
|
58
|
+
endsAt: IsoDateTime;
|
|
59
|
+
capacity: number;
|
|
60
|
+
bookedCount: number;
|
|
61
|
+
waitlistCount: number;
|
|
62
|
+
status: GymSessionStatus;
|
|
63
|
+
cancelReason: Nullable<string>;
|
|
64
|
+
templateId: Nullable<UUID>;
|
|
65
|
+
createdAt: IsoDateTime;
|
|
66
|
+
updatedAt: IsoDateTime;
|
|
67
|
+
}
|
|
68
|
+
export interface GymBooking {
|
|
69
|
+
id: UUID;
|
|
70
|
+
sessionId: UUID;
|
|
71
|
+
memberId: UUID;
|
|
72
|
+
memberName: string;
|
|
73
|
+
memberPhoto: Nullable<GymMediaImage>;
|
|
74
|
+
status: GymBookingStatus;
|
|
75
|
+
/** Null while waitlisted or once given up. */
|
|
76
|
+
spotNumber: Nullable<number>;
|
|
77
|
+
/** Null unless waitlisted. 1 is next. */
|
|
78
|
+
waitlistPosition: Nullable<number>;
|
|
79
|
+
membershipId: UUID;
|
|
80
|
+
createdAt: IsoDateTime;
|
|
81
|
+
updatedAt: IsoDateTime;
|
|
82
|
+
}
|
|
83
|
+
export interface GymSessionDetail extends GymSession {
|
|
84
|
+
bookings: GymBooking[];
|
|
85
|
+
}
|
|
86
|
+
export interface CreateGymSessionRequest {
|
|
87
|
+
branchId: UUID;
|
|
88
|
+
roomId?: Nullable<UUID>;
|
|
89
|
+
classTypeId: UUID;
|
|
90
|
+
trainerId: UUID;
|
|
91
|
+
startsAt: IsoDateTime;
|
|
92
|
+
durationMinutes?: number;
|
|
93
|
+
capacity?: number;
|
|
94
|
+
}
|
|
95
|
+
export interface UpdateGymSessionRequest {
|
|
96
|
+
roomId?: Nullable<UUID>;
|
|
97
|
+
trainerId?: UUID;
|
|
98
|
+
capacity?: number;
|
|
99
|
+
}
|
|
100
|
+
export interface CancelGymSessionRequest {
|
|
101
|
+
reason: string;
|
|
102
|
+
}
|
|
103
|
+
export interface CreateGymPersonalSessionRequest {
|
|
104
|
+
branchId: UUID;
|
|
105
|
+
trainerId: UUID;
|
|
106
|
+
memberId: UUID;
|
|
107
|
+
startsAt: IsoDateTime;
|
|
108
|
+
durationMinutes?: number;
|
|
109
|
+
roomId?: Nullable<UUID>;
|
|
110
|
+
}
|
|
111
|
+
export interface CreateGymBookingRequest {
|
|
112
|
+
memberId: UUID;
|
|
113
|
+
}
|
|
114
|
+
export interface SetGymAttendanceRequest {
|
|
115
|
+
status: GymBookingStatus.ATTENDED | GymBookingStatus.NO_SHOW;
|
|
116
|
+
}
|
|
117
|
+
/** A free time with a trainer. */
|
|
118
|
+
export interface GymPersonalSlot {
|
|
119
|
+
trainerId: UUID;
|
|
120
|
+
startsAt: IsoDateTime;
|
|
121
|
+
endsAt: IsoDateTime;
|
|
122
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { GymMediaImage, GymWeeklyPeriod } from './gym-common.type.js';
|
|
6
|
+
import type { GymResourceStatus } from './gym-resource-status.enum.js';
|
|
7
|
+
/** Somebody who works at the gym. An account in identity, and everything the gym knows beyond that. */
|
|
8
|
+
export interface GymStaffMember {
|
|
9
|
+
id: UUID;
|
|
10
|
+
userId: Nullable<UUID>;
|
|
11
|
+
displayName: string;
|
|
12
|
+
phone: Nullable<string>;
|
|
13
|
+
branchIds: UUID[];
|
|
14
|
+
isTrainer: boolean;
|
|
15
|
+
/** Whether members can book this trainer for personal training. */
|
|
16
|
+
offersPersonal: boolean;
|
|
17
|
+
personalSessionMinutes: number;
|
|
18
|
+
classTypeIds: UUID[];
|
|
19
|
+
/** When this trainer can take personal sessions. */
|
|
20
|
+
workingHours: GymWeeklyPeriod[];
|
|
21
|
+
title: Nullable<LocalizedText>;
|
|
22
|
+
bio: Nullable<LocalizedText>;
|
|
23
|
+
experienceYears: Nullable<number>;
|
|
24
|
+
photo: Nullable<GymMediaImage>;
|
|
25
|
+
status: GymResourceStatus;
|
|
26
|
+
createdAt: IsoDateTime;
|
|
27
|
+
updatedAt: IsoDateTime;
|
|
28
|
+
}
|
|
29
|
+
export interface CreateGymStaffMemberRequest {
|
|
30
|
+
userId?: Nullable<UUID>;
|
|
31
|
+
displayName: string;
|
|
32
|
+
phone?: Nullable<string>;
|
|
33
|
+
branchIds: UUID[];
|
|
34
|
+
isTrainer?: boolean;
|
|
35
|
+
offersPersonal?: boolean;
|
|
36
|
+
personalSessionMinutes?: number;
|
|
37
|
+
classTypeIds?: UUID[];
|
|
38
|
+
workingHours?: GymWeeklyPeriod[];
|
|
39
|
+
title?: Nullable<LocalizedText>;
|
|
40
|
+
bio?: Nullable<LocalizedText>;
|
|
41
|
+
experienceYears?: Nullable<number>;
|
|
42
|
+
photo?: Nullable<GymMediaImage>;
|
|
43
|
+
}
|
|
44
|
+
export type UpdateGymStaffMemberRequest = Partial<CreateGymStaffMemberRequest> & {
|
|
45
|
+
status?: GymResourceStatus;
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,179 @@
|
|
|
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 { GymEquipment } from './gym-equipment.enum.js';
|
|
6
|
+
import type { GymExerciseCategory } from './gym-exercise-category.enum.js';
|
|
7
|
+
import type { GymExerciseMeasure } from './gym-exercise-measure.enum.js';
|
|
8
|
+
import type { GymMuscleGroup } from './gym-muscle-group.enum.js';
|
|
9
|
+
import type { GymRecordKind } from './gym-record-kind.enum.js';
|
|
10
|
+
import type { GymResourceStatus } from './gym-resource-status.enum.js';
|
|
11
|
+
export interface GymExercise {
|
|
12
|
+
id: UUID;
|
|
13
|
+
name: LocalizedText;
|
|
14
|
+
category: GymExerciseCategory;
|
|
15
|
+
muscleGroup: GymMuscleGroup;
|
|
16
|
+
equipment: GymEquipment;
|
|
17
|
+
measure: GymExerciseMeasure;
|
|
18
|
+
instructions: Nullable<LocalizedText>;
|
|
19
|
+
status: GymResourceStatus;
|
|
20
|
+
createdAt: IsoDateTime;
|
|
21
|
+
updatedAt: IsoDateTime;
|
|
22
|
+
}
|
|
23
|
+
export interface CreateGymExerciseRequest {
|
|
24
|
+
name: LocalizedText;
|
|
25
|
+
category: GymExerciseCategory;
|
|
26
|
+
muscleGroup: GymMuscleGroup;
|
|
27
|
+
equipment: GymEquipment;
|
|
28
|
+
measure: GymExerciseMeasure;
|
|
29
|
+
instructions?: Nullable<LocalizedText>;
|
|
30
|
+
}
|
|
31
|
+
export type UpdateGymExerciseRequest = Partial<CreateGymExerciseRequest> & {
|
|
32
|
+
status?: GymResourceStatus;
|
|
33
|
+
};
|
|
34
|
+
export interface GymRoutineItem {
|
|
35
|
+
exerciseId: UUID;
|
|
36
|
+
exerciseName: LocalizedText;
|
|
37
|
+
measure: GymExerciseMeasure;
|
|
38
|
+
sets: number;
|
|
39
|
+
reps: Nullable<number>;
|
|
40
|
+
targetWeightGrams: Nullable<number>;
|
|
41
|
+
targetSeconds: Nullable<number>;
|
|
42
|
+
restSeconds: Nullable<number>;
|
|
43
|
+
note: Nullable<string>;
|
|
44
|
+
}
|
|
45
|
+
export interface GymRoutine {
|
|
46
|
+
id: UUID;
|
|
47
|
+
/** Null for a routine the gym keeps to hand out. */
|
|
48
|
+
memberId: Nullable<UUID>;
|
|
49
|
+
name: string;
|
|
50
|
+
note: Nullable<string>;
|
|
51
|
+
/** Who wrote it, when a trainer did. */
|
|
52
|
+
assignedByName: Nullable<string>;
|
|
53
|
+
items: GymRoutineItem[];
|
|
54
|
+
createdAt: IsoDateTime;
|
|
55
|
+
updatedAt: IsoDateTime;
|
|
56
|
+
}
|
|
57
|
+
export interface GymRoutineItemInput {
|
|
58
|
+
exerciseId: UUID;
|
|
59
|
+
sets: number;
|
|
60
|
+
reps?: Nullable<number>;
|
|
61
|
+
targetWeightGrams?: Nullable<number>;
|
|
62
|
+
targetSeconds?: Nullable<number>;
|
|
63
|
+
restSeconds?: Nullable<number>;
|
|
64
|
+
note?: Nullable<string>;
|
|
65
|
+
}
|
|
66
|
+
export interface SaveGymRoutineRequest {
|
|
67
|
+
name: string;
|
|
68
|
+
note?: Nullable<string>;
|
|
69
|
+
items: GymRoutineItemInput[];
|
|
70
|
+
}
|
|
71
|
+
export interface AssignGymRoutineRequest {
|
|
72
|
+
memberId: UUID;
|
|
73
|
+
}
|
|
74
|
+
export interface GymWorkoutSetInput {
|
|
75
|
+
exerciseId: UUID;
|
|
76
|
+
reps?: Nullable<number>;
|
|
77
|
+
weightGrams?: Nullable<number>;
|
|
78
|
+
durationSeconds?: Nullable<number>;
|
|
79
|
+
distanceMeters?: Nullable<number>;
|
|
80
|
+
isWarmup?: boolean;
|
|
81
|
+
}
|
|
82
|
+
/** Written on the phone and sent whole when it ends. The id is made there and is the idempotency key. */
|
|
83
|
+
export interface SaveGymWorkoutRequest {
|
|
84
|
+
id: UUID;
|
|
85
|
+
title: string;
|
|
86
|
+
routineId?: Nullable<UUID>;
|
|
87
|
+
startedAt: IsoDateTime;
|
|
88
|
+
finishedAt: IsoDateTime;
|
|
89
|
+
note?: Nullable<string>;
|
|
90
|
+
sets: GymWorkoutSetInput[];
|
|
91
|
+
}
|
|
92
|
+
export interface GymWorkoutSet {
|
|
93
|
+
exerciseId: UUID;
|
|
94
|
+
exerciseName: LocalizedText;
|
|
95
|
+
measure: GymExerciseMeasure;
|
|
96
|
+
position: number;
|
|
97
|
+
reps: Nullable<number>;
|
|
98
|
+
weightGrams: Nullable<number>;
|
|
99
|
+
durationSeconds: Nullable<number>;
|
|
100
|
+
distanceMeters: Nullable<number>;
|
|
101
|
+
isWarmup: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface GymPersonalRecord {
|
|
104
|
+
exerciseId: UUID;
|
|
105
|
+
exerciseName: LocalizedText;
|
|
106
|
+
kind: GymRecordKind;
|
|
107
|
+
/** Grams, repetitions, seconds or metres, as `kind` says. */
|
|
108
|
+
value: number;
|
|
109
|
+
achievedAt: IsoDateTime;
|
|
110
|
+
workoutId: UUID;
|
|
111
|
+
}
|
|
112
|
+
export interface GymWorkoutSummary {
|
|
113
|
+
id: UUID;
|
|
114
|
+
title: string;
|
|
115
|
+
startedAt: IsoDateTime;
|
|
116
|
+
finishedAt: IsoDateTime;
|
|
117
|
+
durationSeconds: number;
|
|
118
|
+
exerciseCount: number;
|
|
119
|
+
setCount: number;
|
|
120
|
+
volumeGrams: number;
|
|
121
|
+
}
|
|
122
|
+
export interface GymWorkout extends GymWorkoutSummary {
|
|
123
|
+
routineId: Nullable<UUID>;
|
|
124
|
+
note: Nullable<string>;
|
|
125
|
+
sets: GymWorkoutSet[];
|
|
126
|
+
/** The records this workout set. */
|
|
127
|
+
records: GymPersonalRecord[];
|
|
128
|
+
}
|
|
129
|
+
/** A person's body, so a trainer and the member can read it and the front desk cannot. */
|
|
130
|
+
export interface GymMeasurement {
|
|
131
|
+
id: UUID;
|
|
132
|
+
takenOn: string;
|
|
133
|
+
weightGrams: Nullable<number>;
|
|
134
|
+
bodyFatPercentTenths: Nullable<number>;
|
|
135
|
+
chestMm: Nullable<number>;
|
|
136
|
+
waistMm: Nullable<number>;
|
|
137
|
+
hipsMm: Nullable<number>;
|
|
138
|
+
armMm: Nullable<number>;
|
|
139
|
+
thighMm: Nullable<number>;
|
|
140
|
+
note: Nullable<string>;
|
|
141
|
+
createdAt: IsoDateTime;
|
|
142
|
+
}
|
|
143
|
+
export interface SaveGymMeasurementRequest {
|
|
144
|
+
takenOn: string;
|
|
145
|
+
weightGrams?: Nullable<number>;
|
|
146
|
+
bodyFatPercentTenths?: Nullable<number>;
|
|
147
|
+
chestMm?: Nullable<number>;
|
|
148
|
+
waistMm?: Nullable<number>;
|
|
149
|
+
hipsMm?: Nullable<number>;
|
|
150
|
+
armMm?: Nullable<number>;
|
|
151
|
+
thighMm?: Nullable<number>;
|
|
152
|
+
note?: Nullable<string>;
|
|
153
|
+
}
|
|
154
|
+
export interface GymStreakWeek {
|
|
155
|
+
/** The Monday that begins it. */
|
|
156
|
+
weekStart: string;
|
|
157
|
+
days: number;
|
|
158
|
+
reachedTarget: boolean;
|
|
159
|
+
/** The whole week fell inside a freeze, so it neither counts nor breaks the streak. */
|
|
160
|
+
wasFrozen: boolean;
|
|
161
|
+
}
|
|
162
|
+
/** Weeks in a row a member reached their own target, counting a door visit or a workout once per day. */
|
|
163
|
+
export interface GymStreak {
|
|
164
|
+
currentWeeks: number;
|
|
165
|
+
bestWeeks: number;
|
|
166
|
+
weeklyTarget: number;
|
|
167
|
+
daysThisWeek: number;
|
|
168
|
+
/** The last twelve weeks, oldest first. */
|
|
169
|
+
weeks: GymStreakWeek[];
|
|
170
|
+
}
|
|
171
|
+
export interface SetGymWeeklyTargetRequest {
|
|
172
|
+
weeklyTarget: number;
|
|
173
|
+
}
|
|
174
|
+
export interface GymTrainingSummary {
|
|
175
|
+
streak: GymStreak;
|
|
176
|
+
workoutsThisMonth: number;
|
|
177
|
+
volumeGramsThisMonth: number;
|
|
178
|
+
latestRecords: GymPersonalRecord[];
|
|
179
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { GymSignatureMethod } from './gym-signature-method.enum.js';
|
|
6
|
+
export interface GymWaiver {
|
|
7
|
+
id: UUID;
|
|
8
|
+
version: number;
|
|
9
|
+
body: LocalizedText;
|
|
10
|
+
isCurrent: boolean;
|
|
11
|
+
createdAt: IsoDateTime;
|
|
12
|
+
}
|
|
13
|
+
export interface PublishGymWaiverRequest {
|
|
14
|
+
body: LocalizedText;
|
|
15
|
+
}
|
|
16
|
+
/** A signature keeps the exact words signed, so a later version cannot change what somebody agreed to. */
|
|
17
|
+
export interface GymWaiverSignature {
|
|
18
|
+
id: UUID;
|
|
19
|
+
memberId: UUID;
|
|
20
|
+
waiverId: UUID;
|
|
21
|
+
waiverVersion: number;
|
|
22
|
+
locale: string;
|
|
23
|
+
body: string;
|
|
24
|
+
signedName: string;
|
|
25
|
+
method: GymSignatureMethod;
|
|
26
|
+
recordedByUserId: Nullable<UUID>;
|
|
27
|
+
signedAt: IsoDateTime;
|
|
28
|
+
}
|
|
29
|
+
export interface SignGymWaiverRequest {
|
|
30
|
+
signedName: string;
|
|
31
|
+
locale: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export * from './gym-booking-refusal.enum.js';
|
|
2
|
+
export * from './gym-booking-status.enum.js';
|
|
3
|
+
export * from './gym-branch.type.js';
|
|
4
|
+
export * from './gym-busy-level.enum.js';
|
|
5
|
+
export * from './gym-check-in-outcome.enum.js';
|
|
6
|
+
export * from './gym-check-in-refusal.enum.js';
|
|
7
|
+
export * from './gym-class-access.enum.js';
|
|
8
|
+
export * from './gym-class-level.enum.js';
|
|
9
|
+
export * from './gym-class-type.type.js';
|
|
10
|
+
export * from './gym-common.type.js';
|
|
11
|
+
export * from './gym-door.type.js';
|
|
12
|
+
export * from './gym-duration-unit.enum.js';
|
|
13
|
+
export * from './gym-entry-kind.enum.js';
|
|
14
|
+
export * from './gym-equipment.enum.js';
|
|
15
|
+
export * from './gym-exercise-category.enum.js';
|
|
16
|
+
export * from './gym-exercise-measure.enum.js';
|
|
17
|
+
export * from './gym-gallery.type.js';
|
|
18
|
+
export * from './gym-lead-kind.enum.js';
|
|
19
|
+
export * from './gym-lead-status.enum.js';
|
|
20
|
+
export * from './gym-lead.type.js';
|
|
21
|
+
export * from './gym-me.type.js';
|
|
22
|
+
export * from './gym-member.type.js';
|
|
23
|
+
export * from './gym-membership-status.enum.js';
|
|
24
|
+
export * from './gym-membership.type.js';
|
|
25
|
+
export * from './gym-muscle-group.enum.js';
|
|
26
|
+
export * from './gym-payment-kind.enum.js';
|
|
27
|
+
export * from './gym-payment-method.enum.js';
|
|
28
|
+
export * from './gym-payment.type.js';
|
|
29
|
+
export * from './gym-plan-activation.enum.js';
|
|
30
|
+
export * from './gym-plan.type.js';
|
|
31
|
+
export * from './gym-profile.type.js';
|
|
32
|
+
export * from './gym-promo-code.type.js';
|
|
33
|
+
export * from './gym-public.type.js';
|
|
34
|
+
export * from './gym-record-kind.enum.js';
|
|
35
|
+
export * from './gym-report.type.js';
|
|
36
|
+
export * from './gym-resource-status.enum.js';
|
|
37
|
+
export * from './gym-room.type.js';
|
|
38
|
+
export * from './gym-schedule.type.js';
|
|
39
|
+
export * from './gym-session-kind.enum.js';
|
|
40
|
+
export * from './gym-session-status.enum.js';
|
|
41
|
+
export * from './gym-signature-method.enum.js';
|
|
42
|
+
export * from './gym-staff.type.js';
|
|
43
|
+
export * from './gym-training.type.js';
|
|
44
|
+
export * from './gym-waiver.type.js';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export * from './gym-booking-refusal.enum.js';
|
|
2
|
+
export * from './gym-booking-status.enum.js';
|
|
3
|
+
export * from './gym-branch.type.js';
|
|
4
|
+
export * from './gym-busy-level.enum.js';
|
|
5
|
+
export * from './gym-check-in-outcome.enum.js';
|
|
6
|
+
export * from './gym-check-in-refusal.enum.js';
|
|
7
|
+
export * from './gym-class-access.enum.js';
|
|
8
|
+
export * from './gym-class-level.enum.js';
|
|
9
|
+
export * from './gym-class-type.type.js';
|
|
10
|
+
export * from './gym-common.type.js';
|
|
11
|
+
export * from './gym-door.type.js';
|
|
12
|
+
export * from './gym-duration-unit.enum.js';
|
|
13
|
+
export * from './gym-entry-kind.enum.js';
|
|
14
|
+
export * from './gym-equipment.enum.js';
|
|
15
|
+
export * from './gym-exercise-category.enum.js';
|
|
16
|
+
export * from './gym-exercise-measure.enum.js';
|
|
17
|
+
export * from './gym-gallery.type.js';
|
|
18
|
+
export * from './gym-lead-kind.enum.js';
|
|
19
|
+
export * from './gym-lead-status.enum.js';
|
|
20
|
+
export * from './gym-lead.type.js';
|
|
21
|
+
export * from './gym-me.type.js';
|
|
22
|
+
export * from './gym-member.type.js';
|
|
23
|
+
export * from './gym-membership-status.enum.js';
|
|
24
|
+
export * from './gym-membership.type.js';
|
|
25
|
+
export * from './gym-muscle-group.enum.js';
|
|
26
|
+
export * from './gym-payment-kind.enum.js';
|
|
27
|
+
export * from './gym-payment-method.enum.js';
|
|
28
|
+
export * from './gym-payment.type.js';
|
|
29
|
+
export * from './gym-plan-activation.enum.js';
|
|
30
|
+
export * from './gym-plan.type.js';
|
|
31
|
+
export * from './gym-profile.type.js';
|
|
32
|
+
export * from './gym-promo-code.type.js';
|
|
33
|
+
export * from './gym-public.type.js';
|
|
34
|
+
export * from './gym-record-kind.enum.js';
|
|
35
|
+
export * from './gym-report.type.js';
|
|
36
|
+
export * from './gym-resource-status.enum.js';
|
|
37
|
+
export * from './gym-room.type.js';
|
|
38
|
+
export * from './gym-schedule.type.js';
|
|
39
|
+
export * from './gym-session-kind.enum.js';
|
|
40
|
+
export * from './gym-session-status.enum.js';
|
|
41
|
+
export * from './gym-signature-method.enum.js';
|
|
42
|
+
export * from './gym-staff.type.js';
|
|
43
|
+
export * from './gym-training.type.js';
|
|
44
|
+
export * from './gym-waiver.type.js';
|
|
@@ -31,5 +31,11 @@ export declare enum RealtimeEventType {
|
|
|
31
31
|
*/
|
|
32
32
|
RESTAURANT_BRANCH_UPDATED = "restaurant.branch.updated",
|
|
33
33
|
/** One diner's order moved. */
|
|
34
|
-
RESTAURANT_ORDER_UPDATED = "restaurant.order.updated"
|
|
34
|
+
RESTAURANT_ORDER_UPDATED = "restaurant.order.updated",
|
|
35
|
+
/** A member's conversations changed, so their inbox is stale. */
|
|
36
|
+
SOCIAL_INBOX_UPDATED = "social.inbox.updated",
|
|
37
|
+
/** Something new happened to a member, so their activity list and its count are stale. */
|
|
38
|
+
SOCIAL_ACTIVITY_UPDATED = "social.activity.updated",
|
|
39
|
+
/** Somebody came through a branch's door or a class changed, so staff screens refetch. */
|
|
40
|
+
GYM_BRANCH_UPDATED = "gym.branch.updated"
|
|
35
41
|
}
|
|
@@ -33,4 +33,10 @@ export var RealtimeEventType;
|
|
|
33
33
|
RealtimeEventType["RESTAURANT_BRANCH_UPDATED"] = "restaurant.branch.updated";
|
|
34
34
|
/** One diner's order moved. */
|
|
35
35
|
RealtimeEventType["RESTAURANT_ORDER_UPDATED"] = "restaurant.order.updated";
|
|
36
|
+
/** A member's conversations changed, so their inbox is stale. */
|
|
37
|
+
RealtimeEventType["SOCIAL_INBOX_UPDATED"] = "social.inbox.updated";
|
|
38
|
+
/** Something new happened to a member, so their activity list and its count are stale. */
|
|
39
|
+
RealtimeEventType["SOCIAL_ACTIVITY_UPDATED"] = "social.activity.updated";
|
|
40
|
+
/** Somebody came through a branch's door or a class changed, so staff screens refetch. */
|
|
41
|
+
RealtimeEventType["GYM_BRANCH_UPDATED"] = "gym.branch.updated";
|
|
36
42
|
})(RealtimeEventType || (RealtimeEventType = {}));
|