@examplary/sdk 0.0.1 → 1.0.2
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/generated/client/client/client.gen.js +99 -163
- package/dist/generated/client/client/index.js +1 -1
- package/dist/generated/client/client/types.gen.d.ts +3 -4
- package/dist/generated/client/client/types.gen.js +1 -1
- package/dist/generated/client/client/utils.gen.js +94 -243
- package/dist/generated/client/client.gen.js +1 -1
- package/dist/generated/client/core/auth.gen.js +14 -65
- package/dist/generated/client/core/bodySerializer.gen.d.ts +4 -4
- package/dist/generated/client/core/bodySerializer.gen.js +12 -32
- package/dist/generated/client/core/params.gen.js +58 -145
- package/dist/generated/client/core/pathSerializer.gen.js +34 -66
- package/dist/generated/client/core/queryKeySerializer.gen.d.ts +1 -1
- package/dist/generated/client/core/queryKeySerializer.gen.js +21 -63
- package/dist/generated/client/core/serverSentEvents.gen.d.ts +1 -1
- package/dist/generated/client/core/serverSentEvents.gen.js +129 -276
- package/dist/generated/client/core/types.gen.d.ts +1 -1
- package/dist/generated/client/core/types.gen.js +1 -1
- package/dist/generated/client/core/utils.gen.js +56 -80
- package/dist/generated/client/index.d.ts +2 -2
- package/dist/generated/client/index.js +6 -1
- package/dist/generated/client/sdk.gen.d.ts +181 -3
- package/dist/generated/client/sdk.gen.js +1330 -799
- package/dist/generated/client/types.gen.d.ts +711 -71
- package/dist/src/index.js +26 -60
- package/package.json +8 -14
|
@@ -1,1295 +1,1826 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated based on the Examplary API schema.
|
|
3
|
-
var __extends = (this && this.__extends) || (function () {
|
|
4
|
-
var extendStatics = function (d, b) {
|
|
5
|
-
extendStatics = Object.setPrototypeOf ||
|
|
6
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
7
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
8
|
-
return extendStatics(d, b);
|
|
9
|
-
};
|
|
10
|
-
return function (d, b) {
|
|
11
|
-
if (typeof b !== "function" && b !== null)
|
|
12
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
13
|
-
extendStatics(d, b);
|
|
14
|
-
function __() { this.constructor = d; }
|
|
15
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16
|
-
};
|
|
17
|
-
})();
|
|
18
|
-
var __assign = (this && this.__assign) || function () {
|
|
19
|
-
__assign = Object.assign || function(t) {
|
|
20
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
21
|
-
s = arguments[i];
|
|
22
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
23
|
-
t[p] = s[p];
|
|
24
|
-
}
|
|
25
|
-
return t;
|
|
26
|
-
};
|
|
27
|
-
return __assign.apply(this, arguments);
|
|
28
|
-
};
|
|
29
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.Examplary = exports.QuestionBank = exports.Folders = exports.SourceMaterials = exports.PracticeSpaces = exports.Exams = exports.Exam = exports.Export = exports.Questions = exports.Sessions = exports.Users = exports.StudentLevels = exports.Permissions = exports.Taxonomies = exports.ApiKeys = exports.Orgs = exports.Org = exports.Media = exports.Me = exports.EmbedSessions = exports.Oauth = exports.Library = exports.Items2 = exports.Publishers = exports.Items = exports.QuestionTypes = void 0;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var HeyApiRegistry = /** @class */ (function () {
|
|
40
|
-
function HeyApiRegistry() {
|
|
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() {
|
|
41
13
|
this.defaultKey = 'default';
|
|
42
14
|
this.instances = new Map();
|
|
43
15
|
}
|
|
44
|
-
|
|
45
|
-
|
|
16
|
+
get(key) {
|
|
17
|
+
const instance = this.instances.get(key ?? this.defaultKey);
|
|
46
18
|
if (!instance) {
|
|
47
|
-
throw new Error(
|
|
19
|
+
throw new Error(`No SDK client found. Create one with "new Examplary()" to fix this error.`);
|
|
48
20
|
}
|
|
49
21
|
return instance;
|
|
50
|
-
};
|
|
51
|
-
HeyApiRegistry.prototype.set = function (value, key) {
|
|
52
|
-
this.instances.set(key !== null && key !== void 0 ? key : this.defaultKey, value);
|
|
53
|
-
};
|
|
54
|
-
return HeyApiRegistry;
|
|
55
|
-
}());
|
|
56
|
-
var QuestionTypes = /** @class */ (function (_super) {
|
|
57
|
-
__extends(QuestionTypes, _super);
|
|
58
|
-
function QuestionTypes() {
|
|
59
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
60
22
|
}
|
|
23
|
+
set(value, key) {
|
|
24
|
+
this.instances.set(key ?? this.defaultKey, value);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
class QuestionTypes extends HeyApiClient {
|
|
61
28
|
/**
|
|
62
29
|
* List public question types
|
|
63
30
|
*
|
|
64
31
|
* Lists all public question types, which can be enabled in workspaces.
|
|
65
32
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
+
}
|
|
70
40
|
/**
|
|
71
41
|
* Delete question type
|
|
72
42
|
*
|
|
73
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.
|
|
74
44
|
*/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
+
}
|
|
79
52
|
/**
|
|
80
53
|
* Get question type
|
|
81
54
|
*
|
|
82
55
|
* Retrieves a specific question type by its ID.
|
|
83
56
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
+
}
|
|
88
64
|
/**
|
|
89
65
|
* Get question type PCI module for QTI 3 export
|
|
90
66
|
*
|
|
91
67
|
* Get JS module for a question type PCI for QTI 3 export.
|
|
92
68
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
+
}
|
|
97
76
|
/**
|
|
98
77
|
* List question types
|
|
99
78
|
*
|
|
100
79
|
* Lists all question types, either those available by default or those created within the user's organization.
|
|
101
80
|
*/
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
81
|
+
list(options) {
|
|
82
|
+
return (options?.client ?? this.client).get({
|
|
83
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
84
|
+
url: '/question-types',
|
|
85
|
+
...options
|
|
86
|
+
});
|
|
87
|
+
}
|
|
106
88
|
/**
|
|
107
89
|
* Upsert question type
|
|
108
90
|
*
|
|
109
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.
|
|
110
92
|
*/
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
+
}
|
|
115
104
|
/**
|
|
116
105
|
* Enable question type
|
|
117
106
|
*
|
|
118
107
|
* Enable a question type for the current workspace.
|
|
119
108
|
*/
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
+
}
|
|
124
116
|
/**
|
|
125
117
|
* Disable question type
|
|
126
118
|
*
|
|
127
119
|
* Disable a question type for the current workspace.
|
|
128
120
|
*/
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
exports.QuestionTypes = QuestionTypes;
|
|
136
|
-
var Items = /** @class */ (function (_super) {
|
|
137
|
-
__extends(Items, _super);
|
|
138
|
-
function Items() {
|
|
139
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
140
127
|
}
|
|
128
|
+
}
|
|
129
|
+
exports.QuestionTypes = QuestionTypes;
|
|
130
|
+
class Items extends HeyApiClient {
|
|
141
131
|
/**
|
|
142
132
|
* List items by publisher
|
|
143
133
|
*
|
|
144
134
|
* Lists all library items for the specified publisher profile.
|
|
145
135
|
*/
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
+
}
|
|
150
143
|
/**
|
|
151
144
|
* Create library item
|
|
152
145
|
*
|
|
153
146
|
* Adds an item to the library. Only the publisher owner can add items to their publisher profile.
|
|
154
147
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
166
158
|
}
|
|
159
|
+
}
|
|
160
|
+
exports.Items = Items;
|
|
161
|
+
class Publishers extends HeyApiClient {
|
|
167
162
|
/**
|
|
168
163
|
* List featured publishers
|
|
169
164
|
*
|
|
170
165
|
* Lists all library publishers that are marked as featured.
|
|
171
166
|
*/
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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
|
+
}
|
|
176
174
|
/**
|
|
177
175
|
* List all publishers
|
|
178
176
|
*
|
|
179
177
|
* Lists all library publisher profiles.
|
|
180
178
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
179
|
+
listAll(options) {
|
|
180
|
+
return (options?.client ?? this.client).get({
|
|
181
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
182
|
+
url: '/library/publishers',
|
|
183
|
+
...options
|
|
184
|
+
});
|
|
185
|
+
}
|
|
185
186
|
/**
|
|
186
187
|
* Create publisher
|
|
187
188
|
*
|
|
188
189
|
* Creates a new library publisher profile.
|
|
189
190
|
*/
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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
|
+
}
|
|
194
202
|
/**
|
|
195
203
|
* List my publishers
|
|
196
204
|
*
|
|
197
205
|
* Lists all library publisher profiles created by the authenticated user.
|
|
198
206
|
*/
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|
+
}
|
|
203
214
|
/**
|
|
204
215
|
* Delete publisher
|
|
205
216
|
*
|
|
206
217
|
* Deletes a library publisher profile. Only the owner can delete their publisher profile.
|
|
207
218
|
*/
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
+
}
|
|
212
226
|
/**
|
|
213
227
|
* Update publisher
|
|
214
228
|
*
|
|
215
229
|
* Updates a library publisher profile. Only the owner can update their publisher profile.
|
|
216
230
|
*/
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}(HeyApiClient));
|
|
231
|
-
exports.Publishers = Publishers;
|
|
232
|
-
var Items2 = /** @class */ (function (_super) {
|
|
233
|
-
__extends(Items2, _super);
|
|
234
|
-
function Items2() {
|
|
235
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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 }));
|
|
236
244
|
}
|
|
245
|
+
}
|
|
246
|
+
exports.Publishers = Publishers;
|
|
247
|
+
class Items2 extends HeyApiClient {
|
|
237
248
|
/**
|
|
238
249
|
* List featured library items
|
|
239
250
|
*
|
|
240
251
|
* Lists all library items that are marked as featured.
|
|
241
252
|
*/
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
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
|
+
}
|
|
246
260
|
/**
|
|
247
261
|
* Delete library item
|
|
248
262
|
*
|
|
249
263
|
* Deletes a library item. Only the publisher owner can delete items from their publisher profile.
|
|
250
264
|
*/
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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
|
+
}
|
|
255
272
|
/**
|
|
256
273
|
* Update library item
|
|
257
274
|
*
|
|
258
275
|
* Updates a library item. Only the publisher owner can update items in their publisher profile.
|
|
259
276
|
*/
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
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
|
+
}
|
|
266
289
|
exports.Items2 = Items2;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
get: function () {
|
|
274
|
-
var _a;
|
|
275
|
-
return (_a = this._publishers) !== null && _a !== void 0 ? _a : (this._publishers = new Publishers({ client: this.client }));
|
|
276
|
-
},
|
|
277
|
-
enumerable: false,
|
|
278
|
-
configurable: true
|
|
279
|
-
});
|
|
280
|
-
Object.defineProperty(Library.prototype, "items", {
|
|
281
|
-
get: function () {
|
|
282
|
-
var _a;
|
|
283
|
-
return (_a = this._items) !== null && _a !== void 0 ? _a : (this._items = new Items2({ client: this.client }));
|
|
284
|
-
},
|
|
285
|
-
enumerable: false,
|
|
286
|
-
configurable: true
|
|
287
|
-
});
|
|
288
|
-
return Library;
|
|
289
|
-
}(HeyApiClient));
|
|
290
|
-
exports.Library = Library;
|
|
291
|
-
var Oauth = /** @class */ (function (_super) {
|
|
292
|
-
__extends(Oauth, _super);
|
|
293
|
-
function Oauth() {
|
|
294
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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 }));
|
|
295
296
|
}
|
|
297
|
+
}
|
|
298
|
+
exports.Library = Library;
|
|
299
|
+
class Oauth extends HeyApiClient {
|
|
296
300
|
/**
|
|
297
301
|
* OAuth authorization endpoint
|
|
298
302
|
*
|
|
299
303
|
* Initiates OAuth authorization flow. Redirects to the frontend authorization UI where users can approve or deny access.
|
|
300
304
|
*/
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
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
|
+
}
|
|
305
312
|
/**
|
|
306
313
|
* OAuth token endpoint
|
|
307
314
|
*
|
|
308
315
|
* Exchange authorization code for access token, or refresh an existing token.
|
|
309
316
|
*/
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
exports.Oauth = Oauth;
|
|
317
|
-
var EmbedSessions = /** @class */ (function (_super) {
|
|
318
|
-
__extends(EmbedSessions, _super);
|
|
319
|
-
function EmbedSessions() {
|
|
320
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
317
|
+
token(options) {
|
|
318
|
+
return (options?.client ?? this.client).post({
|
|
319
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
320
|
+
url: '/oauth/token',
|
|
321
|
+
...options
|
|
322
|
+
});
|
|
321
323
|
}
|
|
324
|
+
}
|
|
325
|
+
exports.Oauth = Oauth;
|
|
326
|
+
class EmbedSessions extends HeyApiClient {
|
|
322
327
|
/**
|
|
323
328
|
* Create embed session
|
|
324
329
|
*
|
|
325
330
|
* Create a new embed session. This allows you to embed the exam generation flow into your own application.
|
|
326
331
|
*/
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
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
|
+
}
|
|
331
344
|
/**
|
|
332
345
|
* Revoke embed session
|
|
333
346
|
*
|
|
334
347
|
* Revoke access to an embed session by its ID.
|
|
335
348
|
*/
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
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
|
+
}
|
|
340
356
|
/**
|
|
341
357
|
* Get embed session
|
|
342
358
|
*
|
|
343
359
|
* Retrieve an embed session by its ID.
|
|
344
360
|
*/
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
var Me = /** @class */ (function (_super) {
|
|
353
|
-
__extends(Me, _super);
|
|
354
|
-
function Me() {
|
|
355
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
356
368
|
}
|
|
369
|
+
}
|
|
370
|
+
exports.EmbedSessions = EmbedSessions;
|
|
371
|
+
class Me extends HeyApiClient {
|
|
357
372
|
/**
|
|
358
373
|
* Get me
|
|
359
374
|
*
|
|
360
375
|
* Get the current user's account details.
|
|
361
376
|
*/
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
377
|
+
get(options) {
|
|
378
|
+
return (options?.client ?? this.client).get({
|
|
379
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
380
|
+
url: '/me',
|
|
381
|
+
...options
|
|
382
|
+
});
|
|
383
|
+
}
|
|
366
384
|
/**
|
|
367
385
|
* Update me
|
|
368
386
|
*
|
|
369
387
|
* Update the current user's account details.
|
|
370
388
|
*/
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
382
399
|
}
|
|
400
|
+
}
|
|
401
|
+
exports.Me = Me;
|
|
402
|
+
class Media extends HeyApiClient {
|
|
383
403
|
/**
|
|
384
404
|
* Get file upload URL
|
|
385
405
|
*
|
|
386
406
|
* Returns a signed URL for uploading a file, and a public URL for accessing it afterwards.
|
|
387
407
|
*/
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
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
|
+
}
|
|
394
417
|
exports.Media = Media;
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
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
|
+
});
|
|
399
442
|
}
|
|
443
|
+
}
|
|
444
|
+
exports.CustomDomain = CustomDomain;
|
|
445
|
+
class Org extends HeyApiClient {
|
|
400
446
|
/**
|
|
401
447
|
* Delete organization
|
|
402
448
|
*/
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
449
|
+
delete(options) {
|
|
450
|
+
return (options?.client ?? this.client).delete({
|
|
451
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
452
|
+
url: '/org',
|
|
453
|
+
...options
|
|
454
|
+
});
|
|
455
|
+
}
|
|
407
456
|
/**
|
|
408
457
|
* Get organization
|
|
409
458
|
*/
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
459
|
+
get(options) {
|
|
460
|
+
return (options?.client ?? this.client).get({
|
|
461
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
462
|
+
url: '/org',
|
|
463
|
+
...options
|
|
464
|
+
});
|
|
465
|
+
}
|
|
414
466
|
/**
|
|
415
467
|
* Update organization
|
|
416
468
|
*/
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
428
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 {
|
|
429
486
|
/**
|
|
430
487
|
* List all organizations
|
|
431
488
|
*/
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
489
|
+
list(options) {
|
|
490
|
+
return (options?.client ?? this.client).get({
|
|
491
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
492
|
+
url: '/orgs',
|
|
493
|
+
...options
|
|
494
|
+
});
|
|
495
|
+
}
|
|
436
496
|
/**
|
|
437
497
|
* Create a new organization
|
|
438
498
|
*
|
|
439
499
|
* Create a new workspace to collaborate with others on exams.
|
|
440
500
|
*/
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
452
511
|
}
|
|
512
|
+
}
|
|
513
|
+
exports.Orgs = Orgs;
|
|
514
|
+
class ApiKeys extends HeyApiClient {
|
|
453
515
|
/**
|
|
454
516
|
* Get API key
|
|
455
517
|
*
|
|
456
518
|
* Get the API key for the current org/user combination. Creates one if none exists.
|
|
457
519
|
*/
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
520
|
+
get(options) {
|
|
521
|
+
return (options?.client ?? this.client).get({
|
|
522
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
523
|
+
url: '/api-keys',
|
|
524
|
+
...options
|
|
525
|
+
});
|
|
526
|
+
}
|
|
462
527
|
/**
|
|
463
528
|
* Reset API key
|
|
464
529
|
*
|
|
465
530
|
* Invalidate old API keys for this org/user and create a new one.
|
|
466
531
|
*/
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
}
|
|
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
|
+
}
|
|
473
540
|
exports.ApiKeys = ApiKeys;
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
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
|
+
});
|
|
478
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 {
|
|
479
617
|
/**
|
|
480
618
|
* Get taxonomies
|
|
481
619
|
*
|
|
482
620
|
* Get a list available taxonomies, including defaults and taxonomies created in the current workspace.
|
|
483
621
|
*/
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
622
|
+
list(options) {
|
|
623
|
+
return (options?.client ?? this.client).get({
|
|
624
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
625
|
+
url: '/taxonomies',
|
|
626
|
+
...options
|
|
627
|
+
});
|
|
628
|
+
}
|
|
488
629
|
/**
|
|
489
630
|
* Create taxonomy
|
|
490
631
|
*
|
|
491
632
|
* Save a new taxonomy in the current workspace.
|
|
492
633
|
*/
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
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
|
+
}
|
|
497
645
|
/**
|
|
498
646
|
* Delete taxonomy
|
|
499
647
|
*
|
|
500
648
|
* Delete a taxonomy from the current workspace. This fails if there are any exams associated with the taxonomy.
|
|
501
649
|
*/
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
650
|
+
delete(options) {
|
|
651
|
+
return (options.client ?? this.client).delete({
|
|
652
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
653
|
+
url: '/taxonomies/{id}',
|
|
654
|
+
...options
|
|
655
|
+
});
|
|
656
|
+
}
|
|
506
657
|
/**
|
|
507
658
|
* Update taxonomy
|
|
508
659
|
*
|
|
509
660
|
* Update an existing taxonomy in the current workspace.
|
|
510
661
|
*/
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
522
672
|
}
|
|
673
|
+
}
|
|
674
|
+
exports.Taxonomies = Taxonomies;
|
|
675
|
+
class Permissions extends HeyApiClient {
|
|
523
676
|
/**
|
|
524
677
|
* Get sharing permissions
|
|
525
678
|
*
|
|
526
679
|
* Get a list of users, groups and orgs that have access to a specific resource.
|
|
527
680
|
*/
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
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
|
+
}
|
|
532
689
|
/**
|
|
533
690
|
* Create permission
|
|
534
691
|
*
|
|
535
692
|
* Create a new permission for a specific resource, or update the role of an existing actor.
|
|
536
693
|
*/
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
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
|
+
}
|
|
541
706
|
/**
|
|
542
707
|
* Remove permission
|
|
543
708
|
*
|
|
544
709
|
* Remove a permission for a specific actor on a specific resource.
|
|
545
710
|
*/
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
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
|
+
}
|
|
550
718
|
/**
|
|
551
719
|
* Get actor role
|
|
552
720
|
*
|
|
553
721
|
* Get the role of a specific actor for a specific resource.
|
|
554
722
|
*/
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
var StudentLevels = /** @class */ (function (_super) {
|
|
563
|
-
__extends(StudentLevels, _super);
|
|
564
|
-
function StudentLevels() {
|
|
565
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
566
730
|
}
|
|
731
|
+
}
|
|
732
|
+
exports.Permissions = Permissions;
|
|
733
|
+
class StudentLevels extends HeyApiClient {
|
|
567
734
|
/**
|
|
568
735
|
* List available student levels
|
|
569
736
|
*
|
|
570
737
|
* Get a list of available default student levels.
|
|
571
738
|
*/
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
}
|
|
578
|
-
exports.StudentLevels = StudentLevels;
|
|
579
|
-
var Users = /** @class */ (function (_super) {
|
|
580
|
-
__extends(Users, _super);
|
|
581
|
-
function Users() {
|
|
582
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
739
|
+
list(options) {
|
|
740
|
+
return (options?.client ?? this.client).get({
|
|
741
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
742
|
+
url: '/student-levels',
|
|
743
|
+
...options
|
|
744
|
+
});
|
|
583
745
|
}
|
|
746
|
+
}
|
|
747
|
+
exports.StudentLevels = StudentLevels;
|
|
748
|
+
class Users extends HeyApiClient {
|
|
584
749
|
/**
|
|
585
750
|
* List users
|
|
586
751
|
*
|
|
587
752
|
* Get a list of all users in the workspace.
|
|
588
753
|
*/
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
754
|
+
list(options) {
|
|
755
|
+
return (options?.client ?? this.client).get({
|
|
756
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
757
|
+
url: '/users',
|
|
758
|
+
...options
|
|
759
|
+
});
|
|
760
|
+
}
|
|
593
761
|
/**
|
|
594
762
|
* Create user
|
|
595
763
|
*
|
|
596
764
|
* Create a new user in the workspace.
|
|
597
765
|
*/
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
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
|
+
}
|
|
602
777
|
/**
|
|
603
778
|
* Delete user
|
|
604
779
|
*
|
|
605
780
|
* Delete a user from the workspace.
|
|
606
781
|
*/
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
782
|
+
delete(options) {
|
|
783
|
+
return (options.client ?? this.client).delete({
|
|
784
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
785
|
+
url: '/users/{id}',
|
|
786
|
+
...options
|
|
787
|
+
});
|
|
788
|
+
}
|
|
611
789
|
/**
|
|
612
790
|
* Update user role
|
|
613
791
|
*
|
|
614
792
|
* Update a user's role within the workspace.
|
|
615
793
|
*/
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}
|
|
622
|
-
exports.Users = Users;
|
|
623
|
-
var Sessions = /** @class */ (function (_super) {
|
|
624
|
-
__extends(Sessions, _super);
|
|
625
|
-
function Sessions() {
|
|
626
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
794
|
+
update(options) {
|
|
795
|
+
return (options.client ?? this.client).patch({
|
|
796
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
797
|
+
url: '/users/{id}',
|
|
798
|
+
...options
|
|
799
|
+
});
|
|
627
800
|
}
|
|
801
|
+
}
|
|
802
|
+
exports.Users = Users;
|
|
803
|
+
class Sessions extends HeyApiClient {
|
|
628
804
|
/**
|
|
629
805
|
* List exam sessions
|
|
630
806
|
*
|
|
631
807
|
* Get a list of all student sessions for an exam, representing a set of answers from a student.
|
|
632
808
|
*/
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
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
|
+
}
|
|
637
816
|
/**
|
|
638
817
|
* Create session
|
|
639
818
|
*
|
|
640
819
|
* Manually create a session, possibly from uploaded data.
|
|
641
820
|
*/
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
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
|
+
}
|
|
646
832
|
/**
|
|
647
833
|
* Get answers from scan
|
|
648
834
|
*
|
|
649
835
|
* Scan student answers from a document.
|
|
650
836
|
*/
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
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
|
+
}
|
|
655
844
|
/**
|
|
656
845
|
* Delete exam session
|
|
657
846
|
*
|
|
658
847
|
* Remove an exam session.
|
|
659
848
|
*/
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
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
|
+
}
|
|
664
856
|
/**
|
|
665
857
|
* Get exam session
|
|
666
858
|
*
|
|
667
859
|
* Get a single exam session by its ID, representing a set of answers from a student.
|
|
668
860
|
*/
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
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
|
+
}
|
|
673
868
|
/**
|
|
674
869
|
* Provide feedback
|
|
675
870
|
*
|
|
676
871
|
* Set teacher feedback and/or a grade for a specific question in an exam session.
|
|
677
872
|
*/
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
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
|
+
}
|
|
682
884
|
/**
|
|
683
885
|
* Provide overall feedback
|
|
684
886
|
*
|
|
685
887
|
* Set teacher feedback for the test as a whole in an exam session.
|
|
686
888
|
*/
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
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
|
+
}
|
|
691
900
|
/**
|
|
692
901
|
* Generate overall feedback
|
|
693
902
|
*
|
|
694
903
|
* Generate feedback for the test as a whole in an exam session.
|
|
695
904
|
*/
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
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
|
+
}
|
|
700
912
|
/**
|
|
701
913
|
* Accept AI grading suggestions
|
|
702
914
|
*
|
|
703
915
|
* Accept all AI-generated grading suggestions for the exam session.
|
|
704
916
|
*/
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
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
|
+
}
|
|
709
924
|
/**
|
|
710
925
|
* Accept single AI grading suggestion
|
|
711
926
|
*
|
|
712
927
|
* Accept a single AI-generated grading suggestion for the exam session.
|
|
713
928
|
*/
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
}
|
|
720
|
-
exports.Sessions = Sessions;
|
|
721
|
-
var Questions = /** @class */ (function (_super) {
|
|
722
|
-
__extends(Questions, _super);
|
|
723
|
-
function Questions() {
|
|
724
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
725
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 {
|
|
726
955
|
/**
|
|
727
956
|
* Import questions
|
|
728
957
|
*
|
|
729
958
|
* Import questions into an exam from a file. Support Word, PDF, Moodle quiz XML and plain text files.
|
|
730
959
|
*/
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
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
|
+
}
|
|
735
971
|
/**
|
|
736
972
|
* Generate question
|
|
737
973
|
*
|
|
738
974
|
* Generate a new question for the exam using an AI prompt.
|
|
739
975
|
*/
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
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
|
+
}
|
|
744
999
|
/**
|
|
745
1000
|
* Regenerate question
|
|
746
1001
|
*
|
|
747
1002
|
* Update a question using an AI prompt.
|
|
748
1003
|
*/
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
760
1014
|
}
|
|
1015
|
+
}
|
|
1016
|
+
exports.Questions = Questions;
|
|
1017
|
+
class Export extends HeyApiClient {
|
|
761
1018
|
/**
|
|
762
1019
|
* Export QTI 3 package
|
|
763
1020
|
*
|
|
764
1021
|
* Export an exam as a QTI 3 ZIP package.
|
|
765
1022
|
*/
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
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
|
+
}
|
|
770
1031
|
/**
|
|
771
1032
|
* Export QTI 2.1 package
|
|
772
1033
|
*
|
|
773
1034
|
* Export an exam as a QTI 2.1 ZIP package.
|
|
774
1035
|
*/
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
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
|
+
}
|
|
781
1045
|
exports.Export = Export;
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
786
|
-
}
|
|
787
|
-
Object.defineProperty(Exam.prototype, "sessions", {
|
|
788
|
-
get: function () {
|
|
789
|
-
var _a;
|
|
790
|
-
return (_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new Sessions({ client: this.client }));
|
|
791
|
-
},
|
|
792
|
-
enumerable: false,
|
|
793
|
-
configurable: true
|
|
794
|
-
});
|
|
795
|
-
Object.defineProperty(Exam.prototype, "questions", {
|
|
796
|
-
get: function () {
|
|
797
|
-
var _a;
|
|
798
|
-
return (_a = this._questions) !== null && _a !== void 0 ? _a : (this._questions = new Questions({ client: this.client }));
|
|
799
|
-
},
|
|
800
|
-
enumerable: false,
|
|
801
|
-
configurable: true
|
|
802
|
-
});
|
|
803
|
-
Object.defineProperty(Exam.prototype, "export", {
|
|
804
|
-
get: function () {
|
|
805
|
-
var _a;
|
|
806
|
-
return (_a = this._export) !== null && _a !== void 0 ? _a : (this._export = new Export({ client: this.client }));
|
|
807
|
-
},
|
|
808
|
-
enumerable: false,
|
|
809
|
-
configurable: true
|
|
810
|
-
});
|
|
811
|
-
return Exam;
|
|
812
|
-
}(HeyApiClient));
|
|
813
|
-
exports.Exam = Exam;
|
|
814
|
-
var Exams = /** @class */ (function (_super) {
|
|
815
|
-
__extends(Exams, _super);
|
|
816
|
-
function Exams() {
|
|
817
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
1046
|
+
class Exam extends HeyApiClient {
|
|
1047
|
+
get sessions() {
|
|
1048
|
+
return this._sessions ?? (this._sessions = new Sessions({ client: this.client }));
|
|
818
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 {
|
|
819
1059
|
/**
|
|
820
1060
|
* List exams
|
|
821
1061
|
*
|
|
822
1062
|
* Get a list of all exams within your workspace.
|
|
823
1063
|
*/
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
1064
|
+
list(options) {
|
|
1065
|
+
return (options?.client ?? this.client).get({
|
|
1066
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1067
|
+
url: '/exams',
|
|
1068
|
+
...options
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
828
1071
|
/**
|
|
829
1072
|
* Create exam
|
|
830
1073
|
*
|
|
831
1074
|
* Create a new exam within your workspace.
|
|
832
1075
|
*/
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
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
|
+
}
|
|
837
1087
|
/**
|
|
838
1088
|
* Import exam
|
|
839
1089
|
*
|
|
840
1090
|
* Create an exam by importing one or more source materials (e.g. an existing exam).
|
|
841
1091
|
*/
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
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
|
+
}
|
|
846
1103
|
/**
|
|
847
1104
|
* Delete exam
|
|
848
1105
|
*
|
|
849
1106
|
* Delete the exam.
|
|
850
1107
|
*/
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
1108
|
+
delete(options) {
|
|
1109
|
+
return (options.client ?? this.client).delete({
|
|
1110
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1111
|
+
url: '/exams/{id}',
|
|
1112
|
+
...options
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
855
1115
|
/**
|
|
856
1116
|
* Get exam
|
|
857
1117
|
*
|
|
858
1118
|
* Get a single exam by its ID.
|
|
859
1119
|
*/
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
1120
|
+
get(options) {
|
|
1121
|
+
return (options.client ?? this.client).get({
|
|
1122
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1123
|
+
url: '/exams/{id}',
|
|
1124
|
+
...options
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
864
1127
|
/**
|
|
865
1128
|
* Update exam
|
|
866
1129
|
*
|
|
867
1130
|
* Update an existing exam.
|
|
868
1131
|
*/
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
1132
|
+
update(options) {
|
|
1133
|
+
return (options.client ?? this.client).post({
|
|
1134
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1135
|
+
url: '/exams/{id}',
|
|
1136
|
+
...options
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
873
1139
|
/**
|
|
874
1140
|
* Duplicate exam
|
|
875
1141
|
*
|
|
876
1142
|
* Duplicate the exam's questions and settings to a new exam.
|
|
877
1143
|
*/
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
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
|
+
}
|
|
882
1155
|
/**
|
|
883
1156
|
* Print exam
|
|
884
1157
|
*
|
|
885
1158
|
* Export an exam to a PDF file or Word document.
|
|
886
1159
|
*/
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
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
|
+
}
|
|
891
1167
|
/**
|
|
892
1168
|
* Generate exam
|
|
893
1169
|
*
|
|
894
1170
|
* Initiate a job to generate new questions for the exam using AI, based on the source materials and metadata specified.
|
|
895
1171
|
*/
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
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
|
+
}
|
|
900
1179
|
/**
|
|
901
1180
|
* Cancel exam generation
|
|
902
1181
|
*
|
|
903
1182
|
* Cancel an ongoing job to generate new questions for the exam using AI.
|
|
904
1183
|
*/
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
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
|
+
}
|
|
909
1191
|
/**
|
|
910
1192
|
* Get exam context suggestions
|
|
911
1193
|
*
|
|
912
1194
|
* Get AI-generated suggestions for context/instructions to include in the exam generation prompt, based on the source materials linked to the exam.
|
|
913
1195
|
*/
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
}
|
|
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
|
+
}
|
|
920
1204
|
exports.Exams = Exams;
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
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
|
+
});
|
|
925
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 {
|
|
926
1292
|
/**
|
|
927
1293
|
* List practice spaces
|
|
928
1294
|
*
|
|
929
1295
|
* Get a list of all practice spaces you have access to in this workspace.
|
|
930
1296
|
*/
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1297
|
+
list(options) {
|
|
1298
|
+
return (options?.client ?? this.client).get({
|
|
1299
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1300
|
+
url: '/practice-spaces',
|
|
1301
|
+
...options
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
935
1304
|
/**
|
|
936
1305
|
* Create practice space
|
|
937
1306
|
*
|
|
938
1307
|
* Create a new practice space within your workspace.
|
|
939
1308
|
*/
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
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
|
+
}
|
|
944
1320
|
/**
|
|
945
1321
|
* Delete practice space
|
|
946
1322
|
*
|
|
947
1323
|
* Delete the practice space.
|
|
948
1324
|
*/
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
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
|
+
}
|
|
953
1332
|
/**
|
|
954
1333
|
* Get practice space
|
|
955
1334
|
*
|
|
956
1335
|
* Get a single practice space by its ID.
|
|
957
1336
|
*/
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
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
|
+
}
|
|
962
1344
|
/**
|
|
963
1345
|
* Update practice space
|
|
964
1346
|
*
|
|
965
1347
|
* Update an existing practice space.
|
|
966
1348
|
*/
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
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
|
+
}
|
|
971
1400
|
/**
|
|
972
1401
|
* Preview top practice space questions
|
|
973
1402
|
*
|
|
974
1403
|
* Get a preview of the top practice space questions by quality score.
|
|
975
1404
|
*/
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
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
|
+
});
|
|
987
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 {
|
|
988
1449
|
/**
|
|
989
1450
|
* List source materials in org
|
|
990
1451
|
*
|
|
991
1452
|
* Returns a list of source materials for the current organization.
|
|
992
1453
|
*/
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
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
|
+
}
|
|
997
1462
|
/**
|
|
998
1463
|
* Add source material
|
|
999
1464
|
*
|
|
1000
1465
|
* Add a source material and start processing it for later use in an exam.
|
|
1001
1466
|
*/
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
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
|
+
}
|
|
1006
1479
|
/**
|
|
1007
1480
|
* Delete source material
|
|
1008
1481
|
*
|
|
1009
1482
|
* Deletes the specified source material.
|
|
1010
1483
|
*/
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
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
|
+
}
|
|
1015
1491
|
/**
|
|
1016
1492
|
* Get source material
|
|
1017
1493
|
*
|
|
1018
1494
|
* Returns the current status and facts extracted from the specified source material.
|
|
1019
1495
|
*/
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
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
|
+
}
|
|
1024
1504
|
/**
|
|
1025
1505
|
* Update source material
|
|
1026
1506
|
*
|
|
1027
1507
|
* Updates the specified source material.
|
|
1028
1508
|
*/
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
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
|
+
}
|
|
1033
1520
|
/**
|
|
1034
1521
|
* Create a source material slice
|
|
1035
1522
|
*
|
|
1036
1523
|
* Create a new source material based on a specific page range of an existing source material.
|
|
1037
1524
|
*/
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
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
|
+
});
|
|
1049
1536
|
}
|
|
1537
|
+
}
|
|
1538
|
+
exports.SourceMaterials = SourceMaterials;
|
|
1539
|
+
class Folders extends HeyApiClient {
|
|
1050
1540
|
/**
|
|
1051
1541
|
* Get folders
|
|
1052
1542
|
*
|
|
1053
1543
|
* Get a list of folders for exam organisation that exist within the current workspace.
|
|
1054
1544
|
*/
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1545
|
+
list(options) {
|
|
1546
|
+
return (options?.client ?? this.client).get({
|
|
1547
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1548
|
+
url: '/folders',
|
|
1549
|
+
...options
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1059
1552
|
/**
|
|
1060
1553
|
* Create folder
|
|
1061
1554
|
*
|
|
1062
1555
|
* Create a new folder in the current workspace.
|
|
1063
1556
|
*/
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
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
|
+
}
|
|
1068
1568
|
/**
|
|
1069
1569
|
* Delete folder
|
|
1070
1570
|
*
|
|
1071
1571
|
* Delete a folder from the current workspace. If there are any exams in the folder, they will be moved out of the folder.
|
|
1072
1572
|
*/
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1573
|
+
delete(options) {
|
|
1574
|
+
return (options.client ?? this.client).delete({
|
|
1575
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1576
|
+
url: '/folders/{id}',
|
|
1577
|
+
...options
|
|
1578
|
+
});
|
|
1579
|
+
}
|
|
1077
1580
|
/**
|
|
1078
1581
|
* Update folder
|
|
1079
1582
|
*
|
|
1080
1583
|
* Update an existing folder in the current workspace.
|
|
1081
1584
|
*/
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
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
|
+
});
|
|
1093
1595
|
}
|
|
1596
|
+
}
|
|
1597
|
+
exports.Folders = Folders;
|
|
1598
|
+
class QuestionBank extends HeyApiClient {
|
|
1094
1599
|
/**
|
|
1095
1600
|
* Get question bank items
|
|
1096
1601
|
*
|
|
1097
1602
|
* Get a list of question bank items that exist within the current workspace.
|
|
1098
1603
|
*/
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1604
|
+
list(options) {
|
|
1605
|
+
return (options?.client ?? this.client).get({
|
|
1606
|
+
security: [{ name: 'Authorization', type: 'apiKey' }],
|
|
1607
|
+
url: '/question-bank',
|
|
1608
|
+
...options
|
|
1609
|
+
});
|
|
1610
|
+
}
|
|
1103
1611
|
/**
|
|
1104
1612
|
* Add question to question bank
|
|
1105
1613
|
*
|
|
1106
1614
|
* Add a question to the question bank in the current workspace.
|
|
1107
1615
|
*/
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
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
|
+
}
|
|
1112
1627
|
/**
|
|
1113
1628
|
* Delete question bank item
|
|
1114
1629
|
*
|
|
1115
1630
|
* Delete a question bank item from the current workspace.
|
|
1116
1631
|
*/
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
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
|
+
}
|
|
1121
1639
|
/**
|
|
1122
1640
|
* Update question bank item
|
|
1123
1641
|
*
|
|
1124
1642
|
* Update an existing question bank item in the current workspace.
|
|
1125
1643
|
*/
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
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
|
+
}
|
|
1132
1656
|
exports.QuestionBank = QuestionBank;
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
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
|
+
}
|
|
1295
1825
|
exports.Examplary = Examplary;
|
|
1826
|
+
Examplary.__registry = new HeyApiRegistry();
|