@msm-platform/customer-react 0.4.2 → 0.4.3
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 +25 -18
- package/dist/booking-flow.d.ts +17 -0
- package/dist/booking.d.ts +20 -1
- package/dist/client.d.ts +7 -3
- package/dist/context.d.ts +2 -0
- package/dist/i18n.d.ts +31 -0
- package/dist/index.js +1138 -533
- package/dist/payment-tab.d.ts +22 -0
- package/dist/portal.d.ts +6 -2
- package/dist/screens/business.d.ts +12 -0
- package/dist/screens/shop.d.ts +14 -0
- package/dist/server/index.d.ts +15 -0
- package/dist/server/session.d.ts +24 -0
- package/dist/server.js +139 -106
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,25 @@ All notable changes to `@msm-platform/customer-react`. The format follows [Keep
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.4.3] - 2026-11-23
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `MsmBooking` offers "See all times" on its resource and times steps too, opening every time filtered by the event type and the resource chosen so far (by the type only from the resource step or after Anyone), and the customer can clear either filter. "Back" returns to the step it was opened from. `MsmBookingSelection` gains an optional `allFrom`, `{ eventTypeId, resourceId? }`, which `onChange` reports with `all` and which you feed back as a prop; hosts that keep the selection in their URL should keep it too, or Back returns to the event types.
|
|
12
|
+
- `createCustomerHandler` takes `cookieless: true` for screens in a cross-site iframe, where browsers block or partition cookies: sign-in, a new customer's registration and booking work without the two `__Host-` cookies. The handler hands the screens the encrypted session and pending registration in the `X-MSM-Session` and `X-MSM-Registration` headers, the screens keep them in the page's memory only and send them back, each opens only on requests the browser marks as from the page it was issued to (`Origin`, `Sec-Fetch-Site`), and a request the browser marks as another site's, or a write without `Origin`, is refused with 403 `CrossOriginRefused`. The engine token stays on your server. Mount it as its own handler on its own `basePath`; handlers with cookies work as before.
|
|
13
|
+
- The passes screen lists the memberships and passes the partner's businesses sell online, each with its price and terms and a "Buy with …" button for each way the business takes payments. It sends the customer to the provider's page and, back on the page they left, says whether the payment was received. The provider's receipt is the customer's; the screen shows none. The return adds `msmPurchase` to your page's query, which the screen removes, and `MsmCustomer` and `MsmAccount` open the passes screen for it. It needs the engine release with product checkouts and `@msm-platform/customer-sdk` with `startProductCheckout`.
|
|
14
|
+
- Booking a service with a price shows the price and what is paid now, then a "Pay with …" button for each way the business takes payments. It sends the customer to the provider's page and, back on the page they left, shows the booking once the payment is confirmed, or says the payment didn't go through or arrived after the time was taken. A service with no advance books with "Confirm booking". `MsmBooking` comes back to the same time after the provider's page: the return adds `msmCheckout` to your page's query, which it removes, and calls `onChange` with the selection the customer left from. `MsmCustomer` comes back to the same time too and removes `msmCheckout` the same way. It needs the engine release with paid bookings and `@msm-platform/customer-sdk` with `startCheckout`.
|
|
15
|
+
- `MsmBooking` takes `autoFocus={false}` for a flow placed in a page rather than a dialog: it opens without taking the page's focus or scrolling the page to it, and later steps still take focus. Without the prop it focuses its first field as before.
|
|
16
|
+
- With a cookieless server half, whose session lives only in the page, "Pay with …" and "Buy with …" open the provider's page in a new tab, and the booking or passes screen stays signed in and shows the result as soon as the payment arrives ("Finish paying in the new tab…", with an "Open the payment page" link if the browser refused the tab). The provider sends that tab back to your page with `msmTab` in the query, where the screens only say to go back, and close the tab when the browser lets them. Screens on a server half with cookies still go to the provider's page and back as before.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- The "Pay with …" and "Buy with …" buttons are the business's payment methods, in the order it chose and with the label it gave each, such as "Pay with Card", instead of one per provider named Teya or Blikk. It needs the engine release with payment methods and `@msm-platform/customer-sdk` with `listOnlinePaymentMethods`.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Notices (such as "You're booked."), badges (such as "Cancelled"), the cancellation box, warnings and errors take their colours from the nine `--msm-customer-*` properties instead of fixed light colours, so they are readable on a dark theme. With no properties set they look almost as before.
|
|
25
|
+
|
|
7
26
|
## [0.4.2] - 2026-11-20
|
|
8
27
|
|
|
9
28
|
### Added
|
package/README.md
CHANGED
|
@@ -59,18 +59,20 @@ import {
|
|
|
59
59
|
|
|
60
60
|
### `MsmBooking`
|
|
61
61
|
|
|
62
|
-
The booking flow for one business, in steps: the customer chooses an event type; then who provides it, with Anyone first, when two or more resources can; then a time.
|
|
63
|
-
|
|
64
|
-
| Prop | Meaning
|
|
65
|
-
| ------------- |
|
|
66
|
-
| `businessId` | The business.
|
|
67
|
-
| `eventTypeId` | Optional: opens past the first step on this event type, or filters See all times by it.
|
|
68
|
-
| `resourceId` | Optional: a resource that provides the event type, or `"any"` for anyone; with `all`, filters every time by it.
|
|
69
|
-
| `all` | Optional `true`: See all times.
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
62
|
+
The booking flow for one business, in steps: the customer chooses an event type; then who provides it, with Anyone first, when two or more resources can; then a time. See all times, every time at the business filtered by event type and by resource, is offered on the first step, unfiltered, and on the resource and times steps, filtered by the choice made there (none for Anyone); Back returns to the step it was opened from. A signed-out customer signs in with the time kept, and gives their name too when they are new, then holds, confirms and sees the booking with its cancel step. It has no tabs and never leaves the business.
|
|
63
|
+
|
|
64
|
+
| Prop | Meaning |
|
|
65
|
+
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
66
|
+
| `businessId` | The business. |
|
|
67
|
+
| `eventTypeId` | Optional: opens past the first step on this event type, or filters See all times by it. |
|
|
68
|
+
| `resourceId` | Optional: a resource that provides the event type, or `"any"` for anyone; with `all`, filters every time by it. |
|
|
69
|
+
| `all` | Optional `true`: See all times. |
|
|
70
|
+
| `allFrom` | Optional, with `all`: `{ eventTypeId, resourceId? }`, the resource or times step See all times was opened from (`resourceId` is a resource or `"any"` from the times step); Back returns to it. |
|
|
71
|
+
| `time` | Optional `MsmBookingTime`, `{ startsAt, eventTypeId, eventId?, resourceId? }`: opens on that time. A time that can no longer be booked shows the step it was in with a note. |
|
|
72
|
+
| `onChange` | Called with `MsmBookingSelection`, `{ businessId, eventTypeId?, resourceId?, all?, allFrom?, time? }`, at every step and every step back. Pass it to keep the selection in your URL and feed it back as props; leave it out and the component keeps the selection itself. |
|
|
73
|
+
| `onBooked` | Called once with the booking, `CustomerBooking`, when the customer confirms it. |
|
|
74
|
+
| `onClose` | Adds a Close button to every step, and Done to the booked step, that call it. |
|
|
75
|
+
| `autoFocus` | Optional, default `true`: the first field takes focus when the flow opens, as a dialog expects. Pass `false` for a flow placed in a page, so it neither takes the page's focus nor scrolls it; later steps still take focus. |
|
|
74
76
|
|
|
75
77
|
A hold cannot be read back, so mounting `MsmBooking` again on a `time` holds that time again.
|
|
76
78
|
|
|
@@ -109,6 +111,8 @@ Styles are scoped under `.msm-customer` with no global reset, in the one stylesh
|
|
|
109
111
|
| `--msm-customer-font` | Font family | `inherit` |
|
|
110
112
|
| `--msm-customer-radius` | Corner radius | `6px` (cards a third larger) |
|
|
111
113
|
|
|
114
|
+
Notices, badges, the cancellation box, warnings and errors take their colours from the same properties (tints of the accent and text colour on the surface, with a fixed amber and red mixed with the text colour), so a dark theme set with these nine stays readable.
|
|
115
|
+
|
|
112
116
|
```css
|
|
113
117
|
.msm-customer {
|
|
114
118
|
--msm-customer-accent: #7a2e8f;
|
|
@@ -144,12 +148,13 @@ export {
|
|
|
144
148
|
};
|
|
145
149
|
```
|
|
146
150
|
|
|
147
|
-
| Option | Meaning
|
|
148
|
-
| --------------------------------------- |
|
|
149
|
-
| `basePath` | Where the route is mounted; the screens' `basePath`.
|
|
150
|
-
| `engineUrl`, `clientId`, `clientSecret` | The engine and the partner's website application client. It calls the engine through `@msm-platform/customer-sdk` in server mode, so the secret never leaves this server.
|
|
151
|
-
| `sessionKeys` | One key or a list, each at least 32 bytes (`openssl rand -base64 32`). The first encrypts the cookie and every one decrypts, so to rotate put the new key first and keep the old one until its cookies expire.
|
|
152
|
-
| `clientIp` | Required. The visitor's address, from what your platform guarantees; the engine limits code requests by it. Return null when unknown, which refuses code requests.
|
|
151
|
+
| Option | Meaning |
|
|
152
|
+
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
153
|
+
| `basePath` | Where the route is mounted; the screens' `basePath`. |
|
|
154
|
+
| `engineUrl`, `clientId`, `clientSecret` | The engine and the partner's website application client. It calls the engine through `@msm-platform/customer-sdk` in server mode, so the secret never leaves this server. |
|
|
155
|
+
| `sessionKeys` | One key or a list, each at least 32 bytes (`openssl rand -base64 32`). The first encrypts the cookie and every one decrypts, so to rotate put the new key first and keep the old one until its cookies expire. |
|
|
156
|
+
| `clientIp` | Required. The visitor's address, from what your platform guarantees; the engine limits code requests by it. Return null when unknown, which refuses code requests. |
|
|
157
|
+
| `cookieless` | For screens in a cross-site iframe, where browsers block or partition cookies: keeps the session and a pending registration without cookies (see [Sessions](#sessions)). Mount it as its own handler on its own `basePath`. Default: cookies. |
|
|
153
158
|
|
|
154
159
|
MSM owns your website's Cloudflare Turnstile widget and keeps its secret: the engine verifies the screens' token with it and limits code requests per address and per phone, so this server needs no Redis and no Turnstile secret. MSM hands over the widget's site key, which is public, with the client credentials.
|
|
155
160
|
|
|
@@ -174,6 +179,8 @@ The session lives in no store: the cookie `__Host-msm_customer_session` (HttpOnl
|
|
|
174
179
|
|
|
175
180
|
A pending registration lives the same way: the cookie `__Host-msm_customer_registration`, with the same attributes and expiring with the engine's ticket (10 minutes), holds `{registrationTicket, expiresAt}` encrypted with the same keys. Each cookie's name is authenticated with its value, so neither opens as the other. The browser learns only that a name is needed; no response body carries the ticket.
|
|
176
181
|
|
|
182
|
+
With `cookieless: true`, for screens framed by another site, the handler sets no cookie. It hands the screens the same two encrypted values in the `X-MSM-Session` and `X-MSM-Registration` response headers instead; the screens keep them in the page's memory only and send them back in the same request headers, so a reload signs the customer out. Each value also holds the `Origin` of the request it was issued to, and opens only on a request the browser marks as from that page: one with the same `Origin`, or a same-origin read with no `Origin` and `Sec-Fetch-Site: same-origin`. Both headers are the browser's, not the page's, and need no public URL from your server. A request the browser marks as another site's (`Sec-Fetch-Site`), or a write without `Origin`, is refused with 403 `CrossOriginRefused` before the engine is called. A cookie's value never opens as a header's, nor the other way. The engine token stays on the server either way. Since the handles live only in the page, anything that navigates the frame signs the customer out. So with a session held this way, the "Pay with …" and "Buy with …" buttons open the provider's page in a new tab, opened on the click, and the screens stay and read the payment until it arrives; the provider sends that tab back to the screens' page with `msmTab` added to the query, where they only say to go back to the page the customer came from, and close the tab when the browser lets them. A browser that refuses the tab gets an "Open the payment page" link. `readCustomerSession` reads only the cookie, so it does not see a cookieless handler's sessions. (`sessionStorage` would survive a navigation, but Chrome refuses it in a cross-site frame once third-party cookies are blocked.)
|
|
183
|
+
|
|
177
184
|
`readCustomerSession(cookieValue, { sessionKeys })` reads the signed-in customer's session in the partner's own server code, such as a page that books through the customer SDK with `sessionHeaders(session.sessionToken)`, so the partner's pages and the screens share one sign-in. It returns null for a missing, undecryptable or expired cookie. It does not ask the engine, so a session revoked elsewhere reads as signed in until the engine answers 401; a caller that needs certainty calls the engine.
|
|
178
185
|
|
|
179
186
|
## Development
|
package/dist/booking-flow.d.ts
CHANGED
|
@@ -24,6 +24,17 @@ export interface MsmBookingSelection {
|
|
|
24
24
|
resourceId?: string;
|
|
25
25
|
/** Every time, with filters, after See all times. */
|
|
26
26
|
all?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* With `all`, the step See all times was opened from, when it was the
|
|
29
|
+
* resource or times step: the event type and the choice made there
|
|
30
|
+
* (`"any"` for Anyone, none from the resource step). Back returns to
|
|
31
|
+
* it, whatever the filters are by then. Without it, back goes to the
|
|
32
|
+
* event types.
|
|
33
|
+
*/
|
|
34
|
+
allFrom?: {
|
|
35
|
+
eventTypeId: string;
|
|
36
|
+
resourceId?: string;
|
|
37
|
+
};
|
|
27
38
|
time?: MsmBookingTime;
|
|
28
39
|
}
|
|
29
40
|
export interface MsmBookingProps extends MsmBookingSelection {
|
|
@@ -49,6 +60,12 @@ export interface MsmBookingProps extends MsmBookingSelection {
|
|
|
49
60
|
* here or in another of the package's components on the same `basePath`.
|
|
50
61
|
*/
|
|
51
62
|
onSessionChange?: (signedIn: boolean) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the first field takes focus when it opens, as a dialog expects
|
|
65
|
+
* (the default). Pass false for a flow placed in a page, which should not
|
|
66
|
+
* take the page's focus or scroll it; later steps still take focus.
|
|
67
|
+
*/
|
|
68
|
+
autoFocus?: boolean;
|
|
52
69
|
}
|
|
53
70
|
/**
|
|
54
71
|
* The booking flow for one business, for a host's overlay: choose an event
|
package/dist/booking.d.ts
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Business, type Candidate, type CustomerBooking } from "./client";
|
|
2
2
|
/** The candidate a customer chose to book, kept through sign-in. */
|
|
3
3
|
export interface Choice {
|
|
4
4
|
business: Business;
|
|
5
5
|
candidate: Candidate;
|
|
6
6
|
}
|
|
7
|
+
/** How the customer came back from the provider's page. */
|
|
8
|
+
export type CheckoutReturn = "paid" | "back";
|
|
9
|
+
/**
|
|
10
|
+
* #228: keeps the host's selection while the customer is on the provider's
|
|
11
|
+
* page, so the flow can open the same time when they come back.
|
|
12
|
+
*/
|
|
13
|
+
export declare function rememberSelection(selection: unknown): void;
|
|
14
|
+
/**
|
|
15
|
+
* Back from the provider's page: the marker it came back with, removed from
|
|
16
|
+
* the address bar, and the selection kept when the customer left.
|
|
17
|
+
*/
|
|
18
|
+
export declare function takeCheckoutReturn<Selection>(): {
|
|
19
|
+
outcome: CheckoutReturn;
|
|
20
|
+
selection: Selection | null;
|
|
21
|
+
} | null;
|
|
7
22
|
/** What the customer is booking: what, where, when and with whom. */
|
|
8
23
|
export declare function ChoiceSummary({ choice }: {
|
|
9
24
|
choice: Choice;
|
|
@@ -20,4 +35,8 @@ export declare function Booking(props: {
|
|
|
20
35
|
onBooked?: ((booking: CustomerBooking) => void) | undefined;
|
|
21
36
|
/** Without account navigation, the booked step's way out. */
|
|
22
37
|
onDone?: (() => void) | undefined;
|
|
38
|
+
/** #228: called just before the customer leaves for the provider's page. */
|
|
39
|
+
onLeave?: (() => void) | undefined;
|
|
40
|
+
/** #228: how the customer came back from the provider's page, if they did. */
|
|
41
|
+
returned?: CheckoutReturn | undefined;
|
|
23
42
|
}): import("react").JSX.Element;
|
package/dist/client.d.ts
CHANGED
|
@@ -16,6 +16,9 @@ export type CustomerImage = NonNullable<Business["logo"]>;
|
|
|
16
16
|
/** A confirmed booking, as the confirm route returns it. */
|
|
17
17
|
export type CustomerBooking = Ok<paths["/web/businesses/{businessId}/reservations/{reservationId}/confirm"]["post"]>;
|
|
18
18
|
export type MyDetails = Ok<paths["/web/me"]["get"]>;
|
|
19
|
+
/** #520: a business's product, and the customer's checkout of one. */
|
|
20
|
+
export type Product = Ok<paths["/web/businesses/{businessId}/products"]["get"]>["items"][number];
|
|
21
|
+
export type ProductCheckout = Ok<paths["/web/businesses/{businessId}/products/{productId}/checkout"]["get"]>;
|
|
19
22
|
export type EventType = Ok<paths["/web/businesses/{businessId}/event-types"]["get"]>["items"][number];
|
|
20
23
|
/** One booking candidate: a seat in a scheduled event or an open time slot. */
|
|
21
24
|
export type Candidate = Ok<paths["/web/businesses/{businessId}/availability"]["get"]>["items"][number];
|
|
@@ -34,10 +37,11 @@ export type CustomerBotCheck = {
|
|
|
34
37
|
siteKey: string;
|
|
35
38
|
};
|
|
36
39
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
40
|
+
* Whether the session on `basePath` lives only in this page's memory, as a
|
|
41
|
+
* cookieless server half's does, so that navigating the page ends it.
|
|
39
42
|
*/
|
|
40
|
-
export declare
|
|
43
|
+
export declare function sessionInMemory(basePath: string): boolean;
|
|
44
|
+
export declare function portalFetch(basePath: string, path: string, init?: RequestInit): Promise<Response>;
|
|
41
45
|
export declare function post(basePath: string, path: string, body?: unknown): Promise<Response>;
|
|
42
46
|
/**
|
|
43
47
|
* The customer SDK in proxy mode against the BFF under `basePath`, which adds the client's
|
package/dist/context.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export type CustomerScreen = "businesses" | "bookings" | "passes" | "details" |
|
|
|
11
11
|
};
|
|
12
12
|
export interface Portal {
|
|
13
13
|
client: CustomerClient;
|
|
14
|
+
/** Where the server half is mounted, without a trailing slash. */
|
|
15
|
+
basePath: string;
|
|
14
16
|
/** The partner's public businesses by ID; a business missing here is not public. */
|
|
15
17
|
businesses: Map<string, Business>;
|
|
16
18
|
/** Whether `businesses` is complete, still loading or failed to load. */
|
package/dist/i18n.d.ts
CHANGED
|
@@ -112,6 +112,7 @@ declare const en: {
|
|
|
112
112
|
readonly "book.anyResource": "Anyone";
|
|
113
113
|
readonly "book.anyResourceHint": "The first free times with anyone who offers it";
|
|
114
114
|
readonly "book.toTypes": "Back to services";
|
|
115
|
+
readonly "book.toStep": "Back";
|
|
115
116
|
readonly "book.otherResource": "Choose someone else";
|
|
116
117
|
readonly "book.reserveAgain": "Hold this time again";
|
|
117
118
|
readonly "book.full": "This class is full now. Choose another time.";
|
|
@@ -124,6 +125,25 @@ declare const en: {
|
|
|
124
125
|
readonly "book.banned.undated": "You can't book online right now because of bookings you didn't show up to. Contact the business if you think this is a mistake.";
|
|
125
126
|
readonly "book.refused": "This business can't take your booking. Contact them.";
|
|
126
127
|
readonly "book.failed": "The booking could not be made. Try again.";
|
|
128
|
+
readonly "pay.price": "Price: {price}";
|
|
129
|
+
readonly "pay.advance": "Pay {advance} now to book. The rest, {rest}, is paid later.";
|
|
130
|
+
readonly "pay.whole": "Pay {advance} now to book.";
|
|
131
|
+
readonly "pay.later": "Nothing to pay now; you pay {price} later.";
|
|
132
|
+
readonly "pay.with": "Pay with {provider}";
|
|
133
|
+
readonly "pay.none": "This business doesn't take payments online yet. Contact them to book.";
|
|
134
|
+
readonly "pay.redirecting": "Taking you to the payment page…";
|
|
135
|
+
readonly "pay.checking": "Checking your payment…";
|
|
136
|
+
readonly "pay.away": "Finish paying in the new tab. You'll see your booking here as soon as the payment arrives.";
|
|
137
|
+
readonly "pay.awayBlocked": "Open the payment page to pay. You'll see the result here as soon as the payment arrives.";
|
|
138
|
+
readonly "pay.open": "Open the payment page";
|
|
139
|
+
readonly "pay.tabDone": "You can close this tab. The page you came from shows whether your payment went through.";
|
|
140
|
+
readonly "pay.notFinished": "You haven't finished paying. We're holding this time for you until {time}.";
|
|
141
|
+
readonly "pay.again": "Go back to payment";
|
|
142
|
+
readonly "pay.released": "Your payment didn't go through, so the time was released. Hold it again if it's still free.";
|
|
143
|
+
readonly "pay.paidUnbooked": "We received your payment, but the time was taken before it arrived, so you're not booked. The business will contact you about your payment.";
|
|
144
|
+
readonly "pay.slow": "Your payment is still being confirmed. Check your bookings in a few minutes.";
|
|
145
|
+
readonly "pay.unavailable": "The payment page couldn't be opened. Try again in a moment.";
|
|
146
|
+
readonly "pay.notOffered": "This way of paying isn't available. Choose another.";
|
|
127
147
|
readonly "passes.heading": "Memberships and passes";
|
|
128
148
|
readonly "passes.empty": "You have no memberships or passes.";
|
|
129
149
|
readonly "passes.unlimited": "Unlimited";
|
|
@@ -131,6 +151,15 @@ declare const en: {
|
|
|
131
151
|
readonly "passes.validFrom": "Valid from {date}";
|
|
132
152
|
readonly "passes.validRange": "Valid {from} – {until}";
|
|
133
153
|
readonly "passes.expired": "Expired";
|
|
154
|
+
readonly "shop.heading": "Buy a membership or pass";
|
|
155
|
+
readonly "shop.buy": "Buy with {provider}";
|
|
156
|
+
readonly "shop.paid": "Thank you, your payment is received. The receipt comes from the payment provider, and your purchase shows here once it's ready.";
|
|
157
|
+
readonly "shop.notPaid": "Your payment didn't go through, so nothing was bought.";
|
|
158
|
+
readonly "shop.notFinished": "You haven't finished paying, so nothing was bought yet.";
|
|
159
|
+
readonly "shop.away": "Finish paying in the new tab. You'll see here as soon as the payment arrives.";
|
|
160
|
+
readonly "shop.slow": "Your payment is still being confirmed. Check back here in a few minutes.";
|
|
161
|
+
readonly "shop.outside": "You can buy from {business} online once you're its customer. Book with them first, or ask them.";
|
|
162
|
+
readonly "shop.gone": "This is no longer sold. Choose something else.";
|
|
134
163
|
readonly "details.heading": "My details";
|
|
135
164
|
readonly "details.name": "Name";
|
|
136
165
|
readonly "details.phone": "Phone";
|
|
@@ -157,6 +186,8 @@ type Params = Record<string, string | number>;
|
|
|
157
186
|
export declare function t(key: MessageKey, params?: Params): string;
|
|
158
187
|
/** A plural message chosen by `count`, which also fills `{count}`. */
|
|
159
188
|
export declare function tp(base: PluralBase, count: number, params?: Params): string;
|
|
189
|
+
/** An amount in its currency's ISO 4217 minor unit, such as 12400 ISK. */
|
|
190
|
+
export declare function formatMoney(minor: number, currency: string): string;
|
|
160
191
|
export declare function formatNumber(value: number): string;
|
|
161
192
|
/**
|
|
162
193
|
* Date and time in a business's timezone, or the browser's when the business
|