@01.software/sdk 0.44.0 → 0.46.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 (80) hide show
  1. package/CHANGELOG.md +366 -2
  2. package/MIGRATION.md +108 -10
  3. package/README.md +486 -98
  4. package/dist/{server-nXOezi4b.d.cts → catalog-mappers-sIshKNb3.d.cts} +14 -3
  5. package/dist/{server-nXOezi4b.d.ts → catalog-mappers-sIshKNb3.d.ts} +14 -3
  6. package/dist/client.cjs +2693 -345
  7. package/dist/client.cjs.map +1 -1
  8. package/dist/client.d.cts +10 -7
  9. package/dist/client.d.ts +10 -7
  10. package/dist/client.js +2693 -345
  11. package/dist/client.js.map +1 -1
  12. package/dist/{collection-client-DWooaiTr.d.ts → collection-client-D6kKrYdq.d.ts} +8 -5
  13. package/dist/{collection-client-Dyl-CDcj.d.cts → collection-client-DolMjCoC.d.cts} +8 -5
  14. package/dist/{const-pGDnsy0o.d.ts → const-BAG0MH0u.d.cts} +13 -10
  15. package/dist/{const-1vleZ6ov.d.cts → const-CaPq2AE4.d.ts} +13 -10
  16. package/dist/errors.cjs +74 -1
  17. package/dist/errors.cjs.map +1 -1
  18. package/dist/errors.d.cts +38 -1
  19. package/dist/errors.d.ts +38 -1
  20. package/dist/errors.js +74 -1
  21. package/dist/errors.js.map +1 -1
  22. package/dist/{index-DUNySyxV.d.ts → index-BNICJxBL.d.ts} +4 -4
  23. package/dist/{index-a6g7vqAD.d.cts → index-YGrZrxNn.d.cts} +4 -4
  24. package/dist/index.cjs +2754 -368
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +18 -19
  27. package/dist/index.d.ts +18 -19
  28. package/dist/index.js +2754 -368
  29. package/dist/index.js.map +1 -1
  30. package/dist/{payload-types-CDsuOEfM.d.cts → payload-types-CJZuXcgF.d.cts} +6671 -4001
  31. package/dist/{payload-types-CDsuOEfM.d.ts → payload-types-CJZuXcgF.d.ts} +6671 -4001
  32. package/dist/query.cjs +558 -101
  33. package/dist/query.cjs.map +1 -1
  34. package/dist/query.d.cts +43 -45
  35. package/dist/query.d.ts +43 -45
  36. package/dist/query.js +558 -101
  37. package/dist/query.js.map +1 -1
  38. package/dist/realtime.cjs.map +1 -1
  39. package/dist/realtime.d.cts +2 -2
  40. package/dist/realtime.d.ts +2 -2
  41. package/dist/realtime.js.map +1 -1
  42. package/dist/server.cjs +2343 -437
  43. package/dist/server.cjs.map +1 -1
  44. package/dist/server.d.cts +11 -10
  45. package/dist/server.d.ts +11 -10
  46. package/dist/server.js +2343 -437
  47. package/dist/server.js.map +1 -1
  48. package/dist/storefront-cache.cjs +65 -1
  49. package/dist/storefront-cache.cjs.map +1 -1
  50. package/dist/storefront-cache.js +65 -1
  51. package/dist/storefront-cache.js.map +1 -1
  52. package/dist/types-BC6rVmJa.d.ts +47 -0
  53. package/dist/{types-CDND3hzq.d.cts → types-C60vHIkY.d.ts} +1134 -509
  54. package/dist/types-D5p7-m1l.d.cts +47 -0
  55. package/dist/{types-Dt9FJisi.d.ts → types-xlqBeW2N.d.cts} +1134 -509
  56. package/dist/ui/canvas/server.cjs +244 -2
  57. package/dist/ui/canvas/server.cjs.map +1 -1
  58. package/dist/ui/canvas/server.d.cts +27 -1
  59. package/dist/ui/canvas/server.d.ts +27 -1
  60. package/dist/ui/canvas/server.js +244 -2
  61. package/dist/ui/canvas/server.js.map +1 -1
  62. package/dist/ui/canvas.cjs +419 -103
  63. package/dist/ui/canvas.cjs.map +1 -1
  64. package/dist/ui/canvas.d.cts +19 -7
  65. package/dist/ui/canvas.d.ts +19 -7
  66. package/dist/ui/canvas.js +419 -103
  67. package/dist/ui/canvas.js.map +1 -1
  68. package/dist/ui/form.d.cts +1 -1
  69. package/dist/ui/form.d.ts +1 -1
  70. package/dist/ui/video.d.cts +1 -1
  71. package/dist/ui/video.d.ts +1 -1
  72. package/dist/webhook.cjs +2 -1
  73. package/dist/webhook.cjs.map +1 -1
  74. package/dist/webhook.d.cts +4 -4
  75. package/dist/webhook.d.ts +4 -4
  76. package/dist/webhook.js +2 -1
  77. package/dist/webhook.js.map +1 -1
  78. package/package.json +10 -9
  79. package/dist/types-SoXsbKhj.d.cts +0 -33
  80. package/dist/types-oiae_LMm.d.ts +0 -33
@@ -0,0 +1,47 @@
1
+ import { P as Product, a as ProductVariant, M as Market, C as CustomerProfile, b as CustomerProfileStat, c as CustomerProfileList, d as ProductCollection, e as Config } from './payload-types-CJZuXcgF.cjs';
2
+ import { C as Collection } from './const-BAG0MH0u.cjs';
3
+
4
+ type PublicCustomerProfile = Omit<CustomerProfile, 'tenant' | 'customer' | 'isPublic' | 'anonymizedAt' | 'metadata'>;
5
+ type PublicCustomerProfileListEntry = {
6
+ profile: PublicCustomerProfile;
7
+ rank: number;
8
+ label?: string | null;
9
+ caption?: string | null;
10
+ score?: number | null;
11
+ badgeColor?: string | null;
12
+ badgeImage?: CustomerProfileList['entries'] extends Array<infer Entry> ? Entry extends {
13
+ badgeImage?: infer Image;
14
+ } ? Image : unknown : unknown;
15
+ publicMetadata?: unknown;
16
+ };
17
+ type PublicCustomerProfileList = Omit<CustomerProfileList, 'tenant' | 'visibility' | 'metadata' | 'entries'> & {
18
+ entries?: PublicCustomerProfileListEntry[] | null;
19
+ };
20
+ type PublicCustomerProfileStats = Omit<CustomerProfileStat, 'tenant' | 'profile'> & {
21
+ profile: string | PublicCustomerProfile;
22
+ };
23
+ type PublicMarket = Omit<Market, 'fxRateFromShopCurrency' | 'priceAdjustmentType' | 'priceAdjustmentValue' | 'roundingRule' | 'metadata'>;
24
+ type PublicProductVariant = Omit<ProductVariant, 'marketPrices' | 'product'> & {
25
+ product: string | PublicProduct;
26
+ };
27
+ type PublicProduct = Omit<Product, 'collectionItems' | 'variants' | 'markets'> & {
28
+ variants?: {
29
+ docs?: (string | PublicProductVariant)[];
30
+ hasNextPage?: boolean;
31
+ totalDocs?: number;
32
+ };
33
+ markets?: (string | PublicMarket)[] | null;
34
+ };
35
+ type PublicProductCollection = Omit<ProductCollection, 'items'>;
36
+ type PublicCollectionOverrides = {
37
+ 'customer-profiles': PublicCustomerProfile;
38
+ 'customer-profile-stats': PublicCustomerProfileStats;
39
+ 'customer-profile-lists': PublicCustomerProfileList;
40
+ products: PublicProduct;
41
+ 'product-variants': PublicProductVariant;
42
+ 'product-collections': PublicProductCollection;
43
+ markets: PublicMarket;
44
+ };
45
+ type CollectionType<T extends Collection> = T extends keyof PublicCollectionOverrides ? PublicCollectionOverrides[T] : T extends keyof Config['collections'] ? Config['collections'][T] : never;
46
+
47
+ export type { CollectionType as C, PublicMarket as P, PublicProduct as a, PublicProductCollection as b, PublicProductVariant as c };