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