Skip to content

Commit 002e817

Browse files
committed
Refactor imports to use QueryAST and SortNode from @objectql/types for consistency across drivers
1 parent ccbaa06 commit 002e817

15 files changed

Lines changed: 33 additions & 39 deletions

File tree

packages/drivers/fs/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Data, System as SystemSpec } from '@objectstack/spec';
22
import { z } from 'zod';
3-
type QueryAST = z.infer<typeof Data.QueryAST>;
4-
type SortNode = z.infer<typeof Data.SortNode>;
3+
import { QueryAST, SortNode } from '@objectql/types';
54
type DriverInterface = z.infer<typeof Data.DriverInterface>;
65
/**
76
* ObjectQL

packages/drivers/localstorage/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Data, System as SystemSpec } from '@objectstack/spec';
22
import { z } from 'zod';
3-
type QueryAST = z.infer<typeof Data.QueryAST>;
4-
type SortNode = z.infer<typeof Data.SortNode>;
3+
import { QueryAST, SortNode } from '@objectql/types';
54
type DriverInterface = z.infer<typeof Data.DriverInterface>;
65
/**
76
* ObjectQL

packages/drivers/memory/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Data, System as SystemSpec } from '@objectstack/spec';
22
import { z } from 'zod';
3-
type QueryAST = z.infer<typeof Data.QueryAST>;
4-
type SortNode = z.infer<typeof Data.SortNode>;
3+
import { QueryAST, SortNode } from '@objectql/types';
54
type DriverInterface = z.infer<typeof Data.DriverInterface>;
65
/**
76
* ObjectQL

packages/drivers/mongo/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Data, System as SystemSpec } from '@objectstack/spec';
22
import { z } from 'zod';
3-
type QueryAST = z.infer<typeof Data.QueryAST>;
4-
type SortNode = z.infer<typeof Data.SortNode>;
3+
import { QueryAST, SortNode } from '@objectql/types';
54
type DriverInterface = z.infer<typeof Data.DriverInterface>;
65
/**
76
* ObjectQL

packages/drivers/redis/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Data, System as SystemSpec } from '@objectstack/spec';
22
import { z } from 'zod';
3-
type QueryAST = z.infer<typeof Data.QueryAST>;
4-
type SortNode = z.infer<typeof Data.SortNode>;
3+
import { QueryAST, SortNode } from '@objectql/types';
54
type DriverInterface = z.infer<typeof Data.DriverInterface>;
65
/**
76
* ObjectQL

packages/drivers/sdk/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Data, System as SystemSpec } from '@objectstack/spec';
22
import { z } from 'zod';
3-
type QueryAST = z.infer<typeof Data.QueryAST>;
4-
type SortNode = z.infer<typeof Data.SortNode>;
3+
import { QueryAST, SortNode } from '@objectql/types';
54
type DriverInterface = z.infer<typeof Data.DriverInterface>;
65
/**
76
* ObjectQL

packages/drivers/sql/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Data, System as SystemSpec } from '@objectstack/spec';
22
import { z } from 'zod';
3-
type QueryAST = z.infer<typeof Data.QueryAST>;
4-
type SortNode = z.infer<typeof Data.SortNode>;
3+
import { QueryAST, SortNode } from '@objectql/types';
54
type DriverInterface = z.infer<typeof Data.DriverInterface>;
65
/**
76
* ObjectQL

packages/drivers/utils/src/query-ast.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
*/
99

1010
import { Data } from '@objectstack/spec';
11-
import { z } from 'zod';
12-
type QueryAST = z.infer<typeof Data.QueryAST>;
11+
import { QueryAST } from '@objectql/types';
1312
type SortNode = typeof Data.SortNode;
1413

1514
/**

packages/foundation/core/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export type { ObjectStackProtocolImplementation } from '@objectstack/objectql';
1616
// Export ObjectStack spec types for driver development
1717
import { Data, System } from '@objectstack/spec';
1818
import { z } from 'zod';
19-
export type QueryAST = z.infer<typeof Data.QueryAST>;
20-
export type DriverInterface = z.infer<typeof Data.DriverInterface>;
21-
export type DriverOptions = z.infer<typeof Data.DriverOptions>;
19+
export { QueryAST } from '@objectql/types';
20+
export type DriverInterface = z.infer<typeof Data.DriverInterfaceSchema>;
21+
export type DriverOptions = z.infer<typeof Data.DriverOptionsSchema>;
2222

2323
export * from './gateway';
2424

packages/foundation/core/src/query/filter-translator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import type { Filter } from '@objectql/types';
1010
import { Data } from '@objectstack/spec';
1111
import { z } from 'zod';
12-
type FilterCondition = z.infer<typeof Data.FilterCondition>;
12+
type FilterCondition = z.infer<typeof Data.FilterConditionSchema>;
1313
import { ObjectQLError } from '@objectql/types';
1414

1515
/**

0 commit comments

Comments
 (0)