@objectstack/spec 0.4.1 → 0.6.0
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/api/index.d.ts +1 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +1 -0
- package/dist/api/protocol.d.ts +65 -0
- package/dist/api/protocol.d.ts.map +1 -0
- package/dist/api/protocol.js +8 -0
- package/dist/automation/connector.zod.d.ts +2 -2
- package/dist/automation/sync.zod.d.ts +4 -4
- package/dist/data/mapping.zod.d.ts +2 -2
- package/dist/hub/composer.zod.d.ts +5 -5
- package/dist/hub/marketplace.zod.d.ts +2 -2
- package/dist/stack.zod.d.ts +403 -11
- package/dist/stack.zod.d.ts.map +1 -1
- package/dist/stack.zod.js +4 -0
- package/dist/system/data-engine.zod.d.ts +59 -0
- package/dist/system/data-engine.zod.d.ts.map +1 -0
- package/dist/system/data-engine.zod.js +38 -0
- package/dist/system/index.d.ts +1 -0
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +2 -0
- package/dist/system/manifest.zod.d.ts +10 -7
- package/dist/system/manifest.zod.d.ts.map +1 -1
- package/dist/system/manifest.zod.js +8 -5
- package/dist/system/plugin.zod.d.ts +2563 -2883
- package/dist/system/plugin.zod.d.ts.map +1 -1
- package/dist/system/plugin.zod.js +46 -213
- package/json-schema/hub/ComposerResponse.json +4 -1
- package/json-schema/system/DataEngineFilter.json +11 -0
- package/json-schema/system/DataEngineQueryOptions.json +48 -0
- package/json-schema/system/Manifest.json +4 -1
- package/json-schema/system/Plugin.json +14 -2
- package/json-schema/system/PluginContext.json +22 -38
- package/package.json +1 -1
- package/json-schema/system/I18nContext.json +0 -12
- package/json-schema/system/Logger.json +0 -25
- package/json-schema/system/ObjectQLClient.json +0 -12
- package/json-schema/system/Router.json +0 -12
- package/json-schema/system/Scheduler.json +0 -12
- package/json-schema/system/ScopedStorage.json +0 -12
- package/json-schema/system/SystemAPI.json +0 -12
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Data Engine Protocol
|
|
4
|
+
*
|
|
5
|
+
* Defines the standard interface for data persistence engines.
|
|
6
|
+
* This allows different data engines (ObjectQL, Prisma, TypeORM, etc.)
|
|
7
|
+
* to be used interchangeably through a common interface.
|
|
8
|
+
*
|
|
9
|
+
* Following the Dependency Inversion Principle - plugins depend on this interface,
|
|
10
|
+
* not on concrete database implementations.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Data Engine Query filter conditions
|
|
14
|
+
* Simple key-value filter structure for IDataEngine.find() operations
|
|
15
|
+
*/
|
|
16
|
+
export declare const DataEngineFilterSchema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
17
|
+
/**
|
|
18
|
+
* Query options for IDataEngine.find() operations
|
|
19
|
+
*/
|
|
20
|
+
export declare const DataEngineQueryOptionsSchema: z.ZodObject<{
|
|
21
|
+
/** Filter conditions */
|
|
22
|
+
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
23
|
+
/** Fields to select */
|
|
24
|
+
select: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
25
|
+
/** Sort order */
|
|
26
|
+
sort: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<-1>, z.ZodLiteral<"asc">, z.ZodLiteral<"desc">]>>>;
|
|
27
|
+
/** Limit number of results (alternative name for top, used by some drivers) */
|
|
28
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
/** Skip number of results (for pagination) */
|
|
30
|
+
skip: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
/** Maximum number of results (OData-style, takes precedence over limit if both specified) */
|
|
32
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
sort?: Record<string, 1 | "asc" | "desc" | -1> | undefined;
|
|
35
|
+
filter?: Record<string, any> | undefined;
|
|
36
|
+
limit?: number | undefined;
|
|
37
|
+
select?: string[] | undefined;
|
|
38
|
+
top?: number | undefined;
|
|
39
|
+
skip?: number | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
sort?: Record<string, 1 | "asc" | "desc" | -1> | undefined;
|
|
42
|
+
filter?: Record<string, any> | undefined;
|
|
43
|
+
limit?: number | undefined;
|
|
44
|
+
select?: string[] | undefined;
|
|
45
|
+
top?: number | undefined;
|
|
46
|
+
skip?: number | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Data Engine Interface Schema
|
|
50
|
+
*
|
|
51
|
+
* Defines the contract for data engine implementations.
|
|
52
|
+
* (Deprecated: Moved to @objectstack/core/contracts/data-engine)
|
|
53
|
+
*/
|
|
54
|
+
/**
|
|
55
|
+
* TypeScript types derived from schemas
|
|
56
|
+
*/
|
|
57
|
+
export type DataEngineFilter = z.infer<typeof DataEngineFilterSchema>;
|
|
58
|
+
export type DataEngineQueryOptions = z.infer<typeof DataEngineQueryOptionsSchema>;
|
|
59
|
+
//# sourceMappingURL=data-engine.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-engine.zod.d.ts","sourceRoot":"","sources":["../../src/system/data-engine.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,oCAAoE,CAAC;AAExG;;GAEG;AACH,eAAO,MAAM,4BAA4B;IACvC,wBAAwB;;IAExB,uBAAuB;;IAEvB,iBAAiB;;IAEjB,+EAA+E;;IAE/E,8CAA8C;;IAE9C,6FAA6F;;;;;;;;;;;;;;;;EAEjC,CAAC;AAE/D;;;;;GAKG;AAOH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataEngineQueryOptionsSchema = exports.DataEngineFilterSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Data Engine Protocol
|
|
7
|
+
*
|
|
8
|
+
* Defines the standard interface for data persistence engines.
|
|
9
|
+
* This allows different data engines (ObjectQL, Prisma, TypeORM, etc.)
|
|
10
|
+
* to be used interchangeably through a common interface.
|
|
11
|
+
*
|
|
12
|
+
* Following the Dependency Inversion Principle - plugins depend on this interface,
|
|
13
|
+
* not on concrete database implementations.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Data Engine Query filter conditions
|
|
17
|
+
* Simple key-value filter structure for IDataEngine.find() operations
|
|
18
|
+
*/
|
|
19
|
+
exports.DataEngineFilterSchema = zod_1.z.record(zod_1.z.any()).describe('Data Engine query filter conditions');
|
|
20
|
+
/**
|
|
21
|
+
* Query options for IDataEngine.find() operations
|
|
22
|
+
*/
|
|
23
|
+
exports.DataEngineQueryOptionsSchema = zod_1.z.object({
|
|
24
|
+
/** Filter conditions */
|
|
25
|
+
filter: exports.DataEngineFilterSchema.optional(),
|
|
26
|
+
/** Fields to select */
|
|
27
|
+
select: zod_1.z.array(zod_1.z.string()).optional(),
|
|
28
|
+
/** Sort order */
|
|
29
|
+
sort: zod_1.z.record(zod_1.z.union([zod_1.z.literal(1), zod_1.z.literal(-1), zod_1.z.literal('asc'), zod_1.z.literal('desc')])).optional(),
|
|
30
|
+
/** Limit number of results (alternative name for top, used by some drivers) */
|
|
31
|
+
limit: zod_1.z.number().optional(),
|
|
32
|
+
/** Skip number of results (for pagination) */
|
|
33
|
+
skip: zod_1.z.number().optional(),
|
|
34
|
+
/** Maximum number of results (OData-style, takes precedence over limit if both specified) */
|
|
35
|
+
top: zod_1.z.number().optional(),
|
|
36
|
+
}).describe('Query options for IDataEngine.find() operations');
|
|
37
|
+
// Moved IDataEngine interface to @objectstack/core to separate runtime contract from data schema
|
|
38
|
+
// Moved IDataEngine interface to @objectstack/core to separate runtime contract from data schema
|
package/dist/system/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AAGxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AAGxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,mBAAmB,CAAC"}
|
package/dist/system/index.js
CHANGED
|
@@ -39,5 +39,7 @@ __exportStar(require("./datasource.zod"), exports);
|
|
|
39
39
|
__exportStar(require("./driver.zod"), exports);
|
|
40
40
|
__exportStar(require("./driver/mongo.zod"), exports);
|
|
41
41
|
__exportStar(require("./driver/postgres.zod"), exports);
|
|
42
|
+
// Data Engine Protocol
|
|
43
|
+
__exportStar(require("./data-engine.zod"), exports);
|
|
42
44
|
// Note: Auth, Identity, Policy, Role, Organization moved to @objectstack/spec/auth
|
|
43
45
|
// Note: Territory moved to @objectstack/spec/permission
|
|
@@ -17,12 +17,15 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
17
17
|
version: z.ZodString;
|
|
18
18
|
/**
|
|
19
19
|
* Type of the package in the ObjectStack ecosystem.
|
|
20
|
-
* - app:
|
|
21
|
-
* - plugin:
|
|
22
|
-
* - driver:
|
|
23
|
-
* - module: Reusable code module
|
|
20
|
+
* - app: Business application package
|
|
21
|
+
* - plugin: General-purpose functionality extension
|
|
22
|
+
* - driver: Southbound interface - Database/external service adapter (Postgres, MongoDB, S3)
|
|
23
|
+
* - module: Reusable code library/shared module
|
|
24
|
+
* - objectql: Core engine - Data layer implementation
|
|
25
|
+
* - gateway: Northbound interface - API protocol entry point (GraphQL, REST, RPC, OData)
|
|
26
|
+
* - adapter: Host adapter - Runtime container (Express, Hono, Fastify, Serverless)
|
|
24
27
|
*/
|
|
25
|
-
type: z.ZodEnum<["app", "plugin", "driver", "module"]>;
|
|
28
|
+
type: z.ZodEnum<["app", "plugin", "driver", "module", "objectql", "gateway", "adapter"]>;
|
|
26
29
|
/**
|
|
27
30
|
* Human-readable name of the package.
|
|
28
31
|
*/
|
|
@@ -363,7 +366,7 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
363
366
|
*/
|
|
364
367
|
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
365
368
|
}, "strip", z.ZodTypeAny, {
|
|
366
|
-
type: "app" | "module" | "plugin" | "driver";
|
|
369
|
+
type: "app" | "module" | "plugin" | "driver" | "objectql" | "gateway" | "adapter";
|
|
367
370
|
name: string;
|
|
368
371
|
id: string;
|
|
369
372
|
version: string;
|
|
@@ -435,7 +438,7 @@ export declare const ManifestSchema: z.ZodObject<{
|
|
|
435
438
|
} | undefined;
|
|
436
439
|
extensions?: Record<string, any> | undefined;
|
|
437
440
|
}, {
|
|
438
|
-
type: "app" | "module" | "plugin" | "driver";
|
|
441
|
+
type: "app" | "module" | "plugin" | "driver" | "objectql" | "gateway" | "adapter";
|
|
439
442
|
name: string;
|
|
440
443
|
id: string;
|
|
441
444
|
version: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.zod.d.ts","sourceRoot":"","sources":["../../src/system/manifest.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,cAAc;IACzB;;;OAGG;;IAGH;;;OAGG;;IAGH
|
|
1
|
+
{"version":3,"file":"manifest.zod.d.ts","sourceRoot":"","sources":["../../src/system/manifest.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,cAAc;IACzB;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;;;;;;OASG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;OAEG;;IAGH;;;OAGG;;IAGH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaH;;;OAGG;;QAED;;;;WAIG;;;;;;;;;;;;;;QAOH;;;WAGG;;QAGH;;WAEG;;;;;;;;;;;;;;QAOH;;WAEG;;;;;;;;;;;;;;QAOH;;;WAGG;;;;;;;;;;;QAMH;;;WAGG;;;;;;;;;;;;;;;;;;;;QASH;;;WAGG;;;;;;;;;;;;;;QAOH;;;WAGG;;;;;;;;;;;;;;QAOH;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASL;;;OAGG;;;;;;;;;;;;;;IAOH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -20,12 +20,15 @@ exports.ManifestSchema = zod_1.z.object({
|
|
|
20
20
|
version: zod_1.z.string().regex(/^\d+\.\d+\.\d+$/).describe('Package version (semantic versioning)'),
|
|
21
21
|
/**
|
|
22
22
|
* Type of the package in the ObjectStack ecosystem.
|
|
23
|
-
* - app:
|
|
24
|
-
* - plugin:
|
|
25
|
-
* - driver:
|
|
26
|
-
* - module: Reusable code module
|
|
23
|
+
* - app: Business application package
|
|
24
|
+
* - plugin: General-purpose functionality extension
|
|
25
|
+
* - driver: Southbound interface - Database/external service adapter (Postgres, MongoDB, S3)
|
|
26
|
+
* - module: Reusable code library/shared module
|
|
27
|
+
* - objectql: Core engine - Data layer implementation
|
|
28
|
+
* - gateway: Northbound interface - API protocol entry point (GraphQL, REST, RPC, OData)
|
|
29
|
+
* - adapter: Host adapter - Runtime container (Express, Hono, Fastify, Serverless)
|
|
27
30
|
*/
|
|
28
|
-
type: zod_1.z.enum(['app', 'plugin', 'driver', 'module']).describe('Type of package'),
|
|
31
|
+
type: zod_1.z.enum(['app', 'plugin', 'driver', 'module', 'objectql', 'gateway', 'adapter']).describe('Type of package'),
|
|
29
32
|
/**
|
|
30
33
|
* Human-readable name of the package.
|
|
31
34
|
*/
|