@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,55 @@
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
+ import type { GymMembershipStatus } from './gym-membership-status.enum.js';
7
+ import type { GymResourceStatus } from './gym-resource-status.enum.js';
8
+ export interface GymMemberSummary {
9
+ id: UUID;
10
+ /** A short number printed on a card and read over the phone. */
11
+ memberCode: string;
12
+ displayName: string;
13
+ email: Nullable<string>;
14
+ phone: Nullable<string>;
15
+ photo: Nullable<GymMediaImage>;
16
+ homeBranchId: UUID;
17
+ hasAccount: boolean;
18
+ /** The membership that counts today, or null when there is none. */
19
+ membershipStatus: Nullable<GymMembershipStatus>;
20
+ membershipName: Nullable<LocalizedText>;
21
+ membershipEndsOn: Nullable<string>;
22
+ owingMinor: number;
23
+ lastVisitAt: Nullable<IsoDateTime>;
24
+ createdAt: IsoDateTime;
25
+ }
26
+ export interface GymMember extends GymMemberSummary {
27
+ firstName: string;
28
+ lastName: string;
29
+ birthDate: Nullable<string>;
30
+ emergencyContactName: Nullable<string>;
31
+ emergencyContactPhone: Nullable<string>;
32
+ note: Nullable<string>;
33
+ tags: string[];
34
+ weeklyTarget: number;
35
+ isEmailConfirmed: boolean;
36
+ isWaiverSigned: boolean;
37
+ status: GymResourceStatus;
38
+ updatedAt: IsoDateTime;
39
+ }
40
+ export interface CreateGymMemberRequest {
41
+ firstName: string;
42
+ lastName: string;
43
+ email?: Nullable<string>;
44
+ phone?: Nullable<string>;
45
+ birthDate?: Nullable<string>;
46
+ homeBranchId: UUID;
47
+ emergencyContactName?: Nullable<string>;
48
+ emergencyContactPhone?: Nullable<string>;
49
+ note?: Nullable<string>;
50
+ tags?: string[];
51
+ photo?: Nullable<GymMediaImage>;
52
+ }
53
+ export type UpdateGymMemberRequest = Partial<CreateGymMemberRequest> & {
54
+ status?: GymResourceStatus;
55
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Where a membership stands today.
3
+ *
4
+ * Only awaiting payment, active and cancelled are decisions anybody made. Upcoming, frozen and
5
+ * expired are read from its dates in the gym's own time zone, at the moment somebody asks.
6
+ */
7
+ export declare enum GymMembershipStatus {
8
+ AWAITING_PAYMENT = "awaiting-payment",
9
+ UPCOMING = "upcoming",
10
+ ACTIVE = "active",
11
+ FROZEN = "frozen",
12
+ EXPIRED = "expired",
13
+ CANCELLED = "cancelled"
14
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Where a membership stands today.
3
+ *
4
+ * Only awaiting payment, active and cancelled are decisions anybody made. Upcoming, frozen and
5
+ * expired are read from its dates in the gym's own time zone, at the moment somebody asks.
6
+ */
7
+ export var GymMembershipStatus;
8
+ (function (GymMembershipStatus) {
9
+ GymMembershipStatus["AWAITING_PAYMENT"] = "awaiting-payment";
10
+ GymMembershipStatus["UPCOMING"] = "upcoming";
11
+ GymMembershipStatus["ACTIVE"] = "active";
12
+ GymMembershipStatus["FROZEN"] = "frozen";
13
+ GymMembershipStatus["EXPIRED"] = "expired";
14
+ GymMembershipStatus["CANCELLED"] = "cancelled";
15
+ })(GymMembershipStatus || (GymMembershipStatus = {}));
@@ -0,0 +1,93 @@
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 { GymClassAccess } from './gym-class-access.enum.js';
6
+ import type { GymWeeklyPeriod } from './gym-common.type.js';
7
+ import type { GymEntryKind } from './gym-entry-kind.enum.js';
8
+ import type { GymMembershipStatus } from './gym-membership-status.enum.js';
9
+ import type { GymPaymentMethod } from './gym-payment-method.enum.js';
10
+ export interface GymMembershipFreeze {
11
+ id: UUID;
12
+ startsOn: string;
13
+ endsOn: string;
14
+ reason: Nullable<string>;
15
+ /** Set when the member came back early and the unused days were returned. */
16
+ endedEarlyOn: Nullable<string>;
17
+ createdAt: IsoDateTime;
18
+ }
19
+ /** A copy of the plan as it was when sold. Changing the plan later does not touch it. */
20
+ export interface GymMembership {
21
+ id: UUID;
22
+ memberId: UUID;
23
+ memberName: string;
24
+ planId: UUID;
25
+ name: LocalizedText;
26
+ status: GymMembershipStatus;
27
+ /** Null until the first visit, on a plan whose clock starts then. */
28
+ startsOn: Nullable<string>;
29
+ endsOn: Nullable<string>;
30
+ branchIds: UUID[];
31
+ accessHours: Nullable<GymWeeklyPeriod[]>;
32
+ entryKind: GymEntryKind;
33
+ entryVisits: Nullable<number>;
34
+ visitsUsed: number;
35
+ classAccess: GymClassAccess;
36
+ classCredits: Nullable<number>;
37
+ classCreditsUsed: number;
38
+ personalSessions: number;
39
+ personalSessionsUsed: number;
40
+ freezeDaysAllowed: number;
41
+ freezeDaysUsed: number;
42
+ memberCanFreeze: boolean;
43
+ freezes: GymMembershipFreeze[];
44
+ currency: string;
45
+ priceMinor: number;
46
+ joiningFeeMinor: number;
47
+ discountMinor: number;
48
+ promoCode: Nullable<string>;
49
+ /** What the member owes in all, after any discount. */
50
+ totalMinor: number;
51
+ paidMinor: number;
52
+ owingMinor: number;
53
+ note: Nullable<string>;
54
+ cancelledAt: Nullable<IsoDateTime>;
55
+ cancelReason: Nullable<string>;
56
+ createdAt: IsoDateTime;
57
+ updatedAt: IsoDateTime;
58
+ }
59
+ export interface SellGymMembershipRequest {
60
+ memberId: UUID;
61
+ planId: UUID;
62
+ /** Calendar date. Absent means today, or the day after the current one of this plan ends. */
63
+ startsOn?: string;
64
+ discountMinor?: number;
65
+ promoCode?: string;
66
+ note?: Nullable<string>;
67
+ /** Money taken at the sale. Absent or part of the price leaves the rest owing. */
68
+ payment?: {
69
+ amountMinor: number;
70
+ method: GymPaymentMethod;
71
+ branchId: UUID;
72
+ };
73
+ }
74
+ export interface FreezeGymMembershipRequest {
75
+ startsOn: string;
76
+ endsOn: string;
77
+ reason?: Nullable<string>;
78
+ }
79
+ export interface EndGymFreezeRequest {
80
+ endsOn: string;
81
+ }
82
+ export interface CancelGymMembershipRequest {
83
+ reason: string;
84
+ }
85
+ /** A membership about to run out, for the people who ring and ask. */
86
+ export interface GymExpiringMembership {
87
+ membershipId: UUID;
88
+ memberId: UUID;
89
+ memberName: string;
90
+ phone: Nullable<string>;
91
+ name: LocalizedText;
92
+ endsOn: string;
93
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ export declare enum GymMuscleGroup {
2
+ CHEST = "chest",
3
+ BACK = "back",
4
+ SHOULDERS = "shoulders",
5
+ BICEPS = "biceps",
6
+ TRICEPS = "triceps",
7
+ CORE = "core",
8
+ GLUTES = "glutes",
9
+ QUADS = "quads",
10
+ HAMSTRINGS = "hamstrings",
11
+ CALVES = "calves",
12
+ FULL_BODY = "full-body"
13
+ }
@@ -0,0 +1,14 @@
1
+ export var GymMuscleGroup;
2
+ (function (GymMuscleGroup) {
3
+ GymMuscleGroup["CHEST"] = "chest";
4
+ GymMuscleGroup["BACK"] = "back";
5
+ GymMuscleGroup["SHOULDERS"] = "shoulders";
6
+ GymMuscleGroup["BICEPS"] = "biceps";
7
+ GymMuscleGroup["TRICEPS"] = "triceps";
8
+ GymMuscleGroup["CORE"] = "core";
9
+ GymMuscleGroup["GLUTES"] = "glutes";
10
+ GymMuscleGroup["QUADS"] = "quads";
11
+ GymMuscleGroup["HAMSTRINGS"] = "hamstrings";
12
+ GymMuscleGroup["CALVES"] = "calves";
13
+ GymMuscleGroup["FULL_BODY"] = "full-body";
14
+ })(GymMuscleGroup || (GymMuscleGroup = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum GymPaymentKind {
2
+ PAYMENT = "payment",
3
+ REFUND = "refund"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var GymPaymentKind;
2
+ (function (GymPaymentKind) {
3
+ GymPaymentKind["PAYMENT"] = "payment";
4
+ GymPaymentKind["REFUND"] = "refund";
5
+ })(GymPaymentKind || (GymPaymentKind = {}));
@@ -0,0 +1,6 @@
1
+ export declare enum GymPaymentMethod {
2
+ CASH = "cash",
3
+ CARD = "card",
4
+ TRANSFER = "transfer",
5
+ ONLINE = "online"
6
+ }
@@ -0,0 +1,7 @@
1
+ export var GymPaymentMethod;
2
+ (function (GymPaymentMethod) {
3
+ GymPaymentMethod["CASH"] = "cash";
4
+ GymPaymentMethod["CARD"] = "card";
5
+ GymPaymentMethod["TRANSFER"] = "transfer";
6
+ GymPaymentMethod["ONLINE"] = "online";
7
+ })(GymPaymentMethod || (GymPaymentMethod = {}));
@@ -0,0 +1,59 @@
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 { GymPaymentKind } from './gym-payment-kind.enum.js';
6
+ import type { GymPaymentMethod } from './gym-payment-method.enum.js';
7
+ /** One line of the ledger. Lines are only ever added, and a refund points at what it returns. */
8
+ export interface GymPayment {
9
+ id: UUID;
10
+ memberId: UUID;
11
+ memberName: string;
12
+ membershipId: UUID;
13
+ membershipName: LocalizedText;
14
+ branchId: Nullable<UUID>;
15
+ kind: GymPaymentKind;
16
+ method: GymPaymentMethod;
17
+ currency: string;
18
+ amountMinor: number;
19
+ /** What has already been given back of this payment. */
20
+ refundedMinor: number;
21
+ refundOfPaymentId: Nullable<UUID>;
22
+ note: Nullable<string>;
23
+ recordedByUserId: Nullable<UUID>;
24
+ createdAt: IsoDateTime;
25
+ }
26
+ export interface RecordGymPaymentRequest {
27
+ membershipId: UUID;
28
+ branchId: UUID;
29
+ amountMinor: number;
30
+ method: GymPaymentMethod;
31
+ note?: Nullable<string>;
32
+ }
33
+ export interface RefundGymPaymentRequest {
34
+ amountMinor: number;
35
+ reason: string;
36
+ }
37
+ export interface GymTakingsLine {
38
+ method: GymPaymentMethod;
39
+ paymentsMinor: number;
40
+ refundsMinor: number;
41
+ netMinor: number;
42
+ }
43
+ /** One branch's money on one day in its own time zone. */
44
+ export interface GymTakingsReport {
45
+ date: string;
46
+ branchId: UUID;
47
+ currency: string;
48
+ lines: GymTakingsLine[];
49
+ totalMinor: number;
50
+ }
51
+ export interface GymOwingMembership {
52
+ membershipId: UUID;
53
+ memberId: UUID;
54
+ memberName: string;
55
+ phone: Nullable<string>;
56
+ name: LocalizedText;
57
+ owingMinor: number;
58
+ currency: string;
59
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ /** When a sold membership's clock starts. */
2
+ export declare enum GymPlanActivation {
3
+ ON_PURCHASE = "on-purchase",
4
+ ON_FIRST_VISIT = "on-first-visit"
5
+ }
@@ -0,0 +1,6 @@
1
+ /** When a sold membership's clock starts. */
2
+ export var GymPlanActivation;
3
+ (function (GymPlanActivation) {
4
+ GymPlanActivation["ON_PURCHASE"] = "on-purchase";
5
+ GymPlanActivation["ON_FIRST_VISIT"] = "on-first-visit";
6
+ })(GymPlanActivation || (GymPlanActivation = {}));
@@ -0,0 +1,72 @@
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 { GymClassAccess } from './gym-class-access.enum.js';
6
+ import type { GymWeeklyPeriod } from './gym-common.type.js';
7
+ import type { GymDurationUnit } from './gym-duration-unit.enum.js';
8
+ import type { GymEntryKind } from './gym-entry-kind.enum.js';
9
+ import type { GymPlanActivation } from './gym-plan-activation.enum.js';
10
+ import type { GymResourceStatus } from './gym-resource-status.enum.js';
11
+ /**
12
+ * Everything a gym sells has this one shape.
13
+ *
14
+ * An unlimited month, a ten-visit card, a class pack, an off-peak pass and a block of personal
15
+ * training differ only in how much of entry, classes and training sessions they include.
16
+ */
17
+ export interface GymPlan {
18
+ id: UUID;
19
+ name: LocalizedText;
20
+ description: Nullable<LocalizedText>;
21
+ entryKind: GymEntryKind;
22
+ /** How many entries a `visits` plan holds. */
23
+ entryVisits: Nullable<number>;
24
+ classAccess: GymClassAccess;
25
+ /** How many classes a `credits` plan holds. */
26
+ classCredits: Nullable<number>;
27
+ personalSessions: number;
28
+ durationUnit: GymDurationUnit;
29
+ durationValue: number;
30
+ priceMinor: number;
31
+ joiningFeeMinor: number;
32
+ currency: string;
33
+ /** Empty means every branch. */
34
+ branchIds: UUID[];
35
+ /** Null means every opening hour. A list is what off-peak is. */
36
+ accessHours: Nullable<GymWeeklyPeriod[]>;
37
+ freezeDaysAllowed: number;
38
+ /** Whether a member may freeze this themselves or has to ask at the desk. */
39
+ memberCanFreeze: boolean;
40
+ activation: GymPlanActivation;
41
+ /** Whether it is on the website and in the app. A staff-only plan can still be sold at the desk. */
42
+ isPublic: boolean;
43
+ isFeatured: boolean;
44
+ sortOrder: number;
45
+ status: GymResourceStatus;
46
+ createdAt: IsoDateTime;
47
+ updatedAt: IsoDateTime;
48
+ }
49
+ export interface CreateGymPlanRequest {
50
+ name: LocalizedText;
51
+ description?: Nullable<LocalizedText>;
52
+ entryKind: GymEntryKind;
53
+ entryVisits?: Nullable<number>;
54
+ classAccess: GymClassAccess;
55
+ classCredits?: Nullable<number>;
56
+ personalSessions?: number;
57
+ durationUnit: GymDurationUnit;
58
+ durationValue: number;
59
+ priceMinor: number;
60
+ joiningFeeMinor?: number;
61
+ branchIds?: UUID[];
62
+ accessHours?: Nullable<GymWeeklyPeriod[]>;
63
+ freezeDaysAllowed?: number;
64
+ memberCanFreeze?: boolean;
65
+ activation?: GymPlanActivation;
66
+ isPublic?: boolean;
67
+ isFeatured?: boolean;
68
+ sortOrder?: number;
69
+ }
70
+ export type UpdateGymPlanRequest = Partial<CreateGymPlanRequest> & {
71
+ status?: GymResourceStatus;
72
+ };
@@ -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 { GymMediaImage } from './gym-common.type.js';
6
+ export interface GymSocialLinks {
7
+ instagram: Nullable<string>;
8
+ facebook: Nullable<string>;
9
+ tiktok: Nullable<string>;
10
+ whatsapp: Nullable<string>;
11
+ }
12
+ /** The rules a gym sets for its own timetable. */
13
+ export interface GymBookingPolicy {
14
+ /** How many days ahead a member can book. */
15
+ bookingHorizonDays: number;
16
+ /** Cancelling later than this before a class keeps what the booking cost. */
17
+ cancelCutoffMinutes: number;
18
+ /** Nobody moves up from a waitlist closer than this to the start. */
19
+ waitlistCutoffMinutes: number;
20
+ /** How many upcoming places one member can hold at once. */
21
+ maxActiveBookings: number;
22
+ /** No-shows in the window that stop somebody booking. 0 means never. */
23
+ noShowLimit: number;
24
+ noShowWindowDays: number;
25
+ noShowBlockDays: number;
26
+ }
27
+ export interface GymProfile {
28
+ id: UUID;
29
+ /** The name its public address and app build use. Unique across every gym. */
30
+ slug: string;
31
+ name: LocalizedText;
32
+ tagline: Nullable<LocalizedText>;
33
+ about: Nullable<LocalizedText>;
34
+ socialLinks: Nullable<GymSocialLinks>;
35
+ phone: Nullable<string>;
36
+ email: Nullable<string>;
37
+ /** The gym's public website, which the links in its emails point at. No path, no trailing slash. */
38
+ siteUrl: Nullable<string>;
39
+ logo: Nullable<GymMediaImage>;
40
+ hero: Nullable<GymMediaImage>;
41
+ /** Nothing about the gym is public until this is true. */
42
+ isPublished: boolean;
43
+ currency: string;
44
+ /** How long a visit is taken to last when estimating how busy a branch is. */
45
+ typicalVisitMinutes: number;
46
+ policy: GymBookingPolicy;
47
+ createdAt: IsoDateTime;
48
+ updatedAt: IsoDateTime;
49
+ }
50
+ export interface UpsertGymProfileRequest {
51
+ slug: string;
52
+ name: LocalizedText;
53
+ tagline?: Nullable<LocalizedText>;
54
+ about?: Nullable<LocalizedText>;
55
+ socialLinks?: Nullable<GymSocialLinks>;
56
+ phone?: Nullable<string>;
57
+ email?: Nullable<string>;
58
+ siteUrl?: Nullable<string>;
59
+ logo?: Nullable<GymMediaImage>;
60
+ hero?: Nullable<GymMediaImage>;
61
+ isPublished?: boolean;
62
+ currency?: string;
63
+ typicalVisitMinutes?: number;
64
+ policy?: Partial<GymBookingPolicy>;
65
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,33 @@
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 { GymResourceStatus } from './gym-resource-status.enum.js';
5
+ export interface GymPromoCode {
6
+ id: UUID;
7
+ /** Upper-case letters and digits, as somebody would type it. */
8
+ code: string;
9
+ discountPercent: number;
10
+ startsOn: string;
11
+ endsOn: string;
12
+ /** Null means no limit. */
13
+ maxRedemptions: Nullable<number>;
14
+ redemptions: number;
15
+ /** Empty means every plan. */
16
+ planIds: UUID[];
17
+ status: GymResourceStatus;
18
+ createdAt: IsoDateTime;
19
+ updatedAt: IsoDateTime;
20
+ }
21
+ export interface CreateGymPromoCodeRequest {
22
+ code: string;
23
+ discountPercent: number;
24
+ startsOn: string;
25
+ endsOn: string;
26
+ maxRedemptions?: Nullable<number>;
27
+ planIds?: UUID[];
28
+ }
29
+ export interface UpdateGymPromoCodeRequest {
30
+ endsOn?: string;
31
+ maxRedemptions?: Nullable<number>;
32
+ status?: GymResourceStatus;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,114 @@
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 { GymClassAccess } from './gym-class-access.enum.js';
7
+ import type { GymClassLevel } from './gym-class-level.enum.js';
8
+ import type { GymMediaImage, GymWeeklyPeriod } from './gym-common.type.js';
9
+ import type { GymDurationUnit } from './gym-duration-unit.enum.js';
10
+ import type { GymEntryKind } from './gym-entry-kind.enum.js';
11
+ import type { GymSocialLinks } from './gym-profile.type.js';
12
+ import type { GymSessionKind } from './gym-session-kind.enum.js';
13
+ /**
14
+ * What anybody on the internet may read.
15
+ *
16
+ * Declared apart from the staff shapes on purpose. A field added to one of those does not reach
17
+ * the public until somebody adds it here too.
18
+ */
19
+ export interface PublicGym {
20
+ slug: string;
21
+ name: LocalizedText;
22
+ tagline: Nullable<LocalizedText>;
23
+ about: Nullable<LocalizedText>;
24
+ socialLinks: Nullable<GymSocialLinks>;
25
+ phone: Nullable<string>;
26
+ email: Nullable<string>;
27
+ logo: Nullable<GymMediaImage>;
28
+ hero: Nullable<GymMediaImage>;
29
+ currency: string;
30
+ bookingHorizonDays: number;
31
+ cancelCutoffMinutes: number;
32
+ }
33
+ export interface PublicGymBranch {
34
+ id: UUID;
35
+ name: LocalizedText;
36
+ city: LocalizedText;
37
+ address: Nullable<string>;
38
+ phone: Nullable<string>;
39
+ timeZone: string;
40
+ latitude: Nullable<number>;
41
+ longitude: Nullable<number>;
42
+ openingHours: GymWeeklyPeriod[];
43
+ photo: Nullable<GymMediaImage>;
44
+ /** Never a head count: that is a claim the door cannot back. */
45
+ busyLevel: GymBusyLevel;
46
+ }
47
+ export interface PublicGymPlan {
48
+ id: UUID;
49
+ name: LocalizedText;
50
+ description: Nullable<LocalizedText>;
51
+ entryKind: GymEntryKind;
52
+ entryVisits: Nullable<number>;
53
+ classAccess: GymClassAccess;
54
+ classCredits: Nullable<number>;
55
+ personalSessions: number;
56
+ durationUnit: GymDurationUnit;
57
+ durationValue: number;
58
+ priceMinor: number;
59
+ joiningFeeMinor: number;
60
+ currency: string;
61
+ branchIds: UUID[];
62
+ accessHours: Nullable<GymWeeklyPeriod[]>;
63
+ freezeDaysAllowed: number;
64
+ isFeatured: boolean;
65
+ }
66
+ export interface PublicGymClassType {
67
+ id: UUID;
68
+ slug: string;
69
+ name: LocalizedText;
70
+ description: Nullable<LocalizedText>;
71
+ level: GymClassLevel;
72
+ durationMinutes: number;
73
+ color: Nullable<string>;
74
+ image: Nullable<GymMediaImage>;
75
+ }
76
+ export interface PublicGymTrainer {
77
+ id: UUID;
78
+ displayName: string;
79
+ title: Nullable<LocalizedText>;
80
+ bio: Nullable<LocalizedText>;
81
+ experienceYears: Nullable<number>;
82
+ photo: Nullable<GymMediaImage>;
83
+ branchIds: UUID[];
84
+ classTypeIds: UUID[];
85
+ offersPersonal: boolean;
86
+ }
87
+ export interface PublicGymSession {
88
+ id: UUID;
89
+ kind: GymSessionKind;
90
+ branchId: UUID;
91
+ roomName: Nullable<LocalizedText>;
92
+ classTypeId: Nullable<UUID>;
93
+ className: Nullable<LocalizedText>;
94
+ color: Nullable<string>;
95
+ trainerId: UUID;
96
+ trainerName: string;
97
+ startsAt: IsoDateTime;
98
+ endsAt: IsoDateTime;
99
+ capacity: number;
100
+ placesLeft: number;
101
+ waitlistCount: number;
102
+ }
103
+ export interface PublicGymGalleryItem {
104
+ id: UUID;
105
+ image: GymMediaImage;
106
+ caption: Nullable<LocalizedText>;
107
+ }
108
+ /** What a promo code takes off a plan, checked before somebody pays. */
109
+ export interface GymPromoQuote {
110
+ code: string;
111
+ discountPercent: number;
112
+ discountMinor: number;
113
+ totalMinor: number;
114
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare enum GymRecordKind {
2
+ HEAVIEST = "heaviest",
3
+ ESTIMATED_ONE_REP = "estimated-one-rep",
4
+ MOST_REPS = "most-reps",
5
+ LONGEST = "longest",
6
+ FURTHEST = "furthest"
7
+ }
@@ -0,0 +1,8 @@
1
+ export var GymRecordKind;
2
+ (function (GymRecordKind) {
3
+ GymRecordKind["HEAVIEST"] = "heaviest";
4
+ GymRecordKind["ESTIMATED_ONE_REP"] = "estimated-one-rep";
5
+ GymRecordKind["MOST_REPS"] = "most-reps";
6
+ GymRecordKind["LONGEST"] = "longest";
7
+ GymRecordKind["FURTHEST"] = "furthest";
8
+ })(GymRecordKind || (GymRecordKind = {}));