@01.software/sdk 0.40.0 → 0.41.1
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 +506 -0
- package/MIGRATION.md +183 -0
- package/README.md +12 -1
- package/dist/analytics/react.cjs.map +1 -1
- package/dist/analytics/react.js.map +1 -1
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.js.map +1 -1
- package/dist/client.cjs +4 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +4 -1
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-CKFa99C6.d.ts → collection-client-BdcxkW7l.d.ts} +5 -5
- package/dist/{collection-client-VYwYi6u6.d.cts → collection-client-Bk--pNzW.d.cts} +5 -5
- package/dist/{const-ymprfiPf.d.ts → const-HwdntWtG.d.ts} +1 -1
- package/dist/{const-4BUtUdGU.d.cts → const-qGGI7Uii.d.cts} +1 -1
- package/dist/{index-w36lpSkU.d.ts → index-B1oW50RY.d.ts} +3 -3
- package/dist/{index-Dquv4xTL.d.cts → index-DiXtjVab.d.cts} +3 -3
- package/dist/index.cjs +18 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-DC0xzR9i.d.cts → payload-types-CqJOgON7.d.cts} +0 -3
- package/dist/{payload-types-DC0xzR9i.d.ts → payload-types-CqJOgON7.d.ts} +0 -3
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/realtime.js.map +1 -1
- package/dist/server.cjs +10 -5
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +7 -7
- package/dist/server.d.ts +7 -7
- package/dist/server.js +10 -5
- package/dist/server.js.map +1 -1
- package/dist/{types-Umd-YTjM.d.ts → types-BKa9z9s2.d.cts} +36 -5
- package/dist/{types-Bh2p-EMc.d.ts → types-BMI3M0nb.d.ts} +1 -1
- package/dist/{types-BvpjooU-.d.cts → types-ByLSG-O3.d.cts} +1 -1
- package/dist/{types-D5uHrPLr.d.cts → types-DgfXb7iV.d.ts} +36 -5
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.d.cts +1 -1
- package/dist/ui/video.d.ts +1 -1
- package/dist/webhook.d.cts +4 -4
- package/dist/webhook.d.ts +4 -4
- package/package.json +4 -2
package/dist/client.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { R as ReadOnlyCollectionClient } from './collection-client-
|
|
2
|
-
import { C as CommerceClient, a as CommunityClient, b as ContentClient, E as EventsClient, c as CustomerNamespace, d as ClientState, e as ClientConfig } from './types-
|
|
3
|
-
export { A as AddItemParams, f as ApiQueryOptions, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, j as ClientMetadata, k as ContentClientOptions, D as DebugConfig, l as DeepPartial, m as ExtractArrayType, P as PayloadFindResponse, n as PayloadMutationResponse, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, x as RetryConfig, y as RootClient, y as RootClientType, z as RootCollectionClient, B as RootReadOnlyQueryBuilder, S as Sort, F as StorefrontContentListOptions, G as StorefrontContentReference, H as StorefrontGalleryItem, I as StorefrontGalleryItemsListOptions, J as StorefrontGalleryItemsSort, K as StorefrontLink, L as StorefrontLinksListOptions, M as StorefrontLinksSort, U as UpdateItemParams, W as Where } from './types-
|
|
4
|
-
import './payload-types-
|
|
5
|
-
export { C as Collection, P as PublicCollection } from './const-
|
|
1
|
+
import { R as ReadOnlyCollectionClient } from './collection-client-Bk--pNzW.cjs';
|
|
2
|
+
import { C as CommerceClient, a as CommunityClient, b as ContentClient, E as EventsClient, c as CustomerNamespace, d as ClientState, e as ClientConfig } from './types-BKa9z9s2.cjs';
|
|
3
|
+
export { A as AddItemParams, f as ApiQueryOptions, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, j as ClientMetadata, k as ContentClientOptions, D as DebugConfig, l as DeepPartial, m as ExtractArrayType, P as PayloadFindResponse, n as PayloadMutationResponse, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, x as RetryConfig, y as RootClient, y as RootClientType, z as RootCollectionClient, B as RootReadOnlyQueryBuilder, S as Sort, F as StorefrontContentListOptions, G as StorefrontContentReference, H as StorefrontGalleryItem, I as StorefrontGalleryItemsListOptions, J as StorefrontGalleryItemsSort, K as StorefrontLink, L as StorefrontLinksListOptions, M as StorefrontLinksSort, U as UpdateItemParams, W as Where } from './types-BKa9z9s2.cjs';
|
|
4
|
+
import './payload-types-CqJOgON7.cjs';
|
|
5
|
+
export { C as Collection, P as PublicCollection } from './const-qGGI7Uii.cjs';
|
|
6
6
|
import './metadata.cjs';
|
|
7
|
-
import './types-
|
|
7
|
+
import './types-ByLSG-O3.cjs';
|
|
8
8
|
|
|
9
9
|
declare class Client {
|
|
10
10
|
commerce: CommerceClient;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { R as ReadOnlyCollectionClient } from './collection-client-
|
|
2
|
-
import { C as CommerceClient, a as CommunityClient, b as ContentClient, E as EventsClient, c as CustomerNamespace, d as ClientState, e as ClientConfig } from './types-
|
|
3
|
-
export { A as AddItemParams, f as ApiQueryOptions, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, j as ClientMetadata, k as ContentClientOptions, D as DebugConfig, l as DeepPartial, m as ExtractArrayType, P as PayloadFindResponse, n as PayloadMutationResponse, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, x as RetryConfig, y as RootClient, y as RootClientType, z as RootCollectionClient, B as RootReadOnlyQueryBuilder, S as Sort, F as StorefrontContentListOptions, G as StorefrontContentReference, H as StorefrontGalleryItem, I as StorefrontGalleryItemsListOptions, J as StorefrontGalleryItemsSort, K as StorefrontLink, L as StorefrontLinksListOptions, M as StorefrontLinksSort, U as UpdateItemParams, W as Where } from './types-
|
|
4
|
-
import './payload-types-
|
|
5
|
-
export { C as Collection, P as PublicCollection } from './const-
|
|
1
|
+
import { R as ReadOnlyCollectionClient } from './collection-client-BdcxkW7l.js';
|
|
2
|
+
import { C as CommerceClient, a as CommunityClient, b as ContentClient, E as EventsClient, c as CustomerNamespace, d as ClientState, e as ClientConfig } from './types-DgfXb7iV.js';
|
|
3
|
+
export { A as AddItemParams, f as ApiQueryOptions, g as ApplyDiscountParams, h as CheckoutParams, i as ClearCartParams, j as ClientMetadata, k as ContentClientOptions, D as DebugConfig, l as DeepPartial, m as ExtractArrayType, P as PayloadFindResponse, n as PayloadMutationResponse, o as PublicCart, p as PublicCartItem, q as PublicCartReference, r as PublicMediaAsset, s as PublicMediaSize, t as PublicOrder, u as PublicOrderItem, v as PublicOrderReference, R as RemoveDiscountParams, w as RemoveItemParams, x as RetryConfig, y as RootClient, y as RootClientType, z as RootCollectionClient, B as RootReadOnlyQueryBuilder, S as Sort, F as StorefrontContentListOptions, G as StorefrontContentReference, H as StorefrontGalleryItem, I as StorefrontGalleryItemsListOptions, J as StorefrontGalleryItemsSort, K as StorefrontLink, L as StorefrontLinksListOptions, M as StorefrontLinksSort, U as UpdateItemParams, W as Where } from './types-DgfXb7iV.js';
|
|
4
|
+
import './payload-types-CqJOgON7.js';
|
|
5
|
+
export { C as Collection, P as PublicCollection } from './const-HwdntWtG.js';
|
|
6
6
|
import './metadata.js';
|
|
7
|
-
import './types-
|
|
7
|
+
import './types-BMI3M0nb.js';
|
|
8
8
|
|
|
9
9
|
declare class Client {
|
|
10
10
|
commerce: CommerceClient;
|
package/dist/client.js
CHANGED
|
@@ -2362,11 +2362,14 @@ function compareVariantOrder(a, b) {
|
|
|
2362
2362
|
const bId = String(getRelationID(b.id) ?? "");
|
|
2363
2363
|
return aId.localeCompare(bId);
|
|
2364
2364
|
}
|
|
2365
|
-
function
|
|
2365
|
+
function getVariantAvailableForSale(variant) {
|
|
2366
2366
|
if (variant.isActive === false) return false;
|
|
2367
2367
|
if (variant.isUnlimited) return true;
|
|
2368
2368
|
return (variant.stock ?? 0) - (variant.reservedStock ?? 0) > 0;
|
|
2369
2369
|
}
|
|
2370
|
+
function isVariantAvailableForSale(variant) {
|
|
2371
|
+
return getVariantAvailableForSale(variant);
|
|
2372
|
+
}
|
|
2370
2373
|
function sortVariantsForMediaSelection(variants) {
|
|
2371
2374
|
const orderedVariants = [...variants].sort(compareVariantOrder);
|
|
2372
2375
|
const activeVariants = orderedVariants.filter(
|