@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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.js","sourceRoot":"","sources":["../src/sync.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -43,8 +43,8 @@ export interface ValidationAiContext {
43
43
  external_dependency?: string;
44
44
  /** Examples of valid/invalid data */
45
45
  examples?: {
46
- valid?: any[];
47
- invalid?: any[];
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?: any;
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?: any;
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, any>;
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, any>;
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?: any;
316
+ user?: unknown;
317
317
  /** API access for queries */
318
- api?: any;
318
+ api?: unknown;
319
319
  /** HTTP client for external calls */
320
- http?: any;
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]: any;
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?: any;
349
+ context?: unknown;
350
350
  }
351
351
  /**
352
352
  * Overall validation result for a record.
@@ -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, any>;
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?: any;
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, any>;
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?: any;
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, any>;
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, any>;
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, any>;
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, any>;
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, any>;
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, any>;
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?: any;
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.0",
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": "jest --passWithNoTests"
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.23.8"
40
+ "zod": "^4.3.6"
35
41
  }
36
42
  }