@iveri/contracts 0.115.0 → 0.117.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,14 @@
1
+ /**
2
+ * A clinic 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.
4
+ */
5
+ export declare enum ClinicRefusal {
6
+ /** Somebody else holds that time, or the specialist, room or machine is no longer free. */
7
+ TIME_TAKEN = "time-taken",
8
+ /** The visit is checked in, finished or cancelled, so it can no longer be moved. */
9
+ NOT_BOOKED = "not-booked",
10
+ /** Too close to another session of the same treatment; `details.minDaysBetweenSessions` says how far apart. */
11
+ SESSION_GAP = "session-gap",
12
+ /** The chosen specialist does not perform this treatment at this branch. */
13
+ SPECIALIST_INELIGIBLE = "specialist-ineligible"
14
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A clinic 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.
4
+ */
5
+ export var ClinicRefusal;
6
+ (function (ClinicRefusal) {
7
+ /** Somebody else holds that time, or the specialist, room or machine is no longer free. */
8
+ ClinicRefusal["TIME_TAKEN"] = "time-taken";
9
+ /** The visit is checked in, finished or cancelled, so it can no longer be moved. */
10
+ ClinicRefusal["NOT_BOOKED"] = "not-booked";
11
+ /** Too close to another session of the same treatment; `details.minDaysBetweenSessions` says how far apart. */
12
+ ClinicRefusal["SESSION_GAP"] = "session-gap";
13
+ /** The chosen specialist does not perform this treatment at this branch. */
14
+ ClinicRefusal["SPECIALIST_INELIGIBLE"] = "specialist-ineligible";
15
+ })(ClinicRefusal || (ClinicRefusal = {}));
@@ -24,6 +24,7 @@ export * from './clinic-promotion.type.js';
24
24
  export * from './clinic-public.type.js';
25
25
  export * from './clinic-record-access-action.enum.js';
26
26
  export * from './clinic-record-method.enum.js';
27
+ export * from './clinic-refusal.enum.js';
27
28
  export * from './clinic-record.type.js';
28
29
  export * from './clinic-resource-status.enum.js';
29
30
  export * from './clinic-review-status.enum.js';
@@ -24,6 +24,7 @@ export * from './clinic-promotion.type.js';
24
24
  export * from './clinic-public.type.js';
25
25
  export * from './clinic-record-access-action.enum.js';
26
26
  export * from './clinic-record-method.enum.js';
27
+ export * from './clinic-refusal.enum.js';
27
28
  export * from './clinic-record.type.js';
28
29
  export * from './clinic-resource-status.enum.js';
29
30
  export * from './clinic-review-status.enum.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.115.0",
3
+ "version": "0.117.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {