tering-serieuze-types 1.17.0 → 1.18.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 +89 -51
- package/package.json +1 -1
- package/src/session.ts +27 -0
- package/src/user.ts +6 -0
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __export(src_exports, {
|
|
|
42
42
|
PlayJingleDto: () => PlayJingleDto,
|
|
43
43
|
Pod: () => Pod,
|
|
44
44
|
RemoveUserDto: () => RemoveUserDto,
|
|
45
|
+
SetChangelogIdDto: () => SetChangelogIdDto,
|
|
45
46
|
SetWindowStateDto: () => SetWindowStateDto,
|
|
46
47
|
ToggleAbleUserPropertyEnum: () => ToggleAbleUserPropertyEnum,
|
|
47
48
|
ToggleBoolDto: () => ToggleBoolDto,
|
|
@@ -113,49 +114,83 @@ var VerificationResponseDto = class {
|
|
|
113
114
|
};
|
|
114
115
|
|
|
115
116
|
// src/user.ts
|
|
116
|
-
var
|
|
117
|
+
var import_swagger4 = require("@nestjs/swagger");
|
|
117
118
|
var import_class_validator = require("class-validator");
|
|
119
|
+
|
|
120
|
+
// src/session.ts
|
|
121
|
+
var import_swagger3 = require("@nestjs/swagger");
|
|
122
|
+
var Session = class {
|
|
123
|
+
};
|
|
124
|
+
__decorateClass([
|
|
125
|
+
(0, import_swagger3.ApiProperty)({ type: String, example: "1234567890abcdef", description: "Session ID" })
|
|
126
|
+
], Session.prototype, "id", 2);
|
|
127
|
+
__decorateClass([
|
|
128
|
+
(0, import_swagger3.ApiProperty)({ type: String, example: "frank@maxserv.com", description: "User's email" })
|
|
129
|
+
], Session.prototype, "email", 2);
|
|
130
|
+
__decorateClass([
|
|
131
|
+
(0, import_swagger3.ApiProperty)({
|
|
132
|
+
type: Number,
|
|
133
|
+
example: 5,
|
|
134
|
+
description: "Current number of the token. Updates when the refresh token is renewed.",
|
|
135
|
+
default: 0
|
|
136
|
+
})
|
|
137
|
+
], Session.prototype, "lastTokenNumber", 2);
|
|
138
|
+
__decorateClass([
|
|
139
|
+
(0, import_swagger3.ApiProperty)({
|
|
140
|
+
type: Date,
|
|
141
|
+
example: "2021-01-01T00:00:00.000Z",
|
|
142
|
+
description: "Timestamp of the last time the session was used"
|
|
143
|
+
})
|
|
144
|
+
], Session.prototype, "lastUsed", 2);
|
|
145
|
+
__decorateClass([
|
|
146
|
+
(0, import_swagger3.ApiProperty)({ type: String, example: "Chrome on Windows", description: "Name of the session" })
|
|
147
|
+
], Session.prototype, "name", 2);
|
|
148
|
+
|
|
149
|
+
// src/user.ts
|
|
118
150
|
var User = class {
|
|
119
151
|
};
|
|
120
152
|
__decorateClass([
|
|
121
|
-
(0,
|
|
153
|
+
(0, import_swagger4.ApiProperty)({ type: String })
|
|
122
154
|
], User.prototype, "id", 2);
|
|
123
155
|
__decorateClass([
|
|
124
156
|
(0, import_class_validator.IsEmail)(),
|
|
125
|
-
(0,
|
|
157
|
+
(0, import_swagger4.ApiProperty)({ type: String })
|
|
126
158
|
], User.prototype, "email", 2);
|
|
127
159
|
__decorateClass([
|
|
128
|
-
(0,
|
|
160
|
+
(0, import_swagger4.ApiProperty)({ type: Boolean, default: false })
|
|
129
161
|
], User.prototype, "isAdmin", 2);
|
|
130
162
|
__decorateClass([
|
|
131
|
-
(0,
|
|
163
|
+
(0, import_swagger4.ApiProperty)({ type: Boolean, default: false })
|
|
132
164
|
], User.prototype, "isBanned", 2);
|
|
133
165
|
__decorateClass([
|
|
134
|
-
(0,
|
|
166
|
+
(0, import_swagger4.ApiProperty)({ type: Boolean, default: false })
|
|
135
167
|
], User.prototype, "playJinglesLocal", 2);
|
|
136
168
|
__decorateClass([
|
|
137
|
-
(0,
|
|
169
|
+
(0, import_swagger4.ApiProperty)({ type: [String], default: [] })
|
|
138
170
|
], User.prototype, "favoriteJingles", 2);
|
|
139
171
|
__decorateClass([
|
|
140
|
-
(0,
|
|
141
|
-
(0,
|
|
172
|
+
(0, import_swagger4.ApiProperty)({ type: Number, nullable: true }),
|
|
173
|
+
(0, import_swagger4.ApiProperty)()
|
|
142
174
|
], User.prototype, "isRegistering", 2);
|
|
143
175
|
__decorateClass([
|
|
144
|
-
(0,
|
|
176
|
+
(0, import_swagger4.ApiProperty)({ type: WindowState })
|
|
145
177
|
], User.prototype, "windowState", 2);
|
|
146
178
|
__decorateClass([
|
|
147
|
-
(0,
|
|
179
|
+
(0, import_swagger4.ApiProperty)({ type: () => [Button] })
|
|
148
180
|
], User.prototype, "buttons", 2);
|
|
149
181
|
__decorateClass([
|
|
150
|
-
(0,
|
|
182
|
+
(0, import_swagger4.ApiProperty)({ type: String, default: "" })
|
|
151
183
|
], User.prototype, "lastSeenChangelogId", 2);
|
|
184
|
+
__decorateClass([
|
|
185
|
+
(0, import_swagger4.ApiProperty)({ type: () => [Session] })
|
|
186
|
+
], User.prototype, "sessions", 2);
|
|
152
187
|
var ToggleAbleUserPropertyEnum = /* @__PURE__ */ ((ToggleAbleUserPropertyEnum2) => {
|
|
153
188
|
ToggleAbleUserPropertyEnum2["isAdmin"] = "isAdmin";
|
|
154
189
|
ToggleAbleUserPropertyEnum2["isBanned"] = "isBanned";
|
|
155
190
|
ToggleAbleUserPropertyEnum2["playJinglesLocal"] = "playJinglesLocal";
|
|
156
191
|
return ToggleAbleUserPropertyEnum2;
|
|
157
192
|
})(ToggleAbleUserPropertyEnum || {});
|
|
158
|
-
var ToggleableUserProperties = class extends (0,
|
|
193
|
+
var ToggleableUserProperties = class extends (0, import_swagger4.PickType)(User, [
|
|
159
194
|
"isAdmin" /* isAdmin */,
|
|
160
195
|
"isBanned" /* isBanned */,
|
|
161
196
|
"playJinglesLocal" /* playJinglesLocal */
|
|
@@ -165,67 +200,69 @@ var AddUserDto = class {
|
|
|
165
200
|
};
|
|
166
201
|
__decorateClass([
|
|
167
202
|
(0, import_class_validator.IsEmail)(),
|
|
168
|
-
(0,
|
|
203
|
+
(0, import_swagger4.ApiProperty)({ type: String, example: "info@example.com" })
|
|
169
204
|
], AddUserDto.prototype, "email", 2);
|
|
170
|
-
var RemoveUserDto = class extends (0,
|
|
205
|
+
var RemoveUserDto = class extends (0, import_swagger4.PickType)(User, ["id"]) {
|
|
206
|
+
};
|
|
207
|
+
var SetWindowStateDto = class extends (0, import_swagger4.PickType)(User, ["windowState"]) {
|
|
171
208
|
};
|
|
172
|
-
var
|
|
209
|
+
var SetChangelogIdDto = class extends (0, import_swagger4.PickType)(User, ["lastSeenChangelogId"]) {
|
|
173
210
|
};
|
|
174
211
|
var ToggleBoolDto = class {
|
|
175
212
|
};
|
|
176
213
|
__decorateClass([
|
|
177
|
-
(0,
|
|
214
|
+
(0, import_swagger4.ApiProperty)({
|
|
178
215
|
type: String,
|
|
179
216
|
nullable: true,
|
|
180
217
|
description: "User ID. When empty, the current user is used. Admin only param"
|
|
181
218
|
})
|
|
182
219
|
], ToggleBoolDto.prototype, "id", 2);
|
|
183
220
|
__decorateClass([
|
|
184
|
-
(0,
|
|
221
|
+
(0, import_swagger4.ApiProperty)({ enum: ToggleAbleUserPropertyEnum, description: "The property to toggle" })
|
|
185
222
|
], ToggleBoolDto.prototype, "field", 2);
|
|
186
223
|
|
|
187
224
|
// src/button.ts
|
|
188
|
-
var
|
|
225
|
+
var import_swagger5 = require("@nestjs/swagger");
|
|
189
226
|
var WebsocketAction = class {
|
|
190
227
|
};
|
|
191
228
|
__decorateClass([
|
|
192
|
-
(0,
|
|
229
|
+
(0, import_swagger5.ApiProperty)({ type: String })
|
|
193
230
|
], WebsocketAction.prototype, "serviceName", 2);
|
|
194
231
|
__decorateClass([
|
|
195
|
-
(0,
|
|
232
|
+
(0, import_swagger5.ApiProperty)({ type: String })
|
|
196
233
|
], WebsocketAction.prototype, "methodName", 2);
|
|
197
234
|
__decorateClass([
|
|
198
|
-
(0,
|
|
235
|
+
(0, import_swagger5.ApiProperty)({ type: Object })
|
|
199
236
|
], WebsocketAction.prototype, "data", 2);
|
|
200
237
|
var Button = class {
|
|
201
238
|
};
|
|
202
239
|
__decorateClass([
|
|
203
|
-
(0,
|
|
240
|
+
(0, import_swagger5.ApiProperty)({ type: String })
|
|
204
241
|
], Button.prototype, "bdAddr", 2);
|
|
205
242
|
__decorateClass([
|
|
206
|
-
(0,
|
|
243
|
+
(0, import_swagger5.ApiProperty)({ type: User, nullable: true })
|
|
207
244
|
], Button.prototype, "owner", 2);
|
|
208
245
|
__decorateClass([
|
|
209
|
-
(0,
|
|
246
|
+
(0, import_swagger5.ApiProperty)({ type: Number, nullable: true })
|
|
210
247
|
], Button.prototype, "batteryLevel", 2);
|
|
211
248
|
__decorateClass([
|
|
212
|
-
(0,
|
|
249
|
+
(0, import_swagger5.ApiProperty)({ type: Date, nullable: true })
|
|
213
250
|
], Button.prototype, "lastBatteryUpdate", 2);
|
|
214
251
|
__decorateClass([
|
|
215
|
-
(0,
|
|
252
|
+
(0, import_swagger5.ApiProperty)({ type: WebsocketAction, nullable: true })
|
|
216
253
|
], Button.prototype, "ButtonSingleClick", 2);
|
|
217
254
|
__decorateClass([
|
|
218
|
-
(0,
|
|
255
|
+
(0, import_swagger5.ApiProperty)({ type: WebsocketAction, nullable: true })
|
|
219
256
|
], Button.prototype, "ButtonDoubleClick", 2);
|
|
220
257
|
__decorateClass([
|
|
221
|
-
(0,
|
|
258
|
+
(0, import_swagger5.ApiProperty)({ type: WebsocketAction, nullable: true })
|
|
222
259
|
], Button.prototype, "ButtonHold", 2);
|
|
223
260
|
__decorateClass([
|
|
224
|
-
(0,
|
|
261
|
+
(0, import_swagger5.ApiProperty)({ type: Number, nullable: true })
|
|
225
262
|
], Button.prototype, "batteryState", 2);
|
|
226
263
|
|
|
227
264
|
// src/emulator.ts
|
|
228
|
-
var
|
|
265
|
+
var import_swagger6 = require("@nestjs/swagger");
|
|
229
266
|
var City = /* @__PURE__ */ ((City2) => {
|
|
230
267
|
City2["Waalwijk"] = "Waalwijk";
|
|
231
268
|
City2["Sprang"] = "Sprang-Capelle";
|
|
@@ -234,70 +271,70 @@ var City = /* @__PURE__ */ ((City2) => {
|
|
|
234
271
|
var EmulateFireDepartmentDto = class {
|
|
235
272
|
};
|
|
236
273
|
__decorateClass([
|
|
237
|
-
(0,
|
|
274
|
+
(0, import_swagger6.ApiProperty)({ enum: City })
|
|
238
275
|
], EmulateFireDepartmentDto.prototype, "city", 2);
|
|
239
276
|
|
|
240
277
|
// src/jingle.ts
|
|
241
|
-
var
|
|
278
|
+
var import_swagger7 = require("@nestjs/swagger");
|
|
242
279
|
var Jingle = class {
|
|
243
280
|
};
|
|
244
281
|
__decorateClass([
|
|
245
|
-
(0,
|
|
282
|
+
(0, import_swagger7.ApiProperty)({ type: String, example: "internet-gekkies" })
|
|
246
283
|
], Jingle.prototype, "folder", 2);
|
|
247
284
|
__decorateClass([
|
|
248
|
-
(0,
|
|
285
|
+
(0, import_swagger7.ApiProperty)({ type: String, example: "mand.mp3" })
|
|
249
286
|
], Jingle.prototype, "file", 2);
|
|
250
287
|
__decorateClass([
|
|
251
|
-
(0,
|
|
288
|
+
(0, import_swagger7.ApiProperty)({ type: [String], examples: ["internet", "gekkies", "mand"] })
|
|
252
289
|
], Jingle.prototype, "keywords", 2);
|
|
253
290
|
__decorateClass([
|
|
254
|
-
(0,
|
|
291
|
+
(0, import_swagger7.ApiProperty)({ type: String, example: "1475909a5bbe100" })
|
|
255
292
|
], Jingle.prototype, "hash", 2);
|
|
256
293
|
__decorateClass([
|
|
257
|
-
(0,
|
|
294
|
+
(0, import_swagger7.ApiProperty)({ type: Number, example: 1599223250, description: "Timestamp in seconds" })
|
|
258
295
|
], Jingle.prototype, "mtime", 2);
|
|
259
296
|
var JingleFolder = class {
|
|
260
297
|
};
|
|
261
298
|
__decorateClass([
|
|
262
|
-
(0,
|
|
299
|
+
(0, import_swagger7.ApiProperty)({ type: String, example: "internet-gekkies" })
|
|
263
300
|
], JingleFolder.prototype, "folder", 2);
|
|
264
301
|
__decorateClass([
|
|
265
|
-
(0,
|
|
302
|
+
(0, import_swagger7.ApiProperty)({ type: [Jingle] })
|
|
266
303
|
], JingleFolder.prototype, "jingles", 2);
|
|
267
|
-
var PlayJingleDto = class extends (0,
|
|
304
|
+
var PlayJingleDto = class extends (0, import_swagger7.PickType)(Jingle, ["folder", "file"]) {
|
|
268
305
|
};
|
|
269
306
|
var BigBrotherItem = class {
|
|
270
307
|
};
|
|
271
308
|
__decorateClass([
|
|
272
|
-
(0,
|
|
309
|
+
(0, import_swagger7.ApiProperty)({ type: String, example: "frank@maxserv.com", description: "User's email" })
|
|
273
310
|
], BigBrotherItem.prototype, "user", 2);
|
|
274
311
|
__decorateClass([
|
|
275
|
-
(0,
|
|
312
|
+
(0, import_swagger7.ApiProperty)({ type: Number, example: 1679694523189, description: "Timestamp in milliseconds" })
|
|
276
313
|
], BigBrotherItem.prototype, "time", 2);
|
|
277
314
|
|
|
278
315
|
// src/k8s.ts
|
|
279
|
-
var
|
|
316
|
+
var import_swagger8 = require("@nestjs/swagger");
|
|
280
317
|
var Pod = class {
|
|
281
318
|
};
|
|
282
319
|
__decorateClass([
|
|
283
|
-
(0,
|
|
320
|
+
(0, import_swagger8.ApiProperty)({ type: String })
|
|
284
321
|
], Pod.prototype, "app", 2);
|
|
285
322
|
__decorateClass([
|
|
286
|
-
(0,
|
|
323
|
+
(0, import_swagger8.ApiProperty)({ type: String })
|
|
287
324
|
], Pod.prototype, "name", 2);
|
|
288
325
|
__decorateClass([
|
|
289
|
-
(0,
|
|
326
|
+
(0, import_swagger8.ApiProperty)({ type: String })
|
|
290
327
|
], Pod.prototype, "status", 2);
|
|
291
328
|
__decorateClass([
|
|
292
|
-
(0,
|
|
329
|
+
(0, import_swagger8.ApiProperty)({ type: Number })
|
|
293
330
|
], Pod.prototype, "restarts", 2);
|
|
294
331
|
__decorateClass([
|
|
295
|
-
(0,
|
|
332
|
+
(0, import_swagger8.ApiProperty)({ type: Number })
|
|
296
333
|
], Pod.prototype, "cpu", 2);
|
|
297
334
|
__decorateClass([
|
|
298
|
-
(0,
|
|
335
|
+
(0, import_swagger8.ApiProperty)({ type: Number })
|
|
299
336
|
], Pod.prototype, "memory", 2);
|
|
300
|
-
var DeletePodDto = class extends (0,
|
|
337
|
+
var DeletePodDto = class extends (0, import_swagger8.PickType)(Pod, ["name"]) {
|
|
301
338
|
};
|
|
302
339
|
|
|
303
340
|
// src/index.ts
|
|
@@ -319,6 +356,7 @@ var P2000Payload = class {
|
|
|
319
356
|
PlayJingleDto,
|
|
320
357
|
Pod,
|
|
321
358
|
RemoveUserDto,
|
|
359
|
+
SetChangelogIdDto,
|
|
322
360
|
SetWindowStateDto,
|
|
323
361
|
ToggleAbleUserPropertyEnum,
|
|
324
362
|
ToggleBoolDto,
|
package/package.json
CHANGED
package/src/session.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
|
+
|
|
3
|
+
export class Session {
|
|
4
|
+
@ApiProperty({ type: String, example: '1234567890abcdef', description: 'Session ID' })
|
|
5
|
+
id: string;
|
|
6
|
+
|
|
7
|
+
@ApiProperty({ type: String, example: 'frank@maxserv.com', description: "User's email" })
|
|
8
|
+
email: string;
|
|
9
|
+
|
|
10
|
+
@ApiProperty({
|
|
11
|
+
type: Number,
|
|
12
|
+
example: 5,
|
|
13
|
+
description: 'Current number of the token. Updates when the refresh token is renewed.',
|
|
14
|
+
default: 0,
|
|
15
|
+
})
|
|
16
|
+
lastTokenNumber: number;
|
|
17
|
+
|
|
18
|
+
@ApiProperty({
|
|
19
|
+
type: Date,
|
|
20
|
+
example: '2021-01-01T00:00:00.000Z',
|
|
21
|
+
description: 'Timestamp of the last time the session was used',
|
|
22
|
+
})
|
|
23
|
+
lastUsed: Date;
|
|
24
|
+
|
|
25
|
+
@ApiProperty({ type: String, example: 'Chrome on Windows', description: 'Name of the session' })
|
|
26
|
+
name: string;
|
|
27
|
+
}
|
package/src/user.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { IsEmail } from 'class-validator';
|
|
|
3
3
|
import { Button } from './button';
|
|
4
4
|
import { WindowState } from './application';
|
|
5
5
|
import { DbAuthenticator } from './authenticator';
|
|
6
|
+
import { Session } from './session';
|
|
6
7
|
|
|
7
8
|
export class User {
|
|
8
9
|
@ApiProperty({ type: String })
|
|
@@ -38,6 +39,9 @@ export class User {
|
|
|
38
39
|
lastSeenChangelogId: string;
|
|
39
40
|
|
|
40
41
|
authenticators: DbAuthenticator[];
|
|
42
|
+
|
|
43
|
+
@ApiProperty({ type: () => [Session] })
|
|
44
|
+
sessions: Session[];
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
export enum ToggleAbleUserPropertyEnum {
|
|
@@ -62,6 +66,8 @@ export class RemoveUserDto extends PickType(User, ['id'] as const) {}
|
|
|
62
66
|
|
|
63
67
|
export class SetWindowStateDto extends PickType(User, ['windowState'] as const) {}
|
|
64
68
|
|
|
69
|
+
export class SetChangelogIdDto extends PickType(User, ['lastSeenChangelogId'] as const) {}
|
|
70
|
+
|
|
65
71
|
export class ToggleBoolDto {
|
|
66
72
|
@ApiProperty({
|
|
67
73
|
type: String,
|