@examplary/sdk 2.13.0 → 2.15.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
@@ -505,6 +505,30 @@ interface paths {
505
505
  patch?: never;
506
506
  trace?: never;
507
507
  };
508
+ "/exams/{id}/sessions/summary": {
509
+ parameters: {
510
+ query?: never;
511
+ header?: never;
512
+ path?: never;
513
+ cookie?: never;
514
+ };
515
+ /**
516
+ * Get results summary
517
+ * @description Get the stored AI-generated summary of the exam's results, if one has been generated.
518
+ */
519
+ get: operations["exams.sessions.getResultsSummary"];
520
+ put?: never;
521
+ /**
522
+ * Generate results summary
523
+ * @description Start a background task to generate an AI summary of the exam's results, highlighting what students are struggling with. Returns the stored summary directly when the results haven't changed since the last generation.
524
+ */
525
+ post: operations["exams.sessions.generateResultsSummary"];
526
+ delete?: never;
527
+ options?: never;
528
+ head?: never;
529
+ patch?: never;
530
+ trace?: never;
531
+ };
508
532
  "/exams/{id}/sessions/{sessionId}": {
509
533
  parameters: {
510
534
  query?: never;
@@ -785,6 +809,26 @@ interface paths {
785
809
  patch: operations["exams.questions.update"];
786
810
  trace?: never;
787
811
  };
812
+ "/exams/{id}/questions/{questionId}/quality": {
813
+ parameters: {
814
+ query?: never;
815
+ header?: never;
816
+ path?: never;
817
+ cookie?: never;
818
+ };
819
+ /**
820
+ * Get question quality score
821
+ * @description Retrieve the quality score of a question. This is an async endpoint - when called for the first time, it will trigger a quality assessment and return a status of `pending`. Subsequent calls will return the quality score once available. We recommend polling this endpoint every 5-10 seconds until the score is available.
822
+ */
823
+ get: operations["exams.questions.getQuality"];
824
+ put?: never;
825
+ post?: never;
826
+ delete?: never;
827
+ options?: never;
828
+ head?: never;
829
+ patch?: never;
830
+ trace?: never;
831
+ };
788
832
  "/exams/{id}/questions/{questionId}/generate": {
789
833
  parameters: {
790
834
  query?: never;
@@ -1041,6 +1085,34 @@ interface paths {
1041
1085
  patch: operations["me.update"];
1042
1086
  trace?: never;
1043
1087
  };
1088
+ "/me/two-factor": {
1089
+ parameters: {
1090
+ query?: never;
1091
+ header?: never;
1092
+ path?: never;
1093
+ cookie?: never;
1094
+ };
1095
+ /**
1096
+ * Get two-factor status
1097
+ * @description Check whether two-factor authentication is enabled for the current user, and whether the workspace requires it.
1098
+ */
1099
+ get: operations["me.twoFactor.get"];
1100
+ put?: never;
1101
+ /**
1102
+ * Enable two-factor authentication
1103
+ * @description Turn on two-factor authentication, after an authenticator app has been registered and verified with Cognito.
1104
+ */
1105
+ post: operations["me.twoFactor.enable"];
1106
+ /**
1107
+ * Disable two-factor authentication
1108
+ * @description Turn off two-factor authentication for the current user. Not allowed when the workspace requires it.
1109
+ */
1110
+ delete: operations["me.twoFactor.disable"];
1111
+ options?: never;
1112
+ head?: never;
1113
+ patch?: never;
1114
+ trace?: never;
1115
+ };
1044
1116
  "/media/upload": {
1045
1117
  parameters: {
1046
1118
  query?: never;
@@ -1468,6 +1540,26 @@ interface paths {
1468
1540
  patch: operations["users.update"];
1469
1541
  trace?: never;
1470
1542
  };
1543
+ "/users/{id}/two-factor": {
1544
+ parameters: {
1545
+ query?: never;
1546
+ header?: never;
1547
+ path?: never;
1548
+ cookie?: never;
1549
+ };
1550
+ get?: never;
1551
+ put?: never;
1552
+ post?: never;
1553
+ /**
1554
+ * Reset two-factor authentication
1555
+ * @description Remove a user's authenticator app, so they can sign in again after losing their device.
1556
+ */
1557
+ delete: operations["users.resetTwoFactor"];
1558
+ options?: never;
1559
+ head?: never;
1560
+ patch?: never;
1561
+ trace?: never;
1562
+ };
1471
1563
  "/practice-spaces": {
1472
1564
  parameters: {
1473
1565
  query?: never;
@@ -2375,7 +2467,7 @@ interface operations {
2375
2467
  type?: string;
2376
2468
  /** @description Title for the question (stem) */
2377
2469
  title?: string | null;
2378
- /** @description Optional description for the question */
2470
+ /** @description Optional HTML description for the question */
2379
2471
  description?: string | null;
2380
2472
  /** @description Settings for the question, often specific to the question type */
2381
2473
  settings?: {
@@ -2882,6 +2974,10 @@ interface operations {
2882
2974
  backgroundColor?: string;
2883
2975
  /** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
2884
2976
  locale?: string;
2977
+ /** @description Optional overrides for specific UI strings, keyed by string ID */
2978
+ strings?: {
2979
+ [key: string]: string;
2980
+ };
2885
2981
  };
2886
2982
  /** @description Additional key-value metadata */
2887
2983
  metadata?: {
@@ -2910,6 +3006,11 @@ interface operations {
2910
3006
  language?: string | null;
2911
3007
  intendedDuration?: unknown | null;
2912
3008
  allowedGenerationQuestionTypes?: string[] | null;
3009
+ hideStudentLevel?: boolean | null;
3010
+ hideSubject?: boolean | null;
3011
+ hideDuration?: boolean | null;
3012
+ hideQuestionTypes?: boolean | null;
3013
+ hideTaxonomy?: boolean | null;
2913
3014
  };
2914
3015
  } | {
2915
3016
  /** @description The user ID for whom the embed session is created */
@@ -2922,6 +3023,10 @@ interface operations {
2922
3023
  backgroundColor?: string;
2923
3024
  /** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
2924
3025
  locale?: string;
3026
+ /** @description Optional overrides for specific UI strings, keyed by string ID */
3027
+ strings?: {
3028
+ [key: string]: string;
3029
+ };
2925
3030
  };
2926
3031
  /** @description Additional key-value metadata */
2927
3032
  metadata?: {
@@ -2999,6 +3104,10 @@ interface operations {
2999
3104
  backgroundColor?: string;
3000
3105
  /** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
3001
3106
  locale?: string;
3107
+ /** @description Optional overrides for specific UI strings, keyed by string ID */
3108
+ strings?: {
3109
+ [key: string]: string;
3110
+ };
3002
3111
  };
3003
3112
  /** @description Additional key-value metadata */
3004
3113
  metadata?: {
@@ -3039,6 +3148,10 @@ interface operations {
3039
3148
  backgroundColor?: string;
3040
3149
  /** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
3041
3150
  locale?: string;
3151
+ /** @description Optional overrides for specific UI strings, keyed by string ID */
3152
+ strings?: {
3153
+ [key: string]: string;
3154
+ };
3042
3155
  };
3043
3156
  /** @description Additional key-value metadata */
3044
3157
  metadata?: {
@@ -3074,6 +3187,10 @@ interface operations {
3074
3187
  backgroundColor?: string;
3075
3188
  /** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
3076
3189
  locale?: string;
3190
+ /** @description Optional overrides for specific UI strings, keyed by string ID */
3191
+ strings?: {
3192
+ [key: string]: string;
3193
+ };
3077
3194
  };
3078
3195
  /** @description Additional key-value metadata */
3079
3196
  metadata?: {
@@ -3106,6 +3223,10 @@ interface operations {
3106
3223
  backgroundColor?: string;
3107
3224
  /** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
3108
3225
  locale?: string;
3226
+ /** @description Optional overrides for specific UI strings, keyed by string ID */
3227
+ strings?: {
3228
+ [key: string]: string;
3229
+ };
3109
3230
  };
3110
3231
  /** @description Additional key-value metadata */
3111
3232
  metadata?: {
@@ -3138,6 +3259,10 @@ interface operations {
3138
3259
  backgroundColor?: string;
3139
3260
  /** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
3140
3261
  locale?: string;
3262
+ /** @description Optional overrides for specific UI strings, keyed by string ID */
3263
+ strings?: {
3264
+ [key: string]: string;
3265
+ };
3141
3266
  };
3142
3267
  /** @description Additional key-value metadata */
3143
3268
  metadata?: {
@@ -3194,6 +3319,10 @@ interface operations {
3194
3319
  backgroundColor?: string;
3195
3320
  /** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
3196
3321
  locale?: string;
3322
+ /** @description Optional overrides for specific UI strings, keyed by string ID */
3323
+ strings?: {
3324
+ [key: string]: string;
3325
+ };
3197
3326
  };
3198
3327
  metadata: {
3199
3328
  [key: string]: unknown;
@@ -3245,6 +3374,10 @@ interface operations {
3245
3374
  backgroundColor?: string;
3246
3375
  /** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
3247
3376
  locale?: string;
3377
+ /** @description Optional overrides for specific UI strings, keyed by string ID */
3378
+ strings?: {
3379
+ [key: string]: string;
3380
+ };
3248
3381
  };
3249
3382
  metadata: {
3250
3383
  [key: string]: unknown;
@@ -3409,6 +3542,30 @@ interface operations {
3409
3542
  };
3410
3543
  responses: never;
3411
3544
  };
3545
+ "exams.sessions.getResultsSummary": {
3546
+ parameters: {
3547
+ query?: never;
3548
+ header?: never;
3549
+ path: {
3550
+ id: string;
3551
+ };
3552
+ cookie?: never;
3553
+ };
3554
+ requestBody?: never;
3555
+ responses: never;
3556
+ };
3557
+ "exams.sessions.generateResultsSummary": {
3558
+ parameters: {
3559
+ query?: never;
3560
+ header?: never;
3561
+ path: {
3562
+ id: string;
3563
+ };
3564
+ cookie?: never;
3565
+ };
3566
+ requestBody?: never;
3567
+ responses: never;
3568
+ };
3412
3569
  "exams.sessions.get": {
3413
3570
  parameters: {
3414
3571
  query?: never;
@@ -3696,7 +3853,7 @@ interface operations {
3696
3853
  name?: string;
3697
3854
  /** @description MIME type of the file, e.g. application/pdf */
3698
3855
  type?: string;
3699
- /** @description URL of the file, required if no content is specified. */
3856
+ /** @description URL of the file, required if no content is specified. Needs to be a HTTPS URL without basic auth or port. */
3700
3857
  url?: string;
3701
3858
  /** @description Content of the file as a string, as an alternative to URL. Only supported for exports from other systems (e.g. Moodle XML). */
3702
3859
  content?: string;
@@ -3807,6 +3964,46 @@ interface operations {
3807
3964
  };
3808
3965
  responses: never;
3809
3966
  };
3967
+ "exams.questions.getQuality": {
3968
+ parameters: {
3969
+ query?: never;
3970
+ header?: never;
3971
+ path: {
3972
+ /** @description Exam ID, e.g. `exam_1234`. */
3973
+ id: string;
3974
+ /** @description Question ID, e.g. `question_1234`, or `first` to get the first question. */
3975
+ questionId: string;
3976
+ };
3977
+ cookie?: never;
3978
+ };
3979
+ requestBody?: never;
3980
+ responses: {
3981
+ /** @description Quality score of the specified question. */
3982
+ 200: {
3983
+ headers: {
3984
+ [name: string]: unknown;
3985
+ };
3986
+ content: {
3987
+ "application/json": {
3988
+ /** @enum {string} */
3989
+ status: "pending" | "complete";
3990
+ checkerVersion?: number;
3991
+ qualityScore?: number;
3992
+ timeTakenMs?: number;
3993
+ totalScorePercentage?: number;
3994
+ criteria?: {
3995
+ id: string;
3996
+ name: string;
3997
+ description: string;
3998
+ reasoning?: string;
3999
+ score?: number;
4000
+ passed: boolean;
4001
+ }[];
4002
+ };
4003
+ };
4004
+ };
4005
+ };
4006
+ };
3810
4007
  "exams.questions.regenerate": {
3811
4008
  parameters: {
3812
4009
  query?: never;
@@ -3926,7 +4123,7 @@ interface operations {
3926
4123
  type?: string;
3927
4124
  /** @description Title for the question (stem) */
3928
4125
  title?: string | null;
3929
- /** @description Optional description for the question */
4126
+ /** @description Optional HTML description for the question */
3930
4127
  description?: string | null;
3931
4128
  /** @description Settings for the question, often specific to the question type */
3932
4129
  settings?: {
@@ -4165,6 +4362,36 @@ interface operations {
4165
4362
  };
4166
4363
  responses: never;
4167
4364
  };
4365
+ "me.twoFactor.get": {
4366
+ parameters: {
4367
+ query?: never;
4368
+ header?: never;
4369
+ path?: never;
4370
+ cookie?: never;
4371
+ };
4372
+ requestBody?: never;
4373
+ responses: never;
4374
+ };
4375
+ "me.twoFactor.enable": {
4376
+ parameters: {
4377
+ query?: never;
4378
+ header?: never;
4379
+ path?: never;
4380
+ cookie?: never;
4381
+ };
4382
+ requestBody?: never;
4383
+ responses: never;
4384
+ };
4385
+ "me.twoFactor.disable": {
4386
+ parameters: {
4387
+ query?: never;
4388
+ header?: never;
4389
+ path?: never;
4390
+ cookie?: never;
4391
+ };
4392
+ requestBody?: never;
4393
+ responses: never;
4394
+ };
4168
4395
  "media.upload": {
4169
4396
  parameters: {
4170
4397
  query?: {
@@ -4237,6 +4464,8 @@ interface operations {
4237
4464
  sharingBlockPublic?: boolean;
4238
4465
  /** @description Whether the organization blocks teachers from inviting new users. */
4239
4466
  sharingBlockTeachersInvitingUsers?: boolean;
4467
+ /** @description Whether members signing in with a password must use two-factor authentication. */
4468
+ requireTwoFactor?: boolean;
4240
4469
  };
4241
4470
  };
4242
4471
  };
@@ -4854,6 +5083,18 @@ interface operations {
4854
5083
  requestBody?: never;
4855
5084
  responses: never;
4856
5085
  };
5086
+ "users.resetTwoFactor": {
5087
+ parameters: {
5088
+ query?: never;
5089
+ header?: never;
5090
+ path: {
5091
+ id: string;
5092
+ };
5093
+ cookie?: never;
5094
+ };
5095
+ requestBody?: never;
5096
+ responses: never;
5097
+ };
4857
5098
  "practiceSpaces.list": {
4858
5099
  parameters: {
4859
5100
  query?: {
@@ -6084,7 +6325,7 @@ interface operations {
6084
6325
  type: string;
6085
6326
  /** @description Title for the question (stem) */
6086
6327
  title?: string | null;
6087
- /** @description Optional description for the question */
6328
+ /** @description Optional HTML description for the question */
6088
6329
  description?: string | null;
6089
6330
  /** @description Settings for the question, often specific to the question type */
6090
6331
  settings: {
@@ -6182,7 +6423,7 @@ interface operations {
6182
6423
  type: string;
6183
6424
  /** @description Title for the question (stem) */
6184
6425
  title?: string | null;
6185
- /** @description Optional description for the question */
6426
+ /** @description Optional HTML description for the question */
6186
6427
  description?: string | null;
6187
6428
  /** @description Settings for the question, often specific to the question type */
6188
6429
  settings: {
@@ -6573,6 +6814,12 @@ interface _PathOverrides {
6573
6814
  "exams.sessions.scanDocument": {
6574
6815
  examId: string;
6575
6816
  };
6817
+ "exams.sessions.getResultsSummary": {
6818
+ examId: string;
6819
+ };
6820
+ "exams.sessions.generateResultsSummary": {
6821
+ examId: string;
6822
+ };
6576
6823
  "exams.sessions.get": {
6577
6824
  examId: string;
6578
6825
  sessionId: string;
@@ -6647,6 +6894,10 @@ interface _PathOverrides {
6647
6894
  examId: string;
6648
6895
  questionId: string;
6649
6896
  };
6897
+ "exams.questions.getQuality": {
6898
+ examId: string;
6899
+ questionId: string;
6900
+ };
6650
6901
  "exams.questions.regenerate": {
6651
6902
  examId: string;
6652
6903
  questionId: string;
@@ -6716,6 +6967,9 @@ interface _PathOverrides {
6716
6967
  "users.delete": {
6717
6968
  id: string;
6718
6969
  };
6970
+ "users.resetTwoFactor": {
6971
+ userId: string;
6972
+ };
6719
6973
  "practiceSpaces.get": {
6720
6974
  id: string;
6721
6975
  };
@@ -7203,6 +7457,24 @@ declare class ExamsSessions {
7203
7457
  * API endpoint: `POST /exams/{examId}/sessions/scan-document`
7204
7458
  */
7205
7459
  scanDocument(args: Args<"exams.sessions.scanDocument">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.scanDocument">>;
7460
+ /**
7461
+ * Get results summary
7462
+ *
7463
+ * Get the stored AI-generated summary of the exam's results, if one has been generated.
7464
+ *
7465
+ * API endpoint: `GET /exams/{examId}/sessions/summary`
7466
+ */
7467
+ getResultsSummary(examId: string, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.getResultsSummary">>;
7468
+ getResultsSummary(args: Args<"exams.sessions.getResultsSummary">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.getResultsSummary">>;
7469
+ /**
7470
+ * Generate results summary
7471
+ *
7472
+ * Start a background task to generate an AI summary of the exam's results, highlighting what students are struggling with. Returns the stored summary directly when the results haven't changed since the last generation.
7473
+ *
7474
+ * API endpoint: `POST /exams/{examId}/sessions/summary`
7475
+ */
7476
+ generateResultsSummary(examId: string, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.generateResultsSummary">>;
7477
+ generateResultsSummary(args: Args<"exams.sessions.generateResultsSummary">, options?: ExamplaryRequestOptions): Promise<Response<"exams.sessions.generateResultsSummary">>;
7206
7478
  /**
7207
7479
  * Get exam session
7208
7480
  *
@@ -7319,6 +7591,14 @@ declare class ExamsQuestions {
7319
7591
  * API endpoint: `PATCH /exams/{examId}/questions/{questionId}`
7320
7592
  */
7321
7593
  update(args: Args<"exams.questions.update">, options?: ExamplaryRequestOptions): Promise<Response<"exams.questions.update">>;
7594
+ /**
7595
+ * Get question quality score
7596
+ *
7597
+ * Retrieve the quality score of a question. This is an async endpoint - when called for the first time, it will trigger a quality assessment and return a status of `pending`. Subsequent calls will return the quality score once available. We recommend polling this endpoint every 5-10 seconds until the score is available.
7598
+ *
7599
+ * API endpoint: `GET /exams/{examId}/questions/{questionId}/quality`
7600
+ */
7601
+ getQuality(args: Args<"exams.questions.getQuality">, options?: ExamplaryRequestOptions): Promise<Response<"exams.questions.getQuality">>;
7322
7602
  /**
7323
7603
  * Regenerate question
7324
7604
  *
@@ -7452,8 +7732,37 @@ declare class Exams {
7452
7732
  getContextSuggestions(examId: string, options?: ExamplaryRequestOptions): Promise<Response<"exams.getContextSuggestions">>;
7453
7733
  getContextSuggestions(args: Args<"exams.getContextSuggestions">, options?: ExamplaryRequestOptions): Promise<Response<"exams.getContextSuggestions">>;
7454
7734
  }
7735
+ declare class MeTwoFactor {
7736
+ private readonly ctx;
7737
+ constructor(ctx: ClientContext);
7738
+ /**
7739
+ * Get two-factor status
7740
+ *
7741
+ * Check whether two-factor authentication is enabled for the current user, and whether the workspace requires it.
7742
+ *
7743
+ * API endpoint: `GET /me/two-factor`
7744
+ */
7745
+ get(args?: Args<"me.twoFactor.get">, options?: ExamplaryRequestOptions): Promise<Response<"me.twoFactor.get">>;
7746
+ /**
7747
+ * Enable two-factor authentication
7748
+ *
7749
+ * Turn on two-factor authentication, after an authenticator app has been registered and verified with Cognito.
7750
+ *
7751
+ * API endpoint: `POST /me/two-factor`
7752
+ */
7753
+ enable(args?: Args<"me.twoFactor.enable">, options?: ExamplaryRequestOptions): Promise<Response<"me.twoFactor.enable">>;
7754
+ /**
7755
+ * Disable two-factor authentication
7756
+ *
7757
+ * Turn off two-factor authentication for the current user. Not allowed when the workspace requires it.
7758
+ *
7759
+ * API endpoint: `DELETE /me/two-factor`
7760
+ */
7761
+ disable(args?: Args<"me.twoFactor.disable">, options?: ExamplaryRequestOptions): Promise<Response<"me.twoFactor.disable">>;
7762
+ }
7455
7763
  declare class Me {
7456
7764
  private readonly ctx;
7765
+ readonly twoFactor: MeTwoFactor;
7457
7766
  constructor(ctx: ClientContext);
7458
7767
  /**
7459
7768
  * Get me
@@ -7763,6 +8072,15 @@ declare class Users {
7763
8072
  */
7764
8073
  delete(id: string, options?: ExamplaryRequestOptions): Promise<Response<"users.delete">>;
7765
8074
  delete(args: Args<"users.delete">, options?: ExamplaryRequestOptions): Promise<Response<"users.delete">>;
8075
+ /**
8076
+ * Reset two-factor authentication
8077
+ *
8078
+ * Remove a user's authenticator app, so they can sign in again after losing their device.
8079
+ *
8080
+ * API endpoint: `DELETE /users/{userId}/two-factor`
8081
+ */
8082
+ resetTwoFactor(userId: string, options?: ExamplaryRequestOptions): Promise<Response<"users.resetTwoFactor">>;
8083
+ resetTwoFactor(args: Args<"users.resetTwoFactor">, options?: ExamplaryRequestOptions): Promise<Response<"users.resetTwoFactor">>;
7766
8084
  }
7767
8085
  declare class PracticeSpacesStudents {
7768
8086
  private readonly ctx;