@spytecgps/nova-orm 0.0.4 → 0.0.5
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/README.md +2 -0
- package/dist/entities/alert.d.ts +25 -0
- package/dist/entities/alert.js +118 -0
- package/dist/entities/alertType.d.ts +14 -0
- package/dist/entities/alertType.js +65 -0
- package/dist/entities/assetCategory.d.ts +5 -0
- package/dist/entities/assetCategory.js +29 -0
- package/dist/entities/billing.d.ts +15 -0
- package/dist/entities/billing.js +81 -0
- package/dist/entities/billingCustomerBraintree.d.ts +11 -0
- package/dist/entities/billingCustomerBraintree.js +53 -0
- package/dist/entities/billingDeviceHistory.d.ts +11 -0
- package/dist/entities/billingDeviceHistory.js +52 -0
- package/dist/entities/billingStatusHistoryBraintree.d.ts +10 -0
- package/dist/entities/billingStatusHistoryBraintree.js +55 -0
- package/dist/entities/billingSubscriptionBraintree.d.ts +34 -0
- package/dist/entities/billingSubscriptionBraintree.js +169 -0
- package/dist/entities/blacklist.d.ts +9 -0
- package/dist/entities/blacklist.js +44 -0
- package/dist/entities/blacklistType.d.ts +5 -0
- package/dist/entities/blacklistType.js +28 -0
- package/dist/entities/cellTower.d.ts +12 -0
- package/dist/entities/cellTower.js +56 -0
- package/dist/entities/client.d.ts +22 -0
- package/dist/entities/client.js +96 -0
- package/dist/entities/clientConfiguration.d.ts +7 -0
- package/dist/entities/clientConfiguration.js +42 -0
- package/dist/entities/clientDeviceSetting.d.ts +14 -0
- package/dist/entities/clientDeviceSetting.js +76 -0
- package/dist/entities/clientType.d.ts +6 -0
- package/dist/entities/clientType.js +32 -0
- package/dist/entities/country.d.ts +16 -0
- package/dist/entities/country.js +76 -0
- package/dist/entities/dataSourceType.d.ts +5 -0
- package/dist/entities/dataSourceType.js +28 -0
- package/dist/entities/deactivation.d.ts +12 -0
- package/dist/entities/deactivation.js +63 -0
- package/dist/entities/deactivationReason.d.ts +6 -0
- package/dist/entities/deactivationReason.js +36 -0
- package/dist/entities/device.d.ts +31 -0
- package/dist/entities/device.js +123 -0
- package/dist/entities/deviceBehavior.d.ts +22 -0
- package/dist/entities/deviceBehavior.js +105 -0
- package/dist/entities/deviceHistory.d.ts +9 -0
- package/dist/entities/deviceHistory.js +44 -0
- package/dist/entities/deviceModelListener.d.ts +8 -0
- package/dist/entities/deviceModelListener.js +40 -0
- package/dist/entities/deviceReplacement.d.ts +11 -0
- package/dist/entities/deviceReplacement.js +49 -0
- package/dist/entities/deviceType.d.ts +23 -0
- package/dist/entities/deviceType.js +100 -0
- package/dist/entities/deviceTypeEvent.d.ts +5 -0
- package/dist/entities/deviceTypeEvent.js +29 -0
- package/dist/entities/deviceTypeFeature.d.ts +5 -0
- package/dist/entities/deviceTypeFeature.js +29 -0
- package/dist/entities/deviceTypeFirmware.d.ts +11 -0
- package/dist/entities/deviceTypeFirmware.js +57 -0
- package/dist/entities/entityTag.d.ts +8 -0
- package/dist/entities/entityTag.js +42 -0
- package/dist/entities/entityType.d.ts +5 -0
- package/dist/entities/entityType.js +28 -0
- package/dist/entities/event.d.ts +6 -0
- package/dist/entities/event.js +32 -0
- package/dist/entities/feature.d.ts +6 -0
- package/dist/entities/feature.js +32 -0
- package/dist/entities/firmwareUpgradeTask.d.ts +12 -0
- package/dist/entities/firmwareUpgradeTask.js +53 -0
- package/dist/entities/geofence.d.ts +20 -0
- package/dist/entities/geofence.js +86 -0
- package/dist/entities/geofenceEvent.d.ts +19 -0
- package/dist/entities/geofenceEvent.js +87 -0
- package/dist/entities/imeiIccidCarrier.d.ts +16 -0
- package/dist/entities/imeiIccidCarrier.js +78 -0
- package/dist/entities/imeiIccidHistory.d.ts +7 -0
- package/dist/entities/imeiIccidHistory.js +38 -0
- package/dist/entities/index.d.ts +68 -0
- package/dist/entities/index.js +68 -0
- package/dist/entities/industry.d.ts +8 -0
- package/dist/entities/industry.js +40 -0
- package/dist/entities/mobileNetwork.d.ts +9 -0
- package/dist/entities/mobileNetwork.js +44 -0
- package/dist/entities/notificationRecipient.d.ts +14 -0
- package/dist/entities/notificationRecipient.js +70 -0
- package/dist/entities/organization.d.ts +9 -0
- package/dist/entities/organization.js +40 -0
- package/dist/entities/plan.d.ts +16 -0
- package/dist/entities/plan.js +72 -0
- package/dist/entities/position.d.ts +18 -0
- package/dist/entities/position.js +84 -0
- package/dist/entities/securityRole.d.ts +7 -0
- package/dist/entities/securityRole.js +36 -0
- package/dist/entities/serviceProvider.d.ts +7 -0
- package/dist/entities/serviceProvider.js +36 -0
- package/dist/entities/serviceProviderProduct.d.ts +9 -0
- package/dist/entities/serviceProviderProduct.js +54 -0
- package/dist/entities/serviceProviderProductNetwork.d.ts +5 -0
- package/dist/entities/serviceProviderProductNetwork.js +28 -0
- package/dist/entities/serviceProviderProductType.d.ts +5 -0
- package/dist/entities/serviceProviderProductType.js +28 -0
- package/dist/entities/sim.d.ts +16 -0
- package/dist/entities/sim.js +78 -0
- package/dist/entities/trip.d.ts +24 -0
- package/dist/entities/trip.js +103 -0
- package/dist/entities/tripCompletionStatus.d.ts +6 -0
- package/dist/entities/tripCompletionStatus.js +32 -0
- package/dist/entities/tripPosition.d.ts +4 -0
- package/dist/entities/tripPosition.js +24 -0
- package/dist/entities/user.d.ts +25 -0
- package/dist/entities/user.js +116 -0
- package/dist/entities/userActivation.d.ts +9 -0
- package/dist/entities/userActivation.js +45 -0
- package/dist/entities/userActivationDevice.d.ts +22 -0
- package/dist/entities/userActivationDevice.js +105 -0
- package/dist/entities/userActivationEvent.d.ts +12 -0
- package/dist/entities/userActivationEvent.js +52 -0
- package/dist/entities/userActivationMetric.d.ts +38 -0
- package/dist/entities/userActivationMetric.js +167 -0
- package/dist/entities/userAlertConfiguration.d.ts +13 -0
- package/dist/entities/userAlertConfiguration.js +68 -0
- package/dist/entities/userAppFeedback.d.ts +10 -0
- package/dist/entities/userAppFeedback.js +45 -0
- package/dist/entities/userAppIncident.d.ts +29 -0
- package/dist/entities/userAppIncident.js +131 -0
- package/dist/entities/userConfiguration.d.ts +18 -0
- package/dist/entities/userConfiguration.js +87 -0
- package/dist/entities/userDataDeletionRequest.d.ts +11 -0
- package/dist/entities/userDataDeletionRequest.js +48 -0
- package/dist/entities/userDeviceBehaviorTask.d.ts +14 -0
- package/dist/entities/userDeviceBehaviorTask.js +61 -0
- package/dist/entities/userInvitation.d.ts +17 -0
- package/dist/entities/userInvitation.js +75 -0
- package/dist/entities/userRatingRequest.d.ts +13 -0
- package/dist/entities/userRatingRequest.js +63 -0
- package/dist/entities/userRegistrationAttempt.d.ts +35 -0
- package/dist/entities/userRegistrationAttempt.js +145 -0
- package/dist/entities/userSecurityRole.d.ts +6 -0
- package/dist/entities/userSecurityRole.js +30 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/novaDataSource.d.ts +56 -0
- package/dist/novaDataSource.js +59 -0
- package/dist/repositories/baseRepository.d.ts +5 -0
- package/dist/repositories/baseRepository.js +5 -0
- package/dist/repositories/devicesRepository.d.ts +24 -0
- package/dist/repositories/devicesRepository.js +122 -0
- package/dist/repositories/index.d.ts +3 -0
- package/dist/repositories/index.js +3 -0
- package/dist/repositories/securityRepository.d.ts +21 -0
- package/dist/repositories/securityRepository.js +99 -0
- package/dist/types/enums.d.ts +9 -0
- package/dist/types/enums.js +11 -0
- package/dist/utils/uuidHelpers.d.ts +2 -0
- package/dist/utils/uuidHelpers.js +6 -0
- package/package.json +5 -5
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Column, Entity, Index } from 'typeorm';
|
|
11
|
+
let UserDeviceBehaviorTask = class UserDeviceBehaviorTask {
|
|
12
|
+
};
|
|
13
|
+
__decorate([
|
|
14
|
+
Column('varchar', { primary: true, name: 'id', length: 255 }),
|
|
15
|
+
__metadata("design:type", String)
|
|
16
|
+
], UserDeviceBehaviorTask.prototype, "id", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
Column('smallint', { name: 'deviceBehaviorId' }),
|
|
19
|
+
__metadata("design:type", Number)
|
|
20
|
+
], UserDeviceBehaviorTask.prototype, "deviceBehaviorId", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
Column('int', { name: 'clientId' }),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], UserDeviceBehaviorTask.prototype, "clientId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
Column('binary', { name: 'userId', length: 16 }),
|
|
27
|
+
__metadata("design:type", Buffer)
|
|
28
|
+
], UserDeviceBehaviorTask.prototype, "userId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
Column('varchar', { name: 'imei', length: 15 }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], UserDeviceBehaviorTask.prototype, "imei", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
Column('varchar', { name: 'behaviorName', length: 25 }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], UserDeviceBehaviorTask.prototype, "behaviorName", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
Column('json', { name: 'behaviorParams', nullable: true }),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], UserDeviceBehaviorTask.prototype, "behaviorParams", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
Column('varchar', { name: 'status', length: 10 }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], UserDeviceBehaviorTask.prototype, "status", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
Column('datetime', { name: 'createdAt' }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], UserDeviceBehaviorTask.prototype, "createdAt", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
Column('datetime', { name: 'modifiedOn', nullable: true }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], UserDeviceBehaviorTask.prototype, "modifiedOn", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
Column('json', { name: 'extraParams', nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], UserDeviceBehaviorTask.prototype, "extraParams", void 0);
|
|
57
|
+
UserDeviceBehaviorTask = __decorate([
|
|
58
|
+
Index('ixUserDeviceBehaviorTaskDeviceBehaviorId', ['deviceBehaviorId'], {}),
|
|
59
|
+
Entity('userDeviceBehaviorTask', { schema: 'nova' })
|
|
60
|
+
], UserDeviceBehaviorTask);
|
|
61
|
+
export { UserDeviceBehaviorTask };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export declare class UserInvitation {
|
|
3
|
+
id: Buffer;
|
|
4
|
+
inviterClientId: string;
|
|
5
|
+
inviterUserId: Buffer;
|
|
6
|
+
inviteeEmail: string;
|
|
7
|
+
inviteeSecurityRoleId: number;
|
|
8
|
+
status: string;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
modifiedAt: Date;
|
|
11
|
+
inviteeUserId: Buffer | null;
|
|
12
|
+
trackerImeis: string | null;
|
|
13
|
+
trackerAccess: string | null;
|
|
14
|
+
minAccessDate: Date | null;
|
|
15
|
+
boundaries: string | null;
|
|
16
|
+
boundaryAccess: string | null;
|
|
17
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Column, Entity, Index } from 'typeorm';
|
|
11
|
+
let UserInvitation = class UserInvitation {
|
|
12
|
+
};
|
|
13
|
+
__decorate([
|
|
14
|
+
Column('binary', { primary: true, name: 'id', length: 16 }),
|
|
15
|
+
__metadata("design:type", Buffer)
|
|
16
|
+
], UserInvitation.prototype, "id", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
Column('bigint', { name: 'inviterClientId' }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], UserInvitation.prototype, "inviterClientId", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
Column('binary', { name: 'inviterUserId', length: 16 }),
|
|
23
|
+
__metadata("design:type", Buffer)
|
|
24
|
+
], UserInvitation.prototype, "inviterUserId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
Column('varchar', { name: 'inviteeEmail', length: 255 }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], UserInvitation.prototype, "inviteeEmail", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
Column('tinyint', { name: 'inviteeSecurityRoleId' }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], UserInvitation.prototype, "inviteeSecurityRoleId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
Column('varchar', { name: 'status', length: 10 }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], UserInvitation.prototype, "status", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
Column('datetime', { name: 'createdAt' }),
|
|
39
|
+
__metadata("design:type", Date)
|
|
40
|
+
], UserInvitation.prototype, "createdAt", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
Column('datetime', { name: 'modifiedAt' }),
|
|
43
|
+
__metadata("design:type", Date)
|
|
44
|
+
], UserInvitation.prototype, "modifiedAt", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
Column('binary', { name: 'inviteeUserId', nullable: true, length: 16 }),
|
|
47
|
+
__metadata("design:type", Buffer)
|
|
48
|
+
], UserInvitation.prototype, "inviteeUserId", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
Column('varchar', { name: 'trackerImeis', nullable: true, length: 1000 }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], UserInvitation.prototype, "trackerImeis", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
Column('text', { name: 'trackerAccess', nullable: true }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], UserInvitation.prototype, "trackerAccess", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
Column('datetime', { name: 'minAccessDate', nullable: true }),
|
|
59
|
+
__metadata("design:type", Date)
|
|
60
|
+
], UserInvitation.prototype, "minAccessDate", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
Column('text', { name: 'boundaries', nullable: true }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], UserInvitation.prototype, "boundaries", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
Column('text', { name: 'boundaryAccess', nullable: true }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], UserInvitation.prototype, "boundaryAccess", void 0);
|
|
69
|
+
UserInvitation = __decorate([
|
|
70
|
+
Index('ixUserInvtationInviteeEmail', ['inviteeEmail'], {}),
|
|
71
|
+
Index('ixUserInvtationInviterClientId', ['inviterClientId'], {}),
|
|
72
|
+
Index('ixUserInvtationInviteeSecurityRoleId', ['inviteeSecurityRoleId'], {}),
|
|
73
|
+
Entity('userInvitation', { schema: 'nova' })
|
|
74
|
+
], UserInvitation);
|
|
75
|
+
export { UserInvitation };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export declare class UserRatingRequest {
|
|
3
|
+
id: number;
|
|
4
|
+
userId: Buffer;
|
|
5
|
+
clientId: number;
|
|
6
|
+
deviceManufacturer: string;
|
|
7
|
+
deviceOs: string;
|
|
8
|
+
deviceOsVersion: string;
|
|
9
|
+
appVersion: string;
|
|
10
|
+
requestDate: Date | null;
|
|
11
|
+
amazonRequestDate: Date | null;
|
|
12
|
+
deviceIdentifierKey: string | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
|
|
11
|
+
let UserRatingRequest = class UserRatingRequest {
|
|
12
|
+
};
|
|
13
|
+
__decorate([
|
|
14
|
+
PrimaryGeneratedColumn({ type: 'int', name: 'id' }),
|
|
15
|
+
__metadata("design:type", Number)
|
|
16
|
+
], UserRatingRequest.prototype, "id", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
Column('binary', { name: 'userId', length: 16 }),
|
|
19
|
+
__metadata("design:type", Buffer)
|
|
20
|
+
], UserRatingRequest.prototype, "userId", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
Column('int', { name: 'clientId' }),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], UserRatingRequest.prototype, "clientId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
Column('varchar', { name: 'deviceManufacturer', length: 500 }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], UserRatingRequest.prototype, "deviceManufacturer", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
Column('varchar', { name: 'deviceOs', length: 50 }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], UserRatingRequest.prototype, "deviceOs", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
Column('varchar', { name: 'deviceOsVersion', length: 20 }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], UserRatingRequest.prototype, "deviceOsVersion", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
Column('varchar', { name: 'appVersion', length: 10 }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], UserRatingRequest.prototype, "appVersion", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
Column('datetime', { name: 'requestDate', nullable: true }),
|
|
43
|
+
__metadata("design:type", Date)
|
|
44
|
+
], UserRatingRequest.prototype, "requestDate", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
Column('datetime', { name: 'amazonRequestDate', nullable: true }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], UserRatingRequest.prototype, "amazonRequestDate", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
Column('varchar', {
|
|
51
|
+
name: 'deviceIdentifierKey',
|
|
52
|
+
nullable: true,
|
|
53
|
+
length: 255,
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], UserRatingRequest.prototype, "deviceIdentifierKey", void 0);
|
|
57
|
+
UserRatingRequest = __decorate([
|
|
58
|
+
Index('ixUserRatingRequestAmazonRequestDate', ['amazonRequestDate'], {}),
|
|
59
|
+
Index('ixUserRatingRequestClientId', ['clientId'], {}),
|
|
60
|
+
Index('ixUserRatingRequestUserId', ['userId'], {}),
|
|
61
|
+
Entity('userRatingRequest', { schema: 'nova' })
|
|
62
|
+
], UserRatingRequest);
|
|
63
|
+
export { UserRatingRequest };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export declare class UserRegistrationAttempt {
|
|
3
|
+
id: number;
|
|
4
|
+
firstName: string | null;
|
|
5
|
+
lastName: string | null;
|
|
6
|
+
email: string | null;
|
|
7
|
+
phoneNumber: string | null;
|
|
8
|
+
phoneCode: string | null;
|
|
9
|
+
phoneCodeCountryId: string | null;
|
|
10
|
+
companyName: string | null;
|
|
11
|
+
street: string | null;
|
|
12
|
+
state: string | null;
|
|
13
|
+
postalCode: string | null;
|
|
14
|
+
country: string | null;
|
|
15
|
+
pin: number | null;
|
|
16
|
+
imei: string | null;
|
|
17
|
+
deviceType: string | null;
|
|
18
|
+
deviceName: string | null;
|
|
19
|
+
orderId: string | null;
|
|
20
|
+
trackingReason: string | null;
|
|
21
|
+
userName: string | null;
|
|
22
|
+
plan: string | null;
|
|
23
|
+
billingFrequency: string | null;
|
|
24
|
+
planId: string | null;
|
|
25
|
+
subscriptionSource: string | null;
|
|
26
|
+
subscriptionId: string | null;
|
|
27
|
+
platform: string | null;
|
|
28
|
+
status: string | null;
|
|
29
|
+
createdAt: Date | null;
|
|
30
|
+
lastUpdatedAt: Date | null;
|
|
31
|
+
city: string | null;
|
|
32
|
+
clientId: number | null;
|
|
33
|
+
countryCode: string | null;
|
|
34
|
+
tempUserId: Buffer | null;
|
|
35
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
|
|
11
|
+
let UserRegistrationAttempt = class UserRegistrationAttempt {
|
|
12
|
+
};
|
|
13
|
+
__decorate([
|
|
14
|
+
PrimaryGeneratedColumn({ type: 'int', name: 'id' }),
|
|
15
|
+
__metadata("design:type", Number)
|
|
16
|
+
], UserRegistrationAttempt.prototype, "id", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
Column('varchar', { name: 'firstName', nullable: true, length: 100 }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], UserRegistrationAttempt.prototype, "firstName", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
Column('varchar', { name: 'lastName', nullable: true, length: 100 }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], UserRegistrationAttempt.prototype, "lastName", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
Column('varchar', { name: 'email', nullable: true, length: 255 }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], UserRegistrationAttempt.prototype, "email", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
Column('varchar', { name: 'phoneNumber', nullable: true, length: 20 }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], UserRegistrationAttempt.prototype, "phoneNumber", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
Column('varchar', { name: 'phoneCode', nullable: true, length: 10 }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], UserRegistrationAttempt.prototype, "phoneCode", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
Column('varchar', { name: 'phoneCodeCountryId', nullable: true, length: 10 }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], UserRegistrationAttempt.prototype, "phoneCodeCountryId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
Column('varchar', { name: 'companyName', nullable: true, length: 255 }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], UserRegistrationAttempt.prototype, "companyName", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
Column('varchar', { name: 'street', nullable: true, length: 255 }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], UserRegistrationAttempt.prototype, "street", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
Column('varchar', { name: 'state', nullable: true, length: 100 }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], UserRegistrationAttempt.prototype, "state", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
Column('varchar', { name: 'postalCode', nullable: true, length: 20 }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], UserRegistrationAttempt.prototype, "postalCode", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
Column('varchar', { name: 'country', nullable: true, length: 100 }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], UserRegistrationAttempt.prototype, "country", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
Column('int', { name: 'pin', nullable: true }),
|
|
63
|
+
__metadata("design:type", Number)
|
|
64
|
+
], UserRegistrationAttempt.prototype, "pin", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
Column('varchar', { name: 'imei', nullable: true, length: 15 }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], UserRegistrationAttempt.prototype, "imei", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
Column('varchar', { name: 'deviceType', nullable: true, length: 50 }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], UserRegistrationAttempt.prototype, "deviceType", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
Column('varchar', { name: 'deviceName', nullable: true, length: 255 }),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], UserRegistrationAttempt.prototype, "deviceName", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
Column('varchar', { name: 'orderId', nullable: true, length: 255 }),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], UserRegistrationAttempt.prototype, "orderId", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
Column('varchar', { name: 'trackingReason', nullable: true, length: 255 }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], UserRegistrationAttempt.prototype, "trackingReason", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
Column('varchar', { name: 'userName', nullable: true, length: 50 }),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], UserRegistrationAttempt.prototype, "userName", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
Column('varchar', { name: 'plan', nullable: true, length: 50 }),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], UserRegistrationAttempt.prototype, "plan", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
Column('varchar', { name: 'billingFrequency', nullable: true, length: 50 }),
|
|
95
|
+
__metadata("design:type", String)
|
|
96
|
+
], UserRegistrationAttempt.prototype, "billingFrequency", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
Column('varchar', { name: 'planId', nullable: true, length: 50 }),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], UserRegistrationAttempt.prototype, "planId", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
Column('varchar', { name: 'subscriptionSource', nullable: true, length: 50 }),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], UserRegistrationAttempt.prototype, "subscriptionSource", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
Column('varchar', { name: 'subscriptionId', nullable: true, length: 50 }),
|
|
107
|
+
__metadata("design:type", String)
|
|
108
|
+
], UserRegistrationAttempt.prototype, "subscriptionId", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
Column('varchar', { name: 'platform', nullable: true, length: 25 }),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], UserRegistrationAttempt.prototype, "platform", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
Column('varchar', { name: 'status', nullable: true, length: 10 }),
|
|
115
|
+
__metadata("design:type", String)
|
|
116
|
+
], UserRegistrationAttempt.prototype, "status", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
Column('datetime', { name: 'createdAt', nullable: true }),
|
|
119
|
+
__metadata("design:type", Date)
|
|
120
|
+
], UserRegistrationAttempt.prototype, "createdAt", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
Column('datetime', { name: 'lastUpdatedAt', nullable: true }),
|
|
123
|
+
__metadata("design:type", Date)
|
|
124
|
+
], UserRegistrationAttempt.prototype, "lastUpdatedAt", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
Column('varchar', { name: 'city', nullable: true, length: 255 }),
|
|
127
|
+
__metadata("design:type", String)
|
|
128
|
+
], UserRegistrationAttempt.prototype, "city", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
Column('int', { name: 'clientId', nullable: true }),
|
|
131
|
+
__metadata("design:type", Number)
|
|
132
|
+
], UserRegistrationAttempt.prototype, "clientId", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
Column('varchar', { name: 'countryCode', nullable: true, length: 3 }),
|
|
135
|
+
__metadata("design:type", String)
|
|
136
|
+
], UserRegistrationAttempt.prototype, "countryCode", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
Column('binary', { name: 'tempUserId', nullable: true, length: 16 }),
|
|
139
|
+
__metadata("design:type", Buffer)
|
|
140
|
+
], UserRegistrationAttempt.prototype, "tempUserId", void 0);
|
|
141
|
+
UserRegistrationAttempt = __decorate([
|
|
142
|
+
Index('ixUserRegistrationAttemptTempUserId', ['tempUserId'], {}),
|
|
143
|
+
Entity('userRegistrationAttempt', { schema: 'nova' })
|
|
144
|
+
], UserRegistrationAttempt);
|
|
145
|
+
export { UserRegistrationAttempt };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
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;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Column, Entity, Index } from 'typeorm';
|
|
11
|
+
let UserSecurityRole = class UserSecurityRole {
|
|
12
|
+
};
|
|
13
|
+
__decorate([
|
|
14
|
+
Column('int', { name: 'clientId' }),
|
|
15
|
+
__metadata("design:type", Number)
|
|
16
|
+
], UserSecurityRole.prototype, "clientId", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
Column('binary', { primary: true, name: 'userId', length: 16 }),
|
|
19
|
+
__metadata("design:type", Buffer)
|
|
20
|
+
], UserSecurityRole.prototype, "userId", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
Column('tinyint', { primary: true, name: 'securityRoleId' }),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], UserSecurityRole.prototype, "securityRoleId", void 0);
|
|
25
|
+
UserSecurityRole = __decorate([
|
|
26
|
+
Index('ixUserSecurityRoleClientId', ['clientId'], {}),
|
|
27
|
+
Index('ixUserSecurityRoleSecurityRoleId', ['securityRoleId'], {}),
|
|
28
|
+
Entity('userSecurityRole', { schema: 'nova' })
|
|
29
|
+
], UserSecurityRole);
|
|
30
|
+
export { UserSecurityRole };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as Entities from './entities';
|
|
2
|
+
import { NovaDataSource, NovaDataSourceConfig } from './novaDataSource';
|
|
3
|
+
import * as Repositories from './repositories';
|
|
4
|
+
import * as Enums from './types/enums';
|
|
5
|
+
export { Entities, Repositories, Enums, NovaDataSourceConfig, NovaDataSource };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { DataSource, EntityTarget, LoggerOptions, ObjectLiteral, Repository, SelectQueryBuilder } from 'typeorm';
|
|
2
|
+
export interface NovaDataSourceConfig {
|
|
3
|
+
/**
|
|
4
|
+
* Database username.
|
|
5
|
+
*/
|
|
6
|
+
username: string;
|
|
7
|
+
/**
|
|
8
|
+
* Database password.
|
|
9
|
+
*/
|
|
10
|
+
password: string;
|
|
11
|
+
/**
|
|
12
|
+
* Database host.
|
|
13
|
+
*/
|
|
14
|
+
host?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Database host port.
|
|
17
|
+
*/
|
|
18
|
+
port?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Database name to connect to.
|
|
21
|
+
*/
|
|
22
|
+
database?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Object with ssl parameters or a string containing name of ssl profile.
|
|
25
|
+
*/
|
|
26
|
+
ssl?: any;
|
|
27
|
+
/**
|
|
28
|
+
* Logging options.
|
|
29
|
+
*/
|
|
30
|
+
logging?: LoggerOptions;
|
|
31
|
+
}
|
|
32
|
+
export declare class NovaDataSource {
|
|
33
|
+
protected readonly dataSource: DataSource;
|
|
34
|
+
constructor(config: NovaDataSourceConfig);
|
|
35
|
+
/**
|
|
36
|
+
* Performs connection to the database.
|
|
37
|
+
*/
|
|
38
|
+
connect(): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Closes connection with the database.
|
|
41
|
+
* Once connection is closed, you cannot use repositories or perform any operations except opening connection again.
|
|
42
|
+
*/
|
|
43
|
+
disconnect(): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Gets repository for the given entity.
|
|
46
|
+
*/
|
|
47
|
+
getRepository<Entity extends ObjectLiteral>(target: EntityTarget<Entity>): Repository<Entity>;
|
|
48
|
+
/**
|
|
49
|
+
* Executes raw SQL query and returns raw database results.
|
|
50
|
+
*/
|
|
51
|
+
query(query: string, parameters?: any[]): Promise<any>;
|
|
52
|
+
/**
|
|
53
|
+
* Creates a new query builder that can be used to build a SQL query.
|
|
54
|
+
*/
|
|
55
|
+
createQueryBuilder<Entity extends ObjectLiteral>(entityClass: EntityTarget<Entity>, alias: string): Promise<SelectQueryBuilder<Entity>>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// import { logger } from '@spytecgps/sdk'
|
|
2
|
+
import { DataSource, } from 'typeorm';
|
|
3
|
+
export class NovaDataSource {
|
|
4
|
+
constructor(config) {
|
|
5
|
+
this.dataSource = new DataSource({
|
|
6
|
+
type: 'mysql',
|
|
7
|
+
host: 'aws.connect.psdb.cloud',
|
|
8
|
+
port: 3306,
|
|
9
|
+
database: 'nova',
|
|
10
|
+
ssl: {
|
|
11
|
+
rejectUnauthorized: true,
|
|
12
|
+
},
|
|
13
|
+
synchronize: false,
|
|
14
|
+
logging: false,
|
|
15
|
+
entities: ['src/entities/**/*.ts'],
|
|
16
|
+
subscribers: [],
|
|
17
|
+
...config,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Performs connection to the database.
|
|
22
|
+
*/
|
|
23
|
+
async connect() {
|
|
24
|
+
await this.dataSource.initialize();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Closes connection with the database.
|
|
28
|
+
* Once connection is closed, you cannot use repositories or perform any operations except opening connection again.
|
|
29
|
+
*/
|
|
30
|
+
async disconnect() {
|
|
31
|
+
try {
|
|
32
|
+
if (this.dataSource.isInitialized) {
|
|
33
|
+
await this.dataSource.destroy();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
// TODO: Add logger
|
|
38
|
+
// logger.error({ error }, 'Failed to close connection to database')
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Gets repository for the given entity.
|
|
43
|
+
*/
|
|
44
|
+
getRepository(target) {
|
|
45
|
+
return this.dataSource.getRepository(target);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Executes raw SQL query and returns raw database results.
|
|
49
|
+
*/
|
|
50
|
+
async query(query, parameters) {
|
|
51
|
+
return this.dataSource.query(query, parameters, null);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Creates a new query builder that can be used to build a SQL query.
|
|
55
|
+
*/
|
|
56
|
+
async createQueryBuilder(entityClass, alias) {
|
|
57
|
+
return this.dataSource.createQueryBuilder(entityClass, alias, null);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Device, DeviceType } from '../entities';
|
|
2
|
+
import { BaseRepository } from './baseRepository';
|
|
3
|
+
export interface GetDevicesOptions {
|
|
4
|
+
withDeviceType: boolean;
|
|
5
|
+
withIccidCarrier: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class DevicesRepository extends BaseRepository {
|
|
8
|
+
/**
|
|
9
|
+
* Get device by imei
|
|
10
|
+
* @param {string} imei The imei of the device
|
|
11
|
+
*/
|
|
12
|
+
getDeviceByImei(imei: string, options: GetDevicesOptions): Promise<Device>;
|
|
13
|
+
/**
|
|
14
|
+
* Get devices by type id
|
|
15
|
+
* @param {number} deviceTypeId The device type id
|
|
16
|
+
* @param {boolean} onlyActiveDevices Whether to get only active devices
|
|
17
|
+
*/
|
|
18
|
+
getDevicesByDeviceTypeId(deviceTypeId: number, onlyActiveDevices: boolean, options: GetDevicesOptions): Promise<Device[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Get device types
|
|
21
|
+
* @param {boolean} onlyWithRelatedIccidCarrier Whether to get only device types with iccid carrier
|
|
22
|
+
*/
|
|
23
|
+
getDeviceTypes(onlyWithRelatedIccidCarrier: boolean): Promise<DeviceType[]>;
|
|
24
|
+
}
|