1- // https://raw.githubusercontent.com/rage/tmc-langs-rust/master/crates/tmc-langs-cli/bindings.d.ts
1+ // VERSION=0.38.0
2+ // https://raw.githubusercontent.com/rage/tmc-langs-rust/0.38.0/crates/tmc-langs-cli/bindings.d.ts
23
34export type Locale = string ;
45
@@ -16,14 +17,19 @@ export type DataKind =
1617 "output-data-kind" : "exercise-packaging-configuration" ;
1718 "output-data" : ExercisePackagingConfiguration ;
1819 }
19- | { "output-data-kind" : "local-exercises" ; "output-data" : Array < LocalExercise > }
20+ | { "output-data-kind" : "local-tmc-exercises" ; "output-data" : Array < LocalTmcExercise > }
21+ | { "output-data-kind" : "local-mooc-exercises" ; "output-data" : Array < LocalMoocExercise > }
2022 | { "output-data-kind" : "refresh-result" ; "output-data" : RefreshData }
2123 | { "output-data-kind" : "test-result" ; "output-data" : RunResult }
2224 | { "output-data-kind" : "exercise-desc" ; "output-data" : ExerciseDesc }
2325 | { "output-data-kind" : "updated-exercises" ; "output-data" : Array < UpdatedExercise > }
2426 | {
25- "output-data-kind" : "exercise-download" ;
26- "output-data" : DownloadOrUpdateCourseExercisesResult ;
27+ "output-data-kind" : "tmc-exercise-download" ;
28+ "output-data" : DownloadOrUpdateTmcCourseExercisesResult ;
29+ }
30+ | {
31+ "output-data-kind" : "mooc-exercise-download" ;
32+ "output-data" : DownloadOrUpdateMoocCourseExercisesResult ;
2733 }
2834 | { "output-data-kind" : "combined-course-data" ; "output-data" : CombinedCourseData }
2935 | { "output-data-kind" : "course-details" ; "output-data" : CourseDetails }
@@ -64,9 +70,9 @@ export type Kind =
6470 | "invalid-token"
6571 | {
6672 "failed-exercise-download" : {
67- completed : Array < ExerciseDownload > ;
68- skipped : Array < ExerciseDownload > ;
69- failed : Array < [ ExerciseDownload , Array < string > ] > ;
73+ completed : Array < TmcExerciseDownload > ;
74+ skipped : Array < TmcExerciseDownload > ;
75+ failed : Array < [ TmcExerciseDownload , Array < string > ] > ;
7076 } ;
7177 } ;
7278
@@ -131,7 +137,11 @@ export type ExercisePackagingConfiguration = {
131137 exercise_file_paths : Array < string > ;
132138} ;
133139
134- export type LocalExercise = { "exercise-slug" : string ; "exercise-path" : string } ;
140+ export type LocalExercise = { tmc : LocalTmcExercise } | { mooc : LocalMoocExercise } ;
141+
142+ export type LocalTmcExercise = { "exercise-slug" : string ; "exercise-path" : string } ;
143+
144+ export type LocalMoocExercise = { "exercise-id" : string ; "exercise-path" : string } ;
135145
136146export type Compression = "tar" | "zip" | "zstd" ;
137147
@@ -247,19 +257,27 @@ export type TestDesc = {
247257
248258export type UpdatedExercise = { id : number } ;
249259
250- export type DownloadOrUpdateCourseExercisesResult = {
251- downloaded : Array < ExerciseDownload > ;
252- skipped : Array < ExerciseDownload > ;
253- failed ?: Array < [ ExerciseDownload , Array < string > ] > ;
260+ export type DownloadOrUpdateTmcCourseExercisesResult = {
261+ downloaded : Array < TmcExerciseDownload > ;
262+ skipped : Array < TmcExerciseDownload > ;
263+ failed ?: Array < [ TmcExerciseDownload , Array < string > ] > ;
254264} ;
255265
256- export type ExerciseDownload = {
266+ export type DownloadOrUpdateMoocCourseExercisesResult = {
267+ downloaded : Array < MoocExerciseDownload > ;
268+ skipped : Array < MoocExerciseDownload > ;
269+ failed ?: Array < [ MoocExerciseDownload , Array < string > ] > ;
270+ } ;
271+
272+ export type TmcExerciseDownload = {
257273 id : number ;
258274 "course-slug" : string ;
259275 "exercise-slug" : string ;
260276 path : string ;
261277} ;
262278
279+ export type MoocExerciseDownload = { id : string ; path : string } ;
280+
263281export type CombinedCourseData = {
264282 details : CourseDetails ;
265283 exercises : Array < CourseExercise > ;
@@ -615,12 +633,12 @@ export type TmcExerciseTask = {
615633} ;
616634
617635export type PublicSpec =
618- | { type : "browser " ; files : Array < ExerciseFile > }
619- | { type : "editor " ; archiveName : string ; archiveDownloadUrl : string ; checksum : string } ;
636+ | { type : "Browser " ; files : Array < ExerciseFile > }
637+ | { type : "Editor " ; archive_name : string ; archive_download_url : string ; checksum : string } ;
620638
621639export type ModelSolutionSpec =
622- | { type : "browser " ; solutionFiles : Array < ExerciseFile > }
623- | { type : "editor " ; archiveDownloadUrl : string } ;
640+ | { type : "Browser " ; solution_files : Array < ExerciseFile > }
641+ | { type : "Editor " ; download_url : string } ;
624642
625643export type ExerciseFile = { filepath : string ; contents : string } ;
626644
0 commit comments