@examplary/sdk 2.9.0 → 2.11.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.d.mts CHANGED
@@ -425,6 +425,26 @@ interface paths {
425
425
  patch?: never;
426
426
  trace?: never;
427
427
  };
428
+ "/exams/{id}/sessions/release-grades": {
429
+ parameters: {
430
+ query?: never;
431
+ header?: never;
432
+ path?: never;
433
+ cookie?: never;
434
+ };
435
+ get?: never;
436
+ put?: never;
437
+ /**
438
+ * Release grades
439
+ * @description Release grades for all sessions in an exam, optionally sending notifications to students.
440
+ */
441
+ post: operations["exams.sessions.releaseGrades"];
442
+ delete?: never;
443
+ options?: never;
444
+ head?: never;
445
+ patch?: never;
446
+ trace?: never;
447
+ };
428
448
  "/exams/{id}/sessions/scan-images": {
429
449
  parameters: {
430
450
  query?: never;
@@ -508,11 +528,31 @@ interface paths {
508
528
  head?: never;
509
529
  /**
510
530
  * Update session
511
- * @description Update an exam session. Currently supports renaming the student, which is not allowed for sessions taken by a signed-in student.
531
+ * @description Update an exam session. Currently supports renaming the student, which is not allowed for sessions connected to a user account.
512
532
  */
513
533
  patch: operations["exams.sessions.update"];
514
534
  trace?: never;
515
535
  };
536
+ "/exams/{id}/sessions/{sessionId}/user": {
537
+ parameters: {
538
+ query?: never;
539
+ header?: never;
540
+ path?: never;
541
+ cookie?: never;
542
+ };
543
+ get?: never;
544
+ /**
545
+ * Assign session to user
546
+ * @description Connect an anonymous exam session to a student account, by user ID or email address (inviting a new student if needed). Optionally notifies the student that their results are available for review. Only allowed when the session is not connected to a user yet.
547
+ */
548
+ put: operations["exams.sessions.assignUser"];
549
+ post?: never;
550
+ delete?: never;
551
+ options?: never;
552
+ head?: never;
553
+ patch?: never;
554
+ trace?: never;
555
+ };
516
556
  "/exams/{id}/sessions/{sessionId}/feedback": {
517
557
  parameters: {
518
558
  query?: never;
@@ -3278,6 +3318,24 @@ interface operations {
3278
3318
  requestBody?: never;
3279
3319
  responses: never;
3280
3320
  };
3321
+ "exams.sessions.releaseGrades": {
3322
+ parameters: {
3323
+ query?: never;
3324
+ header?: never;
3325
+ path: {
3326
+ id: string;
3327
+ };
3328
+ cookie?: never;
3329
+ };
3330
+ requestBody?: {
3331
+ content: {
3332
+ "application/json": {
3333
+ sendNotification?: boolean;
3334
+ };
3335
+ };
3336
+ };
3337
+ responses: never;
3338
+ };
3281
3339
  "exams.sessions.scanImages": {
3282
3340
  parameters: {
3283
3341
  query?: never;
@@ -3381,6 +3439,33 @@ interface operations {
3381
3439
  };
3382
3440
  responses: never;
3383
3441
  };
3442
+ "exams.sessions.assignUser": {
3443
+ parameters: {
3444
+ query?: never;
3445
+ header?: never;
3446
+ path: {
3447
+ id: string;
3448
+ sessionId: string;
3449
+ };
3450
+ cookie?: never;
3451
+ };
3452
+ requestBody?: {
3453
+ content: {
3454
+ "application/json": {
3455
+ user: string;
3456
+ sendNotification?: boolean;
3457
+ } | {
3458
+ /**
3459
+ * Format: email
3460
+ * @description The email of the student to link. Creates a new student account if no user with this email exists yet.
3461
+ */
3462
+ email: string;
3463
+ sendNotification?: boolean;
3464
+ };
3465
+ };
3466
+ };
3467
+ responses: never;
3468
+ };
3384
3469
  "exams.sessions.saveFeedback": {
3385
3470
  parameters: {
3386
3471
  query?: never;
@@ -3527,6 +3612,8 @@ interface operations {
3527
3612
  inReplyTo?: string;
3528
3613
  /** @enum {string} */
3529
3614
  status?: "open" | "resolved";
3615
+ /** @enum {string} */
3616
+ visibility?: "public" | "private";
3530
3617
  /** @description Question ID the comment is attached to */
3531
3618
  question: string;
3532
3619
  };
@@ -3571,6 +3658,8 @@ interface operations {
3571
3658
  inReplyTo?: string;
3572
3659
  /** @enum {string} */
3573
3660
  status?: "open" | "resolved";
3661
+ /** @enum {string} */
3662
+ visibility?: "public" | "private";
3574
3663
  };
3575
3664
  };
3576
3665
  };
@@ -4423,6 +4512,8 @@ interface operations {
4423
4512
  q: string;
4424
4513
  /** @description Type of entity to search */
4425
4514
  type?: "user" | "group";
4515
+ /** @description Filter by user role */
4516
+ role?: "owner" | "admin" | "teacher" | "student" | "member";
4426
4517
  };
4427
4518
  header?: never;
4428
4519
  path?: never;
@@ -4789,6 +4880,12 @@ interface operations {
4789
4880
  passcode?: string | null;
4790
4881
  startDateTime?: string | null;
4791
4882
  endDateTime?: string | null;
4883
+ reviewPublished?: boolean | null;
4884
+ reviewNotificationsSent?: boolean | null;
4885
+ reviewShowGrade?: boolean | null;
4886
+ reviewShowPoints?: boolean | null;
4887
+ reviewShowFeedback?: boolean | null;
4888
+ reviewShowComments?: boolean | null;
4792
4889
  showPoints?: boolean | null;
4793
4890
  showFeedback?: boolean | null;
4794
4891
  showTableOfContents?: boolean | null;
@@ -4891,6 +4988,12 @@ interface operations {
4891
4988
  passcode?: string | null;
4892
4989
  startDateTime?: string | null;
4893
4990
  endDateTime?: string | null;
4991
+ reviewPublished?: boolean | null;
4992
+ reviewNotificationsSent?: boolean | null;
4993
+ reviewShowGrade?: boolean | null;
4994
+ reviewShowPoints?: boolean | null;
4995
+ reviewShowFeedback?: boolean | null;
4996
+ reviewShowComments?: boolean | null;
4894
4997
  showPoints?: boolean | null;
4895
4998
  showFeedback?: boolean | null;
4896
4999
  showTableOfContents?: boolean | null;
@@ -6443,6 +6546,9 @@ interface _PathOverrides {
6443
6546
  "exams.sessions.scan": {
6444
6547
  examId: string;
6445
6548
  };
6549
+ "exams.sessions.releaseGrades": {
6550
+ examId: string;
6551
+ };
6446
6552
  "exams.sessions.scanImages": {
6447
6553
  examId: string;
6448
6554
  };
@@ -6464,6 +6570,10 @@ interface _PathOverrides {
6464
6570
  examId: string;
6465
6571
  sessionId: string;
6466
6572
  };
6573
+ "exams.sessions.assignUser": {
6574
+ examId: string;
6575
+ sessionId: string;
6576
+ };
6467
6577
  "exams.sessions.saveFeedback": {
6468
6578
  examId: string;
6469
6579
  sessionId: string;
@@ -7046,6 +7156,14 @@ declare class ExamsSessions {
7046
7156
  */
7047
7157
  scan(examId: string, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.scan">>;
7048
7158
  scan(args: Args<"exams.sessions.scan">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.scan">>;
7159
+ /**
7160
+ * Release grades
7161
+ *
7162
+ * Release grades for all sessions in an exam, optionally sending notifications to students.
7163
+ *
7164
+ * API endpoint: `POST /exams/{examId}/sessions/release-grades`
7165
+ */
7166
+ releaseGrades(args: Args<"exams.sessions.releaseGrades">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.releaseGrades">>;
7049
7167
  /**
7050
7168
  * Scan images for student answers
7051
7169
  *
@@ -7089,11 +7207,19 @@ declare class ExamsSessions {
7089
7207
  /**
7090
7208
  * Update session
7091
7209
  *
7092
- * Update an exam session. Currently supports renaming the student, which is not allowed for sessions taken by a signed-in student.
7210
+ * Update an exam session. Currently supports renaming the student, which is not allowed for sessions connected to a user account.
7093
7211
  *
7094
7212
  * API endpoint: `PATCH /exams/{examId}/sessions/{sessionId}`
7095
7213
  */
7096
7214
  update(args: Args<"exams.sessions.update">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.update">>;
7215
+ /**
7216
+ * Assign session to user
7217
+ *
7218
+ * Connect an anonymous exam session to a student account, by user ID or email address (inviting a new student if needed). Optionally notifies the student that their results are available for review. Only allowed when the session is not connected to a user yet.
7219
+ *
7220
+ * API endpoint: `PUT /exams/{examId}/sessions/{sessionId}/user`
7221
+ */
7222
+ assignUser(args: Args<"exams.sessions.assignUser">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.assignUser">>;
7097
7223
  /**
7098
7224
  * Provide feedback
7099
7225
  *
package/dist/index.d.ts CHANGED
@@ -425,6 +425,26 @@ interface paths {
425
425
  patch?: never;
426
426
  trace?: never;
427
427
  };
428
+ "/exams/{id}/sessions/release-grades": {
429
+ parameters: {
430
+ query?: never;
431
+ header?: never;
432
+ path?: never;
433
+ cookie?: never;
434
+ };
435
+ get?: never;
436
+ put?: never;
437
+ /**
438
+ * Release grades
439
+ * @description Release grades for all sessions in an exam, optionally sending notifications to students.
440
+ */
441
+ post: operations["exams.sessions.releaseGrades"];
442
+ delete?: never;
443
+ options?: never;
444
+ head?: never;
445
+ patch?: never;
446
+ trace?: never;
447
+ };
428
448
  "/exams/{id}/sessions/scan-images": {
429
449
  parameters: {
430
450
  query?: never;
@@ -508,11 +528,31 @@ interface paths {
508
528
  head?: never;
509
529
  /**
510
530
  * Update session
511
- * @description Update an exam session. Currently supports renaming the student, which is not allowed for sessions taken by a signed-in student.
531
+ * @description Update an exam session. Currently supports renaming the student, which is not allowed for sessions connected to a user account.
512
532
  */
513
533
  patch: operations["exams.sessions.update"];
514
534
  trace?: never;
515
535
  };
536
+ "/exams/{id}/sessions/{sessionId}/user": {
537
+ parameters: {
538
+ query?: never;
539
+ header?: never;
540
+ path?: never;
541
+ cookie?: never;
542
+ };
543
+ get?: never;
544
+ /**
545
+ * Assign session to user
546
+ * @description Connect an anonymous exam session to a student account, by user ID or email address (inviting a new student if needed). Optionally notifies the student that their results are available for review. Only allowed when the session is not connected to a user yet.
547
+ */
548
+ put: operations["exams.sessions.assignUser"];
549
+ post?: never;
550
+ delete?: never;
551
+ options?: never;
552
+ head?: never;
553
+ patch?: never;
554
+ trace?: never;
555
+ };
516
556
  "/exams/{id}/sessions/{sessionId}/feedback": {
517
557
  parameters: {
518
558
  query?: never;
@@ -3278,6 +3318,24 @@ interface operations {
3278
3318
  requestBody?: never;
3279
3319
  responses: never;
3280
3320
  };
3321
+ "exams.sessions.releaseGrades": {
3322
+ parameters: {
3323
+ query?: never;
3324
+ header?: never;
3325
+ path: {
3326
+ id: string;
3327
+ };
3328
+ cookie?: never;
3329
+ };
3330
+ requestBody?: {
3331
+ content: {
3332
+ "application/json": {
3333
+ sendNotification?: boolean;
3334
+ };
3335
+ };
3336
+ };
3337
+ responses: never;
3338
+ };
3281
3339
  "exams.sessions.scanImages": {
3282
3340
  parameters: {
3283
3341
  query?: never;
@@ -3381,6 +3439,33 @@ interface operations {
3381
3439
  };
3382
3440
  responses: never;
3383
3441
  };
3442
+ "exams.sessions.assignUser": {
3443
+ parameters: {
3444
+ query?: never;
3445
+ header?: never;
3446
+ path: {
3447
+ id: string;
3448
+ sessionId: string;
3449
+ };
3450
+ cookie?: never;
3451
+ };
3452
+ requestBody?: {
3453
+ content: {
3454
+ "application/json": {
3455
+ user: string;
3456
+ sendNotification?: boolean;
3457
+ } | {
3458
+ /**
3459
+ * Format: email
3460
+ * @description The email of the student to link. Creates a new student account if no user with this email exists yet.
3461
+ */
3462
+ email: string;
3463
+ sendNotification?: boolean;
3464
+ };
3465
+ };
3466
+ };
3467
+ responses: never;
3468
+ };
3384
3469
  "exams.sessions.saveFeedback": {
3385
3470
  parameters: {
3386
3471
  query?: never;
@@ -3527,6 +3612,8 @@ interface operations {
3527
3612
  inReplyTo?: string;
3528
3613
  /** @enum {string} */
3529
3614
  status?: "open" | "resolved";
3615
+ /** @enum {string} */
3616
+ visibility?: "public" | "private";
3530
3617
  /** @description Question ID the comment is attached to */
3531
3618
  question: string;
3532
3619
  };
@@ -3571,6 +3658,8 @@ interface operations {
3571
3658
  inReplyTo?: string;
3572
3659
  /** @enum {string} */
3573
3660
  status?: "open" | "resolved";
3661
+ /** @enum {string} */
3662
+ visibility?: "public" | "private";
3574
3663
  };
3575
3664
  };
3576
3665
  };
@@ -4423,6 +4512,8 @@ interface operations {
4423
4512
  q: string;
4424
4513
  /** @description Type of entity to search */
4425
4514
  type?: "user" | "group";
4515
+ /** @description Filter by user role */
4516
+ role?: "owner" | "admin" | "teacher" | "student" | "member";
4426
4517
  };
4427
4518
  header?: never;
4428
4519
  path?: never;
@@ -4789,6 +4880,12 @@ interface operations {
4789
4880
  passcode?: string | null;
4790
4881
  startDateTime?: string | null;
4791
4882
  endDateTime?: string | null;
4883
+ reviewPublished?: boolean | null;
4884
+ reviewNotificationsSent?: boolean | null;
4885
+ reviewShowGrade?: boolean | null;
4886
+ reviewShowPoints?: boolean | null;
4887
+ reviewShowFeedback?: boolean | null;
4888
+ reviewShowComments?: boolean | null;
4792
4889
  showPoints?: boolean | null;
4793
4890
  showFeedback?: boolean | null;
4794
4891
  showTableOfContents?: boolean | null;
@@ -4891,6 +4988,12 @@ interface operations {
4891
4988
  passcode?: string | null;
4892
4989
  startDateTime?: string | null;
4893
4990
  endDateTime?: string | null;
4991
+ reviewPublished?: boolean | null;
4992
+ reviewNotificationsSent?: boolean | null;
4993
+ reviewShowGrade?: boolean | null;
4994
+ reviewShowPoints?: boolean | null;
4995
+ reviewShowFeedback?: boolean | null;
4996
+ reviewShowComments?: boolean | null;
4894
4997
  showPoints?: boolean | null;
4895
4998
  showFeedback?: boolean | null;
4896
4999
  showTableOfContents?: boolean | null;
@@ -6443,6 +6546,9 @@ interface _PathOverrides {
6443
6546
  "exams.sessions.scan": {
6444
6547
  examId: string;
6445
6548
  };
6549
+ "exams.sessions.releaseGrades": {
6550
+ examId: string;
6551
+ };
6446
6552
  "exams.sessions.scanImages": {
6447
6553
  examId: string;
6448
6554
  };
@@ -6464,6 +6570,10 @@ interface _PathOverrides {
6464
6570
  examId: string;
6465
6571
  sessionId: string;
6466
6572
  };
6573
+ "exams.sessions.assignUser": {
6574
+ examId: string;
6575
+ sessionId: string;
6576
+ };
6467
6577
  "exams.sessions.saveFeedback": {
6468
6578
  examId: string;
6469
6579
  sessionId: string;
@@ -7046,6 +7156,14 @@ declare class ExamsSessions {
7046
7156
  */
7047
7157
  scan(examId: string, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.scan">>;
7048
7158
  scan(args: Args<"exams.sessions.scan">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.scan">>;
7159
+ /**
7160
+ * Release grades
7161
+ *
7162
+ * Release grades for all sessions in an exam, optionally sending notifications to students.
7163
+ *
7164
+ * API endpoint: `POST /exams/{examId}/sessions/release-grades`
7165
+ */
7166
+ releaseGrades(args: Args<"exams.sessions.releaseGrades">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.releaseGrades">>;
7049
7167
  /**
7050
7168
  * Scan images for student answers
7051
7169
  *
@@ -7089,11 +7207,19 @@ declare class ExamsSessions {
7089
7207
  /**
7090
7208
  * Update session
7091
7209
  *
7092
- * Update an exam session. Currently supports renaming the student, which is not allowed for sessions taken by a signed-in student.
7210
+ * Update an exam session. Currently supports renaming the student, which is not allowed for sessions connected to a user account.
7093
7211
  *
7094
7212
  * API endpoint: `PATCH /exams/{examId}/sessions/{sessionId}`
7095
7213
  */
7096
7214
  update(args: Args<"exams.sessions.update">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.update">>;
7215
+ /**
7216
+ * Assign session to user
7217
+ *
7218
+ * Connect an anonymous exam session to a student account, by user ID or email address (inviting a new student if needed). Optionally notifies the student that their results are available for review. Only allowed when the session is not connected to a user yet.
7219
+ *
7220
+ * API endpoint: `PUT /exams/{examId}/sessions/{sessionId}/user`
7221
+ */
7222
+ assignUser(args: Args<"exams.sessions.assignUser">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.assignUser">>;
7097
7223
  /**
7098
7224
  * Provide feedback
7099
7225
  *
package/dist/index.js CHANGED
@@ -326,6 +326,10 @@ var ExamsSessions = class {
326
326
  const args = typeof arg === "string" ? { examId: arg } : arg;
327
327
  return request(this.ctx, "POST", "/exams/{examId}/sessions/scan", ["examId"], [], false, args, options);
328
328
  }
329
+ releaseGrades(arg, options) {
330
+ const args = arg;
331
+ return request(this.ctx, "POST", "/exams/{examId}/sessions/release-grades", ["examId"], [], true, args, options);
332
+ }
329
333
  scanImages(arg, options) {
330
334
  const args = arg;
331
335
  return request(this.ctx, "POST", "/exams/{examId}/sessions/scan-images", ["examId"], [], true, args, options);
@@ -350,6 +354,10 @@ var ExamsSessions = class {
350
354
  const args = arg;
351
355
  return request(this.ctx, "PATCH", "/exams/{examId}/sessions/{sessionId}", ["examId", "sessionId"], [], true, args, options);
352
356
  }
357
+ assignUser(arg, options) {
358
+ const args = arg;
359
+ return request(this.ctx, "PUT", "/exams/{examId}/sessions/{sessionId}/user", ["examId", "sessionId"], [], true, args, options);
360
+ }
353
361
  saveFeedback(arg, options) {
354
362
  const args = arg;
355
363
  return request(this.ctx, "POST", "/exams/{examId}/sessions/{sessionId}/feedback", ["examId", "sessionId"], [], true, args, options);
@@ -619,7 +627,7 @@ var Permissions = class {
619
627
  }
620
628
  autocomplete(arg, options) {
621
629
  const args = arg;
622
- return request(this.ctx, "GET", "/permissions/autocomplete", [], ["q", "type"], false, args, options);
630
+ return request(this.ctx, "GET", "/permissions/autocomplete", [], ["q", "type", "role"], false, args, options);
623
631
  }
624
632
  list(arg, options) {
625
633
  const args = typeof arg === "string" ? { resource: arg } : arg;