@fjell/core 4.4.73 → 4.4.74
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/README.md +6 -6
- package/dist/AItemService.d.ts +1 -1
- package/dist/Coordinate.d.ts +1 -6
- package/dist/event/emitter.d.ts +1 -2
- package/dist/event/events.d.ts +1 -2
- package/dist/event/matching.d.ts +1 -1
- package/dist/event/subscription.d.ts +1 -2
- package/dist/index.d.ts +7 -20
- package/dist/index.js +1113 -1276
- package/dist/item/IFactory.d.ts +1 -2
- package/dist/item/IQFactory.d.ts +1 -1
- package/dist/item/IQUtils.d.ts +1 -2
- package/dist/item/IUtils.d.ts +1 -7
- package/dist/key/KUtils.d.ts +3 -3
- package/dist/operations/OperationContext.d.ts +1 -1
- package/dist/operations/index.d.ts +1 -0
- package/dist/operations/wrappers/createActionWrapper.d.ts +1 -3
- package/dist/operations/wrappers/createAllActionWrapper.d.ts +1 -3
- package/dist/operations/wrappers/createAllFacetWrapper.d.ts +1 -2
- package/dist/operations/wrappers/createAllWrapper.d.ts +1 -3
- package/dist/operations/wrappers/createCreateWrapper.d.ts +1 -3
- package/dist/operations/wrappers/createFacetWrapper.d.ts +1 -2
- package/dist/operations/wrappers/createFindOneWrapper.d.ts +1 -3
- package/dist/operations/wrappers/createFindWrapper.d.ts +1 -3
- package/dist/operations/wrappers/createGetWrapper.d.ts +1 -3
- package/dist/operations/wrappers/createOneWrapper.d.ts +1 -3
- package/dist/operations/wrappers/createRemoveWrapper.d.ts +1 -3
- package/dist/operations/wrappers/createUpdateWrapper.d.ts +1 -3
- package/dist/operations/wrappers/createUpsertWrapper.d.ts +1 -3
- package/dist/operations/wrappers/types.d.ts +1 -1
- package/package.json +4 -7
- package/dist/item/ItemQuery.d.ts +0 -62
- package/dist/items.d.ts +0 -74
- package/dist/keys.d.ts +0 -66
- package/dist/operations/Operations.d.ts +0 -530
- package/dist/operations/contained.d.ts +0 -65
- package/dist/operations/methods.d.ts +0 -204
- package/dist/operations/primary.d.ts +0 -57
- package/dist/operations/specialized.d.ts +0 -41
- package/dist/validation/ItemValidator.d.ts +0 -43
- package/dist/validation/KeyValidator.d.ts +0 -56
- package/dist/validation/LocationValidator.d.ts +0 -39
- package/dist/validation/QueryValidator.d.ts +0 -57
- package/dist/validation/index.d.ts +0 -17
- package/dist/validation/index.js +0 -656
- package/dist/validation/schema.d.ts +0 -23
- 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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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');
|
package/dist/AItemService.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AllItemTypeArrays } from "
|
|
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;
|
package/dist/Coordinate.d.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import
|
|
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>;
|
package/dist/event/emitter.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ComKey, ItemTypeArray, LocKeyArray, PriKey } from '
|
|
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
|
/**
|
package/dist/event/events.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ComKey, PriKey } from '
|
|
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.
|
package/dist/event/matching.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ComKey, ItemTypeArray, LocKeyArray, PriKey } from '
|
|
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
|
|
2
|
-
export
|
|
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
|
|
9
|
-
export * from
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
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';
|