@examplary/sdk 2.15.0 → 2.17.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
@@ -191,57 +191,45 @@ var QuestionTypes = class {
191
191
  return request(this.ctx, "POST", "/question-types/{questionTypeId}/disable", ["questionTypeId"], [], false, args, options);
192
192
  }
193
193
  };
194
- var LibraryPublishersItems = class {
194
+ var LibraryCollectionsItems = class {
195
195
  constructor(ctx) {
196
196
  this.ctx = ctx;
197
197
  }
198
198
  list(arg, options) {
199
- const args = typeof arg === "string" ? { publisherId: arg } : arg;
200
- return request(this.ctx, "GET", "/library/publishers/{publisherId}/items", ["publisherId"], [], false, args, options);
199
+ const args = typeof arg === "string" ? { collectionId: arg } : arg;
200
+ return request(this.ctx, "GET", "/library/collections/{collectionId}/items", ["collectionId"], [], false, args, options);
201
201
  }
202
202
  create(arg, options) {
203
203
  const args = arg;
204
- return request(this.ctx, "POST", "/library/publishers/{publisherId}/items", ["publisherId"], [], true, args, options);
204
+ return request(this.ctx, "POST", "/library/collections/{collectionId}/items", ["collectionId"], [], true, args, options);
205
205
  }
206
206
  };
207
- var LibraryPublishers = class {
207
+ var LibraryCollections = class {
208
208
  constructor(ctx) {
209
209
  this.ctx = ctx;
210
- this.items = new LibraryPublishersItems(this.ctx);
210
+ this.items = new LibraryCollectionsItems(this.ctx);
211
211
  }
212
- listFeatured(arg, options) {
213
- const args = arg;
214
- return request(this.ctx, "GET", "/library/publishers/featured", [], [], false, args, options);
215
- }
216
- listAll(arg, options) {
212
+ list(arg, options) {
217
213
  const args = arg;
218
- return request(this.ctx, "GET", "/library/publishers", [], [], false, args, options);
214
+ return request(this.ctx, "GET", "/library/collections", [], [], false, args, options);
219
215
  }
220
216
  create(arg, options) {
221
217
  const args = arg;
222
- return request(this.ctx, "POST", "/library/publishers", [], [], true, args, options);
223
- }
224
- listMine(arg, options) {
225
- const args = arg;
226
- return request(this.ctx, "GET", "/library/publishers/mine", [], [], false, args, options);
218
+ return request(this.ctx, "POST", "/library/collections", [], [], true, args, options);
227
219
  }
228
220
  update(arg, options) {
229
221
  const args = arg;
230
- return request(this.ctx, "PATCH", "/library/publishers/{publisherId}", ["publisherId"], [], true, args, options);
222
+ return request(this.ctx, "PATCH", "/library/collections/{collectionId}", ["collectionId"], [], true, args, options);
231
223
  }
232
224
  delete(arg, options) {
233
- const args = typeof arg === "string" ? { publisherId: arg } : arg;
234
- return request(this.ctx, "DELETE", "/library/publishers/{publisherId}", ["publisherId"], [], false, args, options);
225
+ const args = typeof arg === "string" ? { collectionId: arg } : arg;
226
+ return request(this.ctx, "DELETE", "/library/collections/{collectionId}", ["collectionId"], [], false, args, options);
235
227
  }
236
228
  };
237
229
  var LibraryItems = class {
238
230
  constructor(ctx) {
239
231
  this.ctx = ctx;
240
232
  }
241
- listFeatured(arg, options) {
242
- const args = arg;
243
- return request(this.ctx, "GET", "/library/items/featured", [], [], false, args, options);
244
- }
245
233
  update(arg, options) {
246
234
  const args = arg;
247
235
  return request(this.ctx, "PATCH", "/library/items/{itemId}", ["itemId"], [], true, args, options);
@@ -254,7 +242,7 @@ var LibraryItems = class {
254
242
  var Library = class {
255
243
  constructor(ctx) {
256
244
  this.ctx = ctx;
257
- this.publishers = new LibraryPublishers(this.ctx);
245
+ this.collections = new LibraryCollections(this.ctx);
258
246
  this.items = new LibraryItems(this.ctx);
259
247
  }
260
248
  };
@@ -323,8 +311,8 @@ var ExamsSessions = class {
323
311
  return request(this.ctx, "POST", "/exams/{examId}/sessions", ["examId"], [], true, args, options);
324
312
  }
325
313
  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);
314
+ const args = arg;
315
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/scan", ["examId"], [], true, args, options);
328
316
  }
329
317
  releaseGrades(arg, options) {
330
318
  const args = arg;
@@ -485,6 +473,42 @@ var Exams = class {
485
473
  return request(this.ctx, "GET", "/exams/{examId}/context-suggestions", ["examId"], [], false, args, options);
486
474
  }
487
475
  };
476
+ var Orgs = class {
477
+ constructor(ctx) {
478
+ this.ctx = ctx;
479
+ }
480
+ list(arg, options) {
481
+ const args = arg;
482
+ return request(this.ctx, "GET", "/orgs", [], ["includeUnconfirmed"], false, args, options);
483
+ }
484
+ create(arg, options) {
485
+ const args = arg;
486
+ return request(this.ctx, "POST", "/orgs", [], [], true, args, options);
487
+ }
488
+ join(arg, options) {
489
+ const args = typeof arg === "string" ? { orgId: arg } : arg;
490
+ return request(this.ctx, "POST", "/orgs/{orgId}/join", ["orgId"], [], false, args, options);
491
+ }
492
+ };
493
+ var SearchTokens = class {
494
+ constructor(ctx) {
495
+ this.ctx = ctx;
496
+ }
497
+ get(arg, options) {
498
+ const args = arg;
499
+ return request(this.ctx, "GET", "/search/tokens", [], [], false, args, options);
500
+ }
501
+ getPublic(arg, options) {
502
+ const args = arg;
503
+ return request(this.ctx, "GET", "/search/tokens/public", [], [], false, args, options);
504
+ }
505
+ };
506
+ var Search = class {
507
+ constructor(ctx) {
508
+ this.ctx = ctx;
509
+ this.tokens = new SearchTokens(this.ctx);
510
+ }
511
+ };
488
512
  var MeTwoFactor = class {
489
513
  constructor(ctx) {
490
514
  this.ctx = ctx;
@@ -515,6 +539,10 @@ var Me = class {
515
539
  const args = arg;
516
540
  return request(this.ctx, "PATCH", "/me", [], [], true, args, options);
517
541
  }
542
+ updateEmail(arg, options) {
543
+ const args = arg;
544
+ return request(this.ctx, "PATCH", "/me/email", [], [], true, args, options);
545
+ }
518
546
  };
519
547
  var Media = class {
520
548
  constructor(ctx) {
@@ -544,39 +572,88 @@ var OrgCustomDomain = class {
544
572
  return request(this.ctx, "POST", "/org/custom-domain", [], [], true, args, options);
545
573
  }
546
574
  };
547
- var Org = class {
575
+ var OrgEmailDomains = class {
548
576
  constructor(ctx) {
549
577
  this.ctx = ctx;
550
- this.customDomain = new OrgCustomDomain(this.ctx);
551
578
  }
552
- get(arg, options) {
579
+ list(arg, options) {
553
580
  const args = arg;
554
- return request(this.ctx, "GET", "/org", [], [], false, args, options);
581
+ return request(this.ctx, "GET", "/org/email-domains", [], [], false, args, options);
582
+ }
583
+ create(arg, options) {
584
+ const args = arg;
585
+ return request(this.ctx, "POST", "/org/email-domains", [], [], true, args, options);
555
586
  }
556
587
  update(arg, options) {
557
588
  const args = arg;
558
- return request(this.ctx, "PATCH", "/org", [], [], true, args, options);
589
+ return request(this.ctx, "PATCH", "/org/email-domains/{domain}", ["domain"], [], true, args, options);
559
590
  }
560
591
  delete(arg, options) {
592
+ const args = typeof arg === "string" ? { domain: arg } : arg;
593
+ return request(this.ctx, "DELETE", "/org/email-domains/{domain}", ["domain"], [], false, args, options);
594
+ }
595
+ verify(arg, options) {
596
+ const args = typeof arg === "string" ? { domain: arg } : arg;
597
+ return request(this.ctx, "POST", "/org/email-domains/{domain}/verify", ["domain"], [], false, args, options);
598
+ }
599
+ };
600
+ var OrgIdentityProvider = class {
601
+ constructor(ctx) {
602
+ this.ctx = ctx;
603
+ }
604
+ get(arg, options) {
561
605
  const args = arg;
562
- return request(this.ctx, "DELETE", "/org", [], [], false, args, options);
606
+ return request(this.ctx, "GET", "/org/identity-provider", [], [], false, args, options);
563
607
  }
564
- limits(arg, options) {
608
+ update(arg, options) {
565
609
  const args = arg;
566
- return request(this.ctx, "GET", "/org/limits", [], [], false, args, options);
610
+ return request(this.ctx, "POST", "/org/identity-provider", [], [], true, args, options);
611
+ }
612
+ delete(arg, options) {
613
+ const args = arg;
614
+ return request(this.ctx, "DELETE", "/org/identity-provider", [], [], false, args, options);
567
615
  }
568
616
  };
569
- var Orgs = class {
617
+ var OrgJoinRequests = class {
570
618
  constructor(ctx) {
571
619
  this.ctx = ctx;
572
620
  }
573
621
  list(arg, options) {
574
622
  const args = arg;
575
- return request(this.ctx, "GET", "/orgs", [], [], false, args, options);
623
+ return request(this.ctx, "GET", "/org/join-requests", [], [], false, args, options);
576
624
  }
577
- create(arg, options) {
625
+ approve(arg, options) {
578
626
  const args = arg;
579
- return request(this.ctx, "POST", "/orgs", [], [], true, args, options);
627
+ return request(this.ctx, "POST", "/org/join-requests/{userId}/approve", ["userId"], [], true, args, options);
628
+ }
629
+ reject(arg, options) {
630
+ const args = typeof arg === "string" ? { userId: arg } : arg;
631
+ return request(this.ctx, "POST", "/org/join-requests/{userId}/reject", ["userId"], [], false, args, options);
632
+ }
633
+ };
634
+ var Org = class {
635
+ constructor(ctx) {
636
+ this.ctx = ctx;
637
+ this.customDomain = new OrgCustomDomain(this.ctx);
638
+ this.emailDomains = new OrgEmailDomains(this.ctx);
639
+ this.identityProvider = new OrgIdentityProvider(this.ctx);
640
+ this.joinRequests = new OrgJoinRequests(this.ctx);
641
+ }
642
+ get(arg, options) {
643
+ const args = arg;
644
+ return request(this.ctx, "GET", "/org", [], [], false, args, options);
645
+ }
646
+ update(arg, options) {
647
+ const args = arg;
648
+ return request(this.ctx, "PATCH", "/org", [], [], true, args, options);
649
+ }
650
+ delete(arg, options) {
651
+ const args = arg;
652
+ return request(this.ctx, "DELETE", "/org", [], [], false, args, options);
653
+ }
654
+ limits(arg, options) {
655
+ const args = arg;
656
+ return request(this.ctx, "GET", "/org/limits", [], [], false, args, options);
580
657
  }
581
658
  };
582
659
  var AuditLogs = class {
@@ -811,6 +888,10 @@ var SourceMaterials = class {
811
888
  const args = arg;
812
889
  return request(this.ctx, "POST", "/source-materials", [], [], true, args, options);
813
890
  }
891
+ listTags(arg, options) {
892
+ const args = arg;
893
+ return request(this.ctx, "GET", "/source-materials/tags", [], [], false, args, options);
894
+ }
814
895
  get(arg, options) {
815
896
  const args = typeof arg === "string" ? { id: arg } : arg;
816
897
  return request(this.ctx, "GET", "/source-materials/{id}", ["id"], [], false, args, options);
@@ -849,6 +930,10 @@ var Folders = class {
849
930
  const args = arg;
850
931
  return request(this.ctx, "POST", "/folders", [], [], true, args, options);
851
932
  }
933
+ get(arg, options) {
934
+ const args = typeof arg === "string" ? { id: arg } : arg;
935
+ return request(this.ctx, "GET", "/folders/{id}", ["id"], [], false, args, options);
936
+ }
852
937
  update(arg, options) {
853
938
  const args = arg;
854
939
  return request(this.ctx, "PATCH", "/folders/{id}", ["id"], [], true, args, options);
@@ -979,10 +1064,11 @@ var Examplary = class {
979
1064
  this.oauth = new Oauth(this.ctx);
980
1065
  this.embedSessions = new EmbedSessions(this.ctx);
981
1066
  this.exams = new Exams(this.ctx);
1067
+ this.orgs = new Orgs(this.ctx);
1068
+ this.search = new Search(this.ctx);
982
1069
  this.me = new Me(this.ctx);
983
1070
  this.media = new Media(this.ctx);
984
1071
  this.org = new Org(this.ctx);
985
- this.orgs = new Orgs(this.ctx);
986
1072
  this.auditLogs = new AuditLogs(this.ctx);
987
1073
  this.apiKeys = new ApiKeys(this.ctx);
988
1074
  this.attributes = new Attributes(this.ctx);
@@ -1000,14 +1086,6 @@ var Examplary = class {
1000
1086
  this.prompts = new Prompts(this.ctx);
1001
1087
  this.jobs = new Jobs(this.ctx);
1002
1088
  }
1003
- postExamsId(arg, options) {
1004
- const args = typeof arg === "string" ? { id: arg } : arg;
1005
- return request(this.ctx, "POST", "/exams/{id}", ["id"], [], false, args, options);
1006
- }
1007
- postFoldersId(arg, options) {
1008
- const args = arg;
1009
- return request(this.ctx, "POST", "/folders/{id}", ["id"], [], true, args, options);
1010
- }
1011
1089
  getRubrics(arg, options) {
1012
1090
  const args = arg;
1013
1091
  return request(this.ctx, "GET", "/rubrics", [], [], false, args, options);