tering-serieuze-types 1.16.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 +95 -48
- package/package.json +3 -2
- package/src/session.ts +27 -0
- package/src/user.ts +9 -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,46 +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);
|
|
181
|
+
__decorateClass([
|
|
182
|
+
(0, import_swagger4.ApiProperty)({ type: String, default: "" })
|
|
183
|
+
], User.prototype, "lastSeenChangelogId", 2);
|
|
184
|
+
__decorateClass([
|
|
185
|
+
(0, import_swagger4.ApiProperty)({ type: () => [Session] })
|
|
186
|
+
], User.prototype, "sessions", 2);
|
|
149
187
|
var ToggleAbleUserPropertyEnum = /* @__PURE__ */ ((ToggleAbleUserPropertyEnum2) => {
|
|
150
188
|
ToggleAbleUserPropertyEnum2["isAdmin"] = "isAdmin";
|
|
151
189
|
ToggleAbleUserPropertyEnum2["isBanned"] = "isBanned";
|
|
152
190
|
ToggleAbleUserPropertyEnum2["playJinglesLocal"] = "playJinglesLocal";
|
|
153
191
|
return ToggleAbleUserPropertyEnum2;
|
|
154
192
|
})(ToggleAbleUserPropertyEnum || {});
|
|
155
|
-
var ToggleableUserProperties = class extends (0,
|
|
193
|
+
var ToggleableUserProperties = class extends (0, import_swagger4.PickType)(User, [
|
|
156
194
|
"isAdmin" /* isAdmin */,
|
|
157
195
|
"isBanned" /* isBanned */,
|
|
158
196
|
"playJinglesLocal" /* playJinglesLocal */
|
|
@@ -162,67 +200,69 @@ var AddUserDto = class {
|
|
|
162
200
|
};
|
|
163
201
|
__decorateClass([
|
|
164
202
|
(0, import_class_validator.IsEmail)(),
|
|
165
|
-
(0,
|
|
203
|
+
(0, import_swagger4.ApiProperty)({ type: String, example: "info@example.com" })
|
|
166
204
|
], AddUserDto.prototype, "email", 2);
|
|
167
|
-
var RemoveUserDto = class extends (0,
|
|
205
|
+
var RemoveUserDto = class extends (0, import_swagger4.PickType)(User, ["id"]) {
|
|
168
206
|
};
|
|
169
|
-
var SetWindowStateDto = class extends (0,
|
|
207
|
+
var SetWindowStateDto = class extends (0, import_swagger4.PickType)(User, ["windowState"]) {
|
|
208
|
+
};
|
|
209
|
+
var SetChangelogIdDto = class extends (0, import_swagger4.PickType)(User, ["lastSeenChangelogId"]) {
|
|
170
210
|
};
|
|
171
211
|
var ToggleBoolDto = class {
|
|
172
212
|
};
|
|
173
213
|
__decorateClass([
|
|
174
|
-
(0,
|
|
214
|
+
(0, import_swagger4.ApiProperty)({
|
|
175
215
|
type: String,
|
|
176
216
|
nullable: true,
|
|
177
217
|
description: "User ID. When empty, the current user is used. Admin only param"
|
|
178
218
|
})
|
|
179
219
|
], ToggleBoolDto.prototype, "id", 2);
|
|
180
220
|
__decorateClass([
|
|
181
|
-
(0,
|
|
221
|
+
(0, import_swagger4.ApiProperty)({ enum: ToggleAbleUserPropertyEnum, description: "The property to toggle" })
|
|
182
222
|
], ToggleBoolDto.prototype, "field", 2);
|
|
183
223
|
|
|
184
224
|
// src/button.ts
|
|
185
|
-
var
|
|
225
|
+
var import_swagger5 = require("@nestjs/swagger");
|
|
186
226
|
var WebsocketAction = class {
|
|
187
227
|
};
|
|
188
228
|
__decorateClass([
|
|
189
|
-
(0,
|
|
229
|
+
(0, import_swagger5.ApiProperty)({ type: String })
|
|
190
230
|
], WebsocketAction.prototype, "serviceName", 2);
|
|
191
231
|
__decorateClass([
|
|
192
|
-
(0,
|
|
232
|
+
(0, import_swagger5.ApiProperty)({ type: String })
|
|
193
233
|
], WebsocketAction.prototype, "methodName", 2);
|
|
194
234
|
__decorateClass([
|
|
195
|
-
(0,
|
|
235
|
+
(0, import_swagger5.ApiProperty)({ type: Object })
|
|
196
236
|
], WebsocketAction.prototype, "data", 2);
|
|
197
237
|
var Button = class {
|
|
198
238
|
};
|
|
199
239
|
__decorateClass([
|
|
200
|
-
(0,
|
|
240
|
+
(0, import_swagger5.ApiProperty)({ type: String })
|
|
201
241
|
], Button.prototype, "bdAddr", 2);
|
|
202
242
|
__decorateClass([
|
|
203
|
-
(0,
|
|
243
|
+
(0, import_swagger5.ApiProperty)({ type: User, nullable: true })
|
|
204
244
|
], Button.prototype, "owner", 2);
|
|
205
245
|
__decorateClass([
|
|
206
|
-
(0,
|
|
246
|
+
(0, import_swagger5.ApiProperty)({ type: Number, nullable: true })
|
|
207
247
|
], Button.prototype, "batteryLevel", 2);
|
|
208
248
|
__decorateClass([
|
|
209
|
-
(0,
|
|
249
|
+
(0, import_swagger5.ApiProperty)({ type: Date, nullable: true })
|
|
210
250
|
], Button.prototype, "lastBatteryUpdate", 2);
|
|
211
251
|
__decorateClass([
|
|
212
|
-
(0,
|
|
252
|
+
(0, import_swagger5.ApiProperty)({ type: WebsocketAction, nullable: true })
|
|
213
253
|
], Button.prototype, "ButtonSingleClick", 2);
|
|
214
254
|
__decorateClass([
|
|
215
|
-
(0,
|
|
255
|
+
(0, import_swagger5.ApiProperty)({ type: WebsocketAction, nullable: true })
|
|
216
256
|
], Button.prototype, "ButtonDoubleClick", 2);
|
|
217
257
|
__decorateClass([
|
|
218
|
-
(0,
|
|
258
|
+
(0, import_swagger5.ApiProperty)({ type: WebsocketAction, nullable: true })
|
|
219
259
|
], Button.prototype, "ButtonHold", 2);
|
|
220
260
|
__decorateClass([
|
|
221
|
-
(0,
|
|
261
|
+
(0, import_swagger5.ApiProperty)({ type: Number, nullable: true })
|
|
222
262
|
], Button.prototype, "batteryState", 2);
|
|
223
263
|
|
|
224
264
|
// src/emulator.ts
|
|
225
|
-
var
|
|
265
|
+
var import_swagger6 = require("@nestjs/swagger");
|
|
226
266
|
var City = /* @__PURE__ */ ((City2) => {
|
|
227
267
|
City2["Waalwijk"] = "Waalwijk";
|
|
228
268
|
City2["Sprang"] = "Sprang-Capelle";
|
|
@@ -231,64 +271,70 @@ var City = /* @__PURE__ */ ((City2) => {
|
|
|
231
271
|
var EmulateFireDepartmentDto = class {
|
|
232
272
|
};
|
|
233
273
|
__decorateClass([
|
|
234
|
-
(0,
|
|
274
|
+
(0, import_swagger6.ApiProperty)({ enum: City })
|
|
235
275
|
], EmulateFireDepartmentDto.prototype, "city", 2);
|
|
236
276
|
|
|
237
277
|
// src/jingle.ts
|
|
238
|
-
var
|
|
278
|
+
var import_swagger7 = require("@nestjs/swagger");
|
|
239
279
|
var Jingle = class {
|
|
240
280
|
};
|
|
241
281
|
__decorateClass([
|
|
242
|
-
(0,
|
|
282
|
+
(0, import_swagger7.ApiProperty)({ type: String, example: "internet-gekkies" })
|
|
243
283
|
], Jingle.prototype, "folder", 2);
|
|
244
284
|
__decorateClass([
|
|
245
|
-
(0,
|
|
285
|
+
(0, import_swagger7.ApiProperty)({ type: String, example: "mand.mp3" })
|
|
246
286
|
], Jingle.prototype, "file", 2);
|
|
247
287
|
__decorateClass([
|
|
248
|
-
(0,
|
|
288
|
+
(0, import_swagger7.ApiProperty)({ type: [String], examples: ["internet", "gekkies", "mand"] })
|
|
249
289
|
], Jingle.prototype, "keywords", 2);
|
|
250
290
|
__decorateClass([
|
|
251
|
-
(0,
|
|
291
|
+
(0, import_swagger7.ApiProperty)({ type: String, example: "1475909a5bbe100" })
|
|
252
292
|
], Jingle.prototype, "hash", 2);
|
|
253
293
|
__decorateClass([
|
|
254
|
-
(0,
|
|
294
|
+
(0, import_swagger7.ApiProperty)({ type: Number, example: 1599223250, description: "Timestamp in seconds" })
|
|
255
295
|
], Jingle.prototype, "mtime", 2);
|
|
256
296
|
var JingleFolder = class {
|
|
257
297
|
};
|
|
258
298
|
__decorateClass([
|
|
259
|
-
(0,
|
|
299
|
+
(0, import_swagger7.ApiProperty)({ type: String, example: "internet-gekkies" })
|
|
260
300
|
], JingleFolder.prototype, "folder", 2);
|
|
261
301
|
__decorateClass([
|
|
262
|
-
(0,
|
|
302
|
+
(0, import_swagger7.ApiProperty)({ type: [Jingle] })
|
|
263
303
|
], JingleFolder.prototype, "jingles", 2);
|
|
264
|
-
var PlayJingleDto = class extends (0,
|
|
304
|
+
var PlayJingleDto = class extends (0, import_swagger7.PickType)(Jingle, ["folder", "file"]) {
|
|
265
305
|
};
|
|
266
306
|
var BigBrotherItem = class {
|
|
267
307
|
};
|
|
268
308
|
__decorateClass([
|
|
269
|
-
(0,
|
|
309
|
+
(0, import_swagger7.ApiProperty)({ type: String, example: "frank@maxserv.com", description: "User's email" })
|
|
270
310
|
], BigBrotherItem.prototype, "user", 2);
|
|
271
311
|
__decorateClass([
|
|
272
|
-
(0,
|
|
312
|
+
(0, import_swagger7.ApiProperty)({ type: Number, example: 1679694523189, description: "Timestamp in milliseconds" })
|
|
273
313
|
], BigBrotherItem.prototype, "time", 2);
|
|
274
314
|
|
|
275
315
|
// src/k8s.ts
|
|
276
|
-
var
|
|
316
|
+
var import_swagger8 = require("@nestjs/swagger");
|
|
277
317
|
var Pod = class {
|
|
278
318
|
};
|
|
279
319
|
__decorateClass([
|
|
280
|
-
(0,
|
|
320
|
+
(0, import_swagger8.ApiProperty)({ type: String })
|
|
281
321
|
], Pod.prototype, "app", 2);
|
|
282
322
|
__decorateClass([
|
|
283
|
-
(0,
|
|
323
|
+
(0, import_swagger8.ApiProperty)({ type: String })
|
|
284
324
|
], Pod.prototype, "name", 2);
|
|
285
325
|
__decorateClass([
|
|
286
|
-
(0,
|
|
326
|
+
(0, import_swagger8.ApiProperty)({ type: String })
|
|
287
327
|
], Pod.prototype, "status", 2);
|
|
288
328
|
__decorateClass([
|
|
289
|
-
(0,
|
|
329
|
+
(0, import_swagger8.ApiProperty)({ type: Number })
|
|
290
330
|
], Pod.prototype, "restarts", 2);
|
|
291
|
-
|
|
331
|
+
__decorateClass([
|
|
332
|
+
(0, import_swagger8.ApiProperty)({ type: Number })
|
|
333
|
+
], Pod.prototype, "cpu", 2);
|
|
334
|
+
__decorateClass([
|
|
335
|
+
(0, import_swagger8.ApiProperty)({ type: Number })
|
|
336
|
+
], Pod.prototype, "memory", 2);
|
|
337
|
+
var DeletePodDto = class extends (0, import_swagger8.PickType)(Pod, ["name"]) {
|
|
292
338
|
};
|
|
293
339
|
|
|
294
340
|
// src/index.ts
|
|
@@ -310,6 +356,7 @@ var P2000Payload = class {
|
|
|
310
356
|
PlayJingleDto,
|
|
311
357
|
Pod,
|
|
312
358
|
RemoveUserDto,
|
|
359
|
+
SetChangelogIdDto,
|
|
313
360
|
SetWindowStateDto,
|
|
314
361
|
ToggleAbleUserPropertyEnum,
|
|
315
362
|
ToggleBoolDto,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tering-serieuze-types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Tering serieuze types",
|
|
5
5
|
"author": "Frank",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"url": "https://gitlab.com/tering-serieuze-shit/tering-serieuze-types.git"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "esbuild src/index.ts --bundle --platform=node --outfile=dist/index.js --packages=external"
|
|
11
|
+
"build": "esbuild src/index.ts --bundle --platform=node --outfile=dist/index.js --packages=external",
|
|
12
|
+
"version": "npm run build && git add -A dist"
|
|
12
13
|
},
|
|
13
14
|
"main": "dist/index.js",
|
|
14
15
|
"types": "index.d.ts",
|
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 })
|
|
@@ -34,7 +35,13 @@ export class User {
|
|
|
34
35
|
@ApiProperty({ type: () => [Button] })
|
|
35
36
|
buttons: Button[];
|
|
36
37
|
|
|
38
|
+
@ApiProperty({ type: String, default: '' })
|
|
39
|
+
lastSeenChangelogId: string;
|
|
40
|
+
|
|
37
41
|
authenticators: DbAuthenticator[];
|
|
42
|
+
|
|
43
|
+
@ApiProperty({ type: () => [Session] })
|
|
44
|
+
sessions: Session[];
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
export enum ToggleAbleUserPropertyEnum {
|
|
@@ -59,6 +66,8 @@ export class RemoveUserDto extends PickType(User, ['id'] as const) {}
|
|
|
59
66
|
|
|
60
67
|
export class SetWindowStateDto extends PickType(User, ['windowState'] as const) {}
|
|
61
68
|
|
|
69
|
+
export class SetChangelogIdDto extends PickType(User, ['lastSeenChangelogId'] as const) {}
|
|
70
|
+
|
|
62
71
|
export class ToggleBoolDto {
|
|
63
72
|
@ApiProperty({
|
|
64
73
|
type: String,
|