@json-eval-rs/vanilla 0.0.71 → 0.0.73

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.
@@ -1,666 +1,673 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Get library version (alias)
5
- */
6
- export function version(): string;
7
- /**
8
- * Get the library version
9
- */
10
- export function getVersion(): string;
11
- /**
12
- * Initialize the library (sets up panic hook)
13
- */
14
- export function init(): void;
3
+
15
4
  /**
16
5
  * WebAssembly wrapper for JSONEval
17
6
  */
18
7
  export class JSONEvalWasm {
19
- free(): void;
20
- [Symbol.dispose](): void;
21
- /**
22
- * Evaluate and return as JsValue for direct JavaScript object access
23
- *
24
- * @param data - JSON data string
25
- * @param context - Optional context data JSON string
26
- * @returns Evaluated schema as JavaScript object
27
- */
28
- evaluateJS(data: string, context?: string | null, paths?: string[] | null): any;
29
- /**
30
- * Compile JSON logic and return a global ID
31
- * @param logic_str - JSON logic expression as a string
32
- * @returns Compiled logic ID as number (u64)
33
- */
34
- compileLogic(logic_str: string): number;
35
- /**
36
- * Evaluate dependents when a field changes (returns array of changes as JSON string)
37
- *
38
- * @param changedPath - Path of the field that changed
39
- * @param data - Optional updated JSON data string
40
- * @param context - Optional context data JSON string
41
- * @returns Array of dependent change objects as JSON string
42
- */
43
- evaluateDependents(changed_path: string, data: string | null | undefined, context: string | null | undefined, re_evaluate: boolean): string;
44
- /**
45
- * Compile and run JSON logic from a JSON logic string
46
- * @param logic_str - JSON logic expression as a string
47
- * @param data - Optional JSON data string
48
- * @param context - Optional JSON context string
49
- * @returns Result as JavaScript object
50
- */
51
- compileAndRunLogic(logic_str: string, data?: string | null, context?: string | null): any;
52
- /**
53
- * Static helper to evaluate logic without creating an instance
54
- * @param logic_str - JSON logic expression string
55
- * @param data - Optional JSON data string
56
- * @param context - Optional JSON context string
57
- * @returns Result as JavaScript object
58
- */
59
- static evaluateLogic(logic_str: string, data?: string | null, context?: string | null): any;
60
- /**
61
- * Evaluate dependents and return as JavaScript object
62
- *
63
- * @param changedPathsJson - JSON array of field paths that changed
64
- * @param data - Optional updated JSON data string
65
- * @param context - Optional context data JSON string
66
- * @param reEvaluate - If true, performs full evaluation after processing dependents
67
- * @returns Array of dependent change objects as JavaScript object
68
- */
69
- evaluateDependentsJS(changed_paths_json: string, data: string | null | undefined, context: string | null | undefined, re_evaluate: boolean): any;
70
- /**
71
- * Evaluate schema with provided data (does not return schema - use getEvaluatedSchema() for that)
72
- *
73
- * @param data - JSON data string
74
- * @param context - Optional context data JSON string
75
- * @throws Error if evaluation fails
76
- */
77
- evaluate(data: string, context?: string | null, paths?: string[] | null): void;
78
- /**
79
- * Run pre-compiled logic by ID
80
- * @param logic_id - Compiled logic ID from compileLogic
81
- * @param data - Optional JSON data string
82
- * @param context - Optional JSON context string
83
- * @returns Result as JavaScript object
84
- */
85
- runLogic(logic_id: number, data?: string | null, context?: string | null): any;
86
- /**
87
- * Validate data and return as plain JavaScript object (Worker-safe)
88
- *
89
- * @param data - JSON data string
90
- * @param context - Optional context data JSON string
91
- * @returns Plain JavaScript object with validation result
92
- */
93
- validateJS(data: string, context?: string | null): any;
94
- /**
95
- * Validate data against schema rules with optional path filtering
96
- *
97
- * @param data - JSON data string
98
- * @param context - Optional context data JSON string
99
- * @param paths - Optional array of paths to validate (null for all)
100
- * @returns ValidationResult
101
- */
102
- validatePaths(data: string, context?: string | null, paths?: string[] | null): ValidationResult;
103
- /**
104
- * Validate with path filtering and return as plain JavaScript object (Worker-safe)
105
- *
106
- * @param data - JSON data string
107
- * @param context - Optional context data JSON string
108
- * @param paths - Optional array of paths to validate (null for all)
109
- * @returns Plain JavaScript object with validation result
110
- */
111
- validatePathsJS(data: string, context?: string | null, paths?: string[] | null): any;
112
- /**
113
- * Validate data against schema rules
114
- *
115
- * @param data - JSON data string
116
- * @param context - Optional context data JSON string
117
- * @returns ValidationResult
118
- */
119
- validate(data: string, context?: string | null): ValidationResult;
120
- /**
121
- * Create a new JSONEval instance from a cached ParsedSchema
122
- *
123
- * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
124
- * @param context - Optional context data JSON string
125
- * @param data - Optional initial data JSON string
126
- */
127
- static newFromCache(cache_key: string, context?: string | null, data?: string | null): JSONEvalWasm;
128
- /**
129
- * Create a new JSONEval instance from MessagePack-encoded schema
130
- *
131
- * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
132
- * @param context - Optional context data JSON string
133
- * @param data - Optional initial data JSON string
134
- */
135
- static newFromMsgpack(schema_msgpack: Uint8Array, context?: string | null, data?: string | null): JSONEvalWasm;
136
- /**
137
- * Set timezone offset for datetime operations (TODAY, NOW)
138
- *
139
- * @param offsetMinutes - Timezone offset in minutes from UTC (e.g., 420 for UTC+7, -300 for UTC-5)
140
- * Pass null or undefined to reset to UTC
141
- */
142
- setTimezoneOffset(offset_minutes?: number | null): void;
143
- /**
144
- * Create a new JSONEval instance
145
- *
146
- * @param schema - JSON schema string
147
- * @param context - Optional context data JSON string
148
- * @param data - Optional initial data JSON string
149
- */
150
- constructor(schema: string, context?: string | null, data?: string | null);
151
- /**
152
- * Cancel any currently running operation
153
- */
154
- cancel(): void;
155
- /**
156
- * Get cache statistics
157
- *
158
- * @returns Cache statistics as JavaScript object with hits, misses, and entries
159
- */
160
- cacheStats(): any;
161
- /**
162
- * Clear the evaluation cache
163
- */
164
- clearCache(): void;
165
- /**
166
- * Enable evaluation caching
167
- * Useful for reusing JSONEval instances with different data
168
- */
169
- enableCache(): void;
170
- /**
171
- * Disable evaluation caching
172
- * Useful for web API usage where each request creates a new JSONEval instance
173
- * Improves performance by skipping cache operations that have no benefit for single-use instances
174
- */
175
- disableCache(): void;
176
- /**
177
- * Check if evaluation caching is enabled
178
- *
179
- * @returns true if caching is enabled, false otherwise
180
- */
181
- isCacheEnabled(): boolean;
182
- /**
183
- * Get the number of cached entries
184
- *
185
- * @returns Number of cached entries
186
- */
187
- cacheLen(): number;
188
- /**
189
- * Resolve layout with optional evaluation
190
- *
191
- * @param evaluate - If true, runs evaluation before resolving layout
192
- * @throws Error if resolve fails
193
- */
194
- resolveLayout(evaluate: boolean): void;
195
- /**
196
- * Reload schema with new data
197
- *
198
- * @param schema - New JSON schema string
199
- * @param context - Optional context data JSON string
200
- * @param data - Optional initial data JSON string
201
- */
202
- reloadSchema(schema: string, context?: string | null, data?: string | null): void;
203
- /**
204
- * Get all schema values (evaluations ending with .value)
205
- * Mutates internal data by overriding with values from value evaluations
206
- *
207
- * @returns Modified data as JavaScript object
208
- */
209
- getSchemaValue(): any;
210
- /**
211
- * Get a value from the schema using dotted path notation
212
- *
213
- * @param path - Dotted path to the value (e.g., "properties.field.value")
214
- * @returns Value as JSON string or null if not found
215
- */
216
- getSchemaByPath(path: string): string | undefined;
217
- /**
218
- * Get values from schema using multiple dotted paths
219
- * @param pathsJson - JSON array of dotted paths
220
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
221
- * @returns Data in specified format as JSON string
222
- */
223
- getSchemaByPaths(paths_json: string, format: number): string;
224
- /**
225
- * Get the evaluated schema with optional layout resolution
226
- *
227
- * @param skipLayout - Whether to skip layout resolution
228
- * @returns Evaluated schema as JSON string
229
- */
230
- getEvaluatedSchema(skip_layout: boolean): string;
231
- /**
232
- * Get a value from the schema using dotted path notation as JavaScript object
233
- *
234
- * @param path - Dotted path to the value (e.g., "properties.field.value")
235
- * @returns Value as JavaScript object or null if not found
236
- */
237
- getSchemaByPathJS(path: string): any;
238
- /**
239
- * Reload schema from MessagePack-encoded bytes
240
- *
241
- * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
242
- * @param context - Optional context data JSON string
243
- * @param data - Optional initial data JSON string
244
- */
245
- reloadSchemaMsgpack(schema_msgpack: Uint8Array, context?: string | null, data?: string | null): void;
246
- /**
247
- * Get values from schema using multiple dotted paths (JS object)
248
- * @param pathsJson - JSON array of dotted paths
249
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
250
- * @returns Data in specified format as JavaScript object
251
- */
252
- getSchemaByPathsJS(paths_json: string, format: number): any;
253
- /**
254
- * Get all schema values as array of path-value pairs
255
- * Returns [{path: "", value: ""}, ...]
256
- *
257
- * @returns Array of {path, value} objects as JavaScript array
258
- */
259
- getSchemaValueArray(): any;
260
- /**
261
- * Get the evaluated schema as JavaScript object
262
- *
263
- * @param skipLayout - Whether to skip layout resolution
264
- * @returns Evaluated schema as JavaScript object
265
- */
266
- getEvaluatedSchemaJS(skip_layout: boolean): any;
267
- /**
268
- * Get all schema values as object with dotted path keys
269
- * Returns {path: value, ...}
270
- *
271
- * @returns Flat object with dotted paths as keys
272
- */
273
- getSchemaValueObject(): any;
274
- /**
275
- * Reload schema from ParsedSchemaCache using a cache key
276
- *
277
- * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
278
- * @param context - Optional context data JSON string
279
- * @param data - Optional initial data JSON string
280
- */
281
- reloadSchemaFromCache(cache_key: string, context?: string | null, data?: string | null): void;
282
- /**
283
- * Get a value from the evaluated schema using dotted path notation
284
- *
285
- * @param path - Dotted path to the value (e.g., "properties.field.value")
286
- * @param skipLayout - Whether to skip layout resolution
287
- * @returns Value as JSON string or null if not found
288
- */
289
- getEvaluatedSchemaByPath(path: string, skip_layout: boolean): string | undefined;
290
- /**
291
- * Get the evaluated schema in MessagePack format
292
- *
293
- * @param skipLayout - Whether to skip layout resolution
294
- * @returns Evaluated schema as MessagePack bytes (Uint8Array)
295
- *
296
- * # Zero-Copy Optimization
297
- *
298
- * This method returns MessagePack binary data with minimal copying:
299
- * 1. Serializes schema to Vec<u8> in Rust (unavoidable)
300
- * 2. wasm-bindgen transfers Vec<u8> to JS as Uint8Array (optimized)
301
- * 3. Result is a Uint8Array view (minimal overhead)
302
- *
303
- * MessagePack format is 20-50% smaller than JSON, ideal for web/WASM.
304
- */
305
- getEvaluatedSchemaMsgpack(skip_layout: boolean): Uint8Array;
306
- /**
307
- * Get values from evaluated schema using multiple dotted paths
308
- * @param pathsJson - JSON array of dotted paths
309
- * @param skipLayout - Whether to skip layout resolution
310
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
311
- * @returns Data in specified format as JSON string
312
- */
313
- getEvaluatedSchemaByPaths(paths_json: string, skip_layout: boolean, format: number): string;
314
- /**
315
- * Get a value from the evaluated schema using dotted path notation as JavaScript object
316
- *
317
- * @param path - Dotted path to the value (e.g., "properties.field.value")
318
- * @param skipLayout - Whether to skip layout resolution
319
- * @returns Value as JavaScript object or null if not found
320
- */
321
- getEvaluatedSchemaByPathJS(path: string, skip_layout: boolean): any;
322
- /**
323
- * Get values from evaluated schema using multiple dotted paths (JS object)
324
- * @param pathsJson - JSON array of dotted paths
325
- * @param skipLayout - Whether to skip layout resolution
326
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
327
- * @returns Data in specified format as JavaScript object
328
- */
329
- getEvaluatedSchemaByPathsJS(paths_json: string, skip_layout: boolean, format: number): any;
330
- /**
331
- * Get the evaluated schema without $params field
332
- *
333
- * @param skipLayout - Whether to skip layout resolution
334
- * @returns Evaluated schema as JSON string
335
- */
336
- getEvaluatedSchemaWithoutParams(skip_layout: boolean): string;
337
- /**
338
- * Get the evaluated schema without $params as JavaScript object
339
- *
340
- * @param skipLayout - Whether to skip layout resolution
341
- * @returns Evaluated schema as JavaScript object
342
- */
343
- getEvaluatedSchemaWithoutParamsJS(skip_layout: boolean): any;
344
- /**
345
- * Check if a subform exists at the given path
346
- *
347
- * @param subformPath - Path to check
348
- * @returns True if subform exists, false otherwise
349
- */
350
- hasSubform(subform_path: string): boolean;
351
- /**
352
- * Evaluate a subform with data
353
- *
354
- * @param subformPath - Path to the subform (e.g., "#/riders")
355
- * @param data - JSON data string for the subform
356
- * @param context - Optional context data JSON string
357
- * @param paths - Optional array of paths to evaluate (JSON string array)
358
- * @throws Error if evaluation fails
359
- */
360
- evaluateSubform(subform_path: string, data: string, context?: string | null, paths?: string[] | null): void;
361
- /**
362
- * Validate subform data against its schema rules
363
- *
364
- * @param subformPath - Path to the subform
365
- * @param data - JSON data string for the subform
366
- * @param context - Optional context data JSON string
367
- * @returns ValidationResult
368
- */
369
- validateSubform(subform_path: string, data: string, context?: string | null): ValidationResult;
370
- /**
371
- * Get list of available subform paths
372
- *
373
- * @returns Array of subform paths
374
- */
375
- getSubformPaths(): string[];
376
- /**
377
- * Resolve layout for subform
378
- *
379
- * @param subformPath - Path to the subform
380
- * @param evaluate - If true, runs evaluation before resolving layout
381
- * @throws Error if resolve fails
382
- */
383
- resolveLayoutSubform(subform_path: string, evaluate: boolean): void;
384
- /**
385
- * Get schema value from subform in nested object format (all .value fields).
386
- * Returns a hierarchical object structure mimicking the schema.
387
- *
388
- * @param subformPath - Path to the subform
389
- * @returns Modified data as JavaScript object (Nested)
390
- */
391
- getSchemaValueSubform(subform_path: string): any;
392
- /**
393
- * Get schema by specific path from subform (returns JSON string)
394
- * @param subformPath - Path to the subform
395
- * @param schemaPath - Path within the subform
396
- * @returns Value as JSON string or null if not found
397
- */
398
- getSchemaByPathSubform(subform_path: string, schema_path: string): string | undefined;
399
- /**
400
- * Evaluate dependents in subform when fields change
401
- *
402
- * @param subformPath - Path to the subform
403
- * @param changedPaths - JSON array of paths that changed
404
- * @param data - Optional updated JSON data string
405
- * @param context - Optional context data JSON string
406
- * @returns Array of dependent change objects as JSON string
407
- */
408
- evaluateDependentsSubform(subform_path: string, changed_paths_json: string, data: string | null | undefined, context: string | null | undefined, re_evaluate: boolean): string;
409
- /**
410
- * Get schema by multiple paths from subform
411
- * @param subformPath - Path to the subform
412
- * @param pathsJson - JSON array of dotted paths
413
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
414
- * @returns Data in specified format as JSON string
415
- */
416
- getSchemaByPathsSubform(subform_path: string, paths_json: string, format: number): string;
417
- /**
418
- * Get evaluated schema from subform
419
- *
420
- * @param subformPath - Path to the subform
421
- * @param resolveLayout - Whether to resolve layout
422
- * @returns Evaluated schema as JSON string
423
- */
424
- getEvaluatedSchemaSubform(subform_path: string, resolve_layout: boolean): string;
425
- /**
426
- * Get schema by specific path from subform (returns JS object)
427
- * @param subformPath - Path to the subform
428
- * @param schemaPath - Path within the subform
429
- * @returns Value as JavaScript object or null if not found
430
- */
431
- getSchemaByPathSubformJS(subform_path: string, schema_path: string): any;
432
- /**
433
- * Evaluate dependents in subform and return as JavaScript object
434
- *
435
- * @param subformPath - Path to the subform
436
- * @param changedPath - Path of the field that changed
437
- * @param data - Optional updated JSON data string
438
- * @param context - Optional context data JSON string
439
- * @returns Array of dependent change objects as JavaScript object
440
- */
441
- evaluateDependentsSubformJS(subform_path: string, changed_paths_json: string, data: string | null | undefined, context: string | null | undefined, re_evaluate: boolean): any;
442
- /**
443
- * Get schema by multiple paths from subform (JS object)
444
- * @param subformPath - Path to the subform
445
- * @param paths - Array of dotted paths
446
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
447
- * @returns Data in specified format as JavaScript object
448
- */
449
- getSchemaByPathsSubformJS(subform_path: string, paths_json: string, format: number): any;
450
- /**
451
- * Get schema values from subform as a flat array of path-value pairs.
452
- * Returns an array like `[{path: "field.sub", value: 123}, ...]`.
453
- *
454
- * @param subformPath - Path to the subform
455
- * @returns Array of {path, value} objects
456
- */
457
- getSchemaValueArraySubform(subform_path: string): any;
458
- /**
459
- * Get evaluated schema from subform as JavaScript object
460
- *
461
- * @param subformPath - Path to the subform
462
- * @param resolveLayout - Whether to resolve layout
463
- * @returns Evaluated schema as JavaScript object
464
- */
465
- getEvaluatedSchemaSubformJS(subform_path: string, resolve_layout: boolean): any;
466
- /**
467
- * Get schema values from subform as a flat object with dotted path keys.
468
- * Returns an object like `{"field.sub": 123, ...}`.
469
- *
470
- * @param subformPath - Path to the subform
471
- * @returns Flat object with dotted paths as keys
472
- */
473
- getSchemaValueObjectSubform(subform_path: string): any;
474
- /**
475
- * Get evaluated schema by specific path from subform
476
- *
477
- * @param subformPath - Path to the subform
478
- * @param schemaPath - Dotted path to the value within the subform
479
- * @param skipLayout - Whether to skip layout resolution
480
- * @returns Value as JSON string or null if not found
481
- */
482
- getEvaluatedSchemaByPathSubform(subform_path: string, schema_path: string, skip_layout: boolean): string | undefined;
483
- /**
484
- * Get values from the evaluated schema of a subform using multiple dotted path notations (returns JSON string)
485
- * @param subformPath - Path to the subform
486
- * @param pathsJson - JSON array of dotted paths
487
- * @param skipLayout - Whether to skip layout resolution
488
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
489
- * @returns Data in specified format as JSON string
490
- */
491
- getEvaluatedSchemaByPathsSubform(subform_path: string, paths_json: string, skip_layout: boolean, format: number): string;
492
- /**
493
- * Get evaluated schema by specific path from subform as JavaScript object
494
- *
495
- * @param subformPath - Path to the subform
496
- * @param schemaPath - Dotted path to the value within the subform
497
- * @param skipLayout - Whether to skip layout resolution
498
- * @returns Value as JavaScript object or null if not found
499
- */
500
- getEvaluatedSchemaByPathSubformJS(subform_path: string, schema_path: string, skip_layout: boolean): any;
501
- /**
502
- * Get values from the evaluated schema of a subform using multiple dotted path notations (returns JS object)
503
- * @param subformPath - Path to the subform
504
- * @param paths - Array of dotted paths
505
- * @param skipLayout - Whether to skip layout resolution
506
- * @param format - Return format (0=Nested, 1=Flat, 2=Array)
507
- * @returns Data in specified format as JavaScript object
508
- */
509
- getEvaluatedSchemaByPathsSubformJS(subform_path: string, paths_json: string, skip_layout: boolean, format: number): any;
510
- /**
511
- * Get evaluated schema without $params from subform
512
- *
513
- * @param subformPath - Path to the subform
514
- * @param resolveLayout - Whether to resolve layout
515
- * @returns Evaluated schema as JSON string
516
- */
517
- getEvaluatedSchemaWithoutParamsSubform(subform_path: string, resolve_layout: boolean): string;
518
- /**
519
- * Get evaluated schema without $params from subform as JavaScript object
520
- *
521
- * @param subformPath - Path to the subform
522
- * @param resolveLayout - Whether to resolve layout
523
- * @returns Evaluated schema as JavaScript object
524
- */
525
- getEvaluatedSchemaWithoutParamsSubformJS(subform_path: string, resolve_layout: boolean): any;
8
+ free(): void;
9
+ [Symbol.dispose](): void;
10
+ /**
11
+ * Get the number of cached entries
12
+ *
13
+ * @returns Number of cached entries
14
+ */
15
+ cacheLen(): number;
16
+ /**
17
+ * Get cache statistics
18
+ *
19
+ * @returns Cache statistics as JavaScript object with hits, misses, and entries
20
+ */
21
+ cacheStats(): any;
22
+ /**
23
+ * Cancel any currently running operation
24
+ */
25
+ cancel(): void;
26
+ /**
27
+ * Clear the evaluation cache
28
+ */
29
+ clearCache(): void;
30
+ /**
31
+ * Compile and run JSON logic from a JSON logic string
32
+ * @param logic_str - JSON logic expression as a string
33
+ * @param data - Optional JSON data string
34
+ * @param context - Optional JSON context string
35
+ * @returns Result as JavaScript object
36
+ */
37
+ compileAndRunLogic(logic_str: string, data?: string | null, context?: string | null): any;
38
+ /**
39
+ * Compile JSON logic and return a global ID
40
+ * @param logic_str - JSON logic expression as a string
41
+ * @returns Compiled logic ID as number (u64)
42
+ */
43
+ compileLogic(logic_str: string): number;
44
+ /**
45
+ * Disable evaluation caching
46
+ * Useful for web API usage where each request creates a new JSONEval instance
47
+ * Improves performance by skipping cache operations that have no benefit for single-use instances
48
+ */
49
+ disableCache(): void;
50
+ /**
51
+ * Enable evaluation caching
52
+ * Useful for reusing JSONEval instances with different data
53
+ */
54
+ enableCache(): void;
55
+ /**
56
+ * Evaluate schema with provided data (does not return schema - use getEvaluatedSchema() for that)
57
+ *
58
+ * @param data - JSON data string
59
+ * @param context - Optional context data JSON string
60
+ * @throws Error if evaluation fails
61
+ */
62
+ evaluate(data: string, context?: string | null, paths?: string[] | null): void;
63
+ /**
64
+ * Evaluate dependents when a field changes (returns array of changes as JSON string)
65
+ *
66
+ * @param changedPath - Path of the field that changed
67
+ * @param data - Optional updated JSON data string
68
+ * @param context - Optional context data JSON string
69
+ * @returns Array of dependent change objects as JSON string
70
+ */
71
+ evaluateDependents(changed_path: string, data: string | null | undefined, context: string | null | undefined, re_evaluate: boolean): string;
72
+ /**
73
+ * Evaluate dependents and return as JavaScript object
74
+ *
75
+ * @param changedPathsJson - JSON array of field paths that changed
76
+ * @param data - Optional updated JSON data string
77
+ * @param context - Optional context data JSON string
78
+ * @param reEvaluate - If true, performs full evaluation after processing dependents
79
+ * @returns Array of dependent change objects as JavaScript object
80
+ */
81
+ evaluateDependentsJS(changed_paths_json: string, data: string | null | undefined, context: string | null | undefined, re_evaluate: boolean): any;
82
+ /**
83
+ * Evaluate dependents in subform when fields change
84
+ *
85
+ * @param subformPath - Path to the subform
86
+ * @param changedPaths - JSON array of paths that changed
87
+ * @param data - Optional updated JSON data string
88
+ * @param context - Optional context data JSON string
89
+ * @returns Array of dependent change objects as JSON string
90
+ */
91
+ evaluateDependentsSubform(subform_path: string, changed_paths_json: string, data: string | null | undefined, context: string | null | undefined, re_evaluate: boolean): string;
92
+ /**
93
+ * Evaluate dependents in subform and return as JavaScript object
94
+ *
95
+ * @param subformPath - Path to the subform
96
+ * @param changedPath - Path of the field that changed
97
+ * @param data - Optional updated JSON data string
98
+ * @param context - Optional context data JSON string
99
+ * @returns Array of dependent change objects as JavaScript object
100
+ */
101
+ evaluateDependentsSubformJS(subform_path: string, changed_paths_json: string, data: string | null | undefined, context: string | null | undefined, re_evaluate: boolean): any;
102
+ /**
103
+ * Evaluate and return as JsValue for direct JavaScript object access
104
+ *
105
+ * @param data - JSON data string
106
+ * @param context - Optional context data JSON string
107
+ * @returns Evaluated schema as JavaScript object
108
+ */
109
+ evaluateJS(data: string, context?: string | null, paths?: string[] | null): any;
110
+ /**
111
+ * Static helper to evaluate logic without creating an instance
112
+ * @param logic_str - JSON logic expression string
113
+ * @param data - Optional JSON data string
114
+ * @param context - Optional JSON context string
115
+ * @returns Result as JavaScript object
116
+ */
117
+ static evaluateLogic(logic_str: string, data?: string | null, context?: string | null): any;
118
+ /**
119
+ * Evaluate a subform with data
120
+ *
121
+ * @param subformPath - Path to the subform (e.g., "#/riders")
122
+ * @param data - JSON data string for the subform
123
+ * @param context - Optional context data JSON string
124
+ * @param paths - Optional array of paths to evaluate (JSON string array)
125
+ * @throws Error if evaluation fails
126
+ */
127
+ evaluateSubform(subform_path: string, data: string, context?: string | null, paths?: string[] | null): void;
128
+ /**
129
+ * Get the evaluated schema with optional layout resolution
130
+ *
131
+ * @param skipLayout - Whether to skip layout resolution
132
+ * @returns Evaluated schema as JSON string
133
+ */
134
+ getEvaluatedSchema(skip_layout: boolean): string;
135
+ /**
136
+ * Get a value from the evaluated schema using dotted path notation
137
+ *
138
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
139
+ * @param skipLayout - Whether to skip layout resolution
140
+ * @returns Value as JSON string or null if not found
141
+ */
142
+ getEvaluatedSchemaByPath(path: string, skip_layout: boolean): string | undefined;
143
+ /**
144
+ * Get a value from the evaluated schema using dotted path notation as JavaScript object
145
+ *
146
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
147
+ * @param skipLayout - Whether to skip layout resolution
148
+ * @returns Value as JavaScript object or null if not found
149
+ */
150
+ getEvaluatedSchemaByPathJS(path: string, skip_layout: boolean): any;
151
+ /**
152
+ * Get evaluated schema by specific path from subform
153
+ *
154
+ * @param subformPath - Path to the subform
155
+ * @param schemaPath - Dotted path to the value within the subform
156
+ * @param skipLayout - Whether to skip layout resolution
157
+ * @returns Value as JSON string or null if not found
158
+ */
159
+ getEvaluatedSchemaByPathSubform(subform_path: string, schema_path: string, skip_layout: boolean): string | undefined;
160
+ /**
161
+ * Get evaluated schema by specific path from subform as JavaScript object
162
+ *
163
+ * @param subformPath - Path to the subform
164
+ * @param schemaPath - Dotted path to the value within the subform
165
+ * @param skipLayout - Whether to skip layout resolution
166
+ * @returns Value as JavaScript object or null if not found
167
+ */
168
+ getEvaluatedSchemaByPathSubformJS(subform_path: string, schema_path: string, skip_layout: boolean): any;
169
+ /**
170
+ * Get values from evaluated schema using multiple dotted paths
171
+ * @param pathsJson - JSON array of dotted paths
172
+ * @param skipLayout - Whether to skip layout resolution
173
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
174
+ * @returns Data in specified format as JSON string
175
+ */
176
+ getEvaluatedSchemaByPaths(paths_json: string, skip_layout: boolean, format: number): string;
177
+ /**
178
+ * Get values from evaluated schema using multiple dotted paths (JS object)
179
+ * @param pathsJson - JSON array of dotted paths
180
+ * @param skipLayout - Whether to skip layout resolution
181
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
182
+ * @returns Data in specified format as JavaScript object
183
+ */
184
+ getEvaluatedSchemaByPathsJS(paths_json: string, skip_layout: boolean, format: number): any;
185
+ /**
186
+ * Get values from the evaluated schema of a subform using multiple dotted path notations (returns JSON string)
187
+ * @param subformPath - Path to the subform
188
+ * @param pathsJson - JSON array of dotted paths
189
+ * @param skipLayout - Whether to skip layout resolution
190
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
191
+ * @returns Data in specified format as JSON string
192
+ */
193
+ getEvaluatedSchemaByPathsSubform(subform_path: string, paths_json: string, skip_layout: boolean, format: number): string;
194
+ /**
195
+ * Get values from the evaluated schema of a subform using multiple dotted path notations (returns JS object)
196
+ * @param subformPath - Path to the subform
197
+ * @param paths - Array of dotted paths
198
+ * @param skipLayout - Whether to skip layout resolution
199
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
200
+ * @returns Data in specified format as JavaScript object
201
+ */
202
+ getEvaluatedSchemaByPathsSubformJS(subform_path: string, paths_json: string, skip_layout: boolean, format: number): any;
203
+ /**
204
+ * Get the evaluated schema as JavaScript object
205
+ *
206
+ * @param skipLayout - Whether to skip layout resolution
207
+ * @returns Evaluated schema as JavaScript object
208
+ */
209
+ getEvaluatedSchemaJS(skip_layout: boolean): any;
210
+ /**
211
+ * Get the evaluated schema in MessagePack format
212
+ *
213
+ * @param skipLayout - Whether to skip layout resolution
214
+ * @returns Evaluated schema as MessagePack bytes (Uint8Array)
215
+ *
216
+ * # Zero-Copy Optimization
217
+ *
218
+ * This method returns MessagePack binary data with minimal copying:
219
+ * 1. Serializes schema to Vec<u8> in Rust (unavoidable)
220
+ * 2. wasm-bindgen transfers Vec<u8> to JS as Uint8Array (optimized)
221
+ * 3. Result is a Uint8Array view (minimal overhead)
222
+ *
223
+ * MessagePack format is 20-50% smaller than JSON, ideal for web/WASM.
224
+ */
225
+ getEvaluatedSchemaMsgpack(skip_layout: boolean): Uint8Array;
226
+ /**
227
+ * Get evaluated schema from subform
228
+ *
229
+ * @param subformPath - Path to the subform
230
+ * @param resolveLayout - Whether to resolve layout
231
+ * @returns Evaluated schema as JSON string
232
+ */
233
+ getEvaluatedSchemaSubform(subform_path: string, resolve_layout: boolean): string;
234
+ /**
235
+ * Get evaluated schema from subform as JavaScript object
236
+ *
237
+ * @param subformPath - Path to the subform
238
+ * @param resolveLayout - Whether to resolve layout
239
+ * @returns Evaluated schema as JavaScript object
240
+ */
241
+ getEvaluatedSchemaSubformJS(subform_path: string, resolve_layout: boolean): any;
242
+ /**
243
+ * Get the evaluated schema without $params field
244
+ *
245
+ * @param skipLayout - Whether to skip layout resolution
246
+ * @returns Evaluated schema as JSON string
247
+ */
248
+ getEvaluatedSchemaWithoutParams(skip_layout: boolean): string;
249
+ /**
250
+ * Get the evaluated schema without $params as JavaScript object
251
+ *
252
+ * @param skipLayout - Whether to skip layout resolution
253
+ * @returns Evaluated schema as JavaScript object
254
+ */
255
+ getEvaluatedSchemaWithoutParamsJS(skip_layout: boolean): any;
256
+ /**
257
+ * Get evaluated schema without $params from subform
258
+ *
259
+ * @param subformPath - Path to the subform
260
+ * @param resolveLayout - Whether to resolve layout
261
+ * @returns Evaluated schema as JSON string
262
+ */
263
+ getEvaluatedSchemaWithoutParamsSubform(subform_path: string, resolve_layout: boolean): string;
264
+ /**
265
+ * Get evaluated schema without $params from subform as JavaScript object
266
+ *
267
+ * @param subformPath - Path to the subform
268
+ * @param resolveLayout - Whether to resolve layout
269
+ * @returns Evaluated schema as JavaScript object
270
+ */
271
+ getEvaluatedSchemaWithoutParamsSubformJS(subform_path: string, resolve_layout: boolean): any;
272
+ /**
273
+ * Get a value from the schema using dotted path notation
274
+ *
275
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
276
+ * @returns Value as JSON string or null if not found
277
+ */
278
+ getSchemaByPath(path: string): string | undefined;
279
+ /**
280
+ * Get a value from the schema using dotted path notation as JavaScript object
281
+ *
282
+ * @param path - Dotted path to the value (e.g., "properties.field.value")
283
+ * @returns Value as JavaScript object or null if not found
284
+ */
285
+ getSchemaByPathJS(path: string): any;
286
+ /**
287
+ * Get schema by specific path from subform (returns JSON string)
288
+ * @param subformPath - Path to the subform
289
+ * @param schemaPath - Path within the subform
290
+ * @returns Value as JSON string or null if not found
291
+ */
292
+ getSchemaByPathSubform(subform_path: string, schema_path: string): string | undefined;
293
+ /**
294
+ * Get schema by specific path from subform (returns JS object)
295
+ * @param subformPath - Path to the subform
296
+ * @param schemaPath - Path within the subform
297
+ * @returns Value as JavaScript object or null if not found
298
+ */
299
+ getSchemaByPathSubformJS(subform_path: string, schema_path: string): any;
300
+ /**
301
+ * Get values from schema using multiple dotted paths
302
+ * @param pathsJson - JSON array of dotted paths
303
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
304
+ * @returns Data in specified format as JSON string
305
+ */
306
+ getSchemaByPaths(paths_json: string, format: number): string;
307
+ /**
308
+ * Get values from schema using multiple dotted paths (JS object)
309
+ * @param pathsJson - JSON array of dotted paths
310
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
311
+ * @returns Data in specified format as JavaScript object
312
+ */
313
+ getSchemaByPathsJS(paths_json: string, format: number): any;
314
+ /**
315
+ * Get schema by multiple paths from subform
316
+ * @param subformPath - Path to the subform
317
+ * @param pathsJson - JSON array of dotted paths
318
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
319
+ * @returns Data in specified format as JSON string
320
+ */
321
+ getSchemaByPathsSubform(subform_path: string, paths_json: string, format: number): string;
322
+ /**
323
+ * Get schema by multiple paths from subform (JS object)
324
+ * @param subformPath - Path to the subform
325
+ * @param paths - Array of dotted paths
326
+ * @param format - Return format (0=Nested, 1=Flat, 2=Array)
327
+ * @returns Data in specified format as JavaScript object
328
+ */
329
+ getSchemaByPathsSubformJS(subform_path: string, paths_json: string, format: number): any;
330
+ /**
331
+ * Get all schema values (evaluations ending with .value)
332
+ * Mutates internal data by overriding with values from value evaluations
333
+ *
334
+ * @returns Modified data as JavaScript object
335
+ */
336
+ getSchemaValue(): any;
337
+ /**
338
+ * Get all schema values as array of path-value pairs
339
+ * Returns [{path: "", value: ""}, ...]
340
+ *
341
+ * @returns Array of {path, value} objects as JavaScript array
342
+ */
343
+ getSchemaValueArray(): any;
344
+ /**
345
+ * Get schema values from subform as a flat array of path-value pairs.
346
+ * Returns an array like `[{path: "field.sub", value: 123}, ...]`.
347
+ *
348
+ * @param subformPath - Path to the subform
349
+ * @returns Array of {path, value} objects
350
+ */
351
+ getSchemaValueArraySubform(subform_path: string): any;
352
+ /**
353
+ * Get all schema values as object with dotted path keys
354
+ * Returns {path: value, ...}
355
+ *
356
+ * @returns Flat object with dotted paths as keys
357
+ */
358
+ getSchemaValueObject(): any;
359
+ /**
360
+ * Get schema values from subform as a flat object with dotted path keys.
361
+ * Returns an object like `{"field.sub": 123, ...}`.
362
+ *
363
+ * @param subformPath - Path to the subform
364
+ * @returns Flat object with dotted paths as keys
365
+ */
366
+ getSchemaValueObjectSubform(subform_path: string): any;
367
+ /**
368
+ * Get schema value from subform in nested object format (all .value fields).
369
+ * Returns a hierarchical object structure mimicking the schema.
370
+ *
371
+ * @param subformPath - Path to the subform
372
+ * @returns Modified data as JavaScript object (Nested)
373
+ */
374
+ getSchemaValueSubform(subform_path: string): any;
375
+ /**
376
+ * Get list of available subform paths
377
+ *
378
+ * @returns Array of subform paths
379
+ */
380
+ getSubformPaths(): string[];
381
+ /**
382
+ * Check if a subform exists at the given path
383
+ *
384
+ * @param subformPath - Path to check
385
+ * @returns True if subform exists, false otherwise
386
+ */
387
+ hasSubform(subform_path: string): boolean;
388
+ /**
389
+ * Check if evaluation caching is enabled
390
+ *
391
+ * @returns true if caching is enabled, false otherwise
392
+ */
393
+ isCacheEnabled(): boolean;
394
+ /**
395
+ * Create a new JSONEval instance
396
+ *
397
+ * @param schema - JSON schema string
398
+ * @param context - Optional context data JSON string
399
+ * @param data - Optional initial data JSON string
400
+ */
401
+ constructor(schema: string, context?: string | null, data?: string | null);
402
+ /**
403
+ * Create a new JSONEval instance from a cached ParsedSchema
404
+ *
405
+ * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
406
+ * @param context - Optional context data JSON string
407
+ * @param data - Optional initial data JSON string
408
+ */
409
+ static newFromCache(cache_key: string, context?: string | null, data?: string | null): JSONEvalWasm;
410
+ /**
411
+ * Create a new JSONEval instance from MessagePack-encoded schema
412
+ *
413
+ * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
414
+ * @param context - Optional context data JSON string
415
+ * @param data - Optional initial data JSON string
416
+ */
417
+ static newFromMsgpack(schema_msgpack: Uint8Array, context?: string | null, data?: string | null): JSONEvalWasm;
418
+ /**
419
+ * Reload schema with new data
420
+ *
421
+ * @param schema - New JSON schema string
422
+ * @param context - Optional context data JSON string
423
+ * @param data - Optional initial data JSON string
424
+ */
425
+ reloadSchema(schema: string, context?: string | null, data?: string | null): void;
426
+ /**
427
+ * Reload schema from ParsedSchemaCache using a cache key
428
+ *
429
+ * @param cacheKey - Cache key to lookup in the global ParsedSchemaCache
430
+ * @param context - Optional context data JSON string
431
+ * @param data - Optional initial data JSON string
432
+ */
433
+ reloadSchemaFromCache(cache_key: string, context?: string | null, data?: string | null): void;
434
+ /**
435
+ * Reload schema from MessagePack-encoded bytes
436
+ *
437
+ * @param schemaMsgpack - MessagePack-encoded schema bytes (Uint8Array)
438
+ * @param context - Optional context data JSON string
439
+ * @param data - Optional initial data JSON string
440
+ */
441
+ reloadSchemaMsgpack(schema_msgpack: Uint8Array, context?: string | null, data?: string | null): void;
442
+ /**
443
+ * Resolve layout with optional evaluation
444
+ *
445
+ * @param evaluate - If true, runs evaluation before resolving layout
446
+ * @throws Error if resolve fails
447
+ */
448
+ resolveLayout(evaluate: boolean): void;
449
+ /**
450
+ * Resolve layout for subform
451
+ *
452
+ * @param subformPath - Path to the subform
453
+ * @param evaluate - If true, runs evaluation before resolving layout
454
+ * @throws Error if resolve fails
455
+ */
456
+ resolveLayoutSubform(subform_path: string, evaluate: boolean): void;
457
+ /**
458
+ * Run pre-compiled logic by ID
459
+ * @param logic_id - Compiled logic ID from compileLogic
460
+ * @param data - Optional JSON data string
461
+ * @param context - Optional JSON context string
462
+ * @returns Result as JavaScript object
463
+ */
464
+ runLogic(logic_id: number, data?: string | null, context?: string | null): any;
465
+ /**
466
+ * Set timezone offset for datetime operations (TODAY, NOW)
467
+ *
468
+ * @param offsetMinutes - Timezone offset in minutes from UTC (e.g., 420 for UTC+7, -300 for UTC-5)
469
+ * Pass null or undefined to reset to UTC
470
+ */
471
+ setTimezoneOffset(offset_minutes?: number | null): void;
472
+ /**
473
+ * Validate data against schema rules
474
+ *
475
+ * @param data - JSON data string
476
+ * @param context - Optional context data JSON string
477
+ * @returns ValidationResult
478
+ */
479
+ validate(data: string, context?: string | null): ValidationResult;
480
+ /**
481
+ * Validate data and return as plain JavaScript object (Worker-safe)
482
+ *
483
+ * @param data - JSON data string
484
+ * @param context - Optional context data JSON string
485
+ * @returns Plain JavaScript object with validation result
486
+ */
487
+ validateJS(data: string, context?: string | null): any;
488
+ /**
489
+ * Validate data against schema rules with optional path filtering
490
+ *
491
+ * @param data - JSON data string
492
+ * @param context - Optional context data JSON string
493
+ * @param paths - Optional array of paths to validate (null for all)
494
+ * @returns ValidationResult
495
+ */
496
+ validatePaths(data: string, context?: string | null, paths?: string[] | null): ValidationResult;
497
+ /**
498
+ * Validate with path filtering and return as plain JavaScript object (Worker-safe)
499
+ *
500
+ * @param data - JSON data string
501
+ * @param context - Optional context data JSON string
502
+ * @param paths - Optional array of paths to validate (null for all)
503
+ * @returns Plain JavaScript object with validation result
504
+ */
505
+ validatePathsJS(data: string, context?: string | null, paths?: string[] | null): any;
506
+ /**
507
+ * Validate subform data against its schema rules
508
+ *
509
+ * @param subformPath - Path to the subform
510
+ * @param data - JSON data string for the subform
511
+ * @param context - Optional context data JSON string
512
+ * @returns ValidationResult
513
+ */
514
+ validateSubform(subform_path: string, data: string, context?: string | null): ValidationResult;
526
515
  }
516
+
527
517
  /**
528
518
  * Validation error for JavaScript
529
519
  */
530
520
  export class ValidationError {
531
- private constructor();
532
- free(): void;
533
- [Symbol.dispose](): void;
534
- readonly field_value: string | undefined;
535
- readonly code: string | undefined;
536
- readonly data: any;
537
- readonly path: string;
538
- readonly message: string;
539
- readonly pattern: string | undefined;
540
- readonly rule_type: string;
521
+ private constructor();
522
+ free(): void;
523
+ [Symbol.dispose](): void;
524
+ readonly code: string | undefined;
525
+ readonly data: any;
526
+ readonly field_value: string | undefined;
527
+ readonly message: string;
528
+ readonly path: string;
529
+ readonly pattern: string | undefined;
530
+ readonly rule_type: string;
541
531
  }
532
+
542
533
  /**
543
534
  * Validation result for JavaScript
544
535
  */
545
536
  export class ValidationResult {
546
- private constructor();
547
- free(): void;
548
- [Symbol.dispose](): void;
549
- toJSON(): any;
550
- readonly error: any;
551
- readonly has_error: boolean;
537
+ private constructor();
538
+ free(): void;
539
+ [Symbol.dispose](): void;
540
+ toJSON(): any;
541
+ readonly error: any;
542
+ readonly has_error: boolean;
552
543
  }
553
544
 
545
+ /**
546
+ * Get the library version
547
+ */
548
+ export function getVersion(): string;
549
+
550
+ /**
551
+ * Initialize the library (sets up panic hook)
552
+ */
553
+ export function init(): void;
554
+
555
+ /**
556
+ * Get library version (alias)
557
+ */
558
+ export function version(): string;
559
+
554
560
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
555
561
 
556
562
  export interface InitOutput {
557
- readonly memory: WebAssembly.Memory;
558
- readonly __wbg_jsonevalwasm_free: (a: number, b: number) => void;
559
- readonly __wbg_validationerror_free: (a: number, b: number) => void;
560
- readonly __wbg_validationresult_free: (a: number, b: number) => void;
561
- readonly getVersion: (a: number) => void;
562
- readonly jsonevalwasm_cacheLen: (a: number) => number;
563
- readonly jsonevalwasm_cacheStats: (a: number, b: number) => void;
564
- readonly jsonevalwasm_cancel: (a: number) => void;
565
- readonly jsonevalwasm_clearCache: (a: number) => void;
566
- readonly jsonevalwasm_compileAndRunLogic: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
567
- readonly jsonevalwasm_compileLogic: (a: number, b: number, c: number, d: number) => void;
568
- readonly jsonevalwasm_disableCache: (a: number) => void;
569
- readonly jsonevalwasm_enableCache: (a: number) => void;
570
- readonly jsonevalwasm_evaluate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
571
- readonly jsonevalwasm_evaluateDependents: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
572
- readonly jsonevalwasm_evaluateDependentsJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
573
- readonly jsonevalwasm_evaluateDependentsSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
574
- readonly jsonevalwasm_evaluateDependentsSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
575
- readonly jsonevalwasm_evaluateJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
576
- readonly jsonevalwasm_evaluateLogic: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
577
- readonly jsonevalwasm_evaluateSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
578
- readonly jsonevalwasm_getEvaluatedSchema: (a: number, b: number, c: number) => void;
579
- readonly jsonevalwasm_getEvaluatedSchemaByPath: (a: number, b: number, c: number, d: number, e: number) => void;
580
- readonly jsonevalwasm_getEvaluatedSchemaByPathJS: (a: number, b: number, c: number, d: number, e: number) => void;
581
- readonly jsonevalwasm_getEvaluatedSchemaByPathSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
582
- readonly jsonevalwasm_getEvaluatedSchemaByPathSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
583
- readonly jsonevalwasm_getEvaluatedSchemaByPaths: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
584
- readonly jsonevalwasm_getEvaluatedSchemaByPathsJS: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
585
- readonly jsonevalwasm_getEvaluatedSchemaByPathsSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
586
- readonly jsonevalwasm_getEvaluatedSchemaByPathsSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
587
- readonly jsonevalwasm_getEvaluatedSchemaJS: (a: number, b: number, c: number) => void;
588
- readonly jsonevalwasm_getEvaluatedSchemaMsgpack: (a: number, b: number, c: number) => void;
589
- readonly jsonevalwasm_getEvaluatedSchemaSubform: (a: number, b: number, c: number, d: number, e: number) => void;
590
- readonly jsonevalwasm_getEvaluatedSchemaSubformJS: (a: number, b: number, c: number, d: number, e: number) => void;
591
- readonly jsonevalwasm_getEvaluatedSchemaWithoutParams: (a: number, b: number, c: number) => void;
592
- readonly jsonevalwasm_getEvaluatedSchemaWithoutParamsJS: (a: number, b: number, c: number) => void;
593
- readonly jsonevalwasm_getEvaluatedSchemaWithoutParamsSubform: (a: number, b: number, c: number, d: number, e: number) => void;
594
- readonly jsonevalwasm_getEvaluatedSchemaWithoutParamsSubformJS: (a: number, b: number, c: number, d: number, e: number) => void;
595
- readonly jsonevalwasm_getSchemaByPath: (a: number, b: number, c: number, d: number) => void;
596
- readonly jsonevalwasm_getSchemaByPathJS: (a: number, b: number, c: number, d: number) => void;
597
- readonly jsonevalwasm_getSchemaByPathSubform: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
598
- readonly jsonevalwasm_getSchemaByPathSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
599
- readonly jsonevalwasm_getSchemaByPaths: (a: number, b: number, c: number, d: number, e: number) => void;
600
- readonly jsonevalwasm_getSchemaByPathsJS: (a: number, b: number, c: number, d: number, e: number) => void;
601
- readonly jsonevalwasm_getSchemaByPathsSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
602
- readonly jsonevalwasm_getSchemaByPathsSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
603
- readonly jsonevalwasm_getSchemaValue: (a: number, b: number) => void;
604
- readonly jsonevalwasm_getSchemaValueArray: (a: number, b: number) => void;
605
- readonly jsonevalwasm_getSchemaValueArraySubform: (a: number, b: number, c: number, d: number) => void;
606
- readonly jsonevalwasm_getSchemaValueObject: (a: number, b: number) => void;
607
- readonly jsonevalwasm_getSchemaValueObjectSubform: (a: number, b: number, c: number, d: number) => void;
608
- readonly jsonevalwasm_getSchemaValueSubform: (a: number, b: number, c: number, d: number) => void;
609
- readonly jsonevalwasm_getSubformPaths: (a: number, b: number) => void;
610
- readonly jsonevalwasm_hasSubform: (a: number, b: number, c: number) => number;
611
- readonly jsonevalwasm_isCacheEnabled: (a: number) => number;
612
- readonly jsonevalwasm_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
613
- readonly jsonevalwasm_newFromCache: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
614
- readonly jsonevalwasm_newFromMsgpack: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
615
- readonly jsonevalwasm_reloadSchema: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
616
- readonly jsonevalwasm_reloadSchemaFromCache: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
617
- readonly jsonevalwasm_reloadSchemaMsgpack: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
618
- readonly jsonevalwasm_resolveLayout: (a: number, b: number, c: number) => void;
619
- readonly jsonevalwasm_resolveLayoutSubform: (a: number, b: number, c: number, d: number, e: number) => void;
620
- readonly jsonevalwasm_runLogic: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
621
- readonly jsonevalwasm_setTimezoneOffset: (a: number, b: number) => void;
622
- readonly jsonevalwasm_validate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
623
- readonly jsonevalwasm_validateJS: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
624
- readonly jsonevalwasm_validatePaths: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
625
- readonly jsonevalwasm_validatePathsJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
626
- readonly jsonevalwasm_validateSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
627
- readonly validationerror_code: (a: number, b: number) => void;
628
- readonly validationerror_data: (a: number) => number;
629
- readonly validationerror_field_value: (a: number, b: number) => void;
630
- readonly validationerror_message: (a: number, b: number) => void;
631
- readonly validationerror_path: (a: number, b: number) => void;
632
- readonly validationerror_pattern: (a: number, b: number) => void;
633
- readonly validationerror_rule_type: (a: number, b: number) => void;
634
- readonly validationresult_error: (a: number) => number;
635
- readonly validationresult_has_error: (a: number) => number;
636
- readonly validationresult_toJSON: (a: number, b: number) => void;
637
- readonly init: () => void;
638
- readonly version: (a: number) => void;
639
- readonly __wbindgen_export_0: (a: number, b: number) => number;
640
- readonly __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
641
- readonly __wbindgen_export_2: (a: number, b: number, c: number) => void;
642
- readonly __wbindgen_export_3: (a: number) => void;
643
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
644
- readonly __wbindgen_start: () => void;
563
+ readonly memory: WebAssembly.Memory;
564
+ readonly __wbg_jsonevalwasm_free: (a: number, b: number) => void;
565
+ readonly __wbg_validationerror_free: (a: number, b: number) => void;
566
+ readonly __wbg_validationresult_free: (a: number, b: number) => void;
567
+ readonly getVersion: (a: number) => void;
568
+ readonly jsonevalwasm_cacheLen: (a: number) => number;
569
+ readonly jsonevalwasm_cacheStats: (a: number, b: number) => void;
570
+ readonly jsonevalwasm_cancel: (a: number) => void;
571
+ readonly jsonevalwasm_clearCache: (a: number) => void;
572
+ readonly jsonevalwasm_compileAndRunLogic: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
573
+ readonly jsonevalwasm_compileLogic: (a: number, b: number, c: number, d: number) => void;
574
+ readonly jsonevalwasm_disableCache: (a: number) => void;
575
+ readonly jsonevalwasm_enableCache: (a: number) => void;
576
+ readonly jsonevalwasm_evaluate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
577
+ readonly jsonevalwasm_evaluateDependents: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
578
+ readonly jsonevalwasm_evaluateDependentsJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
579
+ readonly jsonevalwasm_evaluateDependentsSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
580
+ readonly jsonevalwasm_evaluateDependentsSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
581
+ readonly jsonevalwasm_evaluateJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
582
+ readonly jsonevalwasm_evaluateLogic: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
583
+ readonly jsonevalwasm_evaluateSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
584
+ readonly jsonevalwasm_getEvaluatedSchema: (a: number, b: number, c: number) => void;
585
+ readonly jsonevalwasm_getEvaluatedSchemaByPath: (a: number, b: number, c: number, d: number, e: number) => void;
586
+ readonly jsonevalwasm_getEvaluatedSchemaByPathJS: (a: number, b: number, c: number, d: number, e: number) => void;
587
+ readonly jsonevalwasm_getEvaluatedSchemaByPathSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
588
+ readonly jsonevalwasm_getEvaluatedSchemaByPathSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
589
+ readonly jsonevalwasm_getEvaluatedSchemaByPaths: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
590
+ readonly jsonevalwasm_getEvaluatedSchemaByPathsJS: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
591
+ readonly jsonevalwasm_getEvaluatedSchemaByPathsSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
592
+ readonly jsonevalwasm_getEvaluatedSchemaByPathsSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
593
+ readonly jsonevalwasm_getEvaluatedSchemaJS: (a: number, b: number, c: number) => void;
594
+ readonly jsonevalwasm_getEvaluatedSchemaMsgpack: (a: number, b: number, c: number) => void;
595
+ readonly jsonevalwasm_getEvaluatedSchemaSubform: (a: number, b: number, c: number, d: number, e: number) => void;
596
+ readonly jsonevalwasm_getEvaluatedSchemaSubformJS: (a: number, b: number, c: number, d: number, e: number) => void;
597
+ readonly jsonevalwasm_getEvaluatedSchemaWithoutParams: (a: number, b: number, c: number) => void;
598
+ readonly jsonevalwasm_getEvaluatedSchemaWithoutParamsJS: (a: number, b: number, c: number) => void;
599
+ readonly jsonevalwasm_getEvaluatedSchemaWithoutParamsSubform: (a: number, b: number, c: number, d: number, e: number) => void;
600
+ readonly jsonevalwasm_getEvaluatedSchemaWithoutParamsSubformJS: (a: number, b: number, c: number, d: number, e: number) => void;
601
+ readonly jsonevalwasm_getSchemaByPath: (a: number, b: number, c: number, d: number) => void;
602
+ readonly jsonevalwasm_getSchemaByPathJS: (a: number, b: number, c: number, d: number) => void;
603
+ readonly jsonevalwasm_getSchemaByPathSubform: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
604
+ readonly jsonevalwasm_getSchemaByPathSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
605
+ readonly jsonevalwasm_getSchemaByPaths: (a: number, b: number, c: number, d: number, e: number) => void;
606
+ readonly jsonevalwasm_getSchemaByPathsJS: (a: number, b: number, c: number, d: number, e: number) => void;
607
+ readonly jsonevalwasm_getSchemaByPathsSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
608
+ readonly jsonevalwasm_getSchemaByPathsSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
609
+ readonly jsonevalwasm_getSchemaValue: (a: number, b: number) => void;
610
+ readonly jsonevalwasm_getSchemaValueArray: (a: number, b: number) => void;
611
+ readonly jsonevalwasm_getSchemaValueArraySubform: (a: number, b: number, c: number, d: number) => void;
612
+ readonly jsonevalwasm_getSchemaValueObject: (a: number, b: number) => void;
613
+ readonly jsonevalwasm_getSchemaValueObjectSubform: (a: number, b: number, c: number, d: number) => void;
614
+ readonly jsonevalwasm_getSchemaValueSubform: (a: number, b: number, c: number, d: number) => void;
615
+ readonly jsonevalwasm_getSubformPaths: (a: number, b: number) => void;
616
+ readonly jsonevalwasm_hasSubform: (a: number, b: number, c: number) => number;
617
+ readonly jsonevalwasm_isCacheEnabled: (a: number) => number;
618
+ readonly jsonevalwasm_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
619
+ readonly jsonevalwasm_newFromCache: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
620
+ readonly jsonevalwasm_newFromMsgpack: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
621
+ readonly jsonevalwasm_reloadSchema: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
622
+ readonly jsonevalwasm_reloadSchemaFromCache: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
623
+ readonly jsonevalwasm_reloadSchemaMsgpack: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
624
+ readonly jsonevalwasm_resolveLayout: (a: number, b: number, c: number) => void;
625
+ readonly jsonevalwasm_resolveLayoutSubform: (a: number, b: number, c: number, d: number, e: number) => void;
626
+ readonly jsonevalwasm_runLogic: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
627
+ readonly jsonevalwasm_setTimezoneOffset: (a: number, b: number) => void;
628
+ readonly jsonevalwasm_validate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
629
+ readonly jsonevalwasm_validateJS: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
630
+ readonly jsonevalwasm_validatePaths: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
631
+ readonly jsonevalwasm_validatePathsJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
632
+ readonly jsonevalwasm_validateSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
633
+ readonly validationerror_code: (a: number, b: number) => void;
634
+ readonly validationerror_data: (a: number) => number;
635
+ readonly validationerror_field_value: (a: number, b: number) => void;
636
+ readonly validationerror_message: (a: number, b: number) => void;
637
+ readonly validationerror_path: (a: number, b: number) => void;
638
+ readonly validationerror_pattern: (a: number, b: number) => void;
639
+ readonly validationerror_rule_type: (a: number, b: number) => void;
640
+ readonly validationresult_error: (a: number) => number;
641
+ readonly validationresult_has_error: (a: number) => number;
642
+ readonly validationresult_toJSON: (a: number, b: number) => void;
643
+ readonly init: () => void;
644
+ readonly version: (a: number) => void;
645
+ readonly __wbindgen_export: (a: number, b: number) => number;
646
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
647
+ readonly __wbindgen_export3: (a: number, b: number, c: number) => void;
648
+ readonly __wbindgen_export4: (a: number) => void;
649
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
650
+ readonly __wbindgen_start: () => void;
645
651
  }
646
652
 
647
653
  export type SyncInitInput = BufferSource | WebAssembly.Module;
654
+
648
655
  /**
649
- * Instantiates the given `module`, which can either be bytes or
650
- * a precompiled `WebAssembly.Module`.
651
- *
652
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
653
- *
654
- * @returns {InitOutput}
655
- */
656
+ * Instantiates the given `module`, which can either be bytes or
657
+ * a precompiled `WebAssembly.Module`.
658
+ *
659
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
660
+ *
661
+ * @returns {InitOutput}
662
+ */
656
663
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
657
664
 
658
665
  /**
659
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
660
- * for everything else, calls `WebAssembly.instantiate` directly.
661
- *
662
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
663
- *
664
- * @returns {Promise<InitOutput>}
665
- */
666
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
667
+ * for everything else, calls `WebAssembly.instantiate` directly.
668
+ *
669
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
670
+ *
671
+ * @returns {Promise<InitOutput>}
672
+ */
666
673
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;