@monkvision/network 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/lib/package.json +9 -9
- package/lib/src/api/index.d.ts +1 -1
- package/lib/src/api/inspection/index.d.ts +1 -0
- package/lib/src/api/inspection/mappers.d.ts +1 -1
- package/lib/src/api/inspection/mappers.js +5 -2
- package/lib/src/api/inspection/requests.js +1 -1
- package/lib/src/api/react.d.ts +2 -2
- package/package.json +10 -10
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monkvision/network",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"license": "BSD-3-Clause-Clear",
|
|
5
5
|
"packageManager": "yarn@3.2.4",
|
|
6
6
|
"description": "MonkJs core package used to communicate with the API",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"lint:fix": "yarn run prettier:fix && yarn run eslint:fix"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@monkvision/common": "4.
|
|
32
|
-
"@monkvision/sights": "4.
|
|
31
|
+
"@monkvision/common": "4.4.1",
|
|
32
|
+
"@monkvision/sights": "4.4.1",
|
|
33
33
|
"jsonwebtoken": "^9.0.2",
|
|
34
34
|
"jwt-decode": "^4.0.0",
|
|
35
35
|
"ky": "^1.2.0",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"react-router-dom": "^6.22.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@monkvision/eslint-config-base": "4.
|
|
46
|
-
"@monkvision/eslint-config-typescript": "4.
|
|
47
|
-
"@monkvision/jest-config": "4.
|
|
48
|
-
"@monkvision/prettier-config": "4.
|
|
49
|
-
"@monkvision/types": "4.
|
|
50
|
-
"@monkvision/typescript-config": "4.
|
|
45
|
+
"@monkvision/eslint-config-base": "4.4.1",
|
|
46
|
+
"@monkvision/eslint-config-typescript": "4.4.1",
|
|
47
|
+
"@monkvision/jest-config": "4.4.1",
|
|
48
|
+
"@monkvision/prettier-config": "4.4.1",
|
|
49
|
+
"@monkvision/types": "4.4.1",
|
|
50
|
+
"@monkvision/typescript-config": "4.4.1",
|
|
51
51
|
"@types/jest": "^29.2.2",
|
|
52
52
|
"@types/jsonwebtoken": "^9.0.5",
|
|
53
53
|
"@types/node": "^18.11.9",
|
package/lib/src/api/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { useMonkApi } from './react';
|
|
|
4
4
|
export { MonkNetworkError, type MonkHTTPError } from './error';
|
|
5
5
|
export { MonkApi } from './api';
|
|
6
6
|
export * from './hooks';
|
|
7
|
-
export { type GetInspectionOptions, type GetInspectionResponse, type GetAllInspectionsCountResponse, type UpdateAdditionalDataOptions, type GetAllInspectionsResponse, } from './inspection';
|
|
7
|
+
export { type GetInspectionOptions, type GetInspectionResponse, type GetAllInspectionsCountResponse, type UpdateAdditionalDataOptions, type GetAllInspectionsResponse, type GetAllInspectionsOptions, } from './inspection';
|
|
8
8
|
export { type AddImageResponse, type AddBeautyShotImageOptions, type Add2ShotCloseUpImageOptions, type AddImageOptions, type AddVideoFrameOptions, ImageUploadType, } from './image';
|
|
9
9
|
export { type UpdateProgressStatus, type UpdateTaskStatusOptions, type StartInspectionTasksOptions, } from './task';
|
|
10
10
|
export { type UpdateInspectionVehicleOptions } from './vehicle';
|
|
@@ -55,4 +55,4 @@ export interface GetAllInspectionsOptions {
|
|
|
55
55
|
*/
|
|
56
56
|
sort?: SortRequestParams;
|
|
57
57
|
}
|
|
58
|
-
export declare function mapApiAllInspectionsUrlParamsGet(options: GetAllInspectionsOptions, verbose: boolean): string;
|
|
58
|
+
export declare function mapApiAllInspectionsUrlParamsGet(options: GetAllInspectionsOptions, verbose: boolean | null): string;
|
|
@@ -494,7 +494,9 @@ exports.mapApiInspectionPost = mapApiInspectionPost;
|
|
|
494
494
|
function mapApiAllInspectionsUrlParamsGet(options, verbose) {
|
|
495
495
|
var _a, _b;
|
|
496
496
|
var params = new URLSearchParams();
|
|
497
|
-
|
|
497
|
+
if (verbose !== null) {
|
|
498
|
+
params.append('verbose', verbose ? '1' : '0');
|
|
499
|
+
}
|
|
498
500
|
var ignoredFilters = ['verbose'];
|
|
499
501
|
if (options.filters) {
|
|
500
502
|
Object.entries(options.filters).forEach(function (_a) {
|
|
@@ -516,6 +518,7 @@ function mapApiAllInspectionsUrlParamsGet(options, verbose) {
|
|
|
516
518
|
if ((_b = options.sort) === null || _b === void 0 ? void 0 : _b.sortOrder) {
|
|
517
519
|
params.append('pagination_order', options.sort.sortOrder.toString());
|
|
518
520
|
}
|
|
519
|
-
|
|
521
|
+
var paramsStr = params.toString();
|
|
522
|
+
return "".concat(paramsStr.length > 0 ? '?' : '').concat(paramsStr);
|
|
520
523
|
}
|
|
521
524
|
exports.mapApiAllInspectionsUrlParamsGet = mapApiAllInspectionsUrlParamsGet;
|
|
@@ -217,7 +217,7 @@ function getAllInspectionsCount(options, config, _dispatch) {
|
|
|
217
217
|
switch (_a.label) {
|
|
218
218
|
case 0:
|
|
219
219
|
kyOptions = (0, config_1.getDefaultOptions)(config);
|
|
220
|
-
return [4 /*yield*/, ky_1.default.get("inspections/count".concat((0, mappers_1.mapApiAllInspectionsUrlParamsGet)(options,
|
|
220
|
+
return [4 /*yield*/, ky_1.default.get("inspections/count".concat((0, mappers_1.mapApiAllInspectionsUrlParamsGet)(options, null)), kyOptions)];
|
|
221
221
|
case 1:
|
|
222
222
|
response = _a.sent();
|
|
223
223
|
return [4 /*yield*/, response.json()];
|
package/lib/src/api/react.d.ts
CHANGED
|
@@ -20,13 +20,13 @@ export declare function useMonkApi(config: MonkApiConfig): {
|
|
|
20
20
|
*
|
|
21
21
|
* @param options The options of the request.
|
|
22
22
|
*/
|
|
23
|
-
getAllInspections: (options: import("./inspection
|
|
23
|
+
getAllInspections: (options: import("./inspection").GetAllInspectionsOptions) => Promise<import("./types").MonkApiResponse<import("./inspection").GetAllInspectionsResponse, import("./models").ApiPaginatedResponse<import("./models").ApiAllInspectionsVerboseGet>>>;
|
|
24
24
|
/**
|
|
25
25
|
* Gets the count of inspections that match the given filters.
|
|
26
26
|
*
|
|
27
27
|
* @param options The options of the request.
|
|
28
28
|
*/
|
|
29
|
-
getAllInspectionsCount: (options: import("./inspection
|
|
29
|
+
getAllInspectionsCount: (options: import("./inspection").GetAllInspectionsOptions) => Promise<import("./types").MonkApiResponse<import("./inspection").GetAllInspectionsCountResponse, import("./models").ApiInspectionsCountGet>>;
|
|
30
30
|
/**
|
|
31
31
|
* Create a new inspection with the given options. See the `CreateInspectionOptions` interface for more details.
|
|
32
32
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monkvision/network",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.2",
|
|
4
4
|
"license": "BSD-3-Clause-Clear",
|
|
5
5
|
"packageManager": "yarn@3.2.4",
|
|
6
6
|
"description": "MonkJs core package used to communicate with the API",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"lint:fix": "yarn run prettier:fix && yarn run eslint:fix"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@monkvision/common": "4.4.
|
|
32
|
-
"@monkvision/sights": "4.4.
|
|
31
|
+
"@monkvision/common": "4.4.2",
|
|
32
|
+
"@monkvision/sights": "4.4.2",
|
|
33
33
|
"jsonwebtoken": "^9.0.2",
|
|
34
34
|
"jwt-decode": "^4.0.0",
|
|
35
35
|
"ky": "^1.2.0",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"react-router-dom": "^6.22.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@monkvision/eslint-config-base": "4.4.
|
|
46
|
-
"@monkvision/eslint-config-typescript": "4.4.
|
|
47
|
-
"@monkvision/jest-config": "4.4.
|
|
48
|
-
"@monkvision/prettier-config": "4.4.
|
|
49
|
-
"@monkvision/types": "4.4.
|
|
50
|
-
"@monkvision/typescript-config": "4.4.
|
|
45
|
+
"@monkvision/eslint-config-base": "4.4.2",
|
|
46
|
+
"@monkvision/eslint-config-typescript": "4.4.2",
|
|
47
|
+
"@monkvision/jest-config": "4.4.2",
|
|
48
|
+
"@monkvision/prettier-config": "4.4.2",
|
|
49
|
+
"@monkvision/types": "4.4.2",
|
|
50
|
+
"@monkvision/typescript-config": "4.4.2",
|
|
51
51
|
"@types/jest": "^29.2.2",
|
|
52
52
|
"@types/jsonwebtoken": "^9.0.5",
|
|
53
53
|
"@types/node": "^18.11.9",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"url": "https://github.com/monkvision/monkjs/issues"
|
|
85
85
|
},
|
|
86
86
|
"homepage": "https://github.com/monkvision/monkjs",
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "5258aa19cfb4c5b6d84ee38feb6af0a0e3fb73b6"
|
|
88
88
|
}
|