@objectstack/objectql 3.3.1 → 4.0.1

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/objectql@3.3.1 build /home/runner/work/spec/spec/packages/objectql
2
+ > @objectstack/objectql@4.0.1 build /home/runner/work/spec/spec/packages/objectql
3
3
  > tsup --config ../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.mjs 98.69 KB
14
- ESM dist/index.mjs.map 201.00 KB
15
- ESM ⚡️ Build success in 247ms
16
- CJS dist/index.js 100.43 KB
17
- CJS dist/index.js.map 202.30 KB
18
- CJS ⚡️ Build success in 256ms
13
+ ESM dist/index.mjs 102.95 KB
14
+ ESM dist/index.mjs.map 211.04 KB
15
+ ESM ⚡️ Build success in 203ms
16
+ CJS dist/index.js 104.68 KB
17
+ CJS dist/index.js.map 212.34 KB
18
+ CJS ⚡️ Build success in 209ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 25891ms
21
- DTS dist/index.d.mts 78.82 KB
22
- DTS dist/index.d.ts 78.82 KB
20
+ DTS ⚡️ Build success in 25148ms
21
+ DTS dist/index.d.mts 79.12 KB
22
+ DTS dist/index.d.ts 79.12 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @objectstack/objectql
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e0b0a78: Deprecate DataEngineQueryOptions in favor of QueryAST-aligned EngineQueryOptions.
8
+
9
+ Engine, Protocol, and Client now use standard QueryAST parameter names:
10
+
11
+ - `filter` → `where`
12
+ - `select` → `fields`
13
+ - `sort` → `orderBy`
14
+ - `skip` → `offset`
15
+ - `populate` → `expand`
16
+ - `top` → `limit`
17
+
18
+ The old DataEngine\* schemas and types are preserved with `@deprecated` markers for backward compatibility.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [f08ffc3]
23
+ - Updated dependencies [e0b0a78]
24
+ - @objectstack/spec@4.0.0
25
+ - @objectstack/core@4.0.0
26
+ - @objectstack/types@4.0.0
27
+
3
28
  ## 3.3.1
4
29
 
5
30
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import * as _objectstack_spec_data from '@objectstack/spec/data';
3
- import { ServiceObject, ObjectOwnership, HookContext, QueryAST, DataEngineQueryOptions, DataEngineInsertOptions, DataEngineUpdateOptions, DataEngineDeleteOptions, DataEngineCountOptions, DataEngineAggregateOptions } from '@objectstack/spec/data';
3
+ import { ObjectOwnership, ServiceObject, QueryAST, HookContext, EngineQueryOptions, DataEngineInsertOptions, EngineUpdateOptions, EngineDeleteOptions, EngineCountOptions, EngineAggregateOptions } from '@objectstack/spec/data';
4
4
  import { ObjectStackManifest, InstalledPackage, ExecutionContext } from '@objectstack/spec/kernel';
5
5
  import { ObjectStackProtocol, MetadataCacheRequest, MetadataCacheResponse, BatchUpdateRequest, BatchUpdateResponse, UpdateManyDataRequest, DeleteManyDataRequest } from '@objectstack/spec/api';
6
6
  import { IDataEngine, DriverInterface, Logger, Plugin, PluginContext, ObjectKernel } from '@objectstack/core';
@@ -1289,6 +1289,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
1289
1289
  routes: {
1290
1290
  data: string;
1291
1291
  metadata: string;
1292
+ discovery?: string | undefined;
1292
1293
  ui?: string | undefined;
1293
1294
  auth?: string | undefined;
1294
1295
  automation?: string | undefined;
@@ -1301,6 +1302,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
1301
1302
  notifications?: string | undefined;
1302
1303
  ai?: string | undefined;
1303
1304
  i18n?: string | undefined;
1305
+ feed?: string | undefined;
1304
1306
  };
1305
1307
  services: Record<string, {
1306
1308
  enabled: boolean;
@@ -1316,15 +1318,10 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
1316
1318
  retryAfterMs?: number | undefined;
1317
1319
  } | undefined;
1318
1320
  }>;
1319
- capabilities: {
1320
- feed: boolean;
1321
- comments: boolean;
1322
- automation: boolean;
1323
- cron: boolean;
1324
- search: boolean;
1325
- export: boolean;
1326
- chunkedUpload: boolean;
1327
- };
1321
+ capabilities: Record<string, {
1322
+ enabled: boolean;
1323
+ description?: string;
1324
+ }>;
1328
1325
  }>;
1329
1326
  getMetaTypes(): Promise<{
1330
1327
  types: string[];
@@ -1453,6 +1450,20 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
1453
1450
  }): Promise<{
1454
1451
  success: boolean;
1455
1452
  message: string;
1453
+ warning?: undefined;
1454
+ } | {
1455
+ success: boolean;
1456
+ message: string;
1457
+ warning: any;
1458
+ }>;
1459
+ /**
1460
+ * Hydrate SchemaRegistry from the database on startup.
1461
+ * Loads all active metadata records and registers them in the in-memory registry.
1462
+ * Safe to call repeatedly — idempotent (latest DB record wins).
1463
+ */
1464
+ loadMetaFromDb(): Promise<{
1465
+ loaded: number;
1466
+ errors: number;
1456
1467
  }>;
1457
1468
  listFeed(request: any): Promise<any>;
1458
1469
  createFeedItem(request: any): Promise<any>;
@@ -1652,14 +1663,13 @@ declare class ObjectQL implements IDataEngine {
1652
1663
  * @returns Records with expanded lookup fields (IDs replaced by full objects)
1653
1664
  */
1654
1665
  private expandRelatedRecords;
1655
- private toQueryAST;
1656
- find(object: string, query?: DataEngineQueryOptions): Promise<any[]>;
1657
- findOne(objectName: string, query?: DataEngineQueryOptions): Promise<any>;
1666
+ find(object: string, query?: EngineQueryOptions): Promise<any[]>;
1667
+ findOne(objectName: string, query?: EngineQueryOptions): Promise<any>;
1658
1668
  insert(object: string, data: any | any[], options?: DataEngineInsertOptions): Promise<any>;
1659
- update(object: string, data: any, options?: DataEngineUpdateOptions): Promise<any>;
1660
- delete(object: string, options?: DataEngineDeleteOptions): Promise<any>;
1661
- count(object: string, query?: DataEngineCountOptions): Promise<number>;
1662
- aggregate(object: string, query: DataEngineAggregateOptions): Promise<any[]>;
1669
+ update(object: string, data: any, options?: EngineUpdateOptions): Promise<any>;
1670
+ delete(object: string, options?: EngineDeleteOptions): Promise<any>;
1671
+ count(object: string, query?: EngineCountOptions): Promise<number>;
1672
+ aggregate(object: string, query: EngineAggregateOptions): Promise<any[]>;
1663
1673
  execute(command: any, options?: Record<string, any>): Promise<any>;
1664
1674
  /**
1665
1675
  * Register a single object definition.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import * as _objectstack_spec_data from '@objectstack/spec/data';
3
- import { ServiceObject, ObjectOwnership, HookContext, QueryAST, DataEngineQueryOptions, DataEngineInsertOptions, DataEngineUpdateOptions, DataEngineDeleteOptions, DataEngineCountOptions, DataEngineAggregateOptions } from '@objectstack/spec/data';
3
+ import { ObjectOwnership, ServiceObject, QueryAST, HookContext, EngineQueryOptions, DataEngineInsertOptions, EngineUpdateOptions, EngineDeleteOptions, EngineCountOptions, EngineAggregateOptions } from '@objectstack/spec/data';
4
4
  import { ObjectStackManifest, InstalledPackage, ExecutionContext } from '@objectstack/spec/kernel';
5
5
  import { ObjectStackProtocol, MetadataCacheRequest, MetadataCacheResponse, BatchUpdateRequest, BatchUpdateResponse, UpdateManyDataRequest, DeleteManyDataRequest } from '@objectstack/spec/api';
6
6
  import { IDataEngine, DriverInterface, Logger, Plugin, PluginContext, ObjectKernel } from '@objectstack/core';
@@ -1289,6 +1289,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
1289
1289
  routes: {
1290
1290
  data: string;
1291
1291
  metadata: string;
1292
+ discovery?: string | undefined;
1292
1293
  ui?: string | undefined;
1293
1294
  auth?: string | undefined;
1294
1295
  automation?: string | undefined;
@@ -1301,6 +1302,7 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
1301
1302
  notifications?: string | undefined;
1302
1303
  ai?: string | undefined;
1303
1304
  i18n?: string | undefined;
1305
+ feed?: string | undefined;
1304
1306
  };
1305
1307
  services: Record<string, {
1306
1308
  enabled: boolean;
@@ -1316,15 +1318,10 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
1316
1318
  retryAfterMs?: number | undefined;
1317
1319
  } | undefined;
1318
1320
  }>;
1319
- capabilities: {
1320
- feed: boolean;
1321
- comments: boolean;
1322
- automation: boolean;
1323
- cron: boolean;
1324
- search: boolean;
1325
- export: boolean;
1326
- chunkedUpload: boolean;
1327
- };
1321
+ capabilities: Record<string, {
1322
+ enabled: boolean;
1323
+ description?: string;
1324
+ }>;
1328
1325
  }>;
1329
1326
  getMetaTypes(): Promise<{
1330
1327
  types: string[];
@@ -1453,6 +1450,20 @@ declare class ObjectStackProtocolImplementation implements ObjectStackProtocol {
1453
1450
  }): Promise<{
1454
1451
  success: boolean;
1455
1452
  message: string;
1453
+ warning?: undefined;
1454
+ } | {
1455
+ success: boolean;
1456
+ message: string;
1457
+ warning: any;
1458
+ }>;
1459
+ /**
1460
+ * Hydrate SchemaRegistry from the database on startup.
1461
+ * Loads all active metadata records and registers them in the in-memory registry.
1462
+ * Safe to call repeatedly — idempotent (latest DB record wins).
1463
+ */
1464
+ loadMetaFromDb(): Promise<{
1465
+ loaded: number;
1466
+ errors: number;
1456
1467
  }>;
1457
1468
  listFeed(request: any): Promise<any>;
1458
1469
  createFeedItem(request: any): Promise<any>;
@@ -1652,14 +1663,13 @@ declare class ObjectQL implements IDataEngine {
1652
1663
  * @returns Records with expanded lookup fields (IDs replaced by full objects)
1653
1664
  */
1654
1665
  private expandRelatedRecords;
1655
- private toQueryAST;
1656
- find(object: string, query?: DataEngineQueryOptions): Promise<any[]>;
1657
- findOne(objectName: string, query?: DataEngineQueryOptions): Promise<any>;
1666
+ find(object: string, query?: EngineQueryOptions): Promise<any[]>;
1667
+ findOne(objectName: string, query?: EngineQueryOptions): Promise<any>;
1658
1668
  insert(object: string, data: any | any[], options?: DataEngineInsertOptions): Promise<any>;
1659
- update(object: string, data: any, options?: DataEngineUpdateOptions): Promise<any>;
1660
- delete(object: string, options?: DataEngineDeleteOptions): Promise<any>;
1661
- count(object: string, query?: DataEngineCountOptions): Promise<number>;
1662
- aggregate(object: string, query: DataEngineAggregateOptions): Promise<any[]>;
1669
+ update(object: string, data: any, options?: EngineUpdateOptions): Promise<any>;
1670
+ delete(object: string, options?: EngineDeleteOptions): Promise<any>;
1671
+ count(object: string, query?: EngineCountOptions): Promise<number>;
1672
+ aggregate(object: string, query: EngineAggregateOptions): Promise<any[]>;
1663
1673
  execute(command: any, options?: Record<string, any>): Promise<any>;
1664
1674
  /**
1665
1675
  * Register a single object definition.