@examplary/sdk 2.3.0 → 2.5.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;
@@ -360,6 +521,19 @@ var Orgs = class {
360
521
  return request(this.ctx, "POST", "/orgs", [], [], true, args, options);
361
522
  }
362
523
  };
524
+ var AuditLogs = class {
525
+ constructor(ctx) {
526
+ this.ctx = ctx;
527
+ }
528
+ list(arg, options) {
529
+ const args = arg;
530
+ return request(this.ctx, "GET", "/audit-logs", [], ["actor", "object", "from", "to", "exclusiveStartKey"], false, args, options);
531
+ }
532
+ export(arg, options) {
533
+ const args = arg;
534
+ return request(this.ctx, "GET", "/audit-logs/export", [], ["from", "to", "actor", "object"], false, args, options);
535
+ }
536
+ };
363
537
  var ApiKeys = class {
364
538
  constructor(ctx) {
365
539
  this.ctx = ctx;
@@ -474,145 +648,6 @@ var Users = class {
474
648
  return request(this.ctx, "DELETE", "/users/{id}", ["id"], [], false, args, options);
475
649
  }
476
650
  };
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
651
  var PracticeSpacesStudents = class {
617
652
  constructor(ctx) {
618
653
  this.ctx = ctx;
@@ -806,6 +841,27 @@ var QuestionBank = class {
806
841
  return request(this.ctx, "DELETE", "/question-bank/{id}", ["id"], [], false, args, options);
807
842
  }
808
843
  };
844
+ var Prompts = class {
845
+ constructor(ctx) {
846
+ this.ctx = ctx;
847
+ }
848
+ list(arg, options) {
849
+ const args = arg;
850
+ return request(this.ctx, "GET", "/prompts", [], ["type", "language"], false, args, options);
851
+ }
852
+ create(arg, options) {
853
+ const args = arg;
854
+ return request(this.ctx, "POST", "/prompts", [], [], true, args, options);
855
+ }
856
+ update(arg, options) {
857
+ const args = arg;
858
+ return request(this.ctx, "PATCH", "/prompts/{id}", ["id"], [], true, args, options);
859
+ }
860
+ delete(arg, options) {
861
+ const args = typeof arg === "string" ? { id: arg } : arg;
862
+ return request(this.ctx, "DELETE", "/prompts/{id}", ["id"], [], false, args, options);
863
+ }
864
+ };
809
865
  var Jobs = class {
810
866
  constructor(ctx) {
811
867
  this.ctx = ctx;
@@ -826,22 +882,24 @@ var Examplary = class {
826
882
  this.library = new Library(this.ctx);
827
883
  this.oauth = new Oauth(this.ctx);
828
884
  this.embedSessions = new EmbedSessions(this.ctx);
885
+ this.exams = new Exams(this.ctx);
829
886
  this.me = new Me(this.ctx);
830
887
  this.media = new Media(this.ctx);
831
888
  this.org = new Org(this.ctx);
832
889
  this.orgs = new Orgs(this.ctx);
890
+ this.auditLogs = new AuditLogs(this.ctx);
833
891
  this.apiKeys = new ApiKeys(this.ctx);
834
892
  this.attributes = new Attributes(this.ctx);
835
893
  this.taxonomies = new Taxonomies(this.ctx);
836
894
  this.permissions = new Permissions(this.ctx);
837
895
  this.studentLevels = new StudentLevels(this.ctx);
838
896
  this.users = new Users(this.ctx);
839
- this.exams = new Exams(this.ctx);
840
897
  this.practiceSpaces = new PracticeSpaces(this.ctx);
841
898
  this.sourceMaterials = new SourceMaterials(this.ctx);
842
899
  this.folders = new Folders(this.ctx);
843
900
  this.groups = new Groups(this.ctx);
844
901
  this.questionBank = new QuestionBank(this.ctx);
902
+ this.prompts = new Prompts(this.ctx);
845
903
  this.jobs = new Jobs(this.ctx);
846
904
  }
847
905
  getRubrics(arg, options) {