@tmdjr/coding-labs-contracts 0.0.8 → 0.0.10

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.
@@ -3,6 +3,22 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  export interface paths {
6
+ "/lab-preflight": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ get?: never;
14
+ put?: never;
15
+ post: operations["LabPreflightController_verify"];
16
+ delete?: never;
17
+ options?: never;
18
+ head?: never;
19
+ patch?: never;
20
+ trace?: never;
21
+ };
6
22
  "/published-labs/{labId}": {
7
23
  parameters: {
8
24
  query?: never;
@@ -199,6 +215,10 @@ export interface paths {
199
215
  export type webhooks = Record<string, never>;
200
216
  export interface components {
201
217
  schemas: {
218
+ ReferenceSolutionDto: {
219
+ code: string;
220
+ notesMarkdown?: string;
221
+ };
202
222
  ComparatorDto: {
203
223
  /** @enum {string} */
204
224
  kind: "deepEqual" | "strictEqual" | "numberTolerance" | "stringNormalized" | "custom";
@@ -223,6 +243,46 @@ export interface components {
223
243
  /** @enum {string} */
224
244
  framework?: "jest" | "vitest";
225
245
  };
246
+ LabRunnerConfigDto: {
247
+ timeoutMs: number;
248
+ memoryMb?: number;
249
+ entryFnName?: string;
250
+ nodeVersion?: string;
251
+ };
252
+ PreflightLabDto: {
253
+ /** @enum {string} */
254
+ language?: "typescript" | "javascript";
255
+ promptMarkdown?: string;
256
+ hints?: string[];
257
+ starterCode?: string;
258
+ referenceSolution?: components["schemas"]["ReferenceSolutionDto"];
259
+ sampleTests?: components["schemas"]["LabTestCaseDto"][];
260
+ hiddenTests?: components["schemas"]["LabTestCaseDto"][];
261
+ runner?: components["schemas"]["LabRunnerConfigDto"];
262
+ };
263
+ TestResultDto: {
264
+ name: string;
265
+ /** @enum {string} */
266
+ suite: "sample" | "hidden";
267
+ /** @enum {string} */
268
+ status: "passed" | "failed" | "error" | "timeout";
269
+ durationMs: number;
270
+ actual?: (string | number | boolean | unknown[] | {
271
+ [key: string]: unknown;
272
+ }) | null;
273
+ expected?: (string | number | boolean | unknown[] | {
274
+ [key: string]: unknown;
275
+ }) | null;
276
+ message?: string;
277
+ };
278
+ VerificationDto: {
279
+ passed: boolean;
280
+ contentHash: string;
281
+ totalTests: number;
282
+ passedTests: number;
283
+ durationMs: number;
284
+ results: components["schemas"]["TestResultDto"][];
285
+ };
226
286
  PublishedLabDto: {
227
287
  labId: string;
228
288
  versionId: string;
@@ -252,21 +312,6 @@ export interface components {
252
312
  versionId: string;
253
313
  code: string;
254
314
  };
255
- TestResultDto: {
256
- name: string;
257
- /** @enum {string} */
258
- suite: "sample" | "hidden";
259
- /** @enum {string} */
260
- status: "passed" | "failed" | "error" | "timeout";
261
- durationMs: number;
262
- actual?: (string | number | boolean | unknown[] | {
263
- [key: string]: unknown;
264
- }) | null;
265
- expected?: (string | number | boolean | unknown[] | {
266
- [key: string]: unknown;
267
- }) | null;
268
- message?: string;
269
- };
270
315
  LabGradeDto: {
271
316
  passed: boolean;
272
317
  totalTests: number;
@@ -327,16 +372,6 @@ export interface components {
327
372
  estimatedMinutes?: number;
328
373
  updatedBy?: string;
329
374
  };
330
- ReferenceSolutionDto: {
331
- code: string;
332
- notesMarkdown?: string;
333
- };
334
- LabRunnerConfigDto: {
335
- timeoutMs: number;
336
- memoryMb?: number;
337
- entryFnName?: string;
338
- nodeVersion?: string;
339
- };
340
375
  CreateDraftVersionDto: {
341
376
  /** @enum {string} */
342
377
  language?: "typescript" | "javascript";
@@ -385,14 +420,6 @@ export interface components {
385
420
  /** @description Hash from the loaded draft; prevents stale overwrites */
386
421
  expectedContentHash: string;
387
422
  };
388
- VerificationDto: {
389
- passed: boolean;
390
- contentHash: string;
391
- totalTests: number;
392
- passedTests: number;
393
- durationMs: number;
394
- results: components["schemas"]["TestResultDto"][];
395
- };
396
423
  PublishVersionDto: {
397
424
  expectedContentHash: string;
398
425
  publishedBy: string;
@@ -431,6 +458,65 @@ export interface components {
431
458
  }
432
459
  export type $defs = Record<string, never>;
433
460
  export interface operations {
461
+ LabPreflightController_verify: {
462
+ parameters: {
463
+ query?: never;
464
+ header?: never;
465
+ path?: never;
466
+ cookie?: never;
467
+ };
468
+ requestBody: {
469
+ content: {
470
+ "application/json": components["schemas"]["PreflightLabDto"];
471
+ };
472
+ };
473
+ responses: {
474
+ /** @description Isolated verification without creating or changing a lab */
475
+ 200: {
476
+ headers: {
477
+ [name: string]: unknown;
478
+ };
479
+ content: {
480
+ "application/json": components["schemas"]["VerificationDto"];
481
+ };
482
+ };
483
+ /** @description Incomplete or unsupported challenge content */
484
+ 400: {
485
+ headers: {
486
+ [name: string]: unknown;
487
+ };
488
+ content?: never;
489
+ };
490
+ /** @description Valid platform authentication required */
491
+ 401: {
492
+ headers: {
493
+ [name: string]: unknown;
494
+ };
495
+ content?: never;
496
+ };
497
+ /** @description Administrator role required */
498
+ 403: {
499
+ headers: {
500
+ [name: string]: unknown;
501
+ };
502
+ content?: never;
503
+ };
504
+ /** @description Isolated verification is at capacity */
505
+ 429: {
506
+ headers: {
507
+ [name: string]: unknown;
508
+ };
509
+ content?: never;
510
+ };
511
+ /** @description Isolated runner or execution image unavailable */
512
+ 503: {
513
+ headers: {
514
+ [name: string]: unknown;
515
+ };
516
+ content?: never;
517
+ };
518
+ };
519
+ };
434
520
  PublishedLabsController_get: {
435
521
  parameters: {
436
522
  query?: {
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export type { LabGradeDto } from './models/LabGradeDto';
10
10
  export type { LabRunnerConfigDto } from './models/LabRunnerConfigDto';
11
11
  export type { LabSummaryDto } from './models/LabSummaryDto';
12
12
  export type { LabTestCaseDto } from './models/LabTestCaseDto';
13
+ export type { PreflightLabDto } from './models/PreflightLabDto';
13
14
  export type { PublishedLabDto } from './models/PublishedLabDto';
14
15
  export type { PublishVersionDto } from './models/PublishVersionDto';
15
16
  export type { ReferenceSolutionDto } from './models/ReferenceSolutionDto';
@@ -0,0 +1,13 @@
1
+ import type { LabRunnerConfigDto } from './LabRunnerConfigDto';
2
+ import type { LabTestCaseDto } from './LabTestCaseDto';
3
+ import type { ReferenceSolutionDto } from './ReferenceSolutionDto';
4
+ export type PreflightLabDto = {
5
+ language?: 'typescript' | 'javascript';
6
+ promptMarkdown?: string;
7
+ hints?: Array<string>;
8
+ starterCode?: string;
9
+ referenceSolution?: ReferenceSolutionDto;
10
+ sampleTests?: Array<LabTestCaseDto>;
11
+ hiddenTests?: Array<LabTestCaseDto>;
12
+ runner?: LabRunnerConfigDto;
13
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmdjr/coding-labs-contracts",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Types & runtime enums generated from NGX coding-labs spec",
5
5
  "license": "MIT",
6
6
  "private": false,