@iveri/contracts 0.52.0 → 0.54.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 (69) hide show
  1. package/dist/api/hr/hr-access-action.enum.d.ts +7 -0
  2. package/dist/api/hr/hr-access-action.enum.js +8 -0
  3. package/dist/api/hr/hr-employment-event-kind.enum.d.ts +8 -0
  4. package/dist/api/hr/hr-employment-event-kind.enum.js +9 -0
  5. package/dist/api/hr/hr-employment-status.enum.d.ts +13 -0
  6. package/dist/api/hr/hr-employment-status.enum.js +14 -0
  7. package/dist/api/hr/hr-employment-type.enum.d.ts +6 -0
  8. package/dist/api/hr/hr-employment-type.enum.js +7 -0
  9. package/dist/api/hr/hr-leave-accrual.enum.d.ts +7 -0
  10. package/dist/api/hr/hr-leave-accrual.enum.js +8 -0
  11. package/dist/api/hr/hr-leave-ledger-kind.enum.d.ts +9 -0
  12. package/dist/api/hr/hr-leave-ledger-kind.enum.js +10 -0
  13. package/dist/api/hr/hr-leave-request-status.enum.d.ts +6 -0
  14. package/dist/api/hr/hr-leave-request-status.enum.js +7 -0
  15. package/dist/api/hr/hr-pay-period.enum.d.ts +4 -0
  16. package/dist/api/hr/hr-pay-period.enum.js +5 -0
  17. package/dist/api/hr/hr-resource-status.enum.d.ts +5 -0
  18. package/dist/api/hr/hr-resource-status.enum.js +6 -0
  19. package/dist/api/hr/index.d.ts +10 -0
  20. package/dist/api/hr/index.js +10 -0
  21. package/dist/api/hr/localized-text.type.d.ts +7 -0
  22. package/dist/api/hr/localized-text.type.js +1 -0
  23. package/dist/api/realtime/realtime-event-type.enum.d.ts +8 -1
  24. package/dist/api/realtime/realtime-event-type.enum.js +7 -0
  25. package/dist/api/realtime/realtime-resource-type.enum.d.ts +3 -1
  26. package/dist/api/realtime/realtime-resource-type.enum.js +2 -0
  27. package/dist/api/restaurant/index.d.ts +19 -0
  28. package/dist/api/restaurant/index.js +19 -0
  29. package/dist/api/restaurant/restaurant-allergen.enum.d.ts +17 -0
  30. package/dist/api/restaurant/restaurant-allergen.enum.js +18 -0
  31. package/dist/api/restaurant/restaurant-bill-status.enum.d.ts +6 -0
  32. package/dist/api/restaurant/restaurant-bill-status.enum.js +7 -0
  33. package/dist/api/restaurant/restaurant-bill.type.d.ts +124 -0
  34. package/dist/api/restaurant/restaurant-bill.type.js +1 -0
  35. package/dist/api/restaurant/restaurant-branch.type.d.ts +69 -0
  36. package/dist/api/restaurant/restaurant-branch.type.js +1 -0
  37. package/dist/api/restaurant/restaurant-channel.enum.d.ts +6 -0
  38. package/dist/api/restaurant/restaurant-channel.enum.js +7 -0
  39. package/dist/api/restaurant/restaurant-dietary-tag.enum.d.ts +9 -0
  40. package/dist/api/restaurant/restaurant-dietary-tag.enum.js +10 -0
  41. package/dist/api/restaurant/restaurant-floor.type.d.ts +29 -0
  42. package/dist/api/restaurant/restaurant-floor.type.js +1 -0
  43. package/dist/api/restaurant/restaurant-kitchen.type.d.ts +48 -0
  44. package/dist/api/restaurant/restaurant-kitchen.type.js +1 -0
  45. package/dist/api/restaurant/restaurant-line-status.enum.d.ts +7 -0
  46. package/dist/api/restaurant/restaurant-line-status.enum.js +8 -0
  47. package/dist/api/restaurant/restaurant-menu.type.d.ts +141 -0
  48. package/dist/api/restaurant/restaurant-menu.type.js +1 -0
  49. package/dist/api/restaurant/restaurant-order-source.enum.d.ts +6 -0
  50. package/dist/api/restaurant/restaurant-order-source.enum.js +7 -0
  51. package/dist/api/restaurant/restaurant-order-status.enum.d.ts +16 -0
  52. package/dist/api/restaurant/restaurant-order-status.enum.js +17 -0
  53. package/dist/api/restaurant/restaurant-order.type.d.ts +81 -0
  54. package/dist/api/restaurant/restaurant-order.type.js +1 -0
  55. package/dist/api/restaurant/restaurant-payment-method.enum.d.ts +6 -0
  56. package/dist/api/restaurant/restaurant-payment-method.enum.js +7 -0
  57. package/dist/api/restaurant/restaurant-profile.type.d.ts +40 -0
  58. package/dist/api/restaurant/restaurant-profile.type.js +1 -0
  59. package/dist/api/restaurant/restaurant-public.type.d.ts +129 -0
  60. package/dist/api/restaurant/restaurant-public.type.js +1 -0
  61. package/dist/api/restaurant/restaurant-resource-status.enum.d.ts +5 -0
  62. package/dist/api/restaurant/restaurant-resource-status.enum.js +6 -0
  63. package/dist/api/restaurant/restaurant-service-request.type.d.ts +16 -0
  64. package/dist/api/restaurant/restaurant-service-request.type.js +5 -0
  65. package/dist/api/restaurant/restaurant-table.type.d.ts +51 -0
  66. package/dist/api/restaurant/restaurant-table.type.js +1 -0
  67. package/dist/enum/user-permission.enum.d.ts +83 -1
  68. package/dist/enum/user-permission.enum.js +84 -0
  69. package/package.json +9 -1
@@ -0,0 +1,7 @@
1
+ /** What somebody did with pay or identity numbers, as written to the access log. */
2
+ export declare enum HrAccessAction {
3
+ READ_SENSITIVE = "read-sensitive",
4
+ CHANGE_SENSITIVE = "change-sensitive",
5
+ READ_PAY = "read-pay",
6
+ CHANGE_PAY = "change-pay"
7
+ }
@@ -0,0 +1,8 @@
1
+ /** What somebody did with pay or identity numbers, as written to the access log. */
2
+ export var HrAccessAction;
3
+ (function (HrAccessAction) {
4
+ HrAccessAction["READ_SENSITIVE"] = "read-sensitive";
5
+ HrAccessAction["CHANGE_SENSITIVE"] = "change-sensitive";
6
+ HrAccessAction["READ_PAY"] = "read-pay";
7
+ HrAccessAction["CHANGE_PAY"] = "change-pay";
8
+ })(HrAccessAction || (HrAccessAction = {}));
@@ -0,0 +1,8 @@
1
+ export declare enum HrEmploymentEventKind {
2
+ HIRED = "hired",
3
+ /** Their department, job title, location, manager or employment type changed. */
4
+ JOB_CHANGED = "job-changed",
5
+ LEFT = "left",
6
+ /** A last day that was set has been withdrawn. */
7
+ STAYED = "stayed"
8
+ }
@@ -0,0 +1,9 @@
1
+ export var HrEmploymentEventKind;
2
+ (function (HrEmploymentEventKind) {
3
+ HrEmploymentEventKind["HIRED"] = "hired";
4
+ /** Their department, job title, location, manager or employment type changed. */
5
+ HrEmploymentEventKind["JOB_CHANGED"] = "job-changed";
6
+ HrEmploymentEventKind["LEFT"] = "left";
7
+ /** A last day that was set has been withdrawn. */
8
+ HrEmploymentEventKind["STAYED"] = "stayed";
9
+ })(HrEmploymentEventKind || (HrEmploymentEventKind = {}));
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Where somebody is in their employment, worked out from their dates on every read.
3
+ *
4
+ * Never stored: a column would need a sweep to stay true, and would be wrong whenever the sweep was late.
5
+ */
6
+ export declare enum HrEmploymentStatus {
7
+ /** Their first day is still to come. */
8
+ UPCOMING = "upcoming",
9
+ ACTIVE = "active",
10
+ /** A last day is set and has not passed. */
11
+ LEAVING = "leaving",
12
+ FORMER = "former"
13
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Where somebody is in their employment, worked out from their dates on every read.
3
+ *
4
+ * Never stored: a column would need a sweep to stay true, and would be wrong whenever the sweep was late.
5
+ */
6
+ export var HrEmploymentStatus;
7
+ (function (HrEmploymentStatus) {
8
+ /** Their first day is still to come. */
9
+ HrEmploymentStatus["UPCOMING"] = "upcoming";
10
+ HrEmploymentStatus["ACTIVE"] = "active";
11
+ /** A last day is set and has not passed. */
12
+ HrEmploymentStatus["LEAVING"] = "leaving";
13
+ HrEmploymentStatus["FORMER"] = "former";
14
+ })(HrEmploymentStatus || (HrEmploymentStatus = {}));
@@ -0,0 +1,6 @@
1
+ export declare enum HrEmploymentType {
2
+ FULL_TIME = "full-time",
3
+ PART_TIME = "part-time",
4
+ CONTRACTOR = "contractor",
5
+ INTERN = "intern"
6
+ }
@@ -0,0 +1,7 @@
1
+ export var HrEmploymentType;
2
+ (function (HrEmploymentType) {
3
+ HrEmploymentType["FULL_TIME"] = "full-time";
4
+ HrEmploymentType["PART_TIME"] = "part-time";
5
+ HrEmploymentType["CONTRACTOR"] = "contractor";
6
+ HrEmploymentType["INTERN"] = "intern";
7
+ })(HrEmploymentType || (HrEmploymentType = {}));
@@ -0,0 +1,7 @@
1
+ /** How a leave type's yearly allowance arrives. */
2
+ export declare enum HrLeaveAccrual {
3
+ /** All of it on the first day of the year. */
4
+ UPFRONT = "upfront",
5
+ /** A twelfth each month. */
6
+ MONTHLY = "monthly"
7
+ }
@@ -0,0 +1,8 @@
1
+ /** How a leave type's yearly allowance arrives. */
2
+ export var HrLeaveAccrual;
3
+ (function (HrLeaveAccrual) {
4
+ /** All of it on the first day of the year. */
5
+ HrLeaveAccrual["UPFRONT"] = "upfront";
6
+ /** A twelfth each month. */
7
+ HrLeaveAccrual["MONTHLY"] = "monthly";
8
+ })(HrLeaveAccrual || (HrLeaveAccrual = {}));
@@ -0,0 +1,9 @@
1
+ /** Why a leave balance moved. A balance is the sum of these and is never stored. */
2
+ export declare enum HrLeaveLedgerKind {
3
+ ALLOWANCE = "allowance",
4
+ ACCRUAL = "accrual",
5
+ CARRY_OVER = "carry-over",
6
+ ADJUSTMENT = "adjustment",
7
+ TAKEN = "taken",
8
+ RETURNED = "returned"
9
+ }
@@ -0,0 +1,10 @@
1
+ /** Why a leave balance moved. A balance is the sum of these and is never stored. */
2
+ export var HrLeaveLedgerKind;
3
+ (function (HrLeaveLedgerKind) {
4
+ HrLeaveLedgerKind["ALLOWANCE"] = "allowance";
5
+ HrLeaveLedgerKind["ACCRUAL"] = "accrual";
6
+ HrLeaveLedgerKind["CARRY_OVER"] = "carry-over";
7
+ HrLeaveLedgerKind["ADJUSTMENT"] = "adjustment";
8
+ HrLeaveLedgerKind["TAKEN"] = "taken";
9
+ HrLeaveLedgerKind["RETURNED"] = "returned";
10
+ })(HrLeaveLedgerKind || (HrLeaveLedgerKind = {}));
@@ -0,0 +1,6 @@
1
+ export declare enum HrLeaveRequestStatus {
2
+ PENDING = "pending",
3
+ APPROVED = "approved",
4
+ REJECTED = "rejected",
5
+ CANCELLED = "cancelled"
6
+ }
@@ -0,0 +1,7 @@
1
+ export var HrLeaveRequestStatus;
2
+ (function (HrLeaveRequestStatus) {
3
+ HrLeaveRequestStatus["PENDING"] = "pending";
4
+ HrLeaveRequestStatus["APPROVED"] = "approved";
5
+ HrLeaveRequestStatus["REJECTED"] = "rejected";
6
+ HrLeaveRequestStatus["CANCELLED"] = "cancelled";
7
+ })(HrLeaveRequestStatus || (HrLeaveRequestStatus = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum HrPayPeriod {
2
+ MONTH = "month",
3
+ HOUR = "hour"
4
+ }
@@ -0,0 +1,5 @@
1
+ export var HrPayPeriod;
2
+ (function (HrPayPeriod) {
3
+ HrPayPeriod["MONTH"] = "month";
4
+ HrPayPeriod["HOUR"] = "hour";
5
+ })(HrPayPeriod || (HrPayPeriod = {}));
@@ -0,0 +1,5 @@
1
+ /** Whether a location, department, job title or leave type is still offered. Records that name one keep it. */
2
+ export declare enum HrResourceStatus {
3
+ ACTIVE = "active",
4
+ INACTIVE = "inactive"
5
+ }
@@ -0,0 +1,6 @@
1
+ /** Whether a location, department, job title or leave type is still offered. Records that name one keep it. */
2
+ export var HrResourceStatus;
3
+ (function (HrResourceStatus) {
4
+ HrResourceStatus["ACTIVE"] = "active";
5
+ HrResourceStatus["INACTIVE"] = "inactive";
6
+ })(HrResourceStatus || (HrResourceStatus = {}));
@@ -0,0 +1,10 @@
1
+ export * from './hr-access-action.enum.js';
2
+ export * from './hr-employment-event-kind.enum.js';
3
+ export * from './hr-employment-status.enum.js';
4
+ export * from './hr-employment-type.enum.js';
5
+ export * from './hr-leave-accrual.enum.js';
6
+ export * from './hr-leave-ledger-kind.enum.js';
7
+ export * from './hr-leave-request-status.enum.js';
8
+ export * from './hr-pay-period.enum.js';
9
+ export * from './hr-resource-status.enum.js';
10
+ export * from './localized-text.type.js';
@@ -0,0 +1,10 @@
1
+ export * from './hr-access-action.enum.js';
2
+ export * from './hr-employment-event-kind.enum.js';
3
+ export * from './hr-employment-status.enum.js';
4
+ export * from './hr-employment-type.enum.js';
5
+ export * from './hr-leave-accrual.enum.js';
6
+ export * from './hr-leave-ledger-kind.enum.js';
7
+ export * from './hr-leave-request-status.enum.js';
8
+ export * from './hr-pay-period.enum.js';
9
+ export * from './hr-resource-status.enum.js';
10
+ export * from './localized-text.type.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Text written in each language it has been written in, keyed by locale.
3
+ *
4
+ * Used for what ships in three languages and a company may change, such as a leave type or a
5
+ * public holiday. What a company types for its own staff, such as a department, is plain text.
6
+ */
7
+ export type LocalizedText = Record<string, string>;
@@ -0,0 +1 @@
1
+ export {};
@@ -24,5 +24,12 @@ export declare enum RealtimeEventType {
24
24
  * repeat a value the profile events already used and be silently discarded by the outbox's
25
25
  * uniqueness constraint. `mobility_worker_outbox_event.aggregate_type` exists for this.
26
26
  */
27
- MOBILITY_DISPATCH_OFFER_UPDATED = "mobility.dispatch-offer.updated"
27
+ MOBILITY_DISPATCH_OFFER_UPDATED = "mobility.dispatch-offer.updated",
28
+ /**
29
+ * Something on a branch's floor or kitchen changed, so staff screens refetch. Carried on the
30
+ * branch, while the version is that of whichever order or bill moved.
31
+ */
32
+ RESTAURANT_BRANCH_UPDATED = "restaurant.branch.updated",
33
+ /** One diner's order moved. */
34
+ RESTAURANT_ORDER_UPDATED = "restaurant.order.updated"
28
35
  }
@@ -26,4 +26,11 @@ export var RealtimeEventType;
26
26
  * uniqueness constraint. `mobility_worker_outbox_event.aggregate_type` exists for this.
27
27
  */
28
28
  RealtimeEventType["MOBILITY_DISPATCH_OFFER_UPDATED"] = "mobility.dispatch-offer.updated";
29
+ /**
30
+ * Something on a branch's floor or kitchen changed, so staff screens refetch. Carried on the
31
+ * branch, while the version is that of whichever order or bill moved.
32
+ */
33
+ RealtimeEventType["RESTAURANT_BRANCH_UPDATED"] = "restaurant.branch.updated";
34
+ /** One diner's order moved. */
35
+ RealtimeEventType["RESTAURANT_ORDER_UPDATED"] = "restaurant.order.updated";
29
36
  })(RealtimeEventType || (RealtimeEventType = {}));
@@ -8,5 +8,7 @@ export declare enum RealtimeResourceType {
8
8
  TAXI_RIDE = "taxi.ride",
9
9
  DELIVERY_JOB = "delivery.job",
10
10
  MOBILITY_WORKER = "mobility.worker",
11
- MOBILITY_DISPATCH = "mobility.dispatch"
11
+ MOBILITY_DISPATCH = "mobility.dispatch",
12
+ RESTAURANT_BRANCH = "restaurant.branch",
13
+ RESTAURANT_ORDER = "restaurant.order"
12
14
  }
@@ -10,4 +10,6 @@ export var RealtimeResourceType;
10
10
  RealtimeResourceType["DELIVERY_JOB"] = "delivery.job";
11
11
  RealtimeResourceType["MOBILITY_WORKER"] = "mobility.worker";
12
12
  RealtimeResourceType["MOBILITY_DISPATCH"] = "mobility.dispatch";
13
+ RealtimeResourceType["RESTAURANT_BRANCH"] = "restaurant.branch";
14
+ RealtimeResourceType["RESTAURANT_ORDER"] = "restaurant.order";
13
15
  })(RealtimeResourceType || (RealtimeResourceType = {}));
@@ -0,0 +1,19 @@
1
+ export * from './restaurant-allergen.enum.js';
2
+ export * from './restaurant-bill-status.enum.js';
3
+ export * from './restaurant-bill.type.js';
4
+ export * from './restaurant-branch.type.js';
5
+ export * from './restaurant-channel.enum.js';
6
+ export * from './restaurant-dietary-tag.enum.js';
7
+ export * from './restaurant-floor.type.js';
8
+ export * from './restaurant-kitchen.type.js';
9
+ export * from './restaurant-line-status.enum.js';
10
+ export * from './restaurant-menu.type.js';
11
+ export * from './restaurant-order-source.enum.js';
12
+ export * from './restaurant-order-status.enum.js';
13
+ export * from './restaurant-order.type.js';
14
+ export * from './restaurant-payment-method.enum.js';
15
+ export * from './restaurant-profile.type.js';
16
+ export * from './restaurant-public.type.js';
17
+ export * from './restaurant-resource-status.enum.js';
18
+ export * from './restaurant-service-request.type.js';
19
+ export * from './restaurant-table.type.js';
@@ -0,0 +1,19 @@
1
+ export * from './restaurant-allergen.enum.js';
2
+ export * from './restaurant-bill-status.enum.js';
3
+ export * from './restaurant-bill.type.js';
4
+ export * from './restaurant-branch.type.js';
5
+ export * from './restaurant-channel.enum.js';
6
+ export * from './restaurant-dietary-tag.enum.js';
7
+ export * from './restaurant-floor.type.js';
8
+ export * from './restaurant-kitchen.type.js';
9
+ export * from './restaurant-line-status.enum.js';
10
+ export * from './restaurant-menu.type.js';
11
+ export * from './restaurant-order-source.enum.js';
12
+ export * from './restaurant-order-status.enum.js';
13
+ export * from './restaurant-order.type.js';
14
+ export * from './restaurant-payment-method.enum.js';
15
+ export * from './restaurant-profile.type.js';
16
+ export * from './restaurant-public.type.js';
17
+ export * from './restaurant-resource-status.enum.js';
18
+ export * from './restaurant-service-request.type.js';
19
+ export * from './restaurant-table.type.js';
@@ -0,0 +1,17 @@
1
+ /** The fourteen allergens EU food labelling names, the list a Georgian menu is usually held to. */
2
+ export declare enum RestaurantAllergen {
3
+ GLUTEN = "gluten",
4
+ CRUSTACEANS = "crustaceans",
5
+ EGGS = "eggs",
6
+ FISH = "fish",
7
+ PEANUTS = "peanuts",
8
+ SOYBEANS = "soybeans",
9
+ MILK = "milk",
10
+ TREE_NUTS = "tree-nuts",
11
+ CELERY = "celery",
12
+ MUSTARD = "mustard",
13
+ SESAME = "sesame",
14
+ SULPHITES = "sulphites",
15
+ LUPIN = "lupin",
16
+ MOLLUSCS = "molluscs"
17
+ }
@@ -0,0 +1,18 @@
1
+ /** The fourteen allergens EU food labelling names, the list a Georgian menu is usually held to. */
2
+ export var RestaurantAllergen;
3
+ (function (RestaurantAllergen) {
4
+ RestaurantAllergen["GLUTEN"] = "gluten";
5
+ RestaurantAllergen["CRUSTACEANS"] = "crustaceans";
6
+ RestaurantAllergen["EGGS"] = "eggs";
7
+ RestaurantAllergen["FISH"] = "fish";
8
+ RestaurantAllergen["PEANUTS"] = "peanuts";
9
+ RestaurantAllergen["SOYBEANS"] = "soybeans";
10
+ RestaurantAllergen["MILK"] = "milk";
11
+ RestaurantAllergen["TREE_NUTS"] = "tree-nuts";
12
+ RestaurantAllergen["CELERY"] = "celery";
13
+ RestaurantAllergen["MUSTARD"] = "mustard";
14
+ RestaurantAllergen["SESAME"] = "sesame";
15
+ RestaurantAllergen["SULPHITES"] = "sulphites";
16
+ RestaurantAllergen["LUPIN"] = "lupin";
17
+ RestaurantAllergen["MOLLUSCS"] = "molluscs";
18
+ })(RestaurantAllergen || (RestaurantAllergen = {}));
@@ -0,0 +1,6 @@
1
+ /** A bill is open until what it adds up to has been paid, or it is called off. */
2
+ export declare enum RestaurantBillStatus {
3
+ OPEN = "open",
4
+ SETTLED = "settled",
5
+ CANCELLED = "cancelled"
6
+ }
@@ -0,0 +1,7 @@
1
+ /** A bill is open until what it adds up to has been paid, or it is called off. */
2
+ export var RestaurantBillStatus;
3
+ (function (RestaurantBillStatus) {
4
+ RestaurantBillStatus["OPEN"] = "open";
5
+ RestaurantBillStatus["SETTLED"] = "settled";
6
+ RestaurantBillStatus["CANCELLED"] = "cancelled";
7
+ })(RestaurantBillStatus || (RestaurantBillStatus = {}));
@@ -0,0 +1,124 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { UUID } from '../../type/uuid.type.js';
3
+ import type { RestaurantBillStatus } from './restaurant-bill-status.enum.js';
4
+ import type { RestaurantChannel } from './restaurant-channel.enum.js';
5
+ import type { RestaurantOrder } from './restaurant-order.type.js';
6
+ import type { RestaurantPaymentMethod } from './restaurant-payment-method.enum.js';
7
+ export interface RestaurantPayment {
8
+ id: UUID;
9
+ billId: UUID;
10
+ method: RestaurantPaymentMethod;
11
+ /** Negative for a refund. */
12
+ amountMinor: number;
13
+ tipMinor: number;
14
+ /** The payment a refund gives back. */
15
+ refundOfId: UUID | null;
16
+ note: string | null;
17
+ recordedByUserId: UUID | null;
18
+ createdAt: IsoDateTime;
19
+ }
20
+ /** What a table has run up, or what one takeaway adds up to. */
21
+ export interface RestaurantBill {
22
+ id: UUID;
23
+ branchId: UUID;
24
+ tableId: UUID | null;
25
+ tableLabel: string | null;
26
+ channel: RestaurantChannel;
27
+ status: RestaurantBillStatus;
28
+ currency: string;
29
+ subtotalMinor: number;
30
+ serviceChargeBasisPoints: number;
31
+ serviceChargeMinor: number;
32
+ deliveryFeeMinor: number;
33
+ discountMinor: number;
34
+ totalMinor: number;
35
+ /** Net of refunds. */
36
+ paidMinor: number;
37
+ /** What is still owing, never below zero. */
38
+ balanceMinor: number;
39
+ tipMinor: number;
40
+ orders: RestaurantOrder[];
41
+ payments: RestaurantPayment[];
42
+ openedAt: IsoDateTime;
43
+ closedAt: IsoDateTime | null;
44
+ }
45
+ /** A bill as a line in a list. */
46
+ export interface RestaurantBillSummary {
47
+ id: UUID;
48
+ branchId: UUID;
49
+ tableLabel: string | null;
50
+ channel: RestaurantChannel;
51
+ status: RestaurantBillStatus;
52
+ currency: string;
53
+ totalMinor: number;
54
+ paidMinor: number;
55
+ balanceMinor: number;
56
+ openedAt: IsoDateTime;
57
+ closedAt: IsoDateTime | null;
58
+ }
59
+ export interface RecordRestaurantPaymentRequest {
60
+ method: RestaurantPaymentMethod.CASH | RestaurantPaymentMethod.CARD;
61
+ amountMinor: number;
62
+ tipMinor?: number;
63
+ note?: string | null;
64
+ }
65
+ export interface RefundRestaurantPaymentRequest {
66
+ amountMinor: number;
67
+ reason: string;
68
+ }
69
+ /** One way of paying over a day. Refunds are netted out, so `cash` is what the drawer should hold. */
70
+ export interface RestaurantTakingsByMethod {
71
+ method: RestaurantPaymentMethod;
72
+ amountMinor: number;
73
+ tipMinor: number;
74
+ count: number;
75
+ }
76
+ export interface RestaurantDailyTakings {
77
+ branchId: UUID;
78
+ /** The business day, in the branch's own calendar. */
79
+ date: string;
80
+ currency: string;
81
+ totalMinor: number;
82
+ tipMinor: number;
83
+ byMethod: RestaurantTakingsByMethod[];
84
+ refundsMinor: number;
85
+ billsSettled: number;
86
+ /** Bills from that day still owing something. */
87
+ billsOpen: number;
88
+ openBalanceMinor: number;
89
+ }
90
+ export interface RestaurantSalesByChannel {
91
+ channel: RestaurantChannel;
92
+ orderCount: number;
93
+ salesMinor: number;
94
+ }
95
+ export interface RestaurantSalesByItem {
96
+ itemId: UUID;
97
+ name: Record<string, string>;
98
+ quantity: number;
99
+ salesMinor: number;
100
+ }
101
+ export interface RestaurantSalesByHour {
102
+ /** In the branch's zone, 0 to 23. */
103
+ hour: number;
104
+ orderCount: number;
105
+ salesMinor: number;
106
+ }
107
+ export interface RestaurantSalesByDay {
108
+ date: string;
109
+ orderCount: number;
110
+ salesMinor: number;
111
+ }
112
+ export interface RestaurantSalesReport {
113
+ branchId: UUID;
114
+ from: string;
115
+ to: string;
116
+ currency: string;
117
+ orderCount: number;
118
+ salesMinor: number;
119
+ averageOrderMinor: number;
120
+ byChannel: RestaurantSalesByChannel[];
121
+ byDay: RestaurantSalesByDay[];
122
+ byHour: RestaurantSalesByHour[];
123
+ topItems: RestaurantSalesByItem[];
124
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,69 @@
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
+ /**
6
+ * When a branch is open, as wall-clock times in its own zone. `dayOfWeek` is 0 for Sunday. A `closesAt`
7
+ * at or before `opensAt` runs past midnight, as a bar's does.
8
+ */
9
+ export interface RestaurantOpeningPeriod {
10
+ dayOfWeek: number;
11
+ opensAt: string;
12
+ closesAt: string;
13
+ }
14
+ /** What a branch offers and how it runs. Each channel is off until somebody turns it on. */
15
+ export interface RestaurantBranchSettings {
16
+ dineInEnabled: boolean;
17
+ takeawayEnabled: boolean;
18
+ deliveryEnabled: boolean;
19
+ reservationsEnabled: boolean;
20
+ /** Whether an order from a table waits for a waiter. On by default, because a table code is printed. */
21
+ tableOrdersNeedConfirmation: boolean;
22
+ /** Basis points on a dine-in bill: 1000 is 10%. */
23
+ serviceChargeBasisPoints: number;
24
+ takeawayPrepMinutes: number;
25
+ deliveryPrepMinutes: number;
26
+ /** Straight-line distance from the branch. */
27
+ deliveryRadiusMeters: number;
28
+ deliveryFeeMinor: number;
29
+ deliveryMinimumOrderMinor: number;
30
+ /** Null means delivery is never free. */
31
+ deliveryFreeOverMinor: number | null;
32
+ reservationSlotMinutes: number;
33
+ reservationDurationMinutes: number;
34
+ reservationLeadMinutes: number;
35
+ reservationMaxPartySize: number;
36
+ /** A ticket turns amber after this long. */
37
+ kitchenWarnMinutes: number;
38
+ /** A ticket turns red after this long. */
39
+ kitchenLateMinutes: number;
40
+ /** When the branch's day rolls over, for order numbers, the stop-list and takings. `05:00` by default. */
41
+ businessDayEndsAt: string;
42
+ }
43
+ export interface RestaurantBranch extends RestaurantBranchSettings {
44
+ id: UUID;
45
+ name: LocalizedText;
46
+ address: LocalizedText;
47
+ city: LocalizedText;
48
+ phone: string | null;
49
+ latitude: number | null;
50
+ longitude: number | null;
51
+ timeZone: string;
52
+ status: RestaurantResourceStatus;
53
+ openingHours: RestaurantOpeningPeriod[];
54
+ createdAt: IsoDateTime;
55
+ updatedAt: IsoDateTime;
56
+ }
57
+ export interface CreateRestaurantBranchRequest extends Partial<RestaurantBranchSettings> {
58
+ name: LocalizedText;
59
+ address: LocalizedText;
60
+ city: LocalizedText;
61
+ phone?: string | null;
62
+ latitude?: number | null;
63
+ longitude?: number | null;
64
+ timeZone: string;
65
+ openingHours?: RestaurantOpeningPeriod[];
66
+ }
67
+ export interface UpdateRestaurantBranchRequest extends Partial<CreateRestaurantBranchRequest> {
68
+ status?: RestaurantResourceStatus;
69
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /** How an order reaches the diner. */
2
+ export declare enum RestaurantChannel {
3
+ DINE_IN = "dine-in",
4
+ TAKEAWAY = "takeaway",
5
+ DELIVERY = "delivery"
6
+ }
@@ -0,0 +1,7 @@
1
+ /** How an order reaches the diner. */
2
+ export var RestaurantChannel;
3
+ (function (RestaurantChannel) {
4
+ RestaurantChannel["DINE_IN"] = "dine-in";
5
+ RestaurantChannel["TAKEAWAY"] = "takeaway";
6
+ RestaurantChannel["DELIVERY"] = "delivery";
7
+ })(RestaurantChannel || (RestaurantChannel = {}));
@@ -0,0 +1,9 @@
1
+ /** What a diner filters a menu by. `lenten` is the Orthodox fasting mark Georgian menus carry. */
2
+ export declare enum RestaurantDietaryTag {
3
+ VEGETARIAN = "vegetarian",
4
+ VEGAN = "vegan",
5
+ LENTEN = "lenten",
6
+ HALAL = "halal",
7
+ GLUTEN_FREE = "gluten-free",
8
+ SPICY = "spicy"
9
+ }
@@ -0,0 +1,10 @@
1
+ /** What a diner filters a menu by. `lenten` is the Orthodox fasting mark Georgian menus carry. */
2
+ export var RestaurantDietaryTag;
3
+ (function (RestaurantDietaryTag) {
4
+ RestaurantDietaryTag["VEGETARIAN"] = "vegetarian";
5
+ RestaurantDietaryTag["VEGAN"] = "vegan";
6
+ RestaurantDietaryTag["LENTEN"] = "lenten";
7
+ RestaurantDietaryTag["HALAL"] = "halal";
8
+ RestaurantDietaryTag["GLUTEN_FREE"] = "gluten-free";
9
+ RestaurantDietaryTag["SPICY"] = "spicy";
10
+ })(RestaurantDietaryTag || (RestaurantDietaryTag = {}));
@@ -0,0 +1,29 @@
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 { RestaurantServiceRequest } from './restaurant-service-request.type.js';
5
+ /** The state of one table on the floor map. */
6
+ export interface RestaurantFloorTable {
7
+ id: UUID;
8
+ label: string;
9
+ seats: number;
10
+ /** The open bill, if somebody is sitting here. */
11
+ billId: UUID | null;
12
+ openedAt: IsoDateTime | null;
13
+ totalMinor: number;
14
+ /** Orders from this table waiting for a waiter to accept them. */
15
+ ordersWaiting: number;
16
+ /** Orders whose food is ready to carry over. */
17
+ ordersReady: number;
18
+ serviceRequests: RestaurantServiceRequest[];
19
+ }
20
+ export interface RestaurantFloorAreaView {
21
+ id: UUID;
22
+ name: LocalizedText;
23
+ tables: RestaurantFloorTable[];
24
+ }
25
+ export interface RestaurantFloor {
26
+ branchId: UUID;
27
+ currency: string;
28
+ areas: RestaurantFloorAreaView[];
29
+ }
@@ -0,0 +1 @@
1
+ export {};