@01.software/sdk 0.73.1 → 0.74.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +30 -3
  3. package/dist/client.cjs +12 -9
  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 +12 -9
  8. package/dist/client.js.map +1 -1
  9. package/dist/{collection-client-BH4dIZ6c.d.cts → collection-client-Bb1Wa6T6.d.cts} +4 -4
  10. package/dist/{collection-client-lLAl3xCZ.d.ts → collection-client-DBrLM9RR.d.ts} +4 -4
  11. package/dist/{const-CCvoknRY.d.ts → const-CkY2zB6J.d.ts} +1 -1
  12. package/dist/{const-BS2EaIp4.d.cts → const-DWTSgCkn.d.cts} +1 -1
  13. package/dist/{index-DVqNpmsc.d.ts → index-Daoh-98A.d.ts} +3 -3
  14. package/dist/{index-CHdrzJ8-.d.cts → index-Di5AybQN.d.cts} +3 -3
  15. package/dist/index.cjs +12 -9
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +7 -7
  18. package/dist/index.d.ts +7 -7
  19. package/dist/index.js +12 -9
  20. package/dist/index.js.map +1 -1
  21. package/dist/{payload-types-PXkmefhZ.d.cts → payload-types-zukuL1s_.d.cts} +345 -1755
  22. package/dist/{payload-types-PXkmefhZ.d.ts → payload-types-zukuL1s_.d.ts} +345 -1755
  23. package/dist/query.cjs +4 -0
  24. package/dist/query.cjs.map +1 -1
  25. package/dist/query.d.cts +5 -5
  26. package/dist/query.d.ts +5 -5
  27. package/dist/query.js +4 -0
  28. package/dist/query.js.map +1 -1
  29. package/dist/realtime.d.cts +2 -2
  30. package/dist/realtime.d.ts +2 -2
  31. package/dist/server.cjs +12 -9
  32. package/dist/server.cjs.map +1 -1
  33. package/dist/server.d.cts +7 -7
  34. package/dist/server.d.ts +7 -7
  35. package/dist/server.js +12 -9
  36. package/dist/server.js.map +1 -1
  37. package/dist/{types-CyMz0Kzc.d.cts → types-BI7aowdu.d.cts} +4 -4
  38. package/dist/{types-lbzbJSZh.d.ts → types-BsJokT6P.d.ts} +59 -16
  39. package/dist/{types-CQRsG6sA.d.ts → types-SsS04wGw.d.ts} +4 -4
  40. package/dist/{types-Chwgg4CQ.d.cts → types-evAvqRBj.d.cts} +59 -16
  41. package/dist/ui/form.d.cts +1 -1
  42. package/dist/ui/form.d.ts +1 -1
  43. package/dist/ui/video.d.cts +1 -1
  44. package/dist/ui/video.d.ts +1 -1
  45. package/dist/webhook.d.cts +5 -5
  46. package/dist/webhook.d.ts +5 -5
  47. package/package.json +1 -1
@@ -1,8 +1,8 @@
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';
1
+ import { dm as DebugConfig, dt as RetryConfig, df as ApiQueryOptions, dq as PayloadFindResponse, dr as PayloadMutationResponse, dH as ApiDocumentWriteOptions, dI as ApiWriteOptions, dJ as ApiDeleteOptions, dK as PublicReadQueryOptions } from './types-evAvqRBj.cjs';
2
+ import './payload-types-zukuL1s_.cjs';
3
3
  import { GenerateMetadataOptions, Metadata } from './metadata.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';
4
+ import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-DWTSgCkn.cjs';
5
+ import { C as CollectionType } from './types-BI7aowdu.cjs';
6
6
 
7
7
  interface FetchOptions extends RequestInit {
8
8
  apiUrl?: string;
@@ -1,8 +1,8 @@
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';
1
+ import { dm as DebugConfig, dt as RetryConfig, df as ApiQueryOptions, dq as PayloadFindResponse, dr as PayloadMutationResponse, dH as ApiDocumentWriteOptions, dI as ApiWriteOptions, dJ as ApiDeleteOptions, dK as PublicReadQueryOptions } from './types-BsJokT6P.js';
2
+ import './payload-types-zukuL1s_.js';
3
3
  import { GenerateMetadataOptions, Metadata } from './metadata.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';
4
+ import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-CkY2zB6J.js';
5
+ import { C as CollectionType } from './types-SsS04wGw.js';
6
6
 
7
7
  interface FetchOptions extends RequestInit {
8
8
  apiUrl?: string;
@@ -1,4 +1,4 @@
1
- import './payload-types-PXkmefhZ.js';
1
+ import './payload-types-zukuL1s_.js';
2
2
 
3
3
  /**
4
4
  * Internal collections that should not be exposed via SDK.
@@ -1,4 +1,4 @@
1
- import './payload-types-PXkmefhZ.cjs';
1
+ import './payload-types-zukuL1s_.cjs';
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-CCvoknRY.js';
2
- import { C as CollectionType } from './types-CQRsG6sA.js';
3
- import './payload-types-PXkmefhZ.js';
1
+ import { C as Collection } from './const-CkY2zB6J.js';
2
+ import { C as CollectionType } from './types-SsS04wGw.js';
3
+ import './payload-types-zukuL1s_.js';
4
4
 
5
5
  type WebhookOperation = string;
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { C as Collection } from './const-BS2EaIp4.cjs';
2
- import { C as CollectionType } from './types-CyMz0Kzc.cjs';
3
- import './payload-types-PXkmefhZ.cjs';
1
+ import { C as Collection } from './const-DWTSgCkn.cjs';
2
+ import { C as CollectionType } from './types-BI7aowdu.cjs';
3
+ import './payload-types-zukuL1s_.cjs';
4
4
 
5
5
  type WebhookOperation = string;
6
6
  /**
package/dist/index.cjs CHANGED
@@ -1486,6 +1486,10 @@ var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
1486
1486
  configure: operation("tenants", "patch", "/embedded-admin-app"),
1487
1487
  disable: operation("tenants", "delete", "/embedded-admin-app")
1488
1488
  };
1489
+ var FIELD_CONFIG_ENDPOINT_OPERATIONS = {
1490
+ list: operation("field-configs", "get", "/list"),
1491
+ save: operation("field-configs", "post", "/save")
1492
+ };
1489
1493
  var EVENTS_ENDPOINT_OPERATIONS = {
1490
1494
  registrations: {
1491
1495
  register: operation("event-registrations", "post", "/register"),
@@ -6979,10 +6983,13 @@ function buildProductHref(product, group, options = {}) {
6979
6983
  return params.size > 0 ? `${path}?${params.toString()}` : path;
6980
6984
  }
6981
6985
  function compareVariantOrder(a, b) {
6982
- const aOrder = Number(a._order ?? Number.MAX_SAFE_INTEGER);
6983
- const bOrder = Number(b._order ?? Number.MAX_SAFE_INTEGER);
6984
- if (Number.isFinite(aOrder) && Number.isFinite(bOrder) && aOrder !== bOrder) {
6985
- return aOrder - bOrder;
6986
+ const aOrder = a._order || null;
6987
+ const bOrder = b._order || null;
6988
+ if (aOrder !== bOrder) {
6989
+ if (aOrder === null) return 1;
6990
+ if (bOrder === null) return -1;
6991
+ const byOrder = compareOrdinal(aOrder, bOrder);
6992
+ if (byOrder !== 0) return byOrder;
6986
6993
  }
6987
6994
  const aId = String(getRelationID(a.id) ?? "");
6988
6995
  const bId = String(getRelationID(b.id) ?? "");
@@ -7296,11 +7303,7 @@ function buildProductListingPageWhere(params) {
7296
7303
  const search = params.search?.trim();
7297
7304
  if (search) {
7298
7305
  clauses.push({
7299
- or: [
7300
- { title: { like: search } },
7301
- { slug: { like: search } },
7302
- { handle: { like: search } }
7303
- ]
7306
+ or: [{ title: { like: search } }, { slug: { like: search } }]
7304
7307
  });
7305
7308
  }
7306
7309
  const filters = params.filters;