@iveri/contracts 0.112.0 → 0.114.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.
@@ -5,6 +5,7 @@ import type { LocalizedText } from '../clinic/localized-text.type.js';
5
5
  import type { GymBookingStatus } from './gym-booking-status.enum.js';
6
6
  import type { GymMediaImage } from './gym-common.type.js';
7
7
  import type { GymResourceStatus } from './gym-resource-status.enum.js';
8
+ import type { GymSessionCancelledBy } from './gym-session-cancelled-by.enum.js';
8
9
  import type { GymSessionKind } from './gym-session-kind.enum.js';
9
10
  import type { GymSessionStatus } from './gym-session-status.enum.js';
10
11
  /** "Tuesdays at 18:00 in Studio 2 with this trainer", in the branch's own wall-clock time. */
@@ -60,7 +61,13 @@ export interface GymSession {
60
61
  bookedCount: number;
61
62
  waitlistCount: number;
62
63
  status: GymSessionStatus;
64
+ /** What a person typed when calling the session off. Null when nobody did, as when its one place was given up. */
63
65
  cancelReason: Nullable<string>;
66
+ /**
67
+ * Who gave up a personal session's one place, which called it off. Null on a session still on and on one the gym
68
+ * called off as a whole, which carries `cancelReason`. Clients translate it; they never match reason text.
69
+ */
70
+ cancelledBy: Nullable<GymSessionCancelledBy>;
64
71
  templateId: Nullable<UUID>;
65
72
  createdAt: IsoDateTime;
66
73
  updatedAt: IsoDateTime;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Who called a personal session off by giving up its one place. A class, or a session the gym called off as a whole,
3
+ * names nobody here: it carries the reason the person typed instead.
4
+ */
5
+ export declare enum GymSessionCancelledBy {
6
+ MEMBER = "member",
7
+ GYM = "gym"
8
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Who called a personal session off by giving up its one place. A class, or a session the gym called off as a whole,
3
+ * names nobody here: it carries the reason the person typed instead.
4
+ */
5
+ export var GymSessionCancelledBy;
6
+ (function (GymSessionCancelledBy) {
7
+ GymSessionCancelledBy["MEMBER"] = "member";
8
+ GymSessionCancelledBy["GYM"] = "gym";
9
+ })(GymSessionCancelledBy || (GymSessionCancelledBy = {}));
@@ -36,6 +36,7 @@ export * from './gym-report.type.js';
36
36
  export * from './gym-resource-status.enum.js';
37
37
  export * from './gym-room.type.js';
38
38
  export * from './gym-schedule.type.js';
39
+ export * from './gym-session-cancelled-by.enum.js';
39
40
  export * from './gym-session-kind.enum.js';
40
41
  export * from './gym-session-status.enum.js';
41
42
  export * from './gym-signature-method.enum.js';
@@ -36,6 +36,7 @@ export * from './gym-report.type.js';
36
36
  export * from './gym-resource-status.enum.js';
37
37
  export * from './gym-room.type.js';
38
38
  export * from './gym-schedule.type.js';
39
+ export * from './gym-session-cancelled-by.enum.js';
39
40
  export * from './gym-session-kind.enum.js';
40
41
  export * from './gym-session-status.enum.js';
41
42
  export * from './gym-signature-method.enum.js';
@@ -150,6 +150,8 @@ export declare enum UserPermission {
150
150
  COMMERCE_ORDER_READ = "commerce:order:read",
151
151
  /** Place an order on a shopper's behalf. Does not permit any catalog change. */
152
152
  COMMERCE_ORDER_CREATE = "commerce:order:create",
153
+ /** Read and change the products a shopper saved, scoped to that shopper by the caller. */
154
+ COMMERCE_SAVED_MANAGE = "commerce:saved:manage",
153
155
  /** Read tenant message and provider-neutral delivery records. */
154
156
  MESSAGING_MESSAGE_READ = "messaging:message:read",
155
157
  /** Submit a paid customer message for delivery. */
@@ -182,6 +182,13 @@ export var UserPermission;
182
182
  UserPermission["COMMERCE_ORDER_READ"] = "commerce:order:read";
183
183
  /** Place an order on a shopper's behalf. Does not permit any catalog change. */
184
184
  UserPermission["COMMERCE_ORDER_CREATE"] = "commerce:order:create";
185
+ // ── Shopper saved products ──────────────────────────────────────────────
186
+ //
187
+ // Its own grant rather than another use of `commerce:order:*`: a saved list is not an order, and
188
+ // that pair was kept narrow on purpose. Only the shopfront's key needs it. **No merchant route
189
+ // reads it**: which shopper saved what is the shopper's, not a marketing list.
190
+ /** Read and change the products a shopper saved, scoped to that shopper by the caller. */
191
+ UserPermission["COMMERCE_SAVED_MANAGE"] = "commerce:saved:manage";
185
192
  // ══ iveri-messaging-api ═════════════════════════════════════════════════
186
193
  /** Read tenant message and provider-neutral delivery records. */
187
194
  UserPermission["MESSAGING_MESSAGE_READ"] = "messaging:message:read";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.112.0",
3
+ "version": "0.114.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {