@iveri/contracts 0.130.0 → 0.131.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,9 @@ 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.131.0` adds `mobility:dispatch:create-any`, `mobility:dispatch:read-any`, `mobility:dispatch:operate-any`,
|
|
309
|
+
`mobility:worker:read-any` and `mobility:worker:rating:submit-any`, so taxi's and delivery's operator-workspace keys
|
|
310
|
+
dispatch, observe, release and rate in the company a request names.
|
|
308
311
|
- Version `0.130.0` adds `profile:read-any`, so a product's operator-workspace key reads the public profile
|
|
309
312
|
of somebody in the company a request names.
|
|
310
313
|
- Version `0.128.0` adds `CommerceRefusal.ORDER_MOVED_ON` (`order-moved-on`), a stale order or shipment status change.
|
|
@@ -422,6 +422,12 @@ export declare enum UserPermission {
|
|
|
422
422
|
REALTIME_EVENT_PUBLISH_ANY = "realtime:event:publish-any",
|
|
423
423
|
/** Read worker profiles and operational availability inside the caller's tenant. */
|
|
424
424
|
MOBILITY_WORKER_READ = "mobility:worker:read",
|
|
425
|
+
/**
|
|
426
|
+
* Read a worker in a company the request names in `tenantId`, rather than the token's own. A platform permission:
|
|
427
|
+
* held only by a service credential in Iveri's operator workspace, beside `mobility:worker:read`, so a product sold
|
|
428
|
+
* to many companies (taxi, delivery) resolves the driver or courier on each company's ride or job from one key.
|
|
429
|
+
*/
|
|
430
|
+
MOBILITY_WORKER_READ_ANY = "mobility:worker:read-any",
|
|
425
431
|
/** Enrol workers, amend their capabilities, and suspend or reactivate them. */
|
|
426
432
|
MOBILITY_WORKER_MANAGE = "mobility:worker:manage",
|
|
427
433
|
/** Go online or offline. Assignment-owned `busy` cannot be requested through this grant. */
|
|
@@ -437,16 +443,37 @@ export declare enum UserPermission {
|
|
|
437
443
|
* somebody's capabilities and employment.
|
|
438
444
|
*/
|
|
439
445
|
MOBILITY_WORKER_RATING_SUBMIT = "mobility:worker:rating:submit",
|
|
446
|
+
/**
|
|
447
|
+
* Record a rating for an assignment in a company the request names in `tenantId`. A platform permission, held beside
|
|
448
|
+
* `mobility:worker:rating:submit` only by a product's operator-workspace key.
|
|
449
|
+
*/
|
|
450
|
+
MOBILITY_WORKER_RATING_SUBMIT_ANY = "mobility:worker:rating:submit-any",
|
|
440
451
|
/** Read a worker's latest raw coordinate. Separate because location is sensitive operational data. */
|
|
441
452
|
MOBILITY_WORKER_LOCATION_READ = "mobility:worker:location:read",
|
|
442
453
|
/** Submit the caller's own device heartbeat; a worker may never update somebody else's location. */
|
|
443
454
|
MOBILITY_WORKER_LOCATION_UPDATE = "mobility:worker:location:update",
|
|
444
455
|
/** Read dispatch aggregate state and its pickup coordinate inside the caller's tenant. */
|
|
445
456
|
MOBILITY_DISPATCH_READ = "mobility:dispatch:read",
|
|
457
|
+
/**
|
|
458
|
+
* Read a dispatch and its assignment in a company the request names in `tenantId`. A platform permission, held beside
|
|
459
|
+
* `mobility:dispatch:read` only by a product's operator-workspace key.
|
|
460
|
+
*/
|
|
461
|
+
MOBILITY_DISPATCH_READ_ANY = "mobility:dispatch:read-any",
|
|
446
462
|
/** Submit a dispatch request for a vertical-owned ride or delivery job. */
|
|
447
463
|
MOBILITY_DISPATCH_CREATE = "mobility:dispatch:create",
|
|
464
|
+
/**
|
|
465
|
+
* Submit a dispatch into a company the request names in `tenantId`. A platform permission, held beside
|
|
466
|
+
* `mobility:dispatch:create` only by a product's operator-workspace key. The dispatch is filed in, and offered only
|
|
467
|
+
* to the workers of, the company it names.
|
|
468
|
+
*/
|
|
469
|
+
MOBILITY_DISPATCH_CREATE_ANY = "mobility:dispatch:create-any",
|
|
448
470
|
/** Cancel, expire, or manually operate a dispatch; intentionally not granted to ordinary submitters. */
|
|
449
471
|
MOBILITY_DISPATCH_OPERATE = "mobility:dispatch:operate",
|
|
472
|
+
/**
|
|
473
|
+
* Cancel a dispatch or release an assignment in a company the request names in `tenantId`. A platform permission,
|
|
474
|
+
* held beside `mobility:dispatch:operate` only by a product's operator-workspace key.
|
|
475
|
+
*/
|
|
476
|
+
MOBILITY_DISPATCH_OPERATE_ANY = "mobility:dispatch:operate-any",
|
|
450
477
|
/** Read only the dispatch offers addressed to the caller's own worker profile. */
|
|
451
478
|
MOBILITY_DISPATCH_OFFER_READ = "mobility:dispatch-offer:read",
|
|
452
479
|
/** Accept or reject only an offer addressed to the caller's own worker profile. */
|
|
@@ -486,6 +486,12 @@ export var UserPermission;
|
|
|
486
486
|
// ══ iveri-mobility-api ══════════════════════════════════════════════════
|
|
487
487
|
/** Read worker profiles and operational availability inside the caller's tenant. */
|
|
488
488
|
UserPermission["MOBILITY_WORKER_READ"] = "mobility:worker:read";
|
|
489
|
+
/**
|
|
490
|
+
* Read a worker in a company the request names in `tenantId`, rather than the token's own. A platform permission:
|
|
491
|
+
* held only by a service credential in Iveri's operator workspace, beside `mobility:worker:read`, so a product sold
|
|
492
|
+
* to many companies (taxi, delivery) resolves the driver or courier on each company's ride or job from one key.
|
|
493
|
+
*/
|
|
494
|
+
UserPermission["MOBILITY_WORKER_READ_ANY"] = "mobility:worker:read-any";
|
|
489
495
|
/** Enrol workers, amend their capabilities, and suspend or reactivate them. */
|
|
490
496
|
UserPermission["MOBILITY_WORKER_MANAGE"] = "mobility:worker:manage";
|
|
491
497
|
/** Go online or offline. Assignment-owned `busy` cannot be requested through this grant. */
|
|
@@ -501,16 +507,37 @@ export var UserPermission;
|
|
|
501
507
|
* somebody's capabilities and employment.
|
|
502
508
|
*/
|
|
503
509
|
UserPermission["MOBILITY_WORKER_RATING_SUBMIT"] = "mobility:worker:rating:submit";
|
|
510
|
+
/**
|
|
511
|
+
* Record a rating for an assignment in a company the request names in `tenantId`. A platform permission, held beside
|
|
512
|
+
* `mobility:worker:rating:submit` only by a product's operator-workspace key.
|
|
513
|
+
*/
|
|
514
|
+
UserPermission["MOBILITY_WORKER_RATING_SUBMIT_ANY"] = "mobility:worker:rating:submit-any";
|
|
504
515
|
/** Read a worker's latest raw coordinate. Separate because location is sensitive operational data. */
|
|
505
516
|
UserPermission["MOBILITY_WORKER_LOCATION_READ"] = "mobility:worker:location:read";
|
|
506
517
|
/** Submit the caller's own device heartbeat; a worker may never update somebody else's location. */
|
|
507
518
|
UserPermission["MOBILITY_WORKER_LOCATION_UPDATE"] = "mobility:worker:location:update";
|
|
508
519
|
/** Read dispatch aggregate state and its pickup coordinate inside the caller's tenant. */
|
|
509
520
|
UserPermission["MOBILITY_DISPATCH_READ"] = "mobility:dispatch:read";
|
|
521
|
+
/**
|
|
522
|
+
* Read a dispatch and its assignment in a company the request names in `tenantId`. A platform permission, held beside
|
|
523
|
+
* `mobility:dispatch:read` only by a product's operator-workspace key.
|
|
524
|
+
*/
|
|
525
|
+
UserPermission["MOBILITY_DISPATCH_READ_ANY"] = "mobility:dispatch:read-any";
|
|
510
526
|
/** Submit a dispatch request for a vertical-owned ride or delivery job. */
|
|
511
527
|
UserPermission["MOBILITY_DISPATCH_CREATE"] = "mobility:dispatch:create";
|
|
528
|
+
/**
|
|
529
|
+
* Submit a dispatch into a company the request names in `tenantId`. A platform permission, held beside
|
|
530
|
+
* `mobility:dispatch:create` only by a product's operator-workspace key. The dispatch is filed in, and offered only
|
|
531
|
+
* to the workers of, the company it names.
|
|
532
|
+
*/
|
|
533
|
+
UserPermission["MOBILITY_DISPATCH_CREATE_ANY"] = "mobility:dispatch:create-any";
|
|
512
534
|
/** Cancel, expire, or manually operate a dispatch; intentionally not granted to ordinary submitters. */
|
|
513
535
|
UserPermission["MOBILITY_DISPATCH_OPERATE"] = "mobility:dispatch:operate";
|
|
536
|
+
/**
|
|
537
|
+
* Cancel a dispatch or release an assignment in a company the request names in `tenantId`. A platform permission,
|
|
538
|
+
* held beside `mobility:dispatch:operate` only by a product's operator-workspace key.
|
|
539
|
+
*/
|
|
540
|
+
UserPermission["MOBILITY_DISPATCH_OPERATE_ANY"] = "mobility:dispatch:operate-any";
|
|
514
541
|
/** Read only the dispatch offers addressed to the caller's own worker profile. */
|
|
515
542
|
UserPermission["MOBILITY_DISPATCH_OFFER_READ"] = "mobility:dispatch-offer:read";
|
|
516
543
|
/** Accept or reject only an offer addressed to the caller's own worker profile. */
|
|
@@ -776,6 +803,11 @@ export const PLATFORM_PERMISSIONS = Object.freeze([
|
|
|
776
803
|
UserPermission.PROFILE_READ_ANY,
|
|
777
804
|
UserPermission.REALTIME_SUBSCRIPTION_GRANT_ISSUE_ANY,
|
|
778
805
|
UserPermission.REALTIME_EVENT_PUBLISH_ANY,
|
|
806
|
+
UserPermission.MOBILITY_WORKER_READ_ANY,
|
|
807
|
+
UserPermission.MOBILITY_WORKER_RATING_SUBMIT_ANY,
|
|
808
|
+
UserPermission.MOBILITY_DISPATCH_READ_ANY,
|
|
809
|
+
UserPermission.MOBILITY_DISPATCH_CREATE_ANY,
|
|
810
|
+
UserPermission.MOBILITY_DISPATCH_OPERATE_ANY,
|
|
779
811
|
]);
|
|
780
812
|
/** Whether a permission acts across companies, and so may only be held in Iveri's operator workspace. */
|
|
781
813
|
export function isPlatformPermission(permission) {
|