@zappie/sdk 0.10.10 → 0.11.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/CHANGELOG.md +19 -0
- package/README.md +99 -19
- package/dist/cart/item.d.ts +1 -1
- package/dist/{client-CtDaenmW.d.ts → client-C47e44tl.d.ts} +1 -1
- package/dist/customer/client.js +8 -8
- package/dist/customer/client.js.map +1 -1
- package/dist/customer/index.d.ts +4 -2
- package/dist/debug.js +1 -1
- package/dist/debug.js.map +1 -1
- package/dist/error-pages/art.js +11 -0
- package/dist/error-pages/art.js.map +6 -0
- package/dist/error-pages/index.d.ts +58 -0
- package/dist/error-pages/index.js +122 -0
- package/dist/error-pages/index.js.map +6 -0
- package/dist/error-pages/react.d.ts +20 -0
- package/dist/error-pages/react.js +66 -0
- package/dist/error-pages/react.js.map +6 -0
- package/dist/in-venue/bill.js +70 -0
- package/dist/in-venue/bill.js.map +6 -0
- package/dist/in-venue/client.js +120 -0
- package/dist/in-venue/client.js.map +6 -0
- package/dist/in-venue/error.js +19 -0
- package/dist/in-venue/error.js.map +6 -0
- package/dist/in-venue/index.d.ts +338 -0
- package/dist/in-venue/index.js +24 -0
- package/dist/in-venue/index.js.map +6 -0
- package/dist/in-venue/react/bill-page.js +348 -0
- package/dist/in-venue/react/bill-page.js.map +6 -0
- package/dist/in-venue/react/in-venue-page.js +103 -0
- package/dist/in-venue/react/in-venue-page.js.map +6 -0
- package/dist/in-venue/react/order-panel.js +281 -0
- package/dist/in-venue/react/order-panel.js.map +6 -0
- package/dist/in-venue/react/pay-point-page.js +51 -0
- package/dist/in-venue/react/pay-point-page.js.map +6 -0
- package/dist/in-venue/react/shared.js +190 -0
- package/dist/in-venue/react/shared.js.map +6 -0
- package/dist/in-venue/react/table-menus-page.js +148 -0
- package/dist/in-venue/react/table-menus-page.js.map +6 -0
- package/dist/in-venue/react.d.ts +120 -0
- package/dist/in-venue/react.js +15 -0
- package/dist/in-venue/react.js.map +6 -0
- package/dist/in-venue/table.js +63 -0
- package/dist/in-venue/table.js.map +6 -0
- package/dist/in-venue/types.js +1 -0
- package/dist/in-venue/types.js.map +6 -0
- package/dist/in-venue/watch.js +83 -0
- package/dist/in-venue/watch.js.map +6 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/index.d.ts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/persist/catalogue.d.ts +2 -2
- package/dist/receipts/index.d.ts +23 -0
- package/dist/receipts/index.js +49 -0
- package/dist/receipts/index.js.map +6 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/site-error/index.d.ts +45 -0
- package/dist/site-error/index.js +33 -0
- package/dist/site-error/index.js.map +6 -0
- package/dist/site-error/react.d.ts +18 -0
- package/dist/site-error/react.js +15 -0
- package/dist/site-error/react.js.map +6 -0
- package/dist/testing/index.d.ts +1 -1
- package/dist/transport/search.d.ts +1 -1
- package/dist/transport/selected-menu.d.ts +2 -2
- package/dist/{types-DMMeyB5d.d.ts → types-ooHA0lwH.d.ts} +2 -0
- package/package.json +30 -2
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/error-pages/react.tsx"],
|
|
4
|
+
"mappings": ";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,gBAAgB;AAEzB;AAAA,EACE,qBAAAA;AAAA,OAGK;AA0BD,cAII,YAJJ;AAXC,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AACF,GAA2B;AACzB,QAAM,QAAQ;AAAA,IACZ,QAAQ,kBAAkB,KAAK;AAAA,IAC/B,SAAS,SAAY,CAAC,IAAI,EAAE,KAAK;AAAA,EACnC;AACA,SACE,qBAAC,YACC;AAAA,wBAAC,UAAK,KAAI,cAAa,MAAM,sBAAsB;AAAA,IACnD,oBAAC,WAAO,iCAAsB;AAAA,IAC9B,qBAAC,UAAK,WAAU,OAAM,aAAW,MAAM,MACrC;AAAA,0BAAC,SAAI,WAAU,aACb,+BAAC,aACC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,QAAQ,MAAM,KAAK;AAAA,YACnB,OAAM;AAAA;AAAA,QACR;AAAA,QACA,oBAAC,SAAI,KAAK,MAAM,KAAK,OAAO,KAAI,UAAS,OAAM,OAAM,QAAO,MAAK;AAAA,SACnE,GACF;AAAA,MACA,oBAAC,SAAI,WAAU,cACb,+BAAC,SAAI,WAAU,YACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,KAAK,MAAM;AAAA,YACX,KAAI;AAAA,YACJ,OAAM;AAAA,YACN,QAAO;AAAA;AAAA,QACT;AAAA,QACA,oBAAC,QAAG,WAAU,aAAa,gBAAM,OAAM;AAAA,QACvC,oBAAC,OAAE,WAAU,YAAY,gBAAM,MAAK;AAAA,QACpC,oBAAC,SAAI,WAAU,eACZ,gBAAM,QAAQ,IAAI,CAAC,WAClB;AAAA,UAAC;AAAA;AAAA,YAEC,WACE,OAAO,UAAU,2BAA2B;AAAA,YAE9C,MAAM,OAAO;AAAA,YAEZ,iBAAO;AAAA;AAAA,UANH,OAAO;AAAA,QAOd,CACD,GACH;AAAA,SACF,GACF;AAAA,OACF;AAAA,KACF;AAEJ;",
|
|
5
|
+
"names": ["platformErrorKind"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// src/in-venue/bill.ts
|
|
2
|
+
function publicId(prefix, id) {
|
|
3
|
+
return id.startsWith(`${prefix}_`) ? id : `${prefix}_${id}`;
|
|
4
|
+
}
|
|
5
|
+
function destinationPath(destination, payPointId) {
|
|
6
|
+
const query = (ids2) => {
|
|
7
|
+
const params = new URLSearchParams();
|
|
8
|
+
for (const [key, value] of Object.entries(ids2)) {
|
|
9
|
+
if (value) {
|
|
10
|
+
params.set(key, value);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
params.set("pay_point_id", payPointId);
|
|
14
|
+
return `?${params}`;
|
|
15
|
+
};
|
|
16
|
+
const ids = {
|
|
17
|
+
menu_id: destination.menu_id,
|
|
18
|
+
menu_group_id: destination.menu_group_id
|
|
19
|
+
};
|
|
20
|
+
switch (destination.type) {
|
|
21
|
+
case "dine_in_order":
|
|
22
|
+
return destination.order_id ? `/dine-in/${encodeURIComponent(destination.order_id)}${query({})}` : void 0;
|
|
23
|
+
case "menu":
|
|
24
|
+
case "menu_group":
|
|
25
|
+
return `/dine-in/menus${query(ids)}`;
|
|
26
|
+
default:
|
|
27
|
+
return void 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function billScope(selected, diners) {
|
|
31
|
+
const everyone = diners.length > 0 && diners.every((diner) => selected.includes(diner.id));
|
|
32
|
+
return everyone ? [] : [...selected];
|
|
33
|
+
}
|
|
34
|
+
function unassignedTotal(order) {
|
|
35
|
+
const assigned = order.diners.reduce(
|
|
36
|
+
(total, diner) => total + diner.total.amount_minor,
|
|
37
|
+
0
|
|
38
|
+
);
|
|
39
|
+
return Math.max(order.total.amount_minor - assigned, 0);
|
|
40
|
+
}
|
|
41
|
+
function sortDiners(diners, me) {
|
|
42
|
+
if (!me) {
|
|
43
|
+
return [...diners].sort((left, right) => left.id.localeCompare(right.id));
|
|
44
|
+
}
|
|
45
|
+
const mine = diners.filter((diner) => diner.id === me);
|
|
46
|
+
return [...mine, ...diners.filter((diner) => diner.id !== me)];
|
|
47
|
+
}
|
|
48
|
+
function scopeMessage(paying, scope, diners, me) {
|
|
49
|
+
if (scope.length === 0 || scope.length >= diners.length) {
|
|
50
|
+
return paying ? "You're about to pay the whole bill." : "Viewing everyone's bill.";
|
|
51
|
+
}
|
|
52
|
+
const [first] = scope;
|
|
53
|
+
const name = diners.find((value) => value.id === first)?.first_name || "Guest";
|
|
54
|
+
const n = scope.length - 1;
|
|
55
|
+
const rest = n ? ` and ${n} other${paying ? n > 1 ? " people" : " person" : n > 1 ? "s" : ""}` : "";
|
|
56
|
+
if (paying) {
|
|
57
|
+
return `You're about to pay for ${!n && first === me ? "yourself" : name}${rest}.`;
|
|
58
|
+
}
|
|
59
|
+
const owner = first === me ? "your" : name.endsWith("s") ? `${name}'` : `${name}'s`;
|
|
60
|
+
return `Viewing ${owner} bill${rest}.`;
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
billScope,
|
|
64
|
+
destinationPath,
|
|
65
|
+
publicId,
|
|
66
|
+
scopeMessage,
|
|
67
|
+
sortDiners,
|
|
68
|
+
unassignedTotal
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=bill.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/in-venue/bill.ts"],
|
|
4
|
+
"mappings": ";AASO,SAAS,SAAS,QAAgB,IAAoB;AAC3D,SAAO,GAAG,WAAW,GAAG,MAAM,GAAG,IAAI,KAAK,GAAG,MAAM,IAAI,EAAE;AAC3D;AAUO,SAAS,gBACd,aACA,YACoB;AACpB,QAAM,QAAQ,CAACA,SAA4C;AACzD,UAAM,SAAS,IAAI,gBAAgB;AACnC,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQA,IAAG,GAAG;AAC9C,UAAI,OAAO;AACT,eAAO,IAAI,KAAK,KAAK;AAAA,MACvB;AAAA,IACF;AACA,WAAO,IAAI,gBAAgB,UAAU;AACrC,WAAO,IAAI,MAAM;AAAA,EACnB;AACA,QAAM,MAAM;AAAA,IACV,SAAS,YAAY;AAAA,IACrB,eAAe,YAAY;AAAA,EAC7B;AACA,UAAQ,YAAY,MAAM;AAAA,IACxB,KAAK;AACH,aAAO,YAAY,WACf,YAAY,mBAAmB,YAAY,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,KAChE;AAAA,IACN,KAAK;AAAA,IACL,KAAK;AACH,aAAO,iBAAiB,MAAM,GAAG,CAAC;AAAA,IACp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,IAAI;AACnE,SAAO,WAAW,KAAK,QAAQ,IAAI;AACrC;",
|
|
5
|
+
"names": ["ids"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// src/in-venue/client.ts
|
|
2
|
+
import { receiptFile } from "@zappie/sdk/receipts";
|
|
3
|
+
import { apiError, requestWithRetry } from "../internal/customer-http.js";
|
|
4
|
+
import { publicId } from "./bill.js";
|
|
5
|
+
import { InVenueError } from "./error.js";
|
|
6
|
+
import { watchBill } from "./watch.js";
|
|
7
|
+
var DEFAULT_CUSTOMER_BASE = "/_zappie/api";
|
|
8
|
+
function createInVenue(options = {}) {
|
|
9
|
+
const base = (options.customerBase ?? DEFAULT_CUSTOMER_BASE).replace(
|
|
10
|
+
/\/+$/,
|
|
11
|
+
""
|
|
12
|
+
);
|
|
13
|
+
const fetcher = options.fetch ?? globalThis.fetch;
|
|
14
|
+
const request = async (path, init = {}) => {
|
|
15
|
+
const response = await requestWithRetry(
|
|
16
|
+
fetcher,
|
|
17
|
+
base + path,
|
|
18
|
+
// Every answer through the site host's proxy is no-store, so the browser keeps none of them.
|
|
19
|
+
init,
|
|
20
|
+
"Could not reach the storefront"
|
|
21
|
+
);
|
|
22
|
+
if (!response.ok) {
|
|
23
|
+
const value = await apiError(
|
|
24
|
+
response,
|
|
25
|
+
`The storefront answered ${response.status}`
|
|
26
|
+
);
|
|
27
|
+
throw new InVenueError(
|
|
28
|
+
response.status,
|
|
29
|
+
value.apiCode,
|
|
30
|
+
value.message,
|
|
31
|
+
value.param,
|
|
32
|
+
value.issues
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
return await response.json();
|
|
36
|
+
};
|
|
37
|
+
const post = (path, body, idempotencyKey) => request(path, {
|
|
38
|
+
method: "POST",
|
|
39
|
+
headers: {
|
|
40
|
+
"Content-Type": "application/json",
|
|
41
|
+
"Idempotency-Key": idempotencyKey
|
|
42
|
+
},
|
|
43
|
+
body: JSON.stringify(body)
|
|
44
|
+
});
|
|
45
|
+
const receiptUrl = (id) => `${base}/dine-in-orders/${encodeURIComponent(publicId("ord", id))}/receipt`;
|
|
46
|
+
const signal = (value) => value ? { signal: value } : {};
|
|
47
|
+
const order = (id, readOptions = {}) => {
|
|
48
|
+
const query = readOptions.diners?.length ? `?${new URLSearchParams({ diners: readOptions.diners.join(",") })}` : "";
|
|
49
|
+
return request(
|
|
50
|
+
`/dine-in-orders/${encodeURIComponent(publicId("ord", id))}${query}`,
|
|
51
|
+
signal(readOptions.signal)
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
return {
|
|
55
|
+
/** The table, what it opens, and the bill it holds while that bill is open. */
|
|
56
|
+
payPoint: (id, readOptions = {}) => request(
|
|
57
|
+
`/pay-points/${encodeURIComponent(publicId("pp", id))}`,
|
|
58
|
+
signal(readOptions.signal)
|
|
59
|
+
),
|
|
60
|
+
/** Where a guest who scanned the table lands: their open bill when they ordered on it, else what the table opens. */
|
|
61
|
+
entry: (id, readOptions = {}) => request(
|
|
62
|
+
`/pay-points/${encodeURIComponent(publicId("pp", id))}/entry`,
|
|
63
|
+
signal(readOptions.signal)
|
|
64
|
+
),
|
|
65
|
+
/** A menu group's menus at the table's branch, without their items. Send the table so a group it pins reads even when switched off. */
|
|
66
|
+
menuGroup(id, readOptions = {}) {
|
|
67
|
+
const query = readOptions.payPointId ? `?${new URLSearchParams({ pay_point_id: publicId("pp", readOptions.payPointId) })}` : "";
|
|
68
|
+
return request(
|
|
69
|
+
`/menu-groups/${encodeURIComponent(publicId("mgrp", id))}${query}`,
|
|
70
|
+
signal(readOptions.signal)
|
|
71
|
+
);
|
|
72
|
+
},
|
|
73
|
+
/** The signed-in guest's wallet, one balance per currency. Needs the wallet scope. */
|
|
74
|
+
wallet: () => request("/me/wallet"),
|
|
75
|
+
/** The bill's receipt PDF address, for a download link. */
|
|
76
|
+
receiptUrl,
|
|
77
|
+
/** The bill's receipt as a PDF File named as the API names it, for the share sheet. */
|
|
78
|
+
receipt: (id) => receiptFile(receiptUrl(id), fetcher),
|
|
79
|
+
/** A table's bill. Pass `diners` to narrow its lines and totals to those guests. The order ID is enough to read it. */
|
|
80
|
+
dineInOrder: order,
|
|
81
|
+
/**
|
|
82
|
+
* Add the signed-in guest's lines to the table's bill, opening one when the table holds none.
|
|
83
|
+
* There's no payment step. The caller retains the key and reuses it when retrying the same lines.
|
|
84
|
+
*/
|
|
85
|
+
placeDineInOrder(body, idempotencyKey) {
|
|
86
|
+
return post(
|
|
87
|
+
"/dine-in-orders",
|
|
88
|
+
{ ...body, pay_point_id: publicId("pp", body.pay_point_id) },
|
|
89
|
+
idempotencyKey
|
|
90
|
+
);
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* Raise a payment for the chosen diners, or the whole bill when none are chosen, and answer the
|
|
94
|
+
* payment page to send the guest to. The caller retains the key when retrying.
|
|
95
|
+
*/
|
|
96
|
+
payDineInOrder(id, body, idempotencyKey) {
|
|
97
|
+
return post(
|
|
98
|
+
`/dine-in-orders/${encodeURIComponent(publicId("ord", id))}/payments`,
|
|
99
|
+
body,
|
|
100
|
+
idempotencyKey
|
|
101
|
+
);
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* Follow the whole bill live. `onBill` gets the current bill, then the bill after each change,
|
|
105
|
+
* until it closes or is voided. Falls back to polling when the event stream fails. Returns a stop function.
|
|
106
|
+
*/
|
|
107
|
+
watchDineInOrder(id, watchOptions) {
|
|
108
|
+
return watchBill(
|
|
109
|
+
base,
|
|
110
|
+
publicId("ord", id),
|
|
111
|
+
(orderId, abort) => order(orderId, signal(abort)),
|
|
112
|
+
watchOptions
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
createInVenue
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src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AAE,CAAC,CAAC;AAAA,QAC1D;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,iBAAiB,IAAY,cAAgC;AAC3D,aAAO;AAAA,QACL;AAAA,QACA,SAAS,OAAO,EAAE;AAAA,QAClB,CAAC,SAAS,UAAU,MAAM,SAAS,OAAO,KAAK,CAAC;AAAA,QAChD;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/in-venue/error.ts
|
|
2
|
+
import { stableErrorCode, ZappieError } from "../internal/customer-http.js";
|
|
3
|
+
var InVenueError = class extends ZappieError {
|
|
4
|
+
constructor(status, apiCode, message, param, issues) {
|
|
5
|
+
super(stableErrorCode(status, apiCode), message, {
|
|
6
|
+
status,
|
|
7
|
+
retryable: status === 429 || status >= 500,
|
|
8
|
+
...param !== void 0 ? { param } : {}
|
|
9
|
+
});
|
|
10
|
+
this.apiCode = apiCode;
|
|
11
|
+
if (issues !== void 0) {
|
|
12
|
+
this.issues = issues;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
InVenueError
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/in-venue/error.ts"],
|
|
4
|
+
"mappings": ";AAAA,SAAS,iBAAiB,mBAAmB;AAMtC,IAAM,eAAN,cAA2B,YAAY;AAAA,EAG5C,YACE,QACS,SACT,SACA,OACA,QACA;AACA,UAAM,gBAAgB,QAAQ,OAAO,GAAG,SAAS;AAAA,MAC/C;AAAA,MACA,WAAW,WAAW,OAAO,UAAU;AAAA,MACvC,GAAI,UAAU,SAAY,EAAE,MAAM,IAAI,CAAC;AAAA,IACzC,CAAC;AATQ;AAUT,QAAI,WAAW,QAAW;AACxB,WAAK,SAAS;AAAA,IAChB;AAAA,EACF;AACF;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { ZappieError, Zappie } from '@zappie/sdk';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* An API amount in minor currency units with its currency code.
|
|
5
|
+
*/
|
|
6
|
+
type Money = {
|
|
7
|
+
amount_minor: number;
|
|
8
|
+
currency: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* What scanning a table opens. `menu_id` or `menu_group_id` is set only when the business chose one.
|
|
12
|
+
*/
|
|
13
|
+
type PayPointTarget = {
|
|
14
|
+
type: "menu" | "menu_group" | "self_service_menu" | "self_service_menu_group" | "collect_payment" | "beacon" | "unknown";
|
|
15
|
+
menu_id?: string;
|
|
16
|
+
menu_group_id?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The table or counter a guest scanned, with its branch and the bill it holds while that bill is open.
|
|
20
|
+
*/
|
|
21
|
+
type PayPoint = {
|
|
22
|
+
object: "pay_point";
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
branch_id: string;
|
|
26
|
+
target: PayPointTarget;
|
|
27
|
+
open_order_id: string | null;
|
|
28
|
+
accepting_dine_in: boolean;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* The page a guest who scanned a table lands on. Each ID is set only for the page that reads it.
|
|
32
|
+
* `dine_in_disabled` means the branch isn't taking table orders right now.
|
|
33
|
+
*/
|
|
34
|
+
type PayPointDestination = {
|
|
35
|
+
type: "dine_in_order" | "menu" | "menu_group" | "self_service_menu" | "self_service_menu_group" | "collect_payment" | "beacon" | "dine_in_disabled";
|
|
36
|
+
order_id?: string;
|
|
37
|
+
menu_id?: string;
|
|
38
|
+
menu_group_id?: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Where a guest lands from a table.
|
|
42
|
+
*/
|
|
43
|
+
type PayPointEntry = {
|
|
44
|
+
object: "pay_point_entry";
|
|
45
|
+
pay_point_id: string;
|
|
46
|
+
destination: PayPointDestination;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* One menu of a group, without its items. Read its items with the storefront client.
|
|
50
|
+
*/
|
|
51
|
+
type MenuGroupMenu = {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
description?: string | null;
|
|
55
|
+
[field: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* A menu group with its menus as the branch serves them on the fulfilment asked for.
|
|
59
|
+
*/
|
|
60
|
+
type MenuGroup = {
|
|
61
|
+
object: "menu_group";
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
description: string | null;
|
|
65
|
+
logo: string | null;
|
|
66
|
+
fulfilment: string;
|
|
67
|
+
menus: MenuGroupMenu[];
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* An option recorded on a bill line.
|
|
71
|
+
*/
|
|
72
|
+
type BillChoice = {
|
|
73
|
+
group_id: string;
|
|
74
|
+
choice_id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
price: Money;
|
|
77
|
+
quantity: number;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* One line of a table's bill and the guest who ordered it. `diner_id` is null for a line staff added for nobody.
|
|
81
|
+
*/
|
|
82
|
+
type DineInLine = {
|
|
83
|
+
item_id: string;
|
|
84
|
+
variant_id?: string;
|
|
85
|
+
name: string;
|
|
86
|
+
quantity: number;
|
|
87
|
+
unit_price: Money;
|
|
88
|
+
total: Money;
|
|
89
|
+
notes?: string;
|
|
90
|
+
diner_id: string | null;
|
|
91
|
+
choices: BillChoice[];
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* A guest on the bill, by first name only, with their share.
|
|
95
|
+
*/
|
|
96
|
+
type Diner = {
|
|
97
|
+
id: string;
|
|
98
|
+
first_name: string;
|
|
99
|
+
total: Money;
|
|
100
|
+
paid: Money;
|
|
101
|
+
remaining: Money;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* A table's bill. When diners were asked about, the lines and totals cover only them, while `diners`
|
|
105
|
+
* and `payment` stay whole.
|
|
106
|
+
*/
|
|
107
|
+
type DineInOrder = {
|
|
108
|
+
object: "dine_in_order";
|
|
109
|
+
id: string;
|
|
110
|
+
table: string;
|
|
111
|
+
branch_id: string;
|
|
112
|
+
status: "open" | "closed" | "voided";
|
|
113
|
+
currency: string;
|
|
114
|
+
lines: DineInLine[];
|
|
115
|
+
subtotal: Money;
|
|
116
|
+
charges: {
|
|
117
|
+
code: string;
|
|
118
|
+
label: string;
|
|
119
|
+
amount: Money;
|
|
120
|
+
}[];
|
|
121
|
+
total: Money;
|
|
122
|
+
paid: Money;
|
|
123
|
+
remaining: Money;
|
|
124
|
+
diners: Diner[];
|
|
125
|
+
payment: {
|
|
126
|
+
status: "paid" | "partially_paid" | "unpaid";
|
|
127
|
+
amount_paid: Money;
|
|
128
|
+
remaining: Money;
|
|
129
|
+
};
|
|
130
|
+
placed_at: string;
|
|
131
|
+
updated_at: string;
|
|
132
|
+
diner_ids: string[];
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* One line a guest orders, in quote line fields.
|
|
136
|
+
*/
|
|
137
|
+
type DineInOrderLine = {
|
|
138
|
+
line_id: string;
|
|
139
|
+
item_id: string;
|
|
140
|
+
menu_id?: string;
|
|
141
|
+
variant_id?: string;
|
|
142
|
+
quantity: number;
|
|
143
|
+
options?: {
|
|
144
|
+
group_id: string;
|
|
145
|
+
choice_id: string;
|
|
146
|
+
quantity?: number;
|
|
147
|
+
}[];
|
|
148
|
+
inputs?: Record<string, string>;
|
|
149
|
+
note?: string;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* The lines a signed-in guest adds to a table's bill.
|
|
153
|
+
*/
|
|
154
|
+
type DineInOrderRequest = {
|
|
155
|
+
pay_point_id: string;
|
|
156
|
+
lines: DineInOrderLine[];
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* The diners a guest pays for. Leave `diner_ids` empty to pay the whole bill.
|
|
160
|
+
*/
|
|
161
|
+
type DineInPaymentRequest = {
|
|
162
|
+
diner_ids?: string[];
|
|
163
|
+
use_wallet_balance?: boolean;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* The payment a guest finishes on Zappie's payment page at `url`.
|
|
167
|
+
*/
|
|
168
|
+
type BillPayment = {
|
|
169
|
+
payment_request_id: string;
|
|
170
|
+
amount: Money;
|
|
171
|
+
url: string;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* What the signed-in guest's wallet holds, one balance per currency. A currency missing from the
|
|
175
|
+
* list holds nothing.
|
|
176
|
+
*/
|
|
177
|
+
type Wallet = {
|
|
178
|
+
object: "wallet";
|
|
179
|
+
balances: Money[];
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Endpoint overrides for the in-venue client.
|
|
183
|
+
*/
|
|
184
|
+
type InVenueClientOptions = {
|
|
185
|
+
/** The same-origin API base. Defaults to `/_zappie/api`, which Zappie hosting serves. */
|
|
186
|
+
customerBase?: string;
|
|
187
|
+
fetch?: typeof fetch;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* A bill callback, optional cancellation, the diners to narrow to and the fallback polling interval.
|
|
191
|
+
*/
|
|
192
|
+
type WatchBillOptions = {
|
|
193
|
+
onBill(order: DineInOrder): void;
|
|
194
|
+
signal?: AbortSignal;
|
|
195
|
+
/** Polling interval in milliseconds when the event stream is unavailable. Defaults to 15 seconds. */
|
|
196
|
+
pollMs?: number;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* The API's form of an ID that may arrive bare. Printed table codes and older links carry the bare
|
|
201
|
+
* internal ID, such as `/dine-in/menus?pay_point_id=Xy12`, while the API reads `pp_Xy12`.
|
|
202
|
+
*
|
|
203
|
+
* @param prefix - The ID's prefix without its underscore, such as `pp`, `ord`, `menu` or `mgrp`.
|
|
204
|
+
* @param id - The ID as the address carried it.
|
|
205
|
+
*/
|
|
206
|
+
declare function publicId(prefix: string, id: string): string;
|
|
207
|
+
/**
|
|
208
|
+
* The storefront path for where a guest lands from a table, as the classic app's links spell it,
|
|
209
|
+
* or undefined for a page storefronts don't serve: self-service, collect payment, a beacon, or a
|
|
210
|
+
* branch not taking table orders.
|
|
211
|
+
*
|
|
212
|
+
* @param destination - The `destination` from `entry(payPointId)`.
|
|
213
|
+
* @param payPointId - The table the guest scanned.
|
|
214
|
+
*/
|
|
215
|
+
declare function destinationPath(destination: PayPointDestination, payPointId: string): string | undefined;
|
|
216
|
+
/**
|
|
217
|
+
* The diners to send when paying or reading a share. Choosing every diner on the bill is the whole
|
|
218
|
+
* bill, which the API reads as no diners.
|
|
219
|
+
*
|
|
220
|
+
* @param selected - The diner IDs the guest chose.
|
|
221
|
+
* @param diners - Every diner on the bill.
|
|
222
|
+
*/
|
|
223
|
+
declare function billScope(selected: readonly string[], diners: readonly Pick<Diner, "id">[]): string[];
|
|
224
|
+
/**
|
|
225
|
+
* What the bill holds beyond its diners' shares, in minor units: lines no diner ordered, which no
|
|
226
|
+
* diner's share covers. Never negative.
|
|
227
|
+
*
|
|
228
|
+
* @param order - The whole bill.
|
|
229
|
+
*/
|
|
230
|
+
declare function unassignedTotal(order: Pick<DineInOrder, "total" | "diners">): number;
|
|
231
|
+
/**
|
|
232
|
+
* The bill's diners with the signed-in guest first. Without a signed-in guest they keep a stable
|
|
233
|
+
* order by ID.
|
|
234
|
+
*
|
|
235
|
+
* @param diners - Every diner on the bill.
|
|
236
|
+
* @param me - The signed-in guest's customer ID, when known.
|
|
237
|
+
*/
|
|
238
|
+
declare function sortDiners(diners: readonly Diner[], me: string | undefined): Diner[];
|
|
239
|
+
/**
|
|
240
|
+
* The classic bill's words for whose share the guest is viewing, such as "Viewing your bill and 1
|
|
241
|
+
* other.", or, when `paying`, whose share a payment covers, such as "You're about to pay for Bayo.".
|
|
242
|
+
*
|
|
243
|
+
* @param paying - Word it for the payment confirmation.
|
|
244
|
+
* @param scope - The diners the bill is narrowed to. None is the whole bill.
|
|
245
|
+
* @param diners - Every diner on the bill.
|
|
246
|
+
* @param me - The signed-in guest's customer ID, when known.
|
|
247
|
+
*/
|
|
248
|
+
declare function scopeMessage(paying: boolean, scope: readonly string[], diners: readonly Diner[], me: string | undefined): string;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Create a client for what a guest at a table reads and does: the table they scanned, where it
|
|
252
|
+
* sends them, its menu group, and the bill they share, order onto and pay.
|
|
253
|
+
*
|
|
254
|
+
* Requests go through the same-origin `/_zappie/api` that Zappie hosting serves, which sends the
|
|
255
|
+
* site's key and the signed-in guest's token. Reads need no sign-in. Ordering and paying do.
|
|
256
|
+
* IDs may be given bare, as printed table codes carry them, or with their API prefix.
|
|
257
|
+
*
|
|
258
|
+
* @param options - Override the default `/_zappie/api` base or fetch implementation.
|
|
259
|
+
* @returns An in-venue client. Retain each idempotency key when retrying the same order or payment.
|
|
260
|
+
*/
|
|
261
|
+
declare function createInVenue(options?: InVenueClientOptions): {
|
|
262
|
+
/** The table, what it opens, and the bill it holds while that bill is open. */
|
|
263
|
+
payPoint: (id: string, readOptions?: {
|
|
264
|
+
signal?: AbortSignal;
|
|
265
|
+
}) => Promise<PayPoint>;
|
|
266
|
+
/** Where a guest who scanned the table lands: their open bill when they ordered on it, else what the table opens. */
|
|
267
|
+
entry: (id: string, readOptions?: {
|
|
268
|
+
signal?: AbortSignal;
|
|
269
|
+
}) => Promise<PayPointEntry>;
|
|
270
|
+
/** A menu group's menus at the table's branch, without their items. Send the table so a group it pins reads even when switched off. */
|
|
271
|
+
menuGroup(id: string, readOptions?: {
|
|
272
|
+
payPointId?: string;
|
|
273
|
+
signal?: AbortSignal;
|
|
274
|
+
}): Promise<MenuGroup>;
|
|
275
|
+
/** The signed-in guest's wallet, one balance per currency. Needs the wallet scope. */
|
|
276
|
+
wallet: () => Promise<Wallet>;
|
|
277
|
+
/** The bill's receipt PDF address, for a download link. */
|
|
278
|
+
receiptUrl: (id: string) => string;
|
|
279
|
+
/** The bill's receipt as a PDF File named as the API names it, for the share sheet. */
|
|
280
|
+
receipt: (id: string) => Promise<File>;
|
|
281
|
+
/** A table's bill. Pass `diners` to narrow its lines and totals to those guests. The order ID is enough to read it. */
|
|
282
|
+
dineInOrder: (id: string, readOptions?: {
|
|
283
|
+
diners?: readonly string[];
|
|
284
|
+
signal?: AbortSignal;
|
|
285
|
+
}) => Promise<DineInOrder>;
|
|
286
|
+
/**
|
|
287
|
+
* Add the signed-in guest's lines to the table's bill, opening one when the table holds none.
|
|
288
|
+
* There's no payment step. The caller retains the key and reuses it when retrying the same lines.
|
|
289
|
+
*/
|
|
290
|
+
placeDineInOrder(body: DineInOrderRequest, idempotencyKey: string): Promise<DineInOrder>;
|
|
291
|
+
/**
|
|
292
|
+
* Raise a payment for the chosen diners, or the whole bill when none are chosen, and answer the
|
|
293
|
+
* payment page to send the guest to. The caller retains the key when retrying.
|
|
294
|
+
*/
|
|
295
|
+
payDineInOrder(id: string, body: DineInPaymentRequest, idempotencyKey: string): Promise<BillPayment>;
|
|
296
|
+
/**
|
|
297
|
+
* Follow the whole bill live. `onBill` gets the current bill, then the bill after each change,
|
|
298
|
+
* until it closes or is voided. Falls back to polling when the event stream fails. Returns a stop function.
|
|
299
|
+
*/
|
|
300
|
+
watchDineInOrder(id: string, watchOptions: WatchBillOptions): () => void;
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* The table, bill and menu group operations returned by createInVenue.
|
|
304
|
+
*/
|
|
305
|
+
type InVenueClient = ReturnType<typeof createInVenue>;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* A table or bill request the API refused, with its HTTP status and API code, such as
|
|
309
|
+
* `order_refused`, `nothing_to_pay` or `line_invalid`. Statuses 429 and 5xx are marked retryable.
|
|
310
|
+
*/
|
|
311
|
+
declare class InVenueError extends ZappieError {
|
|
312
|
+
readonly apiCode: string;
|
|
313
|
+
readonly issues?: unknown;
|
|
314
|
+
constructor(status: number, apiCode: string, message: string, param?: string, issues?: unknown);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* The table a storefront client is scoped to: its branch, the table itself and the menu it shows.
|
|
319
|
+
*/
|
|
320
|
+
type TableScope = {
|
|
321
|
+
branchId: string;
|
|
322
|
+
payPointId: string;
|
|
323
|
+
/** The one menu to show. Leave it out to show every menu the branch serves at tables. */
|
|
324
|
+
menuId?: string;
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* A storefront client for one table: the table's branch, its dine-in menus (or the one menu it
|
|
328
|
+
* shows) and a bag of its own, kept apart from the guest's online bag. Render the site's own
|
|
329
|
+
* catalogue and item sheet in a `ZappieProvider` with this client, and they read the table's menu
|
|
330
|
+
* and add to the table's bag.
|
|
331
|
+
*
|
|
332
|
+
* @param site - The site's storefront client. The table client copies its key, store and endpoints.
|
|
333
|
+
* @param scope - The table's branch, the table, and the menu to show.
|
|
334
|
+
*/
|
|
335
|
+
declare function createTableClient(site: Zappie, scope: TableScope): Zappie;
|
|
336
|
+
|
|
337
|
+
export { InVenueError, billScope, createInVenue, createTableClient, destinationPath, publicId, scopeMessage, sortDiners, unassignedTotal };
|
|
338
|
+
export type { BillChoice, BillPayment, DineInLine, DineInOrder, DineInOrderLine, DineInOrderRequest, DineInPaymentRequest, Diner, InVenueClient, InVenueClientOptions, MenuGroup, MenuGroupMenu, Money, PayPoint, PayPointDestination, PayPointEntry, PayPointTarget, TableScope, Wallet, WatchBillOptions };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/in-venue/index.ts
|
|
2
|
+
import {
|
|
3
|
+
billScope,
|
|
4
|
+
destinationPath,
|
|
5
|
+
publicId,
|
|
6
|
+
scopeMessage,
|
|
7
|
+
sortDiners,
|
|
8
|
+
unassignedTotal
|
|
9
|
+
} from "./bill.js";
|
|
10
|
+
import { createInVenue } from "./client.js";
|
|
11
|
+
import { InVenueError } from "./error.js";
|
|
12
|
+
import { createTableClient } from "./table.js";
|
|
13
|
+
export {
|
|
14
|
+
InVenueError,
|
|
15
|
+
billScope,
|
|
16
|
+
createInVenue,
|
|
17
|
+
createTableClient,
|
|
18
|
+
destinationPath,
|
|
19
|
+
publicId,
|
|
20
|
+
scopeMessage,
|
|
21
|
+
sortDiners,
|
|
22
|
+
unassignedTotal
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.js.map
|