@rebasepro/common 0.9.1-canary.f0ac103 → 0.9.1-canary.fd3754b

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.
@@ -1,17 +1,4 @@
1
1
  import { DataDriver, RebaseData, RebaseSdkData } from "@rebasepro/types";
2
- export interface EntityDataOptions {
3
- /**
4
- * Look up a collection's config by slug, to derive row addresses from its
5
- * primary keys.
6
- *
7
- * Called lazily rather than up front: the data layer is created by `Rebase`,
8
- * which sits *above* the admin that owns the collections, so a resolver
9
- * registered on mount would otherwise arrive too late to be seen.
10
- */
11
- resolveCollection?: (slug: string) => {
12
- properties?: Record<string, unknown>;
13
- } | undefined;
14
- }
15
2
  /**
16
3
  * Build a `RebaseData` object from a `DataDriver` using JavaScript Proxy.
17
4
  *
@@ -24,7 +11,7 @@ export interface EntityDataOptions {
24
11
  * await data.products.create({ name: "Camera", price: 299 });
25
12
  * const { data: items } = await data.products.find({ where: { status: ["==", "published"] } });
26
13
  */
27
- export declare function buildRebaseData(driver: DataDriver, options?: EntityDataOptions): RebaseData;
14
+ export declare function buildRebaseData(driver: DataDriver): RebaseData;
28
15
  /**
29
16
  * Wrap a flat {@link RebaseSdkData} into a Entity-shaped {@link RebaseData}.
30
17
  *
@@ -34,7 +21,7 @@ export declare function buildRebaseData(driver: DataDriver, options?: EntityData
34
21
  * CMS `RebaseDataContext` — without it the admin renders rows with only their
35
22
  * `id`.
36
23
  */
37
- export declare function wrapAsEntityData(sdkData: RebaseSdkData, options?: EntityDataOptions): RebaseData;
24
+ export declare function wrapAsEntityData(sdkData: RebaseSdkData): RebaseData;
38
25
  /**
39
26
  * Wrap a Entity-shaped {@link RebaseData} into a flat {@link RebaseSdkData}.
40
27
  *