@atscript/db-client 0.1.52 → 0.1.53

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 { C as TDbUpdateResult, E as UniqueryControls, S as TDbInsertResult, T as Uniquery, _ as RelationInfo, b as TDbDeleteResult, c as ClientOptions, d as FilterExpr, f as IdOf, g as PageResult, h as OwnOf, i as ValidatorMode, l as DataOf, m as NavOf, n as ClientValidator, o as AggregateQuery, p as MetaResponse, s as AggregateResult, t as ClientValidationError, u as FieldMeta, v as SearchIndexInfo, w as TypedWithRelation, x as TDbInsertManyResult, y as ServerError } from "./validator-Baaf7PPf.cjs";
1
+ import { C as TDbUpdateResult, E as UniqueryControls, S as TDbInsertResult, T as Uniquery, _ as RelationInfo, b as TDbDeleteResult, c as ClientOptions, d as FilterExpr, f as IdOf, g as PageResult, h as OwnOf, i as ValidatorMode, l as DataOf, m as NavOf, n as ClientValidator, o as AggregateQuery, p as MetaResponse, s as AggregateResult, t as ClientValidationError, u as FieldMeta, v as SearchIndexInfo, w as TypedWithRelation, x as TDbInsertManyResult, y as ServerError } from "./validator-DfU6oJir.cjs";
2
2
  import { AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, Uniquery as Uniquery$1, UniqueryControls as UniqueryControls$1 } from "@uniqu/core";
3
3
  import { TDbDeleteResult as TDbDeleteResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1 } from "@atscript/db";
4
4
  import { TSerializedAnnotatedType } from "@atscript/typescript/utils";
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as TDbUpdateResult, E as UniqueryControls, S as TDbInsertResult, T as Uniquery, _ as RelationInfo, b as TDbDeleteResult, c as ClientOptions, d as FilterExpr, f as IdOf, g as PageResult, h as OwnOf, i as ValidatorMode, l as DataOf, m as NavOf, n as ClientValidator, o as AggregateQuery, p as MetaResponse, s as AggregateResult, t as ClientValidationError, u as FieldMeta, v as SearchIndexInfo, w as TypedWithRelation, x as TDbInsertManyResult, y as ServerError } from "./validator-D0lqruKm.mjs";
1
+ import { C as TDbUpdateResult, E as UniqueryControls, S as TDbInsertResult, T as Uniquery, _ as RelationInfo, b as TDbDeleteResult, c as ClientOptions, d as FilterExpr, f as IdOf, g as PageResult, h as OwnOf, i as ValidatorMode, l as DataOf, m as NavOf, n as ClientValidator, o as AggregateQuery, p as MetaResponse, s as AggregateResult, t as ClientValidationError, u as FieldMeta, v as SearchIndexInfo, w as TypedWithRelation, x as TDbInsertManyResult, y as ServerError } from "./validator-wyKVvc-q.mjs";
2
2
  import { TSerializedAnnotatedType } from "@atscript/typescript/utils";
3
3
  import { AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, Uniquery as Uniquery$1, UniqueryControls as UniqueryControls$1 } from "@uniqu/core";
4
4
  import { TDbDeleteResult as TDbDeleteResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1 } from "@atscript/db";
@@ -1,6 +1,6 @@
1
1
  import { AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, FilterExpr, TypedWithRelation, Uniquery as Uniquery$1, UniqueryControls as UniqueryControls$1 } from "@uniqu/core";
2
- import { TDbDeleteResult as TDbDeleteResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1 } from "@atscript/db";
3
- import { TAtscriptAnnotatedType, TAtscriptTypeObject, TSerializedAnnotatedType } from "@atscript/typescript/utils";
2
+ import { TDbDeleteResult as TDbDeleteResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1, TFieldMeta, TMetaResponse, TRelationInfo, TSearchIndexInfo } from "@atscript/db";
3
+ import { TAtscriptAnnotatedType, TAtscriptTypeObject } from "@atscript/typescript/utils";
4
4
  import { DbValidationContext, ValidatorMode, ValidatorMode as ValidatorMode$1 } from "@atscript/db/validator";
5
5
 
6
6
  //#region src/types.d.ts
@@ -23,33 +23,13 @@ interface ClientOptions {
23
23
  baseUrl?: string;
24
24
  }
25
25
  /** Search index metadata from the server. */
26
- interface SearchIndexInfo {
27
- name: string;
28
- description?: string;
29
- type?: "text" | "vector";
30
- }
26
+ type SearchIndexInfo = TSearchIndexInfo;
31
27
  /** Relation summary in meta response. */
32
- interface RelationInfo {
33
- name: string;
34
- direction: "to" | "from" | "via";
35
- isArray: boolean;
36
- }
28
+ type RelationInfo = TRelationInfo;
37
29
  /** Per-field capability flags. */
38
- interface FieldMeta {
39
- sortable: boolean;
40
- filterable: boolean;
41
- }
30
+ type FieldMeta = TFieldMeta;
42
31
  /** Enhanced meta response from the server (`GET /meta`). */
43
- interface MetaResponse {
44
- searchable: boolean;
45
- vectorSearchable: boolean;
46
- searchIndexes: SearchIndexInfo[];
47
- primaryKeys: string[];
48
- readOnly: boolean;
49
- relations: RelationInfo[];
50
- fields: Record<string, FieldMeta>;
51
- type: TSerializedAnnotatedType;
52
- }
32
+ type MetaResponse = TMetaResponse;
53
33
  /** Paginated response shape from `GET /pages`. */
54
34
  interface PageResult<T> {
55
35
  data: T[];
@@ -1,7 +1,7 @@
1
- import { TAtscriptAnnotatedType, TAtscriptTypeObject, TSerializedAnnotatedType } from "@atscript/typescript/utils";
1
+ import { TAtscriptAnnotatedType, TAtscriptTypeObject } from "@atscript/typescript/utils";
2
2
  import { DbValidationContext, ValidatorMode, ValidatorMode as ValidatorMode$1 } from "@atscript/db/validator";
3
3
  import { AggregateQuery as AggregateQuery$1, AggregateResult as AggregateResult$1, FilterExpr, TypedWithRelation, Uniquery as Uniquery$1, UniqueryControls as UniqueryControls$1 } from "@uniqu/core";
4
- import { TDbDeleteResult as TDbDeleteResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1 } from "@atscript/db";
4
+ import { TDbDeleteResult as TDbDeleteResult$1, TDbInsertManyResult as TDbInsertManyResult$1, TDbInsertResult as TDbInsertResult$1, TDbUpdateResult as TDbUpdateResult$1, TFieldMeta, TMetaResponse, TRelationInfo, TSearchIndexInfo } from "@atscript/db";
5
5
 
6
6
  //#region src/types.d.ts
7
7
  /** Options for creating a Client instance. */
@@ -23,33 +23,13 @@ interface ClientOptions {
23
23
  baseUrl?: string;
24
24
  }
25
25
  /** Search index metadata from the server. */
26
- interface SearchIndexInfo {
27
- name: string;
28
- description?: string;
29
- type?: "text" | "vector";
30
- }
26
+ type SearchIndexInfo = TSearchIndexInfo;
31
27
  /** Relation summary in meta response. */
32
- interface RelationInfo {
33
- name: string;
34
- direction: "to" | "from" | "via";
35
- isArray: boolean;
36
- }
28
+ type RelationInfo = TRelationInfo;
37
29
  /** Per-field capability flags. */
38
- interface FieldMeta {
39
- sortable: boolean;
40
- filterable: boolean;
41
- }
30
+ type FieldMeta = TFieldMeta;
42
31
  /** Enhanced meta response from the server (`GET /meta`). */
43
- interface MetaResponse {
44
- searchable: boolean;
45
- vectorSearchable: boolean;
46
- searchIndexes: SearchIndexInfo[];
47
- primaryKeys: string[];
48
- readOnly: boolean;
49
- relations: RelationInfo[];
50
- fields: Record<string, FieldMeta>;
51
- type: TSerializedAnnotatedType;
52
- }
32
+ type MetaResponse = TMetaResponse;
53
33
  /** Paginated response shape from `GET /pages`. */
54
34
  interface PageResult<T> {
55
35
  data: T[];
@@ -1,2 +1,2 @@
1
- import { a as createClientValidator, i as ValidatorMode, n as ClientValidator, r as DbValidationContext, t as ClientValidationError } from "./validator-Baaf7PPf.cjs";
1
+ import { a as createClientValidator, i as ValidatorMode, n as ClientValidator, r as DbValidationContext, t as ClientValidationError } from "./validator-DfU6oJir.cjs";
2
2
  export { ClientValidationError, ClientValidator, DbValidationContext, ValidatorMode, createClientValidator };
@@ -1,2 +1,2 @@
1
- import { a as createClientValidator, i as ValidatorMode, n as ClientValidator, r as DbValidationContext, t as ClientValidationError } from "./validator-D0lqruKm.mjs";
1
+ import { a as createClientValidator, i as ValidatorMode, n as ClientValidator, r as DbValidationContext, t as ClientValidationError } from "./validator-wyKVvc-q.mjs";
2
2
  export { ClientValidationError, ClientValidator, DbValidationContext, ValidatorMode, createClientValidator };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db-client",
3
- "version": "0.1.52",
3
+ "version": "0.1.53",
4
4
  "description": "Browser-compatible HTTP client for @atscript/moost-db REST endpoints.",
5
5
  "keywords": [
6
6
  "atscript",
@@ -50,7 +50,7 @@
50
50
  "@atscript/typescript": "^0.1.48",
51
51
  "@uniqu/core": "^0.1.5",
52
52
  "unplugin-atscript": "^0.1.48",
53
- "@atscript/db": "0.1.52"
53
+ "@atscript/db": "0.1.53"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "@atscript/db": "^0.1.44",