@01.software/sdk 0.40.0 → 0.41.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 +492 -0
- package/MIGRATION.md +183 -0
- package/README.md +12 -1
- package/dist/client.cjs +4 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +3 -3
- package/dist/client.d.ts +3 -3
- package/dist/client.js +4 -1
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-VYwYi6u6.d.cts → collection-client-Bymfni8u.d.cts} +1 -1
- package/dist/{collection-client-CKFa99C6.d.ts → collection-client-CN4lj6gi.d.ts} +1 -1
- package/dist/index.cjs +18 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -5
- package/dist/index.js.map +1 -1
- package/dist/query.d.cts +2 -2
- package/dist/query.d.ts +2 -2
- package/dist/server.cjs +4 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +4 -1
- package/dist/server.js.map +1 -1
- package/dist/{types-D5uHrPLr.d.cts → types-Bl-m9ttd.d.cts} +31 -1
- package/dist/{types-Umd-YTjM.d.ts → types-CHrzs2GB.d.ts} +31 -1
- package/package.json +6 -4
package/dist/client.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
1
|
+
import { R as ReadOnlyCollectionClient } from './collection-client-Bymfni8u.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-Bl-m9ttd.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-Bl-m9ttd.cjs';
|
|
4
4
|
import './payload-types-DC0xzR9i.cjs';
|
|
5
5
|
export { C as Collection, P as PublicCollection } from './const-4BUtUdGU.cjs';
|
|
6
6
|
import './metadata.cjs';
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
1
|
+
import { R as ReadOnlyCollectionClient } from './collection-client-CN4lj6gi.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-CHrzs2GB.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-CHrzs2GB.js';
|
|
4
4
|
import './payload-types-DC0xzR9i.js';
|
|
5
5
|
export { C as Collection, P as PublicCollection } from './const-ymprfiPf.js';
|
|
6
6
|
import './metadata.js';
|
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(
|