@objectql/types 4.1.0 → 4.2.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.
- package/dist/action.d.ts +6 -5
- package/dist/ai.d.ts +118 -0
- package/dist/ai.js +13 -0
- package/dist/ai.js.map +1 -0
- package/dist/api.d.ts +19 -3
- package/dist/api.js +20 -0
- package/dist/api.js.map +1 -1
- package/dist/app.d.ts +2 -2
- package/dist/application.d.ts +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/context.d.ts +2 -2
- package/dist/driver.d.ts +185 -59
- package/dist/edge.d.ts +86 -0
- package/dist/edge.js +61 -0
- package/dist/edge.js.map +1 -0
- package/dist/field.d.ts +7 -6
- package/dist/formula.js.map +1 -1
- package/dist/gateway.d.ts +3 -3
- package/dist/hook.d.ts +21 -17
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/kernel-service.d.ts +84 -0
- package/dist/kernel-service.js +33 -0
- package/dist/kernel-service.js.map +1 -0
- package/dist/loader.d.ts +1 -1
- package/dist/logger.d.ts +126 -0
- package/dist/logger.js +95 -0
- package/dist/logger.js.map +1 -0
- package/dist/object.d.ts +42 -1
- package/dist/object.js +4 -0
- package/dist/object.js.map +1 -1
- package/dist/permission.d.ts +5 -5
- package/dist/plugin.d.ts +7 -2
- package/dist/query.d.ts +18 -71
- package/dist/registry.d.ts +5 -5
- package/dist/registry.js +3 -3
- package/dist/registry.js.map +1 -1
- package/dist/repository.d.ts +24 -15
- package/dist/sync.d.ts +184 -0
- package/dist/sync.js +10 -0
- package/dist/sync.js.map +1 -0
- package/dist/validation.d.ts +11 -11
- package/dist/workflow.d.ts +11 -11
- package/package.json +12 -6
package/dist/sync.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
package/dist/validation.d.ts
CHANGED
|
@@ -43,8 +43,8 @@ export interface ValidationAiContext {
|
|
|
43
43
|
external_dependency?: string;
|
|
44
44
|
/** Examples of valid/invalid data */
|
|
45
45
|
examples?: {
|
|
46
|
-
valid?:
|
|
47
|
-
invalid?:
|
|
46
|
+
valid?: unknown[];
|
|
47
|
+
invalid?: unknown[];
|
|
48
48
|
};
|
|
49
49
|
/** Algorithm description for complex validation */
|
|
50
50
|
algorithm?: string;
|
|
@@ -66,7 +66,7 @@ export interface ValidationCondition {
|
|
|
66
66
|
/** Comparison operator */
|
|
67
67
|
operator?: ValidationOperator;
|
|
68
68
|
/** Value to compare against */
|
|
69
|
-
value?:
|
|
69
|
+
value?: unknown;
|
|
70
70
|
/** Field name to compare against (for cross-field validation) */
|
|
71
71
|
compare_to?: string;
|
|
72
72
|
/** Expression to evaluate */
|
|
@@ -199,7 +199,7 @@ export interface CrossFieldValidationRule extends ValidationRule {
|
|
|
199
199
|
/** Shorthand: Comparison operator (alternative to using rule property) */
|
|
200
200
|
operator?: ValidationOperator;
|
|
201
201
|
/** Shorthand: Value to compare against (mutually exclusive with compare_to) */
|
|
202
|
-
value?:
|
|
202
|
+
value?: unknown;
|
|
203
203
|
/** Shorthand: Field name to compare against for cross-field validation (mutually exclusive with value) */
|
|
204
204
|
compare_to?: string;
|
|
205
205
|
}
|
|
@@ -223,7 +223,7 @@ export interface StateMachineValidationRule extends ValidationRule {
|
|
|
223
223
|
/** Initial states */
|
|
224
224
|
initial_states?: string[];
|
|
225
225
|
/** Transition conditions */
|
|
226
|
-
transition_conditions?: Record<string,
|
|
226
|
+
transition_conditions?: Record<string, unknown>;
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
229
|
* Uniqueness validation rule.
|
|
@@ -266,7 +266,7 @@ export interface CustomValidationRule extends ValidationRule {
|
|
|
266
266
|
/** Error message template */
|
|
267
267
|
error_message_template?: string;
|
|
268
268
|
/** Message parameters */
|
|
269
|
-
message_params?: Record<string,
|
|
269
|
+
message_params?: Record<string, unknown>;
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
272
|
* Union type for all validation rules.
|
|
@@ -313,18 +313,18 @@ export interface ValidationContext {
|
|
|
313
313
|
/** Previous record data (for updates) */
|
|
314
314
|
previousRecord?: ObjectDoc;
|
|
315
315
|
/** Current user */
|
|
316
|
-
user?:
|
|
316
|
+
user?: unknown;
|
|
317
317
|
/** API access for queries */
|
|
318
|
-
api?:
|
|
318
|
+
api?: unknown;
|
|
319
319
|
/** HTTP client for external calls */
|
|
320
|
-
http?:
|
|
320
|
+
http?: unknown;
|
|
321
321
|
/** Operation type */
|
|
322
322
|
operation: ValidationTrigger;
|
|
323
323
|
/** Additional metadata */
|
|
324
324
|
metadata?: {
|
|
325
325
|
objectName: string;
|
|
326
326
|
ruleName: string;
|
|
327
|
-
[key: string]:
|
|
327
|
+
[key: string]: unknown;
|
|
328
328
|
};
|
|
329
329
|
/** Changed fields (for updates) */
|
|
330
330
|
changedFields?: string[];
|
|
@@ -346,7 +346,7 @@ export interface ValidationRuleResult {
|
|
|
346
346
|
/** Field(s) that failed validation */
|
|
347
347
|
fields?: string[];
|
|
348
348
|
/** Additional context */
|
|
349
|
-
context?:
|
|
349
|
+
context?: unknown;
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
352
|
* Overall validation result for a record.
|
package/dist/workflow.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ export interface ApprovalAction {
|
|
|
85
85
|
/** Workflow outcome if this action is chosen */
|
|
86
86
|
outcome?: 'approved' | 'rejected' | 'pending' | 'custom';
|
|
87
87
|
/** Field updates to apply */
|
|
88
|
-
updates?: Record<string,
|
|
88
|
+
updates?: Record<string, unknown>;
|
|
89
89
|
/** Comment field name */
|
|
90
90
|
comment_field?: string;
|
|
91
91
|
/** Whether comment is required */
|
|
@@ -98,7 +98,7 @@ export interface FieldUpdateConfig {
|
|
|
98
98
|
/** Field to update */
|
|
99
99
|
field: string;
|
|
100
100
|
/** New value */
|
|
101
|
-
value?:
|
|
101
|
+
value?: unknown;
|
|
102
102
|
/** Expression to calculate value */
|
|
103
103
|
expression?: string;
|
|
104
104
|
/** Copy value from another field */
|
|
@@ -135,7 +135,7 @@ export interface CreateRecordConfig {
|
|
|
135
135
|
/** Field mappings from trigger record */
|
|
136
136
|
field_mappings?: Record<string, string>;
|
|
137
137
|
/** Static field values */
|
|
138
|
-
values?: Record<string,
|
|
138
|
+
values?: Record<string, unknown>;
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
141
|
* Conditional branch configuration
|
|
@@ -189,13 +189,13 @@ export interface WebhookCallConfig {
|
|
|
189
189
|
/** Headers */
|
|
190
190
|
headers?: Record<string, string>;
|
|
191
191
|
/** Request body */
|
|
192
|
-
body?:
|
|
192
|
+
body?: unknown;
|
|
193
193
|
/** Body template */
|
|
194
194
|
body_template?: string;
|
|
195
195
|
/** Authentication configuration */
|
|
196
196
|
auth?: {
|
|
197
197
|
type: 'basic' | 'bearer' | 'api_key' | 'oauth2';
|
|
198
|
-
credentials?: Record<string,
|
|
198
|
+
credentials?: Record<string, unknown>;
|
|
199
199
|
};
|
|
200
200
|
/** Timeout in milliseconds */
|
|
201
201
|
timeout?: number;
|
|
@@ -283,18 +283,18 @@ export interface WorkflowConfig {
|
|
|
283
283
|
/** Initial step to execute */
|
|
284
284
|
initial_step?: string;
|
|
285
285
|
/** Workflow variables */
|
|
286
|
-
variables?: Record<string,
|
|
286
|
+
variables?: Record<string, unknown>;
|
|
287
287
|
/** Success outcome field updates */
|
|
288
288
|
on_success?: {
|
|
289
289
|
/** Field updates on successful completion */
|
|
290
|
-
updates?: Record<string,
|
|
290
|
+
updates?: Record<string, unknown>;
|
|
291
291
|
/** Notification on success */
|
|
292
292
|
notification?: NotificationConfig;
|
|
293
293
|
};
|
|
294
294
|
/** Failure outcome configuration */
|
|
295
295
|
on_failure?: {
|
|
296
296
|
/** Field updates on failure */
|
|
297
|
-
updates?: Record<string,
|
|
297
|
+
updates?: Record<string, unknown>;
|
|
298
298
|
/** Notification on failure */
|
|
299
299
|
notification?: NotificationConfig;
|
|
300
300
|
};
|
|
@@ -314,7 +314,7 @@ export interface WorkflowConfig {
|
|
|
314
314
|
edit?: string[];
|
|
315
315
|
};
|
|
316
316
|
/** Custom workflow configuration */
|
|
317
|
-
config?: Record<string,
|
|
317
|
+
config?: Record<string, unknown>;
|
|
318
318
|
/** AI context for workflow generation */
|
|
319
319
|
ai_context?: {
|
|
320
320
|
/** Business process description */
|
|
@@ -352,7 +352,7 @@ export interface WorkflowInstance {
|
|
|
352
352
|
/** Error message (if failed) */
|
|
353
353
|
error?: string;
|
|
354
354
|
/** Execution context */
|
|
355
|
-
context?: Record<string,
|
|
355
|
+
context?: Record<string, unknown>;
|
|
356
356
|
/** Step history */
|
|
357
357
|
step_history?: Array<{
|
|
358
358
|
step: string;
|
|
@@ -360,6 +360,6 @@ export interface WorkflowInstance {
|
|
|
360
360
|
started_at: string;
|
|
361
361
|
completed_at?: string;
|
|
362
362
|
actor?: string;
|
|
363
|
-
result?:
|
|
363
|
+
result?: unknown;
|
|
364
364
|
}>;
|
|
365
365
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectql/types",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "Pure TypeScript type definitions and interfaces for the ObjectQL protocol - The Contract",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"objectql",
|
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"main": "dist/index.js",
|
|
19
19
|
"types": "dist/index.d.ts",
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"default": "./dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
20
27
|
"files": [
|
|
21
28
|
"dist",
|
|
22
29
|
"schemas"
|
|
@@ -24,13 +31,12 @@
|
|
|
24
31
|
"scripts": {
|
|
25
32
|
"build": "tsc",
|
|
26
33
|
"generate:schemas": "node scripts/generate-schemas.js",
|
|
27
|
-
"test": "
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@objectstack/spec": "^1.0.0"
|
|
34
|
+
"test": "vitest run"
|
|
31
35
|
},
|
|
36
|
+
"dependencies": {},
|
|
32
37
|
"devDependencies": {
|
|
38
|
+
"@objectstack/spec": "^3.0.2",
|
|
33
39
|
"ts-json-schema-generator": "^2.4.0",
|
|
34
|
-
"zod": "^3.
|
|
40
|
+
"zod": "^4.3.6"
|
|
35
41
|
}
|
|
36
42
|
}
|