@examplary/sdk 2.16.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.mjs CHANGED
@@ -156,57 +156,45 @@ var QuestionTypes = class {
156
156
  return request(this.ctx, "POST", "/question-types/{questionTypeId}/disable", ["questionTypeId"], [], false, args, options);
157
157
  }
158
158
  };
159
- var LibraryPublishersItems = class {
159
+ var LibraryCollectionsItems = class {
160
160
  constructor(ctx) {
161
161
  this.ctx = ctx;
162
162
  }
163
163
  list(arg, options) {
164
- const args = typeof arg === "string" ? { publisherId: arg } : arg;
165
- return request(this.ctx, "GET", "/library/publishers/{publisherId}/items", ["publisherId"], [], false, args, options);
164
+ const args = typeof arg === "string" ? { collectionId: arg } : arg;
165
+ return request(this.ctx, "GET", "/library/collections/{collectionId}/items", ["collectionId"], [], false, args, options);
166
166
  }
167
167
  create(arg, options) {
168
168
  const args = arg;
169
- return request(this.ctx, "POST", "/library/publishers/{publisherId}/items", ["publisherId"], [], true, args, options);
169
+ return request(this.ctx, "POST", "/library/collections/{collectionId}/items", ["collectionId"], [], true, args, options);
170
170
  }
171
171
  };
172
- var LibraryPublishers = class {
172
+ var LibraryCollections = class {
173
173
  constructor(ctx) {
174
174
  this.ctx = ctx;
175
- this.items = new LibraryPublishersItems(this.ctx);
175
+ this.items = new LibraryCollectionsItems(this.ctx);
176
176
  }
177
- listFeatured(arg, options) {
178
- const args = arg;
179
- return request(this.ctx, "GET", "/library/publishers/featured", [], [], false, args, options);
180
- }
181
- listAll(arg, options) {
177
+ list(arg, options) {
182
178
  const args = arg;
183
- return request(this.ctx, "GET", "/library/publishers", [], [], false, args, options);
179
+ return request(this.ctx, "GET", "/library/collections", [], [], false, args, options);
184
180
  }
185
181
  create(arg, options) {
186
182
  const args = arg;
187
- return request(this.ctx, "POST", "/library/publishers", [], [], true, args, options);
188
- }
189
- listMine(arg, options) {
190
- const args = arg;
191
- return request(this.ctx, "GET", "/library/publishers/mine", [], [], false, args, options);
183
+ return request(this.ctx, "POST", "/library/collections", [], [], true, args, options);
192
184
  }
193
185
  update(arg, options) {
194
186
  const args = arg;
195
- return request(this.ctx, "PATCH", "/library/publishers/{publisherId}", ["publisherId"], [], true, args, options);
187
+ return request(this.ctx, "PATCH", "/library/collections/{collectionId}", ["collectionId"], [], true, args, options);
196
188
  }
197
189
  delete(arg, options) {
198
- const args = typeof arg === "string" ? { publisherId: arg } : arg;
199
- return request(this.ctx, "DELETE", "/library/publishers/{publisherId}", ["publisherId"], [], false, args, options);
190
+ const args = typeof arg === "string" ? { collectionId: arg } : arg;
191
+ return request(this.ctx, "DELETE", "/library/collections/{collectionId}", ["collectionId"], [], false, args, options);
200
192
  }
201
193
  };
202
194
  var LibraryItems = class {
203
195
  constructor(ctx) {
204
196
  this.ctx = ctx;
205
197
  }
206
- listFeatured(arg, options) {
207
- const args = arg;
208
- return request(this.ctx, "GET", "/library/items/featured", [], [], false, args, options);
209
- }
210
198
  update(arg, options) {
211
199
  const args = arg;
212
200
  return request(this.ctx, "PATCH", "/library/items/{itemId}", ["itemId"], [], true, args, options);
@@ -219,7 +207,7 @@ var LibraryItems = class {
219
207
  var Library = class {
220
208
  constructor(ctx) {
221
209
  this.ctx = ctx;
222
- this.publishers = new LibraryPublishers(this.ctx);
210
+ this.collections = new LibraryCollections(this.ctx);
223
211
  this.items = new LibraryItems(this.ctx);
224
212
  }
225
213
  };
@@ -450,6 +438,42 @@ var Exams = class {
450
438
  return request(this.ctx, "GET", "/exams/{examId}/context-suggestions", ["examId"], [], false, args, options);
451
439
  }
452
440
  };
441
+ var Orgs = class {
442
+ constructor(ctx) {
443
+ this.ctx = ctx;
444
+ }
445
+ list(arg, options) {
446
+ const args = arg;
447
+ return request(this.ctx, "GET", "/orgs", [], ["includeUnconfirmed"], false, args, options);
448
+ }
449
+ create(arg, options) {
450
+ const args = arg;
451
+ return request(this.ctx, "POST", "/orgs", [], [], true, args, options);
452
+ }
453
+ join(arg, options) {
454
+ const args = typeof arg === "string" ? { orgId: arg } : arg;
455
+ return request(this.ctx, "POST", "/orgs/{orgId}/join", ["orgId"], [], false, args, options);
456
+ }
457
+ };
458
+ var SearchTokens = class {
459
+ constructor(ctx) {
460
+ this.ctx = ctx;
461
+ }
462
+ get(arg, options) {
463
+ const args = arg;
464
+ return request(this.ctx, "GET", "/search/tokens", [], [], false, args, options);
465
+ }
466
+ getPublic(arg, options) {
467
+ const args = arg;
468
+ return request(this.ctx, "GET", "/search/tokens/public", [], [], false, args, options);
469
+ }
470
+ };
471
+ var Search = class {
472
+ constructor(ctx) {
473
+ this.ctx = ctx;
474
+ this.tokens = new SearchTokens(this.ctx);
475
+ }
476
+ };
453
477
  var MeTwoFactor = class {
454
478
  constructor(ctx) {
455
479
  this.ctx = ctx;
@@ -480,6 +504,10 @@ var Me = class {
480
504
  const args = arg;
481
505
  return request(this.ctx, "PATCH", "/me", [], [], true, args, options);
482
506
  }
507
+ updateEmail(arg, options) {
508
+ const args = arg;
509
+ return request(this.ctx, "PATCH", "/me/email", [], [], true, args, options);
510
+ }
483
511
  };
484
512
  var Media = class {
485
513
  constructor(ctx) {
@@ -509,6 +537,31 @@ var OrgCustomDomain = class {
509
537
  return request(this.ctx, "POST", "/org/custom-domain", [], [], true, args, options);
510
538
  }
511
539
  };
540
+ var OrgEmailDomains = class {
541
+ constructor(ctx) {
542
+ this.ctx = ctx;
543
+ }
544
+ list(arg, options) {
545
+ const args = arg;
546
+ return request(this.ctx, "GET", "/org/email-domains", [], [], false, args, options);
547
+ }
548
+ create(arg, options) {
549
+ const args = arg;
550
+ return request(this.ctx, "POST", "/org/email-domains", [], [], true, args, options);
551
+ }
552
+ update(arg, options) {
553
+ const args = arg;
554
+ return request(this.ctx, "PATCH", "/org/email-domains/{domain}", ["domain"], [], true, args, options);
555
+ }
556
+ delete(arg, options) {
557
+ const args = typeof arg === "string" ? { domain: arg } : arg;
558
+ return request(this.ctx, "DELETE", "/org/email-domains/{domain}", ["domain"], [], false, args, options);
559
+ }
560
+ verify(arg, options) {
561
+ const args = typeof arg === "string" ? { domain: arg } : arg;
562
+ return request(this.ctx, "POST", "/org/email-domains/{domain}/verify", ["domain"], [], false, args, options);
563
+ }
564
+ };
512
565
  var OrgIdentityProvider = class {
513
566
  constructor(ctx) {
514
567
  this.ctx = ctx;
@@ -526,11 +579,30 @@ var OrgIdentityProvider = class {
526
579
  return request(this.ctx, "DELETE", "/org/identity-provider", [], [], false, args, options);
527
580
  }
528
581
  };
582
+ var OrgJoinRequests = class {
583
+ constructor(ctx) {
584
+ this.ctx = ctx;
585
+ }
586
+ list(arg, options) {
587
+ const args = arg;
588
+ return request(this.ctx, "GET", "/org/join-requests", [], [], false, args, options);
589
+ }
590
+ approve(arg, options) {
591
+ const args = arg;
592
+ return request(this.ctx, "POST", "/org/join-requests/{userId}/approve", ["userId"], [], true, args, options);
593
+ }
594
+ reject(arg, options) {
595
+ const args = typeof arg === "string" ? { userId: arg } : arg;
596
+ return request(this.ctx, "POST", "/org/join-requests/{userId}/reject", ["userId"], [], false, args, options);
597
+ }
598
+ };
529
599
  var Org = class {
530
600
  constructor(ctx) {
531
601
  this.ctx = ctx;
532
602
  this.customDomain = new OrgCustomDomain(this.ctx);
603
+ this.emailDomains = new OrgEmailDomains(this.ctx);
533
604
  this.identityProvider = new OrgIdentityProvider(this.ctx);
605
+ this.joinRequests = new OrgJoinRequests(this.ctx);
534
606
  }
535
607
  get(arg, options) {
536
608
  const args = arg;
@@ -549,19 +621,6 @@ var Org = class {
549
621
  return request(this.ctx, "GET", "/org/limits", [], [], false, args, options);
550
622
  }
551
623
  };
552
- var Orgs = class {
553
- constructor(ctx) {
554
- this.ctx = ctx;
555
- }
556
- list(arg, options) {
557
- const args = arg;
558
- return request(this.ctx, "GET", "/orgs", [], [], false, args, options);
559
- }
560
- create(arg, options) {
561
- const args = arg;
562
- return request(this.ctx, "POST", "/orgs", [], [], true, args, options);
563
- }
564
- };
565
624
  var AuditLogs = class {
566
625
  constructor(ctx) {
567
626
  this.ctx = ctx;
@@ -794,6 +853,10 @@ var SourceMaterials = class {
794
853
  const args = arg;
795
854
  return request(this.ctx, "POST", "/source-materials", [], [], true, args, options);
796
855
  }
856
+ listTags(arg, options) {
857
+ const args = arg;
858
+ return request(this.ctx, "GET", "/source-materials/tags", [], [], false, args, options);
859
+ }
797
860
  get(arg, options) {
798
861
  const args = typeof arg === "string" ? { id: arg } : arg;
799
862
  return request(this.ctx, "GET", "/source-materials/{id}", ["id"], [], false, args, options);
@@ -832,6 +895,10 @@ var Folders = class {
832
895
  const args = arg;
833
896
  return request(this.ctx, "POST", "/folders", [], [], true, args, options);
834
897
  }
898
+ get(arg, options) {
899
+ const args = typeof arg === "string" ? { id: arg } : arg;
900
+ return request(this.ctx, "GET", "/folders/{id}", ["id"], [], false, args, options);
901
+ }
835
902
  update(arg, options) {
836
903
  const args = arg;
837
904
  return request(this.ctx, "PATCH", "/folders/{id}", ["id"], [], true, args, options);
@@ -962,10 +1029,11 @@ var Examplary = class {
962
1029
  this.oauth = new Oauth(this.ctx);
963
1030
  this.embedSessions = new EmbedSessions(this.ctx);
964
1031
  this.exams = new Exams(this.ctx);
1032
+ this.orgs = new Orgs(this.ctx);
1033
+ this.search = new Search(this.ctx);
965
1034
  this.me = new Me(this.ctx);
966
1035
  this.media = new Media(this.ctx);
967
1036
  this.org = new Org(this.ctx);
968
- this.orgs = new Orgs(this.ctx);
969
1037
  this.auditLogs = new AuditLogs(this.ctx);
970
1038
  this.apiKeys = new ApiKeys(this.ctx);
971
1039
  this.attributes = new Attributes(this.ctx);