@atscript/db-client 0.1.174 → 0.1.175

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/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as TDbInsertManyResult, A as DecoratedControls, B as OwnOf, C as CalendarBucketLabel, D as DbInsert, E as DataOf, F as InsertOf, G as RowOf, H as PatchOf, I as MetaResponse, J as StageRow, K as SearchIndexInfo, L as NavOf, M as FieldMeta, N as FilterExpr, O as DbPatch, P as IdOf, Q as TDbInsertManyIgnoreResult, R as NestedAggregateQuery, S as BucketUnit, T as ClientResponse, U as RelationInfo, V as PageResult, W as ResponseDataOf, X as TDbDeleteResult, Y as TClientCallOptions, Z as TDbInsertIgnoreResult, _ as AggregateQuery, at as UniqueryControls, b as AtscriptClientShape, c as ActionNotFoundError, ct as WeekStart, d as ActionUnsupportedError, dt as clearMetaStore, et as TDbInsertResult, f as ClientError, ft as defaultMetaStore, g as VersionMismatchErrorBody, h as VersionMismatchError, i as ValidatorMode, it as Uniquery, j as DecoratedQuery, k as DbRow, l as ActionTargetError, lt as MetaStore, m as TransportError, n as ClientValidatorOptions, nt as TDbUpdateResult, o as ActionDisabledError, ot as ValidGroupBy, p as ClientValidationError, q as ServerError, rt as TypedWithRelation, s as ActionDisabledErrorBody, st as ValidNested, t as ClientValidator, tt as TDbQueryTarget, u as ActionTargetErrorBody, ut as MetaStoreOptions, v as AggregateResult, w as ClientOptions, x as BucketExpr, y as AggregateStage, z as NestedAggregateResult } from "./validator-CW__tbcp.cjs";
1
+ import { $ as TDbInsertManyResult, A as DecoratedControls, B as OwnOf, C as CalendarBucketLabel, D as DbInsert, E as DataOf, F as InsertOf, G as RowOf, H as PatchOf, I as MetaResponse, J as StageRow, K as SearchIndexInfo, L as NavOf, M as FieldMeta, N as FilterExpr, O as DbPatch, P as IdOf, Q as TDbInsertManyIgnoreResult, R as NestedAggregateQuery, S as BucketUnit, T as ClientResponse, U as RelationInfo, V as PageResult, W as ResponseDataOf, X as TDbDeleteResult, Y as TClientCallOptions, Z as TDbInsertIgnoreResult, _ as AggregateQuery, at as UniqueryControls, b as AtscriptClientShape, c as ActionNotFoundError, ct as WeekStart, d as ActionUnsupportedError, dt as clearMetaStore, et as TDbInsertResult, f as ClientError, ft as defaultMetaStore, g as VersionMismatchErrorBody, h as VersionMismatchError, i as ValidatorMode, it as Uniquery, j as DecoratedQuery, k as DbRow, l as ActionTargetError, lt as MetaStore, m as TransportError, n as ClientValidatorOptions, nt as TDbUpdateResult, o as ActionDisabledError, ot as ValidGroupBy, p as ClientValidationError, q as ServerError, rt as TypedWithRelation, s as ActionDisabledErrorBody, st as ValidNested, t as ClientValidator, tt as TDbQueryTarget, u as ActionTargetErrorBody, ut as MetaStoreOptions, v as AggregateResult, w as ClientOptions, x as BucketExpr, y as AggregateStage, z as NestedAggregateResult } from "./validator-D9QYeBWO.cjs";
2
2
  import { AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, BucketSeriesOptions, ComputedExpr, NestedAggregateQuery as NestedAggregateQuery$1, NestedAggregateResult as NestedAggregateResult$1, NextBucketOptions, Uniquery as Uniquery$1, ValidGroupBy as ValidGroupBy$1, ValidNested as ValidNested$1, bucketSeries, bucketStartInstant, nextBucketLabel } from "@uniqu/core";
3
3
  import { TAtscriptAnnotatedType, TSerializedAnnotatedType } from "@atscript/typescript/utils";
4
4
  import { TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor, TDbActionTargetSummary, TDbActionTargetSummary as TDbActionTargetSummary$1, TDbAvailableActions, TDbAvailableActions as TDbAvailableActions$1, TDbDeleteResult as TDbDeleteResult$1, TDbInsertIgnoreResult as TDbInsertIgnoreResult$1, TDbInsertManyIgnoreResult as TDbInsertManyIgnoreResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1 } from "@atscript/db";
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as TDbInsertManyResult, A as DecoratedControls, B as OwnOf, C as CalendarBucketLabel, D as DbInsert, E as DataOf, F as InsertOf, G as RowOf, H as PatchOf, I as MetaResponse, J as StageRow, K as SearchIndexInfo, L as NavOf, M as FieldMeta, N as FilterExpr, O as DbPatch, P as IdOf, Q as TDbInsertManyIgnoreResult, R as NestedAggregateQuery, S as BucketUnit, T as ClientResponse, U as RelationInfo, V as PageResult, W as ResponseDataOf, X as TDbDeleteResult, Y as TClientCallOptions, Z as TDbInsertIgnoreResult, _ as AggregateQuery, at as UniqueryControls, b as AtscriptClientShape, c as ActionNotFoundError, ct as WeekStart, d as ActionUnsupportedError, dt as clearMetaStore, et as TDbInsertResult, f as ClientError, ft as defaultMetaStore, g as VersionMismatchErrorBody, h as VersionMismatchError, i as ValidatorMode, it as Uniquery, j as DecoratedQuery, k as DbRow, l as ActionTargetError, lt as MetaStore, m as TransportError, n as ClientValidatorOptions, nt as TDbUpdateResult, o as ActionDisabledError, ot as ValidGroupBy, p as ClientValidationError, q as ServerError, rt as TypedWithRelation, s as ActionDisabledErrorBody, st as ValidNested, t as ClientValidator, tt as TDbQueryTarget, u as ActionTargetErrorBody, ut as MetaStoreOptions, v as AggregateResult, w as ClientOptions, x as BucketExpr, y as AggregateStage, z as NestedAggregateResult } from "./validator-itAz8BNP.mjs";
1
+ import { $ as TDbInsertManyResult, A as DecoratedControls, B as OwnOf, C as CalendarBucketLabel, D as DbInsert, E as DataOf, F as InsertOf, G as RowOf, H as PatchOf, I as MetaResponse, J as StageRow, K as SearchIndexInfo, L as NavOf, M as FieldMeta, N as FilterExpr, O as DbPatch, P as IdOf, Q as TDbInsertManyIgnoreResult, R as NestedAggregateQuery, S as BucketUnit, T as ClientResponse, U as RelationInfo, V as PageResult, W as ResponseDataOf, X as TDbDeleteResult, Y as TClientCallOptions, Z as TDbInsertIgnoreResult, _ as AggregateQuery, at as UniqueryControls, b as AtscriptClientShape, c as ActionNotFoundError, ct as WeekStart, d as ActionUnsupportedError, dt as clearMetaStore, et as TDbInsertResult, f as ClientError, ft as defaultMetaStore, g as VersionMismatchErrorBody, h as VersionMismatchError, i as ValidatorMode, it as Uniquery, j as DecoratedQuery, k as DbRow, l as ActionTargetError, lt as MetaStore, m as TransportError, n as ClientValidatorOptions, nt as TDbUpdateResult, o as ActionDisabledError, ot as ValidGroupBy, p as ClientValidationError, q as ServerError, rt as TypedWithRelation, s as ActionDisabledErrorBody, st as ValidNested, t as ClientValidator, tt as TDbQueryTarget, u as ActionTargetErrorBody, ut as MetaStoreOptions, v as AggregateResult, w as ClientOptions, x as BucketExpr, y as AggregateStage, z as NestedAggregateResult } from "./validator-FC3SyLqE.mjs";
2
2
  import { AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, BucketSeriesOptions, ComputedExpr, NestedAggregateQuery as NestedAggregateQuery$1, NestedAggregateResult as NestedAggregateResult$1, NextBucketOptions, Uniquery as Uniquery$1, ValidGroupBy as ValidGroupBy$1, ValidNested as ValidNested$1, bucketSeries, bucketStartInstant, nextBucketLabel } from "@uniqu/core";
3
3
  import { TAtscriptAnnotatedType, TSerializedAnnotatedType } from "@atscript/typescript/utils";
4
4
  import { TCrudOp, TCrudPermissions, TDbActionInfo, TDbActionInfo as TDbActionInfo$1, TDbActionIntent, TDbActionLevel, TDbActionProcessor, TDbActionTargetSummary, TDbActionTargetSummary as TDbActionTargetSummary$1, TDbAvailableActions, TDbAvailableActions as TDbAvailableActions$1, TDbDeleteResult as TDbDeleteResult$1, TDbInsertIgnoreResult as TDbInsertIgnoreResult$1, TDbInsertManyIgnoreResult as TDbInsertManyIgnoreResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1 } from "@atscript/db";
@@ -226,8 +226,14 @@ interface ServerErrorEntry {
226
226
  interface ServerError {
227
227
  message: string;
228
228
  statusCode: number;
229
- /** The `DbError` code (`CONFLICT`, `FK_VIOLATION`, …) or a handler's own. @since 0.1.165 */
229
+ /**
230
+ * The `DbError` code (`CONFLICT`, `FK_VIOLATION`, …), moost-db's own
231
+ * (`UNKNOWN_FIELD`, `INVALID_QUERY`, `VERSION_MISMATCH`, … — every 400 /
232
+ * 403 / 409 is coded since 0.1.175) or a handler's own. @since 0.1.165
233
+ */
230
234
  code?: string;
235
+ /** Values the top-level message names, for translating it. @since 0.1.175 */
236
+ params?: Record<string, unknown>;
231
237
  errors?: ServerErrorEntry[];
232
238
  [key: string]: unknown;
233
239
  }
@@ -269,6 +275,12 @@ type ResponseDataOf<T> = T extends {
269
275
  */
270
276
  type DecoratedControls<T, D> = Omit<UniqueryControls<OwnOf<T>, NavOf<T>>, "$select"> & {
271
277
  $select?: SelectExpr<OwnOf<T> & D>;
278
+ /**
279
+ * `false` — a `$search` read computes no relevance score: rows come in
280
+ * `$sort` order, or primary-key order without one. A `$vector` read refuses
281
+ * it (400). Default `true`. Since 0.1.175.
282
+ */
283
+ $rank?: boolean;
272
284
  };
273
285
  /** A read query over `T` — {@link DecoratedControls} for the controls. Since 0.1.148. */
274
286
  type DecoratedQuery<T, D> = Omit<Uniquery$1<OwnOf<T>, NavOf<T>>, "controls"> & {
@@ -226,8 +226,14 @@ interface ServerErrorEntry {
226
226
  interface ServerError {
227
227
  message: string;
228
228
  statusCode: number;
229
- /** The `DbError` code (`CONFLICT`, `FK_VIOLATION`, …) or a handler's own. @since 0.1.165 */
229
+ /**
230
+ * The `DbError` code (`CONFLICT`, `FK_VIOLATION`, …), moost-db's own
231
+ * (`UNKNOWN_FIELD`, `INVALID_QUERY`, `VERSION_MISMATCH`, … — every 400 /
232
+ * 403 / 409 is coded since 0.1.175) or a handler's own. @since 0.1.165
233
+ */
230
234
  code?: string;
235
+ /** Values the top-level message names, for translating it. @since 0.1.175 */
236
+ params?: Record<string, unknown>;
231
237
  errors?: ServerErrorEntry[];
232
238
  [key: string]: unknown;
233
239
  }
@@ -269,6 +275,12 @@ type ResponseDataOf<T> = T extends {
269
275
  */
270
276
  type DecoratedControls<T, D> = Omit<UniqueryControls<OwnOf<T>, NavOf<T>>, "$select"> & {
271
277
  $select?: SelectExpr<OwnOf<T> & D>;
278
+ /**
279
+ * `false` — a `$search` read computes no relevance score: rows come in
280
+ * `$sort` order, or primary-key order without one. A `$vector` read refuses
281
+ * it (400). Default `true`. Since 0.1.175.
282
+ */
283
+ $rank?: boolean;
272
284
  };
273
285
  /** A read query over `T` — {@link DecoratedControls} for the controls. Since 0.1.148. */
274
286
  type DecoratedQuery<T, D> = Omit<Uniquery$1<OwnOf<T>, NavOf<T>>, "controls"> & {
@@ -1,2 +1,2 @@
1
- import { a as createClientValidator, i as ValidatorMode, n as ClientValidatorOptions, p as ClientValidationError, r as DbValidationContext, t as ClientValidator } from "./validator-CW__tbcp.cjs";
1
+ import { a as createClientValidator, i as ValidatorMode, n as ClientValidatorOptions, p as ClientValidationError, r as DbValidationContext, t as ClientValidator } from "./validator-D9QYeBWO.cjs";
2
2
  export { ClientValidationError, ClientValidator, ClientValidatorOptions, type DbValidationContext, type ValidatorMode, createClientValidator };
@@ -1,2 +1,2 @@
1
- import { a as createClientValidator, i as ValidatorMode, n as ClientValidatorOptions, p as ClientValidationError, r as DbValidationContext, t as ClientValidator } from "./validator-itAz8BNP.mjs";
1
+ import { a as createClientValidator, i as ValidatorMode, n as ClientValidatorOptions, p as ClientValidationError, r as DbValidationContext, t as ClientValidator } from "./validator-FC3SyLqE.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.174",
3
+ "version": "0.1.175",
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.1",
47
- "@uniqu/url": "^0.2.1"
46
+ "@uniqu/core": "^0.2.2",
47
+ "@uniqu/url": "^0.2.2"
48
48
  },
49
49
  "devDependencies": {
50
- "@atscript/core": "^0.2.9",
51
- "@atscript/typescript": "^0.2.9",
52
- "unplugin-atscript": "^0.2.9",
53
- "@atscript/db": "0.1.174"
50
+ "@atscript/core": "^0.2.11",
51
+ "@atscript/typescript": "^0.2.11",
52
+ "unplugin-atscript": "^0.2.11",
53
+ "@atscript/db": "0.1.175"
54
54
  },
55
55
  "peerDependencies": {
56
- "@atscript/typescript": "^0.2.9",
57
- "@atscript/db": "^0.1.174"
56
+ "@atscript/typescript": "^0.2.11",
57
+ "@atscript/db": "^0.1.175"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "vp pack",