@iveri/contracts 0.132.0 → 0.134.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
@@ -305,9 +305,13 @@ Conduit's outbox.
305
305
  `localization:render` permissions.
306
306
  - Version `0.100.0` adds `notification:send-any`, the password-reset bodies and Conduit's usage metrics.
307
307
  - Version `0.101.0` adds `UsageHistory`, a company's closed months of a product by metric.
308
+ - Version `0.134.0` adds `delivery:job:create-any`, `delivery:job:read-any` and `delivery:job:operate-any`, so a shop's
309
+ and a restaurant's operator-workspace keys ask for, confirm and follow a courier in the company a request names.
308
310
  - Version `0.131.0` adds `mobility:dispatch:create-any`, `mobility:dispatch:read-any`, `mobility:dispatch:operate-any`,
309
311
  `mobility:worker:read-any` and `mobility:worker:rating:submit-any`, so taxi's and delivery's operator-workspace keys
310
312
  dispatch, observe, release and rate in the company a request names.
313
+ - Version `0.133.0` adds `GymMyProfile.bookingPausedUntil`, `GymMember.bookingPausedUntil` and
314
+ `PublicGym.waitlistCutoffMinutes`, so a member is told before trying that no-shows have paused their booking.
311
315
  - Version `0.132.0` adds `HrRefusal.WITHDRAWN` (`withdrawn`): a decision refused because the claim, letter or time off
312
316
  was taken back before anybody decided it, so a client can tell that apart from `already-decided`.
313
317
  - Version `0.130.0` adds `profile:read-any`, so a product's operator-workspace key reads the public profile
@@ -30,6 +30,11 @@ export interface GymMyProfile {
30
30
  isWaiverSigned: boolean;
31
31
  /** What still has to be signed, or null when nothing does. */
32
32
  waiverToSign: Nullable<GymWaiver>;
33
+ /**
34
+ * Until when booking a class or joining a waitlist is paused after repeated no-shows, or null when it is not.
35
+ * The same rule refuses a booking with `no-show-blocked`; the desk can still book them.
36
+ */
37
+ bookingPausedUntil: Nullable<IsoDateTime>;
33
38
  }
34
39
  export interface JoinGymRequest {
35
40
  firstName: string;
@@ -35,6 +35,8 @@ export interface GymMember extends GymMemberSummary {
35
35
  isEmailConfirmed: boolean;
36
36
  isWaiverSigned: boolean;
37
37
  status: GymResourceStatus;
38
+ /** Until when they cannot book for themselves after repeated no-shows, or null. The desk is not held to it. */
39
+ bookingPausedUntil: Nullable<IsoDateTime>;
38
40
  updatedAt: IsoDateTime;
39
41
  }
40
42
  export interface CreateGymMemberRequest {
@@ -29,6 +29,8 @@ export interface PublicGym {
29
29
  currency: string;
30
30
  bookingHorizonDays: number;
31
31
  cancelCutoffMinutes: number;
32
+ /** Within this many minutes of a class starting, a full class takes nobody onto its waitlist. */
33
+ waitlistCutoffMinutes: number;
32
34
  }
33
35
  export interface PublicGymBranch {
34
36
  id: UUID;
@@ -494,10 +494,28 @@ export declare enum UserPermission {
494
494
  TAXI_RIDE_DRIVE = "taxi:ride:drive",
495
495
  /** Read delivery job and quote data in the caller's tenant; endpoints still check ownership. */
496
496
  DELIVERY_JOB_READ = "delivery:job:read",
497
+ /**
498
+ * Read a delivery job in a company the request names in `tenantId`. A platform permission, held beside
499
+ * `delivery:job:read` only by a product's operator-workspace key, so a shop or a restaurant sold to many companies
500
+ * follows each company's parcel from one key.
501
+ */
502
+ DELIVERY_JOB_READ_ANY = "delivery:job:read-any",
497
503
  /** Create a delivery job and receive its quote. The sender-facing grant. */
498
504
  DELIVERY_JOB_CREATE = "delivery:job:create",
505
+ /**
506
+ * Request and confirm a delivery job in a company the request names in `tenantId`. A platform permission, held
507
+ * beside `delivery:job:create` only by a product's operator-workspace key. The job is filed in, priced by and
508
+ * offered only to the couriers of the company it names, and counted against that company's Delivery licence.
509
+ */
510
+ DELIVERY_JOB_CREATE_ANY = "delivery:job:create-any",
499
511
  /** Confirm or cancel a delivery job; operator actions on another sender's job require this grant. */
500
512
  DELIVERY_JOB_OPERATE = "delivery:job:operate",
513
+ /**
514
+ * Operate a named company's deliveries as that company, with no sender behind the job. A platform permission, held
515
+ * beside `delivery:job:operate` only by a product's operator-workspace key; without it, `delivery:job:operate`
516
+ * does not reach into a company a request names.
517
+ */
518
+ DELIVERY_JOB_OPERATE_ANY = "delivery:job:operate-any",
501
519
  /** Read and advance only jobs assigned to the caller's own courier worker. */
502
520
  DELIVERY_JOB_DELIVER = "delivery:job:deliver",
503
521
  /** Read a clinic's specialties, locations, rooms, devices, treatments and staff. */
@@ -560,10 +560,28 @@ export var UserPermission;
560
560
  // ══ delivery-api ═══════════════════════════════════════════════════════
561
561
  /** Read delivery job and quote data in the caller's tenant; endpoints still check ownership. */
562
562
  UserPermission["DELIVERY_JOB_READ"] = "delivery:job:read";
563
+ /**
564
+ * Read a delivery job in a company the request names in `tenantId`. A platform permission, held beside
565
+ * `delivery:job:read` only by a product's operator-workspace key, so a shop or a restaurant sold to many companies
566
+ * follows each company's parcel from one key.
567
+ */
568
+ UserPermission["DELIVERY_JOB_READ_ANY"] = "delivery:job:read-any";
563
569
  /** Create a delivery job and receive its quote. The sender-facing grant. */
564
570
  UserPermission["DELIVERY_JOB_CREATE"] = "delivery:job:create";
571
+ /**
572
+ * Request and confirm a delivery job in a company the request names in `tenantId`. A platform permission, held
573
+ * beside `delivery:job:create` only by a product's operator-workspace key. The job is filed in, priced by and
574
+ * offered only to the couriers of the company it names, and counted against that company's Delivery licence.
575
+ */
576
+ UserPermission["DELIVERY_JOB_CREATE_ANY"] = "delivery:job:create-any";
565
577
  /** Confirm or cancel a delivery job; operator actions on another sender's job require this grant. */
566
578
  UserPermission["DELIVERY_JOB_OPERATE"] = "delivery:job:operate";
579
+ /**
580
+ * Operate a named company's deliveries as that company, with no sender behind the job. A platform permission, held
581
+ * beside `delivery:job:operate` only by a product's operator-workspace key; without it, `delivery:job:operate`
582
+ * does not reach into a company a request names.
583
+ */
584
+ UserPermission["DELIVERY_JOB_OPERATE_ANY"] = "delivery:job:operate-any";
567
585
  /** Read and advance only jobs assigned to the caller's own courier worker. */
568
586
  UserPermission["DELIVERY_JOB_DELIVER"] = "delivery:job:deliver";
569
587
  // Clinic
@@ -808,6 +826,9 @@ export const PLATFORM_PERMISSIONS = Object.freeze([
808
826
  UserPermission.MOBILITY_DISPATCH_READ_ANY,
809
827
  UserPermission.MOBILITY_DISPATCH_CREATE_ANY,
810
828
  UserPermission.MOBILITY_DISPATCH_OPERATE_ANY,
829
+ UserPermission.DELIVERY_JOB_READ_ANY,
830
+ UserPermission.DELIVERY_JOB_CREATE_ANY,
831
+ UserPermission.DELIVERY_JOB_OPERATE_ANY,
811
832
  ]);
812
833
  /** Whether a permission acts across companies, and so may only be held in Iveri's operator workspace. */
813
834
  export function isPlatformPermission(permission) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.132.0",
3
+ "version": "0.134.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {