@fjell/cache 4.6.10 → 4.6.11
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/dist/Aggregator.cjs.js +26 -20
- package/dist/Aggregator.d.ts +17 -1
- package/dist/Aggregator.es.js +26 -20
- package/dist/Cache.cjs.js +22 -345
- package/dist/Cache.d.ts +25 -20
- package/dist/Cache.es.js +22 -346
- package/dist/Instance.cjs.js +7 -11
- package/dist/Instance.d.ts +5 -8
- package/dist/Instance.es.js +6 -10
- package/dist/InstanceFactory.cjs.js +17 -5
- package/dist/InstanceFactory.d.ts +3 -3
- package/dist/InstanceFactory.es.js +17 -5
- package/dist/Operations.cjs.js +43 -0
- package/dist/Operations.d.ts +70 -0
- package/dist/Operations.es.js +39 -0
- package/dist/index.cjs +416 -369
- package/dist/index.cjs.js +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +3 -2
- package/dist/ops/action.cjs.js +28 -0
- package/dist/ops/action.d.ts +4 -0
- package/dist/ops/action.es.js +24 -0
- package/dist/ops/all.cjs.js +33 -0
- package/dist/ops/all.d.ts +4 -0
- package/dist/ops/all.es.js +29 -0
- package/dist/ops/allAction.cjs.js +35 -0
- package/dist/ops/allAction.d.ts +4 -0
- package/dist/ops/allAction.es.js +31 -0
- package/dist/ops/allFacet.cjs.js +22 -0
- package/dist/ops/allFacet.d.ts +4 -0
- package/dist/ops/allFacet.es.js +18 -0
- package/dist/ops/create.cjs.js +23 -0
- package/dist/ops/create.d.ts +4 -0
- package/dist/ops/create.es.js +19 -0
- package/dist/ops/facet.cjs.js +21 -0
- package/dist/ops/facet.d.ts +4 -0
- package/dist/ops/facet.es.js +17 -0
- package/dist/ops/find.cjs.js +26 -0
- package/dist/ops/find.d.ts +4 -0
- package/dist/ops/find.es.js +22 -0
- package/dist/ops/findOne.cjs.js +24 -0
- package/dist/ops/findOne.d.ts +4 -0
- package/dist/ops/findOne.es.js +20 -0
- package/dist/ops/get.cjs.js +38 -0
- package/dist/ops/get.d.ts +4 -0
- package/dist/ops/get.es.js +34 -0
- package/dist/ops/one.cjs.js +33 -0
- package/dist/ops/one.d.ts +4 -0
- package/dist/ops/one.es.js +29 -0
- package/dist/ops/remove.cjs.js +30 -0
- package/dist/ops/remove.d.ts +4 -0
- package/dist/ops/remove.es.js +26 -0
- package/dist/ops/reset.cjs.js +15 -0
- package/dist/ops/reset.d.ts +4 -0
- package/dist/ops/reset.es.js +11 -0
- package/dist/ops/retrieve.cjs.js +37 -0
- package/dist/ops/retrieve.d.ts +4 -0
- package/dist/ops/retrieve.es.js +33 -0
- package/dist/ops/set.cjs.js +71 -0
- package/dist/ops/set.d.ts +3 -0
- package/dist/ops/set.es.js +67 -0
- package/dist/ops/update.cjs.js +34 -0
- package/dist/ops/update.d.ts +4 -0
- package/dist/ops/update.es.js +30 -0
- package/examples/README.md +34 -39
- package/examples/aggregator-example.ts +8 -14
- package/examples/basic-cache-example.ts +18 -21
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -7,6 +7,7 @@ const Cache = require('./Cache.cjs.js');
|
|
|
7
7
|
const CacheMap = require('./CacheMap.cjs.js');
|
|
8
8
|
const Instance = require('./Instance.cjs.js');
|
|
9
9
|
const InstanceFactory = require('./InstanceFactory.cjs.js');
|
|
10
|
+
const Operations = require('./Operations.cjs.js');
|
|
10
11
|
const Registry = require('./Registry.cjs.js');
|
|
11
12
|
|
|
12
13
|
|
|
@@ -14,10 +15,12 @@ const Registry = require('./Registry.cjs.js');
|
|
|
14
15
|
exports.createAggregator = Aggregator.createAggregator;
|
|
15
16
|
exports.toCacheConfig = Aggregator.toCacheConfig;
|
|
16
17
|
exports.createCache = Cache.createCache;
|
|
18
|
+
exports.isCache = Cache.isCache;
|
|
17
19
|
exports.CacheMap = CacheMap.CacheMap;
|
|
18
20
|
exports.createInstance = Instance.createInstance;
|
|
19
21
|
exports.isInstance = Instance.isInstance;
|
|
20
22
|
exports.createInstanceFactory = InstanceFactory.createInstanceFactory;
|
|
23
|
+
exports.createOperations = Operations.createOperations;
|
|
21
24
|
exports.createRegistry = Registry.createRegistry;
|
|
22
25
|
exports.createRegistryFactory = Registry.createRegistryFactory;
|
|
23
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
26
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguY2pzLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { createAggregator, toCacheConfig } from './Aggregator.es.js';
|
|
2
|
-
export { createCache } from './Cache.es.js';
|
|
2
|
+
export { createCache, isCache } from './Cache.es.js';
|
|
3
3
|
export { CacheMap } from './CacheMap.es.js';
|
|
4
4
|
export { createInstance, isInstance } from './Instance.es.js';
|
|
5
5
|
export { createInstanceFactory } from './InstanceFactory.es.js';
|
|
6
|
+
export { createOperations } from './Operations.es.js';
|
|
6
7
|
export { createRegistry, createRegistryFactory } from './Registry.es.js';
|
|
7
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
8
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZXMuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7In0=
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const core = require('@fjell/core');
|
|
6
|
+
const logger$1 = require('../logger.cjs.js');
|
|
7
|
+
|
|
8
|
+
const logger = logger$1.default.get('action');
|
|
9
|
+
const action = async (api, cacheMap, pkType, key, action, body = {})=>{
|
|
10
|
+
logger.default('action', {
|
|
11
|
+
key,
|
|
12
|
+
action,
|
|
13
|
+
body
|
|
14
|
+
});
|
|
15
|
+
if (!core.isValidItemKey(key)) {
|
|
16
|
+
logger.error('Key for Action is not a valid ItemKey: %j', key);
|
|
17
|
+
throw new Error('Key for Action is not a valid ItemKey');
|
|
18
|
+
}
|
|
19
|
+
const updated = await api.action(key, action, body);
|
|
20
|
+
cacheMap.set(updated.key, updated);
|
|
21
|
+
return [
|
|
22
|
+
cacheMap,
|
|
23
|
+
core.validatePK(updated, pkType)
|
|
24
|
+
];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.action = action;
|
|
28
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLmNqcy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComKey, Item, PriKey } from '@fjell/core';
|
|
2
|
+
import { ClientApi } from '@fjell/client-api';
|
|
3
|
+
import { CacheMap } from '../CacheMap';
|
|
4
|
+
export declare const action: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(api: ClientApi<V, S, L1, L2, L3, L4, L5>, cacheMap: CacheMap<V, S, L1, L2, L3, L4, L5>, pkType: S, key: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>, action: string, body?: any) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, V]>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { isValidItemKey, validatePK } from '@fjell/core';
|
|
2
|
+
import LibLogger from '../logger.es.js';
|
|
3
|
+
|
|
4
|
+
const logger = LibLogger.get('action');
|
|
5
|
+
const action = async (api, cacheMap, pkType, key, action, body = {})=>{
|
|
6
|
+
logger.default('action', {
|
|
7
|
+
key,
|
|
8
|
+
action,
|
|
9
|
+
body
|
|
10
|
+
});
|
|
11
|
+
if (!isValidItemKey(key)) {
|
|
12
|
+
logger.error('Key for Action is not a valid ItemKey: %j', key);
|
|
13
|
+
throw new Error('Key for Action is not a valid ItemKey');
|
|
14
|
+
}
|
|
15
|
+
const updated = await api.action(key, action, body);
|
|
16
|
+
cacheMap.set(updated.key, updated);
|
|
17
|
+
return [
|
|
18
|
+
cacheMap,
|
|
19
|
+
validatePK(updated, pkType)
|
|
20
|
+
];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { action };
|
|
24
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLmVzLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const core = require('@fjell/core');
|
|
6
|
+
const httpApi = require('@fjell/http-api');
|
|
7
|
+
const logger$1 = require('../logger.cjs.js');
|
|
8
|
+
|
|
9
|
+
const logger = logger$1.default.get('all');
|
|
10
|
+
const all = async (api, cacheMap, pkType, query = {}, locations = [])=>{
|
|
11
|
+
logger.default('all', {
|
|
12
|
+
query,
|
|
13
|
+
locations
|
|
14
|
+
});
|
|
15
|
+
let ret = [];
|
|
16
|
+
try {
|
|
17
|
+
ret = await api.all(query, locations);
|
|
18
|
+
ret.forEach((v)=>{
|
|
19
|
+
cacheMap.set(v.key, v);
|
|
20
|
+
});
|
|
21
|
+
} catch (e) {
|
|
22
|
+
if (e instanceof httpApi.NotFoundError) ; else {
|
|
23
|
+
throw e;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return [
|
|
27
|
+
cacheMap,
|
|
28
|
+
core.validatePK(ret, pkType)
|
|
29
|
+
];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.all = all;
|
|
33
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsLmNqcy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Item, ItemQuery, LocKeyArray } from '@fjell/core';
|
|
2
|
+
import { ClientApi } from '@fjell/client-api';
|
|
3
|
+
import { CacheMap } from '../CacheMap';
|
|
4
|
+
export declare const all: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(api: ClientApi<V, S, L1, L2, L3, L4, L5>, cacheMap: CacheMap<V, S, L1, L2, L3, L4, L5>, pkType: S, query?: ItemQuery, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, V[]]>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { validatePK } from '@fjell/core';
|
|
2
|
+
import { NotFoundError } from '@fjell/http-api';
|
|
3
|
+
import LibLogger from '../logger.es.js';
|
|
4
|
+
|
|
5
|
+
const logger = LibLogger.get('all');
|
|
6
|
+
const all = async (api, cacheMap, pkType, query = {}, locations = [])=>{
|
|
7
|
+
logger.default('all', {
|
|
8
|
+
query,
|
|
9
|
+
locations
|
|
10
|
+
});
|
|
11
|
+
let ret = [];
|
|
12
|
+
try {
|
|
13
|
+
ret = await api.all(query, locations);
|
|
14
|
+
ret.forEach((v)=>{
|
|
15
|
+
cacheMap.set(v.key, v);
|
|
16
|
+
});
|
|
17
|
+
} catch (e) {
|
|
18
|
+
if (e instanceof NotFoundError) ; else {
|
|
19
|
+
throw e;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return [
|
|
23
|
+
cacheMap,
|
|
24
|
+
validatePK(ret, pkType)
|
|
25
|
+
];
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { all };
|
|
29
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsLmVzLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const core = require('@fjell/core');
|
|
6
|
+
const httpApi = require('@fjell/http-api');
|
|
7
|
+
const logger$1 = require('../logger.cjs.js');
|
|
8
|
+
|
|
9
|
+
const logger = logger$1.default.get('allAction');
|
|
10
|
+
const allAction = async (api, cacheMap, pkType, action, body = {}, locations = [])=>{
|
|
11
|
+
logger.default('allAction', {
|
|
12
|
+
action,
|
|
13
|
+
body,
|
|
14
|
+
locations
|
|
15
|
+
});
|
|
16
|
+
let ret = [];
|
|
17
|
+
try {
|
|
18
|
+
ret = await api.allAction(action, body, locations);
|
|
19
|
+
ret.forEach((v)=>{
|
|
20
|
+
cacheMap.set(v.key, v);
|
|
21
|
+
});
|
|
22
|
+
} catch (e) {
|
|
23
|
+
// istanbul ignore next
|
|
24
|
+
if (e instanceof httpApi.NotFoundError) ; else {
|
|
25
|
+
throw e;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return [
|
|
29
|
+
cacheMap,
|
|
30
|
+
core.validatePK(ret, pkType)
|
|
31
|
+
];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.allAction = allAction;
|
|
35
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsQWN0aW9uLmNqcy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Item, LocKeyArray } from '@fjell/core';
|
|
2
|
+
import { ClientApi } from '@fjell/client-api';
|
|
3
|
+
import { CacheMap } from '../CacheMap';
|
|
4
|
+
export declare const allAction: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(api: ClientApi<V, S, L1, L2, L3, L4, L5>, cacheMap: CacheMap<V, S, L1, L2, L3, L4, L5>, pkType: S, action: string, body?: any, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, V[]]>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { validatePK } from '@fjell/core';
|
|
2
|
+
import { NotFoundError } from '@fjell/http-api';
|
|
3
|
+
import LibLogger from '../logger.es.js';
|
|
4
|
+
|
|
5
|
+
const logger = LibLogger.get('allAction');
|
|
6
|
+
const allAction = async (api, cacheMap, pkType, action, body = {}, locations = [])=>{
|
|
7
|
+
logger.default('allAction', {
|
|
8
|
+
action,
|
|
9
|
+
body,
|
|
10
|
+
locations
|
|
11
|
+
});
|
|
12
|
+
let ret = [];
|
|
13
|
+
try {
|
|
14
|
+
ret = await api.allAction(action, body, locations);
|
|
15
|
+
ret.forEach((v)=>{
|
|
16
|
+
cacheMap.set(v.key, v);
|
|
17
|
+
});
|
|
18
|
+
} catch (e) {
|
|
19
|
+
// istanbul ignore next
|
|
20
|
+
if (e instanceof NotFoundError) ; else {
|
|
21
|
+
throw e;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return [
|
|
25
|
+
cacheMap,
|
|
26
|
+
validatePK(ret, pkType)
|
|
27
|
+
];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { allAction };
|
|
31
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsQWN0aW9uLmVzLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const logger$1 = require('../logger.cjs.js');
|
|
6
|
+
|
|
7
|
+
const logger = logger$1.default.get('allFacet');
|
|
8
|
+
const allFacet = async (api, cacheMap, facet, params = {}, locations = [])=>{
|
|
9
|
+
logger.default('allFacet', {
|
|
10
|
+
facet,
|
|
11
|
+
params,
|
|
12
|
+
locations
|
|
13
|
+
});
|
|
14
|
+
const ret = await api.allFacet(facet, params, locations);
|
|
15
|
+
return [
|
|
16
|
+
cacheMap,
|
|
17
|
+
ret
|
|
18
|
+
];
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.allFacet = allFacet;
|
|
22
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsRmFjZXQuY2pzLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Item, LocKeyArray } from '@fjell/core';
|
|
2
|
+
import { ClientApi } from '@fjell/client-api';
|
|
3
|
+
import { CacheMap } from '../CacheMap';
|
|
4
|
+
export declare const allFacet: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(api: ClientApi<V, S, L1, L2, L3, L4, L5>, cacheMap: CacheMap<V, S, L1, L2, L3, L4, L5>, facet: string, params?: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, any]>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import LibLogger from '../logger.es.js';
|
|
2
|
+
|
|
3
|
+
const logger = LibLogger.get('allFacet');
|
|
4
|
+
const allFacet = async (api, cacheMap, facet, params = {}, locations = [])=>{
|
|
5
|
+
logger.default('allFacet', {
|
|
6
|
+
facet,
|
|
7
|
+
params,
|
|
8
|
+
locations
|
|
9
|
+
});
|
|
10
|
+
const ret = await api.allFacet(facet, params, locations);
|
|
11
|
+
return [
|
|
12
|
+
cacheMap,
|
|
13
|
+
ret
|
|
14
|
+
];
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { allFacet };
|
|
18
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxsRmFjZXQuZXMuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const core = require('@fjell/core');
|
|
6
|
+
const logger$1 = require('../logger.cjs.js');
|
|
7
|
+
|
|
8
|
+
const logger = logger$1.default.get('create');
|
|
9
|
+
const create = async (api, cacheMap, pkType, v, locations = [])=>{
|
|
10
|
+
logger.default('create', {
|
|
11
|
+
v,
|
|
12
|
+
locations
|
|
13
|
+
});
|
|
14
|
+
const created = await api.create(v, locations);
|
|
15
|
+
cacheMap.set(created.key, created);
|
|
16
|
+
return [
|
|
17
|
+
cacheMap,
|
|
18
|
+
core.validatePK(created, pkType)
|
|
19
|
+
];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.create = create;
|
|
23
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLmNqcy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Item, LocKeyArray } from '@fjell/core';
|
|
2
|
+
import { ClientApi } from '@fjell/client-api';
|
|
3
|
+
import { CacheMap } from '../CacheMap';
|
|
4
|
+
export declare const create: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(api: ClientApi<V, S, L1, L2, L3, L4, L5>, cacheMap: CacheMap<V, S, L1, L2, L3, L4, L5>, pkType: S, v: Partial<Item<S, L1, L2, L3, L4, L5>>, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, V]>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { validatePK } from '@fjell/core';
|
|
2
|
+
import LibLogger from '../logger.es.js';
|
|
3
|
+
|
|
4
|
+
const logger = LibLogger.get('create');
|
|
5
|
+
const create = async (api, cacheMap, pkType, v, locations = [])=>{
|
|
6
|
+
logger.default('create', {
|
|
7
|
+
v,
|
|
8
|
+
locations
|
|
9
|
+
});
|
|
10
|
+
const created = await api.create(v, locations);
|
|
11
|
+
cacheMap.set(created.key, created);
|
|
12
|
+
return [
|
|
13
|
+
cacheMap,
|
|
14
|
+
validatePK(created, pkType)
|
|
15
|
+
];
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { create };
|
|
19
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLmVzLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const logger$1 = require('../logger.cjs.js');
|
|
6
|
+
|
|
7
|
+
const logger = logger$1.default.get('facet');
|
|
8
|
+
const facet = async (api, cacheMap, key, facet, params = {})=>{
|
|
9
|
+
logger.default('facet', {
|
|
10
|
+
key,
|
|
11
|
+
facet
|
|
12
|
+
});
|
|
13
|
+
const ret = await api.facet(key, facet, params);
|
|
14
|
+
return [
|
|
15
|
+
cacheMap,
|
|
16
|
+
ret
|
|
17
|
+
];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.facet = facet;
|
|
21
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFjZXQuY2pzLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComKey, Item, PriKey } from '@fjell/core';
|
|
2
|
+
import { ClientApi } from '@fjell/client-api';
|
|
3
|
+
import { CacheMap } from '../CacheMap';
|
|
4
|
+
export declare const facet: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(api: ClientApi<V, S, L1, L2, L3, L4, L5>, cacheMap: CacheMap<V, S, L1, L2, L3, L4, L5>, key: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>, facet: string, params?: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, any]>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import LibLogger from '../logger.es.js';
|
|
2
|
+
|
|
3
|
+
const logger = LibLogger.get('facet');
|
|
4
|
+
const facet = async (api, cacheMap, key, facet, params = {})=>{
|
|
5
|
+
logger.default('facet', {
|
|
6
|
+
key,
|
|
7
|
+
facet
|
|
8
|
+
});
|
|
9
|
+
const ret = await api.facet(key, facet, params);
|
|
10
|
+
return [
|
|
11
|
+
cacheMap,
|
|
12
|
+
ret
|
|
13
|
+
];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { facet };
|
|
17
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmFjZXQuZXMuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const core = require('@fjell/core');
|
|
6
|
+
const logger$1 = require('../logger.cjs.js');
|
|
7
|
+
|
|
8
|
+
const logger = logger$1.default.get('find');
|
|
9
|
+
const find = async (api, cacheMap, pkType, finder, params = {}, locations = [])=>{
|
|
10
|
+
logger.default('find', {
|
|
11
|
+
finder,
|
|
12
|
+
params,
|
|
13
|
+
locations
|
|
14
|
+
});
|
|
15
|
+
const ret = await api.find(finder, params, locations);
|
|
16
|
+
ret.forEach((v)=>{
|
|
17
|
+
cacheMap.set(v.key, v);
|
|
18
|
+
});
|
|
19
|
+
return [
|
|
20
|
+
cacheMap,
|
|
21
|
+
core.validatePK(ret, pkType)
|
|
22
|
+
];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.find = find;
|
|
26
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmluZC5janMuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Item, LocKeyArray } from '@fjell/core';
|
|
2
|
+
import { ClientApi } from '@fjell/client-api';
|
|
3
|
+
import { CacheMap } from '../CacheMap';
|
|
4
|
+
export declare const find: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(api: ClientApi<V, S, L1, L2, L3, L4, L5>, cacheMap: CacheMap<V, S, L1, L2, L3, L4, L5>, pkType: S, finder: string, params?: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, V[]]>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { validatePK } from '@fjell/core';
|
|
2
|
+
import LibLogger from '../logger.es.js';
|
|
3
|
+
|
|
4
|
+
const logger = LibLogger.get('find');
|
|
5
|
+
const find = async (api, cacheMap, pkType, finder, params = {}, locations = [])=>{
|
|
6
|
+
logger.default('find', {
|
|
7
|
+
finder,
|
|
8
|
+
params,
|
|
9
|
+
locations
|
|
10
|
+
});
|
|
11
|
+
const ret = await api.find(finder, params, locations);
|
|
12
|
+
ret.forEach((v)=>{
|
|
13
|
+
cacheMap.set(v.key, v);
|
|
14
|
+
});
|
|
15
|
+
return [
|
|
16
|
+
cacheMap,
|
|
17
|
+
validatePK(ret, pkType)
|
|
18
|
+
];
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { find };
|
|
22
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmluZC5lcy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const core = require('@fjell/core');
|
|
6
|
+
const logger$1 = require('../logger.cjs.js');
|
|
7
|
+
|
|
8
|
+
const logger = logger$1.default.get('findOne');
|
|
9
|
+
const findOne = async (api, cacheMap, pkType, finder, finderParams = {}, locations = [])=>{
|
|
10
|
+
logger.default('findOne', {
|
|
11
|
+
finder,
|
|
12
|
+
finderParams,
|
|
13
|
+
locations
|
|
14
|
+
});
|
|
15
|
+
const ret = await api.findOne(finder, finderParams, locations);
|
|
16
|
+
cacheMap.set(ret.key, ret);
|
|
17
|
+
return [
|
|
18
|
+
cacheMap,
|
|
19
|
+
core.validatePK(ret, pkType)
|
|
20
|
+
];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.findOne = findOne;
|
|
24
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmluZE9uZS5janMuanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Item, LocKeyArray } from '@fjell/core';
|
|
2
|
+
import { ClientApi } from '@fjell/client-api';
|
|
3
|
+
import { CacheMap } from '../CacheMap';
|
|
4
|
+
export declare const findOne: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(api: ClientApi<V, S, L1, L2, L3, L4, L5>, cacheMap: CacheMap<V, S, L1, L2, L3, L4, L5>, pkType: S, finder: string, finderParams?: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, V]>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { validatePK } from '@fjell/core';
|
|
2
|
+
import LibLogger from '../logger.es.js';
|
|
3
|
+
|
|
4
|
+
const logger = LibLogger.get('findOne');
|
|
5
|
+
const findOne = async (api, cacheMap, pkType, finder, finderParams = {}, locations = [])=>{
|
|
6
|
+
logger.default('findOne', {
|
|
7
|
+
finder,
|
|
8
|
+
finderParams,
|
|
9
|
+
locations
|
|
10
|
+
});
|
|
11
|
+
const ret = await api.findOne(finder, finderParams, locations);
|
|
12
|
+
cacheMap.set(ret.key, ret);
|
|
13
|
+
return [
|
|
14
|
+
cacheMap,
|
|
15
|
+
validatePK(ret, pkType)
|
|
16
|
+
];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { findOne };
|
|
20
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmluZE9uZS5lcy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const core = require('@fjell/core');
|
|
6
|
+
const logger$1 = require('../logger.cjs.js');
|
|
7
|
+
|
|
8
|
+
const logger = logger$1.default.get('get');
|
|
9
|
+
const get = async (api, cacheMap, pkType, key)=>{
|
|
10
|
+
logger.default('get', {
|
|
11
|
+
key
|
|
12
|
+
});
|
|
13
|
+
if (!core.isValidItemKey(key)) {
|
|
14
|
+
logger.error('Key for Get is not a valid ItemKey: %j', key);
|
|
15
|
+
throw new Error('Key for Get is not a valid ItemKey');
|
|
16
|
+
}
|
|
17
|
+
let ret;
|
|
18
|
+
try {
|
|
19
|
+
ret = await api.get(key);
|
|
20
|
+
if (ret) {
|
|
21
|
+
cacheMap.set(ret.key, ret);
|
|
22
|
+
}
|
|
23
|
+
} catch (e) {
|
|
24
|
+
logger.error("Error getting item for key", {
|
|
25
|
+
key,
|
|
26
|
+
message: e.message,
|
|
27
|
+
stack: e.stack
|
|
28
|
+
});
|
|
29
|
+
throw e;
|
|
30
|
+
}
|
|
31
|
+
return [
|
|
32
|
+
cacheMap,
|
|
33
|
+
ret ? core.validatePK(ret, pkType) : null
|
|
34
|
+
];
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
exports.get = get;
|
|
38
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LmNqcy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComKey, Item, PriKey } from '@fjell/core';
|
|
2
|
+
import { ClientApi } from '@fjell/client-api';
|
|
3
|
+
import { CacheMap } from '../CacheMap';
|
|
4
|
+
export declare const get: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(api: ClientApi<V, S, L1, L2, L3, L4, L5>, cacheMap: CacheMap<V, S, L1, L2, L3, L4, L5>, pkType: S, key: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, V | null]>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { isValidItemKey, validatePK } from '@fjell/core';
|
|
2
|
+
import LibLogger from '../logger.es.js';
|
|
3
|
+
|
|
4
|
+
const logger = LibLogger.get('get');
|
|
5
|
+
const get = async (api, cacheMap, pkType, key)=>{
|
|
6
|
+
logger.default('get', {
|
|
7
|
+
key
|
|
8
|
+
});
|
|
9
|
+
if (!isValidItemKey(key)) {
|
|
10
|
+
logger.error('Key for Get is not a valid ItemKey: %j', key);
|
|
11
|
+
throw new Error('Key for Get is not a valid ItemKey');
|
|
12
|
+
}
|
|
13
|
+
let ret;
|
|
14
|
+
try {
|
|
15
|
+
ret = await api.get(key);
|
|
16
|
+
if (ret) {
|
|
17
|
+
cacheMap.set(ret.key, ret);
|
|
18
|
+
}
|
|
19
|
+
} catch (e) {
|
|
20
|
+
logger.error("Error getting item for key", {
|
|
21
|
+
key,
|
|
22
|
+
message: e.message,
|
|
23
|
+
stack: e.stack
|
|
24
|
+
});
|
|
25
|
+
throw e;
|
|
26
|
+
}
|
|
27
|
+
return [
|
|
28
|
+
cacheMap,
|
|
29
|
+
ret ? validatePK(ret, pkType) : null
|
|
30
|
+
];
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { get };
|
|
34
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LmVzLmpzIiwic291cmNlcyI6W10sInNvdXJjZXNDb250ZW50IjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const core = require('@fjell/core');
|
|
6
|
+
const httpApi = require('@fjell/http-api');
|
|
7
|
+
const logger$1 = require('../logger.cjs.js');
|
|
8
|
+
|
|
9
|
+
const logger = logger$1.default.get('one');
|
|
10
|
+
const one = async (api, cacheMap, pkType, query = {}, locations = [])=>{
|
|
11
|
+
logger.default('one', {
|
|
12
|
+
query,
|
|
13
|
+
locations
|
|
14
|
+
});
|
|
15
|
+
let retItem = null;
|
|
16
|
+
try {
|
|
17
|
+
retItem = await api.one(query, locations);
|
|
18
|
+
if (retItem) {
|
|
19
|
+
cacheMap.set(retItem.key, retItem);
|
|
20
|
+
}
|
|
21
|
+
} catch (e) {
|
|
22
|
+
if (e instanceof httpApi.NotFoundError) ; else {
|
|
23
|
+
throw e;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return [
|
|
27
|
+
cacheMap,
|
|
28
|
+
retItem ? core.validatePK(retItem, pkType) : null
|
|
29
|
+
];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.one = one;
|
|
33
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib25lLmNqcy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ==
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Item, ItemQuery, LocKeyArray } from '@fjell/core';
|
|
2
|
+
import { ClientApi } from '@fjell/client-api';
|
|
3
|
+
import { CacheMap } from '../CacheMap';
|
|
4
|
+
export declare const one: <V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never>(api: ClientApi<V, S, L1, L2, L3, L4, L5>, cacheMap: CacheMap<V, S, L1, L2, L3, L4, L5>, pkType: S, query?: ItemQuery, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, V | null]>;
|