@iveri/contracts 0.49.0 → 0.50.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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IsoDateTime } from '../../type/iso-date-time.type.js';
|
|
2
|
+
import type { Nullable } from '../../type/nil.type.js';
|
|
2
3
|
import type { UUID } from '../../type/uuid.type.js';
|
|
3
4
|
import type { MobilityAvailabilityStatus } from './mobility-availability-status.enum.js';
|
|
4
5
|
import type { MobilityServiceType } from './mobility-service-type.enum.js';
|
|
@@ -19,11 +20,22 @@ export interface MobilityWorker extends MobilityWorkerReputation {
|
|
|
19
20
|
serviceTypes: MobilityServiceType[];
|
|
20
21
|
status: MobilityWorkerStatus;
|
|
21
22
|
availability: MobilityAvailabilityStatus;
|
|
23
|
+
/** The car or van this worker drives, or `null` until they have said. */
|
|
24
|
+
vehicle: Nullable<MobilityWorkerVehicle>;
|
|
22
25
|
/** Monotonic aggregate version used by events and optimistic clients. */
|
|
23
26
|
version: number;
|
|
24
27
|
createdAt: IsoDateTime;
|
|
25
28
|
updatedAt: IsoDateTime;
|
|
26
29
|
}
|
|
30
|
+
/** What somebody waiting at the kerb needs in order to recognise the right car. */
|
|
31
|
+
export interface MobilityWorkerVehicle {
|
|
32
|
+
make: string;
|
|
33
|
+
model: string;
|
|
34
|
+
colour: string;
|
|
35
|
+
plateNumber: string;
|
|
36
|
+
}
|
|
37
|
+
/** `PUT /api/v1/workers/me/vehicle`. A worker says what they drive, and nobody else does. */
|
|
38
|
+
export type SetMobilityWorkerVehicleBody = MobilityWorkerVehicle;
|
|
27
39
|
/** `POST /api/v1/workers`; retry safety is supplied by the `Idempotency-Key` header. */
|
|
28
40
|
export interface CreateMobilityWorkerBody {
|
|
29
41
|
userId: UUID;
|