@iveri/contracts 0.155.0 → 0.156.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 +2 -0
- package/dist/api/delivery/delivery-admin.type.d.ts +12 -2
- package/dist/api/delivery/delivery-job-status.enum.d.ts +7 -0
- package/dist/api/delivery/delivery-job-status.enum.js +7 -0
- package/dist/api/delivery/delivery-undelivered-reason.enum.d.ts +11 -0
- package/dist/api/delivery/delivery-undelivered-reason.enum.js +12 -0
- package/dist/api/delivery/index.d.ts +1 -0
- package/dist/api/delivery/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -324,6 +324,8 @@ Conduit's outbox.
|
|
|
324
324
|
`UniboxAgents` under `@iveri/contracts/unibox`, so the inbox picks agents by name.
|
|
325
325
|
- Version `0.139.0` adds a trainer's notes on a member: `GymTrainerNote`, `GymTrainerNotes`, `SaveGymTrainerNoteRequest`,
|
|
326
326
|
`GymMyTrainerNote` and the `GymRefusal` member `not-their-trainer` under `@iveri/contracts/gym`.
|
|
327
|
+
- Version `0.156.0` adds the delivery statuses `returning` and `returned`, `DeliveryUndeliveredReason` and the
|
|
328
|
+
undelivered fields on a board job, for a courier who cannot hand a parcel over.
|
|
327
329
|
- Version `0.155.0` adds gym-wide challenges (`GymChallenge`, `GymMyChallenge`, standings and three `GymRefusal`
|
|
328
330
|
members), polls in Baasi groups and message forwarding (`ChatMessageKind.POLL`, `ChatPoll`, forwarding shapes and
|
|
329
331
|
refusals), a diner moving their own restaurant booking and a guest's history on the booking book, the clinic's public
|
|
@@ -3,6 +3,7 @@ import type { Nullable } from '../../type/nil.type.js';
|
|
|
3
3
|
import type { Paginated } from '../../type/paginated.type.js';
|
|
4
4
|
import type { UUID } from '../../type/uuid.type.js';
|
|
5
5
|
import type { DeliveryJobStatus } from './delivery-job-status.enum.js';
|
|
6
|
+
import type { DeliveryUndeliveredReason } from './delivery-undelivered-reason.enum.js';
|
|
6
7
|
/** A stop as the sender gave it. There is no address search, so it is coordinates only. */
|
|
7
8
|
export interface DeliveryPoint {
|
|
8
9
|
latitude: number;
|
|
@@ -40,6 +41,13 @@ export interface DeliveryBoardJob {
|
|
|
40
41
|
hasProof: boolean;
|
|
41
42
|
/** The name the courier entered for whoever took the parcel; null without proof or past its retention window. */
|
|
42
43
|
recipientName: Nullable<string>;
|
|
44
|
+
/** When the courier said they could not hand it over; null unless the job is returning or returned. */
|
|
45
|
+
undeliveredAt: Nullable<IsoDateTime>;
|
|
46
|
+
undeliveredReason: Nullable<DeliveryUndeliveredReason>;
|
|
47
|
+
/** The courier's own words; null when they wrote none or past the location retention window. */
|
|
48
|
+
undeliveredNote: Nullable<string>;
|
|
49
|
+
/** When the parcel was back at the pickup. */
|
|
50
|
+
returnedAt: Nullable<IsoDateTime>;
|
|
43
51
|
}
|
|
44
52
|
/**
|
|
45
53
|
* `GET /company/board?since=`: what is happening now, and what finished since `since` (the start of the company's
|
|
@@ -47,9 +55,9 @@ export interface DeliveryBoardJob {
|
|
|
47
55
|
*/
|
|
48
56
|
export interface DeliveryBoard {
|
|
49
57
|
since: IsoDateTime;
|
|
50
|
-
/** Looking for a courier, assigned, picked up or
|
|
58
|
+
/** Looking for a courier, assigned, picked up, in transit or on its way back. Waiting quotes are not work yet. */
|
|
51
59
|
active: DeliveryBoardJob[];
|
|
52
|
-
/** Delivered, cancelled, expired, quote-expired or failed since `since`. */
|
|
60
|
+
/** Delivered, returned, cancelled, expired, quote-expired or failed since `since`. */
|
|
53
61
|
finished: DeliveryBoardJob[];
|
|
54
62
|
}
|
|
55
63
|
/** One courier's work since a moment, keyed by their Mobility worker. Couriers with no jobs are absent. */
|
|
@@ -116,6 +124,8 @@ export interface DeliveryDailyTotals {
|
|
|
116
124
|
expired: number;
|
|
117
125
|
/** Mobility refused the request: a fault on Iveri's side rather than the company's. */
|
|
118
126
|
failed: number;
|
|
127
|
+
/** The courier could not hand it over and took it back (returning or returned). */
|
|
128
|
+
returned: number;
|
|
119
129
|
/** Sum of the quoted fees of that day's delivered jobs, per currency. */
|
|
120
130
|
deliveredQuotedFees: DeliveryQuotedFeeTotal[];
|
|
121
131
|
}
|
|
@@ -15,6 +15,13 @@ export declare enum DeliveryJobStatus {
|
|
|
15
15
|
IN_TRANSIT = "in-transit",
|
|
16
16
|
/** Handed over, with the recipient's name and a photograph as proof. */
|
|
17
17
|
DELIVERED = "delivered",
|
|
18
|
+
/**
|
|
19
|
+
* The courier could not hand it over and is taking it back to the pickup; the job's reason says why. The courier
|
|
20
|
+
* still has the parcel, so the job is not over.
|
|
21
|
+
*/
|
|
22
|
+
RETURNING = "returning",
|
|
23
|
+
/** Back at the pickup. Nothing is re-attempted on its own: the sender asks again if they want to. */
|
|
24
|
+
RETURNED = "returned",
|
|
18
25
|
/** The sender never accepted the quote before it ran out. */
|
|
19
26
|
QUOTE_EXPIRED = "quote-expired",
|
|
20
27
|
/** Mobility found no courier. */
|
|
@@ -16,6 +16,13 @@ export var DeliveryJobStatus;
|
|
|
16
16
|
DeliveryJobStatus["IN_TRANSIT"] = "in-transit";
|
|
17
17
|
/** Handed over, with the recipient's name and a photograph as proof. */
|
|
18
18
|
DeliveryJobStatus["DELIVERED"] = "delivered";
|
|
19
|
+
/**
|
|
20
|
+
* The courier could not hand it over and is taking it back to the pickup; the job's reason says why. The courier
|
|
21
|
+
* still has the parcel, so the job is not over.
|
|
22
|
+
*/
|
|
23
|
+
DeliveryJobStatus["RETURNING"] = "returning";
|
|
24
|
+
/** Back at the pickup. Nothing is re-attempted on its own: the sender asks again if they want to. */
|
|
25
|
+
DeliveryJobStatus["RETURNED"] = "returned";
|
|
19
26
|
/** The sender never accepted the quote before it ran out. */
|
|
20
27
|
DeliveryJobStatus["QUOTE_EXPIRED"] = "quote-expired";
|
|
21
28
|
/** Mobility found no courier. */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Why a courier could not hand a parcel over, as they chose it at the door. */
|
|
2
|
+
export declare enum DeliveryUndeliveredReason {
|
|
3
|
+
/** Nobody was there to take it. */
|
|
4
|
+
RECIPIENT_ABSENT = "recipient-absent",
|
|
5
|
+
/** The drop-off could not be found or reached. */
|
|
6
|
+
ADDRESS_NOT_FOUND = "address-not-found",
|
|
7
|
+
/** The recipient would not take it. */
|
|
8
|
+
REFUSED = "refused",
|
|
9
|
+
/** Something else; the courier's note says what. */
|
|
10
|
+
OTHER = "other"
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Why a courier could not hand a parcel over, as they chose it at the door. */
|
|
2
|
+
export var DeliveryUndeliveredReason;
|
|
3
|
+
(function (DeliveryUndeliveredReason) {
|
|
4
|
+
/** Nobody was there to take it. */
|
|
5
|
+
DeliveryUndeliveredReason["RECIPIENT_ABSENT"] = "recipient-absent";
|
|
6
|
+
/** The drop-off could not be found or reached. */
|
|
7
|
+
DeliveryUndeliveredReason["ADDRESS_NOT_FOUND"] = "address-not-found";
|
|
8
|
+
/** The recipient would not take it. */
|
|
9
|
+
DeliveryUndeliveredReason["REFUSED"] = "refused";
|
|
10
|
+
/** Something else; the courier's note says what. */
|
|
11
|
+
DeliveryUndeliveredReason["OTHER"] = "other";
|
|
12
|
+
})(DeliveryUndeliveredReason || (DeliveryUndeliveredReason = {}));
|