tering-serieuze-types 1.12.1 → 1.13.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.
- package/dist/index.js +55 -41
- package/package.json +1 -1
- package/src/authenticator.ts +20 -1
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var src_exports = {};
|
|
|
30
30
|
__export(src_exports, {
|
|
31
31
|
AddUserDto: () => AddUserDto,
|
|
32
32
|
Application: () => Application,
|
|
33
|
+
AuthenticationOptionsDto: () => AuthenticationOptionsDto,
|
|
33
34
|
BigBrotherItem: () => BigBrotherItem,
|
|
34
35
|
Button: () => Button,
|
|
35
36
|
City: () => City,
|
|
@@ -44,6 +45,7 @@ __export(src_exports, {
|
|
|
44
45
|
ToggleBoolDto: () => ToggleBoolDto,
|
|
45
46
|
ToggleableUserProperties: () => ToggleableUserProperties,
|
|
46
47
|
User: () => User,
|
|
48
|
+
VerificationResponseDto: () => VerificationResponseDto,
|
|
47
49
|
WebsocketAction: () => WebsocketAction,
|
|
48
50
|
WindowState: () => WindowState
|
|
49
51
|
});
|
|
@@ -98,39 +100,49 @@ __decorateClass([
|
|
|
98
100
|
(0, import_swagger.ApiProperty)({ type: String })
|
|
99
101
|
], WindowState.prototype, "activeApplication", 2);
|
|
100
102
|
|
|
101
|
-
// src/
|
|
103
|
+
// src/authenticator.ts
|
|
102
104
|
var import_swagger2 = require("@nestjs/swagger");
|
|
105
|
+
var AuthenticationOptionsDto = class {
|
|
106
|
+
};
|
|
107
|
+
__decorateClass([
|
|
108
|
+
(0, import_swagger2.ApiProperty)({ type: String })
|
|
109
|
+
], AuthenticationOptionsDto.prototype, "token", 2);
|
|
110
|
+
var VerificationResponseDto = class {
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// src/user.ts
|
|
114
|
+
var import_swagger3 = require("@nestjs/swagger");
|
|
103
115
|
var import_class_validator = require("class-validator");
|
|
104
116
|
var User = class {
|
|
105
117
|
};
|
|
106
118
|
__decorateClass([
|
|
107
|
-
(0,
|
|
119
|
+
(0, import_swagger3.ApiProperty)({ type: String })
|
|
108
120
|
], User.prototype, "id", 2);
|
|
109
121
|
__decorateClass([
|
|
110
122
|
(0, import_class_validator.IsEmail)(),
|
|
111
|
-
(0,
|
|
123
|
+
(0, import_swagger3.ApiProperty)({ type: String })
|
|
112
124
|
], User.prototype, "email", 2);
|
|
113
125
|
__decorateClass([
|
|
114
|
-
(0,
|
|
126
|
+
(0, import_swagger3.ApiProperty)({ type: Boolean, default: false })
|
|
115
127
|
], User.prototype, "isAdmin", 2);
|
|
116
128
|
__decorateClass([
|
|
117
|
-
(0,
|
|
129
|
+
(0, import_swagger3.ApiProperty)({ type: Boolean, default: false })
|
|
118
130
|
], User.prototype, "isBanned", 2);
|
|
119
131
|
__decorateClass([
|
|
120
|
-
(0,
|
|
132
|
+
(0, import_swagger3.ApiProperty)({ type: Boolean, default: false })
|
|
121
133
|
], User.prototype, "playJinglesLocal", 2);
|
|
122
134
|
__decorateClass([
|
|
123
|
-
(0,
|
|
135
|
+
(0, import_swagger3.ApiProperty)({ type: [String], default: [] })
|
|
124
136
|
], User.prototype, "favoriteJingles", 2);
|
|
125
137
|
__decorateClass([
|
|
126
|
-
(0,
|
|
127
|
-
(0,
|
|
138
|
+
(0, import_swagger3.ApiProperty)({ type: Number, nullable: true }),
|
|
139
|
+
(0, import_swagger3.ApiProperty)()
|
|
128
140
|
], User.prototype, "isRegistering", 2);
|
|
129
141
|
__decorateClass([
|
|
130
|
-
(0,
|
|
142
|
+
(0, import_swagger3.ApiProperty)({ type: WindowState })
|
|
131
143
|
], User.prototype, "windowState", 2);
|
|
132
144
|
__decorateClass([
|
|
133
|
-
(0,
|
|
145
|
+
(0, import_swagger3.ApiProperty)({ type: () => [Button] })
|
|
134
146
|
], User.prototype, "buttons", 2);
|
|
135
147
|
var ToggleAbleUserPropertyEnum = /* @__PURE__ */ ((ToggleAbleUserPropertyEnum2) => {
|
|
136
148
|
ToggleAbleUserPropertyEnum2["isAdmin"] = "isAdmin";
|
|
@@ -138,7 +150,7 @@ var ToggleAbleUserPropertyEnum = /* @__PURE__ */ ((ToggleAbleUserPropertyEnum2)
|
|
|
138
150
|
ToggleAbleUserPropertyEnum2["playJinglesLocal"] = "playJinglesLocal";
|
|
139
151
|
return ToggleAbleUserPropertyEnum2;
|
|
140
152
|
})(ToggleAbleUserPropertyEnum || {});
|
|
141
|
-
var ToggleableUserProperties = class extends (0,
|
|
153
|
+
var ToggleableUserProperties = class extends (0, import_swagger3.PickType)(User, [
|
|
142
154
|
"isAdmin" /* isAdmin */,
|
|
143
155
|
"isBanned" /* isBanned */,
|
|
144
156
|
"playJinglesLocal" /* playJinglesLocal */
|
|
@@ -148,67 +160,67 @@ var AddUserDto = class {
|
|
|
148
160
|
};
|
|
149
161
|
__decorateClass([
|
|
150
162
|
(0, import_class_validator.IsEmail)(),
|
|
151
|
-
(0,
|
|
163
|
+
(0, import_swagger3.ApiProperty)({ type: String, example: "info@example.com" })
|
|
152
164
|
], AddUserDto.prototype, "email", 2);
|
|
153
|
-
var RemoveUserDto = class extends (0,
|
|
165
|
+
var RemoveUserDto = class extends (0, import_swagger3.PickType)(User, ["id"]) {
|
|
154
166
|
};
|
|
155
|
-
var SetWindowStateDto = class extends (0,
|
|
167
|
+
var SetWindowStateDto = class extends (0, import_swagger3.PickType)(User, ["windowState"]) {
|
|
156
168
|
};
|
|
157
169
|
var ToggleBoolDto = class {
|
|
158
170
|
};
|
|
159
171
|
__decorateClass([
|
|
160
|
-
(0,
|
|
172
|
+
(0, import_swagger3.ApiProperty)({
|
|
161
173
|
type: String,
|
|
162
174
|
nullable: true,
|
|
163
175
|
description: "User ID. When empty, the current user is used. Admin only param"
|
|
164
176
|
})
|
|
165
177
|
], ToggleBoolDto.prototype, "id", 2);
|
|
166
178
|
__decorateClass([
|
|
167
|
-
(0,
|
|
179
|
+
(0, import_swagger3.ApiProperty)({ enum: ToggleAbleUserPropertyEnum, description: "The property to toggle" })
|
|
168
180
|
], ToggleBoolDto.prototype, "field", 2);
|
|
169
181
|
|
|
170
182
|
// src/button.ts
|
|
171
|
-
var
|
|
183
|
+
var import_swagger4 = require("@nestjs/swagger");
|
|
172
184
|
var WebsocketAction = class {
|
|
173
185
|
};
|
|
174
186
|
__decorateClass([
|
|
175
|
-
(0,
|
|
187
|
+
(0, import_swagger4.ApiProperty)({ type: String })
|
|
176
188
|
], WebsocketAction.prototype, "serviceName", 2);
|
|
177
189
|
__decorateClass([
|
|
178
|
-
(0,
|
|
190
|
+
(0, import_swagger4.ApiProperty)({ type: String })
|
|
179
191
|
], WebsocketAction.prototype, "methodName", 2);
|
|
180
192
|
__decorateClass([
|
|
181
|
-
(0,
|
|
193
|
+
(0, import_swagger4.ApiProperty)({ type: Object })
|
|
182
194
|
], WebsocketAction.prototype, "data", 2);
|
|
183
195
|
var Button = class {
|
|
184
196
|
};
|
|
185
197
|
__decorateClass([
|
|
186
|
-
(0,
|
|
198
|
+
(0, import_swagger4.ApiProperty)({ type: String })
|
|
187
199
|
], Button.prototype, "bdAddr", 2);
|
|
188
200
|
__decorateClass([
|
|
189
|
-
(0,
|
|
201
|
+
(0, import_swagger4.ApiProperty)({ type: User, nullable: true })
|
|
190
202
|
], Button.prototype, "owner", 2);
|
|
191
203
|
__decorateClass([
|
|
192
|
-
(0,
|
|
204
|
+
(0, import_swagger4.ApiProperty)({ type: Number, nullable: true })
|
|
193
205
|
], Button.prototype, "batteryLevel", 2);
|
|
194
206
|
__decorateClass([
|
|
195
|
-
(0,
|
|
207
|
+
(0, import_swagger4.ApiProperty)({ type: Date, nullable: true })
|
|
196
208
|
], Button.prototype, "lastBatteryUpdate", 2);
|
|
197
209
|
__decorateClass([
|
|
198
|
-
(0,
|
|
210
|
+
(0, import_swagger4.ApiProperty)({ type: WebsocketAction, nullable: true })
|
|
199
211
|
], Button.prototype, "ButtonSingleClick", 2);
|
|
200
212
|
__decorateClass([
|
|
201
|
-
(0,
|
|
213
|
+
(0, import_swagger4.ApiProperty)({ type: WebsocketAction, nullable: true })
|
|
202
214
|
], Button.prototype, "ButtonDoubleClick", 2);
|
|
203
215
|
__decorateClass([
|
|
204
|
-
(0,
|
|
216
|
+
(0, import_swagger4.ApiProperty)({ type: WebsocketAction, nullable: true })
|
|
205
217
|
], Button.prototype, "ButtonHold", 2);
|
|
206
218
|
__decorateClass([
|
|
207
|
-
(0,
|
|
219
|
+
(0, import_swagger4.ApiProperty)({ type: Number, nullable: true })
|
|
208
220
|
], Button.prototype, "batteryState", 2);
|
|
209
221
|
|
|
210
222
|
// src/emulator.ts
|
|
211
|
-
var
|
|
223
|
+
var import_swagger5 = require("@nestjs/swagger");
|
|
212
224
|
var City = /* @__PURE__ */ ((City2) => {
|
|
213
225
|
City2["Waalwijk"] = "Waalwijk";
|
|
214
226
|
City2["Sprang"] = "Sprang-Capelle";
|
|
@@ -217,42 +229,42 @@ var City = /* @__PURE__ */ ((City2) => {
|
|
|
217
229
|
var EmulateFireDepartmentDto = class {
|
|
218
230
|
};
|
|
219
231
|
__decorateClass([
|
|
220
|
-
(0,
|
|
232
|
+
(0, import_swagger5.ApiProperty)({ enum: City })
|
|
221
233
|
], EmulateFireDepartmentDto.prototype, "city", 2);
|
|
222
234
|
|
|
223
235
|
// src/jingle.ts
|
|
224
|
-
var
|
|
236
|
+
var import_swagger6 = require("@nestjs/swagger");
|
|
225
237
|
var Jingle = class {
|
|
226
238
|
};
|
|
227
239
|
__decorateClass([
|
|
228
|
-
(0,
|
|
240
|
+
(0, import_swagger6.ApiProperty)({ type: String, example: "internet-gekkies" })
|
|
229
241
|
], Jingle.prototype, "folder", 2);
|
|
230
242
|
__decorateClass([
|
|
231
|
-
(0,
|
|
243
|
+
(0, import_swagger6.ApiProperty)({ type: String, example: "mand.mp3" })
|
|
232
244
|
], Jingle.prototype, "file", 2);
|
|
233
245
|
__decorateClass([
|
|
234
|
-
(0,
|
|
246
|
+
(0, import_swagger6.ApiProperty)({ type: [String], examples: ["internet", "gekkies", "mand"] })
|
|
235
247
|
], Jingle.prototype, "keywords", 2);
|
|
236
248
|
__decorateClass([
|
|
237
|
-
(0,
|
|
249
|
+
(0, import_swagger6.ApiProperty)({ type: String, example: "1475909a5bbe100" })
|
|
238
250
|
], Jingle.prototype, "hash", 2);
|
|
239
251
|
var JingleFolder = class {
|
|
240
252
|
};
|
|
241
253
|
__decorateClass([
|
|
242
|
-
(0,
|
|
254
|
+
(0, import_swagger6.ApiProperty)({ type: String, example: "internet-gekkies" })
|
|
243
255
|
], JingleFolder.prototype, "folder", 2);
|
|
244
256
|
__decorateClass([
|
|
245
|
-
(0,
|
|
257
|
+
(0, import_swagger6.ApiProperty)({ type: [Jingle] })
|
|
246
258
|
], JingleFolder.prototype, "jingles", 2);
|
|
247
|
-
var PlayJingleDto = class extends (0,
|
|
259
|
+
var PlayJingleDto = class extends (0, import_swagger6.PickType)(Jingle, ["folder", "file"]) {
|
|
248
260
|
};
|
|
249
261
|
var BigBrotherItem = class {
|
|
250
262
|
};
|
|
251
263
|
__decorateClass([
|
|
252
|
-
(0,
|
|
264
|
+
(0, import_swagger6.ApiProperty)({ type: String, example: "frank@maxserv.com", description: "User's email" })
|
|
253
265
|
], BigBrotherItem.prototype, "user", 2);
|
|
254
266
|
__decorateClass([
|
|
255
|
-
(0,
|
|
267
|
+
(0, import_swagger6.ApiProperty)({ type: Number, example: 1679694523189, description: "Timestamp in milliseconds" })
|
|
256
268
|
], BigBrotherItem.prototype, "time", 2);
|
|
257
269
|
|
|
258
270
|
// src/index.ts
|
|
@@ -262,6 +274,7 @@ var P2000Payload = class {
|
|
|
262
274
|
0 && (module.exports = {
|
|
263
275
|
AddUserDto,
|
|
264
276
|
Application,
|
|
277
|
+
AuthenticationOptionsDto,
|
|
265
278
|
BigBrotherItem,
|
|
266
279
|
Button,
|
|
267
280
|
City,
|
|
@@ -276,6 +289,7 @@ var P2000Payload = class {
|
|
|
276
289
|
ToggleBoolDto,
|
|
277
290
|
ToggleableUserProperties,
|
|
278
291
|
User,
|
|
292
|
+
VerificationResponseDto,
|
|
279
293
|
WebsocketAction,
|
|
280
294
|
WindowState
|
|
281
295
|
});
|
package/package.json
CHANGED
package/src/authenticator.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AuthenticatorDevice,
|
|
3
|
+
CredentialDeviceType,
|
|
4
|
+
PublicKeyCredentialRequestOptionsJSON,
|
|
5
|
+
} from '@simplewebauthn/typescript-types';
|
|
6
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
7
|
|
|
3
8
|
export type Authenticator = AuthenticatorDevice & {
|
|
4
9
|
credentialDeviceType: CredentialDeviceType;
|
|
@@ -9,3 +14,17 @@ export type DbAuthenticator = Omit<Authenticator, 'credentialID' | 'credentialPu
|
|
|
9
14
|
credentialID: string;
|
|
10
15
|
credentialPublicKey: string;
|
|
11
16
|
};
|
|
17
|
+
|
|
18
|
+
export class AuthenticationOptionsDto {
|
|
19
|
+
options: PublicKeyCredentialRequestOptionsJSON;
|
|
20
|
+
|
|
21
|
+
@ApiProperty({ type: String })
|
|
22
|
+
token: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class VerificationResponseDto {
|
|
26
|
+
verification: {
|
|
27
|
+
verified: boolean;
|
|
28
|
+
};
|
|
29
|
+
accessToken: string | null;
|
|
30
|
+
}
|