@parkflow/shared-types 1.0.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.
- package/.prettierrc +8 -0
- package/.vscode/settings.json +5 -0
- package/dist/decorators/index.d.ts +1 -0
- package/dist/decorators/index.js +14 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/decorators/is-base64-or-na/index.d.ts +1 -0
- package/dist/decorators/is-base64-or-na/index.js +14 -0
- package/dist/decorators/is-base64-or-na/index.js.map +1 -0
- package/dist/decorators/is-base64-or-na/is-base64-or-na-validation.decorator.d.ts +5 -0
- package/dist/decorators/is-base64-or-na/is-base64-or-na-validation.decorator.js +23 -0
- package/dist/decorators/is-base64-or-na/is-base64-or-na-validation.decorator.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/adaptive/einar/event.dto.d.ts +72 -0
- package/dist/types/adaptive/einar/event.dto.js +22 -0
- package/dist/types/adaptive/einar/event.dto.js.map +1 -0
- package/dist/types/adaptive/einar/index.d.ts +2 -0
- package/dist/types/adaptive/einar/index.js +15 -0
- package/dist/types/adaptive/einar/index.js.map +1 -0
- package/dist/types/adaptive/einar/job.dto.d.ts +8 -0
- package/dist/types/adaptive/einar/job.dto.js +8 -0
- package/dist/types/adaptive/einar/job.dto.js.map +1 -0
- package/dist/types/adaptive/index.d.ts +4 -0
- package/dist/types/adaptive/index.js +17 -0
- package/dist/types/adaptive/index.js.map +1 -0
- package/dist/types/adaptive/micro/index.d.ts +1 -0
- package/dist/types/adaptive/micro/index.js +14 -0
- package/dist/types/adaptive/micro/index.js.map +1 -0
- package/dist/types/adaptive/micro/micro-job.dto.d.ts +4 -0
- package/dist/types/adaptive/micro/micro-job.dto.js +8 -0
- package/dist/types/adaptive/micro/micro-job.dto.js.map +1 -0
- package/dist/types/adaptive/vidar/event.dto.d.ts +9 -0
- package/dist/types/adaptive/vidar/event.dto.js +42 -0
- package/dist/types/adaptive/vidar/event.dto.js.map +1 -0
- package/dist/types/adaptive/vidar/index.d.ts +3 -0
- package/dist/types/adaptive/vidar/index.js +16 -0
- package/dist/types/adaptive/vidar/index.js.map +1 -0
- package/dist/types/adaptive/vidar/job.dto.d.ts +8 -0
- package/dist/types/adaptive/vidar/job.dto.js +8 -0
- package/dist/types/adaptive/vidar/job.dto.js.map +1 -0
- package/dist/types/adaptive/vidar/vidar-direction.enum.d.ts +5 -0
- package/dist/types/adaptive/vidar/vidar-direction.enum.js +3 -0
- package/dist/types/adaptive/vidar/vidar-direction.enum.js.map +1 -0
- package/dist/types/adaptive/vidar-new/index.d.ts +4 -0
- package/dist/types/adaptive/vidar-new/index.js +17 -0
- package/dist/types/adaptive/vidar-new/index.js.map +1 -0
- package/dist/types/adaptive/vidar-new/vidar-new-job-base.dto.d.ts +15 -0
- package/dist/types/adaptive/vidar-new/vidar-new-job-base.dto.js +7 -0
- package/dist/types/adaptive/vidar-new/vidar-new-job-base.dto.js.map +1 -0
- package/dist/types/adaptive/vidar-new/vidar-new-job.dto.d.ts +4 -0
- package/dist/types/adaptive/vidar-new/vidar-new-job.dto.js +8 -0
- package/dist/types/adaptive/vidar-new/vidar-new-job.dto.js.map +1 -0
- package/dist/types/adaptive/vidar-new/vidar-new-job.type.d.ts +3 -0
- package/dist/types/adaptive/vidar-new/vidar-new-job.type.js +3 -0
- package/dist/types/adaptive/vidar-new/vidar-new-job.type.js.map +1 -0
- package/dist/types/adaptive/vidar-new/vidar-new.event.dto.d.ts +13 -0
- package/dist/types/adaptive/vidar-new/vidar-new.event.dto.js +59 -0
- package/dist/types/adaptive/vidar-new/vidar-new.event.dto.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +17 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/lpr/camera-type.d.ts +1 -0
- package/dist/types/lpr/camera-type.js +3 -0
- package/dist/types/lpr/camera-type.js.map +1 -0
- package/dist/types/lpr/index.d.ts +4 -0
- package/dist/types/lpr/index.js +17 -0
- package/dist/types/lpr/index.js.map +1 -0
- package/dist/types/lpr/lpr-direction.enum.d.ts +5 -0
- package/dist/types/lpr/lpr-direction.enum.js +10 -0
- package/dist/types/lpr/lpr-direction.enum.js.map +1 -0
- package/dist/types/lpr/lpr-job.interface.d.ts +22 -0
- package/dist/types/lpr/lpr-job.interface.js +3 -0
- package/dist/types/lpr/lpr-job.interface.js.map +1 -0
- package/dist/types/lpr/lpr-job.type.d.ts +3 -0
- package/dist/types/lpr/lpr-job.type.js +3 -0
- package/dist/types/lpr/lpr-job.type.js.map +1 -0
- package/dist/types/platesmart/event.dto.d.ts +50 -0
- package/dist/types/platesmart/event.dto.js +31 -0
- package/dist/types/platesmart/event.dto.js.map +1 -0
- package/dist/types/platesmart/index.d.ts +2 -0
- package/dist/types/platesmart/index.js +15 -0
- package/dist/types/platesmart/index.js.map +1 -0
- package/dist/types/platesmart/job.d.ts +10 -0
- package/dist/types/platesmart/job.js +10 -0
- package/dist/types/platesmart/job.js.map +1 -0
- package/dist/types/platesmart/orientation.enum.d.ts +0 -0
- package/dist/types/platesmart/orientation.enum.js +1 -0
- package/dist/types/platesmart/orientation.enum.js.map +1 -0
- package/dist/types/rekor/event.dto.d.ts +97 -0
- package/dist/types/rekor/event.dto.js +3 -0
- package/dist/types/rekor/event.dto.js.map +1 -0
- package/dist/types/rekor/index.d.ts +2 -0
- package/dist/types/rekor/index.js +15 -0
- package/dist/types/rekor/index.js.map +1 -0
- package/dist/types/rekor/job.d.ts +13 -0
- package/dist/types/rekor/job.js +7 -0
- package/dist/types/rekor/job.js.map +1 -0
- package/jest.config.js +8 -0
- package/package.json +36 -0
- package/src/decorators/index.ts +1 -0
- package/src/decorators/is-base64-or-na/index.ts +1 -0
- package/src/decorators/is-base64-or-na/is-base64-or-na-validation.decorator.ts +12 -0
- package/src/decorators/is-base64-or-na/is-base64-or-na.validation.decorator.spec.ts +60 -0
- package/src/index.ts +1 -0
- package/src/types/adaptive/einar/event.dto.ts +77 -0
- package/src/types/adaptive/einar/index.ts +2 -0
- package/src/types/adaptive/einar/job.dto.ts +9 -0
- package/src/types/adaptive/index.ts +4 -0
- package/src/types/adaptive/micro/README.md +32 -0
- package/src/types/adaptive/micro/index.ts +1 -0
- package/src/types/adaptive/micro/micro-job.dto.ts +5 -0
- package/src/types/adaptive/vidar/event.dto.ts +23 -0
- package/src/types/adaptive/vidar/filenames.tmpl +1 -0
- package/src/types/adaptive/vidar/index.ts +3 -0
- package/src/types/adaptive/vidar/job.dto.ts +9 -0
- package/src/types/adaptive/vidar/vidar-direction.enum.ts +5 -0
- package/src/types/adaptive/vidar/vidar.json.tmpl +8 -0
- package/src/types/adaptive/vidar-new/README.md +23 -0
- package/src/types/adaptive/vidar-new/index.ts +4 -0
- package/src/types/adaptive/vidar-new/vidar-new-job-base.dto.ts +19 -0
- package/src/types/adaptive/vidar-new/vidar-new-job.dto.ts +5 -0
- package/src/types/adaptive/vidar-new/vidar-new-job.type.ts +4 -0
- package/src/types/adaptive/vidar-new/vidar-new.event.dto.ts +40 -0
- package/src/types/adaptive/vidar-new/vidar-new.json.tmpl +12 -0
- package/src/types/index.ts +4 -0
- package/src/types/lpr/camera-type.ts +1 -0
- package/src/types/lpr/index.ts +4 -0
- package/src/types/lpr/lpr-direction.enum.ts +5 -0
- package/src/types/lpr/lpr-job.interface.ts +29 -0
- package/src/types/lpr/lpr-job.type.ts +4 -0
- package/src/types/platesmart/event.dto.ts +58 -0
- package/src/types/platesmart/index.ts +3 -0
- package/src/types/platesmart/job.ts +11 -0
- package/src/types/platesmart/orientation.enum.ts +5 -0
- package/src/types/rekor/event.dto.ts +108 -0
- package/src/types/rekor/index.ts +2 -0
- package/src/types/rekor/job.ts +13 -0
- package/tsconfig.build.json +8 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vidar-new-job-base.dto.js","sourceRoot":"","sources":["../../../../src/types/adaptive/vidar-new/vidar-new-job-base.dto.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAe;CAgB3B;AAhBD,0CAgBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VidarNewJob = void 0;
|
|
4
|
+
const vidar_new_job_base_dto_1 = require("./vidar-new-job-base.dto");
|
|
5
|
+
class VidarNewJob extends vidar_new_job_base_dto_1.VidarNewJobBase {
|
|
6
|
+
}
|
|
7
|
+
exports.VidarNewJob = VidarNewJob;
|
|
8
|
+
//# sourceMappingURL=vidar-new-job.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vidar-new-job.dto.js","sourceRoot":"","sources":["../../../../src/types/adaptive/vidar-new/vidar-new-job.dto.ts"],"names":[],"mappings":";;;AAAA,qEAA2D;AAE3D,MAAa,WAAY,SAAQ,wCAAe;CAE/C;AAFD,kCAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vidar-new-job.type.js","sourceRoot":"","sources":["../../../../src/types/adaptive/vidar-new/vidar-new-job.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VidarDirection } from '../vidar/vidar-direction.enum';
|
|
2
|
+
export declare class VidarNewEventDto {
|
|
3
|
+
cameraId: string;
|
|
4
|
+
vidarEventId: string;
|
|
5
|
+
eventTimestamp: string;
|
|
6
|
+
state: string;
|
|
7
|
+
text: string;
|
|
8
|
+
direction: VidarDirection;
|
|
9
|
+
plateImage: string;
|
|
10
|
+
vehicleImage: string;
|
|
11
|
+
latitude: string;
|
|
12
|
+
longitude: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.VidarNewEventDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const decorators_1 = require("../../../decorators");
|
|
15
|
+
class VidarNewEventDto {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], VidarNewEventDto.prototype, "cameraId", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsNumberString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], VidarNewEventDto.prototype, "vidarEventId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsNumberString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], VidarNewEventDto.prototype, "eventTimestamp", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
(0, class_validator_1.Length)(0, 3),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], VidarNewEventDto.prototype, "state", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], VidarNewEventDto.prototype, "text", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsIn)(['0', '1', '2']),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], VidarNewEventDto.prototype, "direction", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.Validate)(decorators_1.IsBase64OrNA),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], VidarNewEventDto.prototype, "plateImage", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_validator_1.IsBase64)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], VidarNewEventDto.prototype, "vehicleImage", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsLatitude)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], VidarNewEventDto.prototype, "latitude", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsLongitude)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], VidarNewEventDto.prototype, "longitude", void 0);
|
|
58
|
+
exports.VidarNewEventDto = VidarNewEventDto;
|
|
59
|
+
//# sourceMappingURL=vidar-new.event.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vidar-new.event.dto.js","sourceRoot":"","sources":["../../../../src/types/adaptive/vidar-new/vidar-new.event.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAsH;AAEtH,oDAAmD;AAEnD,MAAa,gBAAgB;CAmC5B;AAjCG;IADC,IAAA,0BAAQ,GAAE;;kDACM;AAGjB;IADC,IAAA,gCAAc,GAAE;;sDACI;AAGrB;IADC,IAAA,gCAAc,GAAE;;wDACM;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,wBAAM,EAAC,CAAC,EAAE,CAAC,CAAC;;+CACC;AAGd;IADC,IAAA,0BAAQ,GAAE;;8CACE;AAGb;IADC,IAAA,sBAAI,EAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;;mDACI;AAO1B;IADC,IAAA,0BAAQ,EAAC,yBAAY,CAAC;;oDACJ;AAGnB;IADC,IAAA,0BAAQ,GAAE;;sDACU;AAGrB;IADC,IAAA,4BAAU,GAAE;;kDACI;AAGjB;IADC,IAAA,6BAAW,GAAE;;mDACI;AAlCtB,4CAmCC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./adaptive"), exports);
|
|
14
|
+
__exportStar(require("./platesmart"), exports);
|
|
15
|
+
__exportStar(require("./rekor"), exports);
|
|
16
|
+
__exportStar(require("./lpr"), exports);
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,+CAA6B;AAC7B,0CAAwB;AACxB,wCAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type CameraType = 'einar' | 'vidar' | 'rekor';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera-type.js","sourceRoot":"","sources":["../../../src/types/lpr/camera-type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./lpr-job.type"), exports);
|
|
14
|
+
__exportStar(require("./camera-type"), exports);
|
|
15
|
+
__exportStar(require("./lpr-job.interface"), exports);
|
|
16
|
+
__exportStar(require("./lpr-direction.enum"), exports);
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/lpr/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA+B;AAC/B,gDAA8B;AAC9B,sDAAoC;AACpC,uDAAqC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LprDirectionEnum = void 0;
|
|
4
|
+
var LprDirectionEnum;
|
|
5
|
+
(function (LprDirectionEnum) {
|
|
6
|
+
LprDirectionEnum[LprDirectionEnum["APPROACHING"] = 1] = "APPROACHING";
|
|
7
|
+
LprDirectionEnum[LprDirectionEnum["MOVING_AWAY"] = -1] = "MOVING_AWAY";
|
|
8
|
+
LprDirectionEnum[LprDirectionEnum["UNKNOWN"] = 0] = "UNKNOWN";
|
|
9
|
+
})(LprDirectionEnum = exports.LprDirectionEnum || (exports.LprDirectionEnum = {}));
|
|
10
|
+
//# sourceMappingURL=lpr-direction.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lpr-direction.enum.js","sourceRoot":"","sources":["../../../src/types/lpr/lpr-direction.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IACxB,qEAAe,CAAA;IACf,sEAAgB,CAAA;IAChB,6DAAW,CAAA;AACf,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Orientation } from '../platesmart';
|
|
2
|
+
import { CameraType } from './camera-type';
|
|
3
|
+
import { LprDirectionEnum } from './lpr-direction.enum';
|
|
4
|
+
export interface ILprJob {
|
|
5
|
+
type: CameraType;
|
|
6
|
+
lpn: string;
|
|
7
|
+
eventId: string;
|
|
8
|
+
orientation?: Orientation;
|
|
9
|
+
direction?: LprDirectionEnum;
|
|
10
|
+
cameraId: string;
|
|
11
|
+
twoLetterState: string;
|
|
12
|
+
eventTimestamp: number | Date;
|
|
13
|
+
payloadTimestamp: number | Date;
|
|
14
|
+
plateRegion: string;
|
|
15
|
+
vehicleImageURL: string;
|
|
16
|
+
plateImageURL: string;
|
|
17
|
+
confidence: number;
|
|
18
|
+
labels?: {
|
|
19
|
+
reqSource?: string;
|
|
20
|
+
cameraName?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lpr-job.interface.js","sourceRoot":"","sources":["../../../src/types/lpr/lpr-job.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lpr-job.type.js","sourceRoot":"","sources":["../../../src/types/lpr/lpr-job.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare class PlatesmartEventDto {
|
|
2
|
+
image: Image;
|
|
3
|
+
plate: Plate;
|
|
4
|
+
source: Source;
|
|
5
|
+
vehicle?: Vehicle;
|
|
6
|
+
id: string;
|
|
7
|
+
timestamp: number;
|
|
8
|
+
type: string;
|
|
9
|
+
version: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class Image {
|
|
12
|
+
height: number;
|
|
13
|
+
id: string;
|
|
14
|
+
width: number;
|
|
15
|
+
}
|
|
16
|
+
export declare class Plate {
|
|
17
|
+
code?: string;
|
|
18
|
+
region: Region;
|
|
19
|
+
tag: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class Region {
|
|
22
|
+
height: number;
|
|
23
|
+
width: number;
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
}
|
|
27
|
+
export declare class Source {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
type: string;
|
|
31
|
+
}
|
|
32
|
+
export declare class Vehicle {
|
|
33
|
+
color?: Color;
|
|
34
|
+
make?: Make;
|
|
35
|
+
orientation?: Orientation;
|
|
36
|
+
type?: Make;
|
|
37
|
+
bearing?: number;
|
|
38
|
+
occlusion?: number;
|
|
39
|
+
}
|
|
40
|
+
export declare class Color {
|
|
41
|
+
code: string;
|
|
42
|
+
}
|
|
43
|
+
export declare class Make {
|
|
44
|
+
code: string;
|
|
45
|
+
name: string;
|
|
46
|
+
}
|
|
47
|
+
export declare class Orientation {
|
|
48
|
+
code: 'rear' | 'front' | 'side';
|
|
49
|
+
name: 'Rear' | 'Front' | 'Side';
|
|
50
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Orientation = exports.Make = exports.Color = exports.Vehicle = exports.Source = exports.Region = exports.Plate = exports.Image = exports.PlatesmartEventDto = void 0;
|
|
4
|
+
class PlatesmartEventDto {
|
|
5
|
+
}
|
|
6
|
+
exports.PlatesmartEventDto = PlatesmartEventDto;
|
|
7
|
+
class Image {
|
|
8
|
+
}
|
|
9
|
+
exports.Image = Image;
|
|
10
|
+
class Plate {
|
|
11
|
+
}
|
|
12
|
+
exports.Plate = Plate;
|
|
13
|
+
class Region {
|
|
14
|
+
}
|
|
15
|
+
exports.Region = Region;
|
|
16
|
+
class Source {
|
|
17
|
+
}
|
|
18
|
+
exports.Source = Source;
|
|
19
|
+
class Vehicle {
|
|
20
|
+
}
|
|
21
|
+
exports.Vehicle = Vehicle;
|
|
22
|
+
class Color {
|
|
23
|
+
}
|
|
24
|
+
exports.Color = Color;
|
|
25
|
+
class Make {
|
|
26
|
+
}
|
|
27
|
+
exports.Make = Make;
|
|
28
|
+
class Orientation {
|
|
29
|
+
}
|
|
30
|
+
exports.Orientation = Orientation;
|
|
31
|
+
//# sourceMappingURL=event.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.dto.js","sourceRoot":"","sources":["../../../src/types/platesmart/event.dto.ts"],"names":[],"mappings":";;;AAAA,MAAa,kBAAkB;CAS9B;AATD,gDASC;AAED,MAAa,KAAK;CAIjB;AAJD,sBAIC;AAED,MAAa,KAAK;CAIjB;AAJD,sBAIC;AAED,MAAa,MAAM;CAKlB;AALD,wBAKC;AAED,MAAa,MAAM;CAIlB;AAJD,wBAIC;AAED,MAAa,OAAO;CAOnB;AAPD,0BAOC;AAED,MAAa,KAAK;CAEjB;AAFD,sBAEC;AAED,MAAa,IAAI;CAGhB;AAHD,oBAGC;AAED,MAAa,WAAW;CAGvB;AAHD,kCAGC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./event.dto"), exports);
|
|
14
|
+
__exportStar(require("./job"), exports);
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/platesmart/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wCAAsB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PlatesmartEventDto } from './event.dto';
|
|
2
|
+
declare class PlatesmartJobForQueue extends PlatesmartEventDto {
|
|
3
|
+
payloadTimestamp: number;
|
|
4
|
+
}
|
|
5
|
+
export declare class PlatesmartJob extends PlatesmartJobForQueue {
|
|
6
|
+
saved: boolean;
|
|
7
|
+
plateImageURL: string;
|
|
8
|
+
vehicleImageURL: string;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlatesmartJob = void 0;
|
|
4
|
+
const event_dto_1 = require("./event.dto");
|
|
5
|
+
class PlatesmartJobForQueue extends event_dto_1.PlatesmartEventDto {
|
|
6
|
+
}
|
|
7
|
+
class PlatesmartJob extends PlatesmartJobForQueue {
|
|
8
|
+
}
|
|
9
|
+
exports.PlatesmartJob = PlatesmartJob;
|
|
10
|
+
//# sourceMappingURL=job.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job.js","sourceRoot":"","sources":["../../../src/types/platesmart/job.ts"],"names":[],"mappings":";;;AAAA,2CAAiD;AAEjD,MAAM,qBAAsB,SAAQ,8BAAkB;CAErD;AAED,MAAa,aAAc,SAAQ,qBAAqB;CAIvD;AAJD,sCAIC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=orientation.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orientation.enum.js","sourceRoot":"","sources":["../../../src/types/platesmart/orientation.enum.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export interface RekorEvent {
|
|
2
|
+
data_type: string;
|
|
3
|
+
version: number;
|
|
4
|
+
epoch_start: number;
|
|
5
|
+
epoch_end: number;
|
|
6
|
+
frame_start: number;
|
|
7
|
+
frame_end: number;
|
|
8
|
+
company_id: string;
|
|
9
|
+
agent_uid: string;
|
|
10
|
+
agent_version: string;
|
|
11
|
+
agent_type: string;
|
|
12
|
+
camera_id: number;
|
|
13
|
+
gps_latitude: number;
|
|
14
|
+
gps_longitude: number;
|
|
15
|
+
country: string;
|
|
16
|
+
uuids: string[];
|
|
17
|
+
vehicle_path: EPath[];
|
|
18
|
+
plate_indexes: number[];
|
|
19
|
+
candidates: Candidate[];
|
|
20
|
+
best_plate: BestPlate;
|
|
21
|
+
best_confidence: number;
|
|
22
|
+
best_plate_number: string;
|
|
23
|
+
best_region: string;
|
|
24
|
+
best_region_confidence: number;
|
|
25
|
+
matches_template: boolean;
|
|
26
|
+
plate_path: EPath[];
|
|
27
|
+
vehicle_crop_jpeg: string;
|
|
28
|
+
overview_jpeg: string;
|
|
29
|
+
best_uuid: string;
|
|
30
|
+
best_uuid_epoch_ms: number;
|
|
31
|
+
best_image_width: number;
|
|
32
|
+
best_image_height: number;
|
|
33
|
+
travel_direction: number;
|
|
34
|
+
is_parked: boolean;
|
|
35
|
+
is_preview: boolean;
|
|
36
|
+
vehicle_signature: string;
|
|
37
|
+
vehicle: RekorVehicleType;
|
|
38
|
+
web_server_config: WebServerConfig;
|
|
39
|
+
direction_of_travel_id: number;
|
|
40
|
+
custom_data: string;
|
|
41
|
+
}
|
|
42
|
+
export interface BestPlate {
|
|
43
|
+
plate: string;
|
|
44
|
+
confidence: number;
|
|
45
|
+
matches_template: number;
|
|
46
|
+
plate_index: number;
|
|
47
|
+
region: string;
|
|
48
|
+
region_confidence: number;
|
|
49
|
+
processing_time_ms: number;
|
|
50
|
+
requested_topn: number;
|
|
51
|
+
coordinates: Coordinate[];
|
|
52
|
+
plate_crop_jpeg: string;
|
|
53
|
+
vehicle_region: VehicleRegion;
|
|
54
|
+
vehicle_detected: boolean;
|
|
55
|
+
candidates: Candidate[];
|
|
56
|
+
}
|
|
57
|
+
export interface Candidate {
|
|
58
|
+
plate: string;
|
|
59
|
+
confidence: number;
|
|
60
|
+
matches_template: number;
|
|
61
|
+
}
|
|
62
|
+
export interface Coordinate {
|
|
63
|
+
x: number;
|
|
64
|
+
y: number;
|
|
65
|
+
}
|
|
66
|
+
export interface VehicleRegion {
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
width: number;
|
|
70
|
+
height: number;
|
|
71
|
+
}
|
|
72
|
+
export interface EPath {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
w: number;
|
|
76
|
+
h: number;
|
|
77
|
+
t: number;
|
|
78
|
+
f: number;
|
|
79
|
+
}
|
|
80
|
+
export interface RekorVehicleType {
|
|
81
|
+
color: BodyType[];
|
|
82
|
+
make: BodyType[];
|
|
83
|
+
make_model: BodyType[];
|
|
84
|
+
body_type: BodyType[];
|
|
85
|
+
year: BodyType[];
|
|
86
|
+
orientation: BodyType[];
|
|
87
|
+
missing_plate: BodyType[];
|
|
88
|
+
is_vehicle: BodyType[];
|
|
89
|
+
}
|
|
90
|
+
export interface BodyType {
|
|
91
|
+
name: string;
|
|
92
|
+
confidence: number;
|
|
93
|
+
}
|
|
94
|
+
export interface WebServerConfig {
|
|
95
|
+
camera_label: string;
|
|
96
|
+
agent_label: string;
|
|
97
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.dto.js","sourceRoot":"","sources":["../../../src/types/rekor/event.dto.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./event.dto"), exports);
|
|
14
|
+
__exportStar(require("./job"), exports);
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/rekor/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wCAAsB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class RekorJob {
|
|
2
|
+
type: 'rekor';
|
|
3
|
+
uuid: string;
|
|
4
|
+
lpn: string;
|
|
5
|
+
state: string;
|
|
6
|
+
cameraId: string;
|
|
7
|
+
timestamp: number;
|
|
8
|
+
payloadTimestamp: number;
|
|
9
|
+
plateImageURL: string;
|
|
10
|
+
vehicleImageURL: string;
|
|
11
|
+
travelDirection: number;
|
|
12
|
+
directionOfTravelId: number;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job.js","sourceRoot":"","sources":["../../../src/types/rekor/job.ts"],"names":[],"mappings":";;;AAAA,MAAa,QAAQ;CAYpB;AAZD,4BAYC"}
|
package/jest.config.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@parkflow/shared-types",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Shared type definitions for Vanguard services",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"homepage": "https://github.com/Vanguard-Parking/shared-types#readme",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/Vanguard-Parking/shared-types/issues"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/Vanguard-Parking/shared-types.git"
|
|
13
|
+
},
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"author": "Mendel Groner",
|
|
16
|
+
"type": "commonjs",
|
|
17
|
+
"main": "dist/index.js",
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"prebuild": "rimraf dist",
|
|
21
|
+
"build": "tsc -p ./tsconfig.build.json",
|
|
22
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
23
|
+
"test": "jest"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"class-validator": "^0.14.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@nestjs/common": "^10.2.7",
|
|
30
|
+
"@types/jest": "^29.5.12",
|
|
31
|
+
"jest": "^29.7.0",
|
|
32
|
+
"prettier": "^3.2.5",
|
|
33
|
+
"rimraf": "^5.0.5",
|
|
34
|
+
"ts-jest": "^29.1.2"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './is-base64-or-na';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './is-base64-or-na-validation.decorator';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments, isBase64 } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
@ValidatorConstraint({ name: 'IsBase64OrNA', async: false })
|
|
4
|
+
export class IsBase64OrNA implements ValidatorConstraintInterface {
|
|
5
|
+
validate(text: string, args: ValidationArguments) {
|
|
6
|
+
return text === 'n.a.' || isBase64(text);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
defaultMessage(args: ValidationArguments) {
|
|
10
|
+
return `Text ($value) is neither 'n.a.' nor is it base64 encoded!`;
|
|
11
|
+
}
|
|
12
|
+
}
|