@examplary/sdk 2.14.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 +246 -0
- package/dist/index.d.ts +246 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -809,6 +809,26 @@ interface paths {
|
|
|
809
809
|
patch: operations["exams.questions.update"];
|
|
810
810
|
trace?: never;
|
|
811
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
|
+
};
|
|
812
832
|
"/exams/{id}/questions/{questionId}/generate": {
|
|
813
833
|
parameters: {
|
|
814
834
|
query?: never;
|
|
@@ -1065,6 +1085,34 @@ interface paths {
|
|
|
1065
1085
|
patch: operations["me.update"];
|
|
1066
1086
|
trace?: never;
|
|
1067
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
|
+
};
|
|
1068
1116
|
"/media/upload": {
|
|
1069
1117
|
parameters: {
|
|
1070
1118
|
query?: never;
|
|
@@ -1492,6 +1540,26 @@ interface paths {
|
|
|
1492
1540
|
patch: operations["users.update"];
|
|
1493
1541
|
trace?: never;
|
|
1494
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
|
+
};
|
|
1495
1563
|
"/practice-spaces": {
|
|
1496
1564
|
parameters: {
|
|
1497
1565
|
query?: never;
|
|
@@ -2906,6 +2974,10 @@ interface operations {
|
|
|
2906
2974
|
backgroundColor?: string;
|
|
2907
2975
|
/** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
|
|
2908
2976
|
locale?: string;
|
|
2977
|
+
/** @description Optional overrides for specific UI strings, keyed by string ID */
|
|
2978
|
+
strings?: {
|
|
2979
|
+
[key: string]: string;
|
|
2980
|
+
};
|
|
2909
2981
|
};
|
|
2910
2982
|
/** @description Additional key-value metadata */
|
|
2911
2983
|
metadata?: {
|
|
@@ -2934,6 +3006,11 @@ interface operations {
|
|
|
2934
3006
|
language?: string | null;
|
|
2935
3007
|
intendedDuration?: unknown | null;
|
|
2936
3008
|
allowedGenerationQuestionTypes?: string[] | null;
|
|
3009
|
+
hideStudentLevel?: boolean | null;
|
|
3010
|
+
hideSubject?: boolean | null;
|
|
3011
|
+
hideDuration?: boolean | null;
|
|
3012
|
+
hideQuestionTypes?: boolean | null;
|
|
3013
|
+
hideTaxonomy?: boolean | null;
|
|
2937
3014
|
};
|
|
2938
3015
|
} | {
|
|
2939
3016
|
/** @description The user ID for whom the embed session is created */
|
|
@@ -2946,6 +3023,10 @@ interface operations {
|
|
|
2946
3023
|
backgroundColor?: string;
|
|
2947
3024
|
/** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
|
|
2948
3025
|
locale?: string;
|
|
3026
|
+
/** @description Optional overrides for specific UI strings, keyed by string ID */
|
|
3027
|
+
strings?: {
|
|
3028
|
+
[key: string]: string;
|
|
3029
|
+
};
|
|
2949
3030
|
};
|
|
2950
3031
|
/** @description Additional key-value metadata */
|
|
2951
3032
|
metadata?: {
|
|
@@ -3023,6 +3104,10 @@ interface operations {
|
|
|
3023
3104
|
backgroundColor?: string;
|
|
3024
3105
|
/** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
|
|
3025
3106
|
locale?: string;
|
|
3107
|
+
/** @description Optional overrides for specific UI strings, keyed by string ID */
|
|
3108
|
+
strings?: {
|
|
3109
|
+
[key: string]: string;
|
|
3110
|
+
};
|
|
3026
3111
|
};
|
|
3027
3112
|
/** @description Additional key-value metadata */
|
|
3028
3113
|
metadata?: {
|
|
@@ -3063,6 +3148,10 @@ interface operations {
|
|
|
3063
3148
|
backgroundColor?: string;
|
|
3064
3149
|
/** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
|
|
3065
3150
|
locale?: string;
|
|
3151
|
+
/** @description Optional overrides for specific UI strings, keyed by string ID */
|
|
3152
|
+
strings?: {
|
|
3153
|
+
[key: string]: string;
|
|
3154
|
+
};
|
|
3066
3155
|
};
|
|
3067
3156
|
/** @description Additional key-value metadata */
|
|
3068
3157
|
metadata?: {
|
|
@@ -3098,6 +3187,10 @@ interface operations {
|
|
|
3098
3187
|
backgroundColor?: string;
|
|
3099
3188
|
/** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
|
|
3100
3189
|
locale?: string;
|
|
3190
|
+
/** @description Optional overrides for specific UI strings, keyed by string ID */
|
|
3191
|
+
strings?: {
|
|
3192
|
+
[key: string]: string;
|
|
3193
|
+
};
|
|
3101
3194
|
};
|
|
3102
3195
|
/** @description Additional key-value metadata */
|
|
3103
3196
|
metadata?: {
|
|
@@ -3130,6 +3223,10 @@ interface operations {
|
|
|
3130
3223
|
backgroundColor?: string;
|
|
3131
3224
|
/** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
|
|
3132
3225
|
locale?: string;
|
|
3226
|
+
/** @description Optional overrides for specific UI strings, keyed by string ID */
|
|
3227
|
+
strings?: {
|
|
3228
|
+
[key: string]: string;
|
|
3229
|
+
};
|
|
3133
3230
|
};
|
|
3134
3231
|
/** @description Additional key-value metadata */
|
|
3135
3232
|
metadata?: {
|
|
@@ -3162,6 +3259,10 @@ interface operations {
|
|
|
3162
3259
|
backgroundColor?: string;
|
|
3163
3260
|
/** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
|
|
3164
3261
|
locale?: string;
|
|
3262
|
+
/** @description Optional overrides for specific UI strings, keyed by string ID */
|
|
3263
|
+
strings?: {
|
|
3264
|
+
[key: string]: string;
|
|
3265
|
+
};
|
|
3165
3266
|
};
|
|
3166
3267
|
/** @description Additional key-value metadata */
|
|
3167
3268
|
metadata?: {
|
|
@@ -3218,6 +3319,10 @@ interface operations {
|
|
|
3218
3319
|
backgroundColor?: string;
|
|
3219
3320
|
/** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
|
|
3220
3321
|
locale?: string;
|
|
3322
|
+
/** @description Optional overrides for specific UI strings, keyed by string ID */
|
|
3323
|
+
strings?: {
|
|
3324
|
+
[key: string]: string;
|
|
3325
|
+
};
|
|
3221
3326
|
};
|
|
3222
3327
|
metadata: {
|
|
3223
3328
|
[key: string]: unknown;
|
|
@@ -3269,6 +3374,10 @@ interface operations {
|
|
|
3269
3374
|
backgroundColor?: string;
|
|
3270
3375
|
/** @description Locale code for UI language. Currently supported: 'en', 'nl' - other values accepted, but will default to English */
|
|
3271
3376
|
locale?: string;
|
|
3377
|
+
/** @description Optional overrides for specific UI strings, keyed by string ID */
|
|
3378
|
+
strings?: {
|
|
3379
|
+
[key: string]: string;
|
|
3380
|
+
};
|
|
3272
3381
|
};
|
|
3273
3382
|
metadata: {
|
|
3274
3383
|
[key: string]: unknown;
|
|
@@ -3855,6 +3964,46 @@ interface operations {
|
|
|
3855
3964
|
};
|
|
3856
3965
|
responses: never;
|
|
3857
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
|
+
};
|
|
3858
4007
|
"exams.questions.regenerate": {
|
|
3859
4008
|
parameters: {
|
|
3860
4009
|
query?: never;
|
|
@@ -4213,6 +4362,36 @@ interface operations {
|
|
|
4213
4362
|
};
|
|
4214
4363
|
responses: never;
|
|
4215
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
|
+
};
|
|
4216
4395
|
"media.upload": {
|
|
4217
4396
|
parameters: {
|
|
4218
4397
|
query?: {
|
|
@@ -4285,6 +4464,8 @@ interface operations {
|
|
|
4285
4464
|
sharingBlockPublic?: boolean;
|
|
4286
4465
|
/** @description Whether the organization blocks teachers from inviting new users. */
|
|
4287
4466
|
sharingBlockTeachersInvitingUsers?: boolean;
|
|
4467
|
+
/** @description Whether members signing in with a password must use two-factor authentication. */
|
|
4468
|
+
requireTwoFactor?: boolean;
|
|
4288
4469
|
};
|
|
4289
4470
|
};
|
|
4290
4471
|
};
|
|
@@ -4902,6 +5083,18 @@ interface operations {
|
|
|
4902
5083
|
requestBody?: never;
|
|
4903
5084
|
responses: never;
|
|
4904
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
|
+
};
|
|
4905
5098
|
"practiceSpaces.list": {
|
|
4906
5099
|
parameters: {
|
|
4907
5100
|
query?: {
|
|
@@ -6701,6 +6894,10 @@ interface _PathOverrides {
|
|
|
6701
6894
|
examId: string;
|
|
6702
6895
|
questionId: string;
|
|
6703
6896
|
};
|
|
6897
|
+
"exams.questions.getQuality": {
|
|
6898
|
+
examId: string;
|
|
6899
|
+
questionId: string;
|
|
6900
|
+
};
|
|
6704
6901
|
"exams.questions.regenerate": {
|
|
6705
6902
|
examId: string;
|
|
6706
6903
|
questionId: string;
|
|
@@ -6770,6 +6967,9 @@ interface _PathOverrides {
|
|
|
6770
6967
|
"users.delete": {
|
|
6771
6968
|
id: string;
|
|
6772
6969
|
};
|
|
6970
|
+
"users.resetTwoFactor": {
|
|
6971
|
+
userId: string;
|
|
6972
|
+
};
|
|
6773
6973
|
"practiceSpaces.get": {
|
|
6774
6974
|
id: string;
|
|
6775
6975
|
};
|
|
@@ -7391,6 +7591,14 @@ declare class ExamsQuestions {
|
|
|
7391
7591
|
* API endpoint: `PATCH /exams/{examId}/questions/{questionId}`
|
|
7392
7592
|
*/
|
|
7393
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">>;
|
|
7394
7602
|
/**
|
|
7395
7603
|
* Regenerate question
|
|
7396
7604
|
*
|
|
@@ -7524,8 +7732,37 @@ declare class Exams {
|
|
|
7524
7732
|
getContextSuggestions(examId: string, options?: ExamplaryRequestOptions): Promise<Response<"exams.getContextSuggestions">>;
|
|
7525
7733
|
getContextSuggestions(args: Args<"exams.getContextSuggestions">, options?: ExamplaryRequestOptions): Promise<Response<"exams.getContextSuggestions">>;
|
|
7526
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
|
+
}
|
|
7527
7763
|
declare class Me {
|
|
7528
7764
|
private readonly ctx;
|
|
7765
|
+
readonly twoFactor: MeTwoFactor;
|
|
7529
7766
|
constructor(ctx: ClientContext);
|
|
7530
7767
|
/**
|
|
7531
7768
|
* Get me
|
|
@@ -7835,6 +8072,15 @@ declare class Users {
|
|
|
7835
8072
|
*/
|
|
7836
8073
|
delete(id: string, options?: ExamplaryRequestOptions): Promise<Response<"users.delete">>;
|
|
7837
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">>;
|
|
7838
8084
|
}
|
|
7839
8085
|
declare class PracticeSpacesStudents {
|
|
7840
8086
|
private readonly ctx;
|