@fjell/core 4.4.73 → 4.4.75

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.
Files changed (47) hide show
  1. package/README.md +6 -6
  2. package/dist/AItemService.d.ts +1 -1
  3. package/dist/Coordinate.d.ts +1 -6
  4. package/dist/event/emitter.d.ts +1 -2
  5. package/dist/event/events.d.ts +1 -2
  6. package/dist/event/matching.d.ts +1 -1
  7. package/dist/event/subscription.d.ts +1 -2
  8. package/dist/index.d.ts +7 -20
  9. package/dist/index.js +1113 -1276
  10. package/dist/item/IFactory.d.ts +1 -2
  11. package/dist/item/IQFactory.d.ts +1 -1
  12. package/dist/item/IQUtils.d.ts +1 -2
  13. package/dist/item/IUtils.d.ts +1 -7
  14. package/dist/key/KUtils.d.ts +3 -3
  15. package/dist/operations/OperationContext.d.ts +1 -1
  16. package/dist/operations/index.d.ts +2 -0
  17. package/dist/operations/wrappers/createActionWrapper.d.ts +1 -3
  18. package/dist/operations/wrappers/createAllActionWrapper.d.ts +1 -3
  19. package/dist/operations/wrappers/createAllFacetWrapper.d.ts +1 -2
  20. package/dist/operations/wrappers/createAllWrapper.d.ts +1 -3
  21. package/dist/operations/wrappers/createCreateWrapper.d.ts +1 -3
  22. package/dist/operations/wrappers/createFacetWrapper.d.ts +1 -2
  23. package/dist/operations/wrappers/createFindOneWrapper.d.ts +1 -3
  24. package/dist/operations/wrappers/createFindWrapper.d.ts +1 -3
  25. package/dist/operations/wrappers/createGetWrapper.d.ts +1 -3
  26. package/dist/operations/wrappers/createOneWrapper.d.ts +1 -3
  27. package/dist/operations/wrappers/createRemoveWrapper.d.ts +1 -3
  28. package/dist/operations/wrappers/createUpdateWrapper.d.ts +1 -3
  29. package/dist/operations/wrappers/createUpsertWrapper.d.ts +1 -3
  30. package/dist/operations/wrappers/types.d.ts +1 -1
  31. package/package.json +4 -7
  32. package/dist/item/ItemQuery.d.ts +0 -62
  33. package/dist/items.d.ts +0 -74
  34. package/dist/keys.d.ts +0 -66
  35. package/dist/operations/Operations.d.ts +0 -530
  36. package/dist/operations/contained.d.ts +0 -65
  37. package/dist/operations/methods.d.ts +0 -204
  38. package/dist/operations/primary.d.ts +0 -57
  39. package/dist/operations/specialized.d.ts +0 -41
  40. package/dist/validation/ItemValidator.d.ts +0 -43
  41. package/dist/validation/KeyValidator.d.ts +0 -56
  42. package/dist/validation/LocationValidator.d.ts +0 -39
  43. package/dist/validation/QueryValidator.d.ts +0 -57
  44. package/dist/validation/index.d.ts +0 -17
  45. package/dist/validation/index.js +0 -656
  46. package/dist/validation/schema.d.ts +0 -23
  47. package/dist/validation/types.d.ts +0 -69
@@ -1,69 +0,0 @@
1
- /**
2
- * Shared validation types and options
3
- */
4
- /**
5
- * Options for validation functions
6
- */
7
- export interface ValidationOptions {
8
- /**
9
- * Custom error message prefix
10
- */
11
- errorPrefix?: string;
12
- /**
13
- * Whether to allow undefined (treated as empty array for location validation)
14
- */
15
- allowUndefined?: boolean;
16
- /**
17
- * Whether to throw errors or return validation results
18
- * @default true
19
- */
20
- throwOnError?: boolean;
21
- }
22
- /**
23
- * Result of a validation operation (for non-throwing mode)
24
- */
25
- export interface ValidationResult {
26
- /**
27
- * Whether validation passed
28
- */
29
- valid: boolean;
30
- /**
31
- * Error message if validation failed
32
- */
33
- error?: string;
34
- /**
35
- * Detailed validation context
36
- */
37
- context?: Record<string, unknown>;
38
- }
39
- /**
40
- * Generic interface for schema validators (Zod, Yup, Joi, etc.)
41
- *
42
- * This interface enables duck typing - any validator that implements
43
- * these methods will work with validateSchema.
44
- *
45
- * @template T - The validated/parsed type
46
- */
47
- export interface SchemaValidator<T> {
48
- /**
49
- * Synchronous parse method.
50
- * Should throw an error if invalid, or return the parsed data.
51
- */
52
- parse: (data: unknown) => T;
53
- /**
54
- * Safe parse method that returns a result object instead of throwing.
55
- * Used as fallback if parseAsync is not available.
56
- */
57
- safeParse: (data: unknown) => {
58
- success: true;
59
- data: T;
60
- } | {
61
- success: false;
62
- error: any;
63
- };
64
- /**
65
- * Optional asynchronous parse method.
66
- * Preferred over parse/safeParse if available.
67
- */
68
- parseAsync?: (data: unknown) => Promise<T>;
69
- }