@examplary/sdk 1.0.3 → 1.1.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/README.md +95 -9
- package/dist/generated/sdk.d.ts +1702 -0
- package/dist/generated/sdk.js +742 -0
- package/dist/generated/types.d.ts +5425 -0
- package/dist/generated/{client/client/types.gen.js → types.js} +1 -1
- package/dist/src/context.d.ts +7 -0
- package/dist/src/context.js +22 -0
- package/dist/src/error.d.ts +6 -0
- package/dist/src/error.js +24 -0
- package/dist/src/index.d.ts +5 -14
- package/dist/src/index.js +5 -45
- package/dist/src/options.d.ts +6 -0
- package/dist/{generated/client/core/types.gen.js → src/options.js} +0 -1
- package/dist/src/request.d.ts +3 -0
- package/dist/src/request.js +46 -0
- package/package.json +16 -8
- package/dist/generated/client/client/client.gen.d.ts +0 -2
- package/dist/generated/client/client/client.gen.js +0 -140
- package/dist/generated/client/client/index.d.ts +0 -8
- package/dist/generated/client/client/index.js +0 -16
- package/dist/generated/client/client/types.gen.d.ts +0 -87
- package/dist/generated/client/client/utils.gen.d.ts +0 -14
- package/dist/generated/client/client/utils.gen.js +0 -177
- package/dist/generated/client/client.gen.d.ts +0 -12
- package/dist/generated/client/client.gen.js +0 -6
- package/dist/generated/client/core/auth.gen.d.ts +0 -18
- package/dist/generated/client/core/auth.gen.js +0 -18
- package/dist/generated/client/core/bodySerializer.gen.d.ts +0 -25
- package/dist/generated/client/core/bodySerializer.gen.js +0 -60
- package/dist/generated/client/core/params.gen.d.ts +0 -43
- package/dist/generated/client/core/params.gen.js +0 -104
- package/dist/generated/client/core/pathSerializer.gen.d.ts +0 -33
- package/dist/generated/client/core/pathSerializer.gen.js +0 -115
- package/dist/generated/client/core/queryKeySerializer.gen.d.ts +0 -18
- package/dist/generated/client/core/queryKeySerializer.gen.js +0 -98
- package/dist/generated/client/core/serverSentEvents.gen.d.ts +0 -71
- package/dist/generated/client/core/serverSentEvents.gen.js +0 -135
- package/dist/generated/client/core/types.gen.d.ts +0 -78
- package/dist/generated/client/core/utils.gen.d.ts +0 -19
- package/dist/generated/client/core/utils.gen.js +0 -93
- package/dist/generated/client/index.d.ts +0 -2
- package/dist/generated/client/index.js +0 -36
- package/dist/generated/client/sdk.gen.d.ts +0 -863
- package/dist/generated/client/sdk.gen.js +0 -1826
- package/dist/generated/client/types.gen.d.ts +0 -2417
- package/dist/generated/client/types.gen.js +0 -3
|
@@ -1,1826 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file is auto-generated based on the Examplary API schema.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Examplary = exports.Jobs = exports.QuestionBank = exports.Folders = exports.SourceMaterials = exports.PracticeSpaces = exports.Sessions2 = exports.Students = exports.Exams = exports.Exam = exports.Export = exports.Questions = exports.Sessions = exports.Users = exports.StudentLevels = exports.Permissions = exports.Taxonomies = exports.Attributes = exports.ApiKeys = exports.Orgs = exports.Org = exports.CustomDomain = exports.Media = exports.Me = exports.EmbedSessions = exports.Oauth = exports.Library = exports.Items2 = exports.Publishers = exports.Items = exports.QuestionTypes = void 0;
|
|
5
|
-
const client_gen_1 = require("./client.gen");
|
|
6
|
-
class HeyApiClient {
|
|
7
|
-
constructor(args) {
|
|
8
|
-
this.client = args?.client ?? client_gen_1.client;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
class HeyApiRegistry {
|
|
12
|
-
constructor() {
|
|
13
|
-
this.defaultKey = 'default';
|
|
14
|
-
this.instances = new Map();
|
|
15
|
-
}
|
|
16
|
-
get(key) {
|
|
17
|
-
const instance = this.instances.get(key ?? this.defaultKey);
|
|
18
|
-
if (!instance) {
|
|
19
|
-
throw new Error(`No SDK client found. Create one with "new Examplary()" to fix this error.`);
|
|
20
|
-
}
|
|
21
|
-
return instance;
|
|
22
|
-
}
|
|
23
|
-
set(value, key) {
|
|
24
|
-
this.instances.set(key ?? this.defaultKey, value);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
class QuestionTypes extends HeyApiClient {
|
|
28
|
-
/**
|
|
29
|
-
* List public question types
|
|
30
|
-
*
|
|
31
|
-
* Lists all public question types, which can be enabled in workspaces.
|
|
32
|
-
*/
|
|
33
|
-
listPublic(options) {
|
|
34
|
-
return (options?.client ?? this.client).get({
|
|
35
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
36
|
-
url: '/question-types/public',
|
|
37
|
-
...options
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Delete question type
|
|
42
|
-
*
|
|
43
|
-
* Deletes a specific question type by its ID. Note that only the owner organization of the question type can delete it, and only if it has not been used in an exam.
|
|
44
|
-
*/
|
|
45
|
-
delete(options) {
|
|
46
|
-
return (options.client ?? this.client).delete({
|
|
47
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
48
|
-
url: '/question-types/{id}',
|
|
49
|
-
...options
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Get question type
|
|
54
|
-
*
|
|
55
|
-
* Retrieves a specific question type by its ID.
|
|
56
|
-
*/
|
|
57
|
-
get(options) {
|
|
58
|
-
return (options.client ?? this.client).get({
|
|
59
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
60
|
-
url: '/question-types/{id}',
|
|
61
|
-
...options
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Get question type PCI module for QTI 3 export
|
|
66
|
-
*
|
|
67
|
-
* Get JS module for a question type PCI for QTI 3 export.
|
|
68
|
-
*/
|
|
69
|
-
getQti3Pci(options) {
|
|
70
|
-
return (options.client ?? this.client).get({
|
|
71
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
72
|
-
url: '/question-types/{id}/export/qti3-pci',
|
|
73
|
-
...options
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* List question types
|
|
78
|
-
*
|
|
79
|
-
* Lists all question types, either those available by default or those created within the user's organization.
|
|
80
|
-
*/
|
|
81
|
-
list(options) {
|
|
82
|
-
return (options?.client ?? this.client).get({
|
|
83
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
84
|
-
url: '/question-types',
|
|
85
|
-
...options
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Upsert question type
|
|
90
|
-
*
|
|
91
|
-
* Creates a new question type or updates an existing one. If the question type already exists, it will be updated; otherwise, a new one will be created.
|
|
92
|
-
*/
|
|
93
|
-
upsert(options) {
|
|
94
|
-
return (options?.client ?? this.client).post({
|
|
95
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
96
|
-
url: '/question-types',
|
|
97
|
-
...options,
|
|
98
|
-
headers: {
|
|
99
|
-
'Content-Type': 'application/json',
|
|
100
|
-
...options?.headers
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Enable question type
|
|
106
|
-
*
|
|
107
|
-
* Enable a question type for the current workspace.
|
|
108
|
-
*/
|
|
109
|
-
enable(options) {
|
|
110
|
-
return (options.client ?? this.client).post({
|
|
111
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
112
|
-
url: '/question-types/{id}/enable',
|
|
113
|
-
...options
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Disable question type
|
|
118
|
-
*
|
|
119
|
-
* Disable a question type for the current workspace.
|
|
120
|
-
*/
|
|
121
|
-
disable(options) {
|
|
122
|
-
return (options.client ?? this.client).post({
|
|
123
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
124
|
-
url: '/question-types/{id}/disable',
|
|
125
|
-
...options
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.QuestionTypes = QuestionTypes;
|
|
130
|
-
class Items extends HeyApiClient {
|
|
131
|
-
/**
|
|
132
|
-
* List items by publisher
|
|
133
|
-
*
|
|
134
|
-
* Lists all library items for the specified publisher profile.
|
|
135
|
-
*/
|
|
136
|
-
list(options) {
|
|
137
|
-
return (options.client ?? this.client).get({
|
|
138
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
139
|
-
url: '/library/publishers/{publisherId}/items',
|
|
140
|
-
...options
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Create library item
|
|
145
|
-
*
|
|
146
|
-
* Adds an item to the library. Only the publisher owner can add items to their publisher profile.
|
|
147
|
-
*/
|
|
148
|
-
create(options) {
|
|
149
|
-
return (options.client ?? this.client).post({
|
|
150
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
151
|
-
url: '/library/publishers/{publisherId}/items',
|
|
152
|
-
...options,
|
|
153
|
-
headers: {
|
|
154
|
-
'Content-Type': 'application/json',
|
|
155
|
-
...options.headers
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
exports.Items = Items;
|
|
161
|
-
class Publishers extends HeyApiClient {
|
|
162
|
-
/**
|
|
163
|
-
* List featured publishers
|
|
164
|
-
*
|
|
165
|
-
* Lists all library publishers that are marked as featured.
|
|
166
|
-
*/
|
|
167
|
-
listFeatured(options) {
|
|
168
|
-
return (options?.client ?? this.client).get({
|
|
169
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
170
|
-
url: '/library/publishers/featured',
|
|
171
|
-
...options
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* List all publishers
|
|
176
|
-
*
|
|
177
|
-
* Lists all library publisher profiles.
|
|
178
|
-
*/
|
|
179
|
-
listAll(options) {
|
|
180
|
-
return (options?.client ?? this.client).get({
|
|
181
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
182
|
-
url: '/library/publishers',
|
|
183
|
-
...options
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Create publisher
|
|
188
|
-
*
|
|
189
|
-
* Creates a new library publisher profile.
|
|
190
|
-
*/
|
|
191
|
-
create(options) {
|
|
192
|
-
return (options?.client ?? this.client).post({
|
|
193
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
194
|
-
url: '/library/publishers',
|
|
195
|
-
...options,
|
|
196
|
-
headers: {
|
|
197
|
-
'Content-Type': 'application/json',
|
|
198
|
-
...options?.headers
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* List my publishers
|
|
204
|
-
*
|
|
205
|
-
* Lists all library publisher profiles created by the authenticated user.
|
|
206
|
-
*/
|
|
207
|
-
listMine(options) {
|
|
208
|
-
return (options?.client ?? this.client).get({
|
|
209
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
210
|
-
url: '/library/publishers/mine',
|
|
211
|
-
...options
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Delete publisher
|
|
216
|
-
*
|
|
217
|
-
* Deletes a library publisher profile. Only the owner can delete their publisher profile.
|
|
218
|
-
*/
|
|
219
|
-
delete(options) {
|
|
220
|
-
return (options.client ?? this.client).delete({
|
|
221
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
222
|
-
url: '/library/publishers/{publisherId}',
|
|
223
|
-
...options
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Update publisher
|
|
228
|
-
*
|
|
229
|
-
* Updates a library publisher profile. Only the owner can update their publisher profile.
|
|
230
|
-
*/
|
|
231
|
-
update(options) {
|
|
232
|
-
return (options.client ?? this.client).patch({
|
|
233
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
234
|
-
url: '/library/publishers/{publisherId}',
|
|
235
|
-
...options,
|
|
236
|
-
headers: {
|
|
237
|
-
'Content-Type': 'application/json',
|
|
238
|
-
...options.headers
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
get items() {
|
|
243
|
-
return this._items ?? (this._items = new Items({ client: this.client }));
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
exports.Publishers = Publishers;
|
|
247
|
-
class Items2 extends HeyApiClient {
|
|
248
|
-
/**
|
|
249
|
-
* List featured library items
|
|
250
|
-
*
|
|
251
|
-
* Lists all library items that are marked as featured.
|
|
252
|
-
*/
|
|
253
|
-
listFeatured(options) {
|
|
254
|
-
return (options?.client ?? this.client).get({
|
|
255
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
256
|
-
url: '/library/items/featured',
|
|
257
|
-
...options
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Delete library item
|
|
262
|
-
*
|
|
263
|
-
* Deletes a library item. Only the publisher owner can delete items from their publisher profile.
|
|
264
|
-
*/
|
|
265
|
-
delete(options) {
|
|
266
|
-
return (options.client ?? this.client).delete({
|
|
267
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
268
|
-
url: '/library/items/{itemId}',
|
|
269
|
-
...options
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Update library item
|
|
274
|
-
*
|
|
275
|
-
* Updates a library item. Only the publisher owner can update items in their publisher profile.
|
|
276
|
-
*/
|
|
277
|
-
update(options) {
|
|
278
|
-
return (options.client ?? this.client).patch({
|
|
279
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
280
|
-
url: '/library/items/{itemId}',
|
|
281
|
-
...options,
|
|
282
|
-
headers: {
|
|
283
|
-
'Content-Type': 'application/json',
|
|
284
|
-
...options.headers
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
exports.Items2 = Items2;
|
|
290
|
-
class Library extends HeyApiClient {
|
|
291
|
-
get publishers() {
|
|
292
|
-
return this._publishers ?? (this._publishers = new Publishers({ client: this.client }));
|
|
293
|
-
}
|
|
294
|
-
get items() {
|
|
295
|
-
return this._items ?? (this._items = new Items2({ client: this.client }));
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
exports.Library = Library;
|
|
299
|
-
class Oauth extends HeyApiClient {
|
|
300
|
-
/**
|
|
301
|
-
* OAuth authorization endpoint
|
|
302
|
-
*
|
|
303
|
-
* Initiates OAuth authorization flow. Redirects to the frontend authorization UI where users can approve or deny access.
|
|
304
|
-
*/
|
|
305
|
-
authorize(options) {
|
|
306
|
-
return (options.client ?? this.client).get({
|
|
307
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
308
|
-
url: '/oauth/authorize',
|
|
309
|
-
...options
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* OAuth token endpoint
|
|
314
|
-
*
|
|
315
|
-
* Exchange authorization code for access token, or refresh an existing token.
|
|
316
|
-
*/
|
|
317
|
-
token(options) {
|
|
318
|
-
return (options?.client ?? this.client).post({
|
|
319
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
320
|
-
url: '/oauth/token',
|
|
321
|
-
...options
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
exports.Oauth = Oauth;
|
|
326
|
-
class EmbedSessions extends HeyApiClient {
|
|
327
|
-
/**
|
|
328
|
-
* Create embed session
|
|
329
|
-
*
|
|
330
|
-
* Create a new embed session. This allows you to embed the exam generation flow into your own application.
|
|
331
|
-
*/
|
|
332
|
-
create(options) {
|
|
333
|
-
return (options?.client ?? this.client).post({
|
|
334
|
-
responseType: 'json',
|
|
335
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
336
|
-
url: '/embed-sessions',
|
|
337
|
-
...options,
|
|
338
|
-
headers: {
|
|
339
|
-
'Content-Type': 'application/json',
|
|
340
|
-
...options?.headers
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* Revoke embed session
|
|
346
|
-
*
|
|
347
|
-
* Revoke access to an embed session by its ID.
|
|
348
|
-
*/
|
|
349
|
-
revoke(options) {
|
|
350
|
-
return (options.client ?? this.client).delete({
|
|
351
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
352
|
-
url: '/embed-sessions/{id}',
|
|
353
|
-
...options
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* Get embed session
|
|
358
|
-
*
|
|
359
|
-
* Retrieve an embed session by its ID.
|
|
360
|
-
*/
|
|
361
|
-
get(options) {
|
|
362
|
-
return (options.client ?? this.client).get({
|
|
363
|
-
responseType: 'json',
|
|
364
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
365
|
-
url: '/embed-sessions/{id}',
|
|
366
|
-
...options
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
exports.EmbedSessions = EmbedSessions;
|
|
371
|
-
class Me extends HeyApiClient {
|
|
372
|
-
/**
|
|
373
|
-
* Get me
|
|
374
|
-
*
|
|
375
|
-
* Get the current user's account details.
|
|
376
|
-
*/
|
|
377
|
-
get(options) {
|
|
378
|
-
return (options?.client ?? this.client).get({
|
|
379
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
380
|
-
url: '/me',
|
|
381
|
-
...options
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* Update me
|
|
386
|
-
*
|
|
387
|
-
* Update the current user's account details.
|
|
388
|
-
*/
|
|
389
|
-
update(options) {
|
|
390
|
-
return (options?.client ?? this.client).patch({
|
|
391
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
392
|
-
url: '/me',
|
|
393
|
-
...options,
|
|
394
|
-
headers: {
|
|
395
|
-
'Content-Type': 'application/json',
|
|
396
|
-
...options?.headers
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
exports.Me = Me;
|
|
402
|
-
class Media extends HeyApiClient {
|
|
403
|
-
/**
|
|
404
|
-
* Get file upload URL
|
|
405
|
-
*
|
|
406
|
-
* Returns a signed URL for uploading a file, and a public URL for accessing it afterwards.
|
|
407
|
-
*/
|
|
408
|
-
upload(options) {
|
|
409
|
-
return (options?.client ?? this.client).get({
|
|
410
|
-
responseType: 'json',
|
|
411
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
412
|
-
url: '/media/upload',
|
|
413
|
-
...options
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
exports.Media = Media;
|
|
418
|
-
class CustomDomain extends HeyApiClient {
|
|
419
|
-
/**
|
|
420
|
-
* Get custom domain configuration
|
|
421
|
-
*/
|
|
422
|
-
get(options) {
|
|
423
|
-
return (options?.client ?? this.client).get({
|
|
424
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
425
|
-
url: '/org/custom-domain',
|
|
426
|
-
...options
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* Update custom domain configuration
|
|
431
|
-
*/
|
|
432
|
-
update(options) {
|
|
433
|
-
return (options?.client ?? this.client).post({
|
|
434
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
435
|
-
url: '/org/custom-domain',
|
|
436
|
-
...options,
|
|
437
|
-
headers: {
|
|
438
|
-
'Content-Type': 'application/json',
|
|
439
|
-
...options?.headers
|
|
440
|
-
}
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
exports.CustomDomain = CustomDomain;
|
|
445
|
-
class Org extends HeyApiClient {
|
|
446
|
-
/**
|
|
447
|
-
* Delete organization
|
|
448
|
-
*/
|
|
449
|
-
delete(options) {
|
|
450
|
-
return (options?.client ?? this.client).delete({
|
|
451
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
452
|
-
url: '/org',
|
|
453
|
-
...options
|
|
454
|
-
});
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* Get organization
|
|
458
|
-
*/
|
|
459
|
-
get(options) {
|
|
460
|
-
return (options?.client ?? this.client).get({
|
|
461
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
462
|
-
url: '/org',
|
|
463
|
-
...options
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* Update organization
|
|
468
|
-
*/
|
|
469
|
-
update(options) {
|
|
470
|
-
return (options?.client ?? this.client).patch({
|
|
471
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
472
|
-
url: '/org',
|
|
473
|
-
...options,
|
|
474
|
-
headers: {
|
|
475
|
-
'Content-Type': 'application/json',
|
|
476
|
-
...options?.headers
|
|
477
|
-
}
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
get customDomain() {
|
|
481
|
-
return this._customDomain ?? (this._customDomain = new CustomDomain({ client: this.client }));
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
exports.Org = Org;
|
|
485
|
-
class Orgs extends HeyApiClient {
|
|
486
|
-
/**
|
|
487
|
-
* List all organizations
|
|
488
|
-
*/
|
|
489
|
-
list(options) {
|
|
490
|
-
return (options?.client ?? this.client).get({
|
|
491
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
492
|
-
url: '/orgs',
|
|
493
|
-
...options
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Create a new organization
|
|
498
|
-
*
|
|
499
|
-
* Create a new workspace to collaborate with others on exams.
|
|
500
|
-
*/
|
|
501
|
-
create(options) {
|
|
502
|
-
return (options?.client ?? this.client).post({
|
|
503
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
504
|
-
url: '/orgs',
|
|
505
|
-
...options,
|
|
506
|
-
headers: {
|
|
507
|
-
'Content-Type': 'application/json',
|
|
508
|
-
...options?.headers
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
exports.Orgs = Orgs;
|
|
514
|
-
class ApiKeys extends HeyApiClient {
|
|
515
|
-
/**
|
|
516
|
-
* Get API key
|
|
517
|
-
*
|
|
518
|
-
* Get the API key for the current org/user combination. Creates one if none exists.
|
|
519
|
-
*/
|
|
520
|
-
get(options) {
|
|
521
|
-
return (options?.client ?? this.client).get({
|
|
522
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
523
|
-
url: '/api-keys',
|
|
524
|
-
...options
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* Reset API key
|
|
529
|
-
*
|
|
530
|
-
* Invalidate old API keys for this org/user and create a new one.
|
|
531
|
-
*/
|
|
532
|
-
reset(options) {
|
|
533
|
-
return (options?.client ?? this.client).post({
|
|
534
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
535
|
-
url: '/api-keys/reset',
|
|
536
|
-
...options
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
exports.ApiKeys = ApiKeys;
|
|
541
|
-
class Attributes extends HeyApiClient {
|
|
542
|
-
/**
|
|
543
|
-
* List attributes
|
|
544
|
-
*
|
|
545
|
-
* Get all custom attributes configured for the current workspace.
|
|
546
|
-
*/
|
|
547
|
-
list(options) {
|
|
548
|
-
return (options?.client ?? this.client).get({
|
|
549
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
550
|
-
url: '/attributes',
|
|
551
|
-
...options
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* Create attribute
|
|
556
|
-
*
|
|
557
|
-
* Create a new custom attribute in the current workspace.
|
|
558
|
-
*/
|
|
559
|
-
create(options) {
|
|
560
|
-
return (options?.client ?? this.client).post({
|
|
561
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
562
|
-
url: '/attributes',
|
|
563
|
-
...options,
|
|
564
|
-
headers: {
|
|
565
|
-
'Content-Type': 'application/json',
|
|
566
|
-
...options?.headers
|
|
567
|
-
}
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
/**
|
|
571
|
-
* Reorder attributes
|
|
572
|
-
*
|
|
573
|
-
* Update the position of multiple attributes at once.
|
|
574
|
-
*/
|
|
575
|
-
reorder(options) {
|
|
576
|
-
return (options?.client ?? this.client).post({
|
|
577
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
578
|
-
url: '/attributes/reorder',
|
|
579
|
-
...options,
|
|
580
|
-
headers: {
|
|
581
|
-
'Content-Type': 'application/json',
|
|
582
|
-
...options?.headers
|
|
583
|
-
}
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* Delete attribute
|
|
588
|
-
*
|
|
589
|
-
* Delete a custom attribute from the current workspace. Default attributes cannot be deleted.
|
|
590
|
-
*/
|
|
591
|
-
delete(options) {
|
|
592
|
-
return (options.client ?? this.client).delete({
|
|
593
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
594
|
-
url: '/attributes/{id}',
|
|
595
|
-
...options
|
|
596
|
-
});
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* Update attribute
|
|
600
|
-
*
|
|
601
|
-
* Update an existing attribute in the current workspace.
|
|
602
|
-
*/
|
|
603
|
-
update(options) {
|
|
604
|
-
return (options.client ?? this.client).post({
|
|
605
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
606
|
-
url: '/attributes/{id}',
|
|
607
|
-
...options,
|
|
608
|
-
headers: {
|
|
609
|
-
'Content-Type': 'application/json',
|
|
610
|
-
...options.headers
|
|
611
|
-
}
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
exports.Attributes = Attributes;
|
|
616
|
-
class Taxonomies extends HeyApiClient {
|
|
617
|
-
/**
|
|
618
|
-
* Get taxonomies
|
|
619
|
-
*
|
|
620
|
-
* Get a list available taxonomies, including defaults and taxonomies created in the current workspace.
|
|
621
|
-
*/
|
|
622
|
-
list(options) {
|
|
623
|
-
return (options?.client ?? this.client).get({
|
|
624
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
625
|
-
url: '/taxonomies',
|
|
626
|
-
...options
|
|
627
|
-
});
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* Create taxonomy
|
|
631
|
-
*
|
|
632
|
-
* Save a new taxonomy in the current workspace.
|
|
633
|
-
*/
|
|
634
|
-
create(options) {
|
|
635
|
-
return (options?.client ?? this.client).post({
|
|
636
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
637
|
-
url: '/taxonomies',
|
|
638
|
-
...options,
|
|
639
|
-
headers: {
|
|
640
|
-
'Content-Type': 'application/json',
|
|
641
|
-
...options?.headers
|
|
642
|
-
}
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* Delete taxonomy
|
|
647
|
-
*
|
|
648
|
-
* Delete a taxonomy from the current workspace. This fails if there are any exams associated with the taxonomy.
|
|
649
|
-
*/
|
|
650
|
-
delete(options) {
|
|
651
|
-
return (options.client ?? this.client).delete({
|
|
652
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
653
|
-
url: '/taxonomies/{id}',
|
|
654
|
-
...options
|
|
655
|
-
});
|
|
656
|
-
}
|
|
657
|
-
/**
|
|
658
|
-
* Update taxonomy
|
|
659
|
-
*
|
|
660
|
-
* Update an existing taxonomy in the current workspace.
|
|
661
|
-
*/
|
|
662
|
-
update(options) {
|
|
663
|
-
return (options.client ?? this.client).post({
|
|
664
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
665
|
-
url: '/taxonomies/{id}',
|
|
666
|
-
...options,
|
|
667
|
-
headers: {
|
|
668
|
-
'Content-Type': 'application/json',
|
|
669
|
-
...options.headers
|
|
670
|
-
}
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
exports.Taxonomies = Taxonomies;
|
|
675
|
-
class Permissions extends HeyApiClient {
|
|
676
|
-
/**
|
|
677
|
-
* Get sharing permissions
|
|
678
|
-
*
|
|
679
|
-
* Get a list of users, groups and orgs that have access to a specific resource.
|
|
680
|
-
*/
|
|
681
|
-
list(options) {
|
|
682
|
-
return (options.client ?? this.client).get({
|
|
683
|
-
responseType: 'json',
|
|
684
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
685
|
-
url: '/permissions/{resource}',
|
|
686
|
-
...options
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
/**
|
|
690
|
-
* Create permission
|
|
691
|
-
*
|
|
692
|
-
* Create a new permission for a specific resource, or update the role of an existing actor.
|
|
693
|
-
*/
|
|
694
|
-
assign(options) {
|
|
695
|
-
return (options.client ?? this.client).post({
|
|
696
|
-
responseType: 'json',
|
|
697
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
698
|
-
url: '/permissions/{resource}',
|
|
699
|
-
...options,
|
|
700
|
-
headers: {
|
|
701
|
-
'Content-Type': 'application/json',
|
|
702
|
-
...options.headers
|
|
703
|
-
}
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
/**
|
|
707
|
-
* Remove permission
|
|
708
|
-
*
|
|
709
|
-
* Remove a permission for a specific actor on a specific resource.
|
|
710
|
-
*/
|
|
711
|
-
delete(options) {
|
|
712
|
-
return (options.client ?? this.client).delete({
|
|
713
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
714
|
-
url: '/permissions/{resource}/{actor}',
|
|
715
|
-
...options
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
/**
|
|
719
|
-
* Get actor role
|
|
720
|
-
*
|
|
721
|
-
* Get the role of a specific actor for a specific resource.
|
|
722
|
-
*/
|
|
723
|
-
getActorRole(options) {
|
|
724
|
-
return (options.client ?? this.client).get({
|
|
725
|
-
responseType: 'json',
|
|
726
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
727
|
-
url: '/permissions/{resource}/{actor}',
|
|
728
|
-
...options
|
|
729
|
-
});
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
exports.Permissions = Permissions;
|
|
733
|
-
class StudentLevels extends HeyApiClient {
|
|
734
|
-
/**
|
|
735
|
-
* List available student levels
|
|
736
|
-
*
|
|
737
|
-
* Get a list of available default student levels.
|
|
738
|
-
*/
|
|
739
|
-
list(options) {
|
|
740
|
-
return (options?.client ?? this.client).get({
|
|
741
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
742
|
-
url: '/student-levels',
|
|
743
|
-
...options
|
|
744
|
-
});
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
exports.StudentLevels = StudentLevels;
|
|
748
|
-
class Users extends HeyApiClient {
|
|
749
|
-
/**
|
|
750
|
-
* List users
|
|
751
|
-
*
|
|
752
|
-
* Get a list of all users in the workspace.
|
|
753
|
-
*/
|
|
754
|
-
list(options) {
|
|
755
|
-
return (options?.client ?? this.client).get({
|
|
756
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
757
|
-
url: '/users',
|
|
758
|
-
...options
|
|
759
|
-
});
|
|
760
|
-
}
|
|
761
|
-
/**
|
|
762
|
-
* Create user
|
|
763
|
-
*
|
|
764
|
-
* Create a new user in the workspace.
|
|
765
|
-
*/
|
|
766
|
-
create(options) {
|
|
767
|
-
return (options?.client ?? this.client).post({
|
|
768
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
769
|
-
url: '/users',
|
|
770
|
-
...options,
|
|
771
|
-
headers: {
|
|
772
|
-
'Content-Type': 'application/json',
|
|
773
|
-
...options?.headers
|
|
774
|
-
}
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
/**
|
|
778
|
-
* Delete user
|
|
779
|
-
*
|
|
780
|
-
* Delete a user from the workspace.
|
|
781
|
-
*/
|
|
782
|
-
delete(options) {
|
|
783
|
-
return (options.client ?? this.client).delete({
|
|
784
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
785
|
-
url: '/users/{id}',
|
|
786
|
-
...options
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
/**
|
|
790
|
-
* Update user role
|
|
791
|
-
*
|
|
792
|
-
* Update a user's role within the workspace.
|
|
793
|
-
*/
|
|
794
|
-
update(options) {
|
|
795
|
-
return (options.client ?? this.client).patch({
|
|
796
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
797
|
-
url: '/users/{id}',
|
|
798
|
-
...options
|
|
799
|
-
});
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
exports.Users = Users;
|
|
803
|
-
class Sessions extends HeyApiClient {
|
|
804
|
-
/**
|
|
805
|
-
* List exam sessions
|
|
806
|
-
*
|
|
807
|
-
* Get a list of all student sessions for an exam, representing a set of answers from a student.
|
|
808
|
-
*/
|
|
809
|
-
list(options) {
|
|
810
|
-
return (options.client ?? this.client).get({
|
|
811
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
812
|
-
url: '/exams/{id}/sessions',
|
|
813
|
-
...options
|
|
814
|
-
});
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
* Create session
|
|
818
|
-
*
|
|
819
|
-
* Manually create a session, possibly from uploaded data.
|
|
820
|
-
*/
|
|
821
|
-
import(options) {
|
|
822
|
-
return (options.client ?? this.client).post({
|
|
823
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
824
|
-
url: '/exams/{id}/sessions',
|
|
825
|
-
...options,
|
|
826
|
-
headers: {
|
|
827
|
-
'Content-Type': 'application/json',
|
|
828
|
-
...options.headers
|
|
829
|
-
}
|
|
830
|
-
});
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* Get answers from scan
|
|
834
|
-
*
|
|
835
|
-
* Scan student answers from a document.
|
|
836
|
-
*/
|
|
837
|
-
scan(options) {
|
|
838
|
-
return (options.client ?? this.client).post({
|
|
839
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
840
|
-
url: '/exams/{id}/sessions/scan',
|
|
841
|
-
...options
|
|
842
|
-
});
|
|
843
|
-
}
|
|
844
|
-
/**
|
|
845
|
-
* Delete exam session
|
|
846
|
-
*
|
|
847
|
-
* Remove an exam session.
|
|
848
|
-
*/
|
|
849
|
-
delete(options) {
|
|
850
|
-
return (options.client ?? this.client).delete({
|
|
851
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
852
|
-
url: '/exams/{id}/sessions/{sessionId}',
|
|
853
|
-
...options
|
|
854
|
-
});
|
|
855
|
-
}
|
|
856
|
-
/**
|
|
857
|
-
* Get exam session
|
|
858
|
-
*
|
|
859
|
-
* Get a single exam session by its ID, representing a set of answers from a student.
|
|
860
|
-
*/
|
|
861
|
-
get(options) {
|
|
862
|
-
return (options.client ?? this.client).get({
|
|
863
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
864
|
-
url: '/exams/{id}/sessions/{sessionId}',
|
|
865
|
-
...options
|
|
866
|
-
});
|
|
867
|
-
}
|
|
868
|
-
/**
|
|
869
|
-
* Provide feedback
|
|
870
|
-
*
|
|
871
|
-
* Set teacher feedback and/or a grade for a specific question in an exam session.
|
|
872
|
-
*/
|
|
873
|
-
saveFeedback(options) {
|
|
874
|
-
return (options.client ?? this.client).post({
|
|
875
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
876
|
-
url: '/exams/{id}/sessions/{sessionId}/feedback',
|
|
877
|
-
...options,
|
|
878
|
-
headers: {
|
|
879
|
-
'Content-Type': 'application/json',
|
|
880
|
-
...options.headers
|
|
881
|
-
}
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* Provide overall feedback
|
|
886
|
-
*
|
|
887
|
-
* Set teacher feedback for the test as a whole in an exam session.
|
|
888
|
-
*/
|
|
889
|
-
saveOverallFeedback(options) {
|
|
890
|
-
return (options.client ?? this.client).post({
|
|
891
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
892
|
-
url: '/exams/{id}/sessions/{sessionId}/overall-feedback',
|
|
893
|
-
...options,
|
|
894
|
-
headers: {
|
|
895
|
-
'Content-Type': 'application/json',
|
|
896
|
-
...options.headers
|
|
897
|
-
}
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
/**
|
|
901
|
-
* Generate overall feedback
|
|
902
|
-
*
|
|
903
|
-
* Generate feedback for the test as a whole in an exam session.
|
|
904
|
-
*/
|
|
905
|
-
generateOverallFeedback(options) {
|
|
906
|
-
return (options.client ?? this.client).post({
|
|
907
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
908
|
-
url: '/exams/{id}/sessions/{sessionId}/generate-overall-feedback',
|
|
909
|
-
...options
|
|
910
|
-
});
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* Accept AI grading suggestions
|
|
914
|
-
*
|
|
915
|
-
* Accept all AI-generated grading suggestions for the exam session.
|
|
916
|
-
*/
|
|
917
|
-
acceptAllSuggestions(options) {
|
|
918
|
-
return (options.client ?? this.client).post({
|
|
919
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
920
|
-
url: '/exams/{id}/sessions/{sessionId}/suggestions/accept-all',
|
|
921
|
-
...options
|
|
922
|
-
});
|
|
923
|
-
}
|
|
924
|
-
/**
|
|
925
|
-
* Accept single AI grading suggestion
|
|
926
|
-
*
|
|
927
|
-
* Accept a single AI-generated grading suggestion for the exam session.
|
|
928
|
-
*/
|
|
929
|
-
acceptSuggestion(options) {
|
|
930
|
-
return (options.client ?? this.client).post({
|
|
931
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
932
|
-
url: '/exams/{id}/sessions/{sessionId}/suggestions/{questionId}/accept',
|
|
933
|
-
...options
|
|
934
|
-
});
|
|
935
|
-
}
|
|
936
|
-
/**
|
|
937
|
-
* Edit answer
|
|
938
|
-
*
|
|
939
|
-
* Edit a single answer in an exam session.
|
|
940
|
-
*/
|
|
941
|
-
editAnswer(options) {
|
|
942
|
-
return (options.client ?? this.client).patch({
|
|
943
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
944
|
-
url: '/exams/{id}/sessions/{sessionId}/answers/{questionId}',
|
|
945
|
-
...options,
|
|
946
|
-
headers: {
|
|
947
|
-
'Content-Type': 'application/json',
|
|
948
|
-
...options.headers
|
|
949
|
-
}
|
|
950
|
-
});
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
exports.Sessions = Sessions;
|
|
954
|
-
class Questions extends HeyApiClient {
|
|
955
|
-
/**
|
|
956
|
-
* Import questions
|
|
957
|
-
*
|
|
958
|
-
* Import questions into an exam from a file. Support Word, PDF, Moodle quiz XML and plain text files.
|
|
959
|
-
*/
|
|
960
|
-
import(options) {
|
|
961
|
-
return (options.client ?? this.client).post({
|
|
962
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
963
|
-
url: '/exams/{id}/questions/import',
|
|
964
|
-
...options,
|
|
965
|
-
headers: {
|
|
966
|
-
'Content-Type': 'application/json',
|
|
967
|
-
...options.headers
|
|
968
|
-
}
|
|
969
|
-
});
|
|
970
|
-
}
|
|
971
|
-
/**
|
|
972
|
-
* Generate question
|
|
973
|
-
*
|
|
974
|
-
* Generate a new question for the exam using an AI prompt.
|
|
975
|
-
*/
|
|
976
|
-
generate(options) {
|
|
977
|
-
return (options.client ?? this.client).post({
|
|
978
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
979
|
-
url: '/exams/{id}/questions/generate',
|
|
980
|
-
...options,
|
|
981
|
-
headers: {
|
|
982
|
-
'Content-Type': 'application/json',
|
|
983
|
-
...options.headers
|
|
984
|
-
}
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
/**
|
|
988
|
-
* Get question
|
|
989
|
-
*
|
|
990
|
-
* Retrieve a question by its ID.
|
|
991
|
-
*/
|
|
992
|
-
get(options) {
|
|
993
|
-
return (options.client ?? this.client).get({
|
|
994
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
995
|
-
url: '/exams/{id}/questions/{questionId}',
|
|
996
|
-
...options
|
|
997
|
-
});
|
|
998
|
-
}
|
|
999
|
-
/**
|
|
1000
|
-
* Regenerate question
|
|
1001
|
-
*
|
|
1002
|
-
* Update a question using an AI prompt.
|
|
1003
|
-
*/
|
|
1004
|
-
regenerate(options) {
|
|
1005
|
-
return (options.client ?? this.client).post({
|
|
1006
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1007
|
-
url: '/exams/{id}/questions/{questionId}/generate',
|
|
1008
|
-
...options,
|
|
1009
|
-
headers: {
|
|
1010
|
-
'Content-Type': 'application/json',
|
|
1011
|
-
...options.headers
|
|
1012
|
-
}
|
|
1013
|
-
});
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
|
-
exports.Questions = Questions;
|
|
1017
|
-
class Export extends HeyApiClient {
|
|
1018
|
-
/**
|
|
1019
|
-
* Export QTI 3 package
|
|
1020
|
-
*
|
|
1021
|
-
* Export an exam as a QTI 3 ZIP package.
|
|
1022
|
-
*/
|
|
1023
|
-
qti3Zip(options) {
|
|
1024
|
-
return (options.client ?? this.client).post({
|
|
1025
|
-
responseType: 'json',
|
|
1026
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1027
|
-
url: '/exams/{id}/export/qti3-zip',
|
|
1028
|
-
...options
|
|
1029
|
-
});
|
|
1030
|
-
}
|
|
1031
|
-
/**
|
|
1032
|
-
* Export QTI 2.1 package
|
|
1033
|
-
*
|
|
1034
|
-
* Export an exam as a QTI 2.1 ZIP package.
|
|
1035
|
-
*/
|
|
1036
|
-
qti21Zip(options) {
|
|
1037
|
-
return (options.client ?? this.client).post({
|
|
1038
|
-
responseType: 'json',
|
|
1039
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1040
|
-
url: '/exams/{id}/export/qti21-zip',
|
|
1041
|
-
...options
|
|
1042
|
-
});
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
exports.Export = Export;
|
|
1046
|
-
class Exam extends HeyApiClient {
|
|
1047
|
-
get sessions() {
|
|
1048
|
-
return this._sessions ?? (this._sessions = new Sessions({ client: this.client }));
|
|
1049
|
-
}
|
|
1050
|
-
get questions() {
|
|
1051
|
-
return this._questions ?? (this._questions = new Questions({ client: this.client }));
|
|
1052
|
-
}
|
|
1053
|
-
get export() {
|
|
1054
|
-
return this._export ?? (this._export = new Export({ client: this.client }));
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
exports.Exam = Exam;
|
|
1058
|
-
class Exams extends HeyApiClient {
|
|
1059
|
-
/**
|
|
1060
|
-
* List exams
|
|
1061
|
-
*
|
|
1062
|
-
* Get a list of all exams within your workspace.
|
|
1063
|
-
*/
|
|
1064
|
-
list(options) {
|
|
1065
|
-
return (options?.client ?? this.client).get({
|
|
1066
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1067
|
-
url: '/exams',
|
|
1068
|
-
...options
|
|
1069
|
-
});
|
|
1070
|
-
}
|
|
1071
|
-
/**
|
|
1072
|
-
* Create exam
|
|
1073
|
-
*
|
|
1074
|
-
* Create a new exam within your workspace.
|
|
1075
|
-
*/
|
|
1076
|
-
create(options) {
|
|
1077
|
-
return (options?.client ?? this.client).post({
|
|
1078
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1079
|
-
url: '/exams',
|
|
1080
|
-
...options,
|
|
1081
|
-
headers: {
|
|
1082
|
-
'Content-Type': 'application/json',
|
|
1083
|
-
...options?.headers
|
|
1084
|
-
}
|
|
1085
|
-
});
|
|
1086
|
-
}
|
|
1087
|
-
/**
|
|
1088
|
-
* Import exam
|
|
1089
|
-
*
|
|
1090
|
-
* Create an exam by importing one or more source materials (e.g. an existing exam).
|
|
1091
|
-
*/
|
|
1092
|
-
import(options) {
|
|
1093
|
-
return (options?.client ?? this.client).post({
|
|
1094
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1095
|
-
url: '/exams/import',
|
|
1096
|
-
...options,
|
|
1097
|
-
headers: {
|
|
1098
|
-
'Content-Type': 'application/json',
|
|
1099
|
-
...options?.headers
|
|
1100
|
-
}
|
|
1101
|
-
});
|
|
1102
|
-
}
|
|
1103
|
-
/**
|
|
1104
|
-
* Delete exam
|
|
1105
|
-
*
|
|
1106
|
-
* Delete the exam.
|
|
1107
|
-
*/
|
|
1108
|
-
delete(options) {
|
|
1109
|
-
return (options.client ?? this.client).delete({
|
|
1110
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1111
|
-
url: '/exams/{id}',
|
|
1112
|
-
...options
|
|
1113
|
-
});
|
|
1114
|
-
}
|
|
1115
|
-
/**
|
|
1116
|
-
* Get exam
|
|
1117
|
-
*
|
|
1118
|
-
* Get a single exam by its ID.
|
|
1119
|
-
*/
|
|
1120
|
-
get(options) {
|
|
1121
|
-
return (options.client ?? this.client).get({
|
|
1122
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1123
|
-
url: '/exams/{id}',
|
|
1124
|
-
...options
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
/**
|
|
1128
|
-
* Update exam
|
|
1129
|
-
*
|
|
1130
|
-
* Update an existing exam.
|
|
1131
|
-
*/
|
|
1132
|
-
update(options) {
|
|
1133
|
-
return (options.client ?? this.client).post({
|
|
1134
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1135
|
-
url: '/exams/{id}',
|
|
1136
|
-
...options
|
|
1137
|
-
});
|
|
1138
|
-
}
|
|
1139
|
-
/**
|
|
1140
|
-
* Duplicate exam
|
|
1141
|
-
*
|
|
1142
|
-
* Duplicate the exam's questions and settings to a new exam.
|
|
1143
|
-
*/
|
|
1144
|
-
duplicate(options) {
|
|
1145
|
-
return (options.client ?? this.client).post({
|
|
1146
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1147
|
-
url: '/exams/{id}/duplicate',
|
|
1148
|
-
...options,
|
|
1149
|
-
headers: {
|
|
1150
|
-
'Content-Type': 'application/json',
|
|
1151
|
-
...options.headers
|
|
1152
|
-
}
|
|
1153
|
-
});
|
|
1154
|
-
}
|
|
1155
|
-
/**
|
|
1156
|
-
* Print exam
|
|
1157
|
-
*
|
|
1158
|
-
* Export an exam to a PDF file or Word document.
|
|
1159
|
-
*/
|
|
1160
|
-
print(options) {
|
|
1161
|
-
return (options.client ?? this.client).post({
|
|
1162
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1163
|
-
url: '/exams/{id}/print',
|
|
1164
|
-
...options
|
|
1165
|
-
});
|
|
1166
|
-
}
|
|
1167
|
-
/**
|
|
1168
|
-
* Generate exam
|
|
1169
|
-
*
|
|
1170
|
-
* Initiate a job to generate new questions for the exam using AI, based on the source materials and metadata specified.
|
|
1171
|
-
*/
|
|
1172
|
-
startGeneration(options) {
|
|
1173
|
-
return (options.client ?? this.client).post({
|
|
1174
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1175
|
-
url: '/exams/{id}/generate',
|
|
1176
|
-
...options
|
|
1177
|
-
});
|
|
1178
|
-
}
|
|
1179
|
-
/**
|
|
1180
|
-
* Cancel exam generation
|
|
1181
|
-
*
|
|
1182
|
-
* Cancel an ongoing job to generate new questions for the exam using AI.
|
|
1183
|
-
*/
|
|
1184
|
-
cancelGeneration(options) {
|
|
1185
|
-
return (options.client ?? this.client).post({
|
|
1186
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1187
|
-
url: '/exams/{id}/generate/cancel',
|
|
1188
|
-
...options
|
|
1189
|
-
});
|
|
1190
|
-
}
|
|
1191
|
-
/**
|
|
1192
|
-
* Get exam context suggestions
|
|
1193
|
-
*
|
|
1194
|
-
* Get AI-generated suggestions for context/instructions to include in the exam generation prompt, based on the source materials linked to the exam.
|
|
1195
|
-
*/
|
|
1196
|
-
getContextSuggestions(options) {
|
|
1197
|
-
return (options.client ?? this.client).get({
|
|
1198
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1199
|
-
url: '/exams/{id}/context-suggestions',
|
|
1200
|
-
...options
|
|
1201
|
-
});
|
|
1202
|
-
}
|
|
1203
|
-
}
|
|
1204
|
-
exports.Exams = Exams;
|
|
1205
|
-
class Students extends HeyApiClient {
|
|
1206
|
-
/**
|
|
1207
|
-
* List practice space students
|
|
1208
|
-
*
|
|
1209
|
-
* Get a list of all students that practiced in a practice space.
|
|
1210
|
-
*/
|
|
1211
|
-
list(options) {
|
|
1212
|
-
return (options.client ?? this.client).get({
|
|
1213
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1214
|
-
url: '/practice-spaces/{id}/students',
|
|
1215
|
-
...options
|
|
1216
|
-
});
|
|
1217
|
-
}
|
|
1218
|
-
/**
|
|
1219
|
-
* Get practice space student
|
|
1220
|
-
*
|
|
1221
|
-
* Get details about a specific practice space student.
|
|
1222
|
-
*/
|
|
1223
|
-
get(options) {
|
|
1224
|
-
return (options.client ?? this.client).get({
|
|
1225
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1226
|
-
url: '/practice-spaces/{id}/students/{studentId}',
|
|
1227
|
-
...options
|
|
1228
|
-
});
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
exports.Students = Students;
|
|
1232
|
-
class Sessions2 extends HeyApiClient {
|
|
1233
|
-
/**
|
|
1234
|
-
* Create practice space session
|
|
1235
|
-
*
|
|
1236
|
-
* Create a new practice space session.
|
|
1237
|
-
*/
|
|
1238
|
-
create(options) {
|
|
1239
|
-
return (options.client ?? this.client).post({
|
|
1240
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1241
|
-
url: '/practice-spaces/{id}/sessions',
|
|
1242
|
-
...options,
|
|
1243
|
-
headers: {
|
|
1244
|
-
'Content-Type': 'application/json',
|
|
1245
|
-
...options.headers
|
|
1246
|
-
}
|
|
1247
|
-
});
|
|
1248
|
-
}
|
|
1249
|
-
/**
|
|
1250
|
-
* Get my practice space session
|
|
1251
|
-
*
|
|
1252
|
-
* Get the current user's past practice space session.
|
|
1253
|
-
*/
|
|
1254
|
-
getMine(options) {
|
|
1255
|
-
return (options.client ?? this.client).get({
|
|
1256
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1257
|
-
url: '/practice-spaces/{id}/sessions/mine',
|
|
1258
|
-
...options
|
|
1259
|
-
});
|
|
1260
|
-
}
|
|
1261
|
-
/**
|
|
1262
|
-
* Get practice space session
|
|
1263
|
-
*
|
|
1264
|
-
* Get a practice space session by its ID.
|
|
1265
|
-
*/
|
|
1266
|
-
get(options) {
|
|
1267
|
-
return (options.client ?? this.client).get({
|
|
1268
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1269
|
-
url: '/practice-spaces/{id}/sessions/{sessionId}',
|
|
1270
|
-
...options
|
|
1271
|
-
});
|
|
1272
|
-
}
|
|
1273
|
-
/**
|
|
1274
|
-
* Save answer for a practice space session
|
|
1275
|
-
*
|
|
1276
|
-
* Save an answer for a specific question in a practice space session.
|
|
1277
|
-
*/
|
|
1278
|
-
saveAnswer(options) {
|
|
1279
|
-
return (options.client ?? this.client).post({
|
|
1280
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1281
|
-
url: '/practice-spaces/{id}/sessions/{sessionId}/answers/{questionId}',
|
|
1282
|
-
...options,
|
|
1283
|
-
headers: {
|
|
1284
|
-
'Content-Type': 'application/json',
|
|
1285
|
-
...options.headers
|
|
1286
|
-
}
|
|
1287
|
-
});
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
exports.Sessions2 = Sessions2;
|
|
1291
|
-
class PracticeSpaces extends HeyApiClient {
|
|
1292
|
-
/**
|
|
1293
|
-
* List practice spaces
|
|
1294
|
-
*
|
|
1295
|
-
* Get a list of all practice spaces you have access to in this workspace.
|
|
1296
|
-
*/
|
|
1297
|
-
list(options) {
|
|
1298
|
-
return (options?.client ?? this.client).get({
|
|
1299
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1300
|
-
url: '/practice-spaces',
|
|
1301
|
-
...options
|
|
1302
|
-
});
|
|
1303
|
-
}
|
|
1304
|
-
/**
|
|
1305
|
-
* Create practice space
|
|
1306
|
-
*
|
|
1307
|
-
* Create a new practice space within your workspace.
|
|
1308
|
-
*/
|
|
1309
|
-
create(options) {
|
|
1310
|
-
return (options?.client ?? this.client).post({
|
|
1311
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1312
|
-
url: '/practice-spaces',
|
|
1313
|
-
...options,
|
|
1314
|
-
headers: {
|
|
1315
|
-
'Content-Type': 'application/json',
|
|
1316
|
-
...options?.headers
|
|
1317
|
-
}
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1320
|
-
/**
|
|
1321
|
-
* Delete practice space
|
|
1322
|
-
*
|
|
1323
|
-
* Delete the practice space.
|
|
1324
|
-
*/
|
|
1325
|
-
delete(options) {
|
|
1326
|
-
return (options.client ?? this.client).delete({
|
|
1327
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1328
|
-
url: '/practice-spaces/{id}',
|
|
1329
|
-
...options
|
|
1330
|
-
});
|
|
1331
|
-
}
|
|
1332
|
-
/**
|
|
1333
|
-
* Get practice space
|
|
1334
|
-
*
|
|
1335
|
-
* Get a single practice space by its ID.
|
|
1336
|
-
*/
|
|
1337
|
-
get(options) {
|
|
1338
|
-
return (options.client ?? this.client).get({
|
|
1339
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1340
|
-
url: '/practice-spaces/{id}',
|
|
1341
|
-
...options
|
|
1342
|
-
});
|
|
1343
|
-
}
|
|
1344
|
-
/**
|
|
1345
|
-
* Update practice space
|
|
1346
|
-
*
|
|
1347
|
-
* Update an existing practice space.
|
|
1348
|
-
*/
|
|
1349
|
-
update(options) {
|
|
1350
|
-
return (options.client ?? this.client).patch({
|
|
1351
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1352
|
-
url: '/practice-spaces/{id}',
|
|
1353
|
-
...options,
|
|
1354
|
-
headers: {
|
|
1355
|
-
'Content-Type': 'application/json',
|
|
1356
|
-
...options.headers
|
|
1357
|
-
}
|
|
1358
|
-
});
|
|
1359
|
-
}
|
|
1360
|
-
/**
|
|
1361
|
-
* Duplicate practice space
|
|
1362
|
-
*
|
|
1363
|
-
* Duplicate the practice space's settings and topics to a new practice space.
|
|
1364
|
-
*/
|
|
1365
|
-
duplicate(options) {
|
|
1366
|
-
return (options.client ?? this.client).post({
|
|
1367
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1368
|
-
url: '/practice-spaces/{id}/duplicate',
|
|
1369
|
-
...options,
|
|
1370
|
-
headers: {
|
|
1371
|
-
'Content-Type': 'application/json',
|
|
1372
|
-
...options.headers
|
|
1373
|
-
}
|
|
1374
|
-
});
|
|
1375
|
-
}
|
|
1376
|
-
/**
|
|
1377
|
-
* Generate practice space topics
|
|
1378
|
-
*
|
|
1379
|
-
* Start generating mastery topics for a practice space.
|
|
1380
|
-
*/
|
|
1381
|
-
generateTopics(options) {
|
|
1382
|
-
return (options.client ?? this.client).post({
|
|
1383
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1384
|
-
url: '/practice-spaces/{id}/generate-topics',
|
|
1385
|
-
...options
|
|
1386
|
-
});
|
|
1387
|
-
}
|
|
1388
|
-
/**
|
|
1389
|
-
* Cancel practice space topic generation
|
|
1390
|
-
*
|
|
1391
|
-
* Cancel an in-progress mastery topic generation job.
|
|
1392
|
-
*/
|
|
1393
|
-
cancelGenerateTopics(options) {
|
|
1394
|
-
return (options.client ?? this.client).post({
|
|
1395
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1396
|
-
url: '/practice-spaces/{id}/cancel-generate-topics',
|
|
1397
|
-
...options
|
|
1398
|
-
});
|
|
1399
|
-
}
|
|
1400
|
-
/**
|
|
1401
|
-
* Preview top practice space questions
|
|
1402
|
-
*
|
|
1403
|
-
* Get a preview of the top practice space questions by quality score.
|
|
1404
|
-
*/
|
|
1405
|
-
questionsPreview(options) {
|
|
1406
|
-
return (options.client ?? this.client).get({
|
|
1407
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1408
|
-
url: '/practice-spaces/{id}/questions-preview',
|
|
1409
|
-
...options
|
|
1410
|
-
});
|
|
1411
|
-
}
|
|
1412
|
-
/**
|
|
1413
|
-
* Get practice space progress
|
|
1414
|
-
*
|
|
1415
|
-
* Get the progress of a single practice space by its ID.
|
|
1416
|
-
*/
|
|
1417
|
-
getProgress(options) {
|
|
1418
|
-
return (options.client ?? this.client).get({
|
|
1419
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1420
|
-
url: '/practice-spaces/{id}/progress',
|
|
1421
|
-
...options
|
|
1422
|
-
});
|
|
1423
|
-
}
|
|
1424
|
-
/**
|
|
1425
|
-
* Generate practice space topic feedback
|
|
1426
|
-
*
|
|
1427
|
-
* Get feedback for a specific topic in a practice space.
|
|
1428
|
-
*/
|
|
1429
|
-
generateTopicFeedback(options) {
|
|
1430
|
-
return (options.client ?? this.client).post({
|
|
1431
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1432
|
-
url: '/practice-spaces/{id}/progress/topic-feedback',
|
|
1433
|
-
...options,
|
|
1434
|
-
headers: {
|
|
1435
|
-
'Content-Type': 'application/json',
|
|
1436
|
-
...options.headers
|
|
1437
|
-
}
|
|
1438
|
-
});
|
|
1439
|
-
}
|
|
1440
|
-
get students() {
|
|
1441
|
-
return this._students ?? (this._students = new Students({ client: this.client }));
|
|
1442
|
-
}
|
|
1443
|
-
get sessions() {
|
|
1444
|
-
return this._sessions ?? (this._sessions = new Sessions2({ client: this.client }));
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
exports.PracticeSpaces = PracticeSpaces;
|
|
1448
|
-
class SourceMaterials extends HeyApiClient {
|
|
1449
|
-
/**
|
|
1450
|
-
* List source materials in org
|
|
1451
|
-
*
|
|
1452
|
-
* Returns a list of source materials for the current organization.
|
|
1453
|
-
*/
|
|
1454
|
-
list(options) {
|
|
1455
|
-
return (options?.client ?? this.client).get({
|
|
1456
|
-
responseType: 'json',
|
|
1457
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1458
|
-
url: '/source-materials',
|
|
1459
|
-
...options
|
|
1460
|
-
});
|
|
1461
|
-
}
|
|
1462
|
-
/**
|
|
1463
|
-
* Add source material
|
|
1464
|
-
*
|
|
1465
|
-
* Add a source material and start processing it for later use in an exam.
|
|
1466
|
-
*/
|
|
1467
|
-
create(options) {
|
|
1468
|
-
return (options?.client ?? this.client).post({
|
|
1469
|
-
responseType: 'json',
|
|
1470
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1471
|
-
url: '/source-materials',
|
|
1472
|
-
...options,
|
|
1473
|
-
headers: {
|
|
1474
|
-
'Content-Type': 'application/json',
|
|
1475
|
-
...options?.headers
|
|
1476
|
-
}
|
|
1477
|
-
});
|
|
1478
|
-
}
|
|
1479
|
-
/**
|
|
1480
|
-
* Delete source material
|
|
1481
|
-
*
|
|
1482
|
-
* Deletes the specified source material.
|
|
1483
|
-
*/
|
|
1484
|
-
delete(options) {
|
|
1485
|
-
return (options.client ?? this.client).delete({
|
|
1486
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1487
|
-
url: '/source-materials/{id}',
|
|
1488
|
-
...options
|
|
1489
|
-
});
|
|
1490
|
-
}
|
|
1491
|
-
/**
|
|
1492
|
-
* Get source material
|
|
1493
|
-
*
|
|
1494
|
-
* Returns the current status and facts extracted from the specified source material.
|
|
1495
|
-
*/
|
|
1496
|
-
get(options) {
|
|
1497
|
-
return (options.client ?? this.client).get({
|
|
1498
|
-
responseType: 'json',
|
|
1499
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1500
|
-
url: '/source-materials/{id}',
|
|
1501
|
-
...options
|
|
1502
|
-
});
|
|
1503
|
-
}
|
|
1504
|
-
/**
|
|
1505
|
-
* Update source material
|
|
1506
|
-
*
|
|
1507
|
-
* Updates the specified source material.
|
|
1508
|
-
*/
|
|
1509
|
-
update(options) {
|
|
1510
|
-
return (options.client ?? this.client).patch({
|
|
1511
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1512
|
-
url: '/source-materials/{id}',
|
|
1513
|
-
...options,
|
|
1514
|
-
headers: {
|
|
1515
|
-
'Content-Type': 'application/json',
|
|
1516
|
-
...options.headers
|
|
1517
|
-
}
|
|
1518
|
-
});
|
|
1519
|
-
}
|
|
1520
|
-
/**
|
|
1521
|
-
* Create a source material slice
|
|
1522
|
-
*
|
|
1523
|
-
* Create a new source material based on a specific page range of an existing source material.
|
|
1524
|
-
*/
|
|
1525
|
-
slice(options) {
|
|
1526
|
-
return (options.client ?? this.client).post({
|
|
1527
|
-
responseType: 'json',
|
|
1528
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1529
|
-
url: '/source-materials/{id}/slice',
|
|
1530
|
-
...options,
|
|
1531
|
-
headers: {
|
|
1532
|
-
'Content-Type': 'application/json',
|
|
1533
|
-
...options.headers
|
|
1534
|
-
}
|
|
1535
|
-
});
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
exports.SourceMaterials = SourceMaterials;
|
|
1539
|
-
class Folders extends HeyApiClient {
|
|
1540
|
-
/**
|
|
1541
|
-
* Get folders
|
|
1542
|
-
*
|
|
1543
|
-
* Get a list of folders for exam organisation that exist within the current workspace.
|
|
1544
|
-
*/
|
|
1545
|
-
list(options) {
|
|
1546
|
-
return (options?.client ?? this.client).get({
|
|
1547
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1548
|
-
url: '/folders',
|
|
1549
|
-
...options
|
|
1550
|
-
});
|
|
1551
|
-
}
|
|
1552
|
-
/**
|
|
1553
|
-
* Create folder
|
|
1554
|
-
*
|
|
1555
|
-
* Create a new folder in the current workspace.
|
|
1556
|
-
*/
|
|
1557
|
-
create(options) {
|
|
1558
|
-
return (options?.client ?? this.client).post({
|
|
1559
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1560
|
-
url: '/folders',
|
|
1561
|
-
...options,
|
|
1562
|
-
headers: {
|
|
1563
|
-
'Content-Type': 'application/json',
|
|
1564
|
-
...options?.headers
|
|
1565
|
-
}
|
|
1566
|
-
});
|
|
1567
|
-
}
|
|
1568
|
-
/**
|
|
1569
|
-
* Delete folder
|
|
1570
|
-
*
|
|
1571
|
-
* Delete a folder from the current workspace. If there are any exams in the folder, they will be moved out of the folder.
|
|
1572
|
-
*/
|
|
1573
|
-
delete(options) {
|
|
1574
|
-
return (options.client ?? this.client).delete({
|
|
1575
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1576
|
-
url: '/folders/{id}',
|
|
1577
|
-
...options
|
|
1578
|
-
});
|
|
1579
|
-
}
|
|
1580
|
-
/**
|
|
1581
|
-
* Update folder
|
|
1582
|
-
*
|
|
1583
|
-
* Update an existing folder in the current workspace.
|
|
1584
|
-
*/
|
|
1585
|
-
update(options) {
|
|
1586
|
-
return (options.client ?? this.client).post({
|
|
1587
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1588
|
-
url: '/folders/{id}',
|
|
1589
|
-
...options,
|
|
1590
|
-
headers: {
|
|
1591
|
-
'Content-Type': 'application/json',
|
|
1592
|
-
...options.headers
|
|
1593
|
-
}
|
|
1594
|
-
});
|
|
1595
|
-
}
|
|
1596
|
-
}
|
|
1597
|
-
exports.Folders = Folders;
|
|
1598
|
-
class QuestionBank extends HeyApiClient {
|
|
1599
|
-
/**
|
|
1600
|
-
* Get question bank items
|
|
1601
|
-
*
|
|
1602
|
-
* Get a list of question bank items that exist within the current workspace.
|
|
1603
|
-
*/
|
|
1604
|
-
list(options) {
|
|
1605
|
-
return (options?.client ?? this.client).get({
|
|
1606
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1607
|
-
url: '/question-bank',
|
|
1608
|
-
...options
|
|
1609
|
-
});
|
|
1610
|
-
}
|
|
1611
|
-
/**
|
|
1612
|
-
* Add question to question bank
|
|
1613
|
-
*
|
|
1614
|
-
* Add a question to the question bank in the current workspace.
|
|
1615
|
-
*/
|
|
1616
|
-
create(options) {
|
|
1617
|
-
return (options?.client ?? this.client).post({
|
|
1618
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1619
|
-
url: '/question-bank',
|
|
1620
|
-
...options,
|
|
1621
|
-
headers: {
|
|
1622
|
-
'Content-Type': 'application/json',
|
|
1623
|
-
...options?.headers
|
|
1624
|
-
}
|
|
1625
|
-
});
|
|
1626
|
-
}
|
|
1627
|
-
/**
|
|
1628
|
-
* Delete question bank item
|
|
1629
|
-
*
|
|
1630
|
-
* Delete a question bank item from the current workspace.
|
|
1631
|
-
*/
|
|
1632
|
-
delete(options) {
|
|
1633
|
-
return (options.client ?? this.client).delete({
|
|
1634
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1635
|
-
url: '/question-bank/{id}',
|
|
1636
|
-
...options
|
|
1637
|
-
});
|
|
1638
|
-
}
|
|
1639
|
-
/**
|
|
1640
|
-
* Update question bank item
|
|
1641
|
-
*
|
|
1642
|
-
* Update an existing question bank item in the current workspace.
|
|
1643
|
-
*/
|
|
1644
|
-
update(options) {
|
|
1645
|
-
return (options.client ?? this.client).patch({
|
|
1646
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1647
|
-
url: '/question-bank/{id}',
|
|
1648
|
-
...options,
|
|
1649
|
-
headers: {
|
|
1650
|
-
'Content-Type': 'application/json',
|
|
1651
|
-
...options.headers
|
|
1652
|
-
}
|
|
1653
|
-
});
|
|
1654
|
-
}
|
|
1655
|
-
}
|
|
1656
|
-
exports.QuestionBank = QuestionBank;
|
|
1657
|
-
class Jobs extends HeyApiClient {
|
|
1658
|
-
/**
|
|
1659
|
-
* Cancel a job
|
|
1660
|
-
*
|
|
1661
|
-
* Cancel a background job.
|
|
1662
|
-
*/
|
|
1663
|
-
cancel(options) {
|
|
1664
|
-
return (options.client ?? this.client).delete({
|
|
1665
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1666
|
-
url: '/jobs/{id}',
|
|
1667
|
-
...options
|
|
1668
|
-
});
|
|
1669
|
-
}
|
|
1670
|
-
/**
|
|
1671
|
-
* Get job status
|
|
1672
|
-
*
|
|
1673
|
-
* Poll the status of a background job.
|
|
1674
|
-
*/
|
|
1675
|
-
get(options) {
|
|
1676
|
-
return (options.client ?? this.client).get({
|
|
1677
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1678
|
-
url: '/jobs/{id}',
|
|
1679
|
-
...options
|
|
1680
|
-
});
|
|
1681
|
-
}
|
|
1682
|
-
}
|
|
1683
|
-
exports.Jobs = Jobs;
|
|
1684
|
-
class Examplary extends HeyApiClient {
|
|
1685
|
-
constructor(args) {
|
|
1686
|
-
super(args);
|
|
1687
|
-
Examplary.__registry.set(this, args?.key);
|
|
1688
|
-
}
|
|
1689
|
-
/**
|
|
1690
|
-
* Get rubrics
|
|
1691
|
-
*
|
|
1692
|
-
* Get a list of rubrics that exist within the current workspace.
|
|
1693
|
-
*/
|
|
1694
|
-
getRubrics(options) {
|
|
1695
|
-
return (options?.client ?? this.client).get({
|
|
1696
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1697
|
-
url: '/rubrics',
|
|
1698
|
-
...options
|
|
1699
|
-
});
|
|
1700
|
-
}
|
|
1701
|
-
/**
|
|
1702
|
-
* Save rubric
|
|
1703
|
-
*
|
|
1704
|
-
* Add a rubric to the current workspace.
|
|
1705
|
-
*/
|
|
1706
|
-
postRubrics(options) {
|
|
1707
|
-
return (options?.client ?? this.client).post({
|
|
1708
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1709
|
-
url: '/rubrics',
|
|
1710
|
-
...options,
|
|
1711
|
-
headers: {
|
|
1712
|
-
'Content-Type': 'application/json',
|
|
1713
|
-
...options?.headers
|
|
1714
|
-
}
|
|
1715
|
-
});
|
|
1716
|
-
}
|
|
1717
|
-
/**
|
|
1718
|
-
* Generate rubric
|
|
1719
|
-
*
|
|
1720
|
-
* Start a background job to generate a rubric using AI.
|
|
1721
|
-
*/
|
|
1722
|
-
postRubricsGenerate(options) {
|
|
1723
|
-
return (options?.client ?? this.client).post({
|
|
1724
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1725
|
-
url: '/rubrics/generate',
|
|
1726
|
-
...options,
|
|
1727
|
-
headers: {
|
|
1728
|
-
'Content-Type': 'application/json',
|
|
1729
|
-
...options?.headers
|
|
1730
|
-
}
|
|
1731
|
-
});
|
|
1732
|
-
}
|
|
1733
|
-
/**
|
|
1734
|
-
* Delete rubric
|
|
1735
|
-
*
|
|
1736
|
-
* Delete a rubric from the current workspace.
|
|
1737
|
-
*/
|
|
1738
|
-
deleteRubricsId(options) {
|
|
1739
|
-
return (options.client ?? this.client).delete({
|
|
1740
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1741
|
-
url: '/rubrics/{id}',
|
|
1742
|
-
...options
|
|
1743
|
-
});
|
|
1744
|
-
}
|
|
1745
|
-
/**
|
|
1746
|
-
* Update rubric
|
|
1747
|
-
*
|
|
1748
|
-
* Update an existing rubric in the current workspace.
|
|
1749
|
-
*/
|
|
1750
|
-
patchRubricsId(options) {
|
|
1751
|
-
return (options.client ?? this.client).patch({
|
|
1752
|
-
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1753
|
-
url: '/rubrics/{id}',
|
|
1754
|
-
...options,
|
|
1755
|
-
headers: {
|
|
1756
|
-
'Content-Type': 'application/json',
|
|
1757
|
-
...options.headers
|
|
1758
|
-
}
|
|
1759
|
-
});
|
|
1760
|
-
}
|
|
1761
|
-
get questionTypes() {
|
|
1762
|
-
return this._questionTypes ?? (this._questionTypes = new QuestionTypes({ client: this.client }));
|
|
1763
|
-
}
|
|
1764
|
-
get library() {
|
|
1765
|
-
return this._library ?? (this._library = new Library({ client: this.client }));
|
|
1766
|
-
}
|
|
1767
|
-
get oauth() {
|
|
1768
|
-
return this._oauth ?? (this._oauth = new Oauth({ client: this.client }));
|
|
1769
|
-
}
|
|
1770
|
-
get embedSessions() {
|
|
1771
|
-
return this._embedSessions ?? (this._embedSessions = new EmbedSessions({ client: this.client }));
|
|
1772
|
-
}
|
|
1773
|
-
get me() {
|
|
1774
|
-
return this._me ?? (this._me = new Me({ client: this.client }));
|
|
1775
|
-
}
|
|
1776
|
-
get media() {
|
|
1777
|
-
return this._media ?? (this._media = new Media({ client: this.client }));
|
|
1778
|
-
}
|
|
1779
|
-
get org() {
|
|
1780
|
-
return this._org ?? (this._org = new Org({ client: this.client }));
|
|
1781
|
-
}
|
|
1782
|
-
get orgs() {
|
|
1783
|
-
return this._orgs ?? (this._orgs = new Orgs({ client: this.client }));
|
|
1784
|
-
}
|
|
1785
|
-
get apiKeys() {
|
|
1786
|
-
return this._apiKeys ?? (this._apiKeys = new ApiKeys({ client: this.client }));
|
|
1787
|
-
}
|
|
1788
|
-
get attributes() {
|
|
1789
|
-
return this._attributes ?? (this._attributes = new Attributes({ client: this.client }));
|
|
1790
|
-
}
|
|
1791
|
-
get taxonomies() {
|
|
1792
|
-
return this._taxonomies ?? (this._taxonomies = new Taxonomies({ client: this.client }));
|
|
1793
|
-
}
|
|
1794
|
-
get permissions() {
|
|
1795
|
-
return this._permissions ?? (this._permissions = new Permissions({ client: this.client }));
|
|
1796
|
-
}
|
|
1797
|
-
get studentLevels() {
|
|
1798
|
-
return this._studentLevels ?? (this._studentLevels = new StudentLevels({ client: this.client }));
|
|
1799
|
-
}
|
|
1800
|
-
get users() {
|
|
1801
|
-
return this._users ?? (this._users = new Users({ client: this.client }));
|
|
1802
|
-
}
|
|
1803
|
-
get exam() {
|
|
1804
|
-
return this._exam ?? (this._exam = new Exam({ client: this.client }));
|
|
1805
|
-
}
|
|
1806
|
-
get exams() {
|
|
1807
|
-
return this._exams ?? (this._exams = new Exams({ client: this.client }));
|
|
1808
|
-
}
|
|
1809
|
-
get practiceSpaces() {
|
|
1810
|
-
return this._practiceSpaces ?? (this._practiceSpaces = new PracticeSpaces({ client: this.client }));
|
|
1811
|
-
}
|
|
1812
|
-
get sourceMaterials() {
|
|
1813
|
-
return this._sourceMaterials ?? (this._sourceMaterials = new SourceMaterials({ client: this.client }));
|
|
1814
|
-
}
|
|
1815
|
-
get folders() {
|
|
1816
|
-
return this._folders ?? (this._folders = new Folders({ client: this.client }));
|
|
1817
|
-
}
|
|
1818
|
-
get questionBank() {
|
|
1819
|
-
return this._questionBank ?? (this._questionBank = new QuestionBank({ client: this.client }));
|
|
1820
|
-
}
|
|
1821
|
-
get jobs() {
|
|
1822
|
-
return this._jobs ?? (this._jobs = new Jobs({ client: this.client }));
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
exports.Examplary = Examplary;
|
|
1826
|
-
Examplary.__registry = new HeyApiRegistry();
|