@atscript/db-client 0.1.205 → 0.1.207
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/{client-BRXq9YfV.d.cts → client-BnqkM3eZ.d.mts} +39 -24
- package/dist/{client-DggC00AO.d.mts → client-GVIGbuz_.d.cts} +39 -24
- package/dist/index.cjs +16 -6
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +16 -6
- package/dist/validator.d.cts +1 -1
- package/dist/validator.d.mts +1 -1
- package/package.json +9 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AggregateControls, AggregateControls as AggregateControls$1, AggregateQuery, AggregateResult, AggregateStage, BucketExpr, BucketUnit, CalendarBucketLabel, FilterExpr, FilterExpr as FilterExpr$1, NestedAggregateControls, NestedAggregateControls as NestedAggregateControls$1, NestedAggregateQuery, NestedAggregateResult, StageRow, TypedWithRelation, Uniquery, Uniquery as Uniquery$1, UniqueryControls, UniqueryInsights, UniqueryInsights as UniqueryInsights$1, ValidAggSort, ValidGroupBy, ValidNested, WeekStart } from "@uniqu/core";
|
|
2
2
|
import { TAtscriptAnnotatedType, TAtscriptTypeObject } from "@atscript/typescript/utils";
|
|
3
|
-
import { DbInsert, DbPatch, DbResponse, DbRow, TDbActionInfo, TDbActionTargetSummary, TDbAvailableActions, TDbDeleteResult, TDbDeleteResult as TDbDeleteResult$1, TDbInsertIgnoreResult, TDbInsertIgnoreResult as TDbInsertIgnoreResult$1, TDbInsertManyIgnoreResult, TDbInsertManyIgnoreResult as TDbInsertManyIgnoreResult$1, TDbInsertManyResult, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult, TDbUpdateResult as TDbUpdateResult$1, TDbVersion, TFieldMeta, TMetaResponse, TRelationInfo, TSearchIndexInfo } from "@atscript/db";
|
|
4
3
|
import { DbValidationContext, ValidatorMode, ValidatorMode as ValidatorMode$1 } from "@atscript/db/validator";
|
|
4
|
+
import { AggregateControlsCheck, AggregateRows, DbInsert, DbPatch, DbResponse, DbRow, TDbActionInfo, TDbActionTargetSummary, TDbAvailableActions, TDbDeleteResult, TDbDeleteResult as TDbDeleteResult$1, TDbInsertIgnoreResult, TDbInsertIgnoreResult as TDbInsertIgnoreResult$1, TDbInsertManyIgnoreResult, TDbInsertManyIgnoreResult as TDbInsertManyIgnoreResult$1, TDbInsertManyResult, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult, TDbUpdateResult as TDbUpdateResult$1, TDbVersion, TFieldMeta, TMetaResponse, TRelationInfo, TSearchIndexInfo } from "@atscript/db";
|
|
5
5
|
|
|
6
6
|
//#region src/meta-store.d.ts
|
|
7
7
|
/** Options for {@link MetaStore}. */
|
|
@@ -307,6 +307,14 @@ type NavOf<T> = T extends {
|
|
|
307
307
|
type IdOf<T> = T extends {
|
|
308
308
|
__pk: infer PK;
|
|
309
309
|
} ? PK : unknown;
|
|
310
|
+
/**
|
|
311
|
+
* The write model of `T`: a `@db.view.writable` view's table (the type-only
|
|
312
|
+
* `static __write` the atscript 0.2.30+ d.ts declares on such a view), else `T`
|
|
313
|
+
* itself. `Client` / `ClientLike` default their `W` to it (since 0.1.207).
|
|
314
|
+
*/
|
|
315
|
+
type WriteOf<T> = T extends {
|
|
316
|
+
__write: infer W extends AtscriptClientShape;
|
|
317
|
+
} ? W : T;
|
|
310
318
|
/**
|
|
311
319
|
* Narrow a read-method response type by the literal `$with` array in the
|
|
312
320
|
* query, mirroring the backend's `DbResponse<Data, Nav, Q>` algebra. Nav
|
|
@@ -365,8 +373,9 @@ interface TDbQueryTarget<T = AtscriptClientShape> {
|
|
|
365
373
|
* `getActionForm` (`null`) and `getActionFormTexts` (`undefined`); and rejects the rest.
|
|
366
374
|
*
|
|
367
375
|
* `W` (since 0.1.205; before: the display-only fields `D`) is the write model: `insert`,
|
|
368
|
-
* `update`, `replace` and `remove` are typed by it, every read by `T
|
|
369
|
-
*
|
|
376
|
+
* `update`, `replace` and `remove` are typed by it, every read by `T`. Defaults to
|
|
377
|
+
* `WriteOf<T>` (since 0.1.207; before: `T`): a `@db.view.writable` view's table, else `T` —
|
|
378
|
+
* `ClientLike<typeof TicketRow>` reads through the view and writes `Ticket`.
|
|
370
379
|
*
|
|
371
380
|
* `O` (since 0.1.199) is the per-call options the read / write methods take: an implementation
|
|
372
381
|
* with options of its own declares them as `O`, an interface extending {@link TClientCallOptions}
|
|
@@ -375,7 +384,7 @@ interface TDbQueryTarget<T = AtscriptClientShape> {
|
|
|
375
384
|
* (and `insert`'s `onConflict` / `returning`).
|
|
376
385
|
* @since 0.1.196
|
|
377
386
|
*/
|
|
378
|
-
type ClientLike<T extends AtscriptClientShape = AtscriptClientShape, W extends AtscriptClientShape = T
|
|
387
|
+
type ClientLike<T extends AtscriptClientShape = AtscriptClientShape, W extends AtscriptClientShape = WriteOf<T>, O extends TClientCallOptions = TClientCallOptions> = Pick<Client<T, W, O>, keyof Client<T, W, O>>;
|
|
379
388
|
//#endregion
|
|
380
389
|
//#region src/client-error.d.ts
|
|
381
390
|
/**
|
|
@@ -692,16 +701,6 @@ type SingleInsertOf<T> = [keyof InsertOf<T>] extends [never] ? Record<string, an
|
|
|
692
701
|
} : InsertOf<T>;
|
|
693
702
|
/** The stored row `insert(row, { returning: true })` answers: the `one()` row shape (over the read model `T`). */
|
|
694
703
|
type InsertedRow<T> = Response<T, Record<never, never>>;
|
|
695
|
-
/** A two-level aggregate query: one with `controls.$from`. */
|
|
696
|
-
type NestedShape = {
|
|
697
|
-
controls: {
|
|
698
|
-
$from: object;
|
|
699
|
-
};
|
|
700
|
-
};
|
|
701
|
-
/** The compile-time check an aggregate query must pass: two-level or flat. */
|
|
702
|
-
type AggregateCheck<T, Q> = Q extends NestedShape ? ValidNested<T, Q> : ValidGroupBy<T, Q>;
|
|
703
|
-
/** The rows `aggregate()` answers for query `Q`. */
|
|
704
|
-
type AggregateRows<T, Q extends AggregateQuery<T> | NestedAggregateQuery<T>> = Q extends NestedShape ? NestedAggregateResult<T, Q>[] : Q["controls"]["$select"] extends readonly (string | ComputedExpr)[] ? AggregateResult<T, Q["controls"]["$select"]>[] : Record<string, unknown>[];
|
|
705
704
|
/**
|
|
706
705
|
* HTTP client for moost-db REST endpoints.
|
|
707
706
|
*
|
|
@@ -723,14 +722,16 @@ type AggregateRows<T, Q extends AggregateQuery<T> | NestedAggregateQuery<T>> = Q
|
|
|
723
722
|
* const page = await users.pages({ filter: { active: true } }, 1, 20)
|
|
724
723
|
* ```
|
|
725
724
|
*
|
|
726
|
-
* `W` (since 0.1.205; before: the display-only fields `D`) is the write model
|
|
727
|
-
* `
|
|
728
|
-
*
|
|
729
|
-
*
|
|
730
|
-
*
|
|
725
|
+
* `W` (since 0.1.205; before: the display-only fields `D`) is the write model:
|
|
726
|
+
* `insert`, `update`, `replace` and `remove` are typed by `W`, every read —
|
|
727
|
+
* rows, `$select`, filter, sort, `$groupBy`, `one()`, action ids, the row
|
|
728
|
+
* `insert(…, { returning: true })` answers — by `T`. It defaults to
|
|
729
|
+
* {@link WriteOf}`<T>` (since 0.1.207; before: `T`): a `@db.view.writable`
|
|
730
|
+
* view's table, else `T`. A writable view reads through the view and writes its
|
|
731
|
+
* table with no second argument:
|
|
731
732
|
*
|
|
732
733
|
* ```typescript
|
|
733
|
-
* const tickets = new Client<typeof TicketRow
|
|
734
|
+
* const tickets = new Client<typeof TicketRow>('/api/tickets')
|
|
734
735
|
* const rows = await tickets.query({ controls: { $select: ['title', 'ownerName'] } })
|
|
735
736
|
* await tickets.update({ id: 1, title: 'Renamed' }) // typed by Ticket
|
|
736
737
|
* ```
|
|
@@ -741,7 +742,7 @@ type AggregateRows<T, Q extends AggregateQuery<T> | NestedAggregateQuery<T>> = Q
|
|
|
741
742
|
* `Client` itself reads only `signal` (and `insert`'s `onConflict` /
|
|
742
743
|
* `returning`).
|
|
743
744
|
*/
|
|
744
|
-
declare class Client<T extends AtscriptClientShape = AtscriptClientShape, W extends AtscriptClientShape = T
|
|
745
|
+
declare class Client<T extends AtscriptClientShape = AtscriptClientShape, W extends AtscriptClientShape = WriteOf<T>, O extends TClientCallOptions = TClientCallOptions> {
|
|
745
746
|
private readonly _path;
|
|
746
747
|
private readonly _baseUrl;
|
|
747
748
|
private readonly _fetch;
|
|
@@ -800,8 +801,22 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape, W exte
|
|
|
800
801
|
* - a query with `controls.$from` is a two-level aggregate: `$from` groups the filtered
|
|
801
802
|
* rows, the root controls aggregate its rows and name its columns (its `$groupBy`
|
|
802
803
|
* keys and aliases) — typed by `ValidNested`, rows by `NestedAggregateResult`.
|
|
804
|
+
*
|
|
805
|
+
* Since 0.1.207 the type parameter is the controls (`C`): the `filter` is typed by `T`'s
|
|
806
|
+
* fields — relation predicates (`$some` / `$none` / …) included — so a misspelled filter
|
|
807
|
+
* field fails to compile; a flat query's `$sort` keys must be `$groupBy` keys or `$select`
|
|
808
|
+
* fields / aliases (`ValidAggSort`); `sum` / `avg` of a decimal is typed `string` (the
|
|
809
|
+
* server answers a decimal string). The check and the rows are `@atscript/db`'s
|
|
810
|
+
* `AggregateCheck` / `AggregateRows` (re-exported here). A query built at runtime (a
|
|
811
|
+
* value typed `AggregateQuery`) is passed with a cast (`query as never`).
|
|
803
812
|
*/
|
|
804
|
-
aggregate<const
|
|
813
|
+
aggregate<const C extends AggregateControls<Own<T>> | NestedAggregateControls<Own<T>>>(query: {
|
|
814
|
+
filter?: FilterExpr<Own<T>, Nav<T>>;
|
|
815
|
+
controls: C & AggregateControlsCheck<Own<T>, C>;
|
|
816
|
+
insights?: UniqueryInsights;
|
|
817
|
+
}, opts?: O): Promise<AggregateRows<Own<T>, {
|
|
818
|
+
controls: C;
|
|
819
|
+
}>>;
|
|
805
820
|
/**
|
|
806
821
|
* `GET /pages` — paginated query with typed filter and relations.
|
|
807
822
|
*
|
|
@@ -1141,4 +1156,4 @@ declare function formatIdentifier(id: Record<string, unknown> | undefined, prefe
|
|
|
1141
1156
|
*/
|
|
1142
1157
|
declare function encodeNavigateId(id: Record<string, unknown>, preferredId: readonly string[]): string;
|
|
1143
1158
|
//#endregion
|
|
1144
|
-
export { ReadQuery as $,
|
|
1159
|
+
export { ReadQuery as $, BucketExpr as A, FieldMeta as B, VersionMismatchError as C, MetaStore as Ct, AggregateResult as D, AggregateQuery as E, defaultMetaStore as Et, ClientResponse as F, NavOf as G, IdOf as H, DataOf as I, NestedAggregateResult as J, NestedAggregateControls$1 as K, DbInsert as L, CalendarBucketLabel as M, ClientLike as N, AggregateStage as O, ClientOptions as P, ReadControls as Q, DbPatch as R, TransportError as S, WriteOf as St, AggregateControls$1 as T, clearMetaStore as Tt, InsertOf as U, FilterExpr$1 as V, MetaResponse as W, PageResult as X, OwnOf as Y, PatchOf as Z, ActionTargetError as _, UniqueryInsights$1 as _t, actionIdentifier as a, StageRow as at, ClientError as b, ValidNested as bt, formatIdentifierField as c, TDbInsertIgnoreResult$1 as ct, DbValidationContext as d, TDbInsertResult$1 as dt, RelationInfo as et, ValidatorMode$1 as f, TDbQueryTarget as ft, ActionNotFoundError as g, UniqueryControls as gt, ActionDisabledErrorBody as h, Uniquery$1 as ht, SingleInsertOf as i, ServerError as it, BucketUnit as j, AtscriptClientShape as k, ClientValidator as l, TDbInsertManyIgnoreResult$1 as lt, ActionDisabledError as m, TypedWithRelation as mt, InsertedRow as n, RowOf as nt, encodeNavigateId as o, TClientCallOptions as ot, createClientValidator as p, TDbUpdateResult$1 as pt, NestedAggregateQuery as q, ReadRow as r, SearchIndexInfo as rt, formatIdentifier as s, TDbDeleteResult$1 as st, Client as t, ResponseDataOf as tt, ClientValidatorOptions as u, TDbInsertManyResult$1 as ut, ActionTargetErrorBody as v, ValidAggSort as vt, VersionMismatchErrorBody as w, MetaStoreOptions as wt, ClientValidationError as x, WeekStart as xt, ActionUnsupportedError as y, ValidGroupBy as yt, DbRow as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AggregateControls, AggregateControls as AggregateControls$1, AggregateQuery, AggregateResult, AggregateStage, BucketExpr, BucketUnit, CalendarBucketLabel, FilterExpr, FilterExpr as FilterExpr$1, NestedAggregateControls, NestedAggregateControls as NestedAggregateControls$1, NestedAggregateQuery, NestedAggregateResult, StageRow, TypedWithRelation, Uniquery, Uniquery as Uniquery$1, UniqueryControls, UniqueryInsights, UniqueryInsights as UniqueryInsights$1, ValidAggSort, ValidGroupBy, ValidNested, WeekStart } from "@uniqu/core";
|
|
2
2
|
import { TAtscriptAnnotatedType, TAtscriptTypeObject } from "@atscript/typescript/utils";
|
|
3
|
+
import { AggregateControlsCheck, AggregateRows, DbInsert, DbPatch, DbResponse, DbRow, TDbActionInfo, TDbActionTargetSummary, TDbAvailableActions, TDbDeleteResult, TDbDeleteResult as TDbDeleteResult$1, TDbInsertIgnoreResult, TDbInsertIgnoreResult as TDbInsertIgnoreResult$1, TDbInsertManyIgnoreResult, TDbInsertManyIgnoreResult as TDbInsertManyIgnoreResult$1, TDbInsertManyResult, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult, TDbUpdateResult as TDbUpdateResult$1, TDbVersion, TFieldMeta, TMetaResponse, TRelationInfo, TSearchIndexInfo } from "@atscript/db";
|
|
3
4
|
import { DbValidationContext, ValidatorMode, ValidatorMode as ValidatorMode$1 } from "@atscript/db/validator";
|
|
4
|
-
import { DbInsert, DbPatch, DbResponse, DbRow, TDbActionInfo, TDbActionTargetSummary, TDbAvailableActions, TDbDeleteResult, TDbDeleteResult as TDbDeleteResult$1, TDbInsertIgnoreResult, TDbInsertIgnoreResult as TDbInsertIgnoreResult$1, TDbInsertManyIgnoreResult, TDbInsertManyIgnoreResult as TDbInsertManyIgnoreResult$1, TDbInsertManyResult, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult, TDbUpdateResult as TDbUpdateResult$1, TDbVersion, TFieldMeta, TMetaResponse, TRelationInfo, TSearchIndexInfo } from "@atscript/db";
|
|
5
5
|
|
|
6
6
|
//#region src/meta-store.d.ts
|
|
7
7
|
/** Options for {@link MetaStore}. */
|
|
@@ -307,6 +307,14 @@ type NavOf<T> = T extends {
|
|
|
307
307
|
type IdOf<T> = T extends {
|
|
308
308
|
__pk: infer PK;
|
|
309
309
|
} ? PK : unknown;
|
|
310
|
+
/**
|
|
311
|
+
* The write model of `T`: a `@db.view.writable` view's table (the type-only
|
|
312
|
+
* `static __write` the atscript 0.2.30+ d.ts declares on such a view), else `T`
|
|
313
|
+
* itself. `Client` / `ClientLike` default their `W` to it (since 0.1.207).
|
|
314
|
+
*/
|
|
315
|
+
type WriteOf<T> = T extends {
|
|
316
|
+
__write: infer W extends AtscriptClientShape;
|
|
317
|
+
} ? W : T;
|
|
310
318
|
/**
|
|
311
319
|
* Narrow a read-method response type by the literal `$with` array in the
|
|
312
320
|
* query, mirroring the backend's `DbResponse<Data, Nav, Q>` algebra. Nav
|
|
@@ -365,8 +373,9 @@ interface TDbQueryTarget<T = AtscriptClientShape> {
|
|
|
365
373
|
* `getActionForm` (`null`) and `getActionFormTexts` (`undefined`); and rejects the rest.
|
|
366
374
|
*
|
|
367
375
|
* `W` (since 0.1.205; before: the display-only fields `D`) is the write model: `insert`,
|
|
368
|
-
* `update`, `replace` and `remove` are typed by it, every read by `T
|
|
369
|
-
*
|
|
376
|
+
* `update`, `replace` and `remove` are typed by it, every read by `T`. Defaults to
|
|
377
|
+
* `WriteOf<T>` (since 0.1.207; before: `T`): a `@db.view.writable` view's table, else `T` —
|
|
378
|
+
* `ClientLike<typeof TicketRow>` reads through the view and writes `Ticket`.
|
|
370
379
|
*
|
|
371
380
|
* `O` (since 0.1.199) is the per-call options the read / write methods take: an implementation
|
|
372
381
|
* with options of its own declares them as `O`, an interface extending {@link TClientCallOptions}
|
|
@@ -375,7 +384,7 @@ interface TDbQueryTarget<T = AtscriptClientShape> {
|
|
|
375
384
|
* (and `insert`'s `onConflict` / `returning`).
|
|
376
385
|
* @since 0.1.196
|
|
377
386
|
*/
|
|
378
|
-
type ClientLike<T extends AtscriptClientShape = AtscriptClientShape, W extends AtscriptClientShape = T
|
|
387
|
+
type ClientLike<T extends AtscriptClientShape = AtscriptClientShape, W extends AtscriptClientShape = WriteOf<T>, O extends TClientCallOptions = TClientCallOptions> = Pick<Client<T, W, O>, keyof Client<T, W, O>>;
|
|
379
388
|
//#endregion
|
|
380
389
|
//#region src/client-error.d.ts
|
|
381
390
|
/**
|
|
@@ -692,16 +701,6 @@ type SingleInsertOf<T> = [keyof InsertOf<T>] extends [never] ? Record<string, an
|
|
|
692
701
|
} : InsertOf<T>;
|
|
693
702
|
/** The stored row `insert(row, { returning: true })` answers: the `one()` row shape (over the read model `T`). */
|
|
694
703
|
type InsertedRow<T> = Response<T, Record<never, never>>;
|
|
695
|
-
/** A two-level aggregate query: one with `controls.$from`. */
|
|
696
|
-
type NestedShape = {
|
|
697
|
-
controls: {
|
|
698
|
-
$from: object;
|
|
699
|
-
};
|
|
700
|
-
};
|
|
701
|
-
/** The compile-time check an aggregate query must pass: two-level or flat. */
|
|
702
|
-
type AggregateCheck<T, Q> = Q extends NestedShape ? ValidNested<T, Q> : ValidGroupBy<T, Q>;
|
|
703
|
-
/** The rows `aggregate()` answers for query `Q`. */
|
|
704
|
-
type AggregateRows<T, Q extends AggregateQuery<T> | NestedAggregateQuery<T>> = Q extends NestedShape ? NestedAggregateResult<T, Q>[] : Q["controls"]["$select"] extends readonly (string | ComputedExpr)[] ? AggregateResult<T, Q["controls"]["$select"]>[] : Record<string, unknown>[];
|
|
705
704
|
/**
|
|
706
705
|
* HTTP client for moost-db REST endpoints.
|
|
707
706
|
*
|
|
@@ -723,14 +722,16 @@ type AggregateRows<T, Q extends AggregateQuery<T> | NestedAggregateQuery<T>> = Q
|
|
|
723
722
|
* const page = await users.pages({ filter: { active: true } }, 1, 20)
|
|
724
723
|
* ```
|
|
725
724
|
*
|
|
726
|
-
* `W` (since 0.1.205; before: the display-only fields `D`) is the write model
|
|
727
|
-
* `
|
|
728
|
-
*
|
|
729
|
-
*
|
|
730
|
-
*
|
|
725
|
+
* `W` (since 0.1.205; before: the display-only fields `D`) is the write model:
|
|
726
|
+
* `insert`, `update`, `replace` and `remove` are typed by `W`, every read —
|
|
727
|
+
* rows, `$select`, filter, sort, `$groupBy`, `one()`, action ids, the row
|
|
728
|
+
* `insert(…, { returning: true })` answers — by `T`. It defaults to
|
|
729
|
+
* {@link WriteOf}`<T>` (since 0.1.207; before: `T`): a `@db.view.writable`
|
|
730
|
+
* view's table, else `T`. A writable view reads through the view and writes its
|
|
731
|
+
* table with no second argument:
|
|
731
732
|
*
|
|
732
733
|
* ```typescript
|
|
733
|
-
* const tickets = new Client<typeof TicketRow
|
|
734
|
+
* const tickets = new Client<typeof TicketRow>('/api/tickets')
|
|
734
735
|
* const rows = await tickets.query({ controls: { $select: ['title', 'ownerName'] } })
|
|
735
736
|
* await tickets.update({ id: 1, title: 'Renamed' }) // typed by Ticket
|
|
736
737
|
* ```
|
|
@@ -741,7 +742,7 @@ type AggregateRows<T, Q extends AggregateQuery<T> | NestedAggregateQuery<T>> = Q
|
|
|
741
742
|
* `Client` itself reads only `signal` (and `insert`'s `onConflict` /
|
|
742
743
|
* `returning`).
|
|
743
744
|
*/
|
|
744
|
-
declare class Client<T extends AtscriptClientShape = AtscriptClientShape, W extends AtscriptClientShape = T
|
|
745
|
+
declare class Client<T extends AtscriptClientShape = AtscriptClientShape, W extends AtscriptClientShape = WriteOf<T>, O extends TClientCallOptions = TClientCallOptions> {
|
|
745
746
|
private readonly _path;
|
|
746
747
|
private readonly _baseUrl;
|
|
747
748
|
private readonly _fetch;
|
|
@@ -800,8 +801,22 @@ declare class Client<T extends AtscriptClientShape = AtscriptClientShape, W exte
|
|
|
800
801
|
* - a query with `controls.$from` is a two-level aggregate: `$from` groups the filtered
|
|
801
802
|
* rows, the root controls aggregate its rows and name its columns (its `$groupBy`
|
|
802
803
|
* keys and aliases) — typed by `ValidNested`, rows by `NestedAggregateResult`.
|
|
804
|
+
*
|
|
805
|
+
* Since 0.1.207 the type parameter is the controls (`C`): the `filter` is typed by `T`'s
|
|
806
|
+
* fields — relation predicates (`$some` / `$none` / …) included — so a misspelled filter
|
|
807
|
+
* field fails to compile; a flat query's `$sort` keys must be `$groupBy` keys or `$select`
|
|
808
|
+
* fields / aliases (`ValidAggSort`); `sum` / `avg` of a decimal is typed `string` (the
|
|
809
|
+
* server answers a decimal string). The check and the rows are `@atscript/db`'s
|
|
810
|
+
* `AggregateCheck` / `AggregateRows` (re-exported here). A query built at runtime (a
|
|
811
|
+
* value typed `AggregateQuery`) is passed with a cast (`query as never`).
|
|
803
812
|
*/
|
|
804
|
-
aggregate<const
|
|
813
|
+
aggregate<const C extends AggregateControls<Own<T>> | NestedAggregateControls<Own<T>>>(query: {
|
|
814
|
+
filter?: FilterExpr<Own<T>, Nav<T>>;
|
|
815
|
+
controls: C & AggregateControlsCheck<Own<T>, C>;
|
|
816
|
+
insights?: UniqueryInsights;
|
|
817
|
+
}, opts?: O): Promise<AggregateRows<Own<T>, {
|
|
818
|
+
controls: C;
|
|
819
|
+
}>>;
|
|
805
820
|
/**
|
|
806
821
|
* `GET /pages` — paginated query with typed filter and relations.
|
|
807
822
|
*
|
|
@@ -1141,4 +1156,4 @@ declare function formatIdentifier(id: Record<string, unknown> | undefined, prefe
|
|
|
1141
1156
|
*/
|
|
1142
1157
|
declare function encodeNavigateId(id: Record<string, unknown>, preferredId: readonly string[]): string;
|
|
1143
1158
|
//#endregion
|
|
1144
|
-
export { ReadQuery as $,
|
|
1159
|
+
export { ReadQuery as $, BucketExpr as A, FieldMeta as B, VersionMismatchError as C, MetaStore as Ct, AggregateResult as D, AggregateQuery as E, defaultMetaStore as Et, ClientResponse as F, NavOf as G, IdOf as H, DataOf as I, NestedAggregateResult as J, NestedAggregateControls$1 as K, DbInsert as L, CalendarBucketLabel as M, ClientLike as N, AggregateStage as O, ClientOptions as P, ReadControls as Q, DbPatch as R, TransportError as S, WriteOf as St, AggregateControls$1 as T, clearMetaStore as Tt, InsertOf as U, FilterExpr$1 as V, MetaResponse as W, PageResult as X, OwnOf as Y, PatchOf as Z, ActionTargetError as _, UniqueryInsights$1 as _t, actionIdentifier as a, StageRow as at, ClientError as b, ValidNested as bt, formatIdentifierField as c, TDbInsertIgnoreResult$1 as ct, DbValidationContext as d, TDbInsertResult$1 as dt, RelationInfo as et, ValidatorMode$1 as f, TDbQueryTarget as ft, ActionNotFoundError as g, UniqueryControls as gt, ActionDisabledErrorBody as h, Uniquery$1 as ht, SingleInsertOf as i, ServerError as it, BucketUnit as j, AtscriptClientShape as k, ClientValidator as l, TDbInsertManyIgnoreResult$1 as lt, ActionDisabledError as m, TypedWithRelation as mt, InsertedRow as n, RowOf as nt, encodeNavigateId as o, TClientCallOptions as ot, createClientValidator as p, TDbUpdateResult$1 as pt, NestedAggregateQuery as q, ReadRow as r, SearchIndexInfo as rt, formatIdentifier as s, TDbDeleteResult$1 as st, Client as t, ResponseDataOf as tt, ClientValidatorOptions as u, TDbInsertManyResult$1 as ut, ActionTargetErrorBody as v, ValidAggSort as vt, VersionMismatchErrorBody as w, MetaStoreOptions as wt, ClientValidationError as x, WeekStart as xt, ActionUnsupportedError as y, ValidGroupBy as yt, DbRow as z };
|
package/dist/index.cjs
CHANGED
|
@@ -151,14 +151,16 @@ function clearMetaStore() {
|
|
|
151
151
|
* const page = await users.pages({ filter: { active: true } }, 1, 20)
|
|
152
152
|
* ```
|
|
153
153
|
*
|
|
154
|
-
* `W` (since 0.1.205; before: the display-only fields `D`) is the write model
|
|
155
|
-
* `
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
154
|
+
* `W` (since 0.1.205; before: the display-only fields `D`) is the write model:
|
|
155
|
+
* `insert`, `update`, `replace` and `remove` are typed by `W`, every read —
|
|
156
|
+
* rows, `$select`, filter, sort, `$groupBy`, `one()`, action ids, the row
|
|
157
|
+
* `insert(…, { returning: true })` answers — by `T`. It defaults to
|
|
158
|
+
* {@link WriteOf}`<T>` (since 0.1.207; before: `T`): a `@db.view.writable`
|
|
159
|
+
* view's table, else `T`. A writable view reads through the view and writes its
|
|
160
|
+
* table with no second argument:
|
|
159
161
|
*
|
|
160
162
|
* ```typescript
|
|
161
|
-
* const tickets = new Client<typeof TicketRow
|
|
163
|
+
* const tickets = new Client<typeof TicketRow>('/api/tickets')
|
|
162
164
|
* const rows = await tickets.query({ controls: { $select: ['title', 'ownerName'] } })
|
|
163
165
|
* await tickets.update({ id: 1, title: 'Renamed' }) // typed by Ticket
|
|
164
166
|
* ```
|
|
@@ -243,6 +245,14 @@ var Client = class {
|
|
|
243
245
|
* - a query with `controls.$from` is a two-level aggregate: `$from` groups the filtered
|
|
244
246
|
* rows, the root controls aggregate its rows and name its columns (its `$groupBy`
|
|
245
247
|
* keys and aliases) — typed by `ValidNested`, rows by `NestedAggregateResult`.
|
|
248
|
+
*
|
|
249
|
+
* Since 0.1.207 the type parameter is the controls (`C`): the `filter` is typed by `T`'s
|
|
250
|
+
* fields — relation predicates (`$some` / `$none` / …) included — so a misspelled filter
|
|
251
|
+
* field fails to compile; a flat query's `$sort` keys must be `$groupBy` keys or `$select`
|
|
252
|
+
* fields / aliases (`ValidAggSort`); `sum` / `avg` of a decimal is typed `string` (the
|
|
253
|
+
* server answers a decimal string). The check and the rows are `@atscript/db`'s
|
|
254
|
+
* `AggregateCheck` / `AggregateRows` (re-exported here). A query built at runtime (a
|
|
255
|
+
* value typed `AggregateQuery`) is passed with a cast (`query as never`).
|
|
246
256
|
*/
|
|
247
257
|
async aggregate(query, opts) {
|
|
248
258
|
return this._get("query", query, opts?.signal);
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as ReadQuery, A as
|
|
1
|
+
import { $ as ReadQuery, A as BucketExpr, B as FieldMeta, C as VersionMismatchError, Ct as MetaStore, D as AggregateResult, E as AggregateQuery, Et as defaultMetaStore, F as ClientResponse, G as NavOf, H as IdOf, I as DataOf, J as NestedAggregateResult, K as NestedAggregateControls, L as DbInsert, M as CalendarBucketLabel, N as ClientLike, O as AggregateStage, P as ClientOptions, Q as ReadControls, R as DbPatch, S as TransportError, St as WriteOf, T as AggregateControls, Tt as clearMetaStore, U as InsertOf, V as FilterExpr, W as MetaResponse, X as PageResult, Y as OwnOf, Z as PatchOf, _ as ActionTargetError, _t as UniqueryInsights, a as actionIdentifier, at as StageRow, b as ClientError, bt as ValidNested, c as formatIdentifierField, ct as TDbInsertIgnoreResult, dt as TDbInsertResult, et as RelationInfo, f as ValidatorMode, ft as TDbQueryTarget, g as ActionNotFoundError, gt as UniqueryControls, h as ActionDisabledErrorBody, ht as Uniquery, i as SingleInsertOf, it as ServerError, j as BucketUnit, k as AtscriptClientShape, l as ClientValidator, lt as TDbInsertManyIgnoreResult, m as ActionDisabledError, mt as TypedWithRelation, n as InsertedRow, nt as RowOf, o as encodeNavigateId, ot as TClientCallOptions, pt as TDbUpdateResult, q as NestedAggregateQuery, r as ReadRow, rt as SearchIndexInfo, s as formatIdentifier, st as TDbDeleteResult, t as Client, tt as ResponseDataOf, u as ClientValidatorOptions, ut as TDbInsertManyResult, v as ActionTargetErrorBody, vt as ValidAggSort, w as VersionMismatchErrorBody, wt as MetaStoreOptions, x as ClientValidationError, xt as WeekStart, y as ActionUnsupportedError, yt as ValidGroupBy, z as DbRow } from "./client-GVIGbuz_.cjs";
|
|
2
2
|
import { BucketSeriesOptions, NextBucketOptions, bucketSeries, bucketStartInstant, nextBucketLabel } from "@uniqu/core";
|
|
3
3
|
import { TSerializedAnnotatedType } from "@atscript/typescript/utils";
|
|
4
|
-
import { TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionIntent, TDbActionLevel, TDbActionProcessor, TDbActionTargetSummary, TDbAvailableActions } from "@atscript/db";
|
|
5
|
-
export { ActionDisabledError, type ActionDisabledErrorBody, ActionNotFoundError, ActionTargetError, type ActionTargetErrorBody, ActionUnsupportedError, type AggregateCheck, type AggregateQuery, type AggregateResult, type AggregateRows, type AggregateStage, type AtscriptClientShape, type BucketExpr, type BucketSeriesOptions, type BucketUnit, type CalendarBucketLabel, Client, ClientError, type ClientLike, type ClientOptions, type ClientResponse, ClientValidationError, type ClientValidator, type ClientValidatorOptions, type DataOf, type DbInsert, type DbPatch, type DbRow, type FieldMeta, type FilterExpr, type IdOf, type InsertOf, type InsertedRow, type MetaResponse, MetaStore, type MetaStoreOptions, type NavOf, type NestedAggregateQuery, type NestedAggregateResult, type NextBucketOptions, type OwnOf, type PageResult, type PatchOf, type ReadControls, type ReadQuery, type ReadRow, type RelationInfo, type ResponseDataOf, type RowOf, type SearchIndexInfo, type ServerError, type SingleInsertOf, type StageRow, type TClientCallOptions, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbDeleteResult, type TDbInsertIgnoreResult, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbQueryTarget, type TDbUpdateResult, type TSerializedAnnotatedType, TransportError, type TypedWithRelation, type Uniquery, type UniqueryControls, type ValidGroupBy, type ValidNested, type ValidatorMode, VersionMismatchError, type VersionMismatchErrorBody, type WeekStart, actionIdentifier, bucketSeries, bucketStartInstant, clearMetaStore, defaultMetaStore, encodeNavigateId, formatIdentifier, formatIdentifierField, nextBucketLabel };
|
|
4
|
+
import { AggregateCheck, AggregateControlsCheck, AggregateRows, TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionIntent, TDbActionLevel, TDbActionProcessor, TDbActionTargetSummary, TDbAvailableActions } from "@atscript/db";
|
|
5
|
+
export { ActionDisabledError, type ActionDisabledErrorBody, ActionNotFoundError, ActionTargetError, type ActionTargetErrorBody, ActionUnsupportedError, type AggregateCheck, type AggregateControls, type AggregateControlsCheck, type AggregateQuery, type AggregateResult, type AggregateRows, type AggregateStage, type AtscriptClientShape, type BucketExpr, type BucketSeriesOptions, type BucketUnit, type CalendarBucketLabel, Client, ClientError, type ClientLike, type ClientOptions, type ClientResponse, ClientValidationError, type ClientValidator, type ClientValidatorOptions, type DataOf, type DbInsert, type DbPatch, type DbRow, type FieldMeta, type FilterExpr, type IdOf, type InsertOf, type InsertedRow, type MetaResponse, MetaStore, type MetaStoreOptions, type NavOf, type NestedAggregateControls, type NestedAggregateQuery, type NestedAggregateResult, type NextBucketOptions, type OwnOf, type PageResult, type PatchOf, type ReadControls, type ReadQuery, type ReadRow, type RelationInfo, type ResponseDataOf, type RowOf, type SearchIndexInfo, type ServerError, type SingleInsertOf, type StageRow, type TClientCallOptions, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbDeleteResult, type TDbInsertIgnoreResult, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbQueryTarget, type TDbUpdateResult, type TSerializedAnnotatedType, TransportError, type TypedWithRelation, type Uniquery, type UniqueryControls, type UniqueryInsights, type ValidAggSort, type ValidGroupBy, type ValidNested, type ValidatorMode, VersionMismatchError, type VersionMismatchErrorBody, type WeekStart, type WriteOf, actionIdentifier, bucketSeries, bucketStartInstant, clearMetaStore, defaultMetaStore, encodeNavigateId, formatIdentifier, formatIdentifierField, nextBucketLabel };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as ReadQuery, A as
|
|
1
|
+
import { $ as ReadQuery, A as BucketExpr, B as FieldMeta, C as VersionMismatchError, Ct as MetaStore, D as AggregateResult, E as AggregateQuery, Et as defaultMetaStore, F as ClientResponse, G as NavOf, H as IdOf, I as DataOf, J as NestedAggregateResult, K as NestedAggregateControls, L as DbInsert, M as CalendarBucketLabel, N as ClientLike, O as AggregateStage, P as ClientOptions, Q as ReadControls, R as DbPatch, S as TransportError, St as WriteOf, T as AggregateControls, Tt as clearMetaStore, U as InsertOf, V as FilterExpr, W as MetaResponse, X as PageResult, Y as OwnOf, Z as PatchOf, _ as ActionTargetError, _t as UniqueryInsights, a as actionIdentifier, at as StageRow, b as ClientError, bt as ValidNested, c as formatIdentifierField, ct as TDbInsertIgnoreResult, dt as TDbInsertResult, et as RelationInfo, f as ValidatorMode, ft as TDbQueryTarget, g as ActionNotFoundError, gt as UniqueryControls, h as ActionDisabledErrorBody, ht as Uniquery, i as SingleInsertOf, it as ServerError, j as BucketUnit, k as AtscriptClientShape, l as ClientValidator, lt as TDbInsertManyIgnoreResult, m as ActionDisabledError, mt as TypedWithRelation, n as InsertedRow, nt as RowOf, o as encodeNavigateId, ot as TClientCallOptions, pt as TDbUpdateResult, q as NestedAggregateQuery, r as ReadRow, rt as SearchIndexInfo, s as formatIdentifier, st as TDbDeleteResult, t as Client, tt as ResponseDataOf, u as ClientValidatorOptions, ut as TDbInsertManyResult, v as ActionTargetErrorBody, vt as ValidAggSort, w as VersionMismatchErrorBody, wt as MetaStoreOptions, x as ClientValidationError, xt as WeekStart, y as ActionUnsupportedError, yt as ValidGroupBy, z as DbRow } from "./client-BnqkM3eZ.mjs";
|
|
2
2
|
import { BucketSeriesOptions, NextBucketOptions, bucketSeries, bucketStartInstant, nextBucketLabel } from "@uniqu/core";
|
|
3
3
|
import { TSerializedAnnotatedType } from "@atscript/typescript/utils";
|
|
4
|
-
import { TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionIntent, TDbActionLevel, TDbActionProcessor, TDbActionTargetSummary, TDbAvailableActions } from "@atscript/db";
|
|
5
|
-
export { ActionDisabledError, type ActionDisabledErrorBody, ActionNotFoundError, ActionTargetError, type ActionTargetErrorBody, ActionUnsupportedError, type AggregateCheck, type AggregateQuery, type AggregateResult, type AggregateRows, type AggregateStage, type AtscriptClientShape, type BucketExpr, type BucketSeriesOptions, type BucketUnit, type CalendarBucketLabel, Client, ClientError, type ClientLike, type ClientOptions, type ClientResponse, ClientValidationError, type ClientValidator, type ClientValidatorOptions, type DataOf, type DbInsert, type DbPatch, type DbRow, type FieldMeta, type FilterExpr, type IdOf, type InsertOf, type InsertedRow, type MetaResponse, MetaStore, type MetaStoreOptions, type NavOf, type NestedAggregateQuery, type NestedAggregateResult, type NextBucketOptions, type OwnOf, type PageResult, type PatchOf, type ReadControls, type ReadQuery, type ReadRow, type RelationInfo, type ResponseDataOf, type RowOf, type SearchIndexInfo, type ServerError, type SingleInsertOf, type StageRow, type TClientCallOptions, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbDeleteResult, type TDbInsertIgnoreResult, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbQueryTarget, type TDbUpdateResult, type TSerializedAnnotatedType, TransportError, type TypedWithRelation, type Uniquery, type UniqueryControls, type ValidGroupBy, type ValidNested, type ValidatorMode, VersionMismatchError, type VersionMismatchErrorBody, type WeekStart, actionIdentifier, bucketSeries, bucketStartInstant, clearMetaStore, defaultMetaStore, encodeNavigateId, formatIdentifier, formatIdentifierField, nextBucketLabel };
|
|
4
|
+
import { AggregateCheck, AggregateControlsCheck, AggregateRows, TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionIntent, TDbActionLevel, TDbActionProcessor, TDbActionTargetSummary, TDbAvailableActions } from "@atscript/db";
|
|
5
|
+
export { ActionDisabledError, type ActionDisabledErrorBody, ActionNotFoundError, ActionTargetError, type ActionTargetErrorBody, ActionUnsupportedError, type AggregateCheck, type AggregateControls, type AggregateControlsCheck, type AggregateQuery, type AggregateResult, type AggregateRows, type AggregateStage, type AtscriptClientShape, type BucketExpr, type BucketSeriesOptions, type BucketUnit, type CalendarBucketLabel, Client, ClientError, type ClientLike, type ClientOptions, type ClientResponse, ClientValidationError, type ClientValidator, type ClientValidatorOptions, type DataOf, type DbInsert, type DbPatch, type DbRow, type FieldMeta, type FilterExpr, type IdOf, type InsertOf, type InsertedRow, type MetaResponse, MetaStore, type MetaStoreOptions, type NavOf, type NestedAggregateControls, type NestedAggregateQuery, type NestedAggregateResult, type NextBucketOptions, type OwnOf, type PageResult, type PatchOf, type ReadControls, type ReadQuery, type ReadRow, type RelationInfo, type ResponseDataOf, type RowOf, type SearchIndexInfo, type ServerError, type SingleInsertOf, type StageRow, type TClientCallOptions, type TCrudOp, type TCrudPermissions, type TDbActionInfo, type TDbActionIntent, type TDbActionLevel, type TDbActionProcessor, type TDbActionTargetSummary, type TDbAvailableActions, type TDbDeleteResult, type TDbInsertIgnoreResult, type TDbInsertManyIgnoreResult, type TDbInsertManyResult, type TDbInsertResult, type TDbQueryTarget, type TDbUpdateResult, type TSerializedAnnotatedType, TransportError, type TypedWithRelation, type Uniquery, type UniqueryControls, type UniqueryInsights, type ValidAggSort, type ValidGroupBy, type ValidNested, type ValidatorMode, VersionMismatchError, type VersionMismatchErrorBody, type WeekStart, type WriteOf, actionIdentifier, bucketSeries, bucketStartInstant, clearMetaStore, defaultMetaStore, encodeNavigateId, formatIdentifier, formatIdentifierField, nextBucketLabel };
|
package/dist/index.mjs
CHANGED
|
@@ -150,14 +150,16 @@ function clearMetaStore() {
|
|
|
150
150
|
* const page = await users.pages({ filter: { active: true } }, 1, 20)
|
|
151
151
|
* ```
|
|
152
152
|
*
|
|
153
|
-
* `W` (since 0.1.205; before: the display-only fields `D`) is the write model
|
|
154
|
-
* `
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
153
|
+
* `W` (since 0.1.205; before: the display-only fields `D`) is the write model:
|
|
154
|
+
* `insert`, `update`, `replace` and `remove` are typed by `W`, every read —
|
|
155
|
+
* rows, `$select`, filter, sort, `$groupBy`, `one()`, action ids, the row
|
|
156
|
+
* `insert(…, { returning: true })` answers — by `T`. It defaults to
|
|
157
|
+
* {@link WriteOf}`<T>` (since 0.1.207; before: `T`): a `@db.view.writable`
|
|
158
|
+
* view's table, else `T`. A writable view reads through the view and writes its
|
|
159
|
+
* table with no second argument:
|
|
158
160
|
*
|
|
159
161
|
* ```typescript
|
|
160
|
-
* const tickets = new Client<typeof TicketRow
|
|
162
|
+
* const tickets = new Client<typeof TicketRow>('/api/tickets')
|
|
161
163
|
* const rows = await tickets.query({ controls: { $select: ['title', 'ownerName'] } })
|
|
162
164
|
* await tickets.update({ id: 1, title: 'Renamed' }) // typed by Ticket
|
|
163
165
|
* ```
|
|
@@ -242,6 +244,14 @@ var Client = class {
|
|
|
242
244
|
* - a query with `controls.$from` is a two-level aggregate: `$from` groups the filtered
|
|
243
245
|
* rows, the root controls aggregate its rows and name its columns (its `$groupBy`
|
|
244
246
|
* keys and aliases) — typed by `ValidNested`, rows by `NestedAggregateResult`.
|
|
247
|
+
*
|
|
248
|
+
* Since 0.1.207 the type parameter is the controls (`C`): the `filter` is typed by `T`'s
|
|
249
|
+
* fields — relation predicates (`$some` / `$none` / …) included — so a misspelled filter
|
|
250
|
+
* field fails to compile; a flat query's `$sort` keys must be `$groupBy` keys or `$select`
|
|
251
|
+
* fields / aliases (`ValidAggSort`); `sum` / `avg` of a decimal is typed `string` (the
|
|
252
|
+
* server answers a decimal string). The check and the rows are `@atscript/db`'s
|
|
253
|
+
* `AggregateCheck` / `AggregateRows` (re-exported here). A query built at runtime (a
|
|
254
|
+
* value typed `AggregateQuery`) is passed with a cast (`query as never`).
|
|
245
255
|
*/
|
|
246
256
|
async aggregate(query, opts) {
|
|
247
257
|
return this._get("query", query, opts?.signal);
|
package/dist/validator.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as DbValidationContext, f as ValidatorMode, l as ClientValidator, p as createClientValidator, u as ClientValidatorOptions, x as ClientValidationError } from "./client-GVIGbuz_.cjs";
|
|
2
2
|
export { ClientValidationError, ClientValidator, ClientValidatorOptions, type DbValidationContext, type ValidatorMode, createClientValidator };
|
package/dist/validator.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as DbValidationContext, f as ValidatorMode, l as ClientValidator, p as createClientValidator, u as ClientValidatorOptions, x as ClientValidationError } from "./client-BnqkM3eZ.mjs";
|
|
2
2
|
export { ClientValidationError, ClientValidator, ClientValidatorOptions, type DbValidationContext, type ValidatorMode, createClientValidator };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/db-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.207",
|
|
4
4
|
"description": "Browser-compatible HTTP client for @atscript/moost-db REST endpoints.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -43,18 +43,18 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@uniqu/core": "^0.2.
|
|
47
|
-
"@uniqu/url": "^0.2.
|
|
46
|
+
"@uniqu/core": "^0.2.3",
|
|
47
|
+
"@uniqu/url": "^0.2.3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@atscript/core": "^0.2.
|
|
51
|
-
"@atscript/typescript": "^0.2.
|
|
52
|
-
"unplugin-atscript": "^0.2.
|
|
53
|
-
"@atscript/db": "0.1.
|
|
50
|
+
"@atscript/core": "^0.2.30",
|
|
51
|
+
"@atscript/typescript": "^0.2.30",
|
|
52
|
+
"unplugin-atscript": "^0.2.30",
|
|
53
|
+
"@atscript/db": "0.1.207"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atscript/typescript": "^0.2.
|
|
57
|
-
"@atscript/db": "^0.1.
|
|
56
|
+
"@atscript/typescript": "^0.2.30",
|
|
57
|
+
"@atscript/db": "^0.1.207"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "vp pack",
|