@spytecgps/nova-orm 1.0.8 → 1.0.9

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.
@@ -11,7 +11,10 @@ export const updateDevicePairing = async (novaDataSource, params, logger) => {
11
11
  !params?.values?.btmacMain &&
12
12
  !params?.values?.btmacSecondary &&
13
13
  !params?.values?.connectionType &&
14
- !params?.values?.pairingMode) {
14
+ !params?.values?.pairingMode &&
15
+ !params?.values?.mainDeviceStatus &&
16
+ !params?.values?.secondaryDeviceStatus &&
17
+ !params?.values?.notes) {
15
18
  logger.warn({ params }, 'DevicePairingsRepository::updateDevicePairing missing required parameters');
16
19
  return false;
17
20
  }
@@ -6,6 +6,9 @@ export interface CreateDevicePairingParams {
6
6
  btmacSecondary: string;
7
7
  pairingMode?: string | null;
8
8
  connectionType?: string | null;
9
+ mainDeviceStatus?: string | null;
10
+ secondaryDeviceStatus?: string | null;
11
+ notes?: string | null;
9
12
  }
10
13
  export interface GetDevicePairingsParams {
11
14
  filters: {
@@ -31,6 +34,9 @@ export interface UpdateDevicePairingParams {
31
34
  btmacSecondary?: string;
32
35
  pairingMode?: string;
33
36
  connectionType?: string;
37
+ mainDeviceStatus?: string | null;
38
+ secondaryDeviceStatus?: string | null;
39
+ notes?: string | null;
34
40
  };
35
41
  }
36
42
  export interface DeleteDevicePairingParams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,21 +0,0 @@
1
- export declare class SVRPairingRequest {
2
- id: number;
3
- mainDeviceName: string;
4
- imeiMain: string;
5
- btmacMain: string;
6
- imeiGhost: string;
7
- btmacGhost: string;
8
- ghostConfigured: boolean;
9
- ghostAlreadyReported: boolean;
10
- mainDeviceWithCorrectBBFW: boolean;
11
- mainDeviceWithCorrectMCUFW: boolean;
12
- ghostDeviceWithCorrectBBFW: boolean;
13
- ghostDeviceWithCorrectMCUFW: boolean;
14
- mainDevicePairCommandsQueued: boolean;
15
- mainDevicePairCommandsConfirmed: boolean;
16
- readyToPair: boolean;
17
- installationOK: boolean;
18
- installationFailed: boolean;
19
- pairingLost: boolean;
20
- notes: string;
21
- }
@@ -1,174 +0,0 @@
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
- import { BoolToNumberTransformer } from '../utils/boolToNumberTransformer';
12
- let SVRPairingRequest = class SVRPairingRequest {
13
- id;
14
- mainDeviceName;
15
- imeiMain;
16
- btmacMain;
17
- imeiGhost;
18
- btmacGhost;
19
- ghostConfigured;
20
- ghostAlreadyReported;
21
- mainDeviceWithCorrectBBFW;
22
- mainDeviceWithCorrectMCUFW;
23
- ghostDeviceWithCorrectBBFW;
24
- ghostDeviceWithCorrectMCUFW;
25
- mainDevicePairCommandsQueued;
26
- mainDevicePairCommandsConfirmed;
27
- readyToPair;
28
- installationOK;
29
- installationFailed;
30
- pairingLost;
31
- notes;
32
- };
33
- __decorate([
34
- PrimaryGeneratedColumn({ type: 'int', name: 'id' }),
35
- __metadata("design:type", Number)
36
- ], SVRPairingRequest.prototype, "id", void 0);
37
- __decorate([
38
- Column('varchar', { name: 'mainDeviceName', length: 30 }),
39
- __metadata("design:type", String)
40
- ], SVRPairingRequest.prototype, "mainDeviceName", void 0);
41
- __decorate([
42
- Column('varchar', { name: 'imeiMain', length: 15 }),
43
- __metadata("design:type", String)
44
- ], SVRPairingRequest.prototype, "imeiMain", void 0);
45
- __decorate([
46
- Column('varchar', { name: 'btmacMain', length: 20 }),
47
- __metadata("design:type", String)
48
- ], SVRPairingRequest.prototype, "btmacMain", void 0);
49
- __decorate([
50
- Column('varchar', { name: 'imeiGhost', length: 15 }),
51
- __metadata("design:type", String)
52
- ], SVRPairingRequest.prototype, "imeiGhost", void 0);
53
- __decorate([
54
- Column('varchar', { name: 'btmacGhost', length: 20 }),
55
- __metadata("design:type", String)
56
- ], SVRPairingRequest.prototype, "btmacGhost", void 0);
57
- __decorate([
58
- Column('tinyint', {
59
- name: 'ghostConfigured',
60
- width: 1,
61
- default: 0,
62
- transformer: new BoolToNumberTransformer(),
63
- }),
64
- __metadata("design:type", Boolean)
65
- ], SVRPairingRequest.prototype, "ghostConfigured", void 0);
66
- __decorate([
67
- Column('tinyint', {
68
- name: 'ghostAlreadyReported',
69
- width: 1,
70
- default: 0,
71
- transformer: new BoolToNumberTransformer(),
72
- }),
73
- __metadata("design:type", Boolean)
74
- ], SVRPairingRequest.prototype, "ghostAlreadyReported", void 0);
75
- __decorate([
76
- Column('tinyint', {
77
- name: 'mainDeviceWithCorrectBBFW',
78
- width: 1,
79
- default: 0,
80
- transformer: new BoolToNumberTransformer(),
81
- }),
82
- __metadata("design:type", Boolean)
83
- ], SVRPairingRequest.prototype, "mainDeviceWithCorrectBBFW", void 0);
84
- __decorate([
85
- Column('tinyint', {
86
- name: 'mainDeviceWithCorrectMCUFW',
87
- width: 1,
88
- default: 0,
89
- transformer: new BoolToNumberTransformer(),
90
- }),
91
- __metadata("design:type", Boolean)
92
- ], SVRPairingRequest.prototype, "mainDeviceWithCorrectMCUFW", void 0);
93
- __decorate([
94
- Column('tinyint', {
95
- name: 'ghostDeviceWithCorrectBBFW',
96
- width: 1,
97
- default: 0,
98
- transformer: new BoolToNumberTransformer(),
99
- }),
100
- __metadata("design:type", Boolean)
101
- ], SVRPairingRequest.prototype, "ghostDeviceWithCorrectBBFW", void 0);
102
- __decorate([
103
- Column('tinyint', {
104
- name: 'ghostDeviceWithCorrectMCUFW',
105
- width: 1,
106
- default: 0,
107
- transformer: new BoolToNumberTransformer(),
108
- }),
109
- __metadata("design:type", Boolean)
110
- ], SVRPairingRequest.prototype, "ghostDeviceWithCorrectMCUFW", void 0);
111
- __decorate([
112
- Column('tinyint', {
113
- name: 'mainDevicePairCommandsQueued',
114
- width: 1,
115
- default: 0,
116
- transformer: new BoolToNumberTransformer(),
117
- }),
118
- __metadata("design:type", Boolean)
119
- ], SVRPairingRequest.prototype, "mainDevicePairCommandsQueued", void 0);
120
- __decorate([
121
- Column('tinyint', {
122
- name: 'mainDevicePairCommandsConfirmed',
123
- width: 1,
124
- default: 0,
125
- transformer: new BoolToNumberTransformer(),
126
- }),
127
- __metadata("design:type", Boolean)
128
- ], SVRPairingRequest.prototype, "mainDevicePairCommandsConfirmed", void 0);
129
- __decorate([
130
- Column('tinyint', {
131
- name: 'readyToPair',
132
- width: 1,
133
- default: 0,
134
- transformer: new BoolToNumberTransformer(),
135
- }),
136
- __metadata("design:type", Boolean)
137
- ], SVRPairingRequest.prototype, "readyToPair", void 0);
138
- __decorate([
139
- Column('tinyint', {
140
- name: 'installationOK',
141
- width: 1,
142
- default: 0,
143
- transformer: new BoolToNumberTransformer(),
144
- }),
145
- __metadata("design:type", Boolean)
146
- ], SVRPairingRequest.prototype, "installationOK", void 0);
147
- __decorate([
148
- Column('tinyint', {
149
- name: 'installationFailed',
150
- width: 1,
151
- default: 0,
152
- transformer: new BoolToNumberTransformer(),
153
- }),
154
- __metadata("design:type", Boolean)
155
- ], SVRPairingRequest.prototype, "installationFailed", void 0);
156
- __decorate([
157
- Column('tinyint', {
158
- name: 'pairingLost',
159
- width: 1,
160
- default: 0,
161
- transformer: new BoolToNumberTransformer(),
162
- }),
163
- __metadata("design:type", Boolean)
164
- ], SVRPairingRequest.prototype, "pairingLost", void 0);
165
- __decorate([
166
- Column('varchar', { name: 'notes', nullable: true, length: 1000 }),
167
- __metadata("design:type", String)
168
- ], SVRPairingRequest.prototype, "notes", void 0);
169
- SVRPairingRequest = __decorate([
170
- Index('ixSVRPairingRequestImeiGhost', ['imeiGhost'], {}),
171
- Index('ixSVRPairingRequestImeiMain', ['imeiMain'], {}),
172
- Entity('svrPairingRequest', { schema: 'nova' })
173
- ], SVRPairingRequest);
174
- export { SVRPairingRequest };