autoinspector 1.1.1 → 2.0.0-beta.1

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 (79) hide show
  1. package/.env +6 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +4 -0
  4. package/dist/package.json +57 -0
  5. package/dist/resources/Autoinspector.d.ts +22 -0
  6. package/dist/resources/Autoinspector.js +43 -0
  7. package/dist/resources/Car.d.ts +10 -0
  8. package/dist/resources/Car.js +41 -0
  9. package/dist/resources/Custom.d.ts +8 -0
  10. package/dist/resources/Custom.js +30 -0
  11. package/dist/resources/Goods.d.ts +24 -0
  12. package/dist/resources/Goods.js +43 -0
  13. package/dist/resources/HTTPClient.d.ts +32 -0
  14. package/dist/resources/HTTPClient.js +87 -0
  15. package/dist/resources/Helper.d.ts +18 -0
  16. package/dist/resources/Helper.js +84 -0
  17. package/dist/resources/Image.d.ts +21 -0
  18. package/dist/resources/Image.js +56 -0
  19. package/dist/resources/Inspections.d.ts +41 -0
  20. package/dist/resources/Inspections.js +69 -0
  21. package/dist/resources/Machinery.d.ts +28 -0
  22. package/dist/resources/Machinery.js +43 -0
  23. package/dist/resources/Memberships.d.ts +14 -0
  24. package/dist/resources/Memberships.js +24 -0
  25. package/dist/resources/Moto.d.ts +10 -0
  26. package/dist/resources/Moto.js +41 -0
  27. package/dist/resources/OAuth.d.ts +37 -0
  28. package/dist/resources/OAuth.js +52 -0
  29. package/dist/resources/People.d.ts +22 -0
  30. package/dist/resources/People.js +32 -0
  31. package/dist/resources/Products.d.ts +16 -0
  32. package/dist/resources/Products.js +20 -0
  33. package/dist/resources/Template.d.ts +8 -0
  34. package/dist/resources/Template.js +35 -0
  35. package/dist/resources/User.d.ts +35 -0
  36. package/dist/resources/User.js +47 -0
  37. package/dist/types/api.d.ts +12 -0
  38. package/dist/types/api.js +2 -0
  39. package/dist/types/authenticatedUser.d.ts +65 -0
  40. package/dist/types/authenticatedUser.js +2 -0
  41. package/dist/types/autoinspector.d.ts +15 -0
  42. package/dist/types/autoinspector.js +2 -0
  43. package/dist/types/car.d.ts +42 -0
  44. package/dist/types/car.js +2 -0
  45. package/dist/types/colors.d.ts +1 -0
  46. package/dist/types/colors.js +2 -0
  47. package/dist/types/configuration.d.ts +27 -0
  48. package/dist/types/configuration.js +2 -0
  49. package/dist/types/consumer.d.ts +14 -0
  50. package/dist/types/consumer.js +2 -0
  51. package/dist/types/goods.d.ts +51 -0
  52. package/dist/types/goods.js +2 -0
  53. package/dist/types/helper.d.ts +5 -0
  54. package/dist/types/helper.js +2 -0
  55. package/dist/types/http.d.ts +22 -0
  56. package/dist/types/http.js +2 -0
  57. package/dist/types/image.d.ts +15 -0
  58. package/dist/types/image.js +2 -0
  59. package/dist/types/inspection.d.ts +122 -0
  60. package/dist/types/inspection.js +2 -0
  61. package/dist/types/machinery.d.ts +64 -0
  62. package/dist/types/machinery.js +2 -0
  63. package/dist/types/moto.d.ts +10 -0
  64. package/dist/types/moto.js +2 -0
  65. package/dist/types/oauth20.d.ts +19 -0
  66. package/dist/types/oauth20.js +2 -0
  67. package/dist/types/pagination.d.ts +21 -0
  68. package/dist/types/pagination.js +2 -0
  69. package/dist/types/people.d.ts +45 -0
  70. package/dist/types/people.js +2 -0
  71. package/dist/types/producer.d.ts +4 -0
  72. package/dist/types/producer.js +2 -0
  73. package/dist/types/productMethods.d.ts +4 -0
  74. package/dist/types/productMethods.js +2 -0
  75. package/dist/types/template.d.ts +58 -0
  76. package/dist/types/template.js +2 -0
  77. package/dist/types/vehicle.d.ts +116 -0
  78. package/dist/types/vehicle.js +2 -0
  79. package/package.json +4 -5
@@ -0,0 +1,116 @@
1
+ import { Colors } from './colors';
2
+ import { IConfiguration, IConfigurationCommonValidations } from './configuration';
3
+ import { ICreateInspectionProducer, IInspectionCommonParams, IInspectionUpdateCommonParams } from './inspection';
4
+ export declare type VehicleUse = 'OFICIAL' | 'PRIVADO' | 'PARTICULAR' | 'TAXI' | 'REMIS' | 'AMBULANCIA' | 'ESCUELA DE CONDUCIR' | 'TRANSPORTE ESCOLAR O DE MENORES' | 'TRANSPORTE DE PASAJEROS INTERJURISDICCIONAL' | 'TRANSPORTE DE PASAJEROS INTRAJURISDICCIONAL' | 'TRANSPORTE DE CARGA INTERJURISDICCIONAL' | 'TRANSPORTE DE CARGA INTRAJURISDICCIONAL' | 'TRANSPORTE DE CARGA DE SUSTANCIAS PELIGROSAS' | 'SERVICIO DE ALQUILER SIN CONDUCTOR';
5
+ export declare type VehicleType = 'car' | 'moto';
6
+ /**
7
+ * Represents the vehicle configuration template for run the validations.
8
+ */
9
+ export interface IVehicleConfiguration extends IConfigurationCommonValidations {
10
+ /**
11
+ * Object: Validation that verifies if the object in the image is the same as declared.
12
+ */
13
+ object: IConfiguration;
14
+ /**
15
+ * Color: Validation that verifies the color of the object is the same as declared.
16
+ */
17
+ color: IConfiguration;
18
+ /**
19
+ * Angle: Validation that verifies the color of the object is the same as declared.
20
+ */
21
+ angle: IConfiguration;
22
+ /**
23
+ * Make: Validation that verifies the make of the product is the same as declared.
24
+ */
25
+ make: IConfiguration;
26
+ /**
27
+ * Model: Validation that verifies the color of the object is the same as declared.
28
+ */
29
+ model: IConfiguration;
30
+ /**
31
+ * Use: Validation that verifies the use of the vehicle is the same that appears in the ID of the vehicle.
32
+ */
33
+ use: IConfiguration;
34
+ /**
35
+ * Damage: Validation that verifies the object does not have any damage.
36
+ */
37
+ damage: IConfiguration;
38
+ /**
39
+ * Damage: Validation that verifies the object appears completly in the photo taken.
40
+ */
41
+ complete: IConfiguration;
42
+ /**
43
+ * Damage: Validation that verifies VIN (vehicle identification number) is the same as declared.
44
+ */
45
+ vin: IConfiguration;
46
+ /**
47
+ * Plate: Validation that verifies the plate of the vehicle is the same as declared.
48
+ */
49
+ plate: IConfiguration;
50
+ /**
51
+ * SpareTire: Validation that verifies there is a spareTire in the photo taken.
52
+ *
53
+ * * IMPORTANT: This validation will only run if the vehicle type is car.
54
+ */
55
+ spareTire: IConfiguration;
56
+ /**
57
+ * gnc: Validation that verifies there is a gnc in the photo taken.
58
+ *
59
+ * * IMPORTANT: This validation will only run if the vehicle type is car.
60
+ */
61
+ gnc: IConfiguration;
62
+ }
63
+ /**
64
+ * Vehicle: Represents the vehicle to be attached to the inspection.
65
+ */
66
+ export interface IVehicle {
67
+ /**
68
+ * Configuration: The validation configuration template for the inspection.
69
+ */
70
+ configuration?: Partial<IVehicleConfiguration>;
71
+ /**
72
+ * Type: The type of vehicle.
73
+ */
74
+ type: VehicleType;
75
+ /**
76
+ * Color: The color of the vehicle.
77
+ */
78
+ color?: Colors;
79
+ /**
80
+ * Plate: The plate of the vehicle.
81
+ */
82
+ plate?: string;
83
+ /**
84
+ * Milage: The milage of the vehicle.
85
+ */
86
+ milage?: number;
87
+ /**
88
+ * Use: The use of the vehicle.
89
+ */
90
+ use?: string;
91
+ /**
92
+ * Year: The year of the vehicle.
93
+ */
94
+ year?: string;
95
+ /**
96
+ * make: The make/brand of the vehicle.
97
+ */
98
+ make?: string;
99
+ /**
100
+ * Model: The model of the vehicle.
101
+ */
102
+ model?: string;
103
+ /**
104
+ * Chassis: The chassis of the vehicle.
105
+ */
106
+ chassis?: string;
107
+ }
108
+ /**
109
+ * Represents the object to be sended when create an inspection of type vehicle.
110
+ */
111
+ export interface ICreateVehicleInspection extends IInspectionCommonParams<ICreateInspectionProducer> {
112
+ vehicle: IVehicle;
113
+ }
114
+ export interface IUpdateVehicleInspection extends Partial<IInspectionUpdateCommonParams> {
115
+ vehicle?: IVehicle;
116
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "autoinspector",
3
- "version": "1.1.1",
3
+ "version": "2.0.0-beta.1",
4
4
  "description": "Autoinspector API wrapper",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
- "test": "jest --config ./jest.config.js",
8
+ "test": "./node_modules/.bin/jest --config ./jest.config.js",
9
+ "test:watch": "jest --watch --runInBand --detectOpenHandles",
9
10
  "build": "tsc",
10
11
  "semantic-release": "semantic-release",
11
12
  "commit": "git-cz"
@@ -37,6 +38,7 @@
37
38
  "@typescript-eslint/eslint-plugin": "^5.10.0",
38
39
  "@typescript-eslint/parser": "^5.10.0",
39
40
  "cz-conventional-changelog": "^3.3.0",
41
+ "dotenv": "^16.0.0",
40
42
  "eslint": "^8.7.0",
41
43
  "eslint-config-airbnb-base": "^15.0.0",
42
44
  "eslint-config-prettier": "^8.3.0",
@@ -51,8 +53,5 @@
51
53
  "commitizen": {
52
54
  "path": "./node_modules/cz-conventional-changelog"
53
55
  }
54
- },
55
- "publishConfig": {
56
- "registry": "https://registry.npmjs.org/"
57
56
  }
58
57
  }