@lockerverse/sdk 0.2.244 → 0.2.245
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/MIGRATIONS.md +2 -20
- package/README.md +1 -11
- package/dist/types.js +1 -1
- package/package.json +1 -1
package/MIGRATIONS.md
CHANGED
|
@@ -4,27 +4,9 @@ This file ships in both @lockerverse/sdk and @lockerverse/react. Use the copy in
|
|
|
4
4
|
the target installed release. This is an agent-run procedure, not an install
|
|
5
5
|
script. Installing a package does not edit host code or guarantee these steps ran.
|
|
6
6
|
|
|
7
|
-
## 0.2.
|
|
7
|
+
## 0.2.242 — custom product availability
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
and `data-lockerverse-availability` to the helper status. Website AI uses these
|
|
11
|
-
attributes to check sold-out and available states without making a purchase.
|
|
12
|
-
See the custom product example in the React README.
|
|
13
|
-
|
|
14
|
-
## 0.2.242 — product availability on custom pages
|
|
15
|
-
|
|
16
|
-
Custom checkout and hosted-payment pages should use
|
|
17
|
-
`getLockerverseProductAvailability(catalog, product, quantities)` from
|
|
18
|
-
`@lockerverse/sdk/checkout` for each product. Use the returned status for
|
|
19
|
-
the card and maximum quantity for its controls. The standard React launcher
|
|
20
|
-
adopts the helper automatically on upgrade. Verify that a package too large
|
|
21
|
-
for the remaining shared capacity shows **Sold out**, a package blocked by
|
|
22
|
-
other items in the cart shows **Limit reached**, and removing those items
|
|
23
|
-
restores availability.
|
|
24
|
-
|
|
25
|
-
## Shared ticket capacity
|
|
26
|
-
|
|
27
|
-
Checkout uses the configured number of spots for each package. Hosts that use the standard launcher need no code changes after upgrading. Earlier custom carts could calculate capacity from listing weights. Use the public availability helper on newer releases.
|
|
9
|
+
The standard launcher handles shared limits automatically. Custom pickers can use `getLockerverseProductAvailability` from `@lockerverse/sdk/checkout`. The matching React release includes an example in its payment widget guide.
|
|
28
10
|
|
|
29
11
|
## 0.2.237 — signup address suggestions
|
|
30
12
|
|
package/README.md
CHANGED
|
@@ -29,17 +29,7 @@ complete an upgrade. Record the old installed versions before installation.
|
|
|
29
29
|
|
|
30
30
|
## Checkout
|
|
31
31
|
|
|
32
|
-
For
|
|
33
|
-
`getLockerverseProductAvailability(catalog, product, quantities)` from
|
|
34
|
-
`@lockerverse/sdk/checkout` for each product. Pass a map of selected package
|
|
35
|
-
quantities keyed by product ID. Use nonnegative safe integers. The helper returns `maximumQuantity` (the
|
|
36
|
-
total that fits with other selected items, or null for unlimited) and `status`:
|
|
37
|
-
`available`, `sold_out` when the minimum order cannot fit even in an empty
|
|
38
|
-
cart, or `limit_reached` when the current selections prevent adding another.
|
|
39
|
-
Keep sold-out products visible and disable adding them. Allow removing selected
|
|
40
|
-
items and checking out a valid cart at its limit. Refresh the catalog after a
|
|
41
|
-
sold-out response from checkout.
|
|
42
|
-
|
|
32
|
+
For custom product availability, see `guides/payment-widgets.md` in the matching `@lockerverse/react` release.
|
|
43
33
|
|
|
44
34
|
```ts
|
|
45
35
|
import { createLockerverseCheckoutClient } from "@lockerverse/sdk/checkout";
|
package/dist/types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=`0.2.
|
|
1
|
+
const e=`0.2.245`;var t=class extends Error{failureKind;code;operation;reportable;recoveryRecommended;sdkVersion;serverCode;status;constructor({failureKind:t,code:n,message:r,operation:i,reportable:a,recoveryRecommended:o=!1,serverCode:s,status:c}){super(r),this.name=`LockerverseSdkError`,this.failureKind=t,this.code=n,this.operation=i,this.reportable=a,this.recoveryRecommended=o,this.sdkVersion=e,this.serverCode=s,this.status=c}};export{t as n,e as t};
|
|
2
2
|
//# sourceMappingURL=types.js.map
|