@fjell/client-api 4.4.0 → 4.4.2
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/.kodrdriv/config.yaml +10 -0
- package/.kodrdriv/context/content.md +1 -0
- package/dist/AItemAPI.js +3 -1
- package/dist/AItemAPI.js.map +1 -0
- package/dist/CItemAPI.d.ts +11 -9
- package/dist/CItemAPI.js +4 -2
- package/dist/CItemAPI.js.map +1 -0
- package/dist/ClientApi.d.ts +11 -9
- package/dist/PItemAPI.d.ts +12 -10
- package/dist/PItemAPI.js +6 -2
- package/dist/PItemAPI.js.map +1 -0
- package/dist/Utilities.js +1 -1
- package/dist/Utilities.js.map +1 -0
- package/dist/index.cjs +486 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -0
- package/dist/logger.js +2 -2
- package/dist/logger.js.map +1 -0
- package/dist/ops/action.js +1 -1
- package/dist/ops/action.js.map +1 -0
- package/dist/ops/all.js +1 -1
- package/dist/ops/all.js.map +1 -0
- package/dist/ops/allAction.js +1 -1
- package/dist/ops/allAction.js.map +1 -0
- package/dist/ops/create.js +1 -1
- package/dist/ops/create.js.map +1 -0
- package/dist/ops/facet.d.ts +5 -0
- package/dist/ops/facet.js +32 -0
- package/dist/ops/facet.js.map +1 -0
- package/dist/ops/find.js +1 -1
- package/dist/ops/find.js.map +1 -0
- package/dist/ops/findOne.d.ts +5 -0
- package/dist/ops/findOne.js +26 -0
- package/dist/ops/findOne.js.map +1 -0
- package/dist/ops/get.js +1 -1
- package/dist/ops/get.js.map +1 -0
- package/dist/ops/index.js +5 -1
- package/dist/ops/index.js.map +1 -0
- package/dist/ops/one.d.ts +1 -1
- package/dist/ops/one.js +2 -2
- package/dist/ops/one.js.map +1 -0
- package/dist/ops/remove.js +1 -1
- package/dist/ops/remove.js.map +1 -0
- package/dist/ops/update.js +1 -1
- package/dist/ops/update.js.map +1 -0
- package/package.json +25 -25
- package/src/AItemAPI.ts +12 -9
- package/src/CItemAPI.ts +27 -19
- package/src/ClientApi.ts +25 -14
- package/src/PItemAPI.ts +63 -35
- package/src/Utilities.ts +47 -47
- package/src/logger.ts +1 -1
- package/src/ops/facet.ts +59 -0
- package/src/ops/findOne.ts +52 -0
- package/src/ops/index.ts +74 -61
- package/src/ops/one.ts +22 -23
package/dist/ops/all.js
CHANGED
|
@@ -21,4 +21,4 @@ const getAllOperation = (api, apiOptions, utilities)=>{
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export { getAllOperation };
|
|
24
|
-
//# sourceMappingURL=
|
|
24
|
+
//# sourceMappingURL=all.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all.js","sources":["../../src/ops/all.ts"],"sourcesContent":["import {\n Item,\n ItemQuery,\n LocKeyArray,\n queryToParams,\n} from \"@fjell/core\";\nimport { HttpApi, QueryParams } from \"@fjell/http-api\";\n \nimport { ClientApiOptions } from \"@/ClientApiOptions\";\nimport LibLogger from \"@/logger\";\nimport { Utilities } from \"@/Utilities\";\nimport { GetMethodOptions } from \"@fjell/http-api\";\n \nconst logger = LibLogger.get('client-api', 'ops', 'all');\n\nexport const getAllOperation = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>\n \n ) => {\n \n const all = async (\n query: ItemQuery = {} as ItemQuery,\n options: Partial<GetMethodOptions> = {},\n locations: LocKeyArray<L1, L2, L3, L4, L5> | [] = []\n ): Promise<V[]> => {\n logger.default('all', { query, locations });\n utilities.verifyLocations(locations);\n const loc: LocKeyArray<L1, L2, L3, L4, L5> | [] = locations;\n \n const params: QueryParams = queryToParams(query);\n \n const requestOptions = Object.assign({}, options, { isAuthenticated: apiOptions.allAuthenticated, params });\n \n return utilities.validatePK(await utilities.processArray(\n api.httpGet<V[]>(\n utilities.getPath(loc),\n requestOptions,\n ))) as V[];\n }\n\n return all;\n}\n \n"],"names":["logger","LibLogger","get","getAllOperation","api","apiOptions","utilities","all","query","options","locations","default","verifyLocations","loc","params","queryToParams","requestOptions","Object","assign","isAuthenticated","allAuthenticated","validatePK","processArray","httpGet","getPath"],"mappings":";;;AAaA,MAAMA,MAASC,GAAAA,SAAAA,CAAUC,GAAG,CAAC,cAAc,KAAO,EAAA,KAAA,CAAA;AAErCC,MAAAA,eAAAA,GAAkB,CAQ3BC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;IAIF,MAAMC,GAAAA,GAAM,OACVC,KAAAA,GAAmB,EAAe,EAClCC,OAAAA,GAAqC,EAAE,EACvCC,SAAAA,GAAkD,EAAE,GAAA;QAEpDV,MAAOW,CAAAA,OAAO,CAAC,KAAO,EAAA;AAAEH,YAAAA,KAAAA;AAAOE,YAAAA;AAAU,SAAA,CAAA;AACzCJ,QAAAA,SAAAA,CAAUM,eAAe,CAACF,SAAAA,CAAAA;AAC1B,QAAA,MAAMG,GAA4CH,GAAAA,SAAAA;AAElD,QAAA,MAAMI,SAAsBC,aAAcP,CAAAA,KAAAA,CAAAA;AAE1C,QAAA,MAAMQ,iBAAiBC,MAAOC,CAAAA,MAAM,CAAC,IAAIT,OAAS,EAAA;AAAEU,YAAAA,eAAAA,EAAiBd,WAAWe,gBAAgB;AAAEN,YAAAA;AAAO,SAAA,CAAA;AAEzG,QAAA,OAAOR,SAAUe,CAAAA,UAAU,CAAC,MAAMf,SAAUgB,CAAAA,YAAY,CACtDlB,GAAAA,CAAImB,OAAO,CACTjB,SAAUkB,CAAAA,OAAO,CAACX,GAClBG,CAAAA,EAAAA,cAAAA,CAAAA,CAAAA,CAAAA;AAEN,KAAA;IAEA,OAAOT,GAAAA;AACT;;;;"}
|
package/dist/ops/allAction.js
CHANGED
|
@@ -20,4 +20,4 @@ const getAllActionOperation = (api, apiOptions, utilities)=>{
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export { getAllActionOperation };
|
|
23
|
-
//# sourceMappingURL=
|
|
23
|
+
//# sourceMappingURL=allAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allAction.js","sources":["../../src/ops/allAction.ts"],"sourcesContent":["import {\n Item,\n LocKeyArray\n} from \"@fjell/core\";\nimport { HttpApi, PostMethodOptions } from \"@fjell/http-api\";\n \nimport { ClientApiOptions } from \"@/ClientApiOptions\";\nimport LibLogger from \"@/logger\";\nimport { Utilities } from \"@/Utilities\";\n \nconst logger = LibLogger.get('client-api', 'ops', 'allAction');\n \nexport const getAllActionOperation = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>\n \n ) => {\n \n const allAction = async (\n action: string,\n body: any = {},\n options: Partial<PostMethodOptions> = {},\n locations: LocKeyArray<L1, L2, L3, L4, L5> | [] = []\n ): Promise<V[]> => {\n logger.default('allAction', { action, body, locations });\n utilities.verifyLocations(locations);\n \n const loc: LocKeyArray<L1, L2, L3, L4, L5> | [] = locations;\n \n const requestOptions = Object.assign({}, options, { isAuthenticated: apiOptions.writeAuthenticated });\n \n // TODO: This should respond to either a single object, or multiple objects in an array.\n return utilities.validatePK(\n await utilities.processArray(\n api.httpPost<V[]>(\n utilities.getPath(loc),\n body,\n requestOptions,\n )\n )) as V[];\n };\n \n return allAction;\n}\n "],"names":["logger","LibLogger","get","getAllActionOperation","api","apiOptions","utilities","allAction","action","body","options","locations","default","verifyLocations","loc","requestOptions","Object","assign","isAuthenticated","writeAuthenticated","validatePK","processArray","httpPost","getPath"],"mappings":";;AAUA,MAAMA,MAASC,GAAAA,SAAAA,CAAUC,GAAG,CAAC,cAAc,KAAO,EAAA,WAAA,CAAA;AAErCC,MAAAA,qBAAAA,GAAwB,CAQjCC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;AAIF,IAAA,MAAMC,SAAY,GAAA,OAChBC,MACAC,EAAAA,IAAAA,GAAY,EAAE,EACdC,OAAAA,GAAsC,EAAE,EACxCC,SAAAA,GAAkD,EAAE,GAAA;QAEpDX,MAAOY,CAAAA,OAAO,CAAC,WAAa,EAAA;AAAEJ,YAAAA,MAAAA;AAAQC,YAAAA,IAAAA;AAAME,YAAAA;AAAU,SAAA,CAAA;AACtDL,QAAAA,SAAAA,CAAUO,eAAe,CAACF,SAAAA,CAAAA;AAE1B,QAAA,MAAMG,GAA4CH,GAAAA,SAAAA;AAElD,QAAA,MAAMI,iBAAiBC,MAAOC,CAAAA,MAAM,CAAC,IAAIP,OAAS,EAAA;AAAEQ,YAAAA,eAAAA,EAAiBb,WAAWc;AAAmB,SAAA,CAAA;;AAGnG,QAAA,OAAOb,SAAUc,CAAAA,UAAU,CACzB,MAAMd,UAAUe,YAAY,CAC1BjB,GAAIkB,CAAAA,QAAQ,CACVhB,SAAAA,CAAUiB,OAAO,CAACT,MAClBL,IACAM,EAAAA,cAAAA,CAAAA,CAAAA,CAAAA;AAGR,KAAA;IAEA,OAAOR,SAAAA;AACT;;;;"}
|
package/dist/ops/create.js
CHANGED
|
@@ -19,4 +19,4 @@ const getCreateOperation = (api, apiOptions, utilities)=>{
|
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export { getCreateOperation };
|
|
22
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sources":["../../src/ops/create.ts"],"sourcesContent":["import {\n Item,\n ItemProperties,\n LocKeyArray\n} from \"@fjell/core\";\nimport { HttpApi, PostMethodOptions } from \"@fjell/http-api\";\n \nimport { ClientApiOptions } from \"@/ClientApiOptions\";\nimport LibLogger from \"@/logger\";\nimport { Utilities } from \"@/Utilities\";\n \nconst logger = LibLogger.get('client-api', 'ops', 'create');\n\nexport const getCreateOperation = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>\n \n ) => {\n \n const create = async (\n item: ItemProperties<S, L1, L2, L3, L4, L5>,\n options: Partial<PostMethodOptions> = {},\n locations: LocKeyArray<L1, L2, L3, L4, L5> | [] = []\n ): Promise<V> => {\n logger.default('create', { item, locations });\n utilities.verifyLocations(locations);\n \n const loc: LocKeyArray<L1, L2, L3, L4, L5> | [] = locations;\n const requestOptions = Object.assign({}, options, { isAuthenticated: apiOptions.writeAuthenticated });\n \n const created: V =\n utilities.validatePK(await utilities.processOne(api.httpPost<V>(\n utilities.getPath(loc),\n item,\n requestOptions,\n ))) as V;\n return created;\n };\n\n return create;\n}\n "],"names":["logger","LibLogger","get","getCreateOperation","api","apiOptions","utilities","create","item","options","locations","default","verifyLocations","loc","requestOptions","Object","assign","isAuthenticated","writeAuthenticated","created","validatePK","processOne","httpPost","getPath"],"mappings":";;AAWA,MAAMA,MAASC,GAAAA,SAAAA,CAAUC,GAAG,CAAC,cAAc,KAAO,EAAA,QAAA,CAAA;AAErCC,MAAAA,kBAAAA,GAAqB,CAQ9BC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;IAIF,MAAMC,MAAAA,GAAS,OACbC,IACAC,EAAAA,OAAAA,GAAsC,EAAE,EACxCC,YAAkD,EAAE,GAAA;QAEpDV,MAAOW,CAAAA,OAAO,CAAC,QAAU,EAAA;AAAEH,YAAAA,IAAAA;AAAME,YAAAA;AAAU,SAAA,CAAA;AAC3CJ,QAAAA,SAAAA,CAAUM,eAAe,CAACF,SAAAA,CAAAA;AAE1B,QAAA,MAAMG,GAA4CH,GAAAA,SAAAA;AAClD,QAAA,MAAMI,iBAAiBC,MAAOC,CAAAA,MAAM,CAAC,IAAIP,OAAS,EAAA;AAAEQ,YAAAA,eAAAA,EAAiBZ,WAAWa;AAAmB,SAAA,CAAA;AAEnG,QAAA,MAAMC,OACFb,GAAAA,SAAAA,CAAUc,UAAU,CAAC,MAAMd,SAAUe,CAAAA,UAAU,CAACjB,GAAAA,CAAIkB,QAAQ,CAC1DhB,SAAAA,CAAUiB,OAAO,CAACV,MAClBL,IACAM,EAAAA,cAAAA,CAAAA,CAAAA,CAAAA;QAEN,OAAOK,OAAAA;AACT,KAAA;IAEA,OAAOZ,MAAAA;AACT;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComKey, Item, PriKey } from '@fjell/core';
|
|
2
|
+
import { GetMethodOptions, HttpApi } from '@fjell/http-api';
|
|
3
|
+
import { ClientApiOptions } from '../ClientApiOptions';
|
|
4
|
+
import { Utilities } from '../Utilities';
|
|
5
|
+
export declare const getFacetOperation: <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: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>, facet: string, options?: Partial<GetMethodOptions>) => Promise<any>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import LibLogger from '../logger.js';
|
|
2
|
+
|
|
3
|
+
const logger = LibLogger.get('client-api', 'ops', 'facet');
|
|
4
|
+
const getFacetOperation = (api, apiOptions, utilities)=>{
|
|
5
|
+
/**
|
|
6
|
+
* Executes a facet operation on an item.
|
|
7
|
+
*
|
|
8
|
+
* A facet is a piece of information that is related to an item - it represents
|
|
9
|
+
* a specific aspect or characteristic of the item. Unlike actions which may
|
|
10
|
+
* return items or perform operations, facets are informational queries that
|
|
11
|
+
* return data about a particular facet of an item.
|
|
12
|
+
*
|
|
13
|
+
* @param ik - The item key (composite or primary key) identifying the item
|
|
14
|
+
* @param facet - The name of the facet to query
|
|
15
|
+
* @param body - Optional request body for the facet operation
|
|
16
|
+
* @param options - Optional HTTP request options
|
|
17
|
+
* @returns Promise resolving to the facet data
|
|
18
|
+
*/ const facet = async (ik, facet, options = {})=>{
|
|
19
|
+
logger.default('facet', {
|
|
20
|
+
ik,
|
|
21
|
+
facet
|
|
22
|
+
});
|
|
23
|
+
const requestOptions = Object.assign({}, options, {
|
|
24
|
+
isAuthenticated: apiOptions.writeAuthenticated
|
|
25
|
+
});
|
|
26
|
+
return api.httpGet(`${utilities.getPath(ik)}/${facet}`, requestOptions);
|
|
27
|
+
};
|
|
28
|
+
return facet;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { getFacetOperation };
|
|
32
|
+
//# sourceMappingURL=facet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet.js","sources":["../../src/ops/facet.ts"],"sourcesContent":["import {\n ComKey,\n Item,\n PriKey,\n} from \"@fjell/core\";\nimport { GetMethodOptions, HttpApi } from \"@fjell/http-api\";\n\nimport { ClientApiOptions } from \"@/ClientApiOptions\";\nimport LibLogger from \"@/logger\";\nimport { Utilities } from \"@/Utilities\";\n\nconst logger = LibLogger.get('client-api', 'ops', 'facet');\n\nexport const getFacetOperation = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>\n\n ) => {\n\n /**\n * Executes a facet operation on an item.\n *\n * A facet is a piece of information that is related to an item - it represents\n * a specific aspect or characteristic of the item. Unlike actions which may\n * return items or perform operations, facets are informational queries that\n * return data about a particular facet of an item.\n *\n * @param ik - The item key (composite or primary key) identifying the item\n * @param facet - The name of the facet to query\n * @param body - Optional request body for the facet operation\n * @param options - Optional HTTP request options\n * @returns Promise resolving to the facet data\n */\n const facet = async (\n ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,\n facet: string,\n options: Partial<GetMethodOptions> = {}\n ): Promise<any> => {\n logger.default('facet', { ik, facet });\n\n const requestOptions = Object.assign({}, options, { isAuthenticated: apiOptions.writeAuthenticated });\n\n return api.httpGet<any>(\n `${utilities.getPath(ik)}/${facet}`,\n requestOptions,\n );\n\n };\n\n return facet;\n}\n"],"names":["logger","LibLogger","get","getFacetOperation","api","apiOptions","utilities","facet","ik","options","default","requestOptions","Object","assign","isAuthenticated","writeAuthenticated","httpGet","getPath"],"mappings":";;AAWA,MAAMA,MAASC,GAAAA,SAAAA,CAAUC,GAAG,CAAC,cAAc,KAAO,EAAA,OAAA,CAAA;AAErCC,MAAAA,iBAAAA,GAAoB,CAQ7BC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;AAIF;;;;;;;;;;;;;AAaC,MACD,MAAMC,KAAQ,GAAA,OACZC,IACAD,KACAE,EAAAA,OAAAA,GAAqC,EAAE,GAAA;QAEvCT,MAAOU,CAAAA,OAAO,CAAC,OAAS,EAAA;AAAEF,YAAAA,EAAAA;AAAID,YAAAA;AAAM,SAAA,CAAA;AAEpC,QAAA,MAAMI,iBAAiBC,MAAOC,CAAAA,MAAM,CAAC,IAAIJ,OAAS,EAAA;AAAEK,YAAAA,eAAAA,EAAiBT,WAAWU;AAAmB,SAAA,CAAA;QAEnG,OAAOX,GAAAA,CAAIY,OAAO,CAChB,CAAGV,EAAAA,SAAAA,CAAUW,OAAO,CAACT,EAAI,CAAA,CAAA,CAAC,EAAED,KAAAA,CAAAA,CAAO,EACnCI,cAAAA,CAAAA;AAGJ,KAAA;IAEA,OAAOJ,KAAAA;AACT;;;;"}
|
package/dist/ops/find.js
CHANGED
|
@@ -22,4 +22,4 @@ const getFindOperation = (api, apiOptions, utilities)=>{
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export { getFindOperation };
|
|
25
|
-
//# sourceMappingURL=
|
|
25
|
+
//# sourceMappingURL=find.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.js","sources":["../../src/ops/find.ts"],"sourcesContent":["import {\n Item,\n LocKeyArray,\n QueryParams\n} from \"@fjell/core\";\nimport { GetMethodOptions, HttpApi } from \"@fjell/http-api\";\n \nimport { finderToParams } from \"@/AItemAPI\";\nimport { ClientApiOptions } from \"@/ClientApiOptions\";\nimport LibLogger from \"@/logger\";\nimport { Utilities } from \"@/Utilities\";\n \nconst logger = LibLogger.get('client-api', 'ops', 'find');\n \nexport const getFindOperation = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>\n \n ) => {\n \n const find = async (\n finder: string,\n finderParams: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>,\n options: Partial<GetMethodOptions> = {},\n locations: LocKeyArray<L1, L2, L3, L4, L5> | [] = []\n ): Promise<V[]> => {\n logger.default('find', { finder, finderParams, locations });\n utilities.verifyLocations(locations);\n const loc: LocKeyArray<L1, L2, L3, L4, L5> | [] = locations;\n \n const params: QueryParams = finderToParams(finder, finderParams);\n \n const requestOptions = Object.assign({}, options, { isAuthenticated: apiOptions.allAuthenticated, params });\n \n return utilities.validatePK(await utilities.processArray(\n api.httpGet<V[]>(\n utilities.getPath(loc),\n requestOptions,\n ))) as V[];\n }\n \n return find;\n}\n "],"names":["logger","LibLogger","get","getFindOperation","api","apiOptions","utilities","find","finder","finderParams","options","locations","default","verifyLocations","loc","params","finderToParams","requestOptions","Object","assign","isAuthenticated","allAuthenticated","validatePK","processArray","httpGet","getPath"],"mappings":";;;AAYA,MAAMA,MAASC,GAAAA,SAAAA,CAAUC,GAAG,CAAC,cAAc,KAAO,EAAA,MAAA,CAAA;AAErCC,MAAAA,gBAAAA,GAAmB,CAQ5BC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;IAIF,MAAMC,IAAAA,GAAO,OACXC,MACAC,EAAAA,YAAAA,EACAC,UAAqC,EAAE,EACvCC,SAAAA,GAAkD,EAAE,GAAA;QAEpDX,MAAOY,CAAAA,OAAO,CAAC,MAAQ,EAAA;AAAEJ,YAAAA,MAAAA;AAAQC,YAAAA,YAAAA;AAAcE,YAAAA;AAAU,SAAA,CAAA;AACzDL,QAAAA,SAAAA,CAAUO,eAAe,CAACF,SAAAA,CAAAA;AAC1B,QAAA,MAAMG,GAA4CH,GAAAA,SAAAA;QAElD,MAAMI,MAAAA,GAAsBC,eAAeR,MAAQC,EAAAA,YAAAA,CAAAA;AAEnD,QAAA,MAAMQ,iBAAiBC,MAAOC,CAAAA,MAAM,CAAC,IAAIT,OAAS,EAAA;AAAEU,YAAAA,eAAAA,EAAiBf,WAAWgB,gBAAgB;AAAEN,YAAAA;AAAO,SAAA,CAAA;AAEzG,QAAA,OAAOT,SAAUgB,CAAAA,UAAU,CAAC,MAAMhB,SAAUiB,CAAAA,YAAY,CACtDnB,GAAAA,CAAIoB,OAAO,CACTlB,SAAUmB,CAAAA,OAAO,CAACX,GAClBG,CAAAA,EAAAA,cAAAA,CAAAA,CAAAA,CAAAA;AAEN,KAAA;IAEA,OAAOV,IAAAA;AACT;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Item, LocKeyArray } from '@fjell/core';
|
|
2
|
+
import { GetMethodOptions, HttpApi } from '@fjell/http-api';
|
|
3
|
+
import { ClientApiOptions } from '../ClientApiOptions';
|
|
4
|
+
import { Utilities } from '../Utilities';
|
|
5
|
+
export declare const getFindOneOperation: <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: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (finder: string, finderParams: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>, options?: Partial<GetMethodOptions>, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<V>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { finderToParams } from '../AItemAPI.js';
|
|
2
|
+
import LibLogger from '../logger.js';
|
|
3
|
+
|
|
4
|
+
const logger = LibLogger.get('client-api', 'ops', 'find');
|
|
5
|
+
const getFindOneOperation = (api, apiOptions, utilities)=>{
|
|
6
|
+
const findOne = async (finder, finderParams, options = {}, locations = [])=>{
|
|
7
|
+
logger.default('findOne', {
|
|
8
|
+
finder,
|
|
9
|
+
finderParams,
|
|
10
|
+
locations
|
|
11
|
+
});
|
|
12
|
+
utilities.verifyLocations(locations);
|
|
13
|
+
const loc = locations;
|
|
14
|
+
const params = finderToParams(finder, finderParams);
|
|
15
|
+
params.one = true;
|
|
16
|
+
const requestOptions = Object.assign({}, options, {
|
|
17
|
+
isAuthenticated: apiOptions.allAuthenticated,
|
|
18
|
+
params
|
|
19
|
+
});
|
|
20
|
+
return utilities.validatePK(await utilities.processArray(api.httpGet(utilities.getPath(loc), requestOptions)))[0];
|
|
21
|
+
};
|
|
22
|
+
return findOne;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { getFindOneOperation };
|
|
26
|
+
//# sourceMappingURL=findOne.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findOne.js","sources":["../../src/ops/findOne.ts"],"sourcesContent":["import {\n Item,\n LocKeyArray,\n QueryParams\n} from \"@fjell/core\";\nimport { GetMethodOptions, HttpApi } from \"@fjell/http-api\";\n\nimport { finderToParams } from \"@/AItemAPI\";\nimport { ClientApiOptions } from \"@/ClientApiOptions\";\nimport LibLogger from \"@/logger\";\nimport { Utilities } from \"@/Utilities\";\n\nconst logger = LibLogger.get('client-api', 'ops', 'find');\n\nexport const getFindOneOperation = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>\n\n ) => {\n\n const findOne = async (\n finder: string,\n finderParams: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>,\n options: Partial<GetMethodOptions> = {},\n locations: LocKeyArray<L1, L2, L3, L4, L5> | [] = []\n ): Promise<V> => {\n logger.default('findOne', { finder, finderParams, locations });\n utilities.verifyLocations(locations);\n const loc: LocKeyArray<L1, L2, L3, L4, L5> | [] = locations;\n\n const params: QueryParams = finderToParams(finder, finderParams);\n params.one = true;\n\n const requestOptions = Object.assign({}, options, { isAuthenticated: apiOptions.allAuthenticated, params });\n\n return (utilities.validatePK(await utilities.processArray(\n api.httpGet<V[]>(\n utilities.getPath(loc),\n requestOptions,\n ))) as V[])[0];\n }\n\n return findOne;\n}\n"],"names":["logger","LibLogger","get","getFindOneOperation","api","apiOptions","utilities","findOne","finder","finderParams","options","locations","default","verifyLocations","loc","params","finderToParams","one","requestOptions","Object","assign","isAuthenticated","allAuthenticated","validatePK","processArray","httpGet","getPath"],"mappings":";;;AAYA,MAAMA,MAASC,GAAAA,SAAAA,CAAUC,GAAG,CAAC,cAAc,KAAO,EAAA,MAAA,CAAA;AAErCC,MAAAA,mBAAAA,GAAsB,CAQ/BC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;IAIF,MAAMC,OAAAA,GAAU,OACdC,MACAC,EAAAA,YAAAA,EACAC,UAAqC,EAAE,EACvCC,SAAAA,GAAkD,EAAE,GAAA;QAEpDX,MAAOY,CAAAA,OAAO,CAAC,SAAW,EAAA;AAAEJ,YAAAA,MAAAA;AAAQC,YAAAA,YAAAA;AAAcE,YAAAA;AAAU,SAAA,CAAA;AAC5DL,QAAAA,SAAAA,CAAUO,eAAe,CAACF,SAAAA,CAAAA;AAC1B,QAAA,MAAMG,GAA4CH,GAAAA,SAAAA;QAElD,MAAMI,MAAAA,GAAsBC,eAAeR,MAAQC,EAAAA,YAAAA,CAAAA;AACnDM,QAAAA,MAAAA,CAAOE,GAAG,GAAG,IAAA;AAEb,QAAA,MAAMC,iBAAiBC,MAAOC,CAAAA,MAAM,CAAC,IAAIV,OAAS,EAAA;AAAEW,YAAAA,eAAAA,EAAiBhB,WAAWiB,gBAAgB;AAAEP,YAAAA;AAAO,SAAA,CAAA;AAEzG,QAAA,OAAO,SAAWQ,CAAAA,UAAU,CAAC,MAAMjB,UAAUkB,YAAY,CACvDpB,GAAIqB,CAAAA,OAAO,CACTnB,SAAUoB,CAAAA,OAAO,CAACZ,GAClBI,CAAAA,EAAAA,cAAAA,CAAAA,CAAAA,CACS,CAAC,CAAE,CAAA;AAClB,KAAA;IAEA,OAAOX,OAAAA;AACT;;;;"}
|
package/dist/ops/get.js
CHANGED
|
@@ -15,4 +15,4 @@ const getGetOperation = (api, apiOptions, utilities)=>{
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export { getGetOperation };
|
|
18
|
-
//# sourceMappingURL=
|
|
18
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sources":["../../src/ops/get.ts"],"sourcesContent":["import {\n ComKey,\n Item,\n PriKey,\n} from \"@fjell/core\";\nimport { GetMethodOptions, HttpApi } from \"@fjell/http-api\";\n \nimport { ClientApiOptions } from \"@/ClientApiOptions\";\nimport LibLogger from \"@/logger\";\nimport { Utilities } from \"@/Utilities\";\n \nconst logger = LibLogger.get('client-api', 'ops', 'get');\n \nexport const getGetOperation = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>\n \n ) => {\n \n const get = async (\n ik: PriKey<S> | ComKey<S, never, never, never, never, never>,\n options: Partial<GetMethodOptions> = {},\n ): Promise<V | null> => {\n logger.default('get', { ik });\n \n const requestOptions = Object.assign({}, options, { isAuthenticated: apiOptions.readAuthenticated });\n \n return utilities.validatePK(await utilities.processOne(\n api.httpGet<V>(\n utilities.getPath(ik),\n requestOptions,\n ))) as V;\n }\n \n return get;\n}\n "],"names":["logger","LibLogger","get","getGetOperation","api","apiOptions","utilities","ik","options","default","requestOptions","Object","assign","isAuthenticated","readAuthenticated","validatePK","processOne","httpGet","getPath"],"mappings":";;AAWA,MAAMA,MAASC,GAAAA,SAAAA,CAAUC,GAAG,CAAC,cAAc,KAAO,EAAA,KAAA,CAAA;AAErCC,MAAAA,eAAAA,GAAkB,CAQ3BC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;AAIF,IAAA,MAAMJ,GAAM,GAAA,OACVK,EACAC,EAAAA,OAAAA,GAAqC,EAAE,GAAA;QAEvCR,MAAOS,CAAAA,OAAO,CAAC,KAAO,EAAA;AAAEF,YAAAA;AAAG,SAAA,CAAA;AAE3B,QAAA,MAAMG,iBAAiBC,MAAOC,CAAAA,MAAM,CAAC,IAAIJ,OAAS,EAAA;AAAEK,YAAAA,eAAAA,EAAiBR,WAAWS;AAAkB,SAAA,CAAA;AAElG,QAAA,OAAOR,SAAUS,CAAAA,UAAU,CAAC,MAAMT,SAAUU,CAAAA,UAAU,CACpDZ,GAAAA,CAAIa,OAAO,CACTX,SAAUY,CAAAA,OAAO,CAACX,EAClBG,CAAAA,EAAAA,cAAAA,CAAAA,CAAAA,CAAAA;AAEN,KAAA;IAEA,OAAOR,GAAAA;AACT;;;;"}
|
package/dist/ops/index.js
CHANGED
|
@@ -7,6 +7,8 @@ import { getUpdateOperation } from './update.js';
|
|
|
7
7
|
import { getGetOperation } from './get.js';
|
|
8
8
|
import { getRemoveOperation } from './remove.js';
|
|
9
9
|
import { getFindOperation } from './find.js';
|
|
10
|
+
import { getFindOneOperation } from './findOne.js';
|
|
11
|
+
import { getFacetOperation } from './facet.js';
|
|
10
12
|
|
|
11
13
|
const getOperations = (api, apiOptions, utilities)=>{
|
|
12
14
|
return {
|
|
@@ -14,6 +16,8 @@ const getOperations = (api, apiOptions, utilities)=>{
|
|
|
14
16
|
all: getAllOperation(api, apiOptions, utilities),
|
|
15
17
|
allAction: getAllActionOperation(api, apiOptions, utilities),
|
|
16
18
|
create: getCreateOperation(api, apiOptions, utilities),
|
|
19
|
+
facet: getFacetOperation(api, apiOptions, utilities),
|
|
20
|
+
findOne: getFindOneOperation(api, apiOptions, utilities),
|
|
17
21
|
find: getFindOperation(api, apiOptions, utilities),
|
|
18
22
|
get: getGetOperation(api, apiOptions, utilities),
|
|
19
23
|
one: getOneOperation(api, apiOptions, utilities),
|
|
@@ -23,4 +27,4 @@ const getOperations = (api, apiOptions, utilities)=>{
|
|
|
23
27
|
};
|
|
24
28
|
|
|
25
29
|
export { getOperations };
|
|
26
|
-
//# sourceMappingURL=
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/ops/index.ts"],"sourcesContent":["/* eslint-disable indent */\nimport { Item } from \"@fjell/core\"\nimport { getAllOperation } from \"./all\"\nimport { getActionOperation } from \"./action\"\nimport { Utilities } from \"@/Utilities\"\nimport { HttpApi } from \"@fjell/http-api\"\nimport { getAllActionOperation } from \"./allAction\"\nimport { getOneOperation } from \"./one\"\nimport { getCreateOperation } from \"./create\"\nimport { getUpdateOperation } from \"./update\"\nimport { getGetOperation } from \"./get\"\nimport { getRemoveOperation } from \"./remove\"\nimport { getFindOperation } from \"./find\"\nimport { ClientApiOptions } from \"@/ClientApiOptions\"\nimport { ClientApi } from \"@/ClientApi\"\nimport { getFindOneOperation } from \"./findOne\"\nimport { getFacetOperation } from \"./facet\"\n\nexport const getOperations =\n <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>,\n\n ): ClientApi<V, S, L1, L2, L3, L4, L5> => {\n return {\n action: getActionOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n all: getAllOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n allAction: getAllActionOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n create: getCreateOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n facet: getFacetOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n findOne: getFindOneOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n find: getFindOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n get: getGetOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n one: getOneOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n remove: getRemoveOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n update: getUpdateOperation<V, S, L1, L2, L3, L4, L5>(\n api,\n apiOptions,\n utilities,\n ),\n }\n }"],"names":["getOperations","api","apiOptions","utilities","action","getActionOperation","all","getAllOperation","allAction","getAllActionOperation","create","getCreateOperation","facet","getFacetOperation","findOne","getFindOneOperation","find","getFindOperation","get","getGetOperation","one","getOneOperation","remove","getRemoveOperation","update","getUpdateOperation"],"mappings":";;;;;;;;;;;;AAkBaA,MAAAA,aAAAA,GACX,CAQIC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;IAGF,OAAO;QACLC,MAAQC,EAAAA,kBAAAA,CACNJ,KACAC,UACAC,EAAAA,SAAAA,CAAAA;QAEFG,GAAKC,EAAAA,eAAAA,CACHN,KACAC,UACAC,EAAAA,SAAAA,CAAAA;QAEFK,SAAWC,EAAAA,qBAAAA,CACTR,KACAC,UACAC,EAAAA,SAAAA,CAAAA;QAEFO,MAAQC,EAAAA,kBAAAA,CACNV,KACAC,UACAC,EAAAA,SAAAA,CAAAA;QAEFS,KAAOC,EAAAA,iBAAAA,CACLZ,KACAC,UACAC,EAAAA,SAAAA,CAAAA;QAEFW,OAASC,EAAAA,mBAAAA,CACPd,KACAC,UACAC,EAAAA,SAAAA,CAAAA;QAEFa,IAAMC,EAAAA,gBAAAA,CACJhB,KACAC,UACAC,EAAAA,SAAAA,CAAAA;QAEFe,GAAKC,EAAAA,eAAAA,CACHlB,KACAC,UACAC,EAAAA,SAAAA,CAAAA;QAEFiB,GAAKC,EAAAA,eAAAA,CACHpB,KACAC,UACAC,EAAAA,SAAAA,CAAAA;QAEFmB,MAAQC,EAAAA,kBAAAA,CACNtB,KACAC,UACAC,EAAAA,SAAAA,CAAAA;QAEFqB,MAAQC,EAAAA,kBAAAA,CACNxB,KACAC,UACAC,EAAAA,SAAAA;AAEJ,KAAA;AACF;;;;"}
|
package/dist/ops/one.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ import { Item, ItemQuery, LocKeyArray } from '@fjell/core';
|
|
|
2
2
|
import { GetMethodOptions, HttpApi } from '@fjell/http-api';
|
|
3
3
|
import { ClientApiOptions } from '../ClientApiOptions';
|
|
4
4
|
import { Utilities } from '../Utilities';
|
|
5
|
-
export declare const getOneOperation: <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: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (query: ItemQuery, options
|
|
5
|
+
export declare const getOneOperation: <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: HttpApi, apiOptions: ClientApiOptions, utilities: Utilities<V, S, L1, L2, L3, L4, L5>) => (query: ItemQuery, options?: Partial<GetMethodOptions>, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<V | null>;
|
package/dist/ops/one.js
CHANGED
|
@@ -3,7 +3,7 @@ import LibLogger from '../logger.js';
|
|
|
3
3
|
|
|
4
4
|
const logger = LibLogger.get('client-api', 'ops', 'one');
|
|
5
5
|
const getOneOperation = (api, apiOptions, utilities)=>{
|
|
6
|
-
const one = async (query = {}, options = {}, locations)=>{
|
|
6
|
+
const one = async (query = {}, options = {}, locations = [])=>{
|
|
7
7
|
logger.default('one', {
|
|
8
8
|
query,
|
|
9
9
|
locations
|
|
@@ -26,4 +26,4 @@ const getOneOperation = (api, apiOptions, utilities)=>{
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export { getOneOperation };
|
|
29
|
-
//# sourceMappingURL=
|
|
29
|
+
//# sourceMappingURL=one.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"one.js","sources":["../../src/ops/one.ts"],"sourcesContent":["import {\n Item,\n ItemQuery,\n LocKeyArray,\n QueryParams,\n queryToParams\n} from \"@fjell/core\";\nimport { GetMethodOptions, HttpApi } from \"@fjell/http-api\";\n\nimport { ClientApiOptions } from \"@/ClientApiOptions\";\nimport LibLogger from \"@/logger\";\nimport { Utilities } from \"@/Utilities\";\n\nconst logger = LibLogger.get('client-api', 'ops', 'one');\n\nexport const getOneOperation = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>\n\n ): (\n query: ItemQuery,\n options?: Partial<GetMethodOptions>,\n locations?: LocKeyArray<L1, L2, L3, L4, L5> | []\n ) => Promise<V | null> => {\n\n const one = async (\n query: ItemQuery = {} as ItemQuery,\n options: Partial<GetMethodOptions> = {},\n locations: LocKeyArray<L1, L2, L3, L4, L5> | [] = []\n ): Promise<V | null> => {\n logger.default('one', { query, locations });\n utilities.verifyLocations(locations);\n\n const loc: LocKeyArray<L1, L2, L3, L4, L5> | [] = locations;\n\n const params: QueryParams = queryToParams(query);\n const requestOptions = Object.assign({}, options, { isAuthenticated: apiOptions.readAuthenticated, params });\n\n let item: V | null = null;\n\n const items = utilities.validatePK(await utilities.processArray(\n api.httpGet<V[]>(\n utilities.getPath(loc),\n requestOptions,\n ))) as V[];\n\n if (items.length > 0) {\n item = items[0];\n }\n\n return item as V;\n }\n\n return one;\n}\n"],"names":["logger","LibLogger","get","getOneOperation","api","apiOptions","utilities","one","query","options","locations","default","verifyLocations","loc","params","queryToParams","requestOptions","Object","assign","isAuthenticated","readAuthenticated","item","items","validatePK","processArray","httpGet","getPath","length"],"mappings":";;;AAaA,MAAMA,MAASC,GAAAA,SAAAA,CAAUC,GAAG,CAAC,cAAc,KAAO,EAAA,KAAA,CAAA;AAErCC,MAAAA,eAAAA,GAAkB,CAQ3BC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;IAQF,MAAMC,GAAAA,GAAM,OACVC,KAAAA,GAAmB,EAAe,EAClCC,OAAAA,GAAqC,EAAE,EACvCC,SAAAA,GAAkD,EAAE,GAAA;QAEpDV,MAAOW,CAAAA,OAAO,CAAC,KAAO,EAAA;AAAEH,YAAAA,KAAAA;AAAOE,YAAAA;AAAU,SAAA,CAAA;AACzCJ,QAAAA,SAAAA,CAAUM,eAAe,CAACF,SAAAA,CAAAA;AAE1B,QAAA,MAAMG,GAA4CH,GAAAA,SAAAA;AAElD,QAAA,MAAMI,SAAsBC,aAAcP,CAAAA,KAAAA,CAAAA;AAC1C,QAAA,MAAMQ,iBAAiBC,MAAOC,CAAAA,MAAM,CAAC,IAAIT,OAAS,EAAA;AAAEU,YAAAA,eAAAA,EAAiBd,WAAWe,iBAAiB;AAAEN,YAAAA;AAAO,SAAA,CAAA;AAE1G,QAAA,IAAIO,IAAiB,GAAA,IAAA;AAErB,QAAA,MAAMC,KAAQhB,GAAAA,SAAAA,CAAUiB,UAAU,CAAC,MAAMjB,SAAUkB,CAAAA,YAAY,CAC7DpB,GAAAA,CAAIqB,OAAO,CACTnB,SAAUoB,CAAAA,OAAO,CAACb,GAClBG,CAAAA,EAAAA,cAAAA,CAAAA,CAAAA,CAAAA;QAGJ,IAAIM,KAAAA,CAAMK,MAAM,GAAG,CAAG,EAAA;YACpBN,IAAOC,GAAAA,KAAK,CAAC,CAAE,CAAA;AACjB;QAEA,OAAOD,IAAAA;AACT,KAAA;IAEA,OAAOd,GAAAA;AACT;;;;"}
|
package/dist/ops/remove.js
CHANGED
|
@@ -15,4 +15,4 @@ const getRemoveOperation = (api, apiOptions, utilities)=>{
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export { getRemoveOperation };
|
|
18
|
-
//# sourceMappingURL=
|
|
18
|
+
//# sourceMappingURL=remove.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove.js","sources":["../../src/ops/remove.ts"],"sourcesContent":["import {\n ComKey,\n Item,\n PriKey,\n} from \"@fjell/core\";\nimport { DeleteMethodOptions, HttpApi } from \"@fjell/http-api\";\n \nimport { ClientApiOptions } from \"@/ClientApiOptions\";\nimport LibLogger from \"@/logger\";\nimport { Utilities } from \"@/Utilities\";\n \nconst logger = LibLogger.get('client-api', 'ops', 'remove');\n \nexport const getRemoveOperation = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>\n \n ) => {\n \n const remove = async (\n ik: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5>,\n options: Partial<DeleteMethodOptions> = {},\n ): Promise<boolean> => {\n logger.default('remove', { ik });\n \n const requestOptions = Object.assign({}, options, { isAuthenticated: apiOptions.writeAuthenticated });\n \n return api.httpDelete<boolean>(utilities.getPath(ik), requestOptions);\n }\n \n return remove;\n}\n "],"names":["logger","LibLogger","get","getRemoveOperation","api","apiOptions","utilities","remove","ik","options","default","requestOptions","Object","assign","isAuthenticated","writeAuthenticated","httpDelete","getPath"],"mappings":";;AAWA,MAAMA,MAASC,GAAAA,SAAAA,CAAUC,GAAG,CAAC,cAAc,KAAO,EAAA,QAAA,CAAA;AAErCC,MAAAA,kBAAAA,GAAqB,CAQ9BC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;AAIF,IAAA,MAAMC,MAAS,GAAA,OACbC,EACAC,EAAAA,OAAAA,GAAwC,EAAE,GAAA;QAE1CT,MAAOU,CAAAA,OAAO,CAAC,QAAU,EAAA;AAAEF,YAAAA;AAAG,SAAA,CAAA;AAE9B,QAAA,MAAMG,iBAAiBC,MAAOC,CAAAA,MAAM,CAAC,IAAIJ,OAAS,EAAA;AAAEK,YAAAA,eAAAA,EAAiBT,WAAWU;AAAmB,SAAA,CAAA;AAEnG,QAAA,OAAOX,IAAIY,UAAU,CAAUV,SAAUW,CAAAA,OAAO,CAACT,EAAKG,CAAAA,EAAAA,cAAAA,CAAAA;AACxD,KAAA;IAEA,OAAOJ,MAAAA;AACT;;;;"}
|
package/dist/ops/update.js
CHANGED
|
@@ -16,4 +16,4 @@ const getUpdateOperation = (api, apiOptions, utilities)=>{
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export { getUpdateOperation };
|
|
19
|
-
//# sourceMappingURL=
|
|
19
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sources":["../../src/ops/update.ts"],"sourcesContent":["import {\n ComKey,\n Item,\n ItemProperties,\n PriKey\n} from \"@fjell/core\";\nimport { HttpApi, PutMethodOptions } from \"@fjell/http-api\";\n \nimport { ClientApiOptions } from \"@/ClientApiOptions\";\nimport LibLogger from \"@/logger\";\nimport { Utilities } from \"@/Utilities\";\n \nconst logger = LibLogger.get('client-api', 'ops', 'update');\n \nexport const getUpdateOperation = <\n V extends Item<S, L1, L2, L3, L4, L5>,\n S extends string,\n L1 extends string = never,\n L2 extends string = never,\n L3 extends string = never,\n L4 extends string = never,\n L5 extends string = never>(\n api: HttpApi,\n apiOptions: ClientApiOptions,\n utilities: Utilities<V, S, L1, L2, L3, L4, L5>\n \n ) => {\n \n const update = async (\n ik: PriKey<S> | ComKey<S, L1, L2, L3, L4, L5>,\n item: ItemProperties<S, L1, L2, L3, L4, L5>,\n options: Partial<PutMethodOptions> = {},\n ): Promise<V> => {\n logger.default('update', { ik, item });\n const requestOptions = Object.assign({}, options, { isAuthenticated: apiOptions.writeAuthenticated });\n \n return utilities.validatePK(await utilities.processOne(\n api.httpPut<V>(\n utilities.getPath(ik),\n item,\n requestOptions,\n ))) as V;\n }\n \n return update;\n}\n "],"names":["logger","LibLogger","get","getUpdateOperation","api","apiOptions","utilities","update","ik","item","options","default","requestOptions","Object","assign","isAuthenticated","writeAuthenticated","validatePK","processOne","httpPut","getPath"],"mappings":";;AAYA,MAAMA,MAASC,GAAAA,SAAAA,CAAUC,GAAG,CAAC,cAAc,KAAO,EAAA,QAAA,CAAA;AAErCC,MAAAA,kBAAAA,GAAqB,CAQ9BC,GAAAA,EACAC,UACAC,EAAAA,SAAAA,GAAAA;AAIF,IAAA,MAAMC,SAAS,OACbC,EAAAA,EACAC,IACAC,EAAAA,OAAAA,GAAqC,EAAE,GAAA;QAEvCV,MAAOW,CAAAA,OAAO,CAAC,QAAU,EAAA;AAAEH,YAAAA,EAAAA;AAAIC,YAAAA;AAAK,SAAA,CAAA;AACpC,QAAA,MAAMG,iBAAiBC,MAAOC,CAAAA,MAAM,CAAC,IAAIJ,OAAS,EAAA;AAAEK,YAAAA,eAAAA,EAAiBV,WAAWW;AAAmB,SAAA,CAAA;AAEnG,QAAA,OAAOV,SAAUW,CAAAA,UAAU,CAAC,MAAMX,UAAUY,UAAU,CACpDd,GAAIe,CAAAA,OAAO,CACTb,SAAAA,CAAUc,OAAO,CAACZ,KAClBC,IACAG,EAAAA,cAAAA,CAAAA,CAAAA,CAAAA;AAEN,KAAA;IAEA,OAAOL,MAAAA;AACT;;;;"}
|
package/package.json
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjell/client-api",
|
|
3
3
|
"description": "Client API for Fjell",
|
|
4
|
-
"version": "4.4.
|
|
4
|
+
"version": "4.4.2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"
|
|
6
|
+
"type": "module",
|
|
7
|
+
"module": "./dist/index.js",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": {
|
|
9
10
|
"types": "./dist/index.d.ts",
|
|
10
|
-
"
|
|
11
|
-
"default": "./dist/index.js"
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
"type": "module",
|
|
15
14
|
"dependencies": {
|
|
16
|
-
"@fjell/core": "^4.4.
|
|
17
|
-
"@fjell/http-api": "^4.4.
|
|
18
|
-
"@fjell/logging": "^4.4.
|
|
15
|
+
"@fjell/core": "^4.4.3",
|
|
16
|
+
"@fjell/http-api": "^4.4.1",
|
|
17
|
+
"@fjell/logging": "^4.4.3",
|
|
19
18
|
"deepmerge": "^4.3.1"
|
|
20
19
|
},
|
|
21
20
|
"devDependencies": {
|
|
22
|
-
"@babel/core": "^7.
|
|
23
|
-
"@babel/preset-env": "^7.
|
|
24
|
-
"@babel/preset-typescript": "^7.
|
|
21
|
+
"@babel/core": "^7.27.4",
|
|
22
|
+
"@babel/preset-env": "^7.27.2",
|
|
23
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
25
24
|
"@eslint/eslintrc": "^3.3.1",
|
|
26
|
-
"@eslint/js": "^9.
|
|
27
|
-
"@swc/core": "^1.
|
|
28
|
-
"@tsconfig/recommended": "^1.0.
|
|
29
|
-
"@types/luxon": "^3.
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
31
|
-
"@typescript-eslint/parser": "^8.
|
|
32
|
-
"@vitest/coverage-istanbul": "^3.
|
|
33
|
-
"@vitest/coverage-v8": "^3.
|
|
34
|
-
"@vitest/ui": "^3.
|
|
25
|
+
"@eslint/js": "^9.29.0",
|
|
26
|
+
"@swc/core": "^1.12.1",
|
|
27
|
+
"@tsconfig/recommended": "^1.0.9",
|
|
28
|
+
"@types/luxon": "^3.6.2",
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
30
|
+
"@typescript-eslint/parser": "^8.34.1",
|
|
31
|
+
"@vitest/coverage-istanbul": "^3.2.4",
|
|
32
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
33
|
+
"@vitest/ui": "^3.2.4",
|
|
35
34
|
"concurrently": "^9.1.2",
|
|
36
|
-
"eslint": "^9.
|
|
35
|
+
"eslint": "^9.29.0",
|
|
37
36
|
"rimraf": "^6.0.1",
|
|
38
|
-
"tsc-alias": "^1.8.
|
|
39
|
-
"typescript": "^5.
|
|
37
|
+
"tsc-alias": "^1.8.16",
|
|
38
|
+
"typescript": "^5.8.3",
|
|
40
39
|
"vite": "^6.3.5",
|
|
41
40
|
"vite-plugin-dts": "^4.5.4",
|
|
42
41
|
"vite-plugin-node": "^5.0.1",
|
|
43
|
-
"vitest": "^3.
|
|
42
|
+
"vitest": "^3.2.4"
|
|
44
43
|
},
|
|
45
44
|
"repository": {
|
|
46
45
|
"type": "git",
|
|
47
46
|
"url": "git+https://github.com/getfjell/client-api.git"
|
|
48
47
|
},
|
|
49
48
|
"scripts": {
|
|
50
|
-
"
|
|
49
|
+
"dev": "concurrently \"tsc --noEmit --watch\" \"vite build --watch\"",
|
|
50
|
+
"build": "pnpm run lint && tsc --noEmit && vite build",
|
|
51
51
|
"lint": "eslint . --ext .ts --fix",
|
|
52
52
|
"clean": "rimraf dist",
|
|
53
53
|
"test": "vitest run --coverage",
|
package/src/AItemAPI.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable indent */
|
|
1
2
|
import { Item, QueryParams } from "@fjell/core";
|
|
2
3
|
import { HttpApi } from "@fjell/http-api";
|
|
3
4
|
|
|
@@ -26,8 +27,8 @@ export type PathNamesArray<
|
|
|
26
27
|
[string, string]) :
|
|
27
28
|
[string, string, string]) :
|
|
28
29
|
[string, string, string, string]) :
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
[string, string, string, string, string]) :
|
|
31
|
+
[string, string, string, string, string, string]);
|
|
31
32
|
|
|
32
33
|
export const finderToParams = (
|
|
33
34
|
finder: string,
|
|
@@ -48,16 +49,16 @@ export const createAItemAPI = <
|
|
|
48
49
|
L4 extends string = never,
|
|
49
50
|
L5 extends string = never
|
|
50
51
|
>(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
api: HttpApi,
|
|
53
|
+
pkType: S,
|
|
54
|
+
pathNames: PathNamesArray<L1, L2, L3, L4, L5>,
|
|
55
|
+
options?: ClientApiOptions,
|
|
56
|
+
): ClientApi<V, S, L1, L2, L3, L4, L5> => {
|
|
56
57
|
|
|
57
58
|
logger.default('createAItemAPI', { pkType, pathNames, options });
|
|
58
59
|
|
|
59
60
|
let mergedOptions: ClientApiOptions;
|
|
60
|
-
|
|
61
|
+
|
|
61
62
|
const defaultOptions: ClientApiOptions = {
|
|
62
63
|
readAuthenticated: true,
|
|
63
64
|
allAuthenticated: true,
|
|
@@ -70,7 +71,7 @@ export const createAItemAPI = <
|
|
|
70
71
|
mergedOptions = defaultOptions;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
const utilities =
|
|
74
|
+
const utilities = createUtilities<V, S, L1, L2, L3, L4, L5>(pkType, pathNames);
|
|
74
75
|
const operations = getOperations<V, S, L1, L2, L3, L4, L5>(api, mergedOptions, utilities);
|
|
75
76
|
|
|
76
77
|
return {
|
|
@@ -78,7 +79,9 @@ export const createAItemAPI = <
|
|
|
78
79
|
all: operations.all,
|
|
79
80
|
allAction: operations.allAction,
|
|
80
81
|
create: operations.create,
|
|
82
|
+
facet: operations.facet,
|
|
81
83
|
find: operations.find,
|
|
84
|
+
findOne: operations.findOne,
|
|
82
85
|
get: operations.get,
|
|
83
86
|
one: operations.one,
|
|
84
87
|
remove: operations.remove,
|
package/src/CItemAPI.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import {
|
|
3
3
|
ComKey,
|
|
4
4
|
Item,
|
|
@@ -35,43 +35,54 @@ export interface CItemApi<
|
|
|
35
35
|
ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,
|
|
36
36
|
action: string,
|
|
37
37
|
body: any,
|
|
38
|
-
options
|
|
38
|
+
options?: Partial<PostMethodOptions>
|
|
39
39
|
) => Promise<V>;
|
|
40
40
|
all: (
|
|
41
41
|
query: ItemQuery,
|
|
42
|
-
options
|
|
43
|
-
locations
|
|
42
|
+
options?: Partial<GetMethodOptions>,
|
|
43
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
44
44
|
) => Promise<V[]>;
|
|
45
45
|
allAction: (
|
|
46
46
|
action: string,
|
|
47
47
|
body: any,
|
|
48
|
-
options
|
|
49
|
-
locations
|
|
48
|
+
options?: Partial<PostMethodOptions>,
|
|
49
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
50
50
|
) => Promise<V[]>;
|
|
51
51
|
get: (
|
|
52
52
|
ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,
|
|
53
|
-
options
|
|
53
|
+
options?: Partial<GetMethodOptions>,
|
|
54
54
|
) => Promise<V | null>;
|
|
55
55
|
create: (
|
|
56
56
|
item: TypesProperties<V, S, L1, L2, L3, L4, L5>,
|
|
57
|
-
options
|
|
58
|
-
locations
|
|
57
|
+
options?: Partial<PostMethodOptions>,
|
|
58
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
59
59
|
) => Promise<V>;
|
|
60
60
|
remove: (
|
|
61
61
|
ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,
|
|
62
|
-
options
|
|
62
|
+
options?: Partial<DeleteMethodOptions>
|
|
63
63
|
) => Promise<boolean>;
|
|
64
64
|
update: (
|
|
65
65
|
ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,
|
|
66
66
|
item: TypesProperties<V, S, L1, L2, L3, L4, L5>,
|
|
67
|
-
options
|
|
67
|
+
options?: Partial<PutMethodOptions>
|
|
68
68
|
) => Promise<V>;
|
|
69
|
+
facet: (
|
|
70
|
+
ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,
|
|
71
|
+
facet: string,
|
|
72
|
+
options?: Partial<GetMethodOptions>,
|
|
73
|
+
) => Promise<any>;
|
|
69
74
|
find: (
|
|
70
75
|
finder: string,
|
|
71
76
|
finderParams: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>,
|
|
72
|
-
options
|
|
73
|
-
locations
|
|
77
|
+
options?: Partial<GetMethodOptions>,
|
|
78
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
74
79
|
) => Promise<V[]>;
|
|
80
|
+
findOne: (
|
|
81
|
+
finder: string,
|
|
82
|
+
finderParams: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>,
|
|
83
|
+
options?: Partial<GetMethodOptions>,
|
|
84
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
85
|
+
) => Promise<V>;
|
|
75
86
|
};
|
|
76
87
|
|
|
77
88
|
export const createCItemApi = <
|
|
@@ -82,12 +93,7 @@ export const createCItemApi = <
|
|
|
82
93
|
L3 extends string = never,
|
|
83
94
|
L4 extends string = never,
|
|
84
95
|
L5 extends string = never
|
|
85
|
-
>(
|
|
86
|
-
api: HttpApi,
|
|
87
|
-
type: S,
|
|
88
|
-
pathNames: PathNamesArray<L1, L2, L3, L4, L5>,
|
|
89
|
-
options: ClientApiOptions
|
|
90
|
-
): CItemApi<V, S, L1, L2, L3, L4, L5> => {
|
|
96
|
+
>(api: HttpApi, type: S, pathNames: PathNamesArray<L1, L2, L3, L4, L5>, options?: ClientApiOptions): CItemApi<V, S, L1, L2, L3, L4, L5> => {
|
|
91
97
|
|
|
92
98
|
logger.default('createCItemApi', { api, type, pathNames, options });
|
|
93
99
|
|
|
@@ -102,6 +108,8 @@ export const createCItemApi = <
|
|
|
102
108
|
create: aItemAPI.create,
|
|
103
109
|
remove: aItemAPI.remove,
|
|
104
110
|
update: aItemAPI.update,
|
|
111
|
+
facet: aItemAPI.facet,
|
|
105
112
|
find: aItemAPI.find,
|
|
113
|
+
findOne: aItemAPI.findOne,
|
|
106
114
|
} as unknown as CItemApi<V, S, L1, L2, L3, L4, L5>;
|
|
107
115
|
}
|
package/src/ClientApi.ts
CHANGED
|
@@ -14,46 +14,57 @@ export interface ClientApi<
|
|
|
14
14
|
ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,
|
|
15
15
|
action: string,
|
|
16
16
|
body: any,
|
|
17
|
-
options
|
|
17
|
+
options?: Partial<PostMethodOptions>,
|
|
18
18
|
) => Promise<V>;
|
|
19
19
|
all: (
|
|
20
20
|
query: ItemQuery,
|
|
21
|
-
options
|
|
22
|
-
locations
|
|
21
|
+
options?: Partial<GetMethodOptions>,
|
|
22
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
23
23
|
) => Promise<V[]>;
|
|
24
24
|
allAction: (
|
|
25
25
|
action: string,
|
|
26
26
|
body: any,
|
|
27
|
-
options
|
|
28
|
-
locations
|
|
27
|
+
options?: Partial<PostMethodOptions>,
|
|
28
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
29
29
|
) => Promise<V[]>;
|
|
30
30
|
create: (
|
|
31
31
|
item: TypesProperties<V, S, L1, L2, L3, L4, L5>,
|
|
32
|
-
options
|
|
33
|
-
locations
|
|
32
|
+
options?: Partial<PostMethodOptions>,
|
|
33
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
34
34
|
) => Promise<V>;
|
|
35
|
+
facet: (
|
|
36
|
+
ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,
|
|
37
|
+
facet: string,
|
|
38
|
+
options?: Partial<GetMethodOptions>,
|
|
39
|
+
) => Promise<any>;
|
|
35
40
|
find: (
|
|
36
41
|
finder: string,
|
|
37
42
|
finderParams: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>,
|
|
38
|
-
options
|
|
39
|
-
locations
|
|
43
|
+
options?: Partial<GetMethodOptions>,
|
|
44
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
40
45
|
) => Promise<V[]>;
|
|
46
|
+
findOne: (
|
|
47
|
+
finder: string,
|
|
48
|
+
finderParams: Record<string, string | number | boolean | Date | Array<string | number | boolean | Date>>,
|
|
49
|
+
options?: Partial<GetMethodOptions>,
|
|
50
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
51
|
+
) => Promise<V>;
|
|
41
52
|
get: (
|
|
42
53
|
ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,
|
|
43
|
-
options
|
|
54
|
+
options?: Partial<GetMethodOptions>,
|
|
44
55
|
) => Promise<V | null>;
|
|
45
56
|
one: (
|
|
46
57
|
query: ItemQuery,
|
|
47
|
-
options
|
|
48
|
-
locations
|
|
58
|
+
options?: Partial<GetMethodOptions>,
|
|
59
|
+
locations?: LocKeyArray<L1, L2, L3, L4, L5> | []
|
|
49
60
|
) => Promise<V | null>;
|
|
50
61
|
remove: (
|
|
51
62
|
ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,
|
|
52
|
-
options
|
|
63
|
+
options?: Partial<DeleteMethodOptions>
|
|
53
64
|
) => Promise<boolean>;
|
|
54
65
|
update: (
|
|
55
66
|
ik: ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>,
|
|
56
67
|
item: TypesProperties<V, S, L1, L2, L3, L4, L5>,
|
|
57
|
-
options
|
|
68
|
+
options?: Partial<PutMethodOptions>
|
|
58
69
|
) => Promise<V>;
|
|
59
70
|
}
|