@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/query.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { QueryClient, UseQueryResult, UseSuspenseQueryResult, InfiniteData, UseInfiniteQueryResult, UseSuspenseInfiniteQueryResult } from '@tanstack/react-query';
|
|
3
|
-
import { f as ApiQueryOptions, P as PayloadFindResponse, ax as PublicReadQueryOptions, n as PayloadMutationResponse, ay as CustomerAuth, az as CustomerProfile, aA as CustomerAuthResponse, aB as CustomerLoginData, aC as CustomerRegisterResponse, aD as CustomerRegisterData, aE as CustomerRefreshResponse, aF as UpdateProfileData, aG as ProductListingPageBaseParams, aH as ProductListingPageParams, aI as ProductDetailParams, aJ as ProductDetailResult, aK as ProductListingPageCatalogParams, aL as ProductListingPageResult, aM as ProductListingGroupsCatalogItem, aN as ProductListingPageFullParams, aO as ProductListingGroupsItem, S as Sort, W as Where, y as RootClient, al as RootServerClient } from './types-
|
|
3
|
+
import { f as ApiQueryOptions, P as PayloadFindResponse, ax as PublicReadQueryOptions, n as PayloadMutationResponse, ay as CustomerAuth, az as CustomerProfile, aA as CustomerAuthResponse, aB as CustomerLoginData, aC as CustomerRegisterResponse, aD as CustomerRegisterData, aE as CustomerRefreshResponse, aF as UpdateProfileData, aG as ProductListingPageBaseParams, aH as ProductListingPageParams, aI as ProductDetailParams, aJ as ProductDetailResult, aK as ProductListingPageCatalogParams, aL as ProductListingPageResult, aM as ProductListingGroupsCatalogItem, aN as ProductListingPageFullParams, aO as ProductListingGroupsItem, S as Sort, W as Where, y as RootClient, al as RootServerClient } from './types-Bl-m9ttd.cjs';
|
|
4
4
|
import './payload-types-DC0xzR9i.cjs';
|
|
5
|
-
import { C as CollectionClient } from './collection-client-
|
|
5
|
+
import { C as CollectionClient } from './collection-client-Bymfni8u.cjs';
|
|
6
6
|
import { S as ServerCollection, P as PublicCollection } from './const-4BUtUdGU.cjs';
|
|
7
7
|
import { C as CollectionType } from './types-BvpjooU-.cjs';
|
|
8
8
|
import { SDKError } from './errors.cjs';
|
package/dist/query.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { QueryClient, UseQueryResult, UseSuspenseQueryResult, InfiniteData, UseInfiniteQueryResult, UseSuspenseInfiniteQueryResult } from '@tanstack/react-query';
|
|
3
|
-
import { f as ApiQueryOptions, P as PayloadFindResponse, ax as PublicReadQueryOptions, n as PayloadMutationResponse, ay as CustomerAuth, az as CustomerProfile, aA as CustomerAuthResponse, aB as CustomerLoginData, aC as CustomerRegisterResponse, aD as CustomerRegisterData, aE as CustomerRefreshResponse, aF as UpdateProfileData, aG as ProductListingPageBaseParams, aH as ProductListingPageParams, aI as ProductDetailParams, aJ as ProductDetailResult, aK as ProductListingPageCatalogParams, aL as ProductListingPageResult, aM as ProductListingGroupsCatalogItem, aN as ProductListingPageFullParams, aO as ProductListingGroupsItem, S as Sort, W as Where, y as RootClient, al as RootServerClient } from './types-
|
|
3
|
+
import { f as ApiQueryOptions, P as PayloadFindResponse, ax as PublicReadQueryOptions, n as PayloadMutationResponse, ay as CustomerAuth, az as CustomerProfile, aA as CustomerAuthResponse, aB as CustomerLoginData, aC as CustomerRegisterResponse, aD as CustomerRegisterData, aE as CustomerRefreshResponse, aF as UpdateProfileData, aG as ProductListingPageBaseParams, aH as ProductListingPageParams, aI as ProductDetailParams, aJ as ProductDetailResult, aK as ProductListingPageCatalogParams, aL as ProductListingPageResult, aM as ProductListingGroupsCatalogItem, aN as ProductListingPageFullParams, aO as ProductListingGroupsItem, S as Sort, W as Where, y as RootClient, al as RootServerClient } from './types-CHrzs2GB.js';
|
|
4
4
|
import './payload-types-DC0xzR9i.js';
|
|
5
|
-
import { C as CollectionClient } from './collection-client-
|
|
5
|
+
import { C as CollectionClient } from './collection-client-CN4lj6gi.js';
|
|
6
6
|
import { S as ServerCollection, P as PublicCollection } from './const-ymprfiPf.js';
|
|
7
7
|
import { C as CollectionType } from './types-Bh2p-EMc.js';
|
|
8
8
|
import { SDKError } from './errors.js';
|
package/dist/server.cjs
CHANGED
|
@@ -2455,11 +2455,14 @@ function compareVariantOrder(a, b) {
|
|
|
2455
2455
|
const bId = String(getRelationID(b.id) ?? "");
|
|
2456
2456
|
return aId.localeCompare(bId);
|
|
2457
2457
|
}
|
|
2458
|
-
function
|
|
2458
|
+
function getVariantAvailableForSale(variant) {
|
|
2459
2459
|
if (variant.isActive === false) return false;
|
|
2460
2460
|
if (variant.isUnlimited) return true;
|
|
2461
2461
|
return (variant.stock ?? 0) - (variant.reservedStock ?? 0) > 0;
|
|
2462
2462
|
}
|
|
2463
|
+
function isVariantAvailableForSale(variant) {
|
|
2464
|
+
return getVariantAvailableForSale(variant);
|
|
2465
|
+
}
|
|
2463
2466
|
function sortVariantsForMediaSelection(variants) {
|
|
2464
2467
|
const orderedVariants = [...variants].sort(compareVariantOrder);
|
|
2465
2468
|
const activeVariants = orderedVariants.filter(
|