@examplary/sdk 2.3.0 → 2.4.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.mjs CHANGED
@@ -253,6 +253,167 @@ var EmbedSessions = class {
253
253
  return request(this.ctx, "DELETE", "/embed-sessions/{id}", ["id"], [], false, args, options);
254
254
  }
255
255
  };
256
+ var ExamsSessionsComments = class {
257
+ constructor(ctx) {
258
+ this.ctx = ctx;
259
+ }
260
+ list(arg, options) {
261
+ const args = arg;
262
+ return request(this.ctx, "GET", "/exams/{examId}/sessions/{sessionId}/comments", ["examId", "sessionId"], [], false, args, options);
263
+ }
264
+ create(arg, options) {
265
+ const args = arg;
266
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/comments", ["examId", "sessionId"], [], true, args, options);
267
+ }
268
+ update(arg, options) {
269
+ const args = arg;
270
+ return request(this.ctx, "PATCH", "/exams/{examId}/sessions/{sessionId}/comments/{commentId}", ["examId", "sessionId", "commentId"], [], true, args, options);
271
+ }
272
+ delete(arg, options) {
273
+ const args = arg;
274
+ return request(this.ctx, "DELETE", "/exams/{examId}/sessions/{sessionId}/comments/{commentId}", ["examId", "sessionId", "commentId"], [], false, args, options);
275
+ }
276
+ };
277
+ var ExamsSessions = class {
278
+ constructor(ctx) {
279
+ this.ctx = ctx;
280
+ this.comments = new ExamsSessionsComments(this.ctx);
281
+ }
282
+ list(arg, options) {
283
+ const args = typeof arg === "string" ? { examId: arg } : arg;
284
+ return request(this.ctx, "GET", "/exams/{examId}/sessions", ["examId"], [], false, args, options);
285
+ }
286
+ import(arg, options) {
287
+ const args = arg;
288
+ return request(this.ctx, "POST", "/exams/{examId}/sessions", ["examId"], [], true, args, options);
289
+ }
290
+ scan(arg, options) {
291
+ const args = typeof arg === "string" ? { examId: arg } : arg;
292
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/scan", ["examId"], [], false, args, options);
293
+ }
294
+ scanDocument(arg, options) {
295
+ const args = arg;
296
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/scan-document", ["examId"], [], true, args, options);
297
+ }
298
+ get(arg, options) {
299
+ const args = arg;
300
+ return request(this.ctx, "GET", "/exams/{examId}/sessions/{sessionId}", ["examId", "sessionId"], [], false, args, options);
301
+ }
302
+ delete(arg, options) {
303
+ const args = arg;
304
+ return request(this.ctx, "DELETE", "/exams/{examId}/sessions/{sessionId}", ["examId", "sessionId"], [], false, args, options);
305
+ }
306
+ saveFeedback(arg, options) {
307
+ const args = arg;
308
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/feedback", ["examId", "sessionId"], [], true, args, options);
309
+ }
310
+ saveOverallFeedback(arg, options) {
311
+ const args = arg;
312
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/overall-feedback", ["examId", "sessionId"], [], true, args, options);
313
+ }
314
+ generateOverallFeedback(arg, options) {
315
+ const args = arg;
316
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/generate-overall-feedback", ["examId", "sessionId"], [], false, args, options);
317
+ }
318
+ acceptAllSuggestions(arg, options) {
319
+ const args = arg;
320
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/suggestions/accept-all", ["examId", "sessionId"], [], false, args, options);
321
+ }
322
+ acceptSuggestion(arg, options) {
323
+ const args = arg;
324
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/suggestions/{questionId}/accept", ["examId", "sessionId", "questionId"], [], false, args, options);
325
+ }
326
+ editAnswer(arg, options) {
327
+ const args = arg;
328
+ return request(this.ctx, "PATCH", "/exams/{examId}/sessions/{sessionId}/answers/{questionId}", ["examId", "sessionId", "questionId"], [], true, args, options);
329
+ }
330
+ };
331
+ var ExamsQuestions = class {
332
+ constructor(ctx) {
333
+ this.ctx = ctx;
334
+ }
335
+ import(arg, options) {
336
+ const args = arg;
337
+ return request(this.ctx, "POST", "/exams/{examId}/questions/import", ["examId"], [], true, args, options);
338
+ }
339
+ generate(arg, options) {
340
+ const args = arg;
341
+ return request(this.ctx, "POST", "/exams/{examId}/questions/generate", ["examId"], [], true, args, options);
342
+ }
343
+ get(arg, options) {
344
+ const args = arg;
345
+ return request(this.ctx, "GET", "/exams/{examId}/questions/{questionId}", ["examId", "questionId"], ["format"], false, args, options);
346
+ }
347
+ regenerate(arg, options) {
348
+ const args = arg;
349
+ return request(this.ctx, "POST", "/exams/{examId}/questions/{questionId}/generate", ["examId", "questionId"], [], true, args, options);
350
+ }
351
+ };
352
+ var ExamsExport = class {
353
+ constructor(ctx) {
354
+ this.ctx = ctx;
355
+ }
356
+ qti3Zip(arg, options) {
357
+ const args = typeof arg === "string" ? { examId: arg } : arg;
358
+ return request(this.ctx, "POST", "/exams/{examId}/export/qti3-zip", ["examId"], [], false, args, options);
359
+ }
360
+ qti21Zip(arg, options) {
361
+ const args = typeof arg === "string" ? { examId: arg } : arg;
362
+ return request(this.ctx, "POST", "/exams/{examId}/export/qti21-zip", ["examId"], [], false, args, options);
363
+ }
364
+ };
365
+ var Exams = class {
366
+ constructor(ctx) {
367
+ this.ctx = ctx;
368
+ this.sessions = new ExamsSessions(this.ctx);
369
+ this.questions = new ExamsQuestions(this.ctx);
370
+ this.export = new ExamsExport(this.ctx);
371
+ }
372
+ list(arg, options) {
373
+ const args = arg;
374
+ return request(this.ctx, "GET", "/exams", [], ["folder", "role"], false, args, options);
375
+ }
376
+ create(arg, options) {
377
+ const args = arg;
378
+ return request(this.ctx, "POST", "/exams", [], [], true, args, options);
379
+ }
380
+ import(arg, options) {
381
+ const args = arg;
382
+ return request(this.ctx, "POST", "/exams/import", [], [], true, args, options);
383
+ }
384
+ get(arg, options) {
385
+ const args = typeof arg === "string" ? { id: arg } : arg;
386
+ return request(this.ctx, "GET", "/exams/{id}", ["id"], [], false, args, options);
387
+ }
388
+ update(arg, options) {
389
+ const args = typeof arg === "string" ? { id: arg } : arg;
390
+ return request(this.ctx, "POST", "/exams/{id}", ["id"], [], false, args, options);
391
+ }
392
+ delete(arg, options) {
393
+ const args = typeof arg === "string" ? { id: arg } : arg;
394
+ return request(this.ctx, "DELETE", "/exams/{id}", ["id"], [], false, args, options);
395
+ }
396
+ duplicate(arg, options) {
397
+ const args = arg;
398
+ return request(this.ctx, "POST", "/exams/{examId}/duplicate", ["examId"], [], true, args, options);
399
+ }
400
+ print(arg, options) {
401
+ const args = typeof arg === "string" ? { examId: arg } : arg;
402
+ return request(this.ctx, "POST", "/exams/{examId}/print", ["examId"], [], false, args, options);
403
+ }
404
+ startGeneration(arg, options) {
405
+ const args = typeof arg === "string" ? { examId: arg } : arg;
406
+ return request(this.ctx, "POST", "/exams/{examId}/generate", ["examId"], [], false, args, options);
407
+ }
408
+ cancelGeneration(arg, options) {
409
+ const args = typeof arg === "string" ? { examId: arg } : arg;
410
+ return request(this.ctx, "POST", "/exams/{examId}/generate/cancel", ["examId"], [], false, args, options);
411
+ }
412
+ getContextSuggestions(arg, options) {
413
+ const args = typeof arg === "string" ? { examId: arg } : arg;
414
+ return request(this.ctx, "GET", "/exams/{examId}/context-suggestions", ["examId"], [], false, args, options);
415
+ }
416
+ };
256
417
  var Me = class {
257
418
  constructor(ctx) {
258
419
  this.ctx = ctx;
@@ -439,145 +600,6 @@ var Users = class {
439
600
  return request(this.ctx, "DELETE", "/users/{id}", ["id"], [], false, args, options);
440
601
  }
441
602
  };
442
- var ExamsSessions = class {
443
- constructor(ctx) {
444
- this.ctx = ctx;
445
- }
446
- list(arg, options) {
447
- const args = typeof arg === "string" ? { examId: arg } : arg;
448
- return request(this.ctx, "GET", "/exams/{examId}/sessions", ["examId"], [], false, args, options);
449
- }
450
- import(arg, options) {
451
- const args = arg;
452
- return request(this.ctx, "POST", "/exams/{examId}/sessions", ["examId"], [], true, args, options);
453
- }
454
- scan(arg, options) {
455
- const args = typeof arg === "string" ? { examId: arg } : arg;
456
- return request(this.ctx, "POST", "/exams/{examId}/sessions/scan", ["examId"], [], false, args, options);
457
- }
458
- scanDocument(arg, options) {
459
- const args = arg;
460
- return request(this.ctx, "POST", "/exams/{examId}/sessions/scan-document", ["examId"], [], true, args, options);
461
- }
462
- get(arg, options) {
463
- const args = arg;
464
- return request(this.ctx, "GET", "/exams/{examId}/sessions/{sessionId}", ["examId", "sessionId"], [], false, args, options);
465
- }
466
- delete(arg, options) {
467
- const args = arg;
468
- return request(this.ctx, "DELETE", "/exams/{examId}/sessions/{sessionId}", ["examId", "sessionId"], [], false, args, options);
469
- }
470
- saveFeedback(arg, options) {
471
- const args = arg;
472
- return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/feedback", ["examId", "sessionId"], [], true, args, options);
473
- }
474
- saveOverallFeedback(arg, options) {
475
- const args = arg;
476
- return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/overall-feedback", ["examId", "sessionId"], [], true, args, options);
477
- }
478
- generateOverallFeedback(arg, options) {
479
- const args = arg;
480
- return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/generate-overall-feedback", ["examId", "sessionId"], [], false, args, options);
481
- }
482
- acceptAllSuggestions(arg, options) {
483
- const args = arg;
484
- return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/suggestions/accept-all", ["examId", "sessionId"], [], false, args, options);
485
- }
486
- acceptSuggestion(arg, options) {
487
- const args = arg;
488
- return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/suggestions/{questionId}/accept", ["examId", "sessionId", "questionId"], [], false, args, options);
489
- }
490
- editAnswer(arg, options) {
491
- const args = arg;
492
- return request(this.ctx, "PATCH", "/exams/{examId}/sessions/{sessionId}/answers/{questionId}", ["examId", "sessionId", "questionId"], [], true, args, options);
493
- }
494
- };
495
- var ExamsQuestions = class {
496
- constructor(ctx) {
497
- this.ctx = ctx;
498
- }
499
- import(arg, options) {
500
- const args = arg;
501
- return request(this.ctx, "POST", "/exams/{examId}/questions/import", ["examId"], [], true, args, options);
502
- }
503
- generate(arg, options) {
504
- const args = arg;
505
- return request(this.ctx, "POST", "/exams/{examId}/questions/generate", ["examId"], [], true, args, options);
506
- }
507
- get(arg, options) {
508
- const args = arg;
509
- return request(this.ctx, "GET", "/exams/{examId}/questions/{questionId}", ["examId", "questionId"], ["format"], false, args, options);
510
- }
511
- regenerate(arg, options) {
512
- const args = arg;
513
- return request(this.ctx, "POST", "/exams/{examId}/questions/{questionId}/generate", ["examId", "questionId"], [], true, args, options);
514
- }
515
- };
516
- var ExamsExport = class {
517
- constructor(ctx) {
518
- this.ctx = ctx;
519
- }
520
- qti3Zip(arg, options) {
521
- const args = typeof arg === "string" ? { examId: arg } : arg;
522
- return request(this.ctx, "POST", "/exams/{examId}/export/qti3-zip", ["examId"], [], false, args, options);
523
- }
524
- qti21Zip(arg, options) {
525
- const args = typeof arg === "string" ? { examId: arg } : arg;
526
- return request(this.ctx, "POST", "/exams/{examId}/export/qti21-zip", ["examId"], [], false, args, options);
527
- }
528
- };
529
- var Exams = class {
530
- constructor(ctx) {
531
- this.ctx = ctx;
532
- this.sessions = new ExamsSessions(this.ctx);
533
- this.questions = new ExamsQuestions(this.ctx);
534
- this.export = new ExamsExport(this.ctx);
535
- }
536
- list(arg, options) {
537
- const args = arg;
538
- return request(this.ctx, "GET", "/exams", [], ["folder", "role"], false, args, options);
539
- }
540
- create(arg, options) {
541
- const args = arg;
542
- return request(this.ctx, "POST", "/exams", [], [], true, args, options);
543
- }
544
- import(arg, options) {
545
- const args = arg;
546
- return request(this.ctx, "POST", "/exams/import", [], [], true, args, options);
547
- }
548
- get(arg, options) {
549
- const args = typeof arg === "string" ? { id: arg } : arg;
550
- return request(this.ctx, "GET", "/exams/{id}", ["id"], [], false, args, options);
551
- }
552
- update(arg, options) {
553
- const args = typeof arg === "string" ? { id: arg } : arg;
554
- return request(this.ctx, "POST", "/exams/{id}", ["id"], [], false, args, options);
555
- }
556
- delete(arg, options) {
557
- const args = typeof arg === "string" ? { id: arg } : arg;
558
- return request(this.ctx, "DELETE", "/exams/{id}", ["id"], [], false, args, options);
559
- }
560
- duplicate(arg, options) {
561
- const args = arg;
562
- return request(this.ctx, "POST", "/exams/{examId}/duplicate", ["examId"], [], true, args, options);
563
- }
564
- print(arg, options) {
565
- const args = typeof arg === "string" ? { examId: arg } : arg;
566
- return request(this.ctx, "POST", "/exams/{examId}/print", ["examId"], [], false, args, options);
567
- }
568
- startGeneration(arg, options) {
569
- const args = typeof arg === "string" ? { examId: arg } : arg;
570
- return request(this.ctx, "POST", "/exams/{examId}/generate", ["examId"], [], false, args, options);
571
- }
572
- cancelGeneration(arg, options) {
573
- const args = typeof arg === "string" ? { examId: arg } : arg;
574
- return request(this.ctx, "POST", "/exams/{examId}/generate/cancel", ["examId"], [], false, args, options);
575
- }
576
- getContextSuggestions(arg, options) {
577
- const args = typeof arg === "string" ? { examId: arg } : arg;
578
- return request(this.ctx, "GET", "/exams/{examId}/context-suggestions", ["examId"], [], false, args, options);
579
- }
580
- };
581
603
  var PracticeSpacesStudents = class {
582
604
  constructor(ctx) {
583
605
  this.ctx = ctx;
@@ -791,6 +813,7 @@ var Examplary = class {
791
813
  this.library = new Library(this.ctx);
792
814
  this.oauth = new Oauth(this.ctx);
793
815
  this.embedSessions = new EmbedSessions(this.ctx);
816
+ this.exams = new Exams(this.ctx);
794
817
  this.me = new Me(this.ctx);
795
818
  this.media = new Media(this.ctx);
796
819
  this.org = new Org(this.ctx);
@@ -801,7 +824,6 @@ var Examplary = class {
801
824
  this.permissions = new Permissions(this.ctx);
802
825
  this.studentLevels = new StudentLevels(this.ctx);
803
826
  this.users = new Users(this.ctx);
804
- this.exams = new Exams(this.ctx);
805
827
  this.practiceSpaces = new PracticeSpaces(this.ctx);
806
828
  this.sourceMaterials = new SourceMaterials(this.ctx);
807
829
  this.folders = new Folders(this.ctx);