@iveri/contracts 0.104.0 → 0.105.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/dist/api/restaurant/index.d.ts +1 -0
- package/dist/api/restaurant/index.js +1 -0
- package/dist/api/restaurant/restaurant-diner-order.type.d.ts +6 -0
- package/dist/api/restaurant/restaurant-order-chat.type.d.ts +22 -0
- package/dist/api/restaurant/restaurant-order-chat.type.js +1 -0
- package/dist/api/restaurant/restaurant-order.type.d.ts +5 -0
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ export * from './restaurant-floor.type.js';
|
|
|
11
11
|
export * from './restaurant-kitchen.type.js';
|
|
12
12
|
export * from './restaurant-line-status.enum.js';
|
|
13
13
|
export * from './restaurant-menu.type.js';
|
|
14
|
+
export * from './restaurant-order-chat.type.js';
|
|
14
15
|
export * from './restaurant-order-payment-status.enum.js';
|
|
15
16
|
export * from './restaurant-order-source.enum.js';
|
|
16
17
|
export * from './restaurant-order-status.enum.js';
|
|
@@ -11,6 +11,7 @@ export * from './restaurant-floor.type.js';
|
|
|
11
11
|
export * from './restaurant-kitchen.type.js';
|
|
12
12
|
export * from './restaurant-line-status.enum.js';
|
|
13
13
|
export * from './restaurant-menu.type.js';
|
|
14
|
+
export * from './restaurant-order-chat.type.js';
|
|
14
15
|
export * from './restaurant-order-payment-status.enum.js';
|
|
15
16
|
export * from './restaurant-order-source.enum.js';
|
|
16
17
|
export * from './restaurant-order-status.enum.js';
|
|
@@ -97,6 +97,12 @@ export interface RestaurantDinerOrder {
|
|
|
97
97
|
canPay: boolean;
|
|
98
98
|
/** Whether the person who placed it can still say how it was. */
|
|
99
99
|
canReview: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* The Baasi conversation with the restaurant about this order, for the diner who placed it while signed in, once it
|
|
102
|
+
* is open. Null on a guest's order, on a link followed without the account, and before it opens. It stays set after
|
|
103
|
+
* the order ends, because the two can still read it.
|
|
104
|
+
*/
|
|
105
|
+
chatConversationId: UUID | null;
|
|
100
106
|
}
|
|
101
107
|
export interface RestaurantOrderPlaced {
|
|
102
108
|
order: RestaurantDinerOrder;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IsoDateTime } from '../../type/iso-date-time.type.js';
|
|
2
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
3
|
+
/** `POST /orders/:orderId/chat`: the conversation a member of staff just took up. */
|
|
4
|
+
export interface RestaurantOrderChat {
|
|
5
|
+
conversationId: UUID;
|
|
6
|
+
}
|
|
7
|
+
/** `GET /orders/chat/me`: whether the caller answers diners, named in every order conversation. */
|
|
8
|
+
export interface RestaurantOrderChatStanding {
|
|
9
|
+
hasJoined: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** One person on the restaurant's side of every order conversation. */
|
|
12
|
+
export interface RestaurantOrderChatStaffMember {
|
|
13
|
+
userId: UUID;
|
|
14
|
+
/** As identity shows them to colleagues, or null when identity cannot name them. */
|
|
15
|
+
displayName: string | null;
|
|
16
|
+
isMe: boolean;
|
|
17
|
+
joinedAt: IsoDateTime;
|
|
18
|
+
}
|
|
19
|
+
/** `GET /orders/chat/staff`: everybody who answers diners, in the order they took it up. */
|
|
20
|
+
export interface RestaurantOrderChatStaff {
|
|
21
|
+
items: RestaurantOrderChatStaffMember[];
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -64,6 +64,11 @@ export interface RestaurantOrder {
|
|
|
64
64
|
completedAt: IsoDateTime | null;
|
|
65
65
|
cancelledAt: IsoDateTime | null;
|
|
66
66
|
cancelReason: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* The Baasi conversation between the diner and the restaurant's staff, once one is open: only an order a signed-in
|
|
69
|
+
* diner placed for takeaway or delivery has one, never a table's. Staff take it up with `POST /orders/:id/chat`.
|
|
70
|
+
*/
|
|
71
|
+
chatConversationId: UUID | null;
|
|
67
72
|
version: number;
|
|
68
73
|
}
|
|
69
74
|
/** What is being ordered. A client never sends a price. */
|