@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
package/README.md CHANGED
@@ -137,7 +137,7 @@ import {
137
137
  validateKeys,
138
138
  validateSchema,
139
139
  SchemaValidator
140
- } from '@fjell/core/validation';
140
+ } from '@fjell/validation';
141
141
  ```
142
142
 
143
143
  #### Schema Validation (Zod, Yup, etc.)
@@ -145,7 +145,7 @@ import {
145
145
  Universal schema validation that works with any validator matching the `SchemaValidator` interface. Zod is supported out of the box via duck typing:
146
146
 
147
147
  ```typescript
148
- import { validateSchema } from '@fjell/core/validation';
148
+ import { validateSchema } from '@fjell/validation';
149
149
  import { z } from 'zod';
150
150
 
151
151
  // Define a Zod schema
@@ -184,7 +184,7 @@ try {
184
184
  Validates that location key arrays match the expected coordinate hierarchy:
185
185
 
186
186
  ```typescript
187
- import { validateLocations } from '@fjell/core/validation';
187
+ import { validateLocations } from '@fjell/validation';
188
188
 
189
189
  // Validate location array order
190
190
  validateLocations(
@@ -194,7 +194,7 @@ validateLocations(
194
194
  );
195
195
 
196
196
  // Non-throwing validation
197
- import { isValidLocations } from '@fjell/core/validation';
197
+ import { isValidLocations } from '@fjell/validation';
198
198
  const result = isValidLocations(
199
199
  [{ kt: 'store', lk: 'store-1' }],
200
200
  coordinate,
@@ -210,7 +210,7 @@ if (!result.valid) {
210
210
  Validates PriKey and ComKey structures match library type:
211
211
 
212
212
  ```typescript
213
- import { validateKey, validatePriKey, validateComKey } from '@fjell/core/validation';
213
+ import { validateKey, validatePriKey, validateComKey } from '@fjell/validation';
214
214
 
215
215
  // Validate any key type
216
216
  validateKey(key, coordinate, 'get');
@@ -225,7 +225,7 @@ validateComKey(comKey, coordinate, 'remove');
225
225
  Validates Item keys match expected types:
226
226
 
227
227
  ```typescript
228
- import { validatePK, validateKeys } from '@fjell/core/validation';
228
+ import { validatePK, validateKeys } from '@fjell/validation';
229
229
 
230
230
  // Validate item has correct primary key type
231
231
  const validatedItem = validatePK(item, 'product');
@@ -1,4 +1,4 @@
1
- import { AllItemTypeArrays } from "./keys";
1
+ import { AllItemTypeArrays } from "@fjell/types";
2
2
  export declare class AItemService<S extends string, L1 extends string, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> {
3
3
  private pkType;
4
4
  private parentService;
@@ -1,7 +1,2 @@
1
- import type { ItemTypeArray } from "./keys";
2
- export interface Coordinate<S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> {
3
- kta: ItemTypeArray<S, L1, L2, L3, L4, L5>;
4
- scopes: string[];
5
- toString: () => string;
6
- }
1
+ import { Coordinate, ItemTypeArray } from "@fjell/types";
7
2
  export declare const createCoordinate: <S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(kta: ItemTypeArray<S, L1, L2, L3, L4, L5> | S, scopes?: string[]) => Coordinate<S, L1, L2, L3, L4, L5>;
@@ -1,5 +1,4 @@
1
- import { ComKey, ItemTypeArray, LocKeyArray, PriKey } from '../keys';
2
- import { Item } from '../items';
1
+ import { ComKey, Item, ItemTypeArray, LocKeyArray, PriKey } from '@fjell/types';
3
2
  import { BaseEvent } from './events';
4
3
  import { Subscription, SubscriptionOptions } from './subscription';
5
4
  /**
@@ -1,5 +1,4 @@
1
- import { ComKey, PriKey } from '../keys';
2
- import { Item } from '../items';
1
+ import { ComKey, Item, PriKey } from '@fjell/types';
3
2
  /**
4
3
  * Base event interface that all events extend.
5
4
  * Provides core event properties with full type safety using the existing PriKey/ComKey system.
@@ -1,4 +1,4 @@
1
- import { ComKey, ItemTypeArray, LocKeyArray, PriKey } from '../keys';
1
+ import { ComKey, ItemTypeArray, LocKeyArray, PriKey } from '@fjell/types';
2
2
  import { BaseEvent } from './events';
3
3
  import { Subscription } from './subscription';
4
4
  /**
@@ -1,5 +1,4 @@
1
- import { ComKey, ItemTypeArray, LocKeyArray, PriKey } from '../keys';
2
- import { ItemQuery } from '../item/ItemQuery';
1
+ import { ComKey, ItemQuery, ItemTypeArray, LocKeyArray, PriKey } from '@fjell/types';
3
2
  /**
4
3
  * Base subscription interface that all subscription types extend.
5
4
  * Provides core subscription properties with full type safety.
package/dist/index.d.ts CHANGED
@@ -1,24 +1,11 @@
1
- export * from "./dictionary";
2
- export * from "./keys";
3
- export * from "./items";
4
- export * from "./Coordinate";
5
- export * from "./Coordinate";
6
- export { IFactory } from "./item/IFactory";
1
+ export { IQFactory } from './item/IQFactory';
2
+ export { IFactory } from './item/IFactory';
7
3
  export { AItemService } from "./AItemService";
8
- export * from './key/KUtils';
9
- export * from './item/IFactory';
10
- export * from './item/IQFactory';
11
- export * from './item/IQUtils';
12
- export * from './item/IUtils';
13
- export * from './item/ItemQuery';
14
- export * from './validation';
4
+ export { createCoordinate } from "./Coordinate";
5
+ export * from "./dictionary";
6
+ export { isComKey, isPriKey, createNormalizedHashFunction, isPriKeyEqualNormalized, isLocKeyEqualNormalized, isComKeyEqualNormalized, isItemKeyEqualNormalized, isItemKeyEqual, isPriKeyEqual, isLocKeyEqual, isComKeyEqual, isItemKey, isLocKey, generateKeyArray, constructPriKey, cPK, toKeyTypeArray, extractKeyTypeArray, abbrevIK, abbrevLKA, primaryType, itemKeyToLocKeyArray, ikToLKA, locKeyArrayToItemKey, isValidPriKey, isValidLocKey, isValidLocKeyArray, isValidComKey, isValidItemKey, lkaToIK } from './key/KUtils';
7
+ export { queryToParams, paramsToQuery, isQueryMatch, abbrevQuery, abbrevRef, abbrevAgg, abbrevCompoundCondition, abbrevCondition } from './item/IQUtils';
8
+ export { isPriItem, isComItem } from './item/IUtils';
15
9
  export * from './errors';
16
10
  export * from './operations';
17
11
  export * from './event';
18
- export type { Operations, OperationParams, AffectedKeys, CreateOptions, UpdateOptions, PaginationOptions, AllOptions, FindOptions, PaginationMetadata, OperationResult, AllOperationResult, FindOperationResult } from './operations/Operations';
19
- export { isPriKey as isOperationPriKey, isComKey as isOperationComKey } from './operations/Operations';
20
- export type { GetMethod, CreateMethod, UpdateMethod, RemoveMethod, UpsertMethod, AllMethod, OneMethod, FindMethod, FindOneMethod, FinderMethod, ActionMethod, ActionOperationMethod, AllActionMethod, AllActionOperationMethod, FacetMethod, FacetOperationMethod, AllFacetMethod, AllFacetOperationMethod, OperationsExtensions } from './operations/methods';
21
- export * from './operations/wrappers';
22
- export type { PrimaryOperations } from './operations/primary';
23
- export type { ContainedOperations } from './operations/contained';
24
- export type { CollectionOperations, InstanceOperations } from './operations/specialized';