@colspec/core 0.1.0 → 0.1.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.
- package/README.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ executable is a named reference.
|
|
|
31
31
|
```json
|
|
32
32
|
{
|
|
33
33
|
"schemaVersion": "1.0",
|
|
34
|
-
"tableId": "
|
|
34
|
+
"tableId": "inventory.products",
|
|
35
35
|
"revision": 4,
|
|
36
36
|
"columns": [
|
|
37
37
|
{
|
|
@@ -43,7 +43,7 @@ executable is a named reference.
|
|
|
43
43
|
{
|
|
44
44
|
"id": "status",
|
|
45
45
|
"accessorKey": "status",
|
|
46
|
-
"cell": { "ref": "
|
|
46
|
+
"cell": { "ref": "inventory.statusBadge" }
|
|
47
47
|
}
|
|
48
48
|
],
|
|
49
49
|
"defaults": { "pagination": { "pageSize": 25 } },
|
|
@@ -60,7 +60,7 @@ your own checks with `validateContract(json, { rules })`.
|
|
|
60
60
|
```ts
|
|
61
61
|
import { composeRegistries } from "@colspec/core";
|
|
62
62
|
|
|
63
|
-
const registry = composeRegistries([
|
|
63
|
+
const registry = composeRegistries([inventoryRegistry, billingRegistry]);
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
A name registered twice throws unless you pass `{ onCollision: "override" }`.
|
|
@@ -71,7 +71,7 @@ A name registered twice throws unless you pass `{ onCollision: "override" }`.
|
|
|
71
71
|
import { toServerQuery } from "@colspec/core";
|
|
72
72
|
|
|
73
73
|
toServerQuery(contract, { sorting, columnFilters, pagination });
|
|
74
|
-
// { sort: [{ key: "
|
|
74
|
+
// { sort: [{ key: "product.created_at", desc: true }], page: { index: 0, size: 25 } }
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
Only the operations the contract runs on the server are included.
|