@atscript/db 0.1.55 → 0.1.57

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.
@@ -190,16 +190,53 @@ 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;
211
+ actions: TDbActionInfo[];
212
+ crud: TCrudPermissions;
213
+ }
214
+ /** Where the action applies on the UI. */
215
+ type TDbActionLevel = "table" | "row" | "rows";
216
+ /** Semantic intent the UI maps to its own visual language (color, prominence). */
217
+ type TDbActionIntent = "positive" | "negative" | "primary" | "secondary";
218
+ /** How the UI client should handle the action when invoked. */
219
+ type TDbActionProcessor = "backend" | "navigate" | "custom";
220
+ /**
221
+ * Single action descriptor in the `/meta` envelope. Flat shape — `processor`
222
+ * is a string discriminator; `value` is its sibling and is always populated.
223
+ *
224
+ * - `processor: 'backend'` — UI POSTs to `value` (full HTTP path).
225
+ * - `processor: 'navigate'` — UI routes to `value` (URL template; `$1` is the row PK).
226
+ * - `processor: 'custom'` — UI dispatches `value` as an event name (defaults to action `name`).
227
+ */
228
+ interface TDbActionInfo {
229
+ name: string;
230
+ label: string;
231
+ level: TDbActionLevel;
232
+ processor: TDbActionProcessor;
233
+ value: string;
234
+ icon?: string;
235
+ intent?: TDbActionIntent;
236
+ description?: string;
237
+ order?: number;
238
+ default?: boolean;
239
+ promptText?: string;
203
240
  }
204
241
  interface TDbInsertResult {
205
242
  insertedId: unknown;
@@ -1287,4 +1324,4 @@ declare class AtscriptDbReadable<T extends TAtscriptAnnotatedType = TAtscriptAnn
1287
1324
  }, thisTableName: string, alias?: string): TDbForeignKey | undefined;
1288
1325
  }
1289
1326
  //#endregion
1290
- export { Uniquery$1 as $, TDbIndexType as A, TFkLookupResolver as B, TDbDefaultFn as C, TDbForeignKey as D, TDbFieldMeta as E, TDbStorageType as F, TRelationInfo as G, TIdDescriptor as H, TDbUpdateResult as I, TTableOptionDiff as J, TSearchIndexInfo as K, TExistingColumn as L, TDbInsertResult as M, TDbReferentialAction as N, TDbIndex as O, TDbRelation as P, TypedWithRelation as Q, TExistingTableOption as R, TDbCollation as S, TDbDeleteResult as T, TMetaResponse as U, TFkLookupTarget as V, TMetadataOverrides as W, TValueFormatterPair as X, TTableResolver as Y, TWriteTableResolver as Z, NavPropsOf$1 as _, FieldMappingStrategy as a, UniquSelect as at, TCascadeTarget as b, AggregateExpr$1 as c, AggregateResult as d, UniqueryControls$1 as et, AtscriptDbWritable as f, FilterExpr$1 as g, FieldOpsFor as h, DocumentFieldMapper as i, TGenericLogger as it, TDbInsertManyResult as j, TDbIndexField as k, AggregateFn as l, DbQuery as m, DbResponse as n, TableMetadata as nt, BaseDbAdapter as o, DbControls as p, TSyncColumnResult as q, resolveDesignType as r, NoopLogger as rt, AggregateControls as s, AtscriptDbReadable as t, WithRelation$1 as tt, AggregateQuery$1 as u, OwnPropsOf$1 as v, TDbDefaultValue as w, TColumnDiff as x, TCascadeResolver as y, TFieldMeta as z };
1327
+ 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,16 +190,53 @@ 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;
211
+ actions: TDbActionInfo[];
212
+ crud: TCrudPermissions;
213
+ }
214
+ /** Where the action applies on the UI. */
215
+ type TDbActionLevel = "table" | "row" | "rows";
216
+ /** Semantic intent the UI maps to its own visual language (color, prominence). */
217
+ type TDbActionIntent = "positive" | "negative" | "primary" | "secondary";
218
+ /** How the UI client should handle the action when invoked. */
219
+ type TDbActionProcessor = "backend" | "navigate" | "custom";
220
+ /**
221
+ * Single action descriptor in the `/meta` envelope. Flat shape — `processor`
222
+ * is a string discriminator; `value` is its sibling and is always populated.
223
+ *
224
+ * - `processor: 'backend'` — UI POSTs to `value` (full HTTP path).
225
+ * - `processor: 'navigate'` — UI routes to `value` (URL template; `$1` is the row PK).
226
+ * - `processor: 'custom'` — UI dispatches `value` as an event name (defaults to action `name`).
227
+ */
228
+ interface TDbActionInfo {
229
+ name: string;
230
+ label: string;
231
+ level: TDbActionLevel;
232
+ processor: TDbActionProcessor;
233
+ value: string;
234
+ icon?: string;
235
+ intent?: TDbActionIntent;
236
+ description?: string;
237
+ order?: number;
238
+ default?: boolean;
239
+ promptText?: string;
203
240
  }
204
241
  interface TDbInsertResult {
205
242
  insertedId: unknown;
@@ -1287,4 +1324,4 @@ declare class AtscriptDbReadable<T extends TAtscriptAnnotatedType = TAtscriptAnn
1287
1324
  }, thisTableName: string, alias?: string): TDbForeignKey | undefined;
1288
1325
  }
1289
1326
  //#endregion
1290
- export { Uniquery$1 as $, TDbIndexType as A, TFkLookupResolver as B, TDbDefaultFn as C, TDbForeignKey as D, TDbFieldMeta as E, TDbStorageType as F, TRelationInfo as G, TIdDescriptor as H, TDbUpdateResult as I, TTableOptionDiff as J, TSearchIndexInfo as K, TExistingColumn as L, TDbInsertResult as M, TDbReferentialAction as N, TDbIndex as O, TDbRelation as P, TypedWithRelation as Q, TExistingTableOption as R, TDbCollation as S, TDbDeleteResult as T, TMetaResponse as U, TFkLookupTarget as V, TMetadataOverrides as W, TValueFormatterPair as X, TTableResolver as Y, TWriteTableResolver as Z, NavPropsOf$1 as _, FieldMappingStrategy as a, UniquSelect as at, TCascadeTarget as b, AggregateExpr$1 as c, AggregateResult as d, UniqueryControls$1 as et, AtscriptDbWritable as f, FilterExpr$1 as g, FieldOpsFor as h, DocumentFieldMapper as i, TGenericLogger as it, TDbInsertManyResult as j, TDbIndexField as k, AggregateFn as l, DbQuery as m, DbResponse as n, TableMetadata as nt, BaseDbAdapter as o, DbControls as p, TSyncColumnResult as q, resolveDesignType as r, NoopLogger as rt, AggregateControls as s, AtscriptDbReadable as t, WithRelation$1 as tt, AggregateQuery$1 as u, OwnPropsOf$1 as v, TDbDefaultValue as w, TColumnDiff as x, TCascadeResolver as y, TFieldMeta as z };
1327
+ 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,4 +1,4 @@
1
- import { B as TFkLookupResolver, I as TDbUpdateResult, M as TDbInsertResult, T as TDbDeleteResult, Y as TTableResolver, Z as TWriteTableResolver, it as TGenericLogger, j as TDbInsertManyResult, nt as TableMetadata, o as BaseDbAdapter, t as AtscriptDbReadable, y as TCascadeResolver } from "./db-readable-DtrC0BGF.cjs";
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-BCoBlULR.cjs";
2
2
  import { FilterExpr } from "@uniqu/core";
3
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
 
@@ -1,4 +1,4 @@
1
- import { B as TFkLookupResolver, I as TDbUpdateResult, M as TDbInsertResult, T as TDbDeleteResult, Y as TTableResolver, Z as TWriteTableResolver, it as TGenericLogger, j as TDbInsertManyResult, nt as TableMetadata, o as BaseDbAdapter, t as AtscriptDbReadable, y as TCascadeResolver } from "./db-readable-RTtqL7H4.mjs";
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-CrNX04nI.mjs";
2
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
3
  import { FilterExpr } from "@uniqu/core";
4
4
 
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { $ as Uniquery, A as TDbIndexType, B as TFkLookupResolver, C as TDbDefaultFn, D as TDbForeignKey, E as TDbFieldMeta, F as TDbStorageType, G as TRelationInfo, H as TIdDescriptor, I as TDbUpdateResult, J as TTableOptionDiff, K as TSearchIndexInfo, L as TExistingColumn, M as TDbInsertResult, N as TDbReferentialAction, O as TDbIndex, P as TDbRelation, Q as TypedWithRelation, R as TExistingTableOption, S as TDbCollation, T as TDbDeleteResult, U as TMetaResponse, V as TFkLookupTarget, W as TMetadataOverrides, X as TValueFormatterPair, Y as TTableResolver, Z as TWriteTableResolver, _ as NavPropsOf, a as FieldMappingStrategy, at as UniquSelect, b as TCascadeTarget, c as AggregateExpr, d as AggregateResult, et as UniqueryControls, f as AtscriptDbWritable, g as FilterExpr, h as FieldOpsFor, i as DocumentFieldMapper, it as TGenericLogger, j as TDbInsertManyResult, k as TDbIndexField, l as AggregateFn, m as DbQuery, n as DbResponse, nt as TableMetadata, o as BaseDbAdapter, p as DbControls, q as TSyncColumnResult, r as resolveDesignType, rt as NoopLogger, s as AggregateControls, t as AtscriptDbReadable, tt as WithRelation, u as AggregateQuery, v as OwnPropsOf, w as TDbDefaultValue, x as TColumnDiff, y as TCascadeResolver, z as TFieldMeta } from "./db-readable-DtrC0BGF.cjs";
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-BCoBlULR.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-BqVLHVq7.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-BvBklm9J.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 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 Uniquery, A as TDbIndexType, B as TFkLookupResolver, C as TDbDefaultFn, D as TDbForeignKey, E as TDbFieldMeta, F as TDbStorageType, G as TRelationInfo, H as TIdDescriptor, I as TDbUpdateResult, J as TTableOptionDiff, K as TSearchIndexInfo, L as TExistingColumn, M as TDbInsertResult, N as TDbReferentialAction, O as TDbIndex, P as TDbRelation, Q as TypedWithRelation, R as TExistingTableOption, S as TDbCollation, T as TDbDeleteResult, U as TMetaResponse, V as TFkLookupTarget, W as TMetadataOverrides, X as TValueFormatterPair, Y as TTableResolver, Z as TWriteTableResolver, _ as NavPropsOf, a as FieldMappingStrategy, at as UniquSelect, b as TCascadeTarget, c as AggregateExpr, d as AggregateResult, et as UniqueryControls, f as AtscriptDbWritable, g as FilterExpr, h as FieldOpsFor, i as DocumentFieldMapper, it as TGenericLogger, j as TDbInsertManyResult, k as TDbIndexField, l as AggregateFn, m as DbQuery, n as DbResponse, nt as TableMetadata, o as BaseDbAdapter, p as DbControls, q as TSyncColumnResult, r as resolveDesignType, rt as NoopLogger, s as AggregateControls, t as AtscriptDbReadable, tt as WithRelation, u as AggregateQuery, v as OwnPropsOf, w as TDbDefaultValue, x as TColumnDiff, y as TCascadeResolver, z as TFieldMeta } from "./db-readable-RTtqL7H4.mjs";
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-CrNX04nI.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-D3QSKx2B.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-CsgCjSMH.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 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 { D as TDbForeignKey, P as TDbRelation, Y as TTableResolver, Z as TWriteTableResolver, it as TGenericLogger, nt as TableMetadata, o as BaseDbAdapter } from "./db-readable-DtrC0BGF.cjs";
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-BCoBlULR.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 { D as TDbForeignKey, P as TDbRelation, Y as TTableResolver, Z as TWriteTableResolver, it as TGenericLogger, nt as TableMetadata, o as BaseDbAdapter } from "./db-readable-RTtqL7H4.mjs";
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-CrNX04nI.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 { D as TDbForeignKey, E as TDbFieldMeta, F as TDbStorageType, J as TTableOptionDiff, L as TExistingColumn, R as TExistingTableOption, it as TGenericLogger, t as AtscriptDbReadable, w as TDbDefaultValue, x as TColumnDiff } from "./db-readable-DtrC0BGF.cjs";
2
- import { r as AtscriptDbView, t as DbSpace } from "./db-space-BqVLHVq7.cjs";
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-BCoBlULR.cjs";
2
+ import { r as AtscriptDbView, t as DbSpace } from "./db-space-BvBklm9J.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 { D as TDbForeignKey, E as TDbFieldMeta, F as TDbStorageType, J as TTableOptionDiff, L as TExistingColumn, R as TExistingTableOption, it as TGenericLogger, t as AtscriptDbReadable, w as TDbDefaultValue, x as TColumnDiff } from "./db-readable-RTtqL7H4.mjs";
2
- import { r as AtscriptDbView, t as DbSpace } from "./db-space-D3QSKx2B.mjs";
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-CrNX04nI.mjs";
2
+ import { r as AtscriptDbView, t as DbSpace } from "./db-space-CsgCjSMH.mjs";
3
3
  import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
4
4
 
5
5
  //#region src/schema/sync-entry.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "description": "Database adapter utilities for atscript.",
5
5
  "keywords": [
6
6
  "atscript",