@iveri/contracts 0.156.0 → 0.158.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
@@ -324,6 +324,9 @@ 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.158.0` adds `deliveryUndeliveredReason` on `RestaurantOrder` and `RestaurantDinerOrder`, and
328
+ `deliveryUndeliveredNote` on `RestaurantOrder` only.
329
+ - Version `0.157.0` adds `RestaurantDeliveryState` members `returning` and `returned`.
327
330
  - Version `0.156.0` adds the delivery statuses `returning` and `returned`, `DeliveryUndeliveredReason` and the
328
331
  undelivered fields on a board job, for a courier who cannot hand a parcel over.
329
332
  - Version `0.155.0` adds gym-wide challenges (`GymChallenge`, `GymMyChallenge`, standings and three `GymRefusal`
@@ -5,5 +5,10 @@ export declare enum RestaurantDeliveryState {
5
5
  PICKED_UP = "picked-up",
6
6
  IN_TRANSIT = "in-transit",
7
7
  DELIVERED = "delivered",
8
- UNDELIVERABLE = "undeliverable"
8
+ /** No courier could be found, or the search was called off. The food never left. */
9
+ UNDELIVERABLE = "undeliverable",
10
+ /** The courier could not hand it over and is bringing it back. Nobody can be asked again until it is back. */
11
+ RETURNING = "returning",
12
+ /** Back at the restaurant. Staff send it again or call the order off. */
13
+ RETURNED = "returned"
9
14
  }
@@ -6,5 +6,10 @@ export var RestaurantDeliveryState;
6
6
  RestaurantDeliveryState["PICKED_UP"] = "picked-up";
7
7
  RestaurantDeliveryState["IN_TRANSIT"] = "in-transit";
8
8
  RestaurantDeliveryState["DELIVERED"] = "delivered";
9
+ /** No courier could be found, or the search was called off. The food never left. */
9
10
  RestaurantDeliveryState["UNDELIVERABLE"] = "undeliverable";
11
+ /** The courier could not hand it over and is bringing it back. Nobody can be asked again until it is back. */
12
+ RestaurantDeliveryState["RETURNING"] = "returning";
13
+ /** Back at the restaurant. Staff send it again or call the order off. */
14
+ RestaurantDeliveryState["RETURNED"] = "returned";
10
15
  })(RestaurantDeliveryState || (RestaurantDeliveryState = {}));
@@ -1,6 +1,7 @@
1
1
  import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
2
  import type { UUID } from '../../type/uuid.type.js';
3
3
  import type { LocalizedText } from '../clinic/localized-text.type.js';
4
+ import type { DeliveryUndeliveredReason } from '../delivery/delivery-undelivered-reason.enum.js';
4
5
  import type { RestaurantChannel } from './restaurant-channel.enum.js';
5
6
  import type { RestaurantDeliveryState } from './restaurant-delivery-state.enum.js';
6
7
  import type { RestaurantOrderPaymentStatus } from './restaurant-order-payment-status.enum.js';
@@ -77,6 +78,8 @@ export interface RestaurantDinerOrder {
77
78
  status: RestaurantOrderStatus;
78
79
  paymentStatus: RestaurantOrderPaymentStatus;
79
80
  deliveryState: RestaurantDeliveryState | null;
81
+ /** Why the courier could not hand it over, for the diner's own sentence. The courier's note is never here. */
82
+ deliveryUndeliveredReason: DeliveryUndeliveredReason | null;
80
83
  deliveryAddress: RestaurantDeliveryAddress | null;
81
84
  customerName: string | null;
82
85
  note: string | null;
@@ -1,6 +1,7 @@
1
1
  import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
2
  import type { UUID } from '../../type/uuid.type.js';
3
3
  import type { LocalizedText } from '../clinic/localized-text.type.js';
4
+ import type { DeliveryUndeliveredReason } from '../delivery/delivery-undelivered-reason.enum.js';
4
5
  import type { RestaurantChannel } from './restaurant-channel.enum.js';
5
6
  import type { RestaurantDeliveryState } from './restaurant-delivery-state.enum.js';
6
7
  import type { RestaurantDeliveryAddress } from './restaurant-diner-order.type.js';
@@ -46,6 +47,10 @@ export interface RestaurantOrder {
46
47
  status: RestaurantOrderStatus;
47
48
  paymentStatus: RestaurantOrderPaymentStatus;
48
49
  deliveryState: RestaurantDeliveryState | null;
50
+ /** Why the courier could not hand it over, while it is coming back or back. Null otherwise. */
51
+ deliveryUndeliveredReason: DeliveryUndeliveredReason | null;
52
+ /** The courier's own words, if any. Kept only while the order is open, and never shown to the diner. */
53
+ deliveryUndeliveredNote: string | null;
49
54
  deliveryAddress: RestaurantDeliveryAddress | null;
50
55
  customerId: UUID | null;
51
56
  customerName: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.156.0",
3
+ "version": "0.158.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {