@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.js CHANGED
@@ -288,6 +288,167 @@ var EmbedSessions = class {
288
288
  return request(this.ctx, "DELETE", "/embed-sessions/{id}", ["id"], [], false, args, options);
289
289
  }
290
290
  };
291
+ var ExamsSessionsComments = class {
292
+ constructor(ctx) {
293
+ this.ctx = ctx;
294
+ }
295
+ list(arg, options) {
296
+ const args = arg;
297
+ return request(this.ctx, "GET", "/exams/{examId}/sessions/{sessionId}/comments", ["examId", "sessionId"], [], false, args, options);
298
+ }
299
+ create(arg, options) {
300
+ const args = arg;
301
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/comments", ["examId", "sessionId"], [], true, args, options);
302
+ }
303
+ update(arg, options) {
304
+ const args = arg;
305
+ return request(this.ctx, "PATCH", "/exams/{examId}/sessions/{sessionId}/comments/{commentId}", ["examId", "sessionId", "commentId"], [], true, args, options);
306
+ }
307
+ delete(arg, options) {
308
+ const args = arg;
309
+ return request(this.ctx, "DELETE", "/exams/{examId}/sessions/{sessionId}/comments/{commentId}", ["examId", "sessionId", "commentId"], [], false, args, options);
310
+ }
311
+ };
312
+ var ExamsSessions = class {
313
+ constructor(ctx) {
314
+ this.ctx = ctx;
315
+ this.comments = new ExamsSessionsComments(this.ctx);
316
+ }
317
+ list(arg, options) {
318
+ const args = typeof arg === "string" ? { examId: arg } : arg;
319
+ return request(this.ctx, "GET", "/exams/{examId}/sessions", ["examId"], [], false, args, options);
320
+ }
321
+ import(arg, options) {
322
+ const args = arg;
323
+ return request(this.ctx, "POST", "/exams/{examId}/sessions", ["examId"], [], true, args, options);
324
+ }
325
+ scan(arg, options) {
326
+ const args = typeof arg === "string" ? { examId: arg } : arg;
327
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/scan", ["examId"], [], false, args, options);
328
+ }
329
+ scanDocument(arg, options) {
330
+ const args = arg;
331
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/scan-document", ["examId"], [], true, args, options);
332
+ }
333
+ get(arg, options) {
334
+ const args = arg;
335
+ return request(this.ctx, "GET", "/exams/{examId}/sessions/{sessionId}", ["examId", "sessionId"], [], false, args, options);
336
+ }
337
+ delete(arg, options) {
338
+ const args = arg;
339
+ return request(this.ctx, "DELETE", "/exams/{examId}/sessions/{sessionId}", ["examId", "sessionId"], [], false, args, options);
340
+ }
341
+ saveFeedback(arg, options) {
342
+ const args = arg;
343
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/feedback", ["examId", "sessionId"], [], true, args, options);
344
+ }
345
+ saveOverallFeedback(arg, options) {
346
+ const args = arg;
347
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/overall-feedback", ["examId", "sessionId"], [], true, args, options);
348
+ }
349
+ generateOverallFeedback(arg, options) {
350
+ const args = arg;
351
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/generate-overall-feedback", ["examId", "sessionId"], [], false, args, options);
352
+ }
353
+ acceptAllSuggestions(arg, options) {
354
+ const args = arg;
355
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/suggestions/accept-all", ["examId", "sessionId"], [], false, args, options);
356
+ }
357
+ acceptSuggestion(arg, options) {
358
+ const args = arg;
359
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/suggestions/{questionId}/accept", ["examId", "sessionId", "questionId"], [], false, args, options);
360
+ }
361
+ editAnswer(arg, options) {
362
+ const args = arg;
363
+ return request(this.ctx, "PATCH", "/exams/{examId}/sessions/{sessionId}/answers/{questionId}", ["examId", "sessionId", "questionId"], [], true, args, options);
364
+ }
365
+ };
366
+ var ExamsQuestions = class {
367
+ constructor(ctx) {
368
+ this.ctx = ctx;
369
+ }
370
+ import(arg, options) {
371
+ const args = arg;
372
+ return request(this.ctx, "POST", "/exams/{examId}/questions/import", ["examId"], [], true, args, options);
373
+ }
374
+ generate(arg, options) {
375
+ const args = arg;
376
+ return request(this.ctx, "POST", "/exams/{examId}/questions/generate", ["examId"], [], true, args, options);
377
+ }
378
+ get(arg, options) {
379
+ const args = arg;
380
+ return request(this.ctx, "GET", "/exams/{examId}/questions/{questionId}", ["examId", "questionId"], ["format"], false, args, options);
381
+ }
382
+ regenerate(arg, options) {
383
+ const args = arg;
384
+ return request(this.ctx, "POST", "/exams/{examId}/questions/{questionId}/generate", ["examId", "questionId"], [], true, args, options);
385
+ }
386
+ };
387
+ var ExamsExport = class {
388
+ constructor(ctx) {
389
+ this.ctx = ctx;
390
+ }
391
+ qti3Zip(arg, options) {
392
+ const args = typeof arg === "string" ? { examId: arg } : arg;
393
+ return request(this.ctx, "POST", "/exams/{examId}/export/qti3-zip", ["examId"], [], false, args, options);
394
+ }
395
+ qti21Zip(arg, options) {
396
+ const args = typeof arg === "string" ? { examId: arg } : arg;
397
+ return request(this.ctx, "POST", "/exams/{examId}/export/qti21-zip", ["examId"], [], false, args, options);
398
+ }
399
+ };
400
+ var Exams = class {
401
+ constructor(ctx) {
402
+ this.ctx = ctx;
403
+ this.sessions = new ExamsSessions(this.ctx);
404
+ this.questions = new ExamsQuestions(this.ctx);
405
+ this.export = new ExamsExport(this.ctx);
406
+ }
407
+ list(arg, options) {
408
+ const args = arg;
409
+ return request(this.ctx, "GET", "/exams", [], ["folder", "role"], false, args, options);
410
+ }
411
+ create(arg, options) {
412
+ const args = arg;
413
+ return request(this.ctx, "POST", "/exams", [], [], true, args, options);
414
+ }
415
+ import(arg, options) {
416
+ const args = arg;
417
+ return request(this.ctx, "POST", "/exams/import", [], [], true, args, options);
418
+ }
419
+ get(arg, options) {
420
+ const args = typeof arg === "string" ? { id: arg } : arg;
421
+ return request(this.ctx, "GET", "/exams/{id}", ["id"], [], false, args, options);
422
+ }
423
+ update(arg, options) {
424
+ const args = typeof arg === "string" ? { id: arg } : arg;
425
+ return request(this.ctx, "POST", "/exams/{id}", ["id"], [], false, args, options);
426
+ }
427
+ delete(arg, options) {
428
+ const args = typeof arg === "string" ? { id: arg } : arg;
429
+ return request(this.ctx, "DELETE", "/exams/{id}", ["id"], [], false, args, options);
430
+ }
431
+ duplicate(arg, options) {
432
+ const args = arg;
433
+ return request(this.ctx, "POST", "/exams/{examId}/duplicate", ["examId"], [], true, args, options);
434
+ }
435
+ print(arg, options) {
436
+ const args = typeof arg === "string" ? { examId: arg } : arg;
437
+ return request(this.ctx, "POST", "/exams/{examId}/print", ["examId"], [], false, args, options);
438
+ }
439
+ startGeneration(arg, options) {
440
+ const args = typeof arg === "string" ? { examId: arg } : arg;
441
+ return request(this.ctx, "POST", "/exams/{examId}/generate", ["examId"], [], false, args, options);
442
+ }
443
+ cancelGeneration(arg, options) {
444
+ const args = typeof arg === "string" ? { examId: arg } : arg;
445
+ return request(this.ctx, "POST", "/exams/{examId}/generate/cancel", ["examId"], [], false, args, options);
446
+ }
447
+ getContextSuggestions(arg, options) {
448
+ const args = typeof arg === "string" ? { examId: arg } : arg;
449
+ return request(this.ctx, "GET", "/exams/{examId}/context-suggestions", ["examId"], [], false, args, options);
450
+ }
451
+ };
291
452
  var Me = class {
292
453
  constructor(ctx) {
293
454
  this.ctx = ctx;
@@ -474,145 +635,6 @@ var Users = class {
474
635
  return request(this.ctx, "DELETE", "/users/{id}", ["id"], [], false, args, options);
475
636
  }
476
637
  };
477
- var ExamsSessions = class {
478
- constructor(ctx) {
479
- this.ctx = ctx;
480
- }
481
- list(arg, options) {
482
- const args = typeof arg === "string" ? { examId: arg } : arg;
483
- return request(this.ctx, "GET", "/exams/{examId}/sessions", ["examId"], [], false, args, options);
484
- }
485
- import(arg, options) {
486
- const args = arg;
487
- return request(this.ctx, "POST", "/exams/{examId}/sessions", ["examId"], [], true, args, options);
488
- }
489
- scan(arg, options) {
490
- const args = typeof arg === "string" ? { examId: arg } : arg;
491
- return request(this.ctx, "POST", "/exams/{examId}/sessions/scan", ["examId"], [], false, args, options);
492
- }
493
- scanDocument(arg, options) {
494
- const args = arg;
495
- return request(this.ctx, "POST", "/exams/{examId}/sessions/scan-document", ["examId"], [], true, args, options);
496
- }
497
- get(arg, options) {
498
- const args = arg;
499
- return request(this.ctx, "GET", "/exams/{examId}/sessions/{sessionId}", ["examId", "sessionId"], [], false, args, options);
500
- }
501
- delete(arg, options) {
502
- const args = arg;
503
- return request(this.ctx, "DELETE", "/exams/{examId}/sessions/{sessionId}", ["examId", "sessionId"], [], false, args, options);
504
- }
505
- saveFeedback(arg, options) {
506
- const args = arg;
507
- return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/feedback", ["examId", "sessionId"], [], true, args, options);
508
- }
509
- saveOverallFeedback(arg, options) {
510
- const args = arg;
511
- return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/overall-feedback", ["examId", "sessionId"], [], true, args, options);
512
- }
513
- generateOverallFeedback(arg, options) {
514
- const args = arg;
515
- return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/generate-overall-feedback", ["examId", "sessionId"], [], false, args, options);
516
- }
517
- acceptAllSuggestions(arg, options) {
518
- const args = arg;
519
- return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/suggestions/accept-all", ["examId", "sessionId"], [], false, args, options);
520
- }
521
- acceptSuggestion(arg, options) {
522
- const args = arg;
523
- return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/suggestions/{questionId}/accept", ["examId", "sessionId", "questionId"], [], false, args, options);
524
- }
525
- editAnswer(arg, options) {
526
- const args = arg;
527
- return request(this.ctx, "PATCH", "/exams/{examId}/sessions/{sessionId}/answers/{questionId}", ["examId", "sessionId", "questionId"], [], true, args, options);
528
- }
529
- };
530
- var ExamsQuestions = class {
531
- constructor(ctx) {
532
- this.ctx = ctx;
533
- }
534
- import(arg, options) {
535
- const args = arg;
536
- return request(this.ctx, "POST", "/exams/{examId}/questions/import", ["examId"], [], true, args, options);
537
- }
538
- generate(arg, options) {
539
- const args = arg;
540
- return request(this.ctx, "POST", "/exams/{examId}/questions/generate", ["examId"], [], true, args, options);
541
- }
542
- get(arg, options) {
543
- const args = arg;
544
- return request(this.ctx, "GET", "/exams/{examId}/questions/{questionId}", ["examId", "questionId"], ["format"], false, args, options);
545
- }
546
- regenerate(arg, options) {
547
- const args = arg;
548
- return request(this.ctx, "POST", "/exams/{examId}/questions/{questionId}/generate", ["examId", "questionId"], [], true, args, options);
549
- }
550
- };
551
- var ExamsExport = class {
552
- constructor(ctx) {
553
- this.ctx = ctx;
554
- }
555
- qti3Zip(arg, options) {
556
- const args = typeof arg === "string" ? { examId: arg } : arg;
557
- return request(this.ctx, "POST", "/exams/{examId}/export/qti3-zip", ["examId"], [], false, args, options);
558
- }
559
- qti21Zip(arg, options) {
560
- const args = typeof arg === "string" ? { examId: arg } : arg;
561
- return request(this.ctx, "POST", "/exams/{examId}/export/qti21-zip", ["examId"], [], false, args, options);
562
- }
563
- };
564
- var Exams = class {
565
- constructor(ctx) {
566
- this.ctx = ctx;
567
- this.sessions = new ExamsSessions(this.ctx);
568
- this.questions = new ExamsQuestions(this.ctx);
569
- this.export = new ExamsExport(this.ctx);
570
- }
571
- list(arg, options) {
572
- const args = arg;
573
- return request(this.ctx, "GET", "/exams", [], ["folder", "role"], false, args, options);
574
- }
575
- create(arg, options) {
576
- const args = arg;
577
- return request(this.ctx, "POST", "/exams", [], [], true, args, options);
578
- }
579
- import(arg, options) {
580
- const args = arg;
581
- return request(this.ctx, "POST", "/exams/import", [], [], true, args, options);
582
- }
583
- get(arg, options) {
584
- const args = typeof arg === "string" ? { id: arg } : arg;
585
- return request(this.ctx, "GET", "/exams/{id}", ["id"], [], false, args, options);
586
- }
587
- update(arg, options) {
588
- const args = typeof arg === "string" ? { id: arg } : arg;
589
- return request(this.ctx, "POST", "/exams/{id}", ["id"], [], false, args, options);
590
- }
591
- delete(arg, options) {
592
- const args = typeof arg === "string" ? { id: arg } : arg;
593
- return request(this.ctx, "DELETE", "/exams/{id}", ["id"], [], false, args, options);
594
- }
595
- duplicate(arg, options) {
596
- const args = arg;
597
- return request(this.ctx, "POST", "/exams/{examId}/duplicate", ["examId"], [], true, args, options);
598
- }
599
- print(arg, options) {
600
- const args = typeof arg === "string" ? { examId: arg } : arg;
601
- return request(this.ctx, "POST", "/exams/{examId}/print", ["examId"], [], false, args, options);
602
- }
603
- startGeneration(arg, options) {
604
- const args = typeof arg === "string" ? { examId: arg } : arg;
605
- return request(this.ctx, "POST", "/exams/{examId}/generate", ["examId"], [], false, args, options);
606
- }
607
- cancelGeneration(arg, options) {
608
- const args = typeof arg === "string" ? { examId: arg } : arg;
609
- return request(this.ctx, "POST", "/exams/{examId}/generate/cancel", ["examId"], [], false, args, options);
610
- }
611
- getContextSuggestions(arg, options) {
612
- const args = typeof arg === "string" ? { examId: arg } : arg;
613
- return request(this.ctx, "GET", "/exams/{examId}/context-suggestions", ["examId"], [], false, args, options);
614
- }
615
- };
616
638
  var PracticeSpacesStudents = class {
617
639
  constructor(ctx) {
618
640
  this.ctx = ctx;
@@ -826,6 +848,7 @@ var Examplary = class {
826
848
  this.library = new Library(this.ctx);
827
849
  this.oauth = new Oauth(this.ctx);
828
850
  this.embedSessions = new EmbedSessions(this.ctx);
851
+ this.exams = new Exams(this.ctx);
829
852
  this.me = new Me(this.ctx);
830
853
  this.media = new Media(this.ctx);
831
854
  this.org = new Org(this.ctx);
@@ -836,7 +859,6 @@ var Examplary = class {
836
859
  this.permissions = new Permissions(this.ctx);
837
860
  this.studentLevels = new StudentLevels(this.ctx);
838
861
  this.users = new Users(this.ctx);
839
- this.exams = new Exams(this.ctx);
840
862
  this.practiceSpaces = new PracticeSpaces(this.ctx);
841
863
  this.sourceMaterials = new SourceMaterials(this.ctx);
842
864
  this.folders = new Folders(this.ctx);