@tmdjr/coding-labs-contracts 0.0.5 → 0.0.7
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/coding-labs.types.d.ts +392 -33
- package/dist/index.d.ts +3 -0
- package/dist/models/HandsOnLabEmbedMongo.d.ts +11 -1
- package/dist/models/HandsOnLabMongo.d.ts +20 -1
- package/dist/models/HandsOnLabVersionMongo.d.ts +22 -1
- package/dist/models/LabTestCaseDto.d.ts +2 -2
- package/dist/models/PublishVersionDto.d.ts +1 -0
- package/dist/models/PublishedLabDto.d.ts +14 -0
- package/dist/models/PublishedLabDto.js +1 -0
- package/dist/models/TestResultDto.d.ts +9 -0
- package/dist/models/TestResultDto.js +1 -0
- package/dist/models/UpdateDraftVersionDto.d.ts +4 -0
- package/dist/models/UpdateLabDto.d.ts +0 -3
- package/dist/models/VerificationDto.d.ts +9 -0
- package/dist/models/VerificationDto.js +1 -0
- package/package.json +1 -1
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
* Do not make direct changes to the file.
|
|
4
4
|
*/
|
|
5
5
|
export interface paths {
|
|
6
|
+
"/published-labs/{labId}": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
get: operations["PublishedLabsController_get"];
|
|
14
|
+
put?: never;
|
|
15
|
+
post?: never;
|
|
16
|
+
delete?: never;
|
|
17
|
+
options?: never;
|
|
18
|
+
head?: never;
|
|
19
|
+
patch?: never;
|
|
20
|
+
trace?: never;
|
|
21
|
+
};
|
|
6
22
|
"/labs": {
|
|
7
23
|
parameters: {
|
|
8
24
|
query?: never;
|
|
@@ -83,6 +99,22 @@ export interface paths {
|
|
|
83
99
|
patch: operations["LabVersionsController_patchDraft"];
|
|
84
100
|
trace?: never;
|
|
85
101
|
};
|
|
102
|
+
"/labs/{labId}/versions/{versionId}/verify": {
|
|
103
|
+
parameters: {
|
|
104
|
+
query?: never;
|
|
105
|
+
header?: never;
|
|
106
|
+
path?: never;
|
|
107
|
+
cookie?: never;
|
|
108
|
+
};
|
|
109
|
+
get?: never;
|
|
110
|
+
put?: never;
|
|
111
|
+
post: operations["LabVersionsController_verify"];
|
|
112
|
+
delete?: never;
|
|
113
|
+
options?: never;
|
|
114
|
+
head?: never;
|
|
115
|
+
patch?: never;
|
|
116
|
+
trace?: never;
|
|
117
|
+
};
|
|
86
118
|
"/labs/{labId}/versions/{versionId}/publish": {
|
|
87
119
|
parameters: {
|
|
88
120
|
query?: never;
|
|
@@ -135,6 +167,45 @@ export interface paths {
|
|
|
135
167
|
export type webhooks = Record<string, never>;
|
|
136
168
|
export interface components {
|
|
137
169
|
schemas: {
|
|
170
|
+
ComparatorDto: {
|
|
171
|
+
/** @enum {string} */
|
|
172
|
+
kind: "deepEqual" | "strictEqual" | "numberTolerance" | "stringNormalized" | "custom";
|
|
173
|
+
tolerance?: number;
|
|
174
|
+
normalizeWhitespace?: boolean;
|
|
175
|
+
ignoreCase?: boolean;
|
|
176
|
+
customComparatorId?: string;
|
|
177
|
+
};
|
|
178
|
+
LabTestCaseDto: {
|
|
179
|
+
_id?: string;
|
|
180
|
+
name: string;
|
|
181
|
+
/** @enum {string} */
|
|
182
|
+
kind: "io" | "unit";
|
|
183
|
+
input?: (string | number | boolean | unknown[] | {
|
|
184
|
+
[key: string]: unknown;
|
|
185
|
+
}) | null;
|
|
186
|
+
expected?: (string | number | boolean | unknown[] | {
|
|
187
|
+
[key: string]: unknown;
|
|
188
|
+
}) | null;
|
|
189
|
+
comparator?: components["schemas"]["ComparatorDto"];
|
|
190
|
+
testCode?: string;
|
|
191
|
+
/** @enum {string} */
|
|
192
|
+
framework?: "jest" | "vitest";
|
|
193
|
+
};
|
|
194
|
+
PublishedLabDto: {
|
|
195
|
+
labId: string;
|
|
196
|
+
versionId: string;
|
|
197
|
+
versionNumber: number;
|
|
198
|
+
title: string;
|
|
199
|
+
/** @enum {string} */
|
|
200
|
+
difficulty?: "intro" | "easy" | "medium" | "hard";
|
|
201
|
+
/** @enum {string} */
|
|
202
|
+
language: "javascript" | "typescript";
|
|
203
|
+
promptMarkdown: string;
|
|
204
|
+
hints: string[];
|
|
205
|
+
starterCode: string;
|
|
206
|
+
sampleTests: components["schemas"]["LabTestCaseDto"][];
|
|
207
|
+
entryFnName?: string;
|
|
208
|
+
};
|
|
138
209
|
CreateLabDto: {
|
|
139
210
|
workshopId: string;
|
|
140
211
|
workshopDocumentGroupId?: string;
|
|
@@ -154,9 +225,29 @@ export interface components {
|
|
|
154
225
|
createdBy: string;
|
|
155
226
|
updatedBy?: string;
|
|
156
227
|
};
|
|
157
|
-
HandsOnLabMongo:
|
|
228
|
+
HandsOnLabMongo: {
|
|
229
|
+
_id: string;
|
|
230
|
+
workshopId: string;
|
|
231
|
+
workshopDocumentGroupId?: string;
|
|
232
|
+
slug: string;
|
|
233
|
+
title: string;
|
|
234
|
+
summary?: string;
|
|
235
|
+
tags: string[];
|
|
236
|
+
/** @enum {string} */
|
|
237
|
+
difficulty?: "intro" | "easy" | "medium" | "hard";
|
|
238
|
+
estimatedMinutes?: number;
|
|
239
|
+
/** @enum {string} */
|
|
240
|
+
status: "draft" | "published" | "archived";
|
|
241
|
+
currentDraftVersionId?: string;
|
|
242
|
+
latestPublishedVersionId?: string;
|
|
243
|
+
createdAt: string;
|
|
244
|
+
createdBy: string;
|
|
245
|
+
updatedAt: string;
|
|
246
|
+
updatedBy: string;
|
|
247
|
+
archivedAt?: string;
|
|
248
|
+
archivedBy?: string;
|
|
249
|
+
};
|
|
158
250
|
UpdateLabDto: {
|
|
159
|
-
workshopId?: string;
|
|
160
251
|
workshopDocumentGroupId?: string;
|
|
161
252
|
slug?: string;
|
|
162
253
|
title?: string;
|
|
@@ -166,38 +257,12 @@ export interface components {
|
|
|
166
257
|
/** @enum {string} */
|
|
167
258
|
difficulty?: "intro" | "easy" | "medium" | "hard";
|
|
168
259
|
estimatedMinutes?: number;
|
|
169
|
-
/**
|
|
170
|
-
* @default draft
|
|
171
|
-
* @enum {string}
|
|
172
|
-
*/
|
|
173
|
-
status: "draft" | "published" | "archived";
|
|
174
|
-
createdBy?: string;
|
|
175
260
|
updatedBy?: string;
|
|
176
261
|
};
|
|
177
262
|
ReferenceSolutionDto: {
|
|
178
263
|
code: string;
|
|
179
264
|
notesMarkdown?: string;
|
|
180
265
|
};
|
|
181
|
-
ComparatorDto: {
|
|
182
|
-
/** @enum {string} */
|
|
183
|
-
kind: "deepEqual" | "strictEqual" | "numberTolerance" | "stringNormalized" | "custom";
|
|
184
|
-
tolerance?: number;
|
|
185
|
-
normalizeWhitespace?: boolean;
|
|
186
|
-
ignoreCase?: boolean;
|
|
187
|
-
customComparatorId?: string;
|
|
188
|
-
};
|
|
189
|
-
LabTestCaseDto: {
|
|
190
|
-
_id?: string;
|
|
191
|
-
name: string;
|
|
192
|
-
/** @enum {string} */
|
|
193
|
-
kind: "io" | "unit";
|
|
194
|
-
input?: Record<string, never>;
|
|
195
|
-
expected?: Record<string, never>;
|
|
196
|
-
comparator?: components["schemas"]["ComparatorDto"];
|
|
197
|
-
testCode?: string;
|
|
198
|
-
/** @enum {string} */
|
|
199
|
-
framework?: "jest" | "vitest";
|
|
200
|
-
};
|
|
201
266
|
LabRunnerConfigDto: {
|
|
202
267
|
timeoutMs: number;
|
|
203
268
|
memoryMb?: number;
|
|
@@ -217,7 +282,26 @@ export interface components {
|
|
|
217
282
|
contentHash?: string;
|
|
218
283
|
createdBy: string;
|
|
219
284
|
};
|
|
220
|
-
HandsOnLabVersionMongo:
|
|
285
|
+
HandsOnLabVersionMongo: {
|
|
286
|
+
_id: string;
|
|
287
|
+
labId: string;
|
|
288
|
+
versionNumber: number;
|
|
289
|
+
isDraft: boolean;
|
|
290
|
+
/** @enum {string} */
|
|
291
|
+
language: "typescript" | "javascript";
|
|
292
|
+
promptMarkdown: string;
|
|
293
|
+
hints?: string[];
|
|
294
|
+
starterCode: string;
|
|
295
|
+
referenceSolution?: components["schemas"]["ReferenceSolutionDto"];
|
|
296
|
+
sampleTests: components["schemas"]["LabTestCaseDto"][];
|
|
297
|
+
hiddenTests: components["schemas"]["LabTestCaseDto"][];
|
|
298
|
+
runner: components["schemas"]["LabRunnerConfigDto"];
|
|
299
|
+
publishedAt?: string;
|
|
300
|
+
publishedBy?: string;
|
|
301
|
+
createdAt: string;
|
|
302
|
+
createdBy: string;
|
|
303
|
+
contentHash?: string;
|
|
304
|
+
};
|
|
221
305
|
UpdateDraftVersionDto: {
|
|
222
306
|
/** @enum {string} */
|
|
223
307
|
language?: "typescript" | "javascript";
|
|
@@ -230,8 +314,34 @@ export interface components {
|
|
|
230
314
|
runner?: components["schemas"]["LabRunnerConfigDto"];
|
|
231
315
|
contentHash?: string;
|
|
232
316
|
createdBy?: string;
|
|
317
|
+
/** @description Hash from the loaded draft; prevents stale overwrites */
|
|
318
|
+
expectedContentHash: string;
|
|
319
|
+
};
|
|
320
|
+
TestResultDto: {
|
|
321
|
+
name: string;
|
|
322
|
+
/** @enum {string} */
|
|
323
|
+
suite: "sample" | "hidden";
|
|
324
|
+
/** @enum {string} */
|
|
325
|
+
status: "passed" | "failed" | "error" | "timeout";
|
|
326
|
+
durationMs: number;
|
|
327
|
+
actual?: (string | number | boolean | unknown[] | {
|
|
328
|
+
[key: string]: unknown;
|
|
329
|
+
}) | null;
|
|
330
|
+
expected?: (string | number | boolean | unknown[] | {
|
|
331
|
+
[key: string]: unknown;
|
|
332
|
+
}) | null;
|
|
333
|
+
message?: string;
|
|
334
|
+
};
|
|
335
|
+
VerificationDto: {
|
|
336
|
+
passed: boolean;
|
|
337
|
+
contentHash: string;
|
|
338
|
+
totalTests: number;
|
|
339
|
+
passedTests: number;
|
|
340
|
+
durationMs: number;
|
|
341
|
+
results: components["schemas"]["TestResultDto"][];
|
|
233
342
|
};
|
|
234
343
|
PublishVersionDto: {
|
|
344
|
+
expectedContentHash: string;
|
|
235
345
|
publishedBy: string;
|
|
236
346
|
notes?: string;
|
|
237
347
|
};
|
|
@@ -248,7 +358,17 @@ export interface components {
|
|
|
248
358
|
pinnedVersionId?: string;
|
|
249
359
|
createdBy: string;
|
|
250
360
|
};
|
|
251
|
-
HandsOnLabEmbedMongo:
|
|
361
|
+
HandsOnLabEmbedMongo: {
|
|
362
|
+
_id: string;
|
|
363
|
+
labId: string;
|
|
364
|
+
workshopId: string;
|
|
365
|
+
workshopDocumentId: string;
|
|
366
|
+
blockId: string;
|
|
367
|
+
blockType: string;
|
|
368
|
+
pinnedVersionId?: string;
|
|
369
|
+
createdAt: string;
|
|
370
|
+
createdBy: string;
|
|
371
|
+
};
|
|
252
372
|
};
|
|
253
373
|
responses: never;
|
|
254
374
|
parameters: never;
|
|
@@ -258,6 +378,29 @@ export interface components {
|
|
|
258
378
|
}
|
|
259
379
|
export type $defs = Record<string, never>;
|
|
260
380
|
export interface operations {
|
|
381
|
+
PublishedLabsController_get: {
|
|
382
|
+
parameters: {
|
|
383
|
+
query?: {
|
|
384
|
+
versionId?: string;
|
|
385
|
+
};
|
|
386
|
+
header?: never;
|
|
387
|
+
path: {
|
|
388
|
+
labId: string;
|
|
389
|
+
};
|
|
390
|
+
cookie?: never;
|
|
391
|
+
};
|
|
392
|
+
requestBody?: never;
|
|
393
|
+
responses: {
|
|
394
|
+
200: {
|
|
395
|
+
headers: {
|
|
396
|
+
[name: string]: unknown;
|
|
397
|
+
};
|
|
398
|
+
content: {
|
|
399
|
+
"application/json": components["schemas"]["PublishedLabDto"];
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
};
|
|
261
404
|
LabsController_findAll: {
|
|
262
405
|
parameters: {
|
|
263
406
|
query?: {
|
|
@@ -282,6 +425,20 @@ export interface operations {
|
|
|
282
425
|
"application/json": components["schemas"]["HandsOnLabMongo"][];
|
|
283
426
|
};
|
|
284
427
|
};
|
|
428
|
+
/** @description Valid platform authentication required */
|
|
429
|
+
401: {
|
|
430
|
+
headers: {
|
|
431
|
+
[name: string]: unknown;
|
|
432
|
+
};
|
|
433
|
+
content?: never;
|
|
434
|
+
};
|
|
435
|
+
/** @description Administrator role required */
|
|
436
|
+
403: {
|
|
437
|
+
headers: {
|
|
438
|
+
[name: string]: unknown;
|
|
439
|
+
};
|
|
440
|
+
content?: never;
|
|
441
|
+
};
|
|
285
442
|
};
|
|
286
443
|
};
|
|
287
444
|
LabsController_create: {
|
|
@@ -305,6 +462,20 @@ export interface operations {
|
|
|
305
462
|
"application/json": components["schemas"]["HandsOnLabMongo"];
|
|
306
463
|
};
|
|
307
464
|
};
|
|
465
|
+
/** @description Valid platform authentication required */
|
|
466
|
+
401: {
|
|
467
|
+
headers: {
|
|
468
|
+
[name: string]: unknown;
|
|
469
|
+
};
|
|
470
|
+
content?: never;
|
|
471
|
+
};
|
|
472
|
+
/** @description Administrator role required */
|
|
473
|
+
403: {
|
|
474
|
+
headers: {
|
|
475
|
+
[name: string]: unknown;
|
|
476
|
+
};
|
|
477
|
+
content?: never;
|
|
478
|
+
};
|
|
308
479
|
};
|
|
309
480
|
};
|
|
310
481
|
LabsController_findOne: {
|
|
@@ -326,13 +497,25 @@ export interface operations {
|
|
|
326
497
|
"application/json": components["schemas"]["HandsOnLabMongo"];
|
|
327
498
|
};
|
|
328
499
|
};
|
|
500
|
+
/** @description Valid platform authentication required */
|
|
501
|
+
401: {
|
|
502
|
+
headers: {
|
|
503
|
+
[name: string]: unknown;
|
|
504
|
+
};
|
|
505
|
+
content?: never;
|
|
506
|
+
};
|
|
507
|
+
/** @description Administrator role required */
|
|
508
|
+
403: {
|
|
509
|
+
headers: {
|
|
510
|
+
[name: string]: unknown;
|
|
511
|
+
};
|
|
512
|
+
content?: never;
|
|
513
|
+
};
|
|
329
514
|
};
|
|
330
515
|
};
|
|
331
516
|
LabsController_remove: {
|
|
332
517
|
parameters: {
|
|
333
|
-
query
|
|
334
|
-
archivedBy: string;
|
|
335
|
-
};
|
|
518
|
+
query?: never;
|
|
336
519
|
header?: never;
|
|
337
520
|
path: {
|
|
338
521
|
labId: string;
|
|
@@ -347,6 +530,20 @@ export interface operations {
|
|
|
347
530
|
};
|
|
348
531
|
content?: never;
|
|
349
532
|
};
|
|
533
|
+
/** @description Valid platform authentication required */
|
|
534
|
+
401: {
|
|
535
|
+
headers: {
|
|
536
|
+
[name: string]: unknown;
|
|
537
|
+
};
|
|
538
|
+
content?: never;
|
|
539
|
+
};
|
|
540
|
+
/** @description Administrator role required */
|
|
541
|
+
403: {
|
|
542
|
+
headers: {
|
|
543
|
+
[name: string]: unknown;
|
|
544
|
+
};
|
|
545
|
+
content?: never;
|
|
546
|
+
};
|
|
350
547
|
};
|
|
351
548
|
};
|
|
352
549
|
LabsController_update: {
|
|
@@ -372,6 +569,20 @@ export interface operations {
|
|
|
372
569
|
"application/json": components["schemas"]["HandsOnLabMongo"];
|
|
373
570
|
};
|
|
374
571
|
};
|
|
572
|
+
/** @description Valid platform authentication required */
|
|
573
|
+
401: {
|
|
574
|
+
headers: {
|
|
575
|
+
[name: string]: unknown;
|
|
576
|
+
};
|
|
577
|
+
content?: never;
|
|
578
|
+
};
|
|
579
|
+
/** @description Administrator role required */
|
|
580
|
+
403: {
|
|
581
|
+
headers: {
|
|
582
|
+
[name: string]: unknown;
|
|
583
|
+
};
|
|
584
|
+
content?: never;
|
|
585
|
+
};
|
|
375
586
|
};
|
|
376
587
|
};
|
|
377
588
|
LabVersionsController_createDraft: {
|
|
@@ -397,6 +608,20 @@ export interface operations {
|
|
|
397
608
|
"application/json": components["schemas"]["HandsOnLabVersionMongo"];
|
|
398
609
|
};
|
|
399
610
|
};
|
|
611
|
+
/** @description Valid platform authentication required */
|
|
612
|
+
401: {
|
|
613
|
+
headers: {
|
|
614
|
+
[name: string]: unknown;
|
|
615
|
+
};
|
|
616
|
+
content?: never;
|
|
617
|
+
};
|
|
618
|
+
/** @description Administrator role required */
|
|
619
|
+
403: {
|
|
620
|
+
headers: {
|
|
621
|
+
[name: string]: unknown;
|
|
622
|
+
};
|
|
623
|
+
content?: never;
|
|
624
|
+
};
|
|
400
625
|
};
|
|
401
626
|
};
|
|
402
627
|
LabVersionsController_findAll: {
|
|
@@ -418,6 +643,20 @@ export interface operations {
|
|
|
418
643
|
"application/json": components["schemas"]["HandsOnLabVersionMongo"][];
|
|
419
644
|
};
|
|
420
645
|
};
|
|
646
|
+
/** @description Valid platform authentication required */
|
|
647
|
+
401: {
|
|
648
|
+
headers: {
|
|
649
|
+
[name: string]: unknown;
|
|
650
|
+
};
|
|
651
|
+
content?: never;
|
|
652
|
+
};
|
|
653
|
+
/** @description Administrator role required */
|
|
654
|
+
403: {
|
|
655
|
+
headers: {
|
|
656
|
+
[name: string]: unknown;
|
|
657
|
+
};
|
|
658
|
+
content?: never;
|
|
659
|
+
};
|
|
421
660
|
};
|
|
422
661
|
};
|
|
423
662
|
LabVersionsController_findOne: {
|
|
@@ -440,6 +679,20 @@ export interface operations {
|
|
|
440
679
|
"application/json": components["schemas"]["HandsOnLabVersionMongo"];
|
|
441
680
|
};
|
|
442
681
|
};
|
|
682
|
+
/** @description Valid platform authentication required */
|
|
683
|
+
401: {
|
|
684
|
+
headers: {
|
|
685
|
+
[name: string]: unknown;
|
|
686
|
+
};
|
|
687
|
+
content?: never;
|
|
688
|
+
};
|
|
689
|
+
/** @description Administrator role required */
|
|
690
|
+
403: {
|
|
691
|
+
headers: {
|
|
692
|
+
[name: string]: unknown;
|
|
693
|
+
};
|
|
694
|
+
content?: never;
|
|
695
|
+
};
|
|
443
696
|
};
|
|
444
697
|
};
|
|
445
698
|
LabVersionsController_patchDraft: {
|
|
@@ -466,6 +719,56 @@ export interface operations {
|
|
|
466
719
|
"application/json": components["schemas"]["HandsOnLabVersionMongo"];
|
|
467
720
|
};
|
|
468
721
|
};
|
|
722
|
+
/** @description Valid platform authentication required */
|
|
723
|
+
401: {
|
|
724
|
+
headers: {
|
|
725
|
+
[name: string]: unknown;
|
|
726
|
+
};
|
|
727
|
+
content?: never;
|
|
728
|
+
};
|
|
729
|
+
/** @description Administrator role required */
|
|
730
|
+
403: {
|
|
731
|
+
headers: {
|
|
732
|
+
[name: string]: unknown;
|
|
733
|
+
};
|
|
734
|
+
content?: never;
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
LabVersionsController_verify: {
|
|
739
|
+
parameters: {
|
|
740
|
+
query?: never;
|
|
741
|
+
header?: never;
|
|
742
|
+
path: {
|
|
743
|
+
labId: string;
|
|
744
|
+
versionId: string;
|
|
745
|
+
};
|
|
746
|
+
cookie?: never;
|
|
747
|
+
};
|
|
748
|
+
requestBody?: never;
|
|
749
|
+
responses: {
|
|
750
|
+
200: {
|
|
751
|
+
headers: {
|
|
752
|
+
[name: string]: unknown;
|
|
753
|
+
};
|
|
754
|
+
content: {
|
|
755
|
+
"application/json": components["schemas"]["VerificationDto"];
|
|
756
|
+
};
|
|
757
|
+
};
|
|
758
|
+
/** @description Valid platform authentication required */
|
|
759
|
+
401: {
|
|
760
|
+
headers: {
|
|
761
|
+
[name: string]: unknown;
|
|
762
|
+
};
|
|
763
|
+
content?: never;
|
|
764
|
+
};
|
|
765
|
+
/** @description Administrator role required */
|
|
766
|
+
403: {
|
|
767
|
+
headers: {
|
|
768
|
+
[name: string]: unknown;
|
|
769
|
+
};
|
|
770
|
+
content?: never;
|
|
771
|
+
};
|
|
469
772
|
};
|
|
470
773
|
};
|
|
471
774
|
LabVersionsController_publish: {
|
|
@@ -492,6 +795,20 @@ export interface operations {
|
|
|
492
795
|
"application/json": components["schemas"]["HandsOnLabVersionMongo"];
|
|
493
796
|
};
|
|
494
797
|
};
|
|
798
|
+
/** @description Valid platform authentication required */
|
|
799
|
+
401: {
|
|
800
|
+
headers: {
|
|
801
|
+
[name: string]: unknown;
|
|
802
|
+
};
|
|
803
|
+
content?: never;
|
|
804
|
+
};
|
|
805
|
+
/** @description Administrator role required */
|
|
806
|
+
403: {
|
|
807
|
+
headers: {
|
|
808
|
+
[name: string]: unknown;
|
|
809
|
+
};
|
|
810
|
+
content?: never;
|
|
811
|
+
};
|
|
495
812
|
};
|
|
496
813
|
};
|
|
497
814
|
LabEmbedsController_findAll: {
|
|
@@ -515,6 +832,20 @@ export interface operations {
|
|
|
515
832
|
"application/json": components["schemas"]["HandsOnLabEmbedMongo"][];
|
|
516
833
|
};
|
|
517
834
|
};
|
|
835
|
+
/** @description Valid platform authentication required */
|
|
836
|
+
401: {
|
|
837
|
+
headers: {
|
|
838
|
+
[name: string]: unknown;
|
|
839
|
+
};
|
|
840
|
+
content?: never;
|
|
841
|
+
};
|
|
842
|
+
/** @description Administrator role required */
|
|
843
|
+
403: {
|
|
844
|
+
headers: {
|
|
845
|
+
[name: string]: unknown;
|
|
846
|
+
};
|
|
847
|
+
content?: never;
|
|
848
|
+
};
|
|
518
849
|
};
|
|
519
850
|
};
|
|
520
851
|
LabEmbedsController_create: {
|
|
@@ -538,6 +869,20 @@ export interface operations {
|
|
|
538
869
|
"application/json": components["schemas"]["HandsOnLabEmbedMongo"];
|
|
539
870
|
};
|
|
540
871
|
};
|
|
872
|
+
/** @description Valid platform authentication required */
|
|
873
|
+
401: {
|
|
874
|
+
headers: {
|
|
875
|
+
[name: string]: unknown;
|
|
876
|
+
};
|
|
877
|
+
content?: never;
|
|
878
|
+
};
|
|
879
|
+
/** @description Administrator role required */
|
|
880
|
+
403: {
|
|
881
|
+
headers: {
|
|
882
|
+
[name: string]: unknown;
|
|
883
|
+
};
|
|
884
|
+
content?: never;
|
|
885
|
+
};
|
|
541
886
|
};
|
|
542
887
|
};
|
|
543
888
|
LabEmbedsController_remove: {
|
|
@@ -557,6 +902,20 @@ export interface operations {
|
|
|
557
902
|
};
|
|
558
903
|
content?: never;
|
|
559
904
|
};
|
|
905
|
+
/** @description Valid platform authentication required */
|
|
906
|
+
401: {
|
|
907
|
+
headers: {
|
|
908
|
+
[name: string]: unknown;
|
|
909
|
+
};
|
|
910
|
+
content?: never;
|
|
911
|
+
};
|
|
912
|
+
/** @description Administrator role required */
|
|
913
|
+
403: {
|
|
914
|
+
headers: {
|
|
915
|
+
[name: string]: unknown;
|
|
916
|
+
};
|
|
917
|
+
content?: never;
|
|
918
|
+
};
|
|
560
919
|
};
|
|
561
920
|
};
|
|
562
921
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,10 @@ export type { HandsOnLabMongo } from './models/HandsOnLabMongo';
|
|
|
7
7
|
export type { HandsOnLabVersionMongo } from './models/HandsOnLabVersionMongo';
|
|
8
8
|
export type { LabRunnerConfigDto } from './models/LabRunnerConfigDto';
|
|
9
9
|
export type { LabTestCaseDto } from './models/LabTestCaseDto';
|
|
10
|
+
export type { PublishedLabDto } from './models/PublishedLabDto';
|
|
10
11
|
export type { PublishVersionDto } from './models/PublishVersionDto';
|
|
11
12
|
export type { ReferenceSolutionDto } from './models/ReferenceSolutionDto';
|
|
13
|
+
export type { TestResultDto } from './models/TestResultDto';
|
|
12
14
|
export type { UpdateDraftVersionDto } from './models/UpdateDraftVersionDto';
|
|
13
15
|
export type { UpdateLabDto } from './models/UpdateLabDto';
|
|
16
|
+
export type { VerificationDto } from './models/VerificationDto';
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
export type HandsOnLabEmbedMongo = {
|
|
1
|
+
export type HandsOnLabEmbedMongo = {
|
|
2
|
+
_id: string;
|
|
3
|
+
labId: string;
|
|
4
|
+
workshopId: string;
|
|
5
|
+
workshopDocumentId: string;
|
|
6
|
+
blockId: string;
|
|
7
|
+
blockType: string;
|
|
8
|
+
pinnedVersionId?: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
createdBy: string;
|
|
11
|
+
};
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
export type HandsOnLabMongo = {
|
|
1
|
+
export type HandsOnLabMongo = {
|
|
2
|
+
_id: string;
|
|
3
|
+
workshopId: string;
|
|
4
|
+
workshopDocumentGroupId?: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
title: string;
|
|
7
|
+
summary?: string;
|
|
8
|
+
tags: Array<string>;
|
|
9
|
+
difficulty?: 'intro' | 'easy' | 'medium' | 'hard';
|
|
10
|
+
estimatedMinutes?: number;
|
|
11
|
+
status: 'draft' | 'published' | 'archived';
|
|
12
|
+
currentDraftVersionId?: string;
|
|
13
|
+
latestPublishedVersionId?: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
createdBy: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
updatedBy: string;
|
|
18
|
+
archivedAt?: string;
|
|
19
|
+
archivedBy?: string;
|
|
20
|
+
};
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LabRunnerConfigDto } from './LabRunnerConfigDto';
|
|
2
|
+
import type { LabTestCaseDto } from './LabTestCaseDto';
|
|
3
|
+
import type { ReferenceSolutionDto } from './ReferenceSolutionDto';
|
|
4
|
+
export type HandsOnLabVersionMongo = {
|
|
5
|
+
_id: string;
|
|
6
|
+
labId: string;
|
|
7
|
+
versionNumber: number;
|
|
8
|
+
isDraft: boolean;
|
|
9
|
+
language: 'typescript' | 'javascript';
|
|
10
|
+
promptMarkdown: string;
|
|
11
|
+
hints?: Array<string>;
|
|
12
|
+
starterCode: string;
|
|
13
|
+
referenceSolution?: ReferenceSolutionDto;
|
|
14
|
+
sampleTests: Array<LabTestCaseDto>;
|
|
15
|
+
hiddenTests: Array<LabTestCaseDto>;
|
|
16
|
+
runner: LabRunnerConfigDto;
|
|
17
|
+
publishedAt?: string;
|
|
18
|
+
publishedBy?: string;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
createdBy: string;
|
|
21
|
+
contentHash?: string;
|
|
22
|
+
};
|
|
@@ -3,8 +3,8 @@ export type LabTestCaseDto = {
|
|
|
3
3
|
_id?: string;
|
|
4
4
|
name: string;
|
|
5
5
|
kind: 'io' | 'unit';
|
|
6
|
-
input?: Record<string, any
|
|
7
|
-
expected?: Record<string, any
|
|
6
|
+
input?: (string | number | boolean | Record<string, any>) | null;
|
|
7
|
+
expected?: (string | number | boolean | Record<string, any>) | null;
|
|
8
8
|
comparator?: ComparatorDto;
|
|
9
9
|
testCode?: string;
|
|
10
10
|
framework?: 'jest' | 'vitest';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LabTestCaseDto } from './LabTestCaseDto';
|
|
2
|
+
export type PublishedLabDto = {
|
|
3
|
+
labId: string;
|
|
4
|
+
versionId: string;
|
|
5
|
+
versionNumber: number;
|
|
6
|
+
title: string;
|
|
7
|
+
difficulty?: 'intro' | 'easy' | 'medium' | 'hard';
|
|
8
|
+
language: 'javascript' | 'typescript';
|
|
9
|
+
promptMarkdown: string;
|
|
10
|
+
hints: Array<string>;
|
|
11
|
+
starterCode: string;
|
|
12
|
+
sampleTests: Array<LabTestCaseDto>;
|
|
13
|
+
entryFnName?: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type TestResultDto = {
|
|
2
|
+
name: string;
|
|
3
|
+
suite: 'sample' | 'hidden';
|
|
4
|
+
status: 'passed' | 'failed' | 'error' | 'timeout';
|
|
5
|
+
durationMs: number;
|
|
6
|
+
actual?: (string | number | boolean | Record<string, any>) | null;
|
|
7
|
+
expected?: (string | number | boolean | Record<string, any>) | null;
|
|
8
|
+
message?: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export type UpdateLabDto = {
|
|
2
|
-
workshopId?: string;
|
|
3
2
|
workshopDocumentGroupId?: string;
|
|
4
3
|
slug?: string;
|
|
5
4
|
title?: string;
|
|
@@ -7,7 +6,5 @@ export type UpdateLabDto = {
|
|
|
7
6
|
tags?: Array<string>;
|
|
8
7
|
difficulty?: 'intro' | 'easy' | 'medium' | 'hard';
|
|
9
8
|
estimatedMinutes?: number;
|
|
10
|
-
status?: 'draft' | 'published' | 'archived';
|
|
11
|
-
createdBy?: string;
|
|
12
9
|
updatedBy?: string;
|
|
13
10
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|