Skip to content

Commit 33d6d8d

Browse files
Copilothotlong
andcommitted
feat: Complete package resolution - all @objectstack packages functional
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 81a4382 commit 33d6d8d

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

packages/foundation/core/src/plugin.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ import type { Driver } from '@objectql/types';
1818
* Extended ObjectStack Kernel with ObjectQL services
1919
*/
2020
interface ExtendedKernel extends ObjectKernel {
21-
metadata?: any;
22-
actions?: any;
21+
metadata: any;
22+
actions: any;
2323
getAllDrivers?: () => Driver[];
24-
create?: (objectName: string, data: any) => Promise<any>;
25-
update?: (objectName: string, id: string, data: any) => Promise<any>;
26-
delete?: (objectName: string, id: string) => Promise<any>;
27-
find?: (objectName: string, query: any) => Promise<any>;
28-
get?: (objectName: string, id: string) => Promise<any>;
24+
create: (objectName: string, data: any) => Promise<any>;
25+
update: (objectName: string, id: string, data: any) => Promise<any>;
26+
delete: (objectName: string, id: string) => Promise<any>;
27+
find: (objectName: string, query: any) => Promise<any>;
28+
get: (objectName: string, id: string) => Promise<any>;
2929
queryService?: QueryService;
3030
queryAnalyzer?: QueryAnalyzer;
3131
}

packages/foundation/core/src/repository.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ import { QueryCompiler } from './optimizations/QueryCompiler';
2323
interface ExtendedKernel extends ObjectKernel {
2424
validator?: Validator;
2525
formulaEngine?: FormulaEngine;
26-
create?: (objectName: string, data: any) => Promise<any>;
27-
update?: (objectName: string, id: string, data: any) => Promise<any>;
28-
delete?: (objectName: string, id: string) => Promise<any>;
29-
find?: (objectName: string, query: any) => Promise<any>;
30-
get?: (objectName: string, id: string) => Promise<any>;
26+
create: (objectName: string, data: any) => Promise<Record<string, any>>;
27+
update: (objectName: string, id: string, data: any) => Promise<Record<string, any>>;
28+
delete: (objectName: string, id: string) => Promise<boolean>;
29+
find: (objectName: string, query: any) => Promise<{ value: Record<string, any>[]; count: number }>;
30+
get: (objectName: string, id: string) => Promise<Record<string, any>>;
3131
}
3232

3333
export class ObjectRepository {

packages/foundation/spec/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,15 @@ export namespace Data {
123123
* QueryAST - Abstract Syntax Tree for queries
124124
*/
125125
export interface QueryAST {
126+
object?: string;
126127
fields?: string[];
127128
where?: FilterCondition;
128129
orderBy?: SortNode[];
129130
offset?: number;
130131
limit?: number;
131132
aggregations?: AggregationNode[];
132133
groupBy?: string[];
134+
distinct?: boolean;
133135
}
134136
}
135137

0 commit comments

Comments
 (0)