@msm-platform/customer-sdk 0.4.1 → 0.5.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 +17 -0
- package/dist/generated/api.d.ts +1137 -1613
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ All notable changes to `@msm-platform/customer-sdk`. The format follows [Keep a
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.5.0] - 2026-11-23
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- A signed-in customer buys one of a business's products with `startProductCheckout`, `POST /web/businesses/{businessId}/products/{productId}/checkout`, with `provider` (one `listOfferedPaymentProviders` lists), `successUrl` and `cancelUrl`: it sells the product at its price of now and returns `payment.redirectUrl`, the provider's page to pay the full price at; a repeat returns the same sale and payment until that payment ends unpaid. `getProductCheckout` reads the newest checkout of the product: `pending`, `paid` with `paidAt` once the payment is recorded, or `abandoned`. The customer must already be the business's customer (422 `CustomerOutsideBusiness`); an inactive product is 422 `ProductInactive`. The provider's receipt is the customer's proof of purchase.
|
|
12
|
+
- `startProductCheckout` answers 409 `DeliveryLimitReached` before taking any payment when the product delivers a membership one customer may get only so many of, such as a once-per-customer trial, and the customer already has them. Once the sale is paid, the membership or pass the product delivers appears in `listMyMemberships` after the engine's delivery job runs.
|
|
13
|
+
- A reservation of an event type with a price is paid for through a checkout: `startCheckout` holds the seat while the customer pays its advance on the chosen provider's page (`payment.redirectUrl`), `getCheckout` reads whether it is `confirmed` (with `bookingId`), `pending`, `released` or `unconfirmed_paid`, and `listOfferedPaymentProviders` lists the providers a business takes payments through. With no advance, `startCheckout` confirms at once.
|
|
14
|
+
- `listPublicProducts`, `GET /web/businesses/{businessId}/products`, lists a public business's active products, such as memberships and passes, oldest first, each with `title`, `description`, `image`, `currency`, `price` (with VAT, in the currency's ISO 4217 minor unit, so 12.400 kr. is `12400`), `vatRateBp` (24 % is `2400`) and `terms`. It answers 404 `BusinessNotFound` for a business that is not public.
|
|
15
|
+
- Each event type `GET /web/businesses/{businessId}/event-types` returns has `price`: the price a booking of it costs, `{ amount, currency, vatRateBp, advanceAmount }`, or null when it has none. `amount` includes VAT and is a whole number of the currency's ISO 4217 minor unit (ISK has none, so 6.900 kr. is `6900`; €12.40 is `1240`), `vatRateBp` is the VAT rate in basis points (11 % is `1100`), and `advanceAmount` is the part due before the event, from `0` to `amount`. An event type with a price never has `requiresAccess`.
|
|
16
|
+
- Each event type `GET /web/businesses/{businessId}/event-types` returns has `noShowFee`: what a booking of it is invoiced when the customer is marked a no-show and the mark still stands after the engine's grace period (24 hours by default), `{ amount, currency, vatRateBp }` in the same units as `price`, or null when it has none.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **Breaking:** `confirmReservation` refuses a reservation of an event type with a price with 422 `CheckoutRequired`; book it through `startCheckout`. Free and access-based event types confirm as before.
|
|
21
|
+
- **Breaking:** a business's customers pay through its payment methods, an ordered list it keeps. `listOnlinePaymentMethods`, `GET /web/businesses/{businessId}/payment-methods`, lists those it shows online, in its order, each with `id`, `kind` (`CARD_ONLINE` or `PAY_BY_PHONE`) and the `label` to show; `listOfferedPaymentProviders` (`GET /web/businesses/{businessId}/payment-providers`) is removed. `startCheckout` and `startProductCheckout` take `paymentMethodId` instead of `provider`; a method the business does not show online, or must reconnect, is 422 `PaymentProviderNotOffered`.
|
|
22
|
+
- Error responses are shared types in `components["responses"]`, each named by its codes, such as `NotAuthenticated-SessionExpired`, instead of a copy in every operation; an operation's error types are unchanged.
|
|
23
|
+
|
|
7
24
|
## [0.4.1] - 2026-11-20
|
|
8
25
|
|
|
9
26
|
### Added
|