@iveri/contracts 0.51.0 → 0.53.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 (52) hide show
  1. package/dist/api/clinic/clinic-location.type.d.ts +11 -0
  2. package/dist/api/clinic/clinic-profile.type.d.ts +11 -0
  3. package/dist/api/clinic/clinic-public.type.d.ts +15 -0
  4. package/dist/api/clinic/clinic-staff.type.d.ts +9 -0
  5. package/dist/api/clinic/clinic-treatment.type.d.ts +19 -0
  6. package/dist/api/realtime/realtime-event-type.enum.d.ts +8 -1
  7. package/dist/api/realtime/realtime-event-type.enum.js +7 -0
  8. package/dist/api/realtime/realtime-resource-type.enum.d.ts +3 -1
  9. package/dist/api/realtime/realtime-resource-type.enum.js +2 -0
  10. package/dist/api/restaurant/index.d.ts +19 -0
  11. package/dist/api/restaurant/index.js +19 -0
  12. package/dist/api/restaurant/restaurant-allergen.enum.d.ts +17 -0
  13. package/dist/api/restaurant/restaurant-allergen.enum.js +18 -0
  14. package/dist/api/restaurant/restaurant-bill-status.enum.d.ts +6 -0
  15. package/dist/api/restaurant/restaurant-bill-status.enum.js +7 -0
  16. package/dist/api/restaurant/restaurant-bill.type.d.ts +124 -0
  17. package/dist/api/restaurant/restaurant-bill.type.js +1 -0
  18. package/dist/api/restaurant/restaurant-branch.type.d.ts +69 -0
  19. package/dist/api/restaurant/restaurant-branch.type.js +1 -0
  20. package/dist/api/restaurant/restaurant-channel.enum.d.ts +6 -0
  21. package/dist/api/restaurant/restaurant-channel.enum.js +7 -0
  22. package/dist/api/restaurant/restaurant-dietary-tag.enum.d.ts +9 -0
  23. package/dist/api/restaurant/restaurant-dietary-tag.enum.js +10 -0
  24. package/dist/api/restaurant/restaurant-floor.type.d.ts +29 -0
  25. package/dist/api/restaurant/restaurant-floor.type.js +1 -0
  26. package/dist/api/restaurant/restaurant-kitchen.type.d.ts +48 -0
  27. package/dist/api/restaurant/restaurant-kitchen.type.js +1 -0
  28. package/dist/api/restaurant/restaurant-line-status.enum.d.ts +7 -0
  29. package/dist/api/restaurant/restaurant-line-status.enum.js +8 -0
  30. package/dist/api/restaurant/restaurant-menu.type.d.ts +141 -0
  31. package/dist/api/restaurant/restaurant-menu.type.js +1 -0
  32. package/dist/api/restaurant/restaurant-order-source.enum.d.ts +6 -0
  33. package/dist/api/restaurant/restaurant-order-source.enum.js +7 -0
  34. package/dist/api/restaurant/restaurant-order-status.enum.d.ts +16 -0
  35. package/dist/api/restaurant/restaurant-order-status.enum.js +17 -0
  36. package/dist/api/restaurant/restaurant-order.type.d.ts +81 -0
  37. package/dist/api/restaurant/restaurant-order.type.js +1 -0
  38. package/dist/api/restaurant/restaurant-payment-method.enum.d.ts +6 -0
  39. package/dist/api/restaurant/restaurant-payment-method.enum.js +7 -0
  40. package/dist/api/restaurant/restaurant-profile.type.d.ts +40 -0
  41. package/dist/api/restaurant/restaurant-profile.type.js +1 -0
  42. package/dist/api/restaurant/restaurant-public.type.d.ts +129 -0
  43. package/dist/api/restaurant/restaurant-public.type.js +1 -0
  44. package/dist/api/restaurant/restaurant-resource-status.enum.d.ts +5 -0
  45. package/dist/api/restaurant/restaurant-resource-status.enum.js +6 -0
  46. package/dist/api/restaurant/restaurant-service-request.type.d.ts +16 -0
  47. package/dist/api/restaurant/restaurant-service-request.type.js +5 -0
  48. package/dist/api/restaurant/restaurant-table.type.d.ts +51 -0
  49. package/dist/api/restaurant/restaurant-table.type.js +1 -0
  50. package/dist/enum/user-permission.enum.d.ts +37 -1
  51. package/dist/enum/user-permission.enum.js +37 -0
  52. package/package.json +5 -1
@@ -0,0 +1,7 @@
1
+ /** One plate's progress at its station. */
2
+ export declare enum RestaurantLineStatus {
3
+ QUEUED = "queued",
4
+ PREPARING = "preparing",
5
+ READY = "ready",
6
+ VOIDED = "voided"
7
+ }
@@ -0,0 +1,8 @@
1
+ /** One plate's progress at its station. */
2
+ export var RestaurantLineStatus;
3
+ (function (RestaurantLineStatus) {
4
+ RestaurantLineStatus["QUEUED"] = "queued";
5
+ RestaurantLineStatus["PREPARING"] = "preparing";
6
+ RestaurantLineStatus["READY"] = "ready";
7
+ RestaurantLineStatus["VOIDED"] = "voided";
8
+ })(RestaurantLineStatus || (RestaurantLineStatus = {}));
@@ -0,0 +1,141 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { UUID } from '../../type/uuid.type.js';
3
+ import type { LocalizedText } from '../clinic/localized-text.type.js';
4
+ import type { RestaurantAllergen } from './restaurant-allergen.enum.js';
5
+ import type { RestaurantDietaryTag } from './restaurant-dietary-tag.enum.js';
6
+ import type { RestaurantResourceStatus } from './restaurant-resource-status.enum.js';
7
+ /** Where a plate is made: the hot kitchen, the bar. A ticket is what one station sees of an order. */
8
+ export interface RestaurantStation {
9
+ id: UUID;
10
+ name: LocalizedText;
11
+ position: number;
12
+ status: RestaurantResourceStatus;
13
+ createdAt: IsoDateTime;
14
+ updatedAt: IsoDateTime;
15
+ }
16
+ export interface CreateRestaurantStationRequest {
17
+ name: LocalizedText;
18
+ position?: number;
19
+ }
20
+ export interface UpdateRestaurantStationRequest {
21
+ name?: LocalizedText;
22
+ position?: number;
23
+ status?: RestaurantResourceStatus;
24
+ }
25
+ export interface RestaurantMenuCategory {
26
+ id: UUID;
27
+ name: LocalizedText;
28
+ description: LocalizedText | null;
29
+ position: number;
30
+ /** Wall-clock times in the branch's zone. Both null means all day. */
31
+ availableFrom: string | null;
32
+ availableUntil: string | null;
33
+ status: RestaurantResourceStatus;
34
+ createdAt: IsoDateTime;
35
+ updatedAt: IsoDateTime;
36
+ }
37
+ export interface CreateRestaurantMenuCategoryRequest {
38
+ name: LocalizedText;
39
+ description?: LocalizedText | null;
40
+ position?: number;
41
+ availableFrom?: string | null;
42
+ availableUntil?: string | null;
43
+ }
44
+ export interface UpdateRestaurantMenuCategoryRequest extends Partial<CreateRestaurantMenuCategoryRequest> {
45
+ status?: RestaurantResourceStatus;
46
+ }
47
+ export interface RestaurantModifierOption {
48
+ id: UUID;
49
+ name: LocalizedText;
50
+ /** Added to the item's price. May be negative. */
51
+ priceDeltaMinor: number;
52
+ position: number;
53
+ status: RestaurantResourceStatus;
54
+ }
55
+ /**
56
+ * A choice on a dish. Size is a group with exactly one pick and "extras" a group with none required,
57
+ * so one mechanism covers both, and a group is shared by every dish that offers it.
58
+ */
59
+ export interface RestaurantModifierGroup {
60
+ id: UUID;
61
+ name: LocalizedText;
62
+ minSelections: number;
63
+ maxSelections: number;
64
+ status: RestaurantResourceStatus;
65
+ options: RestaurantModifierOption[];
66
+ createdAt: IsoDateTime;
67
+ updatedAt: IsoDateTime;
68
+ }
69
+ export interface RestaurantModifierOptionInput {
70
+ /** Present when keeping an option, so an order that names it still can. */
71
+ id?: UUID;
72
+ name: LocalizedText;
73
+ priceDeltaMinor: number;
74
+ status?: RestaurantResourceStatus;
75
+ }
76
+ export interface CreateRestaurantModifierGroupRequest {
77
+ name: LocalizedText;
78
+ minSelections: number;
79
+ maxSelections: number;
80
+ options: RestaurantModifierOptionInput[];
81
+ }
82
+ export interface UpdateRestaurantModifierGroupRequest extends Partial<CreateRestaurantModifierGroupRequest> {
83
+ status?: RestaurantResourceStatus;
84
+ }
85
+ export interface RestaurantMenuItem {
86
+ id: UUID;
87
+ categoryId: UUID;
88
+ stationId: UUID;
89
+ name: LocalizedText;
90
+ description: LocalizedText | null;
91
+ priceMinor: number;
92
+ imageUrl: string | null;
93
+ thumbnailUrl: string | null;
94
+ allergens: RestaurantAllergen[];
95
+ dietaryTags: RestaurantDietaryTag[];
96
+ prepMinutes: number | null;
97
+ weightGrams: number | null;
98
+ calories: number | null;
99
+ isFeatured: boolean;
100
+ position: number;
101
+ status: RestaurantResourceStatus;
102
+ /** In the order they are asked. */
103
+ modifierGroupIds: UUID[];
104
+ createdAt: IsoDateTime;
105
+ updatedAt: IsoDateTime;
106
+ }
107
+ export interface CreateRestaurantMenuItemRequest {
108
+ categoryId: UUID;
109
+ stationId: UUID;
110
+ name: LocalizedText;
111
+ description?: LocalizedText | null;
112
+ priceMinor: number;
113
+ allergens?: RestaurantAllergen[];
114
+ dietaryTags?: RestaurantDietaryTag[];
115
+ prepMinutes?: number | null;
116
+ weightGrams?: number | null;
117
+ calories?: number | null;
118
+ isFeatured?: boolean;
119
+ position?: number;
120
+ modifierGroupIds?: UUID[];
121
+ }
122
+ export interface UpdateRestaurantMenuItemRequest extends Partial<CreateRestaurantMenuItemRequest> {
123
+ status?: RestaurantResourceStatus;
124
+ }
125
+ /** How one branch differs from the menu. A row exists only where it does. */
126
+ export interface RestaurantBranchItem {
127
+ itemId: UUID;
128
+ branchId: UUID;
129
+ isHidden: boolean;
130
+ priceMinorOverride: number | null;
131
+ /** Null is not sold out. A date in the far future is sold out until somebody says otherwise. */
132
+ soldOutUntil: IsoDateTime | null;
133
+ }
134
+ export interface UpdateRestaurantBranchItemRequest {
135
+ isHidden?: boolean;
136
+ priceMinorOverride?: number | null;
137
+ }
138
+ /** Puts a dish on the stop-list. `end-of-day` ends with the branch's business day. */
139
+ export interface MarkRestaurantItemSoldOutRequest {
140
+ until: 'end-of-day' | 'indefinite';
141
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /** Who entered an order: staff, a diner at a table, or a diner elsewhere. */
2
+ export declare enum RestaurantOrderSource {
3
+ STAFF = "staff",
4
+ TABLE = "table",
5
+ ONLINE = "online"
6
+ }
@@ -0,0 +1,7 @@
1
+ /** Who entered an order: staff, a diner at a table, or a diner elsewhere. */
2
+ export var RestaurantOrderSource;
3
+ (function (RestaurantOrderSource) {
4
+ RestaurantOrderSource["STAFF"] = "staff";
5
+ RestaurantOrderSource["TABLE"] = "table";
6
+ RestaurantOrderSource["ONLINE"] = "online";
7
+ })(RestaurantOrderSource || (RestaurantOrderSource = {}));
@@ -0,0 +1,16 @@
1
+ /**
2
+ * How far an order has got.
3
+ *
4
+ * `awaiting-payment` keeps an order paying online away from the kitchen until the money is verified.
5
+ * `placed` waits for a person to accept it. Payment is a separate fact, because cancelled and paid
6
+ * has to be expressible.
7
+ */
8
+ export declare enum RestaurantOrderStatus {
9
+ AWAITING_PAYMENT = "awaiting-payment",
10
+ PLACED = "placed",
11
+ IN_KITCHEN = "in-kitchen",
12
+ READY = "ready",
13
+ OUT_FOR_DELIVERY = "out-for-delivery",
14
+ COMPLETED = "completed",
15
+ CANCELLED = "cancelled"
16
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * How far an order has got.
3
+ *
4
+ * `awaiting-payment` keeps an order paying online away from the kitchen until the money is verified.
5
+ * `placed` waits for a person to accept it. Payment is a separate fact, because cancelled and paid
6
+ * has to be expressible.
7
+ */
8
+ export var RestaurantOrderStatus;
9
+ (function (RestaurantOrderStatus) {
10
+ RestaurantOrderStatus["AWAITING_PAYMENT"] = "awaiting-payment";
11
+ RestaurantOrderStatus["PLACED"] = "placed";
12
+ RestaurantOrderStatus["IN_KITCHEN"] = "in-kitchen";
13
+ RestaurantOrderStatus["READY"] = "ready";
14
+ RestaurantOrderStatus["OUT_FOR_DELIVERY"] = "out-for-delivery";
15
+ RestaurantOrderStatus["COMPLETED"] = "completed";
16
+ RestaurantOrderStatus["CANCELLED"] = "cancelled";
17
+ })(RestaurantOrderStatus || (RestaurantOrderStatus = {}));
@@ -0,0 +1,81 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { UUID } from '../../type/uuid.type.js';
3
+ import type { LocalizedText } from '../clinic/localized-text.type.js';
4
+ import type { RestaurantChannel } from './restaurant-channel.enum.js';
5
+ import type { RestaurantLineStatus } from './restaurant-line-status.enum.js';
6
+ import type { RestaurantOrderSource } from './restaurant-order-source.enum.js';
7
+ import type { RestaurantOrderStatus } from './restaurant-order-status.enum.js';
8
+ /** What was chosen on a line, as it was named and priced when ordered. */
9
+ export interface RestaurantOrderLineOption {
10
+ optionId: UUID;
11
+ groupName: LocalizedText;
12
+ name: LocalizedText;
13
+ priceDeltaMinor: number;
14
+ }
15
+ export interface RestaurantOrderLine {
16
+ id: UUID;
17
+ itemId: UUID;
18
+ stationId: UUID;
19
+ name: LocalizedText;
20
+ quantity: number;
21
+ unitPriceMinor: number;
22
+ lineTotalMinor: number;
23
+ options: RestaurantOrderLineOption[];
24
+ note: string | null;
25
+ status: RestaurantLineStatus;
26
+ startedAt: IsoDateTime | null;
27
+ readyAt: IsoDateTime | null;
28
+ voidedAt: IsoDateTime | null;
29
+ voidReason: string | null;
30
+ }
31
+ export interface RestaurantOrder {
32
+ id: UUID;
33
+ /** Per branch and business day, so a kitchen can call it across the room. */
34
+ number: number;
35
+ branchId: UUID;
36
+ billId: UUID;
37
+ tableId: UUID | null;
38
+ tableLabel: string | null;
39
+ channel: RestaurantChannel;
40
+ source: RestaurantOrderSource;
41
+ status: RestaurantOrderStatus;
42
+ customerName: string | null;
43
+ customerPhone: string | null;
44
+ note: string | null;
45
+ /** When it should be ready. Null means as soon as it can be. */
46
+ requestedFor: IsoDateTime | null;
47
+ subtotalMinor: number;
48
+ currency: string;
49
+ lines: RestaurantOrderLine[];
50
+ placedAt: IsoDateTime;
51
+ acceptedAt: IsoDateTime | null;
52
+ readyAt: IsoDateTime | null;
53
+ completedAt: IsoDateTime | null;
54
+ cancelledAt: IsoDateTime | null;
55
+ cancelReason: string | null;
56
+ version: number;
57
+ }
58
+ /** What is being ordered. A client never sends a price. */
59
+ export interface RestaurantOrderLineRequest {
60
+ itemId: UUID;
61
+ quantity: number;
62
+ optionIds?: UUID[];
63
+ note?: string | null;
64
+ }
65
+ /** A waiter entering an order. */
66
+ export interface CreateRestaurantOrderRequest {
67
+ branchId: UUID;
68
+ channel: RestaurantChannel;
69
+ /** Required for dine-in, refused otherwise. */
70
+ tableId?: UUID | null;
71
+ lines: RestaurantOrderLineRequest[];
72
+ customerName?: string | null;
73
+ customerPhone?: string | null;
74
+ note?: string | null;
75
+ }
76
+ export interface CancelRestaurantOrderRequest {
77
+ reason: string;
78
+ }
79
+ export interface VoidRestaurantOrderLineRequest {
80
+ reason: string;
81
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /** How money reached the restaurant. `online` is written only by a verified billing session. */
2
+ export declare enum RestaurantPaymentMethod {
3
+ CASH = "cash",
4
+ CARD = "card",
5
+ ONLINE = "online"
6
+ }
@@ -0,0 +1,7 @@
1
+ /** How money reached the restaurant. `online` is written only by a verified billing session. */
2
+ export var RestaurantPaymentMethod;
3
+ (function (RestaurantPaymentMethod) {
4
+ RestaurantPaymentMethod["CASH"] = "cash";
5
+ RestaurantPaymentMethod["CARD"] = "card";
6
+ RestaurantPaymentMethod["ONLINE"] = "online";
7
+ })(RestaurantPaymentMethod || (RestaurantPaymentMethod = {}));
@@ -0,0 +1,40 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { UUID } from '../../type/uuid.type.js';
3
+ import type { LocalizedText } from '../clinic/localized-text.type.js';
4
+ export type { LocalizedText };
5
+ export interface RestaurantSocialLink {
6
+ network: string;
7
+ url: string;
8
+ }
9
+ /** What a restaurant publishes about itself. With no row, or unpublished, its public routes answer 404. */
10
+ export interface RestaurantProfile {
11
+ id: UUID;
12
+ slug: string;
13
+ name: LocalizedText;
14
+ tagline: LocalizedText | null;
15
+ about: LocalizedText | null;
16
+ /** ISO 4217. Fixed once a bill names it. */
17
+ currency: string;
18
+ phone: string | null;
19
+ email: string | null;
20
+ /** The address the table codes open and emails link to. */
21
+ siteUrl: string | null;
22
+ logoUrl: string | null;
23
+ coverUrl: string | null;
24
+ socialLinks: RestaurantSocialLink[];
25
+ isPublished: boolean;
26
+ createdAt: IsoDateTime;
27
+ updatedAt: IsoDateTime;
28
+ }
29
+ export interface UpdateRestaurantProfileRequest {
30
+ slug: string;
31
+ name: LocalizedText;
32
+ tagline?: LocalizedText | null;
33
+ about?: LocalizedText | null;
34
+ currency: string;
35
+ phone?: string | null;
36
+ email?: string | null;
37
+ siteUrl?: string | null;
38
+ socialLinks?: RestaurantSocialLink[];
39
+ isPublished: boolean;
40
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,129 @@
1
+ import type { UUID } from '../../type/uuid.type.js';
2
+ import type { LocalizedText } from '../clinic/localized-text.type.js';
3
+ import type { RestaurantAllergen } from './restaurant-allergen.enum.js';
4
+ import type { RestaurantBillStatus } from './restaurant-bill-status.enum.js';
5
+ import type { RestaurantOpeningPeriod } from './restaurant-branch.type.js';
6
+ import type { RestaurantDietaryTag } from './restaurant-dietary-tag.enum.js';
7
+ import type { RestaurantLineStatus } from './restaurant-line-status.enum.js';
8
+ import type { RestaurantOrderStatus } from './restaurant-order-status.enum.js';
9
+ import type { RestaurantOrderLineOption, RestaurantOrderLineRequest } from './restaurant-order.type.js';
10
+ import type { RestaurantSocialLink } from './restaurant-profile.type.js';
11
+ import type { RestaurantServiceRequestKind } from './restaurant-service-request.type.js';
12
+ export interface PublicRestaurant {
13
+ slug: string;
14
+ name: LocalizedText;
15
+ tagline: LocalizedText | null;
16
+ about: LocalizedText | null;
17
+ currency: string;
18
+ phone: string | null;
19
+ email: string | null;
20
+ logoUrl: string | null;
21
+ coverUrl: string | null;
22
+ socialLinks: RestaurantSocialLink[];
23
+ }
24
+ export interface PublicRestaurantBranch {
25
+ id: UUID;
26
+ name: LocalizedText;
27
+ address: LocalizedText;
28
+ city: LocalizedText;
29
+ phone: string | null;
30
+ latitude: number | null;
31
+ longitude: number | null;
32
+ timeZone: string;
33
+ openingHours: RestaurantOpeningPeriod[];
34
+ isOpenNow: boolean;
35
+ dineInEnabled: boolean;
36
+ takeawayEnabled: boolean;
37
+ deliveryEnabled: boolean;
38
+ reservationsEnabled: boolean;
39
+ takeawayPrepMinutes: number;
40
+ deliveryPrepMinutes: number;
41
+ deliveryRadiusMeters: number;
42
+ deliveryFeeMinor: number;
43
+ deliveryMinimumOrderMinor: number;
44
+ deliveryFreeOverMinor: number | null;
45
+ serviceChargeBasisPoints: number;
46
+ reservationMaxPartySize: number;
47
+ }
48
+ export interface PublicRestaurantModifierOption {
49
+ id: UUID;
50
+ name: LocalizedText;
51
+ priceDeltaMinor: number;
52
+ }
53
+ export interface PublicRestaurantModifierGroup {
54
+ id: UUID;
55
+ name: LocalizedText;
56
+ minSelections: number;
57
+ maxSelections: number;
58
+ options: PublicRestaurantModifierOption[];
59
+ }
60
+ export interface PublicRestaurantMenuItem {
61
+ id: UUID;
62
+ name: LocalizedText;
63
+ description: LocalizedText | null;
64
+ priceMinor: number;
65
+ imageUrl: string | null;
66
+ thumbnailUrl: string | null;
67
+ allergens: RestaurantAllergen[];
68
+ dietaryTags: RestaurantDietaryTag[];
69
+ weightGrams: number | null;
70
+ calories: number | null;
71
+ isFeatured: boolean;
72
+ /** On the stop-list, or outside its category's hours. Shown and not orderable. */
73
+ isAvailable: boolean;
74
+ modifierGroups: PublicRestaurantModifierGroup[];
75
+ }
76
+ export interface PublicRestaurantMenuCategory {
77
+ id: UUID;
78
+ name: LocalizedText;
79
+ description: LocalizedText | null;
80
+ availableFrom: string | null;
81
+ availableUntil: string | null;
82
+ items: PublicRestaurantMenuItem[];
83
+ }
84
+ export interface PublicRestaurantMenu {
85
+ branchId: UUID;
86
+ currency: string;
87
+ categories: PublicRestaurantMenuCategory[];
88
+ }
89
+ /** What the table code opens. */
90
+ export interface PublicRestaurantTable {
91
+ label: string;
92
+ seats: number;
93
+ branch: PublicRestaurantBranch;
94
+ }
95
+ export interface PublicRestaurantTableOrderRequest {
96
+ lines: RestaurantOrderLineRequest[];
97
+ note?: string | null;
98
+ }
99
+ export interface PublicRestaurantTableOrderLine {
100
+ id: UUID;
101
+ name: LocalizedText;
102
+ quantity: number;
103
+ lineTotalMinor: number;
104
+ options: RestaurantOrderLineOption[];
105
+ note: string | null;
106
+ status: RestaurantLineStatus;
107
+ }
108
+ export interface PublicRestaurantTableOrder {
109
+ number: number;
110
+ status: RestaurantOrderStatus;
111
+ placedAt: string;
112
+ lines: PublicRestaurantTableOrderLine[];
113
+ }
114
+ /** A table's bill as anyone holding the code can read it: dishes and prices, and no names. */
115
+ export interface PublicRestaurantTableBill {
116
+ status: RestaurantBillStatus;
117
+ currency: string;
118
+ subtotalMinor: number;
119
+ serviceChargeBasisPoints: number;
120
+ serviceChargeMinor: number;
121
+ totalMinor: number;
122
+ paidMinor: number;
123
+ balanceMinor: number;
124
+ orders: PublicRestaurantTableOrder[];
125
+ openRequests: RestaurantServiceRequestKind[];
126
+ }
127
+ export interface PublicRestaurantServiceRequestBody {
128
+ kind: RestaurantServiceRequestKind;
129
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ /** Whether a branch, table, station or menu entry is in use. Retiring keeps the history that names it. */
2
+ export declare enum RestaurantResourceStatus {
3
+ ACTIVE = "active",
4
+ INACTIVE = "inactive"
5
+ }
@@ -0,0 +1,6 @@
1
+ /** Whether a branch, table, station or menu entry is in use. Retiring keeps the history that names it. */
2
+ export var RestaurantResourceStatus;
3
+ (function (RestaurantResourceStatus) {
4
+ RestaurantResourceStatus["ACTIVE"] = "active";
5
+ RestaurantResourceStatus["INACTIVE"] = "inactive";
6
+ })(RestaurantResourceStatus || (RestaurantResourceStatus = {}));
@@ -0,0 +1,16 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { UUID } from '../../type/uuid.type.js';
3
+ export declare enum RestaurantServiceRequestKind {
4
+ WAITER = "waiter",
5
+ BILL = "bill"
6
+ }
7
+ /** A table asking for somebody. */
8
+ export interface RestaurantServiceRequest {
9
+ id: UUID;
10
+ branchId: UUID;
11
+ tableId: UUID;
12
+ tableLabel: string;
13
+ kind: RestaurantServiceRequestKind;
14
+ createdAt: IsoDateTime;
15
+ resolvedAt: IsoDateTime | null;
16
+ }
@@ -0,0 +1,5 @@
1
+ export var RestaurantServiceRequestKind;
2
+ (function (RestaurantServiceRequestKind) {
3
+ RestaurantServiceRequestKind["WAITER"] = "waiter";
4
+ RestaurantServiceRequestKind["BILL"] = "bill";
5
+ })(RestaurantServiceRequestKind || (RestaurantServiceRequestKind = {}));
@@ -0,0 +1,51 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { UUID } from '../../type/uuid.type.js';
3
+ import type { LocalizedText } from '../clinic/localized-text.type.js';
4
+ import type { RestaurantResourceStatus } from './restaurant-resource-status.enum.js';
5
+ /** A part of the room: the hall, the terrace, upstairs. */
6
+ export interface RestaurantFloorArea {
7
+ id: UUID;
8
+ branchId: UUID;
9
+ name: LocalizedText;
10
+ position: number;
11
+ status: RestaurantResourceStatus;
12
+ createdAt: IsoDateTime;
13
+ updatedAt: IsoDateTime;
14
+ }
15
+ export interface CreateRestaurantFloorAreaRequest {
16
+ branchId: UUID;
17
+ name: LocalizedText;
18
+ position?: number;
19
+ }
20
+ export interface UpdateRestaurantFloorAreaRequest {
21
+ name?: LocalizedText;
22
+ position?: number;
23
+ status?: RestaurantResourceStatus;
24
+ }
25
+ export interface RestaurantTable {
26
+ id: UUID;
27
+ branchId: UUID;
28
+ areaId: UUID;
29
+ /** What is painted on the table: `12`, `T4`. */
30
+ label: string;
31
+ seats: number;
32
+ position: number;
33
+ status: RestaurantResourceStatus;
34
+ /** What the printed code carries. Replacing it stops every printed copy working. */
35
+ qrToken: string;
36
+ createdAt: IsoDateTime;
37
+ updatedAt: IsoDateTime;
38
+ }
39
+ export interface CreateRestaurantTableRequest {
40
+ areaId: UUID;
41
+ label: string;
42
+ seats: number;
43
+ position?: number;
44
+ }
45
+ export interface UpdateRestaurantTableRequest {
46
+ areaId?: UUID;
47
+ label?: string;
48
+ seats?: number;
49
+ position?: number;
50
+ status?: RestaurantResourceStatus;
51
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -462,7 +462,43 @@ export declare enum UserPermission {
462
462
  /** Record money taken at the desk and sell prepaid courses. */
463
463
  CLINIC_PAYMENT_RECORD = "clinic:payment:record",
464
464
  /** Give money back. Its own permission, because reception taking money does not imply returning it. */
465
- CLINIC_PAYMENT_REFUND = "clinic:payment:refund"
465
+ CLINIC_PAYMENT_REFUND = "clinic:payment:refund",
466
+ /** Read a restaurant's profile, branches, tables and kitchen stations. */
467
+ RESTAURANT_SETUP_READ = "restaurant:setup:read",
468
+ /** Change them, including what each branch offers. */
469
+ RESTAURANT_SETUP_MANAGE = "restaurant:setup:manage",
470
+ /** Read the menu as staff see it, including what is hidden. */
471
+ RESTAURANT_MENU_READ = "restaurant:menu:read",
472
+ /** Change the menu: dishes, prices, modifiers, photographs. */
473
+ RESTAURANT_MENU_MANAGE = "restaurant:menu:manage",
474
+ /** Say a dish has run out. A cook can do this without being able to change a price. */
475
+ RESTAURANT_STOCK_MANAGE = "restaurant:stock:manage",
476
+ /** See orders, bills and the floor. */
477
+ RESTAURANT_ORDER_READ = "restaurant:order:read",
478
+ /** Take, accept, cancel and hand over orders, and answer a table's requests. */
479
+ RESTAURANT_ORDER_MANAGE = "restaurant:order:manage",
480
+ /** See the kitchen screen and move plates along it. */
481
+ RESTAURANT_KITCHEN_OPERATE = "restaurant:kitchen:operate",
482
+ /** See what has been paid and the day's takings. */
483
+ RESTAURANT_PAYMENT_READ = "restaurant:payment:read",
484
+ /** Record money taken at the table or till. */
485
+ RESTAURANT_PAYMENT_RECORD = "restaurant:payment:record",
486
+ /** Give money back. Its own permission, because taking money does not imply returning it. */
487
+ RESTAURANT_PAYMENT_REFUND = "restaurant:payment:refund",
488
+ /** See the booking book. */
489
+ RESTAURANT_RESERVATION_READ = "restaurant:reservation:read",
490
+ /** Take, seat and cancel bookings. */
491
+ RESTAURANT_RESERVATION_MANAGE = "restaurant:reservation:manage",
492
+ /** See a restaurant's diners. */
493
+ RESTAURANT_CUSTOMER_READ = "restaurant:customer:read",
494
+ /** Change what is held about them. */
495
+ RESTAURANT_CUSTOMER_MANAGE = "restaurant:customer:manage",
496
+ /** See promotions and reviews. */
497
+ RESTAURANT_MARKETING_READ = "restaurant:marketing:read",
498
+ /** Change promotions and moderate reviews. */
499
+ RESTAURANT_MARKETING_MANAGE = "restaurant:marketing:manage",
500
+ /** See sales reports. */
501
+ RESTAURANT_REPORT_READ = "restaurant:report:read"
466
502
  }
467
503
  /**
468
504
  * Every member, for seeding the owner role and validating custom-role input.