@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/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-D5uHrPLr.cjs';
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-VYwYi6u6.cjs';
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-Umd-YTjM.js';
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-CKFa99C6.js';
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 isVariantAvailableForSale(variant) {
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(