@iveri/contracts 0.116.0 → 0.118.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 CHANGED
@@ -8,6 +8,12 @@ entry offers exactly `types` and `default`. The CommonJS build and the `typesVer
8
8
  gone, so a consumer resolves the subpaths under `moduleResolution` `nodenext` or `bundler` — and
9
9
  under Node 26 a CommonJS consumer still loads it, through `require`. See `CHANGELOG.md`.
10
10
 
11
+ Release `0.117.0` adds `RealtimeResourceType.CLINIC_LOCATION` (`clinic.location`) and
12
+ `RealtimeEventType.CLINIC_LOCATION_UPDATED`: one clinic branch's room, which reception's calendar
13
+ follows so a visit booked, moved or settled at the desk next to it shows at once. The event names the
14
+ branch and nothing else. A gateway on an older release refuses the event, so `iveri-realtime` takes
15
+ this release before `clinic-api` publishes it.
16
+
11
17
  Release `0.111.0` adds a gym trainer's time off to `@iveri/contracts/gym`: `GymTrainerTimeOff`, the sessions
12
18
  the trainer still holds inside it (`GymTrainerTimeOffSession`), `CreateGymTrainerTimeOffRequest` and
13
19
  `ListGymTrainerTimeOffQuery`. Additions only.
@@ -0,0 +1,51 @@
1
+ /**
2
+ * A gym refusal a person can act on, sent as `details.reason` so a client says it in the reader's language rather than
3
+ * showing the API's English. Booking a place and the door keep their own enums, `GymBookingRefusal` and
4
+ * `GymCheckInRefusal`; these are the rest, and no value is shared with either.
5
+ */
6
+ export declare enum GymRefusal {
7
+ /** The trainer has time off then. */
8
+ TRAINER_AWAY = "trainer-away",
9
+ /** Outside the trainer's working hours. */
10
+ TRAINER_NOT_WORKING = "trainer-not-working",
11
+ /** The trainer does not take personal sessions booked by members. */
12
+ TRAINER_NO_PERSONAL = "trainer-no-personal",
13
+ /** The trainer or the room already has a session at that time. */
14
+ TIME_TAKEN = "time-taken",
15
+ /** The trainer does not work at that branch. */
16
+ TRAINER_OTHER_BRANCH = "trainer-other-branch",
17
+ /** The session has started, so it, or a place in it, can no longer be given up. */
18
+ SESSION_STARTED = "session-started",
19
+ /** A session cannot be made smaller than the people already booked; `details.bookedCount` says how many. */
20
+ CAPACITY_BELOW_BOOKED = "capacity-below-booked",
21
+ /** The trainer already has time off overlapping those days. */
22
+ TIME_OFF_OVERLAP = "time-off-overlap",
23
+ /** The plan is no longer sold. */
24
+ PLAN_OFF_SALE = "plan-off-sale",
25
+ /** The member already has that plan on those days. */
26
+ PLAN_OVERLAP = "plan-overlap",
27
+ /** The member cannot freeze this membership themselves; the desk can. */
28
+ FREEZE_AT_DESK = "freeze-at-desk",
29
+ /** Only a current or upcoming membership can be frozen. */
30
+ FREEZE_NOT_CURRENT = "freeze-not-current",
31
+ /** More days than the membership has left to freeze; `details.freezeDaysLeft` says how many it has. */
32
+ FREEZE_DAYS_EXCEEDED = "freeze-days-exceeded",
33
+ /** Those days overlap another freeze or a renewal already paid for. */
34
+ FREEZE_OVERLAP = "freeze-overlap",
35
+ /** More than is left of the payment to give back. */
36
+ REFUND_EXCEEDS_PAYMENT = "refund-exceeds-payment",
37
+ /** The branch is closed, so nobody is let in there. */
38
+ BRANCH_CLOSED = "branch-closed",
39
+ /** The same code was scanned a moment ago. */
40
+ JUST_SCANNED = "just-scanned",
41
+ /** The promo code cannot be used. Which rule refused it is not said: a code is not an oracle for its limits. */
42
+ PROMO_INVALID = "promo-invalid",
43
+ /** The member already has an app account, so there is nothing to invite. */
44
+ MEMBER_HAS_ACCOUNT = "member-has-account",
45
+ /** This account already belongs to a member of this gym. */
46
+ ALREADY_A_MEMBER = "already-a-member",
47
+ /** The email confirmation link is too old; a new one is sent from the account. */
48
+ LINK_EXPIRED = "link-expired",
49
+ /** The member has already signed this version of the waiver. */
50
+ WAIVER_SIGNED = "waiver-signed"
51
+ }
@@ -0,0 +1,52 @@
1
+ /**
2
+ * A gym refusal a person can act on, sent as `details.reason` so a client says it in the reader's language rather than
3
+ * showing the API's English. Booking a place and the door keep their own enums, `GymBookingRefusal` and
4
+ * `GymCheckInRefusal`; these are the rest, and no value is shared with either.
5
+ */
6
+ export var GymRefusal;
7
+ (function (GymRefusal) {
8
+ /** The trainer has time off then. */
9
+ GymRefusal["TRAINER_AWAY"] = "trainer-away";
10
+ /** Outside the trainer's working hours. */
11
+ GymRefusal["TRAINER_NOT_WORKING"] = "trainer-not-working";
12
+ /** The trainer does not take personal sessions booked by members. */
13
+ GymRefusal["TRAINER_NO_PERSONAL"] = "trainer-no-personal";
14
+ /** The trainer or the room already has a session at that time. */
15
+ GymRefusal["TIME_TAKEN"] = "time-taken";
16
+ /** The trainer does not work at that branch. */
17
+ GymRefusal["TRAINER_OTHER_BRANCH"] = "trainer-other-branch";
18
+ /** The session has started, so it, or a place in it, can no longer be given up. */
19
+ GymRefusal["SESSION_STARTED"] = "session-started";
20
+ /** A session cannot be made smaller than the people already booked; `details.bookedCount` says how many. */
21
+ GymRefusal["CAPACITY_BELOW_BOOKED"] = "capacity-below-booked";
22
+ /** The trainer already has time off overlapping those days. */
23
+ GymRefusal["TIME_OFF_OVERLAP"] = "time-off-overlap";
24
+ /** The plan is no longer sold. */
25
+ GymRefusal["PLAN_OFF_SALE"] = "plan-off-sale";
26
+ /** The member already has that plan on those days. */
27
+ GymRefusal["PLAN_OVERLAP"] = "plan-overlap";
28
+ /** The member cannot freeze this membership themselves; the desk can. */
29
+ GymRefusal["FREEZE_AT_DESK"] = "freeze-at-desk";
30
+ /** Only a current or upcoming membership can be frozen. */
31
+ GymRefusal["FREEZE_NOT_CURRENT"] = "freeze-not-current";
32
+ /** More days than the membership has left to freeze; `details.freezeDaysLeft` says how many it has. */
33
+ GymRefusal["FREEZE_DAYS_EXCEEDED"] = "freeze-days-exceeded";
34
+ /** Those days overlap another freeze or a renewal already paid for. */
35
+ GymRefusal["FREEZE_OVERLAP"] = "freeze-overlap";
36
+ /** More than is left of the payment to give back. */
37
+ GymRefusal["REFUND_EXCEEDS_PAYMENT"] = "refund-exceeds-payment";
38
+ /** The branch is closed, so nobody is let in there. */
39
+ GymRefusal["BRANCH_CLOSED"] = "branch-closed";
40
+ /** The same code was scanned a moment ago. */
41
+ GymRefusal["JUST_SCANNED"] = "just-scanned";
42
+ /** The promo code cannot be used. Which rule refused it is not said: a code is not an oracle for its limits. */
43
+ GymRefusal["PROMO_INVALID"] = "promo-invalid";
44
+ /** The member already has an app account, so there is nothing to invite. */
45
+ GymRefusal["MEMBER_HAS_ACCOUNT"] = "member-has-account";
46
+ /** This account already belongs to a member of this gym. */
47
+ GymRefusal["ALREADY_A_MEMBER"] = "already-a-member";
48
+ /** The email confirmation link is too old; a new one is sent from the account. */
49
+ GymRefusal["LINK_EXPIRED"] = "link-expired";
50
+ /** The member has already signed this version of the waiver. */
51
+ GymRefusal["WAIVER_SIGNED"] = "waiver-signed";
52
+ })(GymRefusal || (GymRefusal = {}));
@@ -32,6 +32,7 @@ export * from './gym-profile.type.js';
32
32
  export * from './gym-promo-code.type.js';
33
33
  export * from './gym-public.type.js';
34
34
  export * from './gym-record-kind.enum.js';
35
+ export * from './gym-refusal.enum.js';
35
36
  export * from './gym-report.type.js';
36
37
  export * from './gym-resource-status.enum.js';
37
38
  export * from './gym-room.type.js';
@@ -32,6 +32,7 @@ export * from './gym-profile.type.js';
32
32
  export * from './gym-promo-code.type.js';
33
33
  export * from './gym-public.type.js';
34
34
  export * from './gym-record-kind.enum.js';
35
+ export * from './gym-refusal.enum.js';
35
36
  export * from './gym-report.type.js';
36
37
  export * from './gym-resource-status.enum.js';
37
38
  export * from './gym-room.type.js';
@@ -41,5 +41,11 @@ export declare enum RealtimeEventType {
41
41
  * the person they train with opening, so their bookings or sessions refetch. Carried on the
42
42
  * person, while the version is that of whatever moved.
43
43
  */
44
- GYM_PERSON_UPDATED = "gym.person.updated"
44
+ GYM_PERSON_UPDATED = "gym.person.updated",
45
+ /**
46
+ * A visit at a clinic's branch was booked, moved, changed status, had its deposit settle or release it, or had
47
+ * money recorded against it, so reception's calendar for that branch refetches. Carried on the branch (the clinic
48
+ * calls it a location), while the version is that of whatever moved.
49
+ */
50
+ CLINIC_LOCATION_UPDATED = "clinic.location.updated"
45
51
  }
@@ -43,4 +43,10 @@ export var RealtimeEventType;
43
43
  * person, while the version is that of whatever moved.
44
44
  */
45
45
  RealtimeEventType["GYM_PERSON_UPDATED"] = "gym.person.updated";
46
+ /**
47
+ * A visit at a clinic's branch was booked, moved, changed status, had its deposit settle or release it, or had
48
+ * money recorded against it, so reception's calendar for that branch refetches. Carried on the branch (the clinic
49
+ * calls it a location), while the version is that of whatever moved.
50
+ */
51
+ RealtimeEventType["CLINIC_LOCATION_UPDATED"] = "clinic.location.updated";
46
52
  })(RealtimeEventType || (RealtimeEventType = {}));
@@ -22,5 +22,10 @@ export declare enum RealtimeResourceType {
22
22
  * subscribe to themselves, the one thing they can name before a conversation with their trainer
23
23
  * or member exists, and the events on it say what of their own became stale.
24
24
  */
25
- GYM_PERSON = "gym.person"
25
+ GYM_PERSON = "gym.person",
26
+ /**
27
+ * One branch of a clinic, which `clinic-api` calls a location. Reception follows it while its calendar is open, and
28
+ * the events on it name the branch and nothing about who is booked or when.
29
+ */
30
+ CLINIC_LOCATION = "clinic.location"
26
31
  }
@@ -24,4 +24,9 @@ export var RealtimeResourceType;
24
24
  * or member exists, and the events on it say what of their own became stale.
25
25
  */
26
26
  RealtimeResourceType["GYM_PERSON"] = "gym.person";
27
+ /**
28
+ * One branch of a clinic, which `clinic-api` calls a location. Reception follows it while its calendar is open, and
29
+ * the events on it name the branch and nothing about who is booked or when.
30
+ */
31
+ RealtimeResourceType["CLINIC_LOCATION"] = "clinic.location";
27
32
  })(RealtimeResourceType || (RealtimeResourceType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.116.0",
3
+ "version": "0.118.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {