@iveri/contracts 0.36.0 → 0.38.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.
Files changed (33) hide show
  1. package/dist/cjs/api/identity/auth.type.d.ts +52 -0
  2. package/dist/cjs/api/identity/auth.type.d.ts.map +1 -1
  3. package/dist/cjs/api/mobility/index.d.ts +1 -0
  4. package/dist/cjs/api/mobility/index.d.ts.map +1 -1
  5. package/dist/cjs/api/mobility/index.js +1 -0
  6. package/dist/cjs/api/mobility/index.js.map +1 -1
  7. package/dist/cjs/api/mobility/mobility-worker-rating.type.d.ts +72 -0
  8. package/dist/cjs/api/mobility/mobility-worker-rating.type.d.ts.map +1 -0
  9. package/dist/cjs/api/mobility/mobility-worker-rating.type.js +3 -0
  10. package/dist/cjs/api/mobility/mobility-worker-rating.type.js.map +1 -0
  11. package/dist/cjs/api/mobility/mobility-worker.type.d.ts +10 -2
  12. package/dist/cjs/api/mobility/mobility-worker.type.d.ts.map +1 -1
  13. package/dist/cjs/enum/user-permission.enum.d.ts +24 -0
  14. package/dist/cjs/enum/user-permission.enum.d.ts.map +1 -1
  15. package/dist/cjs/enum/user-permission.enum.js +25 -0
  16. package/dist/cjs/enum/user-permission.enum.js.map +1 -1
  17. package/dist/esm/api/identity/auth.type.d.ts +52 -0
  18. package/dist/esm/api/identity/auth.type.d.ts.map +1 -1
  19. package/dist/esm/api/mobility/index.d.ts +1 -0
  20. package/dist/esm/api/mobility/index.d.ts.map +1 -1
  21. package/dist/esm/api/mobility/index.js +1 -0
  22. package/dist/esm/api/mobility/index.js.map +1 -1
  23. package/dist/esm/api/mobility/mobility-worker-rating.type.d.ts +72 -0
  24. package/dist/esm/api/mobility/mobility-worker-rating.type.d.ts.map +1 -0
  25. package/dist/esm/api/mobility/mobility-worker-rating.type.js +2 -0
  26. package/dist/esm/api/mobility/mobility-worker-rating.type.js.map +1 -0
  27. package/dist/esm/api/mobility/mobility-worker.type.d.ts +10 -2
  28. package/dist/esm/api/mobility/mobility-worker.type.d.ts.map +1 -1
  29. package/dist/esm/enum/user-permission.enum.d.ts +24 -0
  30. package/dist/esm/enum/user-permission.enum.d.ts.map +1 -1
  31. package/dist/esm/enum/user-permission.enum.js +25 -0
  32. package/dist/esm/enum/user-permission.enum.js.map +1 -1
  33. package/package.json +1 -1
@@ -90,6 +90,22 @@ export interface Principal {
90
90
  email: Nullable<string>;
91
91
  firstName: Nullable<string>;
92
92
  lastName: Nullable<string>;
93
+ /**
94
+ * E.164, or null where nobody has given one.
95
+ *
96
+ * Stored as typed, not normalised: a Georgian number written `+995 555 12 34 56` and the
97
+ * same number without spaces are one number to a person and two strings to a column, and
98
+ * guessing a country code for a bare `555123456` is how a driver ends up unreachable.
99
+ */
100
+ phone: Nullable<string>;
101
+ /**
102
+ * Absolute URL of this person's photo, or null.
103
+ *
104
+ * The key is a digest of the bytes, so the URL changes whenever the photo does and may be
105
+ * cached for a year. It carries **no tenant id** — these are fetched by a passenger's phone
106
+ * looking at their driver, the same reason a product image carries none.
107
+ */
108
+ avatarUrl: Nullable<string>;
93
109
  tenantId: UUID;
94
110
  tenantName: string;
95
111
  tenantSlug: string;
@@ -110,4 +126,40 @@ export interface AuthSession {
110
126
  principal: Principal;
111
127
  tokens: AuthTokens;
112
128
  }
129
+ /**
130
+ * `PATCH /auth/me` — a person editing their own profile.
131
+ *
132
+ * Self-service, so it carries **no permission**: the subject of the presented token is the row
133
+ * that changes and there is no field that could name anybody else. That is what lets a driver,
134
+ * a courier and a shopper — none of whom hold `USER_UPDATE` — put their own name right, where
135
+ * `PATCH /users/:userId` is the administrative route and answers 403 to all three.
136
+ *
137
+ * Every field is optional and an omitted one is left alone. `phone` is the one that accepts an
138
+ * explicit `null`, which clears it; omitting it and clearing it are different instructions, and
139
+ * a form that sent its empty input as `''` rather than `null` would be asking for a third thing
140
+ * again.
141
+ */
142
+ export interface UpdateProfileBody {
143
+ firstName?: string;
144
+ lastName?: string;
145
+ phone?: Nullable<string>;
146
+ }
147
+ /**
148
+ * What one person may see about another. Returned by `GET /users/:userId/profile` behind
149
+ * {@link UserPermission.PROFILE_READ}.
150
+ *
151
+ * **The whole value of this type is what it leaves out.** No email, no phone, no role, no
152
+ * membership, no tenant — a passenger looking at their driver gets a name and a face, which is
153
+ * what makes getting into a stranger's car reasonable, and nothing that would make the route a
154
+ * way to enumerate a workforce.
155
+ *
156
+ * `displayName` is composed by the server rather than assembled by each client, so a driver is
157
+ * named identically on a phone, in a panel and in a receipt.
158
+ */
159
+ export interface PublicProfile {
160
+ userId: UUID;
161
+ /** `firstName lastName`, trimmed; the email's local part where no name is set. */
162
+ displayName: string;
163
+ avatarUrl: Nullable<string>;
164
+ }
113
165
  //# sourceMappingURL=auth.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.type.d.ts","sourceRoot":"","sources":["../../../../src/api/identity/auth.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACvB,UAAU,EAAE,MAAM,CAAC;IAEnB,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IAEnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,0BAA0B;AAC1B,MAAM,WAAW,SAAS;IACtB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAA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js';
7
7
  export * from './mobility-dispatch.type.js';
8
8
  export * from './mobility-service-type.enum.js';
9
+ export * from './mobility-worker-rating.type.js';
9
10
  export * from './mobility-worker-status.enum.js';
10
11
  export * from './mobility-worker.type.js';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
@@ -22,6 +22,7 @@ __exportStar(require("./mobility-dispatch-offer.type.js"), exports);
22
22
  __exportStar(require("./mobility-dispatch-status.enum.js"), exports);
23
23
  __exportStar(require("./mobility-dispatch.type.js"), exports);
24
24
  __exportStar(require("./mobility-service-type.enum.js"), exports);
25
+ __exportStar(require("./mobility-worker-rating.type.js"), exports);
25
26
  __exportStar(require("./mobility-worker-status.enum.js"), exports);
26
27
  __exportStar(require("./mobility-worker.type.js"), exports);
27
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/mobility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yEAAuD;AACvD,uEAAqD;AACrD,gEAA8C;AAC9C,2EAAyD;AACzD,oEAAkD;AAClD,qEAAmD;AACnD,8DAA4C;AAC5C,kEAAgD;AAChD,mEAAiD;AACjD,4DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/mobility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yEAAuD;AACvD,uEAAqD;AACrD,gEAA8C;AAC9C,2EAAyD;AACzD,oEAAkD;AAClD,qEAAmD;AACnD,8DAA4C;AAC5C,kEAAgD;AAChD,mEAAiD;AACjD,mEAAiD;AACjD,4DAA0C"}
@@ -0,0 +1,72 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ /**
5
+ * What one customer thought of one job a worker did.
6
+ *
7
+ * **Mobility owns a worker's reputation because a worker is Mobility's aggregate**, and one
8
+ * person enrolled for both capabilities has one reputation rather than a taxi one and a delivery
9
+ * one. The products own who may rate and when — the passenger on a completed ride, the sender on
10
+ * a delivered job — and submit the result here with their own service credential, which is the
11
+ * same direction of knowledge as dispatch itself.
12
+ *
13
+ * **There is deliberately no comment field.** A free-text comment about a named person needs a
14
+ * reader, a way for that person to contest it and a retention window, and none of those is an
15
+ * engineering decision. A score with none of them is a number; a comment with none of them is an
16
+ * unreviewed, permanent, unanswerable accusation.
17
+ */
18
+ export interface MobilityWorkerRating {
19
+ id: UUID;
20
+ /**
21
+ * The assignment being rated, which is also what makes a rating unique.
22
+ *
23
+ * The caller names the **assignment** rather than the worker, so a product that rated the
24
+ * wrong person would have to have been given the wrong job — Mobility resolves the worker
25
+ * from the row it already holds. An assignment has exactly one customer, so one rating per
26
+ * assignment is a database constraint rather than a rule each product repeats.
27
+ */
28
+ assignmentId: UUID;
29
+ workerId: UUID;
30
+ /** 1 to 5, whole numbers. Halves invite an argument about what 3.5 means. */
31
+ score: number;
32
+ createdAt: IsoDateTime;
33
+ }
34
+ /**
35
+ * `POST /api/v1/worker-ratings`, behind `mobility:worker:rating:submit`.
36
+ *
37
+ * No `Idempotency-Key` header: `assignmentId` is a better key than one a caller invents, because
38
+ * it is the thing that must not be rated twice. A replay returns the stored rating rather than a
39
+ * conflict, so a product retrying a timed-out submit does not have to special-case its own retry.
40
+ */
41
+ export interface SubmitMobilityWorkerRatingBody {
42
+ assignmentId: UUID;
43
+ score: number;
44
+ /**
45
+ * The person whose opinion this is.
46
+ *
47
+ * Stored so a disputed rating can be investigated at all, and supplied by the product
48
+ * because only the product knows who was on that ride. It is never published: a worker
49
+ * learning which customer scored them one star is how a rating becomes a reprisal.
50
+ */
51
+ ratedByUserId: UUID;
52
+ }
53
+ export interface SubmitMobilityWorkerRatingResponse {
54
+ rating: MobilityWorkerRating;
55
+ /** True where this assignment had already been rated; the stored rating is returned. */
56
+ isDuplicate: boolean;
57
+ }
58
+ /**
59
+ * A worker's standing, as anybody deciding whether to get into their car may see it.
60
+ *
61
+ * `ratingAverage` is **null until there are enough ratings to mean anything**, which is a
62
+ * different fact from a low score and must not render as one. A worker whose first customer gave
63
+ * them one star is not a one-star worker, and a platform that says they are has made one bad day
64
+ * permanent. Clients render the null as "new" rather than as a figure.
65
+ */
66
+ export interface MobilityWorkerReputation {
67
+ /** Mean of every score, to one decimal place, or null below the publication threshold. */
68
+ ratingAverage: Nullable<number>;
69
+ /** How many ratings there are, published whether or not the average is. */
70
+ ratingCount: number;
71
+ }
72
+ //# sourceMappingURL=mobility-worker-rating.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobility-worker-rating.type.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-worker-rating.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,oBAAoB;IACjC,EAAE,EAAE,IAAI,CAAC;IAET;;;;;;;OAOG;IACH,YAAY,EAAE,IAAI,CAAC;IAEnB,QAAQ,EAAE,IAAI,CAAC;IAEf,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,8BAA8B;IAC3C,YAAY,EAAE,IAAI,CAAC;IAEnB,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,aAAa,EAAE,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,kCAAkC;IAC/C,MAAM,EAAE,oBAAoB,CAAC;IAE7B,wFAAwF;IACxF,WAAW,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,wBAAwB;IACrC,0FAA0F;IAC1F,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEhC,2EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=mobility-worker-rating.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobility-worker-rating.type.js","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-worker-rating.type.ts"],"names":[],"mappings":""}
@@ -2,9 +2,17 @@ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
2
  import type { UUID } from '../../type/uuid.type.js';
3
3
  import type { MobilityAvailabilityStatus } from './mobility-availability-status.enum.js';
4
4
  import type { MobilityServiceType } from './mobility-service-type.enum.js';
5
+ import type { MobilityWorkerReputation } from './mobility-worker-rating.type.js';
5
6
  import type { MobilityWorkerStatus } from './mobility-worker-status.enum.js';
6
- /** Shared worker profile used by taxi and delivery dispatch. */
7
- export interface MobilityWorker {
7
+ /**
8
+ * Shared worker profile used by taxi and delivery dispatch.
9
+ *
10
+ * It extends {@link MobilityWorkerReputation} rather than carrying a separate route, because
11
+ * every caller that wants a worker's standing already holds `mobility:worker:read` and is
12
+ * already reading this row — a second endpoint would be a second request and a second permission
13
+ * question for two columns sitting on the row the first one returned.
14
+ */
15
+ export interface MobilityWorker extends MobilityWorkerReputation {
8
16
  id: UUID;
9
17
  /** Identity user represented by this worker. Unique within a tenant. */
10
18
  userId: UUID;
@@ -1 +1 @@
1
- {"version":3,"file":"mobility-worker.type.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-worker.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,gEAAgE;AAChE,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,IAAI,CAAC;IACT,wEAAwE;IACxE,MAAM,EAAE,IAAI,CAAC;IACb,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,YAAY,EAAE,0BAA0B,CAAC;IACzC,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,WAAW,CAAC;CAC1B;AAED,wFAAwF;AACxF,MAAM,WAAW,wBAAwB;IACrC,MAAM,EAAE,IAAI,CAAC;IACb,YAAY,EAAE,mBAAmB,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,4BAA4B;IACzC,MAAM,EAAE,cAAc,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACxB;AAED,oFAAoF;AACpF,MAAM,WAAW,wBAAwB;IACrC,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,MAAM,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED,wEAAwE;AACxE,MAAM,WAAW,iCAAiC;IAC9C,YAAY,EAAE,0BAA0B,CAAC,SAAS,GAAG,0BAA0B,CAAC,OAAO,CAAC;CAC3F;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACnC,QAAQ,EAAE,IAAI,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,WAAW,CAAC;IACxB,gGAAgG;IAChG,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gCAAgC;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"mobility-worker.type.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-worker.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,oB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AAM,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CACpB"}
@@ -25,6 +25,19 @@ export declare enum UserPermission {
25
25
  USER_INVITE = "user:invite",
26
26
  USER_UPDATE = "user:update",
27
27
  USER_REMOVE = "user:remove",
28
+ /**
29
+ * Read the **public** half of somebody else's profile — a display name and a photo, and
30
+ * nothing else.
31
+ *
32
+ * Deliberately not `USER_READ`, which returns an email, a membership and a role list for
33
+ * every person in the tenant. The thing a passenger needs is the face of the driver coming
34
+ * to collect them, and the thing a merchant needs is the name of the courier at their door;
35
+ * granting a tenant-wide user read to answer that would hand a phone the staff directory.
36
+ *
37
+ * A person always reads their **own** profile through `GET /auth/me`, which needs no
38
+ * permission at all — it is the subject of the presented token.
39
+ */
40
+ PROFILE_READ = "profile:read",
28
41
  MEMBERSHIP_READ = "membership:read",
29
42
  /** Suspend or reactivate someone's access without deleting their account. */
30
43
  MEMBERSHIP_UPDATE = "membership:update",
@@ -371,6 +384,17 @@ export declare enum UserPermission {
371
384
  MOBILITY_WORKER_MANAGE = "mobility:worker:manage",
372
385
  /** Go online or offline. Assignment-owned `busy` cannot be requested through this grant. */
373
386
  MOBILITY_WORKER_AVAILABILITY_UPDATE = "mobility:worker:availability:update",
387
+ /**
388
+ * Record one customer's score for one completed assignment.
389
+ *
390
+ * Held by a **product API**, never by a passenger or a sender: only `taxi-api` and
391
+ * `delivery-api` know who was on a given ride or job, and whether it finished. A customer
392
+ * rates through the product, which submits here with its own service credential — the same
393
+ * arrangement as dispatch, and the reason this is not folded into
394
+ * {@link UserPermission.MOBILITY_WORKER_MANAGE}, which is an administrator's grant over
395
+ * somebody's capabilities and employment.
396
+ */
397
+ MOBILITY_WORKER_RATING_SUBMIT = "mobility:worker:rating:submit",
374
398
  /** Read a worker's latest raw coordinate. Separate because location is sensitive operational data. */
375
399
  MOBILITY_WORKER_LOCATION_READ = "mobility:worker:location:read",
376
400
  /** Submit the caller's own device heartbeat; a worker may never update somebody else's location. */
@@ -1 +1 @@
1
- {"version":3,"file":"user-permission.enum.d.ts","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,cAAc;IAItB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,sFAAsF;IACtF,aAAa,kBAAkB;IAG/B,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAG3B,eAAe,oBAAoB;IACnC,6EAA6E;IAC7E,iBAAiB,sBAAsB;IACvC;;;OAGG;IACH,sBAAsB,2BAA2B;IAGjD,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAG3B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IAKjC,qEAAqE;IACrE,qBAAqB,0BAA0B;IAC/C,uBAAuB,4BAA4B;IACnD,uBAAuB,4BAA4B;IACnD,uBAAuB,4BAA4B;IAGnD;;;;OAIG;IACH,oBAAoB,yBAAyB;IAC7C,sBAAsB,2BAA2B;IAGjD;;;;OAIG;IACH,sBAAsB,2BAA2B;IAGjD,qBAAqB,0BAA0B;IAC/C,yFAAyF;IACzF,uBAAuB,4BAA4B;IAGnD,mEAAmE;IACnE,wBAAwB,6BAA6B;IACrD;;;;;;;OAOG;IACH,0BAA0B,+BAA+B;IAGzD,kBAAkB,uBAAuB;IACzC,2DAA2D;IAC3D,oBAAoB,yBAAyB;IAG7C;;;;;OAKG;IACH,qBAAqB,0BAA0B;IAC/C;;;;;;OAMG;IACH,wBAAwB,6BAA6B;IAGrD,wFAAwF;IACxF,sBAAsB,2BAA2B;IACjD;;;;;;;;OAQG;IACH,wBAAwB,6BAA6B;IAGrD,sEAAsE;IACtE,uBAAuB,4BAA4B;IACnD;;;;;OAKG;IACH,yBAAyB,8BAA8B;IAGvD;;;;;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AAsB,2BAA2B;IAEjD,4FAA4F;IAC5F,mCAAmC,wCAAwC;IAE3E;;;;;;;;;OASG;IACH,6BAA6B,kCAAkC;IAE/D,sGAAsG;IACtG,6BAA6B,kCAAkC;IAE/D,oGAAoG;IACpG,+BAA+B,oCAAoC;IAEnE,0FAA0F;IAC1F,sBAAsB,2BAA2B;IAEjD,2EAA2E;IAC3E,wBAAwB,6BAA6B;IAErD,wGAAwG;IACxG,yBAAyB,8BAA8B;IAEvD,kFAAkF;IAClF,4BAA4B,iCAAiC;IAE7D,mFAAmF;IACnF,+BAA+B,oCAAoC;IAInE,+EAA+E;IAC/E,cAAc,mBAAmB;IAEjC,6EAA6E;IAC7E,gBAAgB,qBAAqB;IAErC;;;;;;OAMG;IACH,iBAAiB,sBAAsB;IAEvC,2FAA2F;IAC3F,eAAe,oBAAoB;IAInC,gGAAgG;IAChG,iBAAiB,sBAAsB;IAEvC,4EAA4E;IAC5E,mBAAmB,wBAAwB;IAE3C,qGAAqG;IACrG,oBAAoB,yBAAyB;IAE7C,8EAA8E;IAC9E,oBAAoB,yBAAyB;CAChD;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,cAAc,EAAiD,CAAC"}
@@ -32,6 +32,20 @@ var UserPermission;
32
32
  UserPermission["USER_INVITE"] = "user:invite";
33
33
  UserPermission["USER_UPDATE"] = "user:update";
34
34
  UserPermission["USER_REMOVE"] = "user:remove";
35
+ // ── Profile ─────────────────────────────────────────────────────────────
36
+ /**
37
+ * Read the **public** half of somebody else's profile — a display name and a photo, and
38
+ * nothing else.
39
+ *
40
+ * Deliberately not `USER_READ`, which returns an email, a membership and a role list for
41
+ * every person in the tenant. The thing a passenger needs is the face of the driver coming
42
+ * to collect them, and the thing a merchant needs is the name of the courier at their door;
43
+ * granting a tenant-wide user read to answer that would hand a phone the staff directory.
44
+ *
45
+ * A person always reads their **own** profile through `GET /auth/me`, which needs no
46
+ * permission at all — it is the subject of the presented token.
47
+ */
48
+ UserPermission["PROFILE_READ"] = "profile:read";
35
49
  // ── Membership ──────────────────────────────────────────────────────────
36
50
  UserPermission["MEMBERSHIP_READ"] = "membership:read";
37
51
  /** Suspend or reactivate someone's access without deleting their account. */
@@ -432,6 +446,17 @@ var UserPermission;
432
446
  UserPermission["MOBILITY_WORKER_MANAGE"] = "mobility:worker:manage";
433
447
  /** Go online or offline. Assignment-owned `busy` cannot be requested through this grant. */
434
448
  UserPermission["MOBILITY_WORKER_AVAILABILITY_UPDATE"] = "mobility:worker:availability:update";
449
+ /**
450
+ * Record one customer's score for one completed assignment.
451
+ *
452
+ * Held by a **product API**, never by a passenger or a sender: only `taxi-api` and
453
+ * `delivery-api` know who was on a given ride or job, and whether it finished. A customer
454
+ * rates through the product, which submits here with its own service credential — the same
455
+ * arrangement as dispatch, and the reason this is not folded into
456
+ * {@link UserPermission.MOBILITY_WORKER_MANAGE}, which is an administrator's grant over
457
+ * somebody's capabilities and employment.
458
+ */
459
+ UserPermission["MOBILITY_WORKER_RATING_SUBMIT"] = "mobility:worker:rating:submit";
435
460
  /** Read a worker's latest raw coordinate. Separate because location is sensitive operational data. */
436
461
  UserPermission["MOBILITY_WORKER_LOCATION_READ"] = "mobility:worker:location:read";
437
462
  /** Submit the caller's own device heartbeat; a worker may never update somebody else's location. */
@@ -1 +1 @@
1
- {"version":3,"file":"user-permission.enum.js","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,IAAY,cA4gBX;AA5gBD,WAAY,cAAc;IACtB,4EAA4E;IAE5E,2EAA2E;IAC3E,6CAA2B,CAAA;IAC3B,iDAA+B,CAAA;IAC/B,sFAAsF;IACtF,iDAA+B,CAAA;IAE/B,2EAA2E;IAC3E,yCAAuB,CAAA;IACvB,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAE3B,2EAA2E;IAC3E,qDAAmC,CAAA;IACnC,6EAA6E;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;IACpG,qFAAmE,CAAA;IAEnE,0FAA0F;IAC1F,mEAAiD,CAAA;IAEjD,2EAA2E;IAC3E,uEAAqD,CAAA;IAErD,wGAAwG;IACxG,yEAAuD,CAAA;IAEvD,kFAAkF;IAClF,+EAA6D,CAAA;IAE7D,mFAAmF;IACnF,qFAAmE,CAAA;IAEnE,2EAA2E;IAE3E,+EAA+E;IAC/E,mDAAiC,CAAA;IAEjC,6EAA6E;IAC7E,uDAAqC,CAAA;IAErC;;;;;;OAMG;IACH,yDAAuC,CAAA;IAEvC,2FAA2F;IAC3F,qDAAmC,CAAA;IAEnC,0EAA0E;IAE1E,gGAAgG;IAChG,yDAAuC,CAAA;IAEvC,4EAA4E;IAC5E,6DAA2C,CAAA;IAE3C,qGAAqG;IACrG,+DAA6C,CAAA;IAE7C,8EAA8E;IAC9E,+DAA6C,CAAA;AACjD,CAAC,EAviBW,cAAc,8BAAd,cAAc,QAuiBzB;AAED;;;;;GAKG;AACU,QAAA,oBAAoB,GAA8B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC"}
@@ -90,6 +90,22 @@ export interface Principal {
90
90
  email: Nullable<string>;
91
91
  firstName: Nullable<string>;
92
92
  lastName: Nullable<string>;
93
+ /**
94
+ * E.164, or null where nobody has given one.
95
+ *
96
+ * Stored as typed, not normalised: a Georgian number written `+995 555 12 34 56` and the
97
+ * same number without spaces are one number to a person and two strings to a column, and
98
+ * guessing a country code for a bare `555123456` is how a driver ends up unreachable.
99
+ */
100
+ phone: Nullable<string>;
101
+ /**
102
+ * Absolute URL of this person's photo, or null.
103
+ *
104
+ * The key is a digest of the bytes, so the URL changes whenever the photo does and may be
105
+ * cached for a year. It carries **no tenant id** — these are fetched by a passenger's phone
106
+ * looking at their driver, the same reason a product image carries none.
107
+ */
108
+ avatarUrl: Nullable<string>;
93
109
  tenantId: UUID;
94
110
  tenantName: string;
95
111
  tenantSlug: string;
@@ -110,4 +126,40 @@ export interface AuthSession {
110
126
  principal: Principal;
111
127
  tokens: AuthTokens;
112
128
  }
129
+ /**
130
+ * `PATCH /auth/me` — a person editing their own profile.
131
+ *
132
+ * Self-service, so it carries **no permission**: the subject of the presented token is the row
133
+ * that changes and there is no field that could name anybody else. That is what lets a driver,
134
+ * a courier and a shopper — none of whom hold `USER_UPDATE` — put their own name right, where
135
+ * `PATCH /users/:userId` is the administrative route and answers 403 to all three.
136
+ *
137
+ * Every field is optional and an omitted one is left alone. `phone` is the one that accepts an
138
+ * explicit `null`, which clears it; omitting it and clearing it are different instructions, and
139
+ * a form that sent its empty input as `''` rather than `null` would be asking for a third thing
140
+ * again.
141
+ */
142
+ export interface UpdateProfileBody {
143
+ firstName?: string;
144
+ lastName?: string;
145
+ phone?: Nullable<string>;
146
+ }
147
+ /**
148
+ * What one person may see about another. Returned by `GET /users/:userId/profile` behind
149
+ * {@link UserPermission.PROFILE_READ}.
150
+ *
151
+ * **The whole value of this type is what it leaves out.** No email, no phone, no role, no
152
+ * membership, no tenant — a passenger looking at their driver gets a name and a face, which is
153
+ * what makes getting into a stranger's car reasonable, and nothing that would make the route a
154
+ * way to enumerate a workforce.
155
+ *
156
+ * `displayName` is composed by the server rather than assembled by each client, so a driver is
157
+ * named identically on a phone, in a panel and in a receipt.
158
+ */
159
+ export interface PublicProfile {
160
+ userId: UUID;
161
+ /** `firstName lastName`, trimmed; the email's local part where no name is set. */
162
+ displayName: string;
163
+ avatarUrl: Nullable<string>;
164
+ }
113
165
  //# sourceMappingURL=auth.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth.type.d.ts","sourceRoot":"","sources":["../../../../src/api/identity/auth.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO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AAS,CAAC;IACrB,MAAM,EAAE,UAAU,CAAC;CACtB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,IAAI,CAAC;IAEb,kFAAkF;IAClF,WAAW,EAAE,MAAM,CAAC;IAEpB,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC/B"}
@@ -6,6 +6,7 @@ export * from './mobility-dispatch-offer.type.js';
6
6
  export * from './mobility-dispatch-status.enum.js';
7
7
  export * from './mobility-dispatch.type.js';
8
8
  export * from './mobility-service-type.enum.js';
9
+ export * from './mobility-worker-rating.type.js';
9
10
  export * from './mobility-worker-status.enum.js';
10
11
  export * from './mobility-worker.type.js';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
@@ -6,6 +6,7 @@ export * from './mobility-dispatch-offer.type.js';
6
6
  export * from './mobility-dispatch-status.enum.js';
7
7
  export * from './mobility-dispatch.type.js';
8
8
  export * from './mobility-service-type.enum.js';
9
+ export * from './mobility-worker-rating.type.js';
9
10
  export * from './mobility-worker-status.enum.js';
10
11
  export * from './mobility-worker.type.js';
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/mobility/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/mobility/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,72 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ /**
5
+ * What one customer thought of one job a worker did.
6
+ *
7
+ * **Mobility owns a worker's reputation because a worker is Mobility's aggregate**, and one
8
+ * person enrolled for both capabilities has one reputation rather than a taxi one and a delivery
9
+ * one. The products own who may rate and when — the passenger on a completed ride, the sender on
10
+ * a delivered job — and submit the result here with their own service credential, which is the
11
+ * same direction of knowledge as dispatch itself.
12
+ *
13
+ * **There is deliberately no comment field.** A free-text comment about a named person needs a
14
+ * reader, a way for that person to contest it and a retention window, and none of those is an
15
+ * engineering decision. A score with none of them is a number; a comment with none of them is an
16
+ * unreviewed, permanent, unanswerable accusation.
17
+ */
18
+ export interface MobilityWorkerRating {
19
+ id: UUID;
20
+ /**
21
+ * The assignment being rated, which is also what makes a rating unique.
22
+ *
23
+ * The caller names the **assignment** rather than the worker, so a product that rated the
24
+ * wrong person would have to have been given the wrong job — Mobility resolves the worker
25
+ * from the row it already holds. An assignment has exactly one customer, so one rating per
26
+ * assignment is a database constraint rather than a rule each product repeats.
27
+ */
28
+ assignmentId: UUID;
29
+ workerId: UUID;
30
+ /** 1 to 5, whole numbers. Halves invite an argument about what 3.5 means. */
31
+ score: number;
32
+ createdAt: IsoDateTime;
33
+ }
34
+ /**
35
+ * `POST /api/v1/worker-ratings`, behind `mobility:worker:rating:submit`.
36
+ *
37
+ * No `Idempotency-Key` header: `assignmentId` is a better key than one a caller invents, because
38
+ * it is the thing that must not be rated twice. A replay returns the stored rating rather than a
39
+ * conflict, so a product retrying a timed-out submit does not have to special-case its own retry.
40
+ */
41
+ export interface SubmitMobilityWorkerRatingBody {
42
+ assignmentId: UUID;
43
+ score: number;
44
+ /**
45
+ * The person whose opinion this is.
46
+ *
47
+ * Stored so a disputed rating can be investigated at all, and supplied by the product
48
+ * because only the product knows who was on that ride. It is never published: a worker
49
+ * learning which customer scored them one star is how a rating becomes a reprisal.
50
+ */
51
+ ratedByUserId: UUID;
52
+ }
53
+ export interface SubmitMobilityWorkerRatingResponse {
54
+ rating: MobilityWorkerRating;
55
+ /** True where this assignment had already been rated; the stored rating is returned. */
56
+ isDuplicate: boolean;
57
+ }
58
+ /**
59
+ * A worker's standing, as anybody deciding whether to get into their car may see it.
60
+ *
61
+ * `ratingAverage` is **null until there are enough ratings to mean anything**, which is a
62
+ * different fact from a low score and must not render as one. A worker whose first customer gave
63
+ * them one star is not a one-star worker, and a platform that says they are has made one bad day
64
+ * permanent. Clients render the null as "new" rather than as a figure.
65
+ */
66
+ export interface MobilityWorkerReputation {
67
+ /** Mean of every score, to one decimal place, or null below the publication threshold. */
68
+ ratingAverage: Nullable<number>;
69
+ /** How many ratings there are, published whether or not the average is. */
70
+ ratingCount: number;
71
+ }
72
+ //# sourceMappingURL=mobility-worker-rating.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobility-worker-rating.type.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-worker-rating.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,oBAAoB;IACjC,EAAE,EAAE,IAAI,CAAC;IAET;;;;;;;OAOG;IACH,YAAY,EAAE,IAAI,CAAC;IAEnB,QAAQ,EAAE,IAAI,CAAC;IAEf,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IAEd,SAAS,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,8BAA8B;IAC3C,YAAY,EAAE,IAAI,CAAC;IAEnB,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,aAAa,EAAE,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,kCAAkC;IAC/C,MAAM,EAAE,oBAAoB,CAAC;IAE7B,wFAAwF;IACxF,WAAW,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,wBAAwB;IACrC,0FAA0F;IAC1F,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEhC,2EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=mobility-worker-rating.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mobility-worker-rating.type.js","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-worker-rating.type.ts"],"names":[],"mappings":""}
@@ -2,9 +2,17 @@ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
2
  import type { UUID } from '../../type/uuid.type.js';
3
3
  import type { MobilityAvailabilityStatus } from './mobility-availability-status.enum.js';
4
4
  import type { MobilityServiceType } from './mobility-service-type.enum.js';
5
+ import type { MobilityWorkerReputation } from './mobility-worker-rating.type.js';
5
6
  import type { MobilityWorkerStatus } from './mobility-worker-status.enum.js';
6
- /** Shared worker profile used by taxi and delivery dispatch. */
7
- export interface MobilityWorker {
7
+ /**
8
+ * Shared worker profile used by taxi and delivery dispatch.
9
+ *
10
+ * It extends {@link MobilityWorkerReputation} rather than carrying a separate route, because
11
+ * every caller that wants a worker's standing already holds `mobility:worker:read` and is
12
+ * already reading this row — a second endpoint would be a second request and a second permission
13
+ * question for two columns sitting on the row the first one returned.
14
+ */
15
+ export interface MobilityWorker extends MobilityWorkerReputation {
8
16
  id: UUID;
9
17
  /** Identity user represented by this worker. Unique within a tenant. */
10
18
  userId: UUID;
@@ -1 +1 @@
1
- {"version":3,"file":"mobility-worker.type.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-worker.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,0B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AM,WAAW,gCAAgC;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"mobility-worker.type.d.ts","sourceRoot":"","sources":["../../../../src/api/mobility/mobility-worker.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E;;;;;;;GAOG;AACH,MAAM,WAAW,cAAe,SAAQ,wBAAwB;IAC5D,EAAE,EAAE,IAAI,CAAC;IACT,wEAAwE;IACxE,MAAM,EAAE,IAAI,CAAC;IACb,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,YAAY,EAAE,0BAA0B,CAAC;IACzC,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,WAAW,CAAC;CAC1B;AAED,wFAAwF;AACxF,MAAM,WAAW,wBAAwB;IACrC,MAAM,EAAE,IAAI,CAAC;IACb,YAAY,EAAE,mBAAmB,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,4BAA4B;IACzC,MAAM,EAAE,cAAc,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACxB;AAED,oFAAoF;AACpF,MAAM,WAAW,wBAAwB;IACrC,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,MAAM,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED,wEAAwE;AACxE,MAAM,WAAW,iCAAiC;IAC9C,YAAY,EAAE,0BAA0B,CAAC,SAAS,GAAG,0BAA0B,CAAC,OAAO,CAAC;CAC3F;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACnC,QAAQ,EAAE,IAAI,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,WAAW,CAAC;IACxB,gGAAgG;IAChG,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,gCAAgC;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CACpB"}
@@ -25,6 +25,19 @@ export declare enum UserPermission {
25
25
  USER_INVITE = "user:invite",
26
26
  USER_UPDATE = "user:update",
27
27
  USER_REMOVE = "user:remove",
28
+ /**
29
+ * Read the **public** half of somebody else's profile — a display name and a photo, and
30
+ * nothing else.
31
+ *
32
+ * Deliberately not `USER_READ`, which returns an email, a membership and a role list for
33
+ * every person in the tenant. The thing a passenger needs is the face of the driver coming
34
+ * to collect them, and the thing a merchant needs is the name of the courier at their door;
35
+ * granting a tenant-wide user read to answer that would hand a phone the staff directory.
36
+ *
37
+ * A person always reads their **own** profile through `GET /auth/me`, which needs no
38
+ * permission at all — it is the subject of the presented token.
39
+ */
40
+ PROFILE_READ = "profile:read",
28
41
  MEMBERSHIP_READ = "membership:read",
29
42
  /** Suspend or reactivate someone's access without deleting their account. */
30
43
  MEMBERSHIP_UPDATE = "membership:update",
@@ -371,6 +384,17 @@ export declare enum UserPermission {
371
384
  MOBILITY_WORKER_MANAGE = "mobility:worker:manage",
372
385
  /** Go online or offline. Assignment-owned `busy` cannot be requested through this grant. */
373
386
  MOBILITY_WORKER_AVAILABILITY_UPDATE = "mobility:worker:availability:update",
387
+ /**
388
+ * Record one customer's score for one completed assignment.
389
+ *
390
+ * Held by a **product API**, never by a passenger or a sender: only `taxi-api` and
391
+ * `delivery-api` know who was on a given ride or job, and whether it finished. A customer
392
+ * rates through the product, which submits here with its own service credential — the same
393
+ * arrangement as dispatch, and the reason this is not folded into
394
+ * {@link UserPermission.MOBILITY_WORKER_MANAGE}, which is an administrator's grant over
395
+ * somebody's capabilities and employment.
396
+ */
397
+ MOBILITY_WORKER_RATING_SUBMIT = "mobility:worker:rating:submit",
374
398
  /** Read a worker's latest raw coordinate. Separate because location is sensitive operational data. */
375
399
  MOBILITY_WORKER_LOCATION_READ = "mobility:worker:location:read",
376
400
  /** Submit the caller's own device heartbeat; a worker may never update somebody else's location. */
@@ -1 +1 @@
1
- {"version":3,"file":"user-permission.enum.d.ts","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,cAAc;IAItB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,sFAAsF;IACtF,aAAa,kBAAkB;IAG/B,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAG3B,eAAe,oBAAoB;IACnC,6EAA6E;IAC7E,iBAAiB,sBAAsB;IACvC;;;OAGG;IACH,sBAAsB,2BAA2B;IAGjD,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAG3B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IAKjC,qEAAqE;IACrE,qBAAqB,0BAA0B;IAC/C,uBAAuB,4BAA4B;IACnD,uBA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7C,8EAA8E;IAC9E,oBAAoB,yBAAyB;CAChD;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,cAAc,EAAiD,CAAC"}
@@ -29,6 +29,20 @@ export var UserPermission;
29
29
  UserPermission["USER_INVITE"] = "user:invite";
30
30
  UserPermission["USER_UPDATE"] = "user:update";
31
31
  UserPermission["USER_REMOVE"] = "user:remove";
32
+ // ── Profile ─────────────────────────────────────────────────────────────
33
+ /**
34
+ * Read the **public** half of somebody else's profile — a display name and a photo, and
35
+ * nothing else.
36
+ *
37
+ * Deliberately not `USER_READ`, which returns an email, a membership and a role list for
38
+ * every person in the tenant. The thing a passenger needs is the face of the driver coming
39
+ * to collect them, and the thing a merchant needs is the name of the courier at their door;
40
+ * granting a tenant-wide user read to answer that would hand a phone the staff directory.
41
+ *
42
+ * A person always reads their **own** profile through `GET /auth/me`, which needs no
43
+ * permission at all — it is the subject of the presented token.
44
+ */
45
+ UserPermission["PROFILE_READ"] = "profile:read";
32
46
  // ── Membership ──────────────────────────────────────────────────────────
33
47
  UserPermission["MEMBERSHIP_READ"] = "membership:read";
34
48
  /** Suspend or reactivate someone's access without deleting their account. */
@@ -429,6 +443,17 @@ export var UserPermission;
429
443
  UserPermission["MOBILITY_WORKER_MANAGE"] = "mobility:worker:manage";
430
444
  /** Go online or offline. Assignment-owned `busy` cannot be requested through this grant. */
431
445
  UserPermission["MOBILITY_WORKER_AVAILABILITY_UPDATE"] = "mobility:worker:availability:update";
446
+ /**
447
+ * Record one customer's score for one completed assignment.
448
+ *
449
+ * Held by a **product API**, never by a passenger or a sender: only `taxi-api` and
450
+ * `delivery-api` know who was on a given ride or job, and whether it finished. A customer
451
+ * rates through the product, which submits here with its own service credential — the same
452
+ * arrangement as dispatch, and the reason this is not folded into
453
+ * {@link UserPermission.MOBILITY_WORKER_MANAGE}, which is an administrator's grant over
454
+ * somebody's capabilities and employment.
455
+ */
456
+ UserPermission["MOBILITY_WORKER_RATING_SUBMIT"] = "mobility:worker:rating:submit";
432
457
  /** Read a worker's latest raw coordinate. Separate because location is sensitive operational data. */
433
458
  UserPermission["MOBILITY_WORKER_LOCATION_READ"] = "mobility:worker:location:read";
434
459
  /** Submit the caller's own device heartbeat; a worker may never update somebody else's location. */
@@ -1 +1 @@
1
- {"version":3,"file":"user-permission.enum.js","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAN,IAAY,cA4gBX;AA5gBD,WAAY,cAAc;IACtB,4EAA4E;IAE5E,2EAA2E;IAC3E,6CAA2B,CAAA;IAC3B,iDAA+B,CAAA;IAC/B,sFAAsF;IACtF,iDAA+B,CAAA;IAE/B,2EAA2E;IAC3E,yCAAuB,CAAA;IACvB,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAE3B,2EAA2E;IAC3E,qDAAmC,CAAA;IACnC,6EAA6E;IAC7E,yDAAuC,CAAA;IACvC;;;OAGG;IACH,mEAAiD,CAAA;IAEjD,2EAA2E;IAC3E,yCAAuB,CAAA;IACvB,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAE3B,2EAA2E;IAC3E,+CAA6B,CAAA;IAC7B,iDAA+B,CAAA;IAC/B,mDAAiC,CAAA;IAEjC,4EAA4E;IAE5E,2EAA2E;IAC3E,qEAAqE;IACrE,iEAA+C,CAAA;IAC/C,qEAAmD,CAAA;IACnD,qEAAmD,CAAA;IACnD,qEAAmD,CAAA;IAEnD,2EAA2E;IAC3E;;;;OAIG;IACH,+DAA6C,CAAA;IAC7C,mEAAiD,CAAA;IAEjD,2EAA2E;IAC3E;;;;OAIG;IACH,mEAAiD,CAAA;IAEjD,2EAA2E;IAC3E,iEAA+C,CAAA;IAC/C,yFAAyF;IACzF,qEAAmD,CAAA;IAEnD,2EAA2E;IAC3E,mEAAmE;IACnE,uEAAqD,CAAA;IACrD;;;;;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C,MAAM,oBAAoB,GAA8B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {