@iveri/contracts 0.121.0 → 0.123.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
@@ -236,6 +236,10 @@ What a company running a taxi service reads in its own panel: `TaxiRideStatus`,
236
236
  report sums quoted fares of completed rides, never earnings: nothing settles a fare yet.
237
237
  - **A day's totals are the rides requested on it**, so `completed` can never exceed `requested`, and the panel names the
238
238
  time zone the days were cut in.
239
+ - **`TaxiRefusal` is the refusals a passenger or driver can act on**, sent as `details.reason` (`quote-expired`,
240
+ `not-cancellable`, `ride-moved-on`, `not-assigned-driver`, `schedule-window` with `minLeadMinutes` and `maxDays`,
241
+ `places-full` with `limit`, `place-name-taken`). A client says each in its reader's language and shows the API's
242
+ English for a reason it does not know.
239
243
 
240
244
  ### `api/delivery/` → `@iveri/contracts/delivery`
241
245
 
@@ -246,6 +250,9 @@ daily totals (`DeliveryDailyReport`).
246
250
 
247
251
  - **A job the company asked for itself has no sender** (`senderUserId: null`), as a shop shipping its own orders does;
248
252
  it is on the board and in the totals, and in nobody's row of the senders list.
253
+ - **`DeliveryRefusal` is the refusals a sender or courier can act on**, sent as `details.reason` (`quote-expired`,
254
+ `not-cancellable`, `job-moved-on`, `not-assigned-courier`, and for a proof photo `photo-too-large` with
255
+ `maxMegabytes`, `photo-format`, `photo-unreadable`, `photo-limit` with `limit`, `photo-retry`).
249
256
  - **Proof is a yes or no and the recipient's name.** The photograph is private evidence and is never in these shapes.
250
257
  - **`expired` folds quote-expired into no courier found, and `failed` stays apart**, because a refused request is a
251
258
  fault on Iveri's side rather than the company's.
@@ -286,6 +293,8 @@ Conduit's outbox.
286
293
  `localization:render` permissions.
287
294
  - Version `0.100.0` adds `notification:send-any`, the password-reset bodies and Conduit's usage metrics.
288
295
  - Version `0.101.0` adds `UsageHistory`, a company's closed months of a product by metric.
296
+ - Version `0.123.0` adds `HrRefusal`, the HR refusals a client says in the reader's language.
297
+ - Version `0.122.0` adds `RestaurantRefusal`, the restaurant refusals a client says in the reader's language.
289
298
  - Version `0.121.0` adds Conduit's route test: `RouteTestResult`, `TestRouteBody`, `RouteCriterion` and
290
299
  `RouteCriterionMiss`. (Tagged first as `v0.119.0`, which npm refused once 0.120.0 was out; 0.119.0 does not
291
300
  exist on npm.)
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A delivery refusal a person can act on, sent as `details.reason` so a sender's or a courier's app says it in the
3
+ * reader's language rather than showing the API's English. A company whose licence has lapsed is refused with the
4
+ * platform's own `licence-inactive`, which is not repeated here.
5
+ */
6
+ export declare enum DeliveryRefusal {
7
+ /** The price was not accepted in time, so the delivery has to be requested again. */
8
+ QUOTE_EXPIRED = "quote-expired",
9
+ /** A courier is being found or already has the parcel, so the delivery can no longer be cancelled. */
10
+ NOT_CANCELLABLE = "not-cancellable",
11
+ /** The delivery has already moved past that step, or ended; refreshing shows where it stands. */
12
+ JOB_MOVED_ON = "job-moved-on",
13
+ /** The delivery was given to another courier, or was never this courier's. */
14
+ NOT_ASSIGNED_COURIER = "not-assigned-courier",
15
+ /** The proof photo is larger than the API takes; `details.maxMegabytes` says how large it may be. */
16
+ PHOTO_TOO_LARGE = "photo-too-large",
17
+ /** The proof photo is neither a JPEG nor a PNG. */
18
+ PHOTO_FORMAT = "photo-format",
19
+ /** The proof photo could not be read as an image. */
20
+ PHOTO_UNREADABLE = "photo-unreadable",
21
+ /** The delivery already holds as many proof photos as it takes; `details.limit` says how many. */
22
+ PHOTO_LIMIT = "photo-limit",
23
+ /** The same photo is still being stored, or its upload ran out of time; sending it again finishes it. */
24
+ PHOTO_RETRY = "photo-retry"
25
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * A delivery refusal a person can act on, sent as `details.reason` so a sender's or a courier's app says it in the
3
+ * reader's language rather than showing the API's English. A company whose licence has lapsed is refused with the
4
+ * platform's own `licence-inactive`, which is not repeated here.
5
+ */
6
+ export var DeliveryRefusal;
7
+ (function (DeliveryRefusal) {
8
+ /** The price was not accepted in time, so the delivery has to be requested again. */
9
+ DeliveryRefusal["QUOTE_EXPIRED"] = "quote-expired";
10
+ /** A courier is being found or already has the parcel, so the delivery can no longer be cancelled. */
11
+ DeliveryRefusal["NOT_CANCELLABLE"] = "not-cancellable";
12
+ /** The delivery has already moved past that step, or ended; refreshing shows where it stands. */
13
+ DeliveryRefusal["JOB_MOVED_ON"] = "job-moved-on";
14
+ /** The delivery was given to another courier, or was never this courier's. */
15
+ DeliveryRefusal["NOT_ASSIGNED_COURIER"] = "not-assigned-courier";
16
+ /** The proof photo is larger than the API takes; `details.maxMegabytes` says how large it may be. */
17
+ DeliveryRefusal["PHOTO_TOO_LARGE"] = "photo-too-large";
18
+ /** The proof photo is neither a JPEG nor a PNG. */
19
+ DeliveryRefusal["PHOTO_FORMAT"] = "photo-format";
20
+ /** The proof photo could not be read as an image. */
21
+ DeliveryRefusal["PHOTO_UNREADABLE"] = "photo-unreadable";
22
+ /** The delivery already holds as many proof photos as it takes; `details.limit` says how many. */
23
+ DeliveryRefusal["PHOTO_LIMIT"] = "photo-limit";
24
+ /** The same photo is still being stored, or its upload ran out of time; sending it again finishes it. */
25
+ DeliveryRefusal["PHOTO_RETRY"] = "photo-retry";
26
+ })(DeliveryRefusal || (DeliveryRefusal = {}));
@@ -1,2 +1,3 @@
1
1
  export * from './delivery-admin.type.js';
2
2
  export * from './delivery-job-status.enum.js';
3
+ export * from './delivery-refusal.enum.js';
@@ -1,2 +1,3 @@
1
1
  export * from './delivery-admin.type.js';
2
2
  export * from './delivery-job-status.enum.js';
3
+ export * from './delivery-refusal.enum.js';
@@ -0,0 +1,111 @@
1
+ /**
2
+ * An HR refusal a person can act on, sent as `details.reason` so a client says it in the reader's language rather than
3
+ * showing the API's English. A number a sentence needs travels beside it in `details`, named on the member. A refusal
4
+ * nobody meets through a client, such as a malformed body, has no member and keeps its English.
5
+ */
6
+ export declare enum HrRefusal {
7
+ /** There is already time off, waiting or agreed, on some of those days. */
8
+ TIME_OFF_OVERLAP = "time-off-overlap",
9
+ /** That kind of time off is no longer offered. */
10
+ LEAVE_TYPE_RETIRED = "leave-type-retired",
11
+ /** It starts too soon; `details.minNoticeDays` says how much notice it needs. */
12
+ NOTICE_TOO_SHORT = "notice-too-short",
13
+ /** The waiting period for that kind of time off has not ended; `details.availableFrom` is the first day it may start. */
14
+ LEAVE_NOT_YET = "leave-not-yet",
15
+ /** Not enough days are left in the year for it. */
16
+ NOT_ENOUGH_DAYS = "not-enough-days",
17
+ /** Not enough days are left in that quarter for it. */
18
+ NOT_ENOUGH_DAYS_IN_QUARTER = "not-enough-days-in-quarter",
19
+ /** None of the days asked for is a working day. */
20
+ NO_WORKING_DAYS = "no-working-days",
21
+ /** The days fall before the person's first day or after their last. */
22
+ OUTSIDE_EMPLOYMENT = "outside-employment",
23
+ /** The time off has started, so only HR can change it. */
24
+ LEAVE_STARTED = "leave-started",
25
+ /** The request can no longer be cancelled. */
26
+ NOT_CANCELLABLE = "not-cancellable",
27
+ /** Somebody has already decided it: a request, a correction, a letter or a probation. */
28
+ ALREADY_DECIDED = "already-decided",
29
+ /** The person has left the company. */
30
+ PERSON_LEFT = "person-left",
31
+ /** Some of those days are already in a plan. */
32
+ PLAN_OVERLAP = "plan-overlap",
33
+ /** That day has already gone. */
34
+ DAY_PASSED = "day-passed",
35
+ /** That day is not a working day. */
36
+ NOT_A_WORKING_DAY = "not-a-working-day",
37
+ /** Time off already covers that day. */
38
+ TIME_OFF_THAT_DAY = "time-off-that-day",
39
+ /** The week already has as many home days as the company allows; `details.homeDaysPerWeek` says how many. */
40
+ HOME_DAY_LIMIT = "home-day-limit",
41
+ /** Too far ahead; `details.maxDaysAhead` says how far a day may be. */
42
+ TOO_FAR_AHEAD = "too-far-ahead",
43
+ /** The person is not clocked in. */
44
+ NOT_CLOCKED_IN = "not-clocked-in",
45
+ /** An earlier shift was never clocked out of, so that one is corrected first. */
46
+ OPEN_SHIFT = "open-shift",
47
+ /** The shift overlaps another one. */
48
+ SHIFT_OVERLAP = "shift-overlap",
49
+ /** The shift is longer than a shift may be; `details.maxHours` says how long. */
50
+ SHIFT_TOO_LONG = "shift-too-long",
51
+ /** The shift ends in the future. */
52
+ SHIFT_IN_FUTURE = "shift-in-future",
53
+ /** That shift already has a correction waiting. */
54
+ CORRECTION_PENDING = "correction-pending",
55
+ /** Somebody already stands in for the person on some of those days. */
56
+ STAND_IN_OVERLAP = "stand-in-overlap",
57
+ /** The person decides nobody's requests, so there is nothing to hand over. */
58
+ NOTHING_TO_HAND_OVER = "nothing-to-hand-over",
59
+ /** Longer than a stand-in may last; `details.maxDays` says how long. */
60
+ STAND_IN_TOO_LONG = "stand-in-too-long",
61
+ /** A claim is sent with its receipt. */
62
+ RECEIPT_REQUIRED = "receipt-required",
63
+ /** Somebody else decides a person's own claim. */
64
+ OWN_CLAIM = "own-claim",
65
+ /** A pay run has taken the claim; it is removed from the run first. */
66
+ CLAIM_IN_PAY_RUN = "claim-in-pay-run",
67
+ /** That expense category can no longer be claimed for. */
68
+ CATEGORY_RETIRED = "category-retired",
69
+ /** Only a draft can be thrown away. */
70
+ NOT_A_DRAFT = "not-a-draft",
71
+ /** It has already been handed in: a review or a survey's answers. */
72
+ ALREADY_ANSWERED = "already-answered",
73
+ /** It is not open for answers: a review round or a survey. */
74
+ NOT_OPEN = "not-open",
75
+ /** A review is handed in with an overall rating. */
76
+ RATING_REQUIRED = "rating-required",
77
+ /** Every question is answered before it is handed in. */
78
+ ANSWERS_REQUIRED = "answers-required",
79
+ /** The course ends in a certificate, which is attached. */
80
+ CERTIFICATE_REQUIRED = "certificate-required",
81
+ /** The person already works on as many goals as they may; `details.maxGoals` says how many. */
82
+ GOAL_LIMIT = "goal-limit",
83
+ /** The goal is finished; it is reopened before it changes. */
84
+ GOAL_FINISHED = "goal-finished",
85
+ /** The meeting has already happened. */
86
+ MEETING_HAPPENED = "meeting-happened",
87
+ /** The policy changed since it was opened, so it is read again. */
88
+ POLICY_CHANGED = "policy-changed",
89
+ /** Nobody puts themselves forward; they apply through the careers page. */
90
+ SELF_REFERRAL = "self-referral",
91
+ /** The role is not taking applications. */
92
+ OPENING_CLOSED = "opening-closed",
93
+ /** The company's licence covers no more people; `details.seats` says how many it covers. */
94
+ LICENCE_SEATS = "licence-seats",
95
+ /** Something of that kind already has that name: a department, a location, a team or a job title. */
96
+ NAME_TAKEN = "name-taken",
97
+ /** Something of that kind already has that code: a kind of time off or an expense category. */
98
+ CODE_TAKEN = "code-taken",
99
+ /** Somebody here already has that work email. */
100
+ WORK_EMAIL_TAKEN = "work-email-taken",
101
+ /** The person already has a sign-in. */
102
+ HAS_SIGN_IN = "has-sign-in",
103
+ /** People still report to this person; who they move to is said first. */
104
+ REPORTS_REMAIN = "reports-remain",
105
+ /** Somebody has the item, so it is taken back first. */
106
+ EQUIPMENT_HELD = "equipment-held",
107
+ /** There is already a pay run for that month. */
108
+ PAY_RUN_EXISTS = "pay-run-exists",
109
+ /** The pay run has been approved, so it no longer changes. */
110
+ PAY_RUN_APPROVED = "pay-run-approved"
111
+ }
@@ -0,0 +1,119 @@
1
+ /**
2
+ * An HR refusal a person can act on, sent as `details.reason` so a client says it in the reader's language rather than
3
+ * showing the API's English. A number a sentence needs travels beside it in `details`, named on the member. A refusal
4
+ * nobody meets through a client, such as a malformed body, has no member and keeps its English.
5
+ */
6
+ export var HrRefusal;
7
+ (function (HrRefusal) {
8
+ // Time off and plans
9
+ /** There is already time off, waiting or agreed, on some of those days. */
10
+ HrRefusal["TIME_OFF_OVERLAP"] = "time-off-overlap";
11
+ /** That kind of time off is no longer offered. */
12
+ HrRefusal["LEAVE_TYPE_RETIRED"] = "leave-type-retired";
13
+ /** It starts too soon; `details.minNoticeDays` says how much notice it needs. */
14
+ HrRefusal["NOTICE_TOO_SHORT"] = "notice-too-short";
15
+ /** The waiting period for that kind of time off has not ended; `details.availableFrom` is the first day it may start. */
16
+ HrRefusal["LEAVE_NOT_YET"] = "leave-not-yet";
17
+ /** Not enough days are left in the year for it. */
18
+ HrRefusal["NOT_ENOUGH_DAYS"] = "not-enough-days";
19
+ /** Not enough days are left in that quarter for it. */
20
+ HrRefusal["NOT_ENOUGH_DAYS_IN_QUARTER"] = "not-enough-days-in-quarter";
21
+ /** None of the days asked for is a working day. */
22
+ HrRefusal["NO_WORKING_DAYS"] = "no-working-days";
23
+ /** The days fall before the person's first day or after their last. */
24
+ HrRefusal["OUTSIDE_EMPLOYMENT"] = "outside-employment";
25
+ /** The time off has started, so only HR can change it. */
26
+ HrRefusal["LEAVE_STARTED"] = "leave-started";
27
+ /** The request can no longer be cancelled. */
28
+ HrRefusal["NOT_CANCELLABLE"] = "not-cancellable";
29
+ /** Somebody has already decided it: a request, a correction, a letter or a probation. */
30
+ HrRefusal["ALREADY_DECIDED"] = "already-decided";
31
+ /** The person has left the company. */
32
+ HrRefusal["PERSON_LEFT"] = "person-left";
33
+ /** Some of those days are already in a plan. */
34
+ HrRefusal["PLAN_OVERLAP"] = "plan-overlap";
35
+ /** That day has already gone. */
36
+ HrRefusal["DAY_PASSED"] = "day-passed";
37
+ // Office and home days
38
+ /** That day is not a working day. */
39
+ HrRefusal["NOT_A_WORKING_DAY"] = "not-a-working-day";
40
+ /** Time off already covers that day. */
41
+ HrRefusal["TIME_OFF_THAT_DAY"] = "time-off-that-day";
42
+ /** The week already has as many home days as the company allows; `details.homeDaysPerWeek` says how many. */
43
+ HrRefusal["HOME_DAY_LIMIT"] = "home-day-limit";
44
+ /** Too far ahead; `details.maxDaysAhead` says how far a day may be. */
45
+ HrRefusal["TOO_FAR_AHEAD"] = "too-far-ahead";
46
+ // Hours
47
+ /** The person is not clocked in. */
48
+ HrRefusal["NOT_CLOCKED_IN"] = "not-clocked-in";
49
+ /** An earlier shift was never clocked out of, so that one is corrected first. */
50
+ HrRefusal["OPEN_SHIFT"] = "open-shift";
51
+ /** The shift overlaps another one. */
52
+ HrRefusal["SHIFT_OVERLAP"] = "shift-overlap";
53
+ /** The shift is longer than a shift may be; `details.maxHours` says how long. */
54
+ HrRefusal["SHIFT_TOO_LONG"] = "shift-too-long";
55
+ /** The shift ends in the future. */
56
+ HrRefusal["SHIFT_IN_FUTURE"] = "shift-in-future";
57
+ /** That shift already has a correction waiting. */
58
+ HrRefusal["CORRECTION_PENDING"] = "correction-pending";
59
+ // Stand-ins
60
+ /** Somebody already stands in for the person on some of those days. */
61
+ HrRefusal["STAND_IN_OVERLAP"] = "stand-in-overlap";
62
+ /** The person decides nobody's requests, so there is nothing to hand over. */
63
+ HrRefusal["NOTHING_TO_HAND_OVER"] = "nothing-to-hand-over";
64
+ /** Longer than a stand-in may last; `details.maxDays` says how long. */
65
+ HrRefusal["STAND_IN_TOO_LONG"] = "stand-in-too-long";
66
+ // Expenses
67
+ /** A claim is sent with its receipt. */
68
+ HrRefusal["RECEIPT_REQUIRED"] = "receipt-required";
69
+ /** Somebody else decides a person's own claim. */
70
+ HrRefusal["OWN_CLAIM"] = "own-claim";
71
+ /** A pay run has taken the claim; it is removed from the run first. */
72
+ HrRefusal["CLAIM_IN_PAY_RUN"] = "claim-in-pay-run";
73
+ /** That expense category can no longer be claimed for. */
74
+ HrRefusal["CATEGORY_RETIRED"] = "category-retired";
75
+ /** Only a draft can be thrown away. */
76
+ HrRefusal["NOT_A_DRAFT"] = "not-a-draft";
77
+ // Growth, surveys, policies and referrals
78
+ /** It has already been handed in: a review or a survey's answers. */
79
+ HrRefusal["ALREADY_ANSWERED"] = "already-answered";
80
+ /** It is not open for answers: a review round or a survey. */
81
+ HrRefusal["NOT_OPEN"] = "not-open";
82
+ /** A review is handed in with an overall rating. */
83
+ HrRefusal["RATING_REQUIRED"] = "rating-required";
84
+ /** Every question is answered before it is handed in. */
85
+ HrRefusal["ANSWERS_REQUIRED"] = "answers-required";
86
+ /** The course ends in a certificate, which is attached. */
87
+ HrRefusal["CERTIFICATE_REQUIRED"] = "certificate-required";
88
+ /** The person already works on as many goals as they may; `details.maxGoals` says how many. */
89
+ HrRefusal["GOAL_LIMIT"] = "goal-limit";
90
+ /** The goal is finished; it is reopened before it changes. */
91
+ HrRefusal["GOAL_FINISHED"] = "goal-finished";
92
+ /** The meeting has already happened. */
93
+ HrRefusal["MEETING_HAPPENED"] = "meeting-happened";
94
+ /** The policy changed since it was opened, so it is read again. */
95
+ HrRefusal["POLICY_CHANGED"] = "policy-changed";
96
+ /** Nobody puts themselves forward; they apply through the careers page. */
97
+ HrRefusal["SELF_REFERRAL"] = "self-referral";
98
+ /** The role is not taking applications. */
99
+ HrRefusal["OPENING_CLOSED"] = "opening-closed";
100
+ // The company's own records
101
+ /** The company's licence covers no more people; `details.seats` says how many it covers. */
102
+ HrRefusal["LICENCE_SEATS"] = "licence-seats";
103
+ /** Something of that kind already has that name: a department, a location, a team or a job title. */
104
+ HrRefusal["NAME_TAKEN"] = "name-taken";
105
+ /** Something of that kind already has that code: a kind of time off or an expense category. */
106
+ HrRefusal["CODE_TAKEN"] = "code-taken";
107
+ /** Somebody here already has that work email. */
108
+ HrRefusal["WORK_EMAIL_TAKEN"] = "work-email-taken";
109
+ /** The person already has a sign-in. */
110
+ HrRefusal["HAS_SIGN_IN"] = "has-sign-in";
111
+ /** People still report to this person; who they move to is said first. */
112
+ HrRefusal["REPORTS_REMAIN"] = "reports-remain";
113
+ /** Somebody has the item, so it is taken back first. */
114
+ HrRefusal["EQUIPMENT_HELD"] = "equipment-held";
115
+ /** There is already a pay run for that month. */
116
+ HrRefusal["PAY_RUN_EXISTS"] = "pay-run-exists";
117
+ /** The pay run has been approved, so it no longer changes. */
118
+ HrRefusal["PAY_RUN_APPROVED"] = "pay-run-approved";
119
+ })(HrRefusal || (HrRefusal = {}));
@@ -53,6 +53,7 @@ export * from './hr-probation-outcome.enum.js';
53
53
  export * from './hr-probation.type.js';
54
54
  export * from './hr-referral-outcome.enum.js';
55
55
  export * from './hr-referral.type.js';
56
+ export * from './hr-refusal.enum.js';
56
57
  export * from './hr-report.type.js';
57
58
  export * from './hr-resource-status.enum.js';
58
59
  export * from './hr-review-cycle-status.enum.js';
@@ -53,6 +53,7 @@ export * from './hr-probation-outcome.enum.js';
53
53
  export * from './hr-probation.type.js';
54
54
  export * from './hr-referral-outcome.enum.js';
55
55
  export * from './hr-referral.type.js';
56
+ export * from './hr-refusal.enum.js';
56
57
  export * from './hr-report.type.js';
57
58
  export * from './hr-resource-status.enum.js';
58
59
  export * from './hr-review-cycle-status.enum.js';
@@ -21,6 +21,7 @@ export * from './restaurant-payment-method.enum.js';
21
21
  export * from './restaurant-profile.type.js';
22
22
  export * from './restaurant-promotion.type.js';
23
23
  export * from './restaurant-public.type.js';
24
+ export * from './restaurant-refusal.enum.js';
24
25
  export * from './restaurant-reservation-source.enum.js';
25
26
  export * from './restaurant-reservation-status.enum.js';
26
27
  export * from './restaurant-reservation.type.js';
@@ -21,6 +21,7 @@ export * from './restaurant-payment-method.enum.js';
21
21
  export * from './restaurant-profile.type.js';
22
22
  export * from './restaurant-promotion.type.js';
23
23
  export * from './restaurant-public.type.js';
24
+ export * from './restaurant-refusal.enum.js';
24
25
  export * from './restaurant-reservation-source.enum.js';
25
26
  export * from './restaurant-reservation-status.enum.js';
26
27
  export * from './restaurant-reservation.type.js';
@@ -0,0 +1,69 @@
1
+ /**
2
+ * A restaurant refusal a person can act on, sent as `details.reason` so a client says it in the reader's language rather
3
+ * than showing the API's English. A diner meets the ordering and booking ones; staff meet the bill, kitchen and set-up
4
+ * ones as well.
5
+ */
6
+ export declare enum RestaurantRefusal {
7
+ /** A dish is off the menu or cannot be ordered right now; `details.itemId` names it. */
8
+ DISH_UNAVAILABLE = "dish-unavailable",
9
+ /** The branch is not taking orders of that kind (eaten in, taken away, delivered, or from the table). */
10
+ CHANNEL_CLOSED = "channel-closed",
11
+ /** This restaurant cannot take money online, so the order has to be paid at the restaurant. */
12
+ ONLINE_PAYMENT_UNAVAILABLE = "online-payment-unavailable",
13
+ /** Paying at the restaurant needs an account; a guest pays online. */
14
+ SIGN_IN_TO_PAY = "sign-in-to-pay",
15
+ /** A delivery is below the branch's minimum; `details.shortOfMinimumMinor` says by how much. */
16
+ BELOW_DELIVERY_MINIMUM = "below-delivery-minimum",
17
+ /** The branch is closed now, so an order has to be for a later time. */
18
+ CLOSED_NOW = "closed-now",
19
+ /** That time is too soon to be ready or too far ahead. */
20
+ TIME_UNAVAILABLE = "time-unavailable",
21
+ /** The branch is closed at the time chosen. */
22
+ CLOSED_AT_TIME = "closed-at-time",
23
+ /** The address is further than the branch delivers. */
24
+ OUT_OF_DELIVERY_RANGE = "out-of-delivery-range",
25
+ /** The branch has stopped trading, so nothing can be ordered or booked there. */
26
+ BRANCH_CLOSED = "branch-closed",
27
+ /** The order can no longer be paid for: it is paid, cancelled or past paying online. */
28
+ ORDER_NOT_PAYABLE = "order-not-payable",
29
+ /** The payment page could not be opened; trying again may work. */
30
+ PAYMENT_PAGE_FAILED = "payment-page-failed",
31
+ /** An order is reviewed once it has reached the diner. */
32
+ REVIEW_TOO_EARLY = "review-too-early",
33
+ /** The order has already been reviewed. */
34
+ ALREADY_REVIEWED = "already-reviewed",
35
+ /** The branch does not take bookings. */
36
+ BOOKINGS_OFF = "bookings-off",
37
+ /** A party that size is arranged by phone. */
38
+ PARTY_TOO_LARGE = "party-too-large",
39
+ /** That time cannot be booked. */
40
+ BOOKING_TIME_UNAVAILABLE = "booking-time-unavailable",
41
+ /** Somebody else has the table, or one of the tables, at that time. */
42
+ TABLE_TAKEN = "table-taken",
43
+ /** No single table seats the party, so staff choose tables to push together. */
44
+ NO_TABLE_FITS = "no-table-fits",
45
+ /** The booking is seated, completed, cancelled or a no-show, so it can no longer be changed. */
46
+ BOOKING_FINISHED = "booking-finished",
47
+ /** The booking cannot make that move from where it is now, usually because somebody else moved it first. */
48
+ BOOKING_MOVED_ON = "booking-moved-on",
49
+ /** The order is completed or cancelled. */
50
+ ORDER_FINISHED = "order-finished",
51
+ /** The order cannot make that move from where it is now, usually because somebody else moved it first. */
52
+ ORDER_MOVED_ON = "order-moved-on",
53
+ /** The kitchen can only change plates on an order that is in the kitchen or ready. */
54
+ NOT_IN_KITCHEN = "not-in-kitchen",
55
+ /** The bill is settled or cancelled. */
56
+ BILL_CLOSED = "bill-closed",
57
+ /** More than is owing on the bill; `details.balanceMinor` says what is. */
58
+ MORE_THAN_OWING = "more-than-owing",
59
+ /** More than is left of the payment to give back; `details.refundableMinor` says what is. */
60
+ REFUND_EXCEEDS_PAYMENT = "refund-exceeds-payment",
61
+ /** The bill still has orders to finish. */
62
+ BILL_ORDERS_OPEN = "bill-orders-open",
63
+ /** The bill still has money owing. */
64
+ BILL_MONEY_OWING = "bill-money-owing",
65
+ /** The restaurant's public address changes only while it is unpublished. */
66
+ UNPUBLISH_FIRST = "unpublish-first",
67
+ /** The restaurant's profile has not been set up, so nothing can be ordered yet. */
68
+ SETUP_INCOMPLETE = "setup-incomplete"
69
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * A restaurant refusal a person can act on, sent as `details.reason` so a client says it in the reader's language rather
3
+ * than showing the API's English. A diner meets the ordering and booking ones; staff meet the bill, kitchen and set-up
4
+ * ones as well.
5
+ */
6
+ export var RestaurantRefusal;
7
+ (function (RestaurantRefusal) {
8
+ /** A dish is off the menu or cannot be ordered right now; `details.itemId` names it. */
9
+ RestaurantRefusal["DISH_UNAVAILABLE"] = "dish-unavailable";
10
+ /** The branch is not taking orders of that kind (eaten in, taken away, delivered, or from the table). */
11
+ RestaurantRefusal["CHANNEL_CLOSED"] = "channel-closed";
12
+ /** This restaurant cannot take money online, so the order has to be paid at the restaurant. */
13
+ RestaurantRefusal["ONLINE_PAYMENT_UNAVAILABLE"] = "online-payment-unavailable";
14
+ /** Paying at the restaurant needs an account; a guest pays online. */
15
+ RestaurantRefusal["SIGN_IN_TO_PAY"] = "sign-in-to-pay";
16
+ /** A delivery is below the branch's minimum; `details.shortOfMinimumMinor` says by how much. */
17
+ RestaurantRefusal["BELOW_DELIVERY_MINIMUM"] = "below-delivery-minimum";
18
+ /** The branch is closed now, so an order has to be for a later time. */
19
+ RestaurantRefusal["CLOSED_NOW"] = "closed-now";
20
+ /** That time is too soon to be ready or too far ahead. */
21
+ RestaurantRefusal["TIME_UNAVAILABLE"] = "time-unavailable";
22
+ /** The branch is closed at the time chosen. */
23
+ RestaurantRefusal["CLOSED_AT_TIME"] = "closed-at-time";
24
+ /** The address is further than the branch delivers. */
25
+ RestaurantRefusal["OUT_OF_DELIVERY_RANGE"] = "out-of-delivery-range";
26
+ /** The branch has stopped trading, so nothing can be ordered or booked there. */
27
+ RestaurantRefusal["BRANCH_CLOSED"] = "branch-closed";
28
+ /** The order can no longer be paid for: it is paid, cancelled or past paying online. */
29
+ RestaurantRefusal["ORDER_NOT_PAYABLE"] = "order-not-payable";
30
+ /** The payment page could not be opened; trying again may work. */
31
+ RestaurantRefusal["PAYMENT_PAGE_FAILED"] = "payment-page-failed";
32
+ /** An order is reviewed once it has reached the diner. */
33
+ RestaurantRefusal["REVIEW_TOO_EARLY"] = "review-too-early";
34
+ /** The order has already been reviewed. */
35
+ RestaurantRefusal["ALREADY_REVIEWED"] = "already-reviewed";
36
+ /** The branch does not take bookings. */
37
+ RestaurantRefusal["BOOKINGS_OFF"] = "bookings-off";
38
+ /** A party that size is arranged by phone. */
39
+ RestaurantRefusal["PARTY_TOO_LARGE"] = "party-too-large";
40
+ /** That time cannot be booked. */
41
+ RestaurantRefusal["BOOKING_TIME_UNAVAILABLE"] = "booking-time-unavailable";
42
+ /** Somebody else has the table, or one of the tables, at that time. */
43
+ RestaurantRefusal["TABLE_TAKEN"] = "table-taken";
44
+ /** No single table seats the party, so staff choose tables to push together. */
45
+ RestaurantRefusal["NO_TABLE_FITS"] = "no-table-fits";
46
+ /** The booking is seated, completed, cancelled or a no-show, so it can no longer be changed. */
47
+ RestaurantRefusal["BOOKING_FINISHED"] = "booking-finished";
48
+ /** The booking cannot make that move from where it is now, usually because somebody else moved it first. */
49
+ RestaurantRefusal["BOOKING_MOVED_ON"] = "booking-moved-on";
50
+ /** The order is completed or cancelled. */
51
+ RestaurantRefusal["ORDER_FINISHED"] = "order-finished";
52
+ /** The order cannot make that move from where it is now, usually because somebody else moved it first. */
53
+ RestaurantRefusal["ORDER_MOVED_ON"] = "order-moved-on";
54
+ /** The kitchen can only change plates on an order that is in the kitchen or ready. */
55
+ RestaurantRefusal["NOT_IN_KITCHEN"] = "not-in-kitchen";
56
+ /** The bill is settled or cancelled. */
57
+ RestaurantRefusal["BILL_CLOSED"] = "bill-closed";
58
+ /** More than is owing on the bill; `details.balanceMinor` says what is. */
59
+ RestaurantRefusal["MORE_THAN_OWING"] = "more-than-owing";
60
+ /** More than is left of the payment to give back; `details.refundableMinor` says what is. */
61
+ RestaurantRefusal["REFUND_EXCEEDS_PAYMENT"] = "refund-exceeds-payment";
62
+ /** The bill still has orders to finish. */
63
+ RestaurantRefusal["BILL_ORDERS_OPEN"] = "bill-orders-open";
64
+ /** The bill still has money owing. */
65
+ RestaurantRefusal["BILL_MONEY_OWING"] = "bill-money-owing";
66
+ /** The restaurant's public address changes only while it is unpublished. */
67
+ RestaurantRefusal["UNPUBLISH_FIRST"] = "unpublish-first";
68
+ /** The restaurant's profile has not been set up, so nothing can be ordered yet. */
69
+ RestaurantRefusal["SETUP_INCOMPLETE"] = "setup-incomplete";
70
+ })(RestaurantRefusal || (RestaurantRefusal = {}));
@@ -1,2 +1,3 @@
1
1
  export * from './taxi-admin.type.js';
2
+ export * from './taxi-refusal.enum.js';
2
3
  export * from './taxi-ride-status.enum.js';
@@ -1,2 +1,3 @@
1
1
  export * from './taxi-admin.type.js';
2
+ export * from './taxi-refusal.enum.js';
2
3
  export * from './taxi-ride-status.enum.js';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * A taxi refusal a person can act on, sent as `details.reason` so a passenger's or a driver's app says it in the
3
+ * reader's language rather than showing the API's English. A company whose licence has lapsed is refused with the
4
+ * platform's own `licence-inactive`, which is not repeated here.
5
+ */
6
+ export declare enum TaxiRefusal {
7
+ /** The fare was not accepted in time, so the ride has to be requested again. */
8
+ QUOTE_EXPIRED = "quote-expired",
9
+ /** The driver is on the way or the ride has ended, so it can no longer be cancelled. */
10
+ NOT_CANCELLABLE = "not-cancellable",
11
+ /** The ride has already moved past that step, or ended; refreshing shows where it stands. */
12
+ RIDE_MOVED_ON = "ride-moved-on",
13
+ /** The ride was given to another driver, or was never this driver's. */
14
+ NOT_ASSIGNED_DRIVER = "not-assigned-driver",
15
+ /**
16
+ * A ride booked ahead falls outside the window the company takes bookings for; `details.minLeadMinutes` and
17
+ * `details.maxDays` say what it is.
18
+ */
19
+ SCHEDULE_WINDOW = "schedule-window",
20
+ /** The passenger already keeps as many saved places as there is room for; `details.limit` says how many. */
21
+ PLACES_FULL = "places-full",
22
+ /** The passenger already has a saved place with that name. */
23
+ PLACE_NAME_TAKEN = "place-name-taken"
24
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * A taxi refusal a person can act on, sent as `details.reason` so a passenger's or a driver's app says it in the
3
+ * reader's language rather than showing the API's English. A company whose licence has lapsed is refused with the
4
+ * platform's own `licence-inactive`, which is not repeated here.
5
+ */
6
+ export var TaxiRefusal;
7
+ (function (TaxiRefusal) {
8
+ /** The fare was not accepted in time, so the ride has to be requested again. */
9
+ TaxiRefusal["QUOTE_EXPIRED"] = "quote-expired";
10
+ /** The driver is on the way or the ride has ended, so it can no longer be cancelled. */
11
+ TaxiRefusal["NOT_CANCELLABLE"] = "not-cancellable";
12
+ /** The ride has already moved past that step, or ended; refreshing shows where it stands. */
13
+ TaxiRefusal["RIDE_MOVED_ON"] = "ride-moved-on";
14
+ /** The ride was given to another driver, or was never this driver's. */
15
+ TaxiRefusal["NOT_ASSIGNED_DRIVER"] = "not-assigned-driver";
16
+ /**
17
+ * A ride booked ahead falls outside the window the company takes bookings for; `details.minLeadMinutes` and
18
+ * `details.maxDays` say what it is.
19
+ */
20
+ TaxiRefusal["SCHEDULE_WINDOW"] = "schedule-window";
21
+ /** The passenger already keeps as many saved places as there is room for; `details.limit` says how many. */
22
+ TaxiRefusal["PLACES_FULL"] = "places-full";
23
+ /** The passenger already has a saved place with that name. */
24
+ TaxiRefusal["PLACE_NAME_TAKEN"] = "place-name-taken";
25
+ })(TaxiRefusal || (TaxiRefusal = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.121.0",
3
+ "version": "0.123.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {