@revisium/schema-toolkit 0.20.1 → 0.21.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.
- package/README.md +216 -0
- package/dist/FormulaPathBuilder-BUJRR0Am.d.cts +48 -0
- package/dist/FormulaPathBuilder-QR0htn-e.d.ts +48 -0
- package/dist/chunk-2NARA22J.js +3 -0
- package/dist/{chunk-NY3H6C7K.js.map → chunk-2NARA22J.js.map} +1 -1
- package/dist/{chunk-EGC32GPY.cjs → chunk-3DDUT57J.cjs} +21 -21
- package/dist/chunk-3DDUT57J.cjs.map +1 -0
- package/dist/{chunk-LLHQWDAR.js → chunk-62A5JJJ3.js} +21 -21
- package/dist/chunk-62A5JJJ3.js.map +1 -0
- package/dist/{chunk-R4CFU33U.js → chunk-BIBFHULN.js} +12 -9
- package/dist/chunk-BIBFHULN.js.map +1 -0
- package/dist/chunk-BZWL424W.cjs +4 -0
- package/dist/{chunk-G6ZKEVVU.cjs.map → chunk-BZWL424W.cjs.map} +1 -1
- package/dist/{chunk-J6SCHJKG.cjs → chunk-CGVYS7EK.cjs} +2 -2
- package/dist/chunk-CGVYS7EK.cjs.map +1 -0
- package/dist/{chunk-MPF6VCB5.js → chunk-DRPNJ4YP.js} +2 -2
- package/dist/chunk-DRPNJ4YP.js.map +1 -0
- package/dist/{chunk-FZ2MS4Q5.cjs → chunk-F4POD7AE.cjs} +149 -90
- package/dist/chunk-F4POD7AE.cjs.map +1 -0
- package/dist/{chunk-B3T6YB2D.cjs → chunk-HH2LDPVV.cjs} +30 -30
- package/dist/chunk-HH2LDPVV.cjs.map +1 -0
- package/dist/{chunk-46ME2TAU.cjs → chunk-JWYYVKRT.cjs} +7 -7
- package/dist/{chunk-46ME2TAU.cjs.map → chunk-JWYYVKRT.cjs.map} +1 -1
- package/dist/{chunk-U5YDA3LA.js → chunk-MK3IKVZO.js} +80 -24
- package/dist/chunk-MK3IKVZO.js.map +1 -0
- package/dist/{chunk-VGADCIBG.cjs → chunk-SBO2UMI3.cjs} +14 -8
- package/dist/chunk-SBO2UMI3.cjs.map +1 -0
- package/dist/{chunk-55AMH44G.js → chunk-TKMR6CQW.js} +30 -30
- package/dist/chunk-TKMR6CQW.js.map +1 -0
- package/dist/{chunk-3JZKQWQH.js → chunk-TMCRV6V5.js} +7 -7
- package/dist/{chunk-3JZKQWQH.js.map → chunk-TMCRV6V5.js.map} +1 -1
- package/dist/{chunk-QEV4Q4TR.js → chunk-UTSL45Q4.js} +32 -32
- package/dist/chunk-UTSL45Q4.js.map +1 -0
- package/dist/{chunk-V6JTSET2.cjs → chunk-Z7M4ZGC6.cjs} +51 -51
- package/dist/chunk-Z7M4ZGC6.cjs.map +1 -0
- package/dist/core/index.cjs +60 -62
- package/dist/core/index.d.cts +6 -4
- package/dist/core/index.d.ts +6 -4
- package/dist/core/index.js +1 -3
- package/dist/formula/index.d.cts +1 -1
- package/dist/formula/index.d.ts +1 -1
- package/dist/index.cjs +237 -214
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +9 -10
- package/dist/{json-patch.types-DY7k9hxy.d.ts → json-patch.types-BpVnp08Z.d.ts} +1 -1
- package/dist/{json-patch.types-Cu0Medki.d.cts → json-patch.types-eM6pYC2P.d.cts} +1 -1
- package/dist/{json-string.store-C58zbl31.d.ts → json-string.store-DfdLcgnM.d.ts} +11 -11
- package/dist/{json-string.store-DuI--IL2.d.cts → json-string.store-cAOADo23.d.cts} +11 -11
- package/dist/lib/index.cjs +41 -42
- package/dist/lib/index.d.cts +3 -3
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +4 -5
- package/dist/mocks/index.cjs +30 -19
- package/dist/mocks/index.d.cts +22 -8
- package/dist/mocks/index.d.ts +22 -8
- package/dist/mocks/index.js +2 -3
- package/dist/model/index.cjs +85 -76
- package/dist/model/index.d.cts +158 -346
- package/dist/model/index.d.ts +158 -346
- package/dist/model/index.js +4 -7
- package/dist/plugins/index.cjs +19 -20
- package/dist/plugins/index.d.cts +10 -10
- package/dist/plugins/index.d.ts +10 -10
- package/dist/plugins/index.js +1 -2
- package/dist/{schema.types-B5OgKLpV.d.cts → schema.types-On_VGw2m.d.cts} +7 -6
- package/dist/{schema.types-B5OgKLpV.d.ts → schema.types-On_VGw2m.d.ts} +7 -6
- package/dist/typed-BinPIf3R.d.ts +455 -0
- package/dist/typed-LSaUJayS.d.cts +455 -0
- package/dist/types/index.cjs +5 -6
- package/dist/types/index.d.cts +7 -5
- package/dist/types/index.d.ts +7 -5
- package/dist/types/index.js +1 -2
- package/dist/{FormulaPathBuilder-DwlKOvVB.d.ts → types-BIvIURgy.d.cts} +37 -82
- package/dist/{FormulaPathBuilder-D9LkBcSv.d.cts → types-C_pTFtSY.d.ts} +37 -82
- package/package.json +1 -1
- package/dist/chunk-3IKI64T2.js +0 -3
- package/dist/chunk-3IKI64T2.js.map +0 -1
- package/dist/chunk-55AMH44G.js.map +0 -1
- package/dist/chunk-B3T6YB2D.cjs.map +0 -1
- package/dist/chunk-EGC32GPY.cjs.map +0 -1
- package/dist/chunk-FZ2MS4Q5.cjs.map +0 -1
- package/dist/chunk-G6ZKEVVU.cjs +0 -4
- package/dist/chunk-J6SCHJKG.cjs.map +0 -1
- package/dist/chunk-LLHQWDAR.js.map +0 -1
- package/dist/chunk-MPF6VCB5.js.map +0 -1
- package/dist/chunk-NY3H6C7K.js +0 -3
- package/dist/chunk-QEV4Q4TR.js.map +0 -1
- package/dist/chunk-R4CFU33U.js.map +0 -1
- package/dist/chunk-TBFTADML.cjs +0 -4
- package/dist/chunk-TBFTADML.cjs.map +0 -1
- package/dist/chunk-U5YDA3LA.js.map +0 -1
- package/dist/chunk-V6JTSET2.cjs.map +0 -1
- package/dist/chunk-VGADCIBG.cjs.map +0 -1
- package/dist/json-value-patch.types-CgiEpchp.d.ts +0 -24
- package/dist/json-value-patch.types-LEJxcIWR.d.cts +0 -24
package/README.md
CHANGED
|
@@ -17,8 +17,211 @@ Framework-agnostic TypeScript types, system schemas, runtime stores, and utiliti
|
|
|
17
17
|
npm install @revisium/schema-toolkit
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
### Schema helpers
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { obj, str, num, bool, arr } from '@revisium/schema-toolkit';
|
|
26
|
+
|
|
27
|
+
const schema = obj({
|
|
28
|
+
name: str(),
|
|
29
|
+
age: num(),
|
|
30
|
+
active: bool(),
|
|
31
|
+
tags: arr(str()),
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### RowModel
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { obj, str, num, createRowModel } from '@revisium/schema-toolkit';
|
|
39
|
+
|
|
40
|
+
const schema = obj({ name: str(), price: num() });
|
|
41
|
+
|
|
42
|
+
const row = createRowModel({
|
|
43
|
+
rowId: 'row-1',
|
|
44
|
+
schema,
|
|
45
|
+
data: { name: 'Widget', price: 9.99 },
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
row.getValue('name'); // string (typed!)
|
|
49
|
+
row.setValue('price', 19.99); // OK
|
|
50
|
+
row.setValue('price', 'wrong'); // TS Error!
|
|
51
|
+
row.getPlainValue(); // { name: string, price: number }
|
|
52
|
+
row.getPatches(); // JSON Patch operations
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### TableModel
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
import { obj, str, num, bool, createTableModel } from '@revisium/schema-toolkit';
|
|
59
|
+
|
|
60
|
+
const schema = obj({ title: str(), price: num(), inStock: bool() });
|
|
61
|
+
|
|
62
|
+
const table = createTableModel({
|
|
63
|
+
tableId: 'products',
|
|
64
|
+
schema,
|
|
65
|
+
rows: [
|
|
66
|
+
{ rowId: 'p1', data: { title: 'Laptop', price: 999, inStock: true } },
|
|
67
|
+
],
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const row = table.getRow('p1');
|
|
71
|
+
row?.getValue('title'); // string (typed!)
|
|
72
|
+
row?.getPlainValue(); // { title: string, price: number, inStock: boolean }
|
|
73
|
+
|
|
74
|
+
const newRow = table.addRow('p2', { title: 'Mouse', price: 29, inStock: true });
|
|
75
|
+
newRow.setValue('price', 39); // OK
|
|
76
|
+
newRow.setValue('price', 'x'); // TS Error!
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Typed API without helpers
|
|
80
|
+
|
|
81
|
+
When the schema is typed (via helpers or `as const`), `createRowModel` / `createTableModel` return typed models automatically. With plain `JsonSchema` they return the untyped API as before:
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import { createRowModel } from '@revisium/schema-toolkit';
|
|
85
|
+
import type { JsonObjectSchema } from '@revisium/schema-toolkit';
|
|
86
|
+
|
|
87
|
+
// Untyped — returns plain RowModel with unknown types
|
|
88
|
+
const schema: JsonObjectSchema = getSchemaFromApi();
|
|
89
|
+
const row = createRowModel({ rowId: 'row-1', schema, data });
|
|
90
|
+
row.getValue('name'); // unknown
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
See [Typed API documentation](src/types/TYPED-API.md) for all approaches: `as const`, explicit type declarations, `SchemaFromValue<T>`, and more.
|
|
94
|
+
|
|
95
|
+
## Reactivity (MobX)
|
|
96
|
+
|
|
97
|
+
By default all models use a noop reactivity provider, which works for backend and plain scripts. To enable MobX reactivity (e.g. in a React app), configure the provider once at startup:
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
import * as mobx from 'mobx';
|
|
101
|
+
import { setReactivityProvider, createMobxProvider } from '@revisium/schema-toolkit/core';
|
|
102
|
+
|
|
103
|
+
setReactivityProvider(createMobxProvider(mobx));
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
After this call every model created via `createRowModel`, `createTableModel`, or `createDataModel` becomes fully observable.
|
|
107
|
+
|
|
108
|
+
See [Reactivity Module docs](src/core/reactivity/README.md) for the full API, noop behaviour table, and test-setup examples.
|
|
109
|
+
|
|
110
|
+
## Formulas (Computed Fields)
|
|
111
|
+
|
|
112
|
+
Fields with `x-formula` are automatically computed from other fields. Use `readOnly: true` and the `formula` option in helpers:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { obj, num, numFormula, createRowModel } from '@revisium/schema-toolkit';
|
|
116
|
+
|
|
117
|
+
const schema = obj({
|
|
118
|
+
price: num(),
|
|
119
|
+
quantity: num(),
|
|
120
|
+
subtotal: numFormula('price * quantity'),
|
|
121
|
+
tax: numFormula('subtotal * 0.1'),
|
|
122
|
+
total: numFormula('subtotal + tax'),
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
const row = createRowModel({
|
|
126
|
+
rowId: 'order-1',
|
|
127
|
+
schema,
|
|
128
|
+
data: { price: 100, quantity: 5, subtotal: 0, tax: 0, total: 0 },
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
row.getPlainValue();
|
|
132
|
+
// { price: 100, quantity: 5, subtotal: 500, tax: 50, total: 550 }
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Formulas are evaluated in dependency order. With the MobX reactivity provider configured, changing a dependency triggers automatic re-evaluation of all affected formulas.
|
|
136
|
+
|
|
137
|
+
### Expression Syntax
|
|
138
|
+
|
|
139
|
+
| Syntax | Example |
|
|
140
|
+
|--------|---------|
|
|
141
|
+
| Field reference | `price`, `item.quantity` |
|
|
142
|
+
| Arithmetic | `price * quantity`, `a + b - c` |
|
|
143
|
+
| Comparison & logic | `a > b && c < d`, `x ? y : z` |
|
|
144
|
+
| Absolute path | `/rootField` |
|
|
145
|
+
| Relative path | `../siblingField` |
|
|
146
|
+
| Array access | `items[0].price`, `items[*].price` |
|
|
147
|
+
| Array context | `#index`, `#length`, `@prev`, `@next` |
|
|
148
|
+
| Functions | `sum(items[*].price)`, `avg(values)`, `count(array)` |
|
|
149
|
+
|
|
150
|
+
### Schema-Level Integration
|
|
151
|
+
|
|
152
|
+
When fields are renamed or moved, formula expressions are automatically updated in the generated patches:
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
// rename price → cost
|
|
156
|
+
// formula 'price * quantity' → 'cost * quantity' (auto-updated)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Warnings
|
|
160
|
+
|
|
161
|
+
The evaluator tracks problematic results (`nan`, `infinity`, `runtime-error`) on the node's `formulaWarning` property.
|
|
162
|
+
|
|
163
|
+
See [value-formula docs](src/model/value-formula/README.md) for the runtime engine API and [schema-formula docs](src/model/schema-formula/README.md) for parsing, dependency tracking, and serialization.
|
|
164
|
+
|
|
165
|
+
## Foreign Key Resolution
|
|
166
|
+
|
|
167
|
+
Schemas with `foreignKey` fields (string fields referencing another table) can be resolved automatically via `ForeignKeyResolver`:
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
import { createForeignKeyResolver, createTableModel, obj, str } from '@revisium/schema-toolkit';
|
|
171
|
+
|
|
172
|
+
const resolver = createForeignKeyResolver({
|
|
173
|
+
loader: {
|
|
174
|
+
loadSchema: async (tableId) => api.getTableSchema(tableId),
|
|
175
|
+
loadRow: async (tableId, rowId) => api.getRow(tableId, rowId),
|
|
176
|
+
},
|
|
177
|
+
prefetch: true,
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
const table = createTableModel({
|
|
181
|
+
tableId: 'products',
|
|
182
|
+
schema: obj({ name: str(), categoryId: str({ foreignKey: 'categories' }) }),
|
|
183
|
+
rows: [{ rowId: 'p1', data: { name: 'Laptop', categoryId: 'cat-1' } }],
|
|
184
|
+
fkResolver: resolver,
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
// Referenced data is prefetched in the background and available from cache
|
|
188
|
+
const category = await resolver.getRowData('categories', 'cat-1');
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
The same `fkResolver` option is accepted by `createRowModel`. When using `createDataModel`, pass the resolver once and all tables will share it.
|
|
192
|
+
|
|
193
|
+
See [ForeignKeyResolver docs](src/model/foreign-key-resolver/README.md) for cache-only mode, prefetch control, loading state, and error handling.
|
|
194
|
+
|
|
20
195
|
## API
|
|
21
196
|
|
|
197
|
+
### Schema Helpers
|
|
198
|
+
|
|
199
|
+
| Function | Description |
|
|
200
|
+
|----------|-------------|
|
|
201
|
+
| `str()` | Create string schema |
|
|
202
|
+
| `num()` | Create number schema |
|
|
203
|
+
| `bool()` | Create boolean schema |
|
|
204
|
+
| `strFormula(expr)` | Create computed string field (`readOnly: true` + `x-formula`) |
|
|
205
|
+
| `numFormula(expr)` | Create computed number field (`readOnly: true` + `x-formula`) |
|
|
206
|
+
| `boolFormula(expr)` | Create computed boolean field (`readOnly: true` + `x-formula`) |
|
|
207
|
+
| `obj(properties)` | Create object schema (generic — preserves property types) |
|
|
208
|
+
| `arr(items)` | Create array schema (generic — preserves items type) |
|
|
209
|
+
| `ref(tableName)` | Create $ref schema |
|
|
210
|
+
|
|
211
|
+
### Table & Row
|
|
212
|
+
|
|
213
|
+
| Function | Description |
|
|
214
|
+
|----------|-------------|
|
|
215
|
+
| `createRowModel(options)` | Create a row model (typed overload when schema is typed) |
|
|
216
|
+
| `createTableModel(options)` | Create a table model (typed overload when schema is typed) |
|
|
217
|
+
|
|
218
|
+
### Value Tree
|
|
219
|
+
|
|
220
|
+
| Function | Description |
|
|
221
|
+
|----------|-------------|
|
|
222
|
+
| `createTypedTree(schema, data)` | Create a typed value tree with path-based access |
|
|
223
|
+
| `typedNode(node)` | Cast an untyped `ValueNode` to a typed node |
|
|
224
|
+
|
|
22
225
|
### Schema
|
|
23
226
|
|
|
24
227
|
| Function | Description |
|
|
@@ -57,6 +260,19 @@ npm install @revisium/schema-toolkit
|
|
|
57
260
|
| `getPathByStore` | Get path from store |
|
|
58
261
|
| `deepEqual` | Deep equality comparison |
|
|
59
262
|
|
|
263
|
+
### Type Utilities
|
|
264
|
+
|
|
265
|
+
| Type | Description |
|
|
266
|
+
|------|-------------|
|
|
267
|
+
| `InferValue<S>` | Schema → plain TypeScript value type |
|
|
268
|
+
| `InferNode<S>` | Schema → typed ValueNode interface |
|
|
269
|
+
| `SchemaFromValue<T>` | Plain TS type → virtual schema shape |
|
|
270
|
+
| `SchemaPaths<S>` | Union of all valid dot-separated paths |
|
|
271
|
+
| `TypedRowModel<S>` | RowModel with typed `getValue`, `setValue`, `getPlainValue` |
|
|
272
|
+
| `TypedTableModel<S>` | TableModel with typed rows, `addRow`, `getRow` |
|
|
273
|
+
|
|
274
|
+
See [Typed API documentation](src/types/TYPED-API.md) for the full reference.
|
|
275
|
+
|
|
60
276
|
## License
|
|
61
277
|
|
|
62
278
|
MIT
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { j as SchemaNode, P as Path, o as Formula } from './types-BIvIURgy.cjs';
|
|
2
|
+
import { X as XFormula } from './schema.types-On_VGw2m.cjs';
|
|
3
|
+
|
|
4
|
+
interface SchemaTree {
|
|
5
|
+
root(): SchemaNode;
|
|
6
|
+
nodeById(id: string): SchemaNode;
|
|
7
|
+
nodeAt(path: Path): SchemaNode;
|
|
8
|
+
pathOf(id: string): Path;
|
|
9
|
+
nodeIds(): IterableIterator<string>;
|
|
10
|
+
countNodes(): number;
|
|
11
|
+
clone(): SchemaTree;
|
|
12
|
+
trackReplacement(oldNodeId: string, newNodeId: string): void;
|
|
13
|
+
replacements(): IterableIterator<[string, string]>;
|
|
14
|
+
clearReplacements(): void;
|
|
15
|
+
addChildTo(parentId: string, node: SchemaNode): void;
|
|
16
|
+
insertChildAt(parentId: string, index: number, node: SchemaNode): void;
|
|
17
|
+
removeNodeAt(path: Path): boolean;
|
|
18
|
+
renameNode(nodeId: string, newName: string): void;
|
|
19
|
+
moveNode(nodeId: string, newParentId: string): void;
|
|
20
|
+
setNodeAt(path: Path, node: SchemaNode): void;
|
|
21
|
+
replaceRoot(newRoot: SchemaNode): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface SerializeOptions {
|
|
25
|
+
readonly strict?: boolean;
|
|
26
|
+
}
|
|
27
|
+
declare class FormulaSerializer {
|
|
28
|
+
private readonly tree;
|
|
29
|
+
private readonly formulaNodeId;
|
|
30
|
+
private readonly formula;
|
|
31
|
+
private readonly pathBuilder;
|
|
32
|
+
constructor(tree: SchemaTree, formulaNodeId: string, formula: Formula);
|
|
33
|
+
static toXFormula(tree: SchemaTree, formulaNodeId: string, formula: Formula): XFormula;
|
|
34
|
+
static serializeExpression(tree: SchemaTree, formulaNodeId: string, formula: Formula, options?: SerializeOptions): string;
|
|
35
|
+
serialize(options?: SerializeOptions): string;
|
|
36
|
+
private buildPathReplacements;
|
|
37
|
+
private needsReplacement;
|
|
38
|
+
private normalizeArrayNotation;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare class FormulaPathBuilder {
|
|
42
|
+
buildWithArrayNotation(fromPath: Path, toPath: Path): string;
|
|
43
|
+
private findCommonPrefixLength;
|
|
44
|
+
private buildPartsWithArrayNotation;
|
|
45
|
+
private formatPartsWithArrayNotation;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { FormulaSerializer as F, type SchemaTree as S, FormulaPathBuilder as a };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { j as SchemaNode, P as Path, o as Formula } from './types-C_pTFtSY.js';
|
|
2
|
+
import { X as XFormula } from './schema.types-On_VGw2m.js';
|
|
3
|
+
|
|
4
|
+
interface SchemaTree {
|
|
5
|
+
root(): SchemaNode;
|
|
6
|
+
nodeById(id: string): SchemaNode;
|
|
7
|
+
nodeAt(path: Path): SchemaNode;
|
|
8
|
+
pathOf(id: string): Path;
|
|
9
|
+
nodeIds(): IterableIterator<string>;
|
|
10
|
+
countNodes(): number;
|
|
11
|
+
clone(): SchemaTree;
|
|
12
|
+
trackReplacement(oldNodeId: string, newNodeId: string): void;
|
|
13
|
+
replacements(): IterableIterator<[string, string]>;
|
|
14
|
+
clearReplacements(): void;
|
|
15
|
+
addChildTo(parentId: string, node: SchemaNode): void;
|
|
16
|
+
insertChildAt(parentId: string, index: number, node: SchemaNode): void;
|
|
17
|
+
removeNodeAt(path: Path): boolean;
|
|
18
|
+
renameNode(nodeId: string, newName: string): void;
|
|
19
|
+
moveNode(nodeId: string, newParentId: string): void;
|
|
20
|
+
setNodeAt(path: Path, node: SchemaNode): void;
|
|
21
|
+
replaceRoot(newRoot: SchemaNode): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface SerializeOptions {
|
|
25
|
+
readonly strict?: boolean;
|
|
26
|
+
}
|
|
27
|
+
declare class FormulaSerializer {
|
|
28
|
+
private readonly tree;
|
|
29
|
+
private readonly formulaNodeId;
|
|
30
|
+
private readonly formula;
|
|
31
|
+
private readonly pathBuilder;
|
|
32
|
+
constructor(tree: SchemaTree, formulaNodeId: string, formula: Formula);
|
|
33
|
+
static toXFormula(tree: SchemaTree, formulaNodeId: string, formula: Formula): XFormula;
|
|
34
|
+
static serializeExpression(tree: SchemaTree, formulaNodeId: string, formula: Formula, options?: SerializeOptions): string;
|
|
35
|
+
serialize(options?: SerializeOptions): string;
|
|
36
|
+
private buildPathReplacements;
|
|
37
|
+
private needsReplacement;
|
|
38
|
+
private normalizeArrayNotation;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare class FormulaPathBuilder {
|
|
42
|
+
buildWithArrayNotation(fromPath: Path, toPath: Path): string;
|
|
43
|
+
private findCommonPrefixLength;
|
|
44
|
+
private buildPartsWithArrayNotation;
|
|
45
|
+
private formatPartsWithArrayNotation;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { FormulaSerializer as F, type SchemaTree as S, FormulaPathBuilder as a };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-2NARA22J.js"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/plugins/row-id.schema.ts
|
|
4
4
|
var rowIdSchema = {
|
|
5
|
-
type: "string"
|
|
5
|
+
type: "string",
|
|
6
6
|
default: "",
|
|
7
7
|
readOnly: true
|
|
8
8
|
};
|
|
@@ -13,7 +13,7 @@ var ajvRowIdSchema = {
|
|
|
13
13
|
|
|
14
14
|
// src/plugins/row-version-id.schema.ts
|
|
15
15
|
var rowVersionIdSchema = {
|
|
16
|
-
type: "string"
|
|
16
|
+
type: "string",
|
|
17
17
|
default: "",
|
|
18
18
|
readOnly: true
|
|
19
19
|
};
|
|
@@ -24,7 +24,7 @@ var ajvRowVersionIdSchema = {
|
|
|
24
24
|
|
|
25
25
|
// src/plugins/row-created-id.schema.ts
|
|
26
26
|
var rowCreatedIdSchema = {
|
|
27
|
-
type: "string"
|
|
27
|
+
type: "string",
|
|
28
28
|
default: "",
|
|
29
29
|
readOnly: true
|
|
30
30
|
};
|
|
@@ -35,7 +35,7 @@ var ajvRowCreatedIdSchema = {
|
|
|
35
35
|
|
|
36
36
|
// src/plugins/row-created-at.schema.ts
|
|
37
37
|
var rowCreatedAtSchema = {
|
|
38
|
-
type: "string"
|
|
38
|
+
type: "string",
|
|
39
39
|
default: "",
|
|
40
40
|
readOnly: true
|
|
41
41
|
};
|
|
@@ -46,7 +46,7 @@ var ajvRowCreatedAtSchema = {
|
|
|
46
46
|
|
|
47
47
|
// src/plugins/row-published-at.schema.ts
|
|
48
48
|
var rowPublishedAtSchema = {
|
|
49
|
-
type: "string"
|
|
49
|
+
type: "string",
|
|
50
50
|
default: ""
|
|
51
51
|
};
|
|
52
52
|
var ajvRowPublishedAtSchema = {
|
|
@@ -56,7 +56,7 @@ var ajvRowPublishedAtSchema = {
|
|
|
56
56
|
|
|
57
57
|
// src/plugins/row-updated-at.schema.ts
|
|
58
58
|
var rowUpdatedAtSchema = {
|
|
59
|
-
type: "string"
|
|
59
|
+
type: "string",
|
|
60
60
|
default: "",
|
|
61
61
|
readOnly: true
|
|
62
62
|
};
|
|
@@ -67,7 +67,7 @@ var ajvRowUpdatedAtSchema = {
|
|
|
67
67
|
|
|
68
68
|
// src/plugins/row-hash.schema.ts
|
|
69
69
|
var rowHashSchema = {
|
|
70
|
-
type: "string"
|
|
70
|
+
type: "string",
|
|
71
71
|
default: "",
|
|
72
72
|
readOnly: true
|
|
73
73
|
};
|
|
@@ -78,7 +78,7 @@ var ajvRowHashSchema = {
|
|
|
78
78
|
|
|
79
79
|
// src/plugins/row-schema-hash.schema.ts
|
|
80
80
|
var rowSchemaHashSchema = {
|
|
81
|
-
type: "string"
|
|
81
|
+
type: "string",
|
|
82
82
|
default: "",
|
|
83
83
|
readOnly: true
|
|
84
84
|
};
|
|
@@ -89,39 +89,39 @@ var ajvRowSchemaHashSchema = {
|
|
|
89
89
|
|
|
90
90
|
// src/plugins/file-schema.ts
|
|
91
91
|
var fileSchema = {
|
|
92
|
-
type: "object"
|
|
92
|
+
type: "object",
|
|
93
93
|
properties: {
|
|
94
|
-
status: { type: "string"
|
|
95
|
-
fileId: { type: "string"
|
|
96
|
-
url: { type: "string"
|
|
97
|
-
fileName: { type: "string"
|
|
94
|
+
status: { type: "string", default: "", readOnly: true },
|
|
95
|
+
fileId: { type: "string", default: "", readOnly: true },
|
|
96
|
+
url: { type: "string", default: "", readOnly: true },
|
|
97
|
+
fileName: { type: "string", default: "" },
|
|
98
98
|
hash: {
|
|
99
|
-
type: "string"
|
|
99
|
+
type: "string",
|
|
100
100
|
default: "",
|
|
101
101
|
readOnly: true
|
|
102
102
|
},
|
|
103
103
|
extension: {
|
|
104
|
-
type: "string"
|
|
104
|
+
type: "string",
|
|
105
105
|
default: "",
|
|
106
106
|
readOnly: true
|
|
107
107
|
},
|
|
108
108
|
mimeType: {
|
|
109
|
-
type: "string"
|
|
109
|
+
type: "string",
|
|
110
110
|
default: "",
|
|
111
111
|
readOnly: true
|
|
112
112
|
},
|
|
113
113
|
size: {
|
|
114
|
-
type: "number"
|
|
114
|
+
type: "number",
|
|
115
115
|
default: 0,
|
|
116
116
|
readOnly: true
|
|
117
117
|
},
|
|
118
118
|
width: {
|
|
119
|
-
type: "number"
|
|
119
|
+
type: "number",
|
|
120
120
|
default: 0,
|
|
121
121
|
readOnly: true
|
|
122
122
|
},
|
|
123
123
|
height: {
|
|
124
|
-
type: "number"
|
|
124
|
+
type: "number",
|
|
125
125
|
default: 0,
|
|
126
126
|
readOnly: true
|
|
127
127
|
}
|
|
@@ -163,5 +163,5 @@ exports.rowPublishedAtSchema = rowPublishedAtSchema;
|
|
|
163
163
|
exports.rowSchemaHashSchema = rowSchemaHashSchema;
|
|
164
164
|
exports.rowUpdatedAtSchema = rowUpdatedAtSchema;
|
|
165
165
|
exports.rowVersionIdSchema = rowVersionIdSchema;
|
|
166
|
-
//# sourceMappingURL=chunk-
|
|
167
|
-
//# sourceMappingURL=chunk-
|
|
166
|
+
//# sourceMappingURL=chunk-3DDUT57J.cjs.map
|
|
167
|
+
//# sourceMappingURL=chunk-3DDUT57J.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/plugins/row-id.schema.ts","../src/plugins/row-version-id.schema.ts","../src/plugins/row-created-id.schema.ts","../src/plugins/row-created-at.schema.ts","../src/plugins/row-published-at.schema.ts","../src/plugins/row-updated-at.schema.ts","../src/plugins/row-hash.schema.ts","../src/plugins/row-schema-hash.schema.ts","../src/plugins/file-schema.ts"],"names":[],"mappings":";;;AAGO,IAAM,WAAA,GAAgC;AAAA,EAC3C,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;AAEO,IAAM,cAAA,GAAiB;AAAA,EAC5B,GAAA,EAAA,gDAAA;AAAA,EACA,GAAG;AACL;;;ACTO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;AAEO,IAAM,qBAAA,GAAwB;AAAA,EACnC,GAAA,EAAA,wDAAA;AAAA,EACA,GAAG;AACL;;;ACTO,IAAM,kBAAA,GAAu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,IAAM,aAAA,GAAgB;AAAA,EAC3B,GAAA,EAAA,8CAAA;AAAA,EACA,GAAG;AACL","file":"chunk-3DDUT57J.cjs","sourcesContent":["import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowIdSchema = {\n $id: SystemSchemaIds.RowId,\n ...rowIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowVersionIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowVersionIdSchema = {\n $id: SystemSchemaIds.RowVersionId,\n ...rowVersionIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowCreatedIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowCreatedIdSchema = {\n $id: SystemSchemaIds.RowCreatedId,\n ...rowCreatedIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowCreatedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowCreatedAtSchema = {\n $id: SystemSchemaIds.RowCreatedAt,\n ...rowCreatedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowPublishedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n};\n\nexport const ajvRowPublishedAtSchema = {\n $id: SystemSchemaIds.RowPublishedAt,\n ...rowPublishedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowUpdatedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowUpdatedAtSchema = {\n $id: SystemSchemaIds.RowUpdatedAt,\n ...rowUpdatedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowHashSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowHashSchema = {\n $id: SystemSchemaIds.RowHash,\n ...rowHashSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowSchemaHashSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowSchemaHashSchema = {\n $id: SystemSchemaIds.RowSchemaHash,\n ...rowSchemaHashSchema,\n};\n","import { JsonObjectSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const fileSchema: JsonObjectSchema = {\n type: 'object',\n properties: {\n status: { type: 'string', default: '', readOnly: true },\n fileId: { type: 'string', default: '', readOnly: true },\n url: { type: 'string', default: '', readOnly: true },\n fileName: { type: 'string', default: '' },\n hash: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n extension: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n mimeType: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n size: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n width: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n height: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n },\n required: [\n 'status',\n 'fileId',\n 'url',\n 'fileName',\n 'hash',\n 'extension',\n 'mimeType',\n 'size',\n 'width',\n 'height',\n ],\n additionalProperties: false,\n};\n\nexport const ajvFileSchema = {\n $id: SystemSchemaIds.File,\n ...fileSchema,\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/plugins/row-id.schema.ts
|
|
2
2
|
var rowIdSchema = {
|
|
3
|
-
type: "string"
|
|
3
|
+
type: "string",
|
|
4
4
|
default: "",
|
|
5
5
|
readOnly: true
|
|
6
6
|
};
|
|
@@ -11,7 +11,7 @@ var ajvRowIdSchema = {
|
|
|
11
11
|
|
|
12
12
|
// src/plugins/row-version-id.schema.ts
|
|
13
13
|
var rowVersionIdSchema = {
|
|
14
|
-
type: "string"
|
|
14
|
+
type: "string",
|
|
15
15
|
default: "",
|
|
16
16
|
readOnly: true
|
|
17
17
|
};
|
|
@@ -22,7 +22,7 @@ var ajvRowVersionIdSchema = {
|
|
|
22
22
|
|
|
23
23
|
// src/plugins/row-created-id.schema.ts
|
|
24
24
|
var rowCreatedIdSchema = {
|
|
25
|
-
type: "string"
|
|
25
|
+
type: "string",
|
|
26
26
|
default: "",
|
|
27
27
|
readOnly: true
|
|
28
28
|
};
|
|
@@ -33,7 +33,7 @@ var ajvRowCreatedIdSchema = {
|
|
|
33
33
|
|
|
34
34
|
// src/plugins/row-created-at.schema.ts
|
|
35
35
|
var rowCreatedAtSchema = {
|
|
36
|
-
type: "string"
|
|
36
|
+
type: "string",
|
|
37
37
|
default: "",
|
|
38
38
|
readOnly: true
|
|
39
39
|
};
|
|
@@ -44,7 +44,7 @@ var ajvRowCreatedAtSchema = {
|
|
|
44
44
|
|
|
45
45
|
// src/plugins/row-published-at.schema.ts
|
|
46
46
|
var rowPublishedAtSchema = {
|
|
47
|
-
type: "string"
|
|
47
|
+
type: "string",
|
|
48
48
|
default: ""
|
|
49
49
|
};
|
|
50
50
|
var ajvRowPublishedAtSchema = {
|
|
@@ -54,7 +54,7 @@ var ajvRowPublishedAtSchema = {
|
|
|
54
54
|
|
|
55
55
|
// src/plugins/row-updated-at.schema.ts
|
|
56
56
|
var rowUpdatedAtSchema = {
|
|
57
|
-
type: "string"
|
|
57
|
+
type: "string",
|
|
58
58
|
default: "",
|
|
59
59
|
readOnly: true
|
|
60
60
|
};
|
|
@@ -65,7 +65,7 @@ var ajvRowUpdatedAtSchema = {
|
|
|
65
65
|
|
|
66
66
|
// src/plugins/row-hash.schema.ts
|
|
67
67
|
var rowHashSchema = {
|
|
68
|
-
type: "string"
|
|
68
|
+
type: "string",
|
|
69
69
|
default: "",
|
|
70
70
|
readOnly: true
|
|
71
71
|
};
|
|
@@ -76,7 +76,7 @@ var ajvRowHashSchema = {
|
|
|
76
76
|
|
|
77
77
|
// src/plugins/row-schema-hash.schema.ts
|
|
78
78
|
var rowSchemaHashSchema = {
|
|
79
|
-
type: "string"
|
|
79
|
+
type: "string",
|
|
80
80
|
default: "",
|
|
81
81
|
readOnly: true
|
|
82
82
|
};
|
|
@@ -87,39 +87,39 @@ var ajvRowSchemaHashSchema = {
|
|
|
87
87
|
|
|
88
88
|
// src/plugins/file-schema.ts
|
|
89
89
|
var fileSchema = {
|
|
90
|
-
type: "object"
|
|
90
|
+
type: "object",
|
|
91
91
|
properties: {
|
|
92
|
-
status: { type: "string"
|
|
93
|
-
fileId: { type: "string"
|
|
94
|
-
url: { type: "string"
|
|
95
|
-
fileName: { type: "string"
|
|
92
|
+
status: { type: "string", default: "", readOnly: true },
|
|
93
|
+
fileId: { type: "string", default: "", readOnly: true },
|
|
94
|
+
url: { type: "string", default: "", readOnly: true },
|
|
95
|
+
fileName: { type: "string", default: "" },
|
|
96
96
|
hash: {
|
|
97
|
-
type: "string"
|
|
97
|
+
type: "string",
|
|
98
98
|
default: "",
|
|
99
99
|
readOnly: true
|
|
100
100
|
},
|
|
101
101
|
extension: {
|
|
102
|
-
type: "string"
|
|
102
|
+
type: "string",
|
|
103
103
|
default: "",
|
|
104
104
|
readOnly: true
|
|
105
105
|
},
|
|
106
106
|
mimeType: {
|
|
107
|
-
type: "string"
|
|
107
|
+
type: "string",
|
|
108
108
|
default: "",
|
|
109
109
|
readOnly: true
|
|
110
110
|
},
|
|
111
111
|
size: {
|
|
112
|
-
type: "number"
|
|
112
|
+
type: "number",
|
|
113
113
|
default: 0,
|
|
114
114
|
readOnly: true
|
|
115
115
|
},
|
|
116
116
|
width: {
|
|
117
|
-
type: "number"
|
|
117
|
+
type: "number",
|
|
118
118
|
default: 0,
|
|
119
119
|
readOnly: true
|
|
120
120
|
},
|
|
121
121
|
height: {
|
|
122
|
-
type: "number"
|
|
122
|
+
type: "number",
|
|
123
123
|
default: 0,
|
|
124
124
|
readOnly: true
|
|
125
125
|
}
|
|
@@ -144,5 +144,5 @@ var ajvFileSchema = {
|
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
export { ajvFileSchema, ajvRowCreatedAtSchema, ajvRowCreatedIdSchema, ajvRowHashSchema, ajvRowIdSchema, ajvRowPublishedAtSchema, ajvRowSchemaHashSchema, ajvRowUpdatedAtSchema, ajvRowVersionIdSchema, fileSchema, rowCreatedAtSchema, rowCreatedIdSchema, rowHashSchema, rowIdSchema, rowPublishedAtSchema, rowSchemaHashSchema, rowUpdatedAtSchema, rowVersionIdSchema };
|
|
147
|
-
//# sourceMappingURL=chunk-
|
|
148
|
-
//# sourceMappingURL=chunk-
|
|
147
|
+
//# sourceMappingURL=chunk-62A5JJJ3.js.map
|
|
148
|
+
//# sourceMappingURL=chunk-62A5JJJ3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/plugins/row-id.schema.ts","../src/plugins/row-version-id.schema.ts","../src/plugins/row-created-id.schema.ts","../src/plugins/row-created-at.schema.ts","../src/plugins/row-published-at.schema.ts","../src/plugins/row-updated-at.schema.ts","../src/plugins/row-hash.schema.ts","../src/plugins/row-schema-hash.schema.ts","../src/plugins/file-schema.ts"],"names":[],"mappings":";AAGO,IAAM,WAAA,GAAgC;AAAA,EAC3C,IAAA,EAAM,QAAA;AAAA,EACN,OAAA,EAAS,EAAA;AAAA,EACT,QAAA,EAAU;AACZ;AAEO,IAAM,cAAA,GAAiB;AAAA,EAC5B,GAAA,EAAA,gDAAA;AAAA,EACA,GAAG;AACL;;;ACTO,IAAM,kBAAA,GAAuC;AAAA,EAClD,IAAA,EAAM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,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,WAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA;AAAA,GACF;AAAA,EACA,oBAAA,EAAsB;AACxB;AAEO,IAAM,aAAA,GAAgB;AAAA,EAC3B,GAAA,EAAA,8CAAA;AAAA,EACA,GAAG;AACL","file":"chunk-62A5JJJ3.js","sourcesContent":["import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowIdSchema = {\n $id: SystemSchemaIds.RowId,\n ...rowIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowVersionIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowVersionIdSchema = {\n $id: SystemSchemaIds.RowVersionId,\n ...rowVersionIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowCreatedIdSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowCreatedIdSchema = {\n $id: SystemSchemaIds.RowCreatedId,\n ...rowCreatedIdSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowCreatedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowCreatedAtSchema = {\n $id: SystemSchemaIds.RowCreatedAt,\n ...rowCreatedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowPublishedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n};\n\nexport const ajvRowPublishedAtSchema = {\n $id: SystemSchemaIds.RowPublishedAt,\n ...rowPublishedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowUpdatedAtSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowUpdatedAtSchema = {\n $id: SystemSchemaIds.RowUpdatedAt,\n ...rowUpdatedAtSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowHashSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowHashSchema = {\n $id: SystemSchemaIds.RowHash,\n ...rowHashSchema,\n};\n","import { JsonStringSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const rowSchemaHashSchema: JsonStringSchema = {\n type: 'string',\n default: '',\n readOnly: true,\n};\n\nexport const ajvRowSchemaHashSchema = {\n $id: SystemSchemaIds.RowSchemaHash,\n ...rowSchemaHashSchema,\n};\n","import { JsonObjectSchema } from '../types/schema.types.js';\nimport { SystemSchemaIds } from '../consts/system-schema-ids.js';\n\nexport const fileSchema: JsonObjectSchema = {\n type: 'object',\n properties: {\n status: { type: 'string', default: '', readOnly: true },\n fileId: { type: 'string', default: '', readOnly: true },\n url: { type: 'string', default: '', readOnly: true },\n fileName: { type: 'string', default: '' },\n hash: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n extension: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n mimeType: {\n type: 'string',\n default: '',\n readOnly: true,\n },\n size: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n width: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n height: {\n type: 'number',\n default: 0,\n readOnly: true,\n },\n },\n required: [\n 'status',\n 'fileId',\n 'url',\n 'fileName',\n 'hash',\n 'extension',\n 'mimeType',\n 'size',\n 'width',\n 'height',\n ],\n additionalProperties: false,\n};\n\nexport const ajvFileSchema = {\n $id: SystemSchemaIds.File,\n ...fileSchema,\n};\n"]}
|