@iveri/contracts 0.53.0 → 0.55.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.
Files changed (119) hide show
  1. package/dist/api/gym/gym-booking-refusal.enum.d.ts +14 -0
  2. package/dist/api/gym/gym-booking-refusal.enum.js +15 -0
  3. package/dist/api/gym/gym-booking-status.enum.d.ts +9 -0
  4. package/dist/api/gym/gym-booking-status.enum.js +10 -0
  5. package/dist/api/gym/gym-branch.type.d.ts +47 -0
  6. package/dist/api/gym/gym-branch.type.js +1 -0
  7. package/dist/api/gym/gym-busy-level.enum.d.ts +5 -0
  8. package/dist/api/gym/gym-busy-level.enum.js +6 -0
  9. package/dist/api/gym/gym-check-in-outcome.enum.d.ts +6 -0
  10. package/dist/api/gym/gym-check-in-outcome.enum.js +7 -0
  11. package/dist/api/gym/gym-check-in-refusal.enum.d.ts +12 -0
  12. package/dist/api/gym/gym-check-in-refusal.enum.js +13 -0
  13. package/dist/api/gym/gym-class-access.enum.d.ts +6 -0
  14. package/dist/api/gym/gym-class-access.enum.js +7 -0
  15. package/dist/api/gym/gym-class-level.enum.d.ts +6 -0
  16. package/dist/api/gym/gym-class-level.enum.js +7 -0
  17. package/dist/api/gym/gym-class-type.type.d.ts +35 -0
  18. package/dist/api/gym/gym-class-type.type.js +1 -0
  19. package/dist/api/gym/gym-common.type.d.ts +14 -0
  20. package/dist/api/gym/gym-common.type.js +1 -0
  21. package/dist/api/gym/gym-door.type.d.ts +65 -0
  22. package/dist/api/gym/gym-door.type.js +1 -0
  23. package/dist/api/gym/gym-duration-unit.enum.d.ts +4 -0
  24. package/dist/api/gym/gym-duration-unit.enum.js +5 -0
  25. package/dist/api/gym/gym-entry-kind.enum.d.ts +6 -0
  26. package/dist/api/gym/gym-entry-kind.enum.js +7 -0
  27. package/dist/api/gym/gym-equipment.enum.d.ts +11 -0
  28. package/dist/api/gym/gym-equipment.enum.js +12 -0
  29. package/dist/api/gym/gym-exercise-category.enum.d.ts +5 -0
  30. package/dist/api/gym/gym-exercise-category.enum.js +6 -0
  31. package/dist/api/gym/gym-exercise-measure.enum.d.ts +7 -0
  32. package/dist/api/gym/gym-exercise-measure.enum.js +8 -0
  33. package/dist/api/gym/gym-gallery.type.d.ts +17 -0
  34. package/dist/api/gym/gym-gallery.type.js +1 -0
  35. package/dist/api/gym/gym-lead-kind.enum.d.ts +5 -0
  36. package/dist/api/gym/gym-lead-kind.enum.js +6 -0
  37. package/dist/api/gym/gym-lead-status.enum.d.ts +7 -0
  38. package/dist/api/gym/gym-lead-status.enum.js +8 -0
  39. package/dist/api/gym/gym-lead.type.d.ts +32 -0
  40. package/dist/api/gym/gym-lead.type.js +1 -0
  41. package/dist/api/gym/gym-me.type.d.ts +115 -0
  42. package/dist/api/gym/gym-me.type.js +1 -0
  43. package/dist/api/gym/gym-member.type.d.ts +55 -0
  44. package/dist/api/gym/gym-member.type.js +1 -0
  45. package/dist/api/gym/gym-membership-status.enum.d.ts +14 -0
  46. package/dist/api/gym/gym-membership-status.enum.js +15 -0
  47. package/dist/api/gym/gym-membership.type.d.ts +93 -0
  48. package/dist/api/gym/gym-membership.type.js +1 -0
  49. package/dist/api/gym/gym-muscle-group.enum.d.ts +13 -0
  50. package/dist/api/gym/gym-muscle-group.enum.js +14 -0
  51. package/dist/api/gym/gym-payment-kind.enum.d.ts +4 -0
  52. package/dist/api/gym/gym-payment-kind.enum.js +5 -0
  53. package/dist/api/gym/gym-payment-method.enum.d.ts +6 -0
  54. package/dist/api/gym/gym-payment-method.enum.js +7 -0
  55. package/dist/api/gym/gym-payment.type.d.ts +59 -0
  56. package/dist/api/gym/gym-payment.type.js +1 -0
  57. package/dist/api/gym/gym-plan-activation.enum.d.ts +5 -0
  58. package/dist/api/gym/gym-plan-activation.enum.js +6 -0
  59. package/dist/api/gym/gym-plan.type.d.ts +72 -0
  60. package/dist/api/gym/gym-plan.type.js +1 -0
  61. package/dist/api/gym/gym-profile.type.d.ts +65 -0
  62. package/dist/api/gym/gym-profile.type.js +1 -0
  63. package/dist/api/gym/gym-promo-code.type.d.ts +33 -0
  64. package/dist/api/gym/gym-promo-code.type.js +1 -0
  65. package/dist/api/gym/gym-public.type.d.ts +114 -0
  66. package/dist/api/gym/gym-public.type.js +1 -0
  67. package/dist/api/gym/gym-record-kind.enum.d.ts +7 -0
  68. package/dist/api/gym/gym-record-kind.enum.js +8 -0
  69. package/dist/api/gym/gym-report.type.d.ts +73 -0
  70. package/dist/api/gym/gym-report.type.js +1 -0
  71. package/dist/api/gym/gym-resource-status.enum.d.ts +5 -0
  72. package/dist/api/gym/gym-resource-status.enum.js +6 -0
  73. package/dist/api/gym/gym-room.type.d.ts +27 -0
  74. package/dist/api/gym/gym-room.type.js +1 -0
  75. package/dist/api/gym/gym-schedule.type.d.ts +122 -0
  76. package/dist/api/gym/gym-schedule.type.js +1 -0
  77. package/dist/api/gym/gym-session-kind.enum.d.ts +4 -0
  78. package/dist/api/gym/gym-session-kind.enum.js +5 -0
  79. package/dist/api/gym/gym-session-status.enum.d.ts +4 -0
  80. package/dist/api/gym/gym-session-status.enum.js +5 -0
  81. package/dist/api/gym/gym-signature-method.enum.d.ts +4 -0
  82. package/dist/api/gym/gym-signature-method.enum.js +5 -0
  83. package/dist/api/gym/gym-staff.type.d.ts +46 -0
  84. package/dist/api/gym/gym-staff.type.js +1 -0
  85. package/dist/api/gym/gym-training.type.d.ts +179 -0
  86. package/dist/api/gym/gym-training.type.js +1 -0
  87. package/dist/api/gym/gym-waiver.type.d.ts +32 -0
  88. package/dist/api/gym/gym-waiver.type.js +1 -0
  89. package/dist/api/gym/index.d.ts +44 -0
  90. package/dist/api/gym/index.js +44 -0
  91. package/dist/api/hr/hr-access-action.enum.d.ts +7 -0
  92. package/dist/api/hr/hr-access-action.enum.js +8 -0
  93. package/dist/api/hr/hr-employment-event-kind.enum.d.ts +8 -0
  94. package/dist/api/hr/hr-employment-event-kind.enum.js +9 -0
  95. package/dist/api/hr/hr-employment-status.enum.d.ts +13 -0
  96. package/dist/api/hr/hr-employment-status.enum.js +14 -0
  97. package/dist/api/hr/hr-employment-type.enum.d.ts +6 -0
  98. package/dist/api/hr/hr-employment-type.enum.js +7 -0
  99. package/dist/api/hr/hr-leave-accrual.enum.d.ts +7 -0
  100. package/dist/api/hr/hr-leave-accrual.enum.js +8 -0
  101. package/dist/api/hr/hr-leave-ledger-kind.enum.d.ts +9 -0
  102. package/dist/api/hr/hr-leave-ledger-kind.enum.js +10 -0
  103. package/dist/api/hr/hr-leave-request-status.enum.d.ts +6 -0
  104. package/dist/api/hr/hr-leave-request-status.enum.js +7 -0
  105. package/dist/api/hr/hr-pay-period.enum.d.ts +4 -0
  106. package/dist/api/hr/hr-pay-period.enum.js +5 -0
  107. package/dist/api/hr/hr-resource-status.enum.d.ts +5 -0
  108. package/dist/api/hr/hr-resource-status.enum.js +6 -0
  109. package/dist/api/hr/index.d.ts +10 -0
  110. package/dist/api/hr/index.js +10 -0
  111. package/dist/api/hr/localized-text.type.d.ts +7 -0
  112. package/dist/api/hr/localized-text.type.js +1 -0
  113. package/dist/api/realtime/realtime-event-type.enum.d.ts +3 -1
  114. package/dist/api/realtime/realtime-event-type.enum.js +2 -0
  115. package/dist/api/realtime/realtime-resource-type.enum.d.ts +2 -1
  116. package/dist/api/realtime/realtime-resource-type.enum.js +1 -0
  117. package/dist/enum/user-permission.enum.d.ts +87 -1
  118. package/dist/enum/user-permission.enum.js +87 -0
  119. package/package.json +9 -1
@@ -0,0 +1,14 @@
1
+ /** Why somebody cannot have a place. Sent as `details.reason` so a client can say it in the member's language. */
2
+ export declare enum GymBookingRefusal {
3
+ NO_MEMBERSHIP = "no-membership",
4
+ NO_CLASS_ACCESS = "no-class-access",
5
+ NO_CREDITS = "no-credits",
6
+ WRONG_BRANCH = "wrong-branch",
7
+ ALREADY_BOOKED = "already-booked",
8
+ BOOKING_CLOSED = "booking-closed",
9
+ TOO_FAR_AHEAD = "too-far-ahead",
10
+ BOOKING_LIMIT = "booking-limit",
11
+ NO_SHOW_BLOCKED = "no-show-blocked",
12
+ SESSION_CANCELLED = "session-cancelled",
13
+ FULL = "full"
14
+ }
@@ -0,0 +1,15 @@
1
+ /** Why somebody cannot have a place. Sent as `details.reason` so a client can say it in the member's language. */
2
+ export var GymBookingRefusal;
3
+ (function (GymBookingRefusal) {
4
+ GymBookingRefusal["NO_MEMBERSHIP"] = "no-membership";
5
+ GymBookingRefusal["NO_CLASS_ACCESS"] = "no-class-access";
6
+ GymBookingRefusal["NO_CREDITS"] = "no-credits";
7
+ GymBookingRefusal["WRONG_BRANCH"] = "wrong-branch";
8
+ GymBookingRefusal["ALREADY_BOOKED"] = "already-booked";
9
+ GymBookingRefusal["BOOKING_CLOSED"] = "booking-closed";
10
+ GymBookingRefusal["TOO_FAR_AHEAD"] = "too-far-ahead";
11
+ GymBookingRefusal["BOOKING_LIMIT"] = "booking-limit";
12
+ GymBookingRefusal["NO_SHOW_BLOCKED"] = "no-show-blocked";
13
+ GymBookingRefusal["SESSION_CANCELLED"] = "session-cancelled";
14
+ GymBookingRefusal["FULL"] = "full";
15
+ })(GymBookingRefusal || (GymBookingRefusal = {}));
@@ -0,0 +1,9 @@
1
+ export declare enum GymBookingStatus {
2
+ CONFIRMED = "confirmed",
3
+ WAITLISTED = "waitlisted",
4
+ ATTENDED = "attended",
5
+ NO_SHOW = "no-show",
6
+ CANCELLED = "cancelled",
7
+ /** Cancelled after the cut-off, so what it cost is not returned. */
8
+ LATE_CANCELLED = "late-cancelled"
9
+ }
@@ -0,0 +1,10 @@
1
+ export var GymBookingStatus;
2
+ (function (GymBookingStatus) {
3
+ GymBookingStatus["CONFIRMED"] = "confirmed";
4
+ GymBookingStatus["WAITLISTED"] = "waitlisted";
5
+ GymBookingStatus["ATTENDED"] = "attended";
6
+ GymBookingStatus["NO_SHOW"] = "no-show";
7
+ GymBookingStatus["CANCELLED"] = "cancelled";
8
+ /** Cancelled after the cut-off, so what it cost is not returned. */
9
+ GymBookingStatus["LATE_CANCELLED"] = "late-cancelled";
10
+ })(GymBookingStatus || (GymBookingStatus = {}));
@@ -0,0 +1,47 @@
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 { GymBusyLevel } from './gym-busy-level.enum.js';
6
+ import type { GymMediaImage, GymWeeklyPeriod } from './gym-common.type.js';
7
+ import type { GymResourceStatus } from './gym-resource-status.enum.js';
8
+ export interface GymBranch {
9
+ id: UUID;
10
+ name: LocalizedText;
11
+ city: LocalizedText;
12
+ address: Nullable<string>;
13
+ phone: Nullable<string>;
14
+ /** IANA zone. Every weekly time at this branch is wall-clock time here. */
15
+ timeZone: string;
16
+ latitude: Nullable<number>;
17
+ longitude: Nullable<number>;
18
+ /** How many people the branch takes at once, which "how busy" is measured against. */
19
+ capacity: number;
20
+ openingHours: GymWeeklyPeriod[];
21
+ photo: Nullable<GymMediaImage>;
22
+ status: GymResourceStatus;
23
+ createdAt: IsoDateTime;
24
+ updatedAt: IsoDateTime;
25
+ }
26
+ export interface CreateGymBranchRequest {
27
+ name: LocalizedText;
28
+ city: LocalizedText;
29
+ address?: Nullable<string>;
30
+ phone?: Nullable<string>;
31
+ timeZone: string;
32
+ latitude?: Nullable<number>;
33
+ longitude?: Nullable<number>;
34
+ capacity: number;
35
+ openingHours: GymWeeklyPeriod[];
36
+ photo?: Nullable<GymMediaImage>;
37
+ }
38
+ export type UpdateGymBranchRequest = Partial<CreateGymBranchRequest> & {
39
+ status?: GymResourceStatus;
40
+ };
41
+ /** How full a branch is right now. An estimate, because people rarely check out. */
42
+ export interface GymBranchOccupancy {
43
+ branchId: UUID;
44
+ people: number;
45
+ capacity: number;
46
+ level: GymBusyLevel;
47
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare enum GymBusyLevel {
2
+ QUIET = "quiet",
3
+ MODERATE = "moderate",
4
+ BUSY = "busy"
5
+ }
@@ -0,0 +1,6 @@
1
+ export var GymBusyLevel;
2
+ (function (GymBusyLevel) {
3
+ GymBusyLevel["QUIET"] = "quiet";
4
+ GymBusyLevel["MODERATE"] = "moderate";
5
+ GymBusyLevel["BUSY"] = "busy";
6
+ })(GymBusyLevel || (GymBusyLevel = {}));
@@ -0,0 +1,6 @@
1
+ export declare enum GymCheckInOutcome {
2
+ ADMITTED = "admitted",
3
+ REFUSED = "refused",
4
+ /** Refused by the rules and let in by somebody who said why. */
5
+ OVERRIDDEN = "overridden"
6
+ }
@@ -0,0 +1,7 @@
1
+ export var GymCheckInOutcome;
2
+ (function (GymCheckInOutcome) {
3
+ GymCheckInOutcome["ADMITTED"] = "admitted";
4
+ GymCheckInOutcome["REFUSED"] = "refused";
5
+ /** Refused by the rules and let in by somebody who said why. */
6
+ GymCheckInOutcome["OVERRIDDEN"] = "overridden";
7
+ })(GymCheckInOutcome || (GymCheckInOutcome = {}));
@@ -0,0 +1,12 @@
1
+ /** Why the door said no. The screen names it, because a person is standing there. */
2
+ export declare enum GymCheckInRefusal {
3
+ INVALID_CODE = "invalid-code",
4
+ NO_MEMBERSHIP = "no-membership",
5
+ AWAITING_PAYMENT = "awaiting-payment",
6
+ NOT_STARTED = "not-started",
7
+ EXPIRED = "expired",
8
+ FROZEN = "frozen",
9
+ NO_VISITS_LEFT = "no-visits-left",
10
+ OUTSIDE_HOURS = "outside-hours",
11
+ WRONG_BRANCH = "wrong-branch"
12
+ }
@@ -0,0 +1,13 @@
1
+ /** Why the door said no. The screen names it, because a person is standing there. */
2
+ export var GymCheckInRefusal;
3
+ (function (GymCheckInRefusal) {
4
+ GymCheckInRefusal["INVALID_CODE"] = "invalid-code";
5
+ GymCheckInRefusal["NO_MEMBERSHIP"] = "no-membership";
6
+ GymCheckInRefusal["AWAITING_PAYMENT"] = "awaiting-payment";
7
+ GymCheckInRefusal["NOT_STARTED"] = "not-started";
8
+ GymCheckInRefusal["EXPIRED"] = "expired";
9
+ GymCheckInRefusal["FROZEN"] = "frozen";
10
+ GymCheckInRefusal["NO_VISITS_LEFT"] = "no-visits-left";
11
+ GymCheckInRefusal["OUTSIDE_HOURS"] = "outside-hours";
12
+ GymCheckInRefusal["WRONG_BRANCH"] = "wrong-branch";
13
+ })(GymCheckInRefusal || (GymCheckInRefusal = {}));
@@ -0,0 +1,6 @@
1
+ /** What a plan gives in the timetable. */
2
+ export declare enum GymClassAccess {
3
+ NONE = "none",
4
+ UNLIMITED = "unlimited",
5
+ CREDITS = "credits"
6
+ }
@@ -0,0 +1,7 @@
1
+ /** What a plan gives in the timetable. */
2
+ export var GymClassAccess;
3
+ (function (GymClassAccess) {
4
+ GymClassAccess["NONE"] = "none";
5
+ GymClassAccess["UNLIMITED"] = "unlimited";
6
+ GymClassAccess["CREDITS"] = "credits";
7
+ })(GymClassAccess || (GymClassAccess = {}));
@@ -0,0 +1,6 @@
1
+ export declare enum GymClassLevel {
2
+ ALL = "all",
3
+ BEGINNER = "beginner",
4
+ INTERMEDIATE = "intermediate",
5
+ ADVANCED = "advanced"
6
+ }
@@ -0,0 +1,7 @@
1
+ export var GymClassLevel;
2
+ (function (GymClassLevel) {
3
+ GymClassLevel["ALL"] = "all";
4
+ GymClassLevel["BEGINNER"] = "beginner";
5
+ GymClassLevel["INTERMEDIATE"] = "intermediate";
6
+ GymClassLevel["ADVANCED"] = "advanced";
7
+ })(GymClassLevel || (GymClassLevel = {}));
@@ -0,0 +1,35 @@
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 { GymClassLevel } from './gym-class-level.enum.js';
6
+ import type { GymMediaImage } from './gym-common.type.js';
7
+ import type { GymResourceStatus } from './gym-resource-status.enum.js';
8
+ export interface GymClassType {
9
+ id: UUID;
10
+ slug: string;
11
+ name: LocalizedText;
12
+ description: Nullable<LocalizedText>;
13
+ level: GymClassLevel;
14
+ durationMinutes: number;
15
+ defaultCapacity: number;
16
+ /** A `#rrggbb` colour for the timetable, chosen by the gym. */
17
+ color: Nullable<string>;
18
+ image: Nullable<GymMediaImage>;
19
+ status: GymResourceStatus;
20
+ createdAt: IsoDateTime;
21
+ updatedAt: IsoDateTime;
22
+ }
23
+ export interface CreateGymClassTypeRequest {
24
+ slug: string;
25
+ name: LocalizedText;
26
+ description?: Nullable<LocalizedText>;
27
+ level?: GymClassLevel;
28
+ durationMinutes: number;
29
+ defaultCapacity: number;
30
+ color?: Nullable<string>;
31
+ image?: Nullable<GymMediaImage>;
32
+ }
33
+ export type UpdateGymClassTypeRequest = Partial<CreateGymClassTypeRequest> & {
34
+ status?: GymResourceStatus;
35
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ /** One picture, as a browser fetches it. */
2
+ export interface GymMediaImage {
3
+ url: string;
4
+ thumbnailUrl: string;
5
+ }
6
+ /** A stretch of one weekday, in the branch's own wall-clock time. */
7
+ export interface GymWeeklyPeriod {
8
+ /** ISO weekday: 1 is Monday and 7 is Sunday. */
9
+ dayOfWeek: number;
10
+ /** 24-hour `HH:mm`. */
11
+ startTime: string;
12
+ /** 24-hour `HH:mm`, later than `startTime`. */
13
+ endTime: string;
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,65 @@
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 { GymCheckInOutcome } from './gym-check-in-outcome.enum.js';
6
+ import type { GymCheckInRefusal } from './gym-check-in-refusal.enum.js';
7
+ import type { GymMediaImage } from './gym-common.type.js';
8
+ import type { GymMembershipStatus } from './gym-membership-status.enum.js';
9
+ export interface GymDoorRequest {
10
+ branchId: UUID;
11
+ /** What the scanner read. Exactly one of this and `memberId`. */
12
+ code?: string;
13
+ memberId?: UUID;
14
+ /** Lets somebody in whom the rules refused. Needs its own permission and is recorded. */
15
+ overrideReason?: string;
16
+ }
17
+ export interface GymDoorMember {
18
+ id: UUID;
19
+ memberCode: string;
20
+ displayName: string;
21
+ photo: Nullable<GymMediaImage>;
22
+ isBirthdayToday: boolean;
23
+ isWaiverSigned: boolean;
24
+ note: Nullable<string>;
25
+ }
26
+ export interface GymDoorMembership {
27
+ id: UUID;
28
+ name: LocalizedText;
29
+ status: GymMembershipStatus;
30
+ endsOn: Nullable<string>;
31
+ visitsLeft: Nullable<number>;
32
+ classCreditsLeft: Nullable<number>;
33
+ owingMinor: number;
34
+ currency: string;
35
+ }
36
+ export interface GymDoorBooking {
37
+ bookingId: UUID;
38
+ sessionId: UUID;
39
+ className: LocalizedText;
40
+ startsAt: IsoDateTime;
41
+ roomName: Nullable<LocalizedText>;
42
+ }
43
+ export interface GymDoorDecision {
44
+ checkInId: UUID;
45
+ outcome: GymCheckInOutcome;
46
+ refusal: Nullable<GymCheckInRefusal>;
47
+ /** The same person was scanned moments ago, and this is that entry. */
48
+ isDuplicate: boolean;
49
+ at: IsoDateTime;
50
+ member: Nullable<GymDoorMember>;
51
+ membership: Nullable<GymDoorMembership>;
52
+ upcomingBooking: Nullable<GymDoorBooking>;
53
+ }
54
+ export interface GymCheckIn {
55
+ id: UUID;
56
+ branchId: UUID;
57
+ memberId: Nullable<UUID>;
58
+ memberName: Nullable<string>;
59
+ memberPhoto: Nullable<GymMediaImage>;
60
+ membershipName: Nullable<LocalizedText>;
61
+ outcome: GymCheckInOutcome;
62
+ refusal: Nullable<GymCheckInRefusal>;
63
+ overrideReason: Nullable<string>;
64
+ createdAt: IsoDateTime;
65
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare enum GymDurationUnit {
2
+ DAY = "day",
3
+ MONTH = "month"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var GymDurationUnit;
2
+ (function (GymDurationUnit) {
3
+ GymDurationUnit["DAY"] = "day";
4
+ GymDurationUnit["MONTH"] = "month";
5
+ })(GymDurationUnit || (GymDurationUnit = {}));
@@ -0,0 +1,6 @@
1
+ /** What a plan gives at the door. */
2
+ export declare enum GymEntryKind {
3
+ UNLIMITED = "unlimited",
4
+ VISITS = "visits",
5
+ NONE = "none"
6
+ }
@@ -0,0 +1,7 @@
1
+ /** What a plan gives at the door. */
2
+ export var GymEntryKind;
3
+ (function (GymEntryKind) {
4
+ GymEntryKind["UNLIMITED"] = "unlimited";
5
+ GymEntryKind["VISITS"] = "visits";
6
+ GymEntryKind["NONE"] = "none";
7
+ })(GymEntryKind || (GymEntryKind = {}));
@@ -0,0 +1,11 @@
1
+ export declare enum GymEquipment {
2
+ BARBELL = "barbell",
3
+ DUMBBELL = "dumbbell",
4
+ MACHINE = "machine",
5
+ CABLE = "cable",
6
+ KETTLEBELL = "kettlebell",
7
+ BODYWEIGHT = "bodyweight",
8
+ BAND = "band",
9
+ CARDIO_MACHINE = "cardio-machine",
10
+ OTHER = "other"
11
+ }
@@ -0,0 +1,12 @@
1
+ export var GymEquipment;
2
+ (function (GymEquipment) {
3
+ GymEquipment["BARBELL"] = "barbell";
4
+ GymEquipment["DUMBBELL"] = "dumbbell";
5
+ GymEquipment["MACHINE"] = "machine";
6
+ GymEquipment["CABLE"] = "cable";
7
+ GymEquipment["KETTLEBELL"] = "kettlebell";
8
+ GymEquipment["BODYWEIGHT"] = "bodyweight";
9
+ GymEquipment["BAND"] = "band";
10
+ GymEquipment["CARDIO_MACHINE"] = "cardio-machine";
11
+ GymEquipment["OTHER"] = "other";
12
+ })(GymEquipment || (GymEquipment = {}));
@@ -0,0 +1,5 @@
1
+ export declare enum GymExerciseCategory {
2
+ STRENGTH = "strength",
3
+ CARDIO = "cardio",
4
+ MOBILITY = "mobility"
5
+ }
@@ -0,0 +1,6 @@
1
+ export var GymExerciseCategory;
2
+ (function (GymExerciseCategory) {
3
+ GymExerciseCategory["STRENGTH"] = "strength";
4
+ GymExerciseCategory["CARDIO"] = "cardio";
5
+ GymExerciseCategory["MOBILITY"] = "mobility";
6
+ })(GymExerciseCategory || (GymExerciseCategory = {}));
@@ -0,0 +1,7 @@
1
+ /** What a set of this exercise records, which decides the fields a workout asks for. */
2
+ export declare enum GymExerciseMeasure {
3
+ WEIGHT_REPS = "weight-reps",
4
+ REPS = "reps",
5
+ DURATION = "duration",
6
+ DISTANCE = "distance"
7
+ }
@@ -0,0 +1,8 @@
1
+ /** What a set of this exercise records, which decides the fields a workout asks for. */
2
+ export var GymExerciseMeasure;
3
+ (function (GymExerciseMeasure) {
4
+ GymExerciseMeasure["WEIGHT_REPS"] = "weight-reps";
5
+ GymExerciseMeasure["REPS"] = "reps";
6
+ GymExerciseMeasure["DURATION"] = "duration";
7
+ GymExerciseMeasure["DISTANCE"] = "distance";
8
+ })(GymExerciseMeasure || (GymExerciseMeasure = {}));
@@ -0,0 +1,17 @@
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 } from './gym-common.type.js';
6
+ export interface GymGalleryItem {
7
+ id: UUID;
8
+ image: GymMediaImage;
9
+ caption: Nullable<LocalizedText>;
10
+ sortOrder: number;
11
+ createdAt: IsoDateTime;
12
+ }
13
+ export interface CreateGymGalleryItemRequest {
14
+ image: GymMediaImage;
15
+ caption?: Nullable<LocalizedText>;
16
+ sortOrder?: number;
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare enum GymLeadKind {
2
+ TRIAL = "trial",
3
+ QUESTION = "question",
4
+ CALLBACK = "callback"
5
+ }
@@ -0,0 +1,6 @@
1
+ export var GymLeadKind;
2
+ (function (GymLeadKind) {
3
+ GymLeadKind["TRIAL"] = "trial";
4
+ GymLeadKind["QUESTION"] = "question";
5
+ GymLeadKind["CALLBACK"] = "callback";
6
+ })(GymLeadKind || (GymLeadKind = {}));
@@ -0,0 +1,7 @@
1
+ export declare enum GymLeadStatus {
2
+ NEW = "new",
3
+ CONTACTED = "contacted",
4
+ TRIAL_BOOKED = "trial-booked",
5
+ JOINED = "joined",
6
+ LOST = "lost"
7
+ }
@@ -0,0 +1,8 @@
1
+ export var GymLeadStatus;
2
+ (function (GymLeadStatus) {
3
+ GymLeadStatus["NEW"] = "new";
4
+ GymLeadStatus["CONTACTED"] = "contacted";
5
+ GymLeadStatus["TRIAL_BOOKED"] = "trial-booked";
6
+ GymLeadStatus["JOINED"] = "joined";
7
+ GymLeadStatus["LOST"] = "lost";
8
+ })(GymLeadStatus || (GymLeadStatus = {}));
@@ -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 { GymLeadKind } from './gym-lead-kind.enum.js';
5
+ import type { GymLeadStatus } from './gym-lead-status.enum.js';
6
+ /** Somebody who asked. Not a member: nobody has confirmed this person exists. */
7
+ export interface GymLead {
8
+ id: UUID;
9
+ kind: GymLeadKind;
10
+ status: GymLeadStatus;
11
+ name: string;
12
+ phone: string;
13
+ email: Nullable<string>;
14
+ message: Nullable<string>;
15
+ branchId: Nullable<UUID>;
16
+ note: Nullable<string>;
17
+ createdAt: IsoDateTime;
18
+ updatedAt: IsoDateTime;
19
+ }
20
+ export interface CreateGymLeadRequest {
21
+ kind: GymLeadKind;
22
+ name: string;
23
+ phone: string;
24
+ email?: Nullable<string>;
25
+ message?: Nullable<string>;
26
+ branchId?: Nullable<UUID>;
27
+ consentGiven: boolean;
28
+ }
29
+ export interface UpdateGymLeadRequest {
30
+ status?: GymLeadStatus;
31
+ note?: Nullable<string>;
32
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,115 @@
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 { GymMembership, GymMembershipFreeze } from './gym-membership.type.js';
8
+ import type { GymPaymentKind } from './gym-payment-kind.enum.js';
9
+ import type { GymPaymentMethod } from './gym-payment-method.enum.js';
10
+ import type { PublicGymSession } from './gym-public.type.js';
11
+ import type { GymWaiver } from './gym-waiver.type.js';
12
+ /** A member's own record, as they see it. Staff notes and tags are not part of it. */
13
+ export interface GymMyProfile {
14
+ id: UUID;
15
+ memberCode: string;
16
+ firstName: string;
17
+ lastName: string;
18
+ displayName: string;
19
+ email: Nullable<string>;
20
+ isEmailConfirmed: boolean;
21
+ phone: Nullable<string>;
22
+ birthDate: Nullable<string>;
23
+ homeBranchId: UUID;
24
+ photo: Nullable<GymMediaImage>;
25
+ emergencyContactName: Nullable<string>;
26
+ emergencyContactPhone: Nullable<string>;
27
+ weeklyTarget: number;
28
+ isWaiverSigned: boolean;
29
+ /** What still has to be signed, or null when nothing does. */
30
+ waiverToSign: Nullable<GymWaiver>;
31
+ }
32
+ export interface JoinGymRequest {
33
+ firstName: string;
34
+ lastName: string;
35
+ phone?: Nullable<string>;
36
+ birthDate?: Nullable<string>;
37
+ homeBranchId: UUID;
38
+ }
39
+ export interface UpdateGymMyProfileRequest {
40
+ firstName?: string;
41
+ lastName?: string;
42
+ phone?: Nullable<string>;
43
+ birthDate?: Nullable<string>;
44
+ homeBranchId?: UUID;
45
+ emergencyContactName?: Nullable<string>;
46
+ emergencyContactPhone?: Nullable<string>;
47
+ }
48
+ /**
49
+ * What the phone needs to make an entry code with no signal.
50
+ *
51
+ * The key is one member's and is cancelled by issuing another. `serverTime` lets the phone measure
52
+ * how far its own clock is out, so a phone set wrong still produces a code that works.
53
+ */
54
+ export interface GymMyPass {
55
+ memberCode: string;
56
+ passKey: string;
57
+ stepSeconds: number;
58
+ serverTime: IsoDateTime;
59
+ }
60
+ export type GymMyMembership = Omit<GymMembership, 'memberId' | 'memberName' | 'note' | 'promoCode' | 'freezes'> & {
61
+ freezes: GymMembershipFreeze[];
62
+ freezeDaysLeft: number;
63
+ canFreeze: boolean;
64
+ visitsLeft: Nullable<number>;
65
+ classCreditsLeft: Nullable<number>;
66
+ personalSessionsLeft: number;
67
+ };
68
+ export interface BuyGymMembershipRequest {
69
+ planId: UUID;
70
+ startsOn?: string;
71
+ promoCode?: string;
72
+ /** Where the bank sends them afterwards. Refused unless its origin is on this service's list. */
73
+ returnUrl: string;
74
+ }
75
+ export interface GymCheckout {
76
+ membershipId: UUID;
77
+ checkoutUrl: string;
78
+ }
79
+ export interface FreezeMyGymMembershipRequest {
80
+ startsOn: string;
81
+ endsOn: string;
82
+ reason?: Nullable<string>;
83
+ }
84
+ export interface GymMyBooking {
85
+ id: UUID;
86
+ status: GymBookingStatus;
87
+ spotNumber: Nullable<number>;
88
+ waitlistPosition: Nullable<number>;
89
+ session: PublicGymSession;
90
+ canCancel: boolean;
91
+ /** Cancelling now would keep what the booking cost. */
92
+ isLateCancel: boolean;
93
+ }
94
+ export interface GymMyVisit {
95
+ id: UUID;
96
+ branchId: UUID;
97
+ branchName: LocalizedText;
98
+ at: IsoDateTime;
99
+ }
100
+ export interface GymMyPayment {
101
+ id: UUID;
102
+ kind: GymPaymentKind;
103
+ method: GymPaymentMethod;
104
+ amountMinor: number;
105
+ currency: string;
106
+ membershipName: LocalizedText;
107
+ createdAt: IsoDateTime;
108
+ }
109
+ export interface SignMyGymWaiverRequest {
110
+ signedName: string;
111
+ locale: string;
112
+ }
113
+ export interface ConfirmGymEmailRequest {
114
+ token: string;
115
+ }
@@ -0,0 +1 @@
1
+ export {};