@monkvision/network 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/LICENSE +32 -0
  2. package/README.md +225 -0
  3. package/lib/package.json +84 -0
  4. package/lib/src/api/api.d.ts +18 -0
  5. package/lib/src/api/api.js +22 -0
  6. package/lib/src/api/api.js.map +1 -0
  7. package/lib/src/api/config.d.ts +20 -0
  8. package/lib/src/api/config.js +41 -0
  9. package/lib/src/api/config.js.map +1 -0
  10. package/lib/src/api/error.d.ts +34 -0
  11. package/lib/src/api/error.js +118 -0
  12. package/lib/src/api/error.js.map +1 -0
  13. package/lib/src/api/hooks/index.d.ts +1 -0
  14. package/lib/src/api/hooks/index.js +18 -0
  15. package/lib/src/api/hooks/index.js.map +1 -0
  16. package/lib/src/api/hooks/useInspectionPoll.d.ts +34 -0
  17. package/lib/src/api/hooks/useInspectionPoll.js +21 -0
  18. package/lib/src/api/hooks/useInspectionPoll.js.map +1 -0
  19. package/lib/src/api/image/index.d.ts +1 -0
  20. package/lib/src/api/image/index.js +18 -0
  21. package/lib/src/api/image/index.js.map +1 -0
  22. package/lib/src/api/image/mappers.d.ts +3 -0
  23. package/lib/src/api/image/mappers.js +166 -0
  24. package/lib/src/api/image/mappers.js.map +1 -0
  25. package/lib/src/api/image/requests.d.ts +141 -0
  26. package/lib/src/api/image/requests.js +312 -0
  27. package/lib/src/api/image/requests.js.map +1 -0
  28. package/lib/src/api/index.d.ts +10 -0
  29. package/lib/src/api/index.js +27 -0
  30. package/lib/src/api/index.js.map +1 -0
  31. package/lib/src/api/inspection/index.d.ts +1 -0
  32. package/lib/src/api/inspection/index.js +18 -0
  33. package/lib/src/api/inspection/index.js.map +1 -0
  34. package/lib/src/api/inspection/mappers.d.ts +5 -0
  35. package/lib/src/api/inspection/mappers.js +392 -0
  36. package/lib/src/api/inspection/mappers.js.map +1 -0
  37. package/lib/src/api/inspection/requests.d.ts +47 -0
  38. package/lib/src/api/inspection/requests.js +122 -0
  39. package/lib/src/api/inspection/requests.js.map +1 -0
  40. package/lib/src/api/liveConfigs/index.d.ts +1 -0
  41. package/lib/src/api/liveConfigs/index.js +18 -0
  42. package/lib/src/api/liveConfigs/index.js.map +1 -0
  43. package/lib/src/api/liveConfigs/requests.d.ts +7 -0
  44. package/lib/src/api/liveConfigs/requests.js +66 -0
  45. package/lib/src/api/liveConfigs/requests.js.map +1 -0
  46. package/lib/src/api/models/common.d.ts +13 -0
  47. package/lib/src/api/models/common.js +3 -0
  48. package/lib/src/api/models/common.js.map +1 -0
  49. package/lib/src/api/models/compliance.d.ts +58 -0
  50. package/lib/src/api/models/compliance.js +3 -0
  51. package/lib/src/api/models/compliance.js.map +1 -0
  52. package/lib/src/api/models/damage.d.ts +11 -0
  53. package/lib/src/api/models/damage.js +3 -0
  54. package/lib/src/api/models/damage.js.map +1 -0
  55. package/lib/src/api/models/image.d.ts +76 -0
  56. package/lib/src/api/models/image.js +3 -0
  57. package/lib/src/api/models/image.js.map +1 -0
  58. package/lib/src/api/models/index.d.ts +13 -0
  59. package/lib/src/api/models/index.js +30 -0
  60. package/lib/src/api/models/index.js.map +1 -0
  61. package/lib/src/api/models/inspection.d.ts +40 -0
  62. package/lib/src/api/models/inspection.js +3 -0
  63. package/lib/src/api/models/inspection.js.map +1 -0
  64. package/lib/src/api/models/part.d.ts +10 -0
  65. package/lib/src/api/models/part.js +3 -0
  66. package/lib/src/api/models/part.js.map +1 -0
  67. package/lib/src/api/models/pricingV2.d.ts +15 -0
  68. package/lib/src/api/models/pricingV2.js +3 -0
  69. package/lib/src/api/models/pricingV2.js.map +1 -0
  70. package/lib/src/api/models/renderedOutput.d.ts +8 -0
  71. package/lib/src/api/models/renderedOutput.js +3 -0
  72. package/lib/src/api/models/renderedOutput.js.map +1 -0
  73. package/lib/src/api/models/severityResult.d.ts +37 -0
  74. package/lib/src/api/models/severityResult.js +3 -0
  75. package/lib/src/api/models/severityResult.js.map +1 -0
  76. package/lib/src/api/models/task.d.ts +76 -0
  77. package/lib/src/api/models/task.js +3 -0
  78. package/lib/src/api/models/task.js.map +1 -0
  79. package/lib/src/api/models/vehicle.d.ts +58 -0
  80. package/lib/src/api/models/vehicle.js +3 -0
  81. package/lib/src/api/models/vehicle.js.map +1 -0
  82. package/lib/src/api/models/view.d.ts +24 -0
  83. package/lib/src/api/models/view.js +3 -0
  84. package/lib/src/api/models/view.js.map +1 -0
  85. package/lib/src/api/models/wheelAnalysis.d.ts +13 -0
  86. package/lib/src/api/models/wheelAnalysis.js +3 -0
  87. package/lib/src/api/models/wheelAnalysis.js.map +1 -0
  88. package/lib/src/api/react.d.ts +69 -0
  89. package/lib/src/api/react.js +105 -0
  90. package/lib/src/api/react.js.map +1 -0
  91. package/lib/src/api/task/index.d.ts +1 -0
  92. package/lib/src/api/task/index.js +18 -0
  93. package/lib/src/api/task/index.js.map +1 -0
  94. package/lib/src/api/task/requests.d.ts +67 -0
  95. package/lib/src/api/task/requests.js +135 -0
  96. package/lib/src/api/task/requests.js.map +1 -0
  97. package/lib/src/api/types.d.ts +24 -0
  98. package/lib/src/api/types.js +3 -0
  99. package/lib/src/api/types.js.map +1 -0
  100. package/lib/src/api/utils.d.ts +9 -0
  101. package/lib/src/api/utils.js +22 -0
  102. package/lib/src/api/utils.js.map +1 -0
  103. package/lib/src/api/vehicle/index.d.ts +1 -0
  104. package/lib/src/api/vehicle/index.js +18 -0
  105. package/lib/src/api/vehicle/index.js.map +1 -0
  106. package/lib/src/api/vehicle/mappers.d.ts +3 -0
  107. package/lib/src/api/vehicle/mappers.js +33 -0
  108. package/lib/src/api/vehicle/mappers.js.map +1 -0
  109. package/lib/src/api/vehicle/requests.d.ts +31 -0
  110. package/lib/src/api/vehicle/requests.js +88 -0
  111. package/lib/src/api/vehicle/requests.js.map +1 -0
  112. package/lib/src/auth/hooks.d.ts +34 -0
  113. package/lib/src/auth/hooks.js +112 -0
  114. package/lib/src/auth/hooks.js.map +1 -0
  115. package/lib/src/auth/index.d.ts +2 -0
  116. package/lib/src/auth/index.js +19 -0
  117. package/lib/src/auth/index.js.map +1 -0
  118. package/lib/src/auth/token.d.ts +25 -0
  119. package/lib/src/auth/token.js +36 -0
  120. package/lib/src/auth/token.js.map +1 -0
  121. package/lib/src/index.d.ts +2 -0
  122. package/lib/src/index.js +19 -0
  123. package/lib/src/index.js.map +1 -0
  124. package/package.json +85 -0
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.getLiveConfig = void 0;
43
+ var ky_1 = __importDefault(require("ky"));
44
+ var config_1 = require("../config");
45
+ /**
46
+ * Fetch a webapp live configuration from the API.
47
+ *
48
+ * @param id The ID of the live config to get.
49
+ */
50
+ function getLiveConfig(id) {
51
+ return __awaiter(this, void 0, void 0, function () {
52
+ var kyOptions, response;
53
+ return __generator(this, function (_a) {
54
+ switch (_a.label) {
55
+ case 0:
56
+ kyOptions = (0, config_1.getDefaultOptions)();
57
+ return [4 /*yield*/, ky_1.default.get("https://storage.googleapis.com/monk-front-public/live-configurations/".concat(id, ".json?nocache=").concat(Date.now()), kyOptions)];
58
+ case 1:
59
+ response = _a.sent();
60
+ return [2 /*return*/, response.json()];
61
+ }
62
+ });
63
+ });
64
+ }
65
+ exports.getLiveConfig = getLiveConfig;
66
+ //# sourceMappingURL=requests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requests.js","sourceRoot":"","sources":["../../../../src/api/liveConfigs/requests.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0CAAoB;AACpB,oCAA8C;AAE9C;;;;GAIG;AACH,SAAsB,aAAa,CAAC,EAAU;;;;;;oBACtC,SAAS,GAAG,IAAA,0BAAiB,GAAE,CAAC;oBACrB,qBAAM,YAAE,CAAC,GAAG,CAC3B,+EAAwE,EAAE,2BAAiB,IAAI,CAAC,GAAG,EAAE,CAAE,EACvG,SAAS,CACV,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBACD,sBAAO,QAAQ,CAAC,IAAI,EAAc,EAAC;;;;CACpC;AAPD,sCAOC"}
@@ -0,0 +1,13 @@
1
+ export type ApiReservedPartsNames = 'ignore' | 'background' | 'bumper_back' | 'bumper_front' | 'door_back_left' | 'door_back_right' | 'door_front_left' | 'door_front_right' | 'fender_back_left' | 'fender_back_right' | 'fender_front_left' | 'fender_front_right' | 'fog_light_back_left' | 'fog_light_back_right' | 'fog_light_front_left' | 'fog_light_front_right' | 'grill' | 'grill_low' | 'grill_radiator' | 'handle_back_left' | 'handle_back_right' | 'handle_front_left' | 'handle_front_right' | 'head_light_left' | 'head_light_right' | 'header_panel' | 'hood' | 'hook' | 'hubcap' | 'hubcap_back_left' | 'hubcap_back_right' | 'hubcap_front_left' | 'hubcap_front_right' | 'indicator_light_left' | 'indicator_light_right' | 'license_plate_back' | 'license_plate_front' | 'logo' | 'mirror_support' | 'mirror_left' | 'mirror_right' | 'petrol_door' | 'pillar' | 'quarter_window_back_left' | 'quarter_window_back_right' | 'quarter_window_front_left' | 'quarter_window_front_right' | 'rear_spoiler' | 'rocker_panel' | 'rocker_panel_left' | 'rocker_panel_right' | 'roof' | 'tail_light_center' | 'tail_light_left' | 'tail_light_right' | 'trunk' | 'turn_signal_front_lateral_left' | 'turn_signal_front_lateral_right' | 'wheel_back_left' | 'wheel_back_right' | 'wheel_front_left' | 'wheel_front_right' | 'window_back_left' | 'window_back_right' | 'window_corner_left' | 'window_corner_right' | 'window_front_left' | 'window_front_right' | 'windshield_back' | 'windshield_front' | 'wiper' | 'wiper_back' | 'wiper_front' | 'wheel' | 'front_spoiler';
2
+ export type ApiCenterOnElement = 'front' | 'back' | 'left' | 'right' | 'front_left' | 'front_right' | 'back_left' | 'back_right' | 'keys' | 'dashboard' | 'undercarriage' | 'seats' | 'trunk_interior' | 'ignore' | 'background' | 'bumper_back' | 'bumper_front' | 'door_back_left' | 'door_back_right' | 'door_front_left' | 'door_front_right' | 'fender_back_left' | 'fender_back_right' | 'fender_front_left' | 'fender_front_right' | 'fog_light_back_left' | 'fog_light_back_right' | 'fog_light_front_left' | 'fog_light_front_right' | 'front_spoiler' | 'grill' | 'grill_low' | 'grill_radiator' | 'handle_back_left' | 'handle_back_right' | 'handle_front_left' | 'handle_front_right' | 'head_light_left' | 'head_light_right' | 'header_panel' | 'hood' | 'hook' | 'hubcap' | 'hubcap_back_left' | 'hubcap_back_right' | 'hubcap_front_left' | 'hubcap_front_right' | 'indicator_light_left' | 'indicator_light_right' | 'license_plate_back' | 'license_plate_front' | 'logo' | 'mirror_support' | 'mirror_left' | 'mirror_right' | 'petrol_door' | 'pillar' | 'quarter_window_back_left' | 'quarter_window_back_right' | 'quarter_window_front_left' | 'quarter_window_front_right' | 'rear_spoiler' | 'rocker_panel' | 'rocker_panel_left' | 'rocker_panel_right' | 'roof' | 'tail_light_center' | 'tail_light_left' | 'tail_light_right' | 'trunk' | 'turn_signal_front_lateral_left' | 'turn_signal_front_lateral_right' | 'wheel_back_left' | 'wheel_back_right' | 'wheel_front_left' | 'wheel_front_right' | 'window_back_left' | 'window_back_right' | 'window_corner_left' | 'window_corner_right' | 'window_front_left' | 'window_front_right' | 'windshield_back' | 'windshield_front' | 'wiper' | 'wiper_back' | 'wiper_front' | 'wheel';
3
+ export interface ApiLabelPrediction {
4
+ prediction: string;
5
+ confidence: number;
6
+ }
7
+ export type ApiAdditionalData = Record<string, unknown>;
8
+ export interface ApiIdColumn {
9
+ id: string;
10
+ }
11
+ export interface ApiError {
12
+ message: string;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/api/models/common.ts"],"names":[],"mappings":""}
@@ -0,0 +1,58 @@
1
+ import type { ApiTaskProgressStatus } from './task';
2
+ export type ApiImageComplianceStatus = 'unknown' | 'compliant' | 'non_compliant';
3
+ export interface ApiIQAComplianceDetails {
4
+ blurriness_score?: number;
5
+ overexposure_score?: number;
6
+ underexposure_score?: number;
7
+ }
8
+ export interface ApiIQAComplianceResult {
9
+ details?: ApiIQAComplianceDetails;
10
+ is_compliant?: boolean;
11
+ reasons?: string[];
12
+ status: ApiTaskProgressStatus;
13
+ }
14
+ export interface ApiComplianceResultBase {
15
+ is_compliant?: boolean;
16
+ reasons?: string[];
17
+ status: ApiTaskProgressStatus;
18
+ }
19
+ export interface ApiComplianceZoomLevelDetails {
20
+ zoom_score?: number;
21
+ }
22
+ export interface ApiZoomLevelComplianceResult {
23
+ details?: ApiComplianceZoomLevelDetails;
24
+ is_compliant?: boolean;
25
+ reasons?: string[];
26
+ status: ApiTaskProgressStatus;
27
+ }
28
+ export interface ApiVehicleAnalysis {
29
+ is_vehicle_present: boolean;
30
+ wetness?: number;
31
+ snowness?: number;
32
+ dirtiness?: number;
33
+ reflections?: number;
34
+ }
35
+ export type ApiImageOrientation = 'other' | 'landscape' | 'portrait';
36
+ export type ApiPredictedImageType = 'unknown' | 'beauty_shot' | 'close_up';
37
+ export interface ApiImageAnalysis {
38
+ binary_size: number;
39
+ image_height: number;
40
+ image_width: number;
41
+ orientation: ApiImageOrientation;
42
+ predicted_image_type: ApiPredictedImageType;
43
+ zoom?: number;
44
+ blurriness?: number;
45
+ overexposure?: number;
46
+ underexposure?: number;
47
+ lens_flare?: number;
48
+ }
49
+ export interface ApiImageComplianceResults {
50
+ compliance_status?: ApiImageComplianceStatus;
51
+ coverage_360?: ApiComplianceResultBase;
52
+ image_quality_assessment?: ApiIQAComplianceResult;
53
+ zoom_level?: ApiZoomLevelComplianceResult;
54
+ vehicle_analysis?: ApiVehicleAnalysis;
55
+ image_analysis?: ApiImageAnalysis;
56
+ compliance_issues?: string[];
57
+ should_retake?: boolean;
58
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=compliance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compliance.js","sourceRoot":"","sources":["../../../../src/api/models/compliance.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { ApiRelatedImages } from './image';
2
+ import type { ApiPartIds } from './part';
3
+ export interface ApiDamage {
4
+ damage_size_cm?: number;
5
+ damage_type: string;
6
+ id: string;
7
+ part_ids: ApiPartIds;
8
+ related_images?: ApiRelatedImages;
9
+ }
10
+ export type ApiDamages = ApiDamage[];
11
+ export type ApiDamageIds = string[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=damage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"damage.js","sourceRoot":"","sources":["../../../../src/api/models/damage.ts"],"names":[],"mappings":""}
@@ -0,0 +1,76 @@
1
+ import { TranslationObject } from '@monkvision/types';
2
+ import type { ApiAdditionalData, ApiCenterOnElement, ApiLabelPrediction } from './common';
3
+ import type { ApiRenderedOutputs } from './renderedOutput';
4
+ import type { ApiImageComplianceResults } from './compliance';
5
+ import type { ApiViews } from './view';
6
+ import { ApiBusinessTaskName, ApiHinlTaskPost, ApiImageCompliancesTaskPost } from './task';
7
+ export type ApiImageType = 'unknown' | 'beauty_shot' | 'close_up';
8
+ export type ApiImageSubType = 'close_up_part' | 'close_up_damage';
9
+ export interface ApiRelatedImage {
10
+ base_image_id: string;
11
+ base_image_type: ApiImageType;
12
+ order?: number;
13
+ path: string;
14
+ }
15
+ export type ApiRelatedImages = ApiRelatedImage[];
16
+ export interface ApiViewpointComponent {
17
+ centers_on: ApiCenterOnElement[];
18
+ distance?: string;
19
+ is_exterior?: boolean;
20
+ }
21
+ export interface ApiImageAdditionalData extends ApiAdditionalData {
22
+ created_at?: string;
23
+ sight_id?: string;
24
+ label?: TranslationObject;
25
+ }
26
+ export interface ApiImage {
27
+ additional_data?: ApiImageAdditionalData;
28
+ binary_size: number;
29
+ compliances?: ApiImageComplianceResults;
30
+ detailed_viewpoint?: ApiViewpointComponent;
31
+ has_vehicle?: boolean;
32
+ id: string;
33
+ image_height: number;
34
+ image_subtype?: ApiImageSubType;
35
+ image_type: ApiImageType;
36
+ image_sibling_key?: string;
37
+ image_width: number;
38
+ mimetype: string;
39
+ name?: string;
40
+ path: string;
41
+ viewpoint?: ApiLabelPrediction;
42
+ }
43
+ export interface ApiImageWithViews extends ApiImage {
44
+ rendered_outputs?: ApiRenderedOutputs;
45
+ views?: ApiViews;
46
+ }
47
+ export type ApiImages = ApiImageWithViews[];
48
+ export interface ApiAcquisitionUrl {
49
+ strategy: 'download_from_url';
50
+ url: string;
51
+ }
52
+ export interface ApiAcquisitionForm {
53
+ strategy: 'upload_multipart_form_keys';
54
+ file_key: string;
55
+ }
56
+ export type ApiAcquisition = ApiAcquisitionUrl | ApiAcquisitionForm;
57
+ export type ApiComplianceParameters = Record<string, never>;
58
+ export interface ApiCoverage360Parameters {
59
+ sight_id: string;
60
+ }
61
+ export interface ApiCompliance {
62
+ image_quality_assessment?: ApiComplianceParameters;
63
+ coverage_360?: ApiCoverage360Parameters;
64
+ zoom_level?: ApiComplianceParameters;
65
+ }
66
+ export type ApiImagePostTask = ApiBusinessTaskName | ApiImageCompliancesTaskPost | ApiHinlTaskPost;
67
+ export interface ApiImagePost {
68
+ acquisition: ApiAcquisition;
69
+ tasks?: ApiImagePostTask[];
70
+ name?: string;
71
+ image_type?: ApiImageType;
72
+ image_subtype?: ApiImageSubType;
73
+ image_sibling_key?: string;
74
+ compliances?: ApiCompliance;
75
+ additional_data?: ApiImageAdditionalData;
76
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.js","sourceRoot":"","sources":["../../../../src/api/models/image.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export * from './common';
2
+ export * from './compliance';
3
+ export * from './damage';
4
+ export * from './image';
5
+ export * from './inspection';
6
+ export * from './part';
7
+ export * from './pricingV2';
8
+ export * from './renderedOutput';
9
+ export * from './severityResult';
10
+ export * from './task';
11
+ export * from './vehicle';
12
+ export * from './view';
13
+ export * from './wheelAnalysis';
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./common"), exports);
18
+ __exportStar(require("./compliance"), exports);
19
+ __exportStar(require("./damage"), exports);
20
+ __exportStar(require("./image"), exports);
21
+ __exportStar(require("./inspection"), exports);
22
+ __exportStar(require("./part"), exports);
23
+ __exportStar(require("./pricingV2"), exports);
24
+ __exportStar(require("./renderedOutput"), exports);
25
+ __exportStar(require("./severityResult"), exports);
26
+ __exportStar(require("./task"), exports);
27
+ __exportStar(require("./vehicle"), exports);
28
+ __exportStar(require("./view"), exports);
29
+ __exportStar(require("./wheelAnalysis"), exports);
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,0CAAwB;AACxB,+CAA6B;AAC7B,yCAAuB;AACvB,8CAA4B;AAC5B,mDAAiC;AACjC,mDAAiC;AACjC,yCAAuB;AACvB,4CAA0B;AAC1B,yCAAuB;AACvB,kDAAgC"}
@@ -0,0 +1,40 @@
1
+ import type { ApiAdditionalData } from './common';
2
+ import type { ApiDamages } from './damage';
3
+ import type { ApiImagePost, ApiImages } from './image';
4
+ import type { ApiParts } from './part';
5
+ import type { ApiPricingV2 } from './pricingV2';
6
+ import type { ApiSeverityResults } from './severityResult';
7
+ import type { ApiTasks } from './task';
8
+ import type { ApiVehicleComponent } from './vehicle';
9
+ import type { ApiWheelAnalysis } from './wheelAnalysis';
10
+ import { ApiVehiclePostPatch } from './vehicle';
11
+ import { ApiTasksComponent } from './task';
12
+ export interface ApiInspectioAdditionalData extends ApiAdditionalData {
13
+ is_video_capture?: boolean;
14
+ use_3d_projection?: boolean;
15
+ }
16
+ export interface ApiInspectionGet {
17
+ additional_data?: ApiInspectioAdditionalData;
18
+ damages: ApiDamages;
19
+ id: string;
20
+ images: ApiImages;
21
+ parts: ApiParts;
22
+ pdf_generation_ready?: boolean;
23
+ pricing?: ApiPricingV2;
24
+ severity_results?: ApiSeverityResults;
25
+ tasks: ApiTasks;
26
+ vehicle?: ApiVehicleComponent;
27
+ wheel_analysis?: ApiWheelAnalysis;
28
+ }
29
+ export type ApiBusinessClients = 'default' | 'toyota' | 'veb';
30
+ export interface ApiDamageSeverity {
31
+ output_format: ApiBusinessClients;
32
+ }
33
+ export interface ApiInspectionPost {
34
+ additional_data?: ApiInspectioAdditionalData;
35
+ tasks: ApiTasksComponent;
36
+ images?: ApiImagePost[];
37
+ vehicle?: ApiVehiclePostPatch;
38
+ damage_severity?: ApiDamageSeverity;
39
+ pricing?: ApiDamageSeverity;
40
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=inspection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspection.js","sourceRoot":"","sources":["../../../../src/api/models/inspection.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import type { ApiDamageIds } from './damage';
2
+ import type { ApiRelatedImages } from './image';
3
+ export interface ApiPart {
4
+ damage_ids: ApiDamageIds;
5
+ id: string;
6
+ part_type: string;
7
+ related_images?: ApiRelatedImages;
8
+ }
9
+ export type ApiParts = ApiPart[];
10
+ export type ApiPartIds = string[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=part.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"part.js","sourceRoot":"","sources":["../../../../src/api/models/part.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export type ApiRelatedItemType = 'part' | 'vehicle';
2
+ export type ApiRepairOperationsTypes = 'polishing' | 'sanding' | 'painting' | 'replacing' | 'paintless_dent_repair' | 'dent_repair' | 'refinishing' | 'removing' | 'painting_hard' | 'paint_preparation';
3
+ export type ApiHours = Record<string, number>;
4
+ export interface ApiPricingV2Details {
5
+ hours?: ApiHours;
6
+ operations?: ApiRepairOperationsTypes[];
7
+ pricing?: number;
8
+ related_item_id?: string;
9
+ related_item_type: ApiRelatedItemType;
10
+ }
11
+ export type ApiDetails = Record<string, ApiPricingV2Details>;
12
+ export interface ApiPricingV2 {
13
+ details: ApiDetails;
14
+ total_price?: number;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=pricingV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricingV2.js","sourceRoot":"","sources":["../../../../src/api/models/pricingV2.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import type { ApiAdditionalData } from './common';
2
+ export interface ApiRenderedOutput {
3
+ additional_data?: ApiAdditionalData;
4
+ base_image_id: string;
5
+ id: string;
6
+ path: string;
7
+ }
8
+ export type ApiRenderedOutputs = ApiRenderedOutput[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=renderedOutput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderedOutput.js","sourceRoot":"","sources":["../../../../src/api/models/renderedOutput.ts"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ import type { ApiReservedPartsNames } from './common';
2
+ export type ApiLabel = ApiReservedPartsNames;
3
+ export type ApiLevel = 1 | 2 | 3;
4
+ export interface ApiCommentSeverityValue {
5
+ comment: string;
6
+ level?: ApiLevel;
7
+ pricing?: number;
8
+ }
9
+ export interface ApiRepairOperationV1 {
10
+ ADDITIONAL?: boolean;
11
+ PAINT?: number;
12
+ REPLACE?: boolean;
13
+ T1?: number;
14
+ T2?: number;
15
+ }
16
+ export interface ApiPartSeverityValue {
17
+ level: ApiLevel;
18
+ pricing?: number;
19
+ repair_operation?: ApiRepairOperationV1;
20
+ }
21
+ export interface ApiPricingSeverityOnly {
22
+ pricing: number;
23
+ }
24
+ export type ApiCustomSeverity = ApiCommentSeverityValue | ApiPartSeverityValue | ApiPricingSeverityOnly;
25
+ export interface ApiSeverityResultValue {
26
+ custom_severity: ApiCustomSeverity;
27
+ }
28
+ export type ApiSeverityResultTargetType = 'part' | 'damage' | 'comment';
29
+ export interface ApiSeverityResult {
30
+ id: string;
31
+ is_user_modified: boolean;
32
+ label: ApiLabel;
33
+ related_item_id?: string;
34
+ related_item_type?: ApiSeverityResultTargetType;
35
+ value: ApiSeverityResultValue;
36
+ }
37
+ export type ApiSeverityResults = ApiSeverityResult[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=severityResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"severityResult.js","sourceRoot":"","sources":["../../../../src/api/models/severityResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1,76 @@
1
+ export interface ApiImageInTask {
2
+ image_id: string;
3
+ }
4
+ export type ApiBusinessTaskName = 'damage_detection' | 'wheel_analysis' | 'repair_estimate' | 'images_ocr' | 'image_editing' | 'inspection_pdf' | 'pricing' | 'dashboard_ocr' | 'zoom_level' | 'coverage_360' | 'iqa_compliance' | 'compliances';
5
+ export interface ApiImageCompliancesDetails {
6
+ sight_id: string;
7
+ }
8
+ export interface ApiImageCompliancesTaskPost {
9
+ name: 'compliances';
10
+ image_details?: ApiImageCompliancesDetails;
11
+ wait_for_result?: boolean;
12
+ }
13
+ export interface ApiHinlImageDetails {
14
+ sight_label: string;
15
+ }
16
+ export interface ApiHinlTaskPost {
17
+ name: 'human_in_the_loop';
18
+ image_details: ApiHinlImageDetails;
19
+ }
20
+ export type ApiTaskProgressStatus = 'NOT_STARTED' | 'TODO' | 'IN_PROGRESS' | 'DONE' | 'ERROR' | 'ABORTED' | 'VALIDATED';
21
+ export interface ApiTaskGet {
22
+ id: string;
23
+ images: ApiImageInTask[];
24
+ name: ApiBusinessTaskName;
25
+ status: ApiTaskProgressStatus;
26
+ }
27
+ export type ApiTasks = ApiTaskGet[];
28
+ export type ApiCallbackEventEnum = 'STATUS_SET_TO_DONE' | 'STATUS_SET_TO_ERROR';
29
+ export type ApiCallbackEvent = ApiCallbackEventEnum | ApiCallbackEventEnum[];
30
+ export interface ApiCallback {
31
+ url: string;
32
+ headers: Record<string, unknown>;
33
+ callback_event?: ApiCallbackEvent;
34
+ params?: Record<string, unknown>;
35
+ }
36
+ export type ApiCallbacks = ApiCallback[];
37
+ export type ApiTaskPostProgressStatus = 'NOT_STARTED' | 'TODO' | 'DONE' | 'VALIDATED';
38
+ export interface ApiGenerateSubImages {
39
+ margin?: number;
40
+ damage_view_part_interpolation?: number;
41
+ ratio?: number;
42
+ quality?: number;
43
+ generate_tight?: boolean;
44
+ }
45
+ export interface GenerateVisualOutput {
46
+ generate_parts?: boolean;
47
+ generate_damages?: boolean;
48
+ }
49
+ export interface ApiDamageDetectionTaskPostComponent {
50
+ status?: ApiTaskPostProgressStatus;
51
+ callbacks?: ApiCallbacks;
52
+ damage_score_threshold?: number;
53
+ generate_subimages_parts?: ApiGenerateSubImages;
54
+ generate_subimages_damages?: ApiGenerateSubImages;
55
+ generate_visual_output?: GenerateVisualOutput;
56
+ scoring?: Record<string, unknown>;
57
+ }
58
+ export interface ApiWheelAnalysisTaskPostComponent {
59
+ status?: ApiTaskPostProgressStatus;
60
+ callbacks?: ApiCallbacks;
61
+ use_longshots?: boolean;
62
+ }
63
+ export interface ApiImagesOCRTaskPostComponent {
64
+ status?: ApiTaskPostProgressStatus;
65
+ callbacks?: ApiCallbacks;
66
+ }
67
+ export interface ApiHinlTaskPostComponent {
68
+ status?: ApiTaskPostProgressStatus;
69
+ callbacks?: ApiCallbacks;
70
+ }
71
+ export interface ApiTasksComponent {
72
+ damage_detection?: ApiDamageDetectionTaskPostComponent;
73
+ wheel_analysis?: ApiWheelAnalysisTaskPostComponent;
74
+ images_ocr?: ApiImagesOCRTaskPostComponent;
75
+ human_in_the_loop?: ApiHinlTaskPostComponent;
76
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.js","sourceRoot":"","sources":["../../../../src/api/models/task.ts"],"names":[],"mappings":""}
@@ -0,0 +1,58 @@
1
+ import type { ApiAdditionalData } from './common';
2
+ export type ApiOwnerInfo = Record<string, unknown>;
3
+ export type ApiMileageUnit = 'km' | 'miles';
4
+ export type ApiMarketValueUnit = 'USD' | 'EUR';
5
+ export interface ApiVehicleComponent {
6
+ additional_data?: ApiAdditionalData;
7
+ brand?: string;
8
+ car_registration?: boolean;
9
+ color?: string;
10
+ date_of_circulation?: string;
11
+ deleted_at?: string;
12
+ duplicate_keys?: boolean;
13
+ expertise_requested?: boolean;
14
+ exterior_cleanliness?: string;
15
+ id: string;
16
+ interior_cleanliness?: string;
17
+ market_value_unit?: ApiMarketValueUnit;
18
+ market_value_value?: number;
19
+ mileage_unit?: ApiMileageUnit;
20
+ mileage_value?: number;
21
+ model?: string;
22
+ owner_info?: ApiOwnerInfo;
23
+ plate?: string;
24
+ trade_in_offer?: number;
25
+ vehicle_quotation?: number;
26
+ vehicle_type?: string;
27
+ vin?: string;
28
+ }
29
+ export interface ApiMileage {
30
+ value: number;
31
+ unit: ApiMileageUnit;
32
+ }
33
+ export interface ApiMarketValue {
34
+ value: number;
35
+ unit: ApiMarketValueUnit;
36
+ }
37
+ export interface ApiVehiclePostPatch {
38
+ brand?: string;
39
+ model?: string;
40
+ plate?: string;
41
+ vehicle_type?: string;
42
+ mileage?: ApiMileage;
43
+ market_value?: ApiMarketValue;
44
+ serie?: string;
45
+ vehicle_style?: string;
46
+ vehicle_age?: string;
47
+ vin?: string;
48
+ color?: string;
49
+ exterior_cleanliness?: string;
50
+ interior_cleanliness?: string;
51
+ date_of_circulation?: string;
52
+ owner_info?: ApiOwnerInfo;
53
+ duplicate_keys?: boolean;
54
+ expertise_requested?: boolean;
55
+ car_registration?: boolean;
56
+ vehicle_quotation?: number;
57
+ trade_in_offer?: number;
58
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=vehicle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vehicle.js","sourceRoot":"","sources":["../../../../src/api/models/vehicle.ts"],"names":[],"mappings":""}