@01.software/sdk 0.5.10 → 0.7.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 (46) hide show
  1. package/README.md +14 -2
  2. package/dist/auth.d.cts +1 -1
  3. package/dist/auth.d.ts +1 -1
  4. package/dist/{const-DQZQAXex.d.cts → const-6BfmvZug.d.cts} +2 -2
  5. package/dist/{const-Bk3-zigV.d.ts → const-DQYzabjw.d.ts} +2 -2
  6. package/dist/index.cjs +7 -7
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +19 -9
  9. package/dist/index.d.ts +19 -9
  10. package/dist/index.js +7 -7
  11. package/dist/index.js.map +1 -1
  12. package/dist/{payload-types-DCVm1syH.d.cts → payload-types-CFDtFiSz.d.cts} +47 -47
  13. package/dist/{payload-types-DCVm1syH.d.ts → payload-types-CFDtFiSz.d.ts} +47 -47
  14. package/dist/realtime.cjs.map +1 -1
  15. package/dist/realtime.d.cts +2 -2
  16. package/dist/realtime.d.ts +2 -2
  17. package/dist/realtime.js.map +1 -1
  18. package/dist/{server-StNHlSjW.d.cts → server-DxhuG-_s.d.cts} +34 -34
  19. package/dist/{server-StNHlSjW.d.ts → server-DxhuG-_s.d.ts} +34 -34
  20. package/dist/ui/{flow → canvas}/server.cjs +20 -20
  21. package/dist/ui/canvas/server.cjs.map +1 -0
  22. package/dist/ui/canvas/server.d.cts +3 -0
  23. package/dist/ui/canvas/server.d.ts +3 -0
  24. package/dist/ui/{flow → canvas}/server.js +19 -19
  25. package/dist/ui/canvas/server.js.map +1 -0
  26. package/dist/ui/{flow.cjs → canvas.cjs} +63 -63
  27. package/dist/ui/canvas.cjs.map +1 -0
  28. package/dist/ui/{flow.d.cts → canvas.d.cts} +35 -35
  29. package/dist/ui/{flow.d.ts → canvas.d.ts} +35 -35
  30. package/dist/ui/{flow.js → canvas.js} +59 -59
  31. package/dist/ui/canvas.js.map +1 -0
  32. package/dist/ui/form.d.cts +1 -1
  33. package/dist/ui/form.d.ts +1 -1
  34. package/dist/ui/video.d.cts +1 -1
  35. package/dist/ui/video.d.ts +1 -1
  36. package/dist/{webhook-BTtG_8f2.d.ts → webhook-BB8amLBv.d.ts} +2 -2
  37. package/dist/{webhook-TDfT7aKA.d.cts → webhook-CrBjPpUT.d.cts} +2 -2
  38. package/dist/webhook.d.cts +3 -3
  39. package/dist/webhook.d.ts +3 -3
  40. package/package.json +13 -13
  41. package/dist/ui/flow/server.cjs.map +0 -1
  42. package/dist/ui/flow/server.d.cts +0 -3
  43. package/dist/ui/flow/server.d.ts +0 -3
  44. package/dist/ui/flow/server.js.map +0 -1
  45. package/dist/ui/flow.cjs.map +0 -1
  46. package/dist/ui/flow.js.map +0 -1
package/README.md CHANGED
@@ -47,7 +47,7 @@ import { RichTextContent } from '@01.software/sdk/ui/rich-text'
47
47
  import { Image } from '@01.software/sdk/ui/image'
48
48
  import { FormRenderer } from '@01.software/sdk/ui/form'
49
49
  import { CodeBlock } from '@01.software/sdk/ui/code-block'
50
- import { FlowRenderer } from '@01.software/sdk/ui/flow'
50
+ import { CanvasRenderer } from '@01.software/sdk/ui/canvas'
51
51
  import { VideoPlayer } from '@01.software/sdk/ui/video'
52
52
  ```
53
53
 
@@ -134,6 +134,18 @@ const { docs, totalDocs, hasNextPage } = await client.from('products').find({
134
134
  select: { title: true, slug: true },
135
135
  })
136
136
 
137
+ // Query with populate/joins control
138
+ const { docs } = await client.from('products').find({
139
+ select: { title: true, slug: true, price: true, thumbnail: true },
140
+ joins: false, // disable joins for lightweight list
141
+ })
142
+
143
+ // Override relationship populate
144
+ const product = await client.from('products').findById(id, {
145
+ populate: { brands: { name: true, logo: true } },
146
+ joins: { variants: { limit: 50 } },
147
+ })
148
+
137
149
  // Single item query - returns document directly
138
150
  const product = await client.from('products').findById('id')
139
151
 
@@ -423,7 +435,7 @@ const handler = createTypedWebhookHandler('orders', async (event) => {
423
435
  | Content | `posts`, `post-categories`, `post-tags`, `documents`, `document-categories`, `document-types` |
424
436
  | Playlists | `playlists`, `playlist-categories`, `playlist-tags`, `musics` |
425
437
  | Galleries | `galleries`, `gallery-items`, `gallery-categories`, `gallery-tags` |
426
- | Flows | `flows`, `flow-node-types`, `flow-edge-types`, `flow-categories`, `flow-tags` |
438
+ | Canvas | `canvases`, `canvas-node-types`, `canvas-edge-types`, `canvas-categories`, `canvas-tags` |
427
439
  | Videos | `videos`, `video-categories`, `video-tags` |
428
440
  | Live Streams | `live-streams` |
429
441
  | Forms | `forms`, `form-submissions` |
package/dist/auth.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import './payload-types-DCVm1syH.cjs';
1
+ import './payload-types-CFDtFiSz.cjs';
2
2
 
3
3
  interface JwtPayload {
4
4
  clientKey: string;
package/dist/auth.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import './payload-types-DCVm1syH.js';
1
+ import './payload-types-CFDtFiSz.js';
2
2
 
3
3
  interface JwtPayload {
4
4
  clientKey: string;
@@ -1,4 +1,4 @@
1
- import { C as Config } from './payload-types-DCVm1syH.cjs';
1
+ import { C as Config } from './payload-types-CFDtFiSz.cjs';
2
2
 
3
3
  /**
4
4
  * Collection type derived from Payload Config.
@@ -9,7 +9,7 @@ type Collection = keyof Config['collections'];
9
9
  * Array of all public collection names for runtime use (e.g., Zod enum validation).
10
10
  * This is the single source of truth for which collections are publicly accessible via SDK.
11
11
  */
12
- declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-collections", "brands", "brand-logos", "orders", "order-products", "returns", "return-products", "exchanges", "exchange-products", "fulfillments", "fulfillment-items", "transactions", "customers", "customer-addresses", "customer-groups", "carts", "cart-items", "discounts", "shipping-policies", "documents", "document-categories", "document-types", "posts", "post-authors", "post-categories", "post-tags", "playlists", "playlist-categories", "playlist-tags", "musics", "music-categories", "music-tags", "galleries", "gallery-categories", "gallery-tags", "gallery-items", "links", "link-categories", "link-tags", "flows", "flow-node-types", "flow-edge-types", "flow-categories", "flow-tags", "videos", "video-categories", "video-tags", "live-streams", "images", "forms", "form-submissions", "threads", "comments", "reactions", "reaction-types", "bookmarks", "thread-categories", "reports", "community-bans"];
12
+ declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-collections", "brands", "brand-logos", "orders", "order-products", "returns", "return-products", "exchanges", "exchange-products", "fulfillments", "fulfillment-items", "transactions", "customers", "customer-addresses", "customer-groups", "carts", "cart-items", "discounts", "shipping-policies", "documents", "document-categories", "document-types", "posts", "post-authors", "post-categories", "post-tags", "playlists", "playlist-categories", "playlist-tags", "musics", "music-categories", "music-tags", "galleries", "gallery-categories", "gallery-tags", "gallery-items", "links", "link-categories", "link-tags", "canvases", "canvas-node-types", "canvas-edge-types", "canvas-categories", "canvas-tags", "videos", "video-categories", "video-tags", "live-streams", "images", "forms", "form-submissions", "threads", "comments", "reactions", "reaction-types", "bookmarks", "thread-categories", "reports", "community-bans"];
13
13
  /**
14
14
  * Public collections available for SDK access.
15
15
  * Derived from the COLLECTIONS array (single source of truth).
@@ -1,4 +1,4 @@
1
- import { C as Config } from './payload-types-DCVm1syH.js';
1
+ import { C as Config } from './payload-types-CFDtFiSz.js';
2
2
 
3
3
  /**
4
4
  * Collection type derived from Payload Config.
@@ -9,7 +9,7 @@ type Collection = keyof Config['collections'];
9
9
  * Array of all public collection names for runtime use (e.g., Zod enum validation).
10
10
  * This is the single source of truth for which collections are publicly accessible via SDK.
11
11
  */
12
- declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-collections", "brands", "brand-logos", "orders", "order-products", "returns", "return-products", "exchanges", "exchange-products", "fulfillments", "fulfillment-items", "transactions", "customers", "customer-addresses", "customer-groups", "carts", "cart-items", "discounts", "shipping-policies", "documents", "document-categories", "document-types", "posts", "post-authors", "post-categories", "post-tags", "playlists", "playlist-categories", "playlist-tags", "musics", "music-categories", "music-tags", "galleries", "gallery-categories", "gallery-tags", "gallery-items", "links", "link-categories", "link-tags", "flows", "flow-node-types", "flow-edge-types", "flow-categories", "flow-tags", "videos", "video-categories", "video-tags", "live-streams", "images", "forms", "form-submissions", "threads", "comments", "reactions", "reaction-types", "bookmarks", "thread-categories", "reports", "community-bans"];
12
+ declare const COLLECTIONS: readonly ["tenants", "tenant-metadata", "tenant-logos", "products", "product-variants", "product-options", "product-categories", "product-tags", "product-collections", "brands", "brand-logos", "orders", "order-products", "returns", "return-products", "exchanges", "exchange-products", "fulfillments", "fulfillment-items", "transactions", "customers", "customer-addresses", "customer-groups", "carts", "cart-items", "discounts", "shipping-policies", "documents", "document-categories", "document-types", "posts", "post-authors", "post-categories", "post-tags", "playlists", "playlist-categories", "playlist-tags", "musics", "music-categories", "music-tags", "galleries", "gallery-categories", "gallery-tags", "gallery-items", "links", "link-categories", "link-tags", "canvases", "canvas-node-types", "canvas-edge-types", "canvas-categories", "canvas-tags", "videos", "video-categories", "video-tags", "live-streams", "images", "forms", "form-submissions", "threads", "comments", "reactions", "reaction-types", "bookmarks", "thread-categories", "reports", "community-bans"];
13
13
  /**
14
14
  * Public collections available for SDK access.
15
15
  * Derived from the COLLECTIONS array (single source of truth).
package/dist/index.cjs CHANGED
@@ -886,7 +886,7 @@ var CollectionQueryBuilder = class {
886
886
  }
887
887
  /**
888
888
  * Find first matching document and return its Next.js Metadata.
889
- * Applies depth: 1 (image populate) and limit: 1 automatically.
889
+ * Applies depth: 1 (SEO image populate) and limit: 1 automatically.
890
890
  * @returns Metadata or null if no document matches
891
891
  */
892
892
  async findMetadata(options, metadataOptions) {
@@ -900,7 +900,7 @@ var CollectionQueryBuilder = class {
900
900
  }
901
901
  /**
902
902
  * Find document by ID and return its Next.js Metadata.
903
- * Applies depth: 1 (image populate) automatically.
903
+ * Applies depth: 1 (SEO image populate) automatically.
904
904
  * @returns Metadata (throws on 404)
905
905
  */
906
906
  async findMetadataById(id, metadataOptions) {
@@ -1255,11 +1255,11 @@ var COLLECTIONS = [
1255
1255
  "links",
1256
1256
  "link-categories",
1257
1257
  "link-tags",
1258
- "flows",
1259
- "flow-node-types",
1260
- "flow-edge-types",
1261
- "flow-categories",
1262
- "flow-tags",
1258
+ "canvases",
1259
+ "canvas-node-types",
1260
+ "canvas-edge-types",
1261
+ "canvas-categories",
1262
+ "canvas-tags",
1263
1263
  "videos",
1264
1264
  "video-categories",
1265
1265
  "video-tags",