@iveri/contracts 0.120.0 → 0.122.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 +14 -1
- package/dist/api/conduit/index.d.ts +3 -0
- package/dist/api/conduit/index.js +3 -0
- package/dist/api/conduit/route-criterion-miss.enum.d.ts +30 -0
- package/dist/api/conduit/route-criterion-miss.enum.js +31 -0
- package/dist/api/conduit/route-criterion.enum.d.ts +14 -0
- package/dist/api/conduit/route-criterion.enum.js +15 -0
- package/dist/api/conduit/route-test.type.d.ts +85 -0
- package/dist/api/conduit/route-test.type.js +1 -0
- package/dist/api/delivery/delivery-refusal.enum.d.ts +25 -0
- package/dist/api/delivery/delivery-refusal.enum.js +26 -0
- package/dist/api/delivery/index.d.ts +1 -0
- package/dist/api/delivery/index.js +1 -0
- package/dist/api/restaurant/index.d.ts +1 -0
- package/dist/api/restaurant/index.js +1 -0
- package/dist/api/restaurant/restaurant-refusal.enum.d.ts +69 -0
- package/dist/api/restaurant/restaurant-refusal.enum.js +70 -0
- package/dist/api/taxi/index.d.ts +1 -0
- package/dist/api/taxi/index.js +1 -0
- package/dist/api/taxi/taxi-refusal.enum.d.ts +24 -0
- package/dist/api/taxi/taxi-refusal.enum.js +25 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -154,7 +154,9 @@ Inspect mode: `Endpoint`, `CaptureSummary`/`CaptureDetail`, `Provider` with its
|
|
|
154
154
|
`SignatureManifest`/`HandshakeManifest`, `Replay`, `SignatureDiagnostic`.
|
|
155
155
|
|
|
156
156
|
Gateway mode: `Destination`, `Route` with its `HeaderMatcher`/`BodyMatcher`, `Delivery` and
|
|
157
|
-
`DeliveryAttempt`.
|
|
157
|
+
`DeliveryAttempt`. A route test — would this route have matched this capture? — answers a
|
|
158
|
+
`RouteTestResult` of `RouteCriterionResult`s, with `RouteCriterion` and `RouteCriterionMiss`
|
|
159
|
+
saying which criterion and why it missed; `TestRouteBody` asks it of criteria not saved yet.
|
|
158
160
|
|
|
159
161
|
Plus the request bodies for each, and the seven enums they are built from — `SignatureVerdict`,
|
|
160
162
|
`SignatureAlgorithm`, `SignatureEncoding`, `SignatureHeaderScheme`, `HandshakeKind`,
|
|
@@ -234,6 +236,10 @@ What a company running a taxi service reads in its own panel: `TaxiRideStatus`,
|
|
|
234
236
|
report sums quoted fares of completed rides, never earnings: nothing settles a fare yet.
|
|
235
237
|
- **A day's totals are the rides requested on it**, so `completed` can never exceed `requested`, and the panel names the
|
|
236
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.
|
|
237
243
|
|
|
238
244
|
### `api/delivery/` → `@iveri/contracts/delivery`
|
|
239
245
|
|
|
@@ -244,6 +250,9 @@ daily totals (`DeliveryDailyReport`).
|
|
|
244
250
|
|
|
245
251
|
- **A job the company asked for itself has no sender** (`senderUserId: null`), as a shop shipping its own orders does;
|
|
246
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`).
|
|
247
256
|
- **Proof is a yes or no and the recipient's name.** The photograph is private evidence and is never in these shapes.
|
|
248
257
|
- **`expired` folds quote-expired into no courier found, and `failed` stays apart**, because a refused request is a
|
|
249
258
|
fault on Iveri's side rather than the company's.
|
|
@@ -284,6 +293,10 @@ Conduit's outbox.
|
|
|
284
293
|
`localization:render` permissions.
|
|
285
294
|
- Version `0.100.0` adds `notification:send-any`, the password-reset bodies and Conduit's usage metrics.
|
|
286
295
|
- Version `0.101.0` adds `UsageHistory`, a company's closed months of a product by metric.
|
|
296
|
+
- Version `0.122.0` adds `RestaurantRefusal`, the restaurant refusals a client says in the reader's language.
|
|
297
|
+
- Version `0.121.0` adds Conduit's route test: `RouteTestResult`, `TestRouteBody`, `RouteCriterion` and
|
|
298
|
+
`RouteCriterionMiss`. (Tagged first as `v0.119.0`, which npm refused once 0.120.0 was out; 0.119.0 does not
|
|
299
|
+
exist on npm.)
|
|
287
300
|
- Version `0.120.0` adds `chat:embed:manage-any` and an optional `tenantId` on the embed requests, so HR opens every
|
|
288
301
|
company's conversations from its operator-workspace key.
|
|
289
302
|
- Widening a type is minor; narrowing it is major.
|
|
@@ -17,6 +17,9 @@ export * from './handshake-kind.enum.js';
|
|
|
17
17
|
export * from './match-operator.enum.js';
|
|
18
18
|
export * from './provider.type.js';
|
|
19
19
|
export * from './replay.type.js';
|
|
20
|
+
export * from './route-criterion-miss.enum.js';
|
|
21
|
+
export * from './route-criterion.enum.js';
|
|
22
|
+
export * from './route-test.type.js';
|
|
20
23
|
export * from './route.type.js';
|
|
21
24
|
export * from './signature-algorithm.enum.js';
|
|
22
25
|
export * from './signature-encoding.enum.js';
|
|
@@ -17,6 +17,9 @@ export * from './handshake-kind.enum.js';
|
|
|
17
17
|
export * from './match-operator.enum.js';
|
|
18
18
|
export * from './provider.type.js';
|
|
19
19
|
export * from './replay.type.js';
|
|
20
|
+
export * from './route-criterion-miss.enum.js';
|
|
21
|
+
export * from './route-criterion.enum.js';
|
|
22
|
+
export * from './route-test.type.js';
|
|
20
23
|
export * from './route.type.js';
|
|
21
24
|
export * from './signature-algorithm.enum.js';
|
|
22
25
|
export * from './signature-encoding.enum.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why one criterion of a route did not match a request.
|
|
3
|
+
*
|
|
4
|
+
* A closed set, so a client can say it in the reader's language and an operator can tell the five
|
|
5
|
+
* remedies apart. Three of them say the body could not be read at all, and they are separate
|
|
6
|
+
* because the fixes are: an empty body needs a different route, an oversized one is a limit, and
|
|
7
|
+
* a form-encoded one needs a path or header criterion instead, since a body matcher cannot read
|
|
8
|
+
* inside a form.
|
|
9
|
+
*
|
|
10
|
+
* Every one of them means **not matched**. A criterion that cannot be evaluated does not match:
|
|
11
|
+
* a gateway that forwards on "I could not tell" sends a customer's data somewhere they did not ask
|
|
12
|
+
* for.
|
|
13
|
+
*/
|
|
14
|
+
export declare enum RouteCriterionMiss {
|
|
15
|
+
/** The request carried a value, and it is not the one the rule asks for. */
|
|
16
|
+
DIFFERENT_VALUE = "different-value",
|
|
17
|
+
/**
|
|
18
|
+
* The header, or the body field, is not on the request. A body path that resolves to an
|
|
19
|
+
* object, an array or `null` counts as absent too: a matcher compares strings.
|
|
20
|
+
*/
|
|
21
|
+
FIELD_ABSENT = "field-absent",
|
|
22
|
+
/** The operator compares against a value and the rule gives none. */
|
|
23
|
+
NO_OPERAND = "no-operand",
|
|
24
|
+
/** A body matcher, and the request had no body. */
|
|
25
|
+
BODY_EMPTY = "body-empty",
|
|
26
|
+
/** A body matcher, and the body is over the 1 MB the gateway parses for routing. */
|
|
27
|
+
BODY_TOO_LARGE = "body-too-large",
|
|
28
|
+
/** A body matcher, and the body is not JSON — form-encoded, XML, or malformed. */
|
|
29
|
+
BODY_NOT_JSON = "body-not-json"
|
|
30
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why one criterion of a route did not match a request.
|
|
3
|
+
*
|
|
4
|
+
* A closed set, so a client can say it in the reader's language and an operator can tell the five
|
|
5
|
+
* remedies apart. Three of them say the body could not be read at all, and they are separate
|
|
6
|
+
* because the fixes are: an empty body needs a different route, an oversized one is a limit, and
|
|
7
|
+
* a form-encoded one needs a path or header criterion instead, since a body matcher cannot read
|
|
8
|
+
* inside a form.
|
|
9
|
+
*
|
|
10
|
+
* Every one of them means **not matched**. A criterion that cannot be evaluated does not match:
|
|
11
|
+
* a gateway that forwards on "I could not tell" sends a customer's data somewhere they did not ask
|
|
12
|
+
* for.
|
|
13
|
+
*/
|
|
14
|
+
export var RouteCriterionMiss;
|
|
15
|
+
(function (RouteCriterionMiss) {
|
|
16
|
+
/** The request carried a value, and it is not the one the rule asks for. */
|
|
17
|
+
RouteCriterionMiss["DIFFERENT_VALUE"] = "different-value";
|
|
18
|
+
/**
|
|
19
|
+
* The header, or the body field, is not on the request. A body path that resolves to an
|
|
20
|
+
* object, an array or `null` counts as absent too: a matcher compares strings.
|
|
21
|
+
*/
|
|
22
|
+
RouteCriterionMiss["FIELD_ABSENT"] = "field-absent";
|
|
23
|
+
/** The operator compares against a value and the rule gives none. */
|
|
24
|
+
RouteCriterionMiss["NO_OPERAND"] = "no-operand";
|
|
25
|
+
/** A body matcher, and the request had no body. */
|
|
26
|
+
RouteCriterionMiss["BODY_EMPTY"] = "body-empty";
|
|
27
|
+
/** A body matcher, and the body is over the 1 MB the gateway parses for routing. */
|
|
28
|
+
RouteCriterionMiss["BODY_TOO_LARGE"] = "body-too-large";
|
|
29
|
+
/** A body matcher, and the body is not JSON — form-encoded, XML, or malformed. */
|
|
30
|
+
RouteCriterionMiss["BODY_NOT_JSON"] = "body-not-json";
|
|
31
|
+
})(RouteCriterionMiss || (RouteCriterionMiss = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One kind of condition a route can set, in the order the gateway evaluates them.
|
|
3
|
+
*
|
|
4
|
+
* The order is the evaluator's, not an arbitrary listing: a route test reports criteria in it, so
|
|
5
|
+
* the first criterion that missed is the one the gateway stopped at.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum RouteCriterion {
|
|
8
|
+
ENDPOINT = "endpoint",
|
|
9
|
+
PROVIDER = "provider",
|
|
10
|
+
METHOD = "method",
|
|
11
|
+
PATH = "path",
|
|
12
|
+
HEADER = "header",
|
|
13
|
+
BODY = "body"
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One kind of condition a route can set, in the order the gateway evaluates them.
|
|
3
|
+
*
|
|
4
|
+
* The order is the evaluator's, not an arbitrary listing: a route test reports criteria in it, so
|
|
5
|
+
* the first criterion that missed is the one the gateway stopped at.
|
|
6
|
+
*/
|
|
7
|
+
export var RouteCriterion;
|
|
8
|
+
(function (RouteCriterion) {
|
|
9
|
+
RouteCriterion["ENDPOINT"] = "endpoint";
|
|
10
|
+
RouteCriterion["PROVIDER"] = "provider";
|
|
11
|
+
RouteCriterion["METHOD"] = "method";
|
|
12
|
+
RouteCriterion["PATH"] = "path";
|
|
13
|
+
RouteCriterion["HEADER"] = "header";
|
|
14
|
+
RouteCriterion["BODY"] = "body";
|
|
15
|
+
})(RouteCriterion || (RouteCriterion = {}));
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { Nullable } from '../../type/nil.type.js';
|
|
2
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
3
|
+
import type { MatchOperator } from './match-operator.enum.js';
|
|
4
|
+
import type { RouteCriterionMiss } from './route-criterion-miss.enum.js';
|
|
5
|
+
import type { RouteCriterion } from './route-criterion.enum.js';
|
|
6
|
+
import type { BodyMatcherInput, HeaderMatcherInput } from './route.type.js';
|
|
7
|
+
/** How one criterion of a route fared against one capture. */
|
|
8
|
+
export interface RouteCriterionResult {
|
|
9
|
+
criterion: RouteCriterion;
|
|
10
|
+
/** The header name or the body path. Null for the other four criteria. */
|
|
11
|
+
field: Nullable<string>;
|
|
12
|
+
/** The header or body matcher's operator. Null for the other four, which compare for equality or by glob. */
|
|
13
|
+
operator: Nullable<MatchOperator>;
|
|
14
|
+
/**
|
|
15
|
+
* What the rule asks for: the endpoint id, provider key, method, path glob, or the matcher's
|
|
16
|
+
* operand. Null for `exists`, which takes none.
|
|
17
|
+
*/
|
|
18
|
+
expected: Nullable<string>;
|
|
19
|
+
/**
|
|
20
|
+
* What the capture carried, exactly as the matcher compared it — a repeated header joined
|
|
21
|
+
* with `, `, a body leaf as its JSON spelling. Null when it carried nothing there. Cut to
|
|
22
|
+
* 1000 characters and ended with `…` when longer; the comparison used the whole value.
|
|
23
|
+
*/
|
|
24
|
+
actual: Nullable<string>;
|
|
25
|
+
matched: boolean;
|
|
26
|
+
/** Null when the criterion matched. */
|
|
27
|
+
miss: Nullable<RouteCriterionMiss>;
|
|
28
|
+
}
|
|
29
|
+
/** A route that stops evaluation before another one is reached. */
|
|
30
|
+
export interface RouteTestStopper {
|
|
31
|
+
id: UUID;
|
|
32
|
+
name: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* `GET /api/v1/routes/:routeId/test?captureId=` and `POST /api/v1/routes/test`.
|
|
36
|
+
*
|
|
37
|
+
* Evaluated by the same matcher the gateway runs on every inbound request, against the stored
|
|
38
|
+
* capture as it arrived. Nothing is sent and nothing is written.
|
|
39
|
+
*/
|
|
40
|
+
export interface RouteTestResult {
|
|
41
|
+
captureId: UUID;
|
|
42
|
+
/** Every criterion matched. A route that sets no criterion matches every request. */
|
|
43
|
+
matched: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Only the criteria the route sets, in the order the gateway evaluates them. Unlike the
|
|
46
|
+
* gateway, which stops at the first miss, every criterion is evaluated, so an operator sees
|
|
47
|
+
* all of what is wrong at once.
|
|
48
|
+
*/
|
|
49
|
+
criteria: RouteCriterionResult[];
|
|
50
|
+
/**
|
|
51
|
+
* An earlier active route with `stopOnMatch` that also matches this capture, so the gateway
|
|
52
|
+
* stops before it reaches this one: the route matches and would still not fire. Null when
|
|
53
|
+
* nothing stands in the way. Reported whether or not this route matched.
|
|
54
|
+
*/
|
|
55
|
+
stoppedBy: Nullable<RouteTestStopper>;
|
|
56
|
+
/**
|
|
57
|
+
* The endpoint's provider key the provider criterion was compared with. A capture does not
|
|
58
|
+
* record it, so this is the endpoint's **current** key; null when the endpoint has none or is
|
|
59
|
+
* gone.
|
|
60
|
+
*/
|
|
61
|
+
providerKey: Nullable<string>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* `POST /api/v1/routes/test`: criteria not saved yet, as a route form holds them.
|
|
65
|
+
*
|
|
66
|
+
* The criteria take the same values and the same "absent means any" meaning as
|
|
67
|
+
* `CreateRouteBody`, and are normalised the same way before they are evaluated.
|
|
68
|
+
*/
|
|
69
|
+
export interface TestRouteBody {
|
|
70
|
+
captureId: UUID;
|
|
71
|
+
/**
|
|
72
|
+
* The route being edited, if any: it is not reported as stopping itself, and its age decides
|
|
73
|
+
* its place among routes of the same priority. Omitted for a route not created yet, which
|
|
74
|
+
* would be evaluated after every existing route of its priority.
|
|
75
|
+
*/
|
|
76
|
+
routeId?: Nullable<UUID>;
|
|
77
|
+
endpointId?: Nullable<UUID>;
|
|
78
|
+
providerKey?: Nullable<string>;
|
|
79
|
+
method?: Nullable<string>;
|
|
80
|
+
pathPattern?: Nullable<string>;
|
|
81
|
+
headerMatchers?: Nullable<HeaderMatcherInput[]>;
|
|
82
|
+
bodyMatchers?: Nullable<BodyMatcherInput[]>;
|
|
83
|
+
/** Decides which routes are evaluated before it. Default 100, as on create. */
|
|
84
|
+
priority?: Nullable<number>;
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 = {}));
|
|
@@ -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 = {}));
|
package/dist/api/taxi/index.d.ts
CHANGED
package/dist/api/taxi/index.js
CHANGED
|
@@ -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 = {}));
|