@01.software/sdk 0.72.1 → 0.73.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +40 -0
  3. package/dist/client.cjs +9 -2
  4. package/dist/client.cjs.map +1 -1
  5. package/dist/client.d.cts +6 -6
  6. package/dist/client.d.ts +6 -6
  7. package/dist/client.js +9 -2
  8. package/dist/client.js.map +1 -1
  9. package/dist/{collection-client-B3CnqMDQ.d.cts → collection-client-BH4dIZ6c.d.cts} +4 -4
  10. package/dist/{collection-client-uOgS_1bC.d.ts → collection-client-lLAl3xCZ.d.ts} +4 -4
  11. package/dist/{const-_ZfJjRQG.d.cts → const-BS2EaIp4.d.cts} +1 -1
  12. package/dist/{const-BJBK7jBl.d.ts → const-CCvoknRY.d.ts} +1 -1
  13. package/dist/{index-CI_LFWiG.d.cts → index-CHdrzJ8-.d.cts} +3 -3
  14. package/dist/{index-CBaP4q8r.d.ts → index-DVqNpmsc.d.ts} +3 -3
  15. package/dist/index.cjs +10 -3
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +14 -11
  18. package/dist/index.d.ts +14 -11
  19. package/dist/index.js +10 -3
  20. package/dist/index.js.map +1 -1
  21. package/dist/{payload-types-BRg8Yary.d.cts → payload-types-PXkmefhZ.d.cts} +77 -20
  22. package/dist/{payload-types-BRg8Yary.d.ts → payload-types-PXkmefhZ.d.ts} +77 -20
  23. package/dist/query.d.cts +5 -5
  24. package/dist/query.d.ts +5 -5
  25. package/dist/realtime.d.cts +2 -2
  26. package/dist/realtime.d.ts +2 -2
  27. package/dist/server.cjs +39 -10
  28. package/dist/server.cjs.map +1 -1
  29. package/dist/server.d.cts +8 -7
  30. package/dist/server.d.ts +8 -7
  31. package/dist/server.js +39 -10
  32. package/dist/server.js.map +1 -1
  33. package/dist/{types-DLjSqL0P.d.ts → types-CQRsG6sA.d.ts} +2 -2
  34. package/dist/{types-CnkJQUez.d.cts → types-Chwgg4CQ.d.cts} +21 -4
  35. package/dist/{types-FyklqLAk.d.cts → types-CyMz0Kzc.d.cts} +2 -2
  36. package/dist/{types-Cmnxxvuv.d.ts → types-lbzbJSZh.d.ts} +21 -4
  37. package/dist/ui/form.d.cts +1 -1
  38. package/dist/ui/form.d.ts +1 -1
  39. package/dist/ui/video.d.cts +1 -1
  40. package/dist/ui/video.d.ts +1 -1
  41. package/dist/webhook.d.cts +5 -5
  42. package/dist/webhook.d.ts +5 -5
  43. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- import { dd as DebugConfig, dj as RetryConfig, d6 as ApiQueryOptions, dg as PayloadFindResponse, dh as PayloadMutationResponse, dy as ApiDocumentWriteOptions, dz as ApiWriteOptions, dA as ApiDeleteOptions, dB as PublicReadQueryOptions } from './types-CnkJQUez.cjs';
2
- import './payload-types-BRg8Yary.cjs';
1
+ import { df as DebugConfig, dl as RetryConfig, d8 as ApiQueryOptions, di as PayloadFindResponse, dj as PayloadMutationResponse, dA as ApiDocumentWriteOptions, dB as ApiWriteOptions, dC as ApiDeleteOptions, dD as PublicReadQueryOptions } from './types-Chwgg4CQ.cjs';
2
+ import './payload-types-PXkmefhZ.cjs';
3
3
  import { GenerateMetadataOptions, Metadata } from './metadata.cjs';
4
- import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-_ZfJjRQG.cjs';
5
- import { C as CollectionType } from './types-FyklqLAk.cjs';
4
+ import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-BS2EaIp4.cjs';
5
+ import { C as CollectionType } from './types-CyMz0Kzc.cjs';
6
6
 
7
7
  interface FetchOptions extends RequestInit {
8
8
  apiUrl?: string;
@@ -1,8 +1,8 @@
1
- import { dd as DebugConfig, dj as RetryConfig, d6 as ApiQueryOptions, dg as PayloadFindResponse, dh as PayloadMutationResponse, dy as ApiDocumentWriteOptions, dz as ApiWriteOptions, dA as ApiDeleteOptions, dB as PublicReadQueryOptions } from './types-Cmnxxvuv.js';
2
- import './payload-types-BRg8Yary.js';
1
+ import { df as DebugConfig, dl as RetryConfig, d8 as ApiQueryOptions, di as PayloadFindResponse, dj as PayloadMutationResponse, dA as ApiDocumentWriteOptions, dB as ApiWriteOptions, dC as ApiDeleteOptions, dD as PublicReadQueryOptions } from './types-lbzbJSZh.js';
2
+ import './payload-types-PXkmefhZ.js';
3
3
  import { GenerateMetadataOptions, Metadata } from './metadata.js';
4
- import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-BJBK7jBl.js';
5
- import { C as CollectionType } from './types-DLjSqL0P.js';
4
+ import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-CCvoknRY.js';
5
+ import { C as CollectionType } from './types-CQRsG6sA.js';
6
6
 
7
7
  interface FetchOptions extends RequestInit {
8
8
  apiUrl?: string;
@@ -1,4 +1,4 @@
1
- import './payload-types-BRg8Yary.cjs';
1
+ import './payload-types-PXkmefhZ.cjs';
2
2
 
3
3
  /**
4
4
  * Internal collections that should not be exposed via SDK.
@@ -1,4 +1,4 @@
1
- import './payload-types-BRg8Yary.js';
1
+ import './payload-types-PXkmefhZ.js';
2
2
 
3
3
  /**
4
4
  * Internal collections that should not be exposed via SDK.
@@ -1,6 +1,6 @@
1
- import { C as Collection } from './const-_ZfJjRQG.cjs';
2
- import { C as CollectionType } from './types-FyklqLAk.cjs';
3
- import './payload-types-BRg8Yary.cjs';
1
+ import { C as Collection } from './const-BS2EaIp4.cjs';
2
+ import { C as CollectionType } from './types-CyMz0Kzc.cjs';
3
+ import './payload-types-PXkmefhZ.cjs';
4
4
 
5
5
  type WebhookOperation = string;
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { C as Collection } from './const-BJBK7jBl.js';
2
- import { C as CollectionType } from './types-DLjSqL0P.js';
3
- import './payload-types-BRg8Yary.js';
1
+ import { C as Collection } from './const-CCvoknRY.js';
2
+ import { C as CollectionType } from './types-CQRsG6sA.js';
3
+ import './payload-types-PXkmefhZ.js';
4
4
 
5
5
  type WebhookOperation = string;
6
6
  /**
package/dist/index.cjs CHANGED
@@ -996,7 +996,7 @@ async function httpFetch(url, options) {
996
996
  );
997
997
  const usageError = attachRequestId(
998
998
  createUsageLimitError(
999
- `Monthly API usage limit exceeded (${current.toLocaleString()}/${limit.toLocaleString()})`,
999
+ `Monthly API usage limit exceeded (${current.toLocaleString("en-US")}/${limit.toLocaleString("en-US")})`,
1000
1000
  { limit, current, remaining },
1001
1001
  {
1002
1002
  url,
@@ -5768,8 +5768,13 @@ function getRelationID(value) {
5768
5768
  }
5769
5769
  return void 0;
5770
5770
  }
5771
+ function compareOrdinal(left, right) {
5772
+ if (left < right) return -1;
5773
+ if (left > right) return 1;
5774
+ return 0;
5775
+ }
5771
5776
  function compareOrder(left, right) {
5772
- return (left ?? "").localeCompare(right ?? "");
5777
+ return compareOrdinal(left ?? "", right ?? "");
5773
5778
  }
5774
5779
  function isProductOptionValueDoc(value) {
5775
5780
  return typeof value === "object" && value !== null && "id" in value && ("value" in value || "slug" in value);
@@ -6981,7 +6986,7 @@ function compareVariantOrder(a, b) {
6981
6986
  }
6982
6987
  const aId = String(getRelationID(a.id) ?? "");
6983
6988
  const bId = String(getRelationID(b.id) ?? "");
6984
- return aId.localeCompare(bId);
6989
+ return compareOrdinal(aId, bId);
6985
6990
  }
6986
6991
  function getVariantAvailableForSale(variant) {
6987
6992
  if (variant.isActive === false) return false;
@@ -7657,6 +7662,8 @@ function buildRangeEndpoint(params) {
7657
7662
  function buildAdmissionAvailabilityEndpoint(params) {
7658
7663
  const urlParams = new URLSearchParams();
7659
7664
  urlParams.set("occurrence", params.occurrence);
7665
+ const normalizedMarket2 = params.market?.trim();
7666
+ if (normalizedMarket2) urlParams.set("market", normalizedMarket2);
7660
7667
  return resolveOperationPath(
7661
7668
  EVENTS_ENDPOINT_OPERATIONS.occurrences.admissionAvailability,
7662
7669
  { query: urlParams }