@atscript/db 0.1.56 → 0.1.58
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/dist/{db-readable-B9Irll4q.d.mts → db-readable-CONS7NPu.d.mts} +58 -5
- package/dist/{db-readable-Cwjbk6o_.d.cts → db-readable-DN1CJRph.d.cts} +58 -5
- package/dist/{db-space-CAcEB09Y.d.mts → db-space-D1dfFoKL.d.cts} +2 -2
- package/dist/{db-space-CQg17vv7.d.cts → db-space-DQU38dHk.d.mts} +2 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/rel.d.cts +1 -1
- package/dist/rel.d.mts +1 -1
- package/dist/sync.d.cts +2 -2
- package/dist/sync.d.mts +2 -2
- package/package.json +1 -1
|
@@ -190,22 +190,39 @@ interface TFieldMeta {
|
|
|
190
190
|
sortable: boolean;
|
|
191
191
|
filterable: boolean;
|
|
192
192
|
}
|
|
193
|
+
/** Built-in CRUD operation names; map 1:1 to public method names. */
|
|
194
|
+
type TCrudOp = "query" | "pages" | "one" | "insert" | "update" | "replace" | "remove";
|
|
195
|
+
/**
|
|
196
|
+
* CRUD permissions advertised in `/meta`. Key absent → operation is denied or
|
|
197
|
+
* not exposed. Key present → operation is allowed; the `string[]` value is the
|
|
198
|
+
* accepted UniQuery control whitelist for read ops (`[]` for write ops, which
|
|
199
|
+
* take no controls — presence still signals "allowed").
|
|
200
|
+
*/
|
|
201
|
+
type TCrudPermissions = Partial<Record<TCrudOp, string[]>>;
|
|
193
202
|
/** Response payload for `GET /meta`. */
|
|
194
203
|
interface TMetaResponse {
|
|
195
204
|
searchable: boolean;
|
|
196
205
|
vectorSearchable: boolean;
|
|
197
206
|
searchIndexes: TSearchIndexInfo[];
|
|
198
207
|
primaryKeys: string[];
|
|
199
|
-
readOnly: boolean;
|
|
200
208
|
relations: TRelationInfo[];
|
|
201
209
|
fields: Record<string, TFieldMeta>;
|
|
202
210
|
type: TSerializedAnnotatedType;
|
|
203
211
|
actions: TDbActionInfo[];
|
|
212
|
+
crud: TCrudPermissions;
|
|
204
213
|
}
|
|
205
214
|
/** Where the action applies on the UI. */
|
|
206
215
|
type TDbActionLevel = "table" | "row" | "rows";
|
|
207
|
-
/**
|
|
208
|
-
|
|
216
|
+
/**
|
|
217
|
+
* Semantic intent the UI maps to its own visual language (color, prominence).
|
|
218
|
+
*
|
|
219
|
+
* Suggested visual prominence (most → least): `negative` > `warning` > `primary`
|
|
220
|
+
* > `positive` > `secondary`. Use `negative` for destructive ops (delete, purge),
|
|
221
|
+
* `warning` for risky-but-non-destructive ops (retry payment, force recompute,
|
|
222
|
+
* reset state), `primary` for the headline action, `positive` for benign
|
|
223
|
+
* confirmations (approve, publish), `secondary` for everything else.
|
|
224
|
+
*/
|
|
225
|
+
type TDbActionIntent = "positive" | "negative" | "warning" | "primary" | "secondary";
|
|
209
226
|
/** How the UI client should handle the action when invoked. */
|
|
210
227
|
type TDbActionProcessor = "backend" | "navigate" | "custom";
|
|
211
228
|
/**
|
|
@@ -227,7 +244,43 @@ interface TDbActionInfo {
|
|
|
227
244
|
description?: string;
|
|
228
245
|
order?: number;
|
|
229
246
|
default?: boolean;
|
|
230
|
-
|
|
247
|
+
/**
|
|
248
|
+
* Confirmation prompt copy. String form is shown verbatim. Tuple form is
|
|
249
|
+
* `[singular, plural]`: the UI picks `[0]` when the action will execute
|
|
250
|
+
* against a single PK (always for `'row'`-level; for `'rows'`-level when the
|
|
251
|
+
* current selection has exactly one PK) and `[1]` otherwise.
|
|
252
|
+
*
|
|
253
|
+
* Placeholder substitution is UI-resolved, not server-parsed. Conventional
|
|
254
|
+
* placeholders: `$1` for the single PK (singular form) and `$N` for the
|
|
255
|
+
* count (plural form), e.g. `['Delete order $1?', 'Delete $N orders?']`.
|
|
256
|
+
*/
|
|
257
|
+
promptText?: string | [string, string];
|
|
258
|
+
/**
|
|
259
|
+
* Single-character keyboard shortcut hint. The server stores this verbatim
|
|
260
|
+
* — choice of modifier prefix (Alt+, Ctrl+, bare key) and activation scope
|
|
261
|
+
* (e.g. only when an actions dropdown is open) are UI/UX concerns. Conflict
|
|
262
|
+
* resolution between actions sharing the same key is also up to the UI;
|
|
263
|
+
* the server does no dedup.
|
|
264
|
+
*/
|
|
265
|
+
shortcut?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Stringified gate predicate (`fn.toString()`). Present only for `'row'`
|
|
268
|
+
* and `'rows'` level actions whose decorator declared a `disabled` function.
|
|
269
|
+
* The UI evaluates against a level-specific scope to grey-out / hide the
|
|
270
|
+
* button. The server has already enforced this predicate before the
|
|
271
|
+
* action's handler ran — the server is authoritative; this field is purely
|
|
272
|
+
* a UI hint.
|
|
273
|
+
*/
|
|
274
|
+
disabled?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Optional dev-supplied list of dot-notation paths over the row that the
|
|
277
|
+
* `disabled` predicate references. Plain `string[]` in v1 (a typed
|
|
278
|
+
* `PathOf<TRow>[]` upgrade is a documented follow-up). The UI unions these
|
|
279
|
+
* into `$select` across all actions on a table. When absent, the UI parses
|
|
280
|
+
* `disabled` itself. When present, the UI uses this list verbatim — the
|
|
281
|
+
* server does NOT auto-derive or merge.
|
|
282
|
+
*/
|
|
283
|
+
requiredFields?: string[];
|
|
231
284
|
}
|
|
232
285
|
interface TDbInsertResult {
|
|
233
286
|
insertedId: unknown;
|
|
@@ -1315,4 +1368,4 @@ declare class AtscriptDbReadable<T extends TAtscriptAnnotatedType = TAtscriptAnn
|
|
|
1315
1368
|
}, thisTableName: string, alias?: string): TDbForeignKey | undefined;
|
|
1316
1369
|
}
|
|
1317
1370
|
//#endregion
|
|
1318
|
-
export {
|
|
1371
|
+
export { TSyncColumnResult as $, TDbDefaultValue as A, TDbRelation as B, TCrudPermissions as C, TDbActionProcessor as D, TDbActionLevel as E, TDbIndexField as F, TFieldMeta as G, TDbUpdateResult as H, TDbIndexType as I, TIdDescriptor as J, TFkLookupResolver as K, TDbInsertManyResult as L, TDbFieldMeta as M, TDbForeignKey as N, TDbCollation as O, TDbIndex as P, TSearchIndexInfo as Q, TDbInsertResult as R, TCrudOp as S, TDbActionIntent as T, TExistingColumn as U, TDbStorageType as V, TExistingTableOption as W, TMetadataOverrides as X, TMetaResponse as Y, TRelationInfo as Z, NavPropsOf$1 as _, FieldMappingStrategy as a, Uniquery$1 as at, TCascadeTarget as b, AggregateExpr$1 as c, TableMetadata as ct, AggregateResult as d, UniquSelect as dt, TTableOptionDiff as et, AtscriptDbWritable as f, FilterExpr$1 as g, FieldOpsFor as h, DocumentFieldMapper as i, TypedWithRelation as it, TDbDeleteResult as j, TDbDefaultFn as k, AggregateFn as l, NoopLogger as lt, DbQuery as m, DbResponse as n, TValueFormatterPair as nt, BaseDbAdapter as o, UniqueryControls$1 as ot, DbControls as p, TFkLookupTarget as q, resolveDesignType as r, TWriteTableResolver as rt, AggregateControls as s, WithRelation$1 as st, AtscriptDbReadable as t, TTableResolver as tt, AggregateQuery$1 as u, TGenericLogger as ut, OwnPropsOf$1 as v, TDbActionInfo as w, TColumnDiff as x, TCascadeResolver as y, TDbReferentialAction as z };
|
|
@@ -190,22 +190,39 @@ interface TFieldMeta {
|
|
|
190
190
|
sortable: boolean;
|
|
191
191
|
filterable: boolean;
|
|
192
192
|
}
|
|
193
|
+
/** Built-in CRUD operation names; map 1:1 to public method names. */
|
|
194
|
+
type TCrudOp = "query" | "pages" | "one" | "insert" | "update" | "replace" | "remove";
|
|
195
|
+
/**
|
|
196
|
+
* CRUD permissions advertised in `/meta`. Key absent → operation is denied or
|
|
197
|
+
* not exposed. Key present → operation is allowed; the `string[]` value is the
|
|
198
|
+
* accepted UniQuery control whitelist for read ops (`[]` for write ops, which
|
|
199
|
+
* take no controls — presence still signals "allowed").
|
|
200
|
+
*/
|
|
201
|
+
type TCrudPermissions = Partial<Record<TCrudOp, string[]>>;
|
|
193
202
|
/** Response payload for `GET /meta`. */
|
|
194
203
|
interface TMetaResponse {
|
|
195
204
|
searchable: boolean;
|
|
196
205
|
vectorSearchable: boolean;
|
|
197
206
|
searchIndexes: TSearchIndexInfo[];
|
|
198
207
|
primaryKeys: string[];
|
|
199
|
-
readOnly: boolean;
|
|
200
208
|
relations: TRelationInfo[];
|
|
201
209
|
fields: Record<string, TFieldMeta>;
|
|
202
210
|
type: TSerializedAnnotatedType;
|
|
203
211
|
actions: TDbActionInfo[];
|
|
212
|
+
crud: TCrudPermissions;
|
|
204
213
|
}
|
|
205
214
|
/** Where the action applies on the UI. */
|
|
206
215
|
type TDbActionLevel = "table" | "row" | "rows";
|
|
207
|
-
/**
|
|
208
|
-
|
|
216
|
+
/**
|
|
217
|
+
* Semantic intent the UI maps to its own visual language (color, prominence).
|
|
218
|
+
*
|
|
219
|
+
* Suggested visual prominence (most → least): `negative` > `warning` > `primary`
|
|
220
|
+
* > `positive` > `secondary`. Use `negative` for destructive ops (delete, purge),
|
|
221
|
+
* `warning` for risky-but-non-destructive ops (retry payment, force recompute,
|
|
222
|
+
* reset state), `primary` for the headline action, `positive` for benign
|
|
223
|
+
* confirmations (approve, publish), `secondary` for everything else.
|
|
224
|
+
*/
|
|
225
|
+
type TDbActionIntent = "positive" | "negative" | "warning" | "primary" | "secondary";
|
|
209
226
|
/** How the UI client should handle the action when invoked. */
|
|
210
227
|
type TDbActionProcessor = "backend" | "navigate" | "custom";
|
|
211
228
|
/**
|
|
@@ -227,7 +244,43 @@ interface TDbActionInfo {
|
|
|
227
244
|
description?: string;
|
|
228
245
|
order?: number;
|
|
229
246
|
default?: boolean;
|
|
230
|
-
|
|
247
|
+
/**
|
|
248
|
+
* Confirmation prompt copy. String form is shown verbatim. Tuple form is
|
|
249
|
+
* `[singular, plural]`: the UI picks `[0]` when the action will execute
|
|
250
|
+
* against a single PK (always for `'row'`-level; for `'rows'`-level when the
|
|
251
|
+
* current selection has exactly one PK) and `[1]` otherwise.
|
|
252
|
+
*
|
|
253
|
+
* Placeholder substitution is UI-resolved, not server-parsed. Conventional
|
|
254
|
+
* placeholders: `$1` for the single PK (singular form) and `$N` for the
|
|
255
|
+
* count (plural form), e.g. `['Delete order $1?', 'Delete $N orders?']`.
|
|
256
|
+
*/
|
|
257
|
+
promptText?: string | [string, string];
|
|
258
|
+
/**
|
|
259
|
+
* Single-character keyboard shortcut hint. The server stores this verbatim
|
|
260
|
+
* — choice of modifier prefix (Alt+, Ctrl+, bare key) and activation scope
|
|
261
|
+
* (e.g. only when an actions dropdown is open) are UI/UX concerns. Conflict
|
|
262
|
+
* resolution between actions sharing the same key is also up to the UI;
|
|
263
|
+
* the server does no dedup.
|
|
264
|
+
*/
|
|
265
|
+
shortcut?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Stringified gate predicate (`fn.toString()`). Present only for `'row'`
|
|
268
|
+
* and `'rows'` level actions whose decorator declared a `disabled` function.
|
|
269
|
+
* The UI evaluates against a level-specific scope to grey-out / hide the
|
|
270
|
+
* button. The server has already enforced this predicate before the
|
|
271
|
+
* action's handler ran — the server is authoritative; this field is purely
|
|
272
|
+
* a UI hint.
|
|
273
|
+
*/
|
|
274
|
+
disabled?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Optional dev-supplied list of dot-notation paths over the row that the
|
|
277
|
+
* `disabled` predicate references. Plain `string[]` in v1 (a typed
|
|
278
|
+
* `PathOf<TRow>[]` upgrade is a documented follow-up). The UI unions these
|
|
279
|
+
* into `$select` across all actions on a table. When absent, the UI parses
|
|
280
|
+
* `disabled` itself. When present, the UI uses this list verbatim — the
|
|
281
|
+
* server does NOT auto-derive or merge.
|
|
282
|
+
*/
|
|
283
|
+
requiredFields?: string[];
|
|
231
284
|
}
|
|
232
285
|
interface TDbInsertResult {
|
|
233
286
|
insertedId: unknown;
|
|
@@ -1315,4 +1368,4 @@ declare class AtscriptDbReadable<T extends TAtscriptAnnotatedType = TAtscriptAnn
|
|
|
1315
1368
|
}, thisTableName: string, alias?: string): TDbForeignKey | undefined;
|
|
1316
1369
|
}
|
|
1317
1370
|
//#endregion
|
|
1318
|
-
export {
|
|
1371
|
+
export { TSyncColumnResult as $, TDbDefaultValue as A, TDbRelation as B, TCrudPermissions as C, TDbActionProcessor as D, TDbActionLevel as E, TDbIndexField as F, TFieldMeta as G, TDbUpdateResult as H, TDbIndexType as I, TIdDescriptor as J, TFkLookupResolver as K, TDbInsertManyResult as L, TDbFieldMeta as M, TDbForeignKey as N, TDbCollation as O, TDbIndex as P, TSearchIndexInfo as Q, TDbInsertResult as R, TCrudOp as S, TDbActionIntent as T, TExistingColumn as U, TDbStorageType as V, TExistingTableOption as W, TMetadataOverrides as X, TMetaResponse as Y, TRelationInfo as Z, NavPropsOf$1 as _, FieldMappingStrategy as a, Uniquery$1 as at, TCascadeTarget as b, AggregateExpr$1 as c, TableMetadata as ct, AggregateResult as d, UniquSelect as dt, TTableOptionDiff as et, AtscriptDbWritable as f, FilterExpr$1 as g, FieldOpsFor as h, DocumentFieldMapper as i, TypedWithRelation as it, TDbDeleteResult as j, TDbDefaultFn as k, AggregateFn as l, NoopLogger as lt, DbQuery as m, DbResponse as n, TValueFormatterPair as nt, BaseDbAdapter as o, UniqueryControls$1 as ot, DbControls as p, TFkLookupTarget as q, resolveDesignType as r, TWriteTableResolver as rt, AggregateControls as s, WithRelation$1 as st, AtscriptDbReadable as t, TTableResolver as tt, AggregateQuery$1 as u, TGenericLogger as ut, OwnPropsOf$1 as v, TDbActionInfo as w, TColumnDiff as x, TCascadeResolver as y, TDbReferentialAction as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AtscriptQueryComparison, AtscriptQueryFieldRef, AtscriptQueryFieldRef as AtscriptQueryFieldRef$1, AtscriptQueryNode, AtscriptQueryNode as AtscriptQueryNode$1, AtscriptRef, FlatOf, NavPropsOf, OwnPropsOf, PrimaryKeyOf, TAtscriptAnnotatedType, TAtscriptDataType, Validator } from "@atscript/typescript/utils";
|
|
1
|
+
import { H as TDbUpdateResult, K as TFkLookupResolver, L as TDbInsertManyResult, R as TDbInsertResult, ct as TableMetadata, j as TDbDeleteResult, o as BaseDbAdapter, rt as TWriteTableResolver, t as AtscriptDbReadable, tt as TTableResolver, ut as TGenericLogger, y as TCascadeResolver } from "./db-readable-DN1CJRph.cjs";
|
|
3
2
|
import { FilterExpr } from "@uniqu/core";
|
|
3
|
+
import { AtscriptQueryComparison, AtscriptQueryFieldRef, AtscriptQueryFieldRef as AtscriptQueryFieldRef$1, AtscriptQueryNode, AtscriptQueryNode as AtscriptQueryNode$1, AtscriptRef, FlatOf, NavPropsOf, OwnPropsOf, PrimaryKeyOf, TAtscriptAnnotatedType, TAtscriptDataType, Validator } from "@atscript/typescript/utils";
|
|
4
4
|
|
|
5
5
|
//#region src/strategies/integrity.d.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FilterExpr } from "@uniqu/core";
|
|
1
|
+
import { H as TDbUpdateResult, K as TFkLookupResolver, L as TDbInsertManyResult, R as TDbInsertResult, ct as TableMetadata, j as TDbDeleteResult, o as BaseDbAdapter, rt as TWriteTableResolver, t as AtscriptDbReadable, tt as TTableResolver, ut as TGenericLogger, y as TCascadeResolver } from "./db-readable-CONS7NPu.mjs";
|
|
3
2
|
import { AtscriptQueryComparison, AtscriptQueryFieldRef, AtscriptQueryFieldRef as AtscriptQueryFieldRef$1, AtscriptQueryNode, AtscriptQueryNode as AtscriptQueryNode$1, AtscriptRef, FlatOf, NavPropsOf, OwnPropsOf, PrimaryKeyOf, TAtscriptAnnotatedType, TAtscriptDataType, Validator } from "@atscript/typescript/utils";
|
|
3
|
+
import { FilterExpr } from "@uniqu/core";
|
|
4
4
|
|
|
5
5
|
//#region src/strategies/integrity.d.ts
|
|
6
6
|
/**
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as TSyncColumnResult, A as TDbDefaultValue, B as TDbRelation, C as TCrudPermissions, D as TDbActionProcessor, E as TDbActionLevel, F as TDbIndexField, G as TFieldMeta, H as TDbUpdateResult, I as TDbIndexType, J as TIdDescriptor, K as TFkLookupResolver, L as TDbInsertManyResult, M as TDbFieldMeta, N as TDbForeignKey, O as TDbCollation, P as TDbIndex, Q as TSearchIndexInfo, R as TDbInsertResult, S as TCrudOp, T as TDbActionIntent, U as TExistingColumn, V as TDbStorageType, W as TExistingTableOption, X as TMetadataOverrides, Y as TMetaResponse, Z as TRelationInfo, _ as NavPropsOf, a as FieldMappingStrategy, at as Uniquery, b as TCascadeTarget, c as AggregateExpr, ct as TableMetadata, d as AggregateResult, dt as UniquSelect, et as TTableOptionDiff, f as AtscriptDbWritable, g as FilterExpr, h as FieldOpsFor, i as DocumentFieldMapper, it as TypedWithRelation, j as TDbDeleteResult, k as TDbDefaultFn, l as AggregateFn, lt as NoopLogger, m as DbQuery, n as DbResponse, nt as TValueFormatterPair, o as BaseDbAdapter, ot as UniqueryControls, p as DbControls, q as TFkLookupTarget, r as resolveDesignType, rt as TWriteTableResolver, s as AggregateControls, st as WithRelation, t as AtscriptDbReadable, tt as TTableResolver, u as AggregateQuery, ut as TGenericLogger, v as OwnPropsOf, w as TDbActionInfo, x as TColumnDiff, y as TCascadeResolver, z as TDbReferentialAction } from "./db-readable-DN1CJRph.cjs";
|
|
2
2
|
import { a as $remove, c as $upsert, d as getDbFieldOp, f as isDbFieldOp, i as $mul, l as TDbFieldOp, n as $inc, o as $replace, p as separateFieldOps, r as $insert, s as $update, t as $dec, u as TFieldOps } from "./ops-DXJ4Zw0P.cjs";
|
|
3
|
-
import { a as AtscriptQueryComparison, c as AtscriptRef, d as translateQueryTree, f as AtscriptDbTable, i as TViewColumnMapping, l as TViewJoin, m as NativeIntegrity, n as TAdapterFactory, o as AtscriptQueryFieldRef, p as IntegrityStrategy, r as AtscriptDbView, s as AtscriptQueryNode, t as DbSpace, u as TViewPlan } from "./db-space-
|
|
3
|
+
import { a as AtscriptQueryComparison, c as AtscriptRef, d as translateQueryTree, f as AtscriptDbTable, i as TViewColumnMapping, l as TViewJoin, m as NativeIntegrity, n as TAdapterFactory, o as AtscriptQueryFieldRef, p as IntegrityStrategy, r as AtscriptDbView, s as AtscriptQueryNode, t as DbSpace, u as TViewPlan } from "./db-space-D1dfFoKL.cjs";
|
|
4
4
|
import { n as createDbValidatorPlugin, t as DbValidationContext } from "./db-validator-plugin-DRGMCEn3.cjs";
|
|
5
5
|
import { c as TArrayPatch, i as buildValidationContext, l as TDbPatch, n as ValidatorMode, o as forceNavNonOptional, r as buildDbValidator, s as isNavRelation, t as ValidationContext, u as getKeyProps } from "./validator-_z_A3cKa.cjs";
|
|
6
6
|
import { AggregateQuery as AggregateQuery$1, FilterExpr as FilterExpr$1, FilterVisitor, Uniquery as Uniquery$1, computeInsights, isPrimitive, walkFilter } from "@uniqu/core";
|
|
@@ -114,4 +114,4 @@ declare class DbError extends Error {
|
|
|
114
114
|
*/
|
|
115
115
|
declare function decomposePatch(payload: Record<string, unknown>, table: AtscriptDbTable): Record<string, unknown>;
|
|
116
116
|
//#endregion
|
|
117
|
-
export { $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, type DbControls, DbError, type DbErrorCode, type DbQuery, type DbResponse, DbSpace, type DbValidationContext, DocumentFieldMapper, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type OwnPropsOf, RelationalFieldMapper, type TAdapterFactory, type TArrayPatch, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteResult, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertManyResult, type TDbInsertResult, type TDbPatch, type TDbReferentialAction, type TDbRelation, type TDbStorageType, type TDbUpdateResult, type TExistingColumn, type TExistingTableOption, type TFieldMeta, type TFieldOps, type TFkLookupResolver, type TFkLookupTarget, type TGenericLogger, type TIdDescriptor, type TMetaResponse, type TMetadataOverrides, type TRelationInfo, type TSearchIndexInfo, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TValueFormatterPair, type TViewColumnMapping, type TViewJoin, type TViewPlan, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WithRelation, buildDbValidator, buildValidationContext, computeInsights, createDbValidatorPlugin, decomposePatch, forceNavNonOptional, getDbFieldOp, getKeyProps, isDbFieldOp, isNavRelation, isPrimitive, resolveDesignType, separateFieldOps, translateQueryTree, walkFilter };
|
|
117
|
+
export { $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, type DbControls, DbError, type DbErrorCode, type DbQuery, type DbResponse, DbSpace, type DbValidationContext, DocumentFieldMapper, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type OwnPropsOf, RelationalFieldMapper, type TAdapterFactory, type TArrayPatch, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteResult, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertManyResult, type TDbInsertResult, type TDbPatch, type TDbReferentialAction, type TDbRelation, type TDbStorageType, type TDbUpdateResult, type TExistingColumn, type TExistingTableOption, type TFieldMeta, type TFieldOps, type TFkLookupResolver, type TFkLookupTarget, type TGenericLogger, type TIdDescriptor, type TMetaResponse, type TMetadataOverrides, type TRelationInfo, type TSearchIndexInfo, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TValueFormatterPair, type TViewColumnMapping, type TViewJoin, type TViewPlan, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WithRelation, buildDbValidator, buildValidationContext, computeInsights, createDbValidatorPlugin, decomposePatch, forceNavNonOptional, getDbFieldOp, getKeyProps, isDbFieldOp, isNavRelation, isPrimitive, resolveDesignType, separateFieldOps, translateQueryTree, walkFilter };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as TSyncColumnResult, A as TDbDefaultValue, B as TDbRelation, C as TCrudPermissions, D as TDbActionProcessor, E as TDbActionLevel, F as TDbIndexField, G as TFieldMeta, H as TDbUpdateResult, I as TDbIndexType, J as TIdDescriptor, K as TFkLookupResolver, L as TDbInsertManyResult, M as TDbFieldMeta, N as TDbForeignKey, O as TDbCollation, P as TDbIndex, Q as TSearchIndexInfo, R as TDbInsertResult, S as TCrudOp, T as TDbActionIntent, U as TExistingColumn, V as TDbStorageType, W as TExistingTableOption, X as TMetadataOverrides, Y as TMetaResponse, Z as TRelationInfo, _ as NavPropsOf, a as FieldMappingStrategy, at as Uniquery, b as TCascadeTarget, c as AggregateExpr, ct as TableMetadata, d as AggregateResult, dt as UniquSelect, et as TTableOptionDiff, f as AtscriptDbWritable, g as FilterExpr, h as FieldOpsFor, i as DocumentFieldMapper, it as TypedWithRelation, j as TDbDeleteResult, k as TDbDefaultFn, l as AggregateFn, lt as NoopLogger, m as DbQuery, n as DbResponse, nt as TValueFormatterPair, o as BaseDbAdapter, ot as UniqueryControls, p as DbControls, q as TFkLookupTarget, r as resolveDesignType, rt as TWriteTableResolver, s as AggregateControls, st as WithRelation, t as AtscriptDbReadable, tt as TTableResolver, u as AggregateQuery, ut as TGenericLogger, v as OwnPropsOf, w as TDbActionInfo, x as TColumnDiff, y as TCascadeResolver, z as TDbReferentialAction } from "./db-readable-CONS7NPu.mjs";
|
|
2
2
|
import { a as $remove, c as $upsert, d as getDbFieldOp, f as isDbFieldOp, i as $mul, l as TDbFieldOp, n as $inc, o as $replace, p as separateFieldOps, r as $insert, s as $update, t as $dec, u as TFieldOps } from "./ops-C61kelof.mjs";
|
|
3
|
-
import { a as AtscriptQueryComparison, c as AtscriptRef, d as translateQueryTree, f as AtscriptDbTable, i as TViewColumnMapping, l as TViewJoin, m as NativeIntegrity, n as TAdapterFactory, o as AtscriptQueryFieldRef, p as IntegrityStrategy, r as AtscriptDbView, s as AtscriptQueryNode, t as DbSpace, u as TViewPlan } from "./db-space-
|
|
3
|
+
import { a as AtscriptQueryComparison, c as AtscriptRef, d as translateQueryTree, f as AtscriptDbTable, i as TViewColumnMapping, l as TViewJoin, m as NativeIntegrity, n as TAdapterFactory, o as AtscriptQueryFieldRef, p as IntegrityStrategy, r as AtscriptDbView, s as AtscriptQueryNode, t as DbSpace, u as TViewPlan } from "./db-space-DQU38dHk.mjs";
|
|
4
4
|
import { n as createDbValidatorPlugin, t as DbValidationContext } from "./db-validator-plugin-DDvYyv5t.mjs";
|
|
5
5
|
import { c as TArrayPatch, i as buildValidationContext, l as TDbPatch, n as ValidatorMode, o as forceNavNonOptional, r as buildDbValidator, s as isNavRelation, t as ValidationContext, u as getKeyProps } from "./validator-DttN2e5_.mjs";
|
|
6
6
|
import { AggregateQuery as AggregateQuery$1, FilterExpr as FilterExpr$1, FilterVisitor, Uniquery as Uniquery$1, computeInsights, isPrimitive, walkFilter } from "@uniqu/core";
|
|
@@ -114,4 +114,4 @@ declare class DbError extends Error {
|
|
|
114
114
|
*/
|
|
115
115
|
declare function decomposePatch(payload: Record<string, unknown>, table: AtscriptDbTable): Record<string, unknown>;
|
|
116
116
|
//#endregion
|
|
117
|
-
export { $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, type DbControls, DbError, type DbErrorCode, type DbQuery, type DbResponse, DbSpace, type DbValidationContext, DocumentFieldMapper, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type OwnPropsOf, RelationalFieldMapper, type TAdapterFactory, type TArrayPatch, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteResult, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertManyResult, type TDbInsertResult, type TDbPatch, type TDbReferentialAction, type TDbRelation, type TDbStorageType, type TDbUpdateResult, type TExistingColumn, type TExistingTableOption, type TFieldMeta, type TFieldOps, type TFkLookupResolver, type TFkLookupTarget, type TGenericLogger, type TIdDescriptor, type TMetaResponse, type TMetadataOverrides, type TRelationInfo, type TSearchIndexInfo, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TValueFormatterPair, type TViewColumnMapping, type TViewJoin, type TViewPlan, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WithRelation, buildDbValidator, buildValidationContext, computeInsights, createDbValidatorPlugin, decomposePatch, forceNavNonOptional, getDbFieldOp, getKeyProps, isDbFieldOp, isNavRelation, isPrimitive, resolveDesignType, separateFieldOps, translateQueryTree, walkFilter };
|
|
117
|
+
export { $dec, $inc, $insert, $mul, $remove, $replace, $update, $upsert, type AggregateControls, type AggregateExpr, type AggregateFn, type AggregateQuery, type AggregateResult, ApplicationIntegrity, AtscriptDbReadable, AtscriptDbTable, AtscriptDbView, type AtscriptDbWritable, type AtscriptQueryComparison, type AtscriptQueryFieldRef, type AtscriptQueryNode, type AtscriptRef, BaseDbAdapter, type DbControls, DbError, type DbErrorCode, type DbQuery, type DbResponse, DbSpace, type DbValidationContext, DocumentFieldMapper, FieldMappingStrategy, type FieldOpsFor, type FilterExpr, type FilterVisitor, IntegrityStrategy, NativeIntegrity, type NavPropsOf, NoopLogger, type OwnPropsOf, RelationalFieldMapper, type TAdapterFactory, type TArrayPatch, type TCascadeResolver, type TCascadeTarget, type TColumnDiff, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbCollation, type TDbDefaultFn, type TDbDefaultValue, type TDbDeleteResult, type TDbFieldMeta, type TDbFieldOp, type TDbForeignKey, type TDbIndex, type TDbIndexField, type TDbIndexType, type TDbInsertManyResult, type TDbInsertResult, type TDbPatch, type TDbReferentialAction, type TDbRelation, type TDbStorageType, type TDbUpdateResult, type TExistingColumn, type TExistingTableOption, type TFieldMeta, type TFieldOps, type TFkLookupResolver, type TFkLookupTarget, type TGenericLogger, type TIdDescriptor, type TMetaResponse, type TMetadataOverrides, type TRelationInfo, type TSearchIndexInfo, type TSyncColumnResult, type TTableOptionDiff, type TTableResolver, type TValueFormatterPair, type TViewColumnMapping, type TViewJoin, type TViewPlan, type TWriteTableResolver, TableMetadata, type TypedWithRelation, UniquSelect, type Uniquery, type UniqueryControls, type ValidationContext, type ValidatorMode, type WithRelation, buildDbValidator, buildValidationContext, computeInsights, createDbValidatorPlugin, decomposePatch, forceNavNonOptional, getDbFieldOp, getKeyProps, isDbFieldOp, isNavRelation, isPrimitive, resolveDesignType, separateFieldOps, translateQueryTree, walkFilter };
|
package/dist/rel.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as TDbRelation, N as TDbForeignKey, ct as TableMetadata, o as BaseDbAdapter, rt as TWriteTableResolver, tt as TTableResolver, ut as TGenericLogger } from "./db-readable-DN1CJRph.cjs";
|
|
2
2
|
import { t as DbValidationContext } from "./db-validator-plugin-DRGMCEn3.cjs";
|
|
3
3
|
import { FilterExpr, WithRelation } from "@uniqu/core";
|
|
4
4
|
import { Validator } from "@atscript/typescript/utils";
|
package/dist/rel.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as TDbRelation, N as TDbForeignKey, ct as TableMetadata, o as BaseDbAdapter, rt as TWriteTableResolver, tt as TTableResolver, ut as TGenericLogger } from "./db-readable-CONS7NPu.mjs";
|
|
2
2
|
import { t as DbValidationContext } from "./db-validator-plugin-DDvYyv5t.mjs";
|
|
3
3
|
import { Validator } from "@atscript/typescript/utils";
|
|
4
4
|
import { FilterExpr, WithRelation } from "@uniqu/core";
|
package/dist/sync.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { r as AtscriptDbView, t as DbSpace } from "./db-space-
|
|
1
|
+
import { A as TDbDefaultValue, M as TDbFieldMeta, N as TDbForeignKey, U as TExistingColumn, V as TDbStorageType, W as TExistingTableOption, et as TTableOptionDiff, t as AtscriptDbReadable, ut as TGenericLogger, x as TColumnDiff } from "./db-readable-DN1CJRph.cjs";
|
|
2
|
+
import { r as AtscriptDbView, t as DbSpace } from "./db-space-D1dfFoKL.cjs";
|
|
3
3
|
import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
|
|
4
4
|
|
|
5
5
|
//#region src/schema/sync-entry.d.ts
|
package/dist/sync.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { r as AtscriptDbView, t as DbSpace } from "./db-space-
|
|
1
|
+
import { A as TDbDefaultValue, M as TDbFieldMeta, N as TDbForeignKey, U as TExistingColumn, V as TDbStorageType, W as TExistingTableOption, et as TTableOptionDiff, t as AtscriptDbReadable, ut as TGenericLogger, x as TColumnDiff } from "./db-readable-CONS7NPu.mjs";
|
|
2
|
+
import { r as AtscriptDbView, t as DbSpace } from "./db-space-DQU38dHk.mjs";
|
|
3
3
|
import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
|
|
4
4
|
|
|
5
5
|
//#region src/schema/sync-entry.d.ts
|