@iveri/contracts 0.133.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,6 +305,8 @@ 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.
@@ -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.133.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": {