@examplary/sdk 1.0.0 → 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.
@@ -1,895 +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 = void 0;
31
- var client_gen_1 = require("./client.gen");
32
- var HeyApiClient = /** @class */ (function () {
33
- function HeyApiClient(args) {
34
- var _a;
35
- this.client = (_a = args === null || args === void 0 ? void 0 : args.client) !== null && _a !== void 0 ? _a : client_gen_1.client;
36
- }
37
- return HeyApiClient;
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
- HeyApiRegistry.prototype.get = function (key) {
45
- var instance = this.instances.get(key !== null && key !== void 0 ? key : this.defaultKey);
16
+ get(key) {
17
+ const instance = this.instances.get(key ?? this.defaultKey);
46
18
  if (!instance) {
47
- throw new Error("No SDK client found. Create one with \"new Examplary()\" to fix this 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 Examplary = /** @class */ (function (_super) {
57
- __extends(Examplary, _super);
58
- function Examplary(args) {
59
- var _this = _super.call(this, args) || this;
60
- Examplary.__registry.set(_this, args === null || args === void 0 ? void 0 : args.key);
61
- return _this;
62
22
  }
23
+ set(value, key) {
24
+ this.instances.set(key ?? this.defaultKey, value);
25
+ }
26
+ }
27
+ class QuestionTypes extends HeyApiClient {
63
28
  /**
64
29
  * List public question types
65
30
  *
66
31
  * Lists all public question types, which can be enabled in workspaces.
67
32
  */
68
- Examplary.prototype.getQuestionTypesPublic = function (options) {
69
- var _a;
70
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types/public' }, options));
71
- };
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
+ }
72
40
  /**
73
41
  * Delete question type
74
42
  *
75
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.
76
44
  */
77
- Examplary.prototype.deleteQuestionTypesId = function (options) {
78
- var _a;
79
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types/{id}' }, options));
80
- };
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
+ }
81
52
  /**
82
53
  * Get question type
83
54
  *
84
55
  * Retrieves a specific question type by its ID.
85
56
  */
86
- Examplary.prototype.getQuestionTypesId = function (options) {
87
- var _a;
88
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types/{id}' }, options));
89
- };
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
+ }
90
64
  /**
91
65
  * Get question type PCI module for QTI 3 export
92
66
  *
93
67
  * Get JS module for a question type PCI for QTI 3 export.
94
68
  */
95
- Examplary.prototype.getQuestionTypesIdExportQti3Pci = function (options) {
96
- var _a;
97
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types/{id}/export/qti3-pci' }, options));
98
- };
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
+ }
99
76
  /**
100
77
  * List question types
101
78
  *
102
79
  * Lists all question types, either those available by default or those created within the user's organization.
103
80
  */
104
- Examplary.prototype.getQuestionTypes = function (options) {
105
- var _a;
106
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types' }, options));
107
- };
81
+ list(options) {
82
+ return (options?.client ?? this.client).get({
83
+ security: [{ name: 'Authorization', type: 'apiKey' }],
84
+ url: '/question-types',
85
+ ...options
86
+ });
87
+ }
108
88
  /**
109
89
  * Upsert question type
110
90
  *
111
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.
112
92
  */
113
- Examplary.prototype.postQuestionTypes = function (options) {
114
- var _a;
115
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
116
- };
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
+ }
117
104
  /**
118
105
  * Enable question type
119
106
  *
120
107
  * Enable a question type for the current workspace.
121
108
  */
122
- Examplary.prototype.postQuestionTypesIdEnable = function (options) {
123
- var _a;
124
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types/{id}/enable' }, options));
125
- };
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
+ }
126
116
  /**
127
117
  * Disable question type
128
118
  *
129
119
  * Disable a question type for the current workspace.
130
120
  */
131
- Examplary.prototype.postQuestionTypesIdDisable = function (options) {
132
- var _a;
133
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types/{id}/disable' }, options));
134
- };
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 {
135
131
  /**
136
132
  * List items by publisher
137
133
  *
138
134
  * Lists all library items for the specified publisher profile.
139
135
  */
140
- Examplary.prototype.getLibraryPublishersPublisherIdItems = function (options) {
141
- var _a;
142
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/publishers/{publisherId}/items' }, options));
143
- };
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
+ }
144
143
  /**
145
144
  * Create library item
146
145
  *
147
146
  * Adds an item to the library. Only the publisher owner can add items to their publisher profile.
148
147
  */
149
- Examplary.prototype.postLibraryPublishersPublisherIdItems = function (options) {
150
- var _a;
151
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/publishers/{publisherId}/items' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
152
- };
153
- /**
154
- * List featured library items
155
- *
156
- * Lists all library items that are marked as featured.
157
- */
158
- Examplary.prototype.getLibraryItemsFeatured = function (options) {
159
- var _a;
160
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/items/featured' }, options));
161
- };
162
- /**
163
- * Delete library item
164
- *
165
- * Deletes a library item. Only the publisher owner can delete items from their publisher profile.
166
- */
167
- Examplary.prototype.deleteLibraryItemsItemId = function (options) {
168
- var _a;
169
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/items/{itemId}' }, options));
170
- };
171
- /**
172
- * Update library item
173
- *
174
- * Updates a library item. Only the publisher owner can update items in their publisher profile.
175
- */
176
- Examplary.prototype.patchLibraryItemsItemId = function (options) {
177
- var _a;
178
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).patch(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/items/{itemId}' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
179
- };
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 {
180
162
  /**
181
163
  * List featured publishers
182
164
  *
183
165
  * Lists all library publishers that are marked as featured.
184
166
  */
185
- Examplary.prototype.getLibraryPublishersFeatured = function (options) {
186
- var _a;
187
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/publishers/featured' }, options));
188
- };
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
+ }
189
174
  /**
190
175
  * List all publishers
191
176
  *
192
177
  * Lists all library publisher profiles.
193
178
  */
194
- Examplary.prototype.getLibraryPublishers = function (options) {
195
- var _a;
196
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/publishers' }, options));
197
- };
179
+ listAll(options) {
180
+ return (options?.client ?? this.client).get({
181
+ security: [{ name: 'Authorization', type: 'apiKey' }],
182
+ url: '/library/publishers',
183
+ ...options
184
+ });
185
+ }
198
186
  /**
199
187
  * Create publisher
200
188
  *
201
189
  * Creates a new library publisher profile.
202
190
  */
203
- Examplary.prototype.postLibraryPublishers = function (options) {
204
- var _a;
205
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/publishers' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
206
- };
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
+ }
207
202
  /**
208
203
  * List my publishers
209
204
  *
210
205
  * Lists all library publisher profiles created by the authenticated user.
211
206
  */
212
- Examplary.prototype.getLibraryPublishersMine = function (options) {
213
- var _a;
214
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/publishers/mine' }, options));
215
- };
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
+ }
216
214
  /**
217
215
  * Delete publisher
218
216
  *
219
217
  * Deletes a library publisher profile. Only the owner can delete their publisher profile.
220
218
  */
221
- Examplary.prototype.deleteLibraryPublishersPublisherId = function (options) {
222
- var _a;
223
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/publishers/{publisherId}' }, options));
224
- };
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
+ }
225
226
  /**
226
227
  * Update publisher
227
228
  *
228
229
  * Updates a library publisher profile. Only the owner can update their publisher profile.
229
230
  */
230
- Examplary.prototype.patchLibraryPublishersPublisherId = function (options) {
231
- var _a;
232
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).patch(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/publishers/{publisherId}' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
233
- };
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 {
234
300
  /**
235
301
  * OAuth authorization endpoint
236
302
  *
237
303
  * Initiates OAuth authorization flow. Redirects to the frontend authorization UI where users can approve or deny access.
238
304
  */
239
- Examplary.prototype.getOauthAuthorize = function (options) {
240
- var _a;
241
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/oauth/authorize' }, options));
242
- };
305
+ authorize(options) {
306
+ return (options.client ?? this.client).get({
307
+ security: [{ name: 'Authorization', type: 'apiKey' }],
308
+ url: '/oauth/authorize',
309
+ ...options
310
+ });
311
+ }
243
312
  /**
244
313
  * OAuth token endpoint
245
314
  *
246
315
  * Exchange authorization code for access token, or refresh an existing token.
247
316
  */
248
- Examplary.prototype.postOauthToken = function (options) {
249
- var _a;
250
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/oauth/token' }, options));
251
- };
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 {
252
327
  /**
253
328
  * Create embed session
254
329
  *
255
330
  * Create a new embed session. This allows you to embed the exam generation flow into your own application.
256
331
  */
257
- Examplary.prototype.postEmbedSessions = function (options) {
258
- var _a;
259
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/embed-sessions' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
260
- };
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
+ }
261
344
  /**
262
345
  * Revoke embed session
263
346
  *
264
347
  * Revoke access to an embed session by its ID.
265
348
  */
266
- Examplary.prototype.deleteEmbedSessionsId = function (options) {
267
- var _a;
268
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/embed-sessions/{id}' }, options));
269
- };
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
+ }
270
356
  /**
271
357
  * Get embed session
272
358
  *
273
359
  * Retrieve an embed session by its ID.
274
360
  */
275
- Examplary.prototype.getEmbedSessionsId = function (options) {
276
- var _a;
277
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/embed-sessions/{id}' }, options));
278
- };
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 {
279
372
  /**
280
373
  * Get me
281
374
  *
282
375
  * Get the current user's account details.
283
376
  */
284
- Examplary.prototype.getMe = function (options) {
285
- var _a;
286
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/me' }, options));
287
- };
377
+ get(options) {
378
+ return (options?.client ?? this.client).get({
379
+ security: [{ name: 'Authorization', type: 'apiKey' }],
380
+ url: '/me',
381
+ ...options
382
+ });
383
+ }
288
384
  /**
289
385
  * Update me
290
386
  *
291
387
  * Update the current user's account details.
292
388
  */
293
- Examplary.prototype.patchMe = function (options) {
294
- var _a;
295
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).patch(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/me' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
296
- };
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 {
297
403
  /**
298
404
  * Get file upload URL
299
405
  *
300
406
  * Returns a signed URL for uploading a file, and a public URL for accessing it afterwards.
301
407
  */
302
- Examplary.prototype.getMediaUpload = function (options) {
303
- var _a;
304
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/media/upload' }, options));
305
- };
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 {
306
446
  /**
307
447
  * Delete organization
308
448
  */
309
- Examplary.prototype.deleteOrg = function (options) {
310
- var _a;
311
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/org' }, options));
312
- };
449
+ delete(options) {
450
+ return (options?.client ?? this.client).delete({
451
+ security: [{ name: 'Authorization', type: 'apiKey' }],
452
+ url: '/org',
453
+ ...options
454
+ });
455
+ }
313
456
  /**
314
457
  * Get organization
315
458
  */
316
- Examplary.prototype.getOrg = function (options) {
317
- var _a;
318
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/org' }, options));
319
- };
459
+ get(options) {
460
+ return (options?.client ?? this.client).get({
461
+ security: [{ name: 'Authorization', type: 'apiKey' }],
462
+ url: '/org',
463
+ ...options
464
+ });
465
+ }
320
466
  /**
321
467
  * Update organization
322
468
  */
323
- Examplary.prototype.patchOrg = function (options) {
324
- var _a;
325
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).patch(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/org' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
326
- };
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 {
327
486
  /**
328
487
  * List all organizations
329
488
  */
330
- Examplary.prototype.getOrgs = function (options) {
331
- var _a;
332
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/orgs' }, options));
333
- };
489
+ list(options) {
490
+ return (options?.client ?? this.client).get({
491
+ security: [{ name: 'Authorization', type: 'apiKey' }],
492
+ url: '/orgs',
493
+ ...options
494
+ });
495
+ }
334
496
  /**
335
497
  * Create a new organization
336
498
  *
337
499
  * Create a new workspace to collaborate with others on exams.
338
500
  */
339
- Examplary.prototype.postOrgs = function (options) {
340
- var _a;
341
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/orgs' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
342
- };
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 {
343
515
  /**
344
516
  * Get API key
345
517
  *
346
518
  * Get the API key for the current org/user combination. Creates one if none exists.
347
519
  */
348
- Examplary.prototype.getApiKeys = function (options) {
349
- var _a;
350
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/api-keys' }, options));
351
- };
520
+ get(options) {
521
+ return (options?.client ?? this.client).get({
522
+ security: [{ name: 'Authorization', type: 'apiKey' }],
523
+ url: '/api-keys',
524
+ ...options
525
+ });
526
+ }
352
527
  /**
353
528
  * Reset API key
354
529
  *
355
530
  * Invalidate old API keys for this org/user and create a new one.
356
531
  */
357
- Examplary.prototype.postApiKeysReset = function (options) {
358
- var _a;
359
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/api-keys/reset' }, options));
360
- };
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 {
361
617
  /**
362
618
  * Get taxonomies
363
619
  *
364
620
  * Get a list available taxonomies, including defaults and taxonomies created in the current workspace.
365
621
  */
366
- Examplary.prototype.getTaxonomies = function (options) {
367
- var _a;
368
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/taxonomies' }, options));
369
- };
622
+ list(options) {
623
+ return (options?.client ?? this.client).get({
624
+ security: [{ name: 'Authorization', type: 'apiKey' }],
625
+ url: '/taxonomies',
626
+ ...options
627
+ });
628
+ }
370
629
  /**
371
630
  * Create taxonomy
372
631
  *
373
632
  * Save a new taxonomy in the current workspace.
374
633
  */
375
- Examplary.prototype.postTaxonomies = function (options) {
376
- var _a;
377
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/taxonomies' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
378
- };
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
+ }
379
645
  /**
380
646
  * Delete taxonomy
381
647
  *
382
648
  * Delete a taxonomy from the current workspace. This fails if there are any exams associated with the taxonomy.
383
649
  */
384
- Examplary.prototype.deleteTaxonomiesId = function (options) {
385
- var _a;
386
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/taxonomies/{id}' }, options));
387
- };
650
+ delete(options) {
651
+ return (options.client ?? this.client).delete({
652
+ security: [{ name: 'Authorization', type: 'apiKey' }],
653
+ url: '/taxonomies/{id}',
654
+ ...options
655
+ });
656
+ }
388
657
  /**
389
658
  * Update taxonomy
390
659
  *
391
660
  * Update an existing taxonomy in the current workspace.
392
661
  */
393
- Examplary.prototype.postTaxonomiesId = function (options) {
394
- var _a;
395
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/taxonomies/{id}' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
396
- };
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 {
397
676
  /**
398
677
  * Get sharing permissions
399
678
  *
400
679
  * Get a list of users, groups and orgs that have access to a specific resource.
401
680
  */
402
- Examplary.prototype.getPermissionsResource = function (options) {
403
- var _a;
404
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/permissions/{resource}' }, options));
405
- };
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
+ }
406
689
  /**
407
690
  * Create permission
408
691
  *
409
692
  * Create a new permission for a specific resource, or update the role of an existing actor.
410
693
  */
411
- Examplary.prototype.postPermissionsResource = function (options) {
412
- var _a;
413
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/permissions/{resource}' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
414
- };
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
+ }
415
706
  /**
416
707
  * Remove permission
417
708
  *
418
709
  * Remove a permission for a specific actor on a specific resource.
419
710
  */
420
- Examplary.prototype.deletePermissionsResourceActor = function (options) {
421
- var _a;
422
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/permissions/{resource}/{actor}' }, options));
423
- };
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
+ }
424
718
  /**
425
719
  * Get actor role
426
720
  *
427
721
  * Get the role of a specific actor for a specific resource.
428
722
  */
429
- Examplary.prototype.getPermissionsResourceActor = function (options) {
430
- var _a;
431
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/permissions/{resource}/{actor}' }, options));
432
- };
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 {
433
734
  /**
434
735
  * List available student levels
435
736
  *
436
737
  * Get a list of available default student levels.
437
738
  */
438
- Examplary.prototype.getStudentLevels = function (options) {
439
- var _a;
440
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/student-levels' }, options));
441
- };
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 {
442
749
  /**
443
750
  * List users
444
751
  *
445
752
  * Get a list of all users in the workspace.
446
753
  */
447
- Examplary.prototype.getUsers = function (options) {
448
- var _a;
449
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/users' }, options));
450
- };
754
+ list(options) {
755
+ return (options?.client ?? this.client).get({
756
+ security: [{ name: 'Authorization', type: 'apiKey' }],
757
+ url: '/users',
758
+ ...options
759
+ });
760
+ }
451
761
  /**
452
762
  * Create user
453
763
  *
454
764
  * Create a new user in the workspace.
455
765
  */
456
- Examplary.prototype.postUsers = function (options) {
457
- var _a;
458
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/users' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
459
- };
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
+ }
460
777
  /**
461
778
  * Delete user
462
779
  *
463
780
  * Delete a user from the workspace.
464
781
  */
465
- Examplary.prototype.deleteUsersId = function (options) {
466
- var _a;
467
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/users/{id}' }, options));
468
- };
782
+ delete(options) {
783
+ return (options.client ?? this.client).delete({
784
+ security: [{ name: 'Authorization', type: 'apiKey' }],
785
+ url: '/users/{id}',
786
+ ...options
787
+ });
788
+ }
469
789
  /**
470
790
  * Update user role
471
791
  *
472
792
  * Update a user's role within the workspace.
473
793
  */
474
- Examplary.prototype.patchUsersId = function (options) {
475
- var _a;
476
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).patch(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/users/{id}' }, options));
477
- };
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 {
478
804
  /**
479
805
  * List exam sessions
480
806
  *
481
807
  * Get a list of all student sessions for an exam, representing a set of answers from a student.
482
808
  */
483
- Examplary.prototype.getExamsIdSessions = function (options) {
484
- var _a;
485
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions' }, options));
486
- };
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
+ }
487
816
  /**
488
817
  * Create session
489
818
  *
490
819
  * Manually create a session, possibly from uploaded data.
491
820
  */
492
- Examplary.prototype.postExamsIdSessions = function (options) {
493
- var _a;
494
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions' }, options));
495
- };
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
+ }
496
832
  /**
497
833
  * Get answers from scan
498
834
  *
499
835
  * Scan student answers from a document.
500
836
  */
501
- Examplary.prototype.postExamsIdSessionsScan = function (options) {
502
- var _a;
503
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/scan' }, options));
504
- };
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
+ }
505
844
  /**
506
845
  * Delete exam session
507
846
  *
508
847
  * Remove an exam session.
509
848
  */
510
- Examplary.prototype.deleteExamsIdSessionsSessionId = function (options) {
511
- var _a;
512
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/{sessionId}' }, options));
513
- };
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
+ }
514
856
  /**
515
857
  * Get exam session
516
858
  *
517
859
  * Get a single exam session by its ID, representing a set of answers from a student.
518
860
  */
519
- Examplary.prototype.getExamsIdSessionsSessionId = function (options) {
520
- var _a;
521
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/{sessionId}' }, options));
522
- };
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
+ }
523
868
  /**
524
869
  * Provide feedback
525
870
  *
526
871
  * Set teacher feedback and/or a grade for a specific question in an exam session.
527
872
  */
528
- Examplary.prototype.postExamsIdSessionsSessionIdFeedback = function (options) {
529
- var _a;
530
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/{sessionId}/feedback' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
531
- };
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
+ }
532
884
  /**
533
885
  * Provide overall feedback
534
886
  *
535
887
  * Set teacher feedback for the test as a whole in an exam session.
536
888
  */
537
- Examplary.prototype.postExamsIdSessionsSessionIdOverallFeedback = function (options) {
538
- var _a;
539
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/{sessionId}/overall-feedback' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
540
- };
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
+ }
541
900
  /**
542
901
  * Generate overall feedback
543
902
  *
544
903
  * Generate feedback for the test as a whole in an exam session.
545
904
  */
546
- Examplary.prototype.postExamsIdSessionsSessionIdGenerateOverallFeedback = function (options) {
547
- var _a;
548
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/{sessionId}/generate-overall-feedback' }, options));
549
- };
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
+ }
550
912
  /**
551
913
  * Accept AI grading suggestions
552
914
  *
553
915
  * Accept all AI-generated grading suggestions for the exam session.
554
916
  */
555
- Examplary.prototype.postExamsIdSessionsSessionIdSuggestionsAcceptAll = function (options) {
556
- var _a;
557
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/{sessionId}/suggestions/accept-all' }, options));
558
- };
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
+ }
559
924
  /**
560
925
  * Accept single AI grading suggestion
561
926
  *
562
927
  * Accept a single AI-generated grading suggestion for the exam session.
563
928
  */
564
- Examplary.prototype.postExamsIdSessionsSessionIdSuggestionsQuestionIdAccept = function (options) {
565
- var _a;
566
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/{sessionId}/suggestions/{questionId}/accept' }, options));
567
- };
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 {
568
955
  /**
569
956
  * Import questions
570
957
  *
571
958
  * Import questions into an exam from a file. Support Word, PDF, Moodle quiz XML and plain text files.
572
959
  */
573
- Examplary.prototype.postExamsIdQuestionsImport = function (options) {
574
- var _a;
575
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/questions/import' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
576
- };
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
+ }
577
971
  /**
578
972
  * Generate question
579
973
  *
580
974
  * Generate a new question for the exam using an AI prompt.
581
975
  */
582
- Examplary.prototype.postExamsIdQuestionsGenerate = function (options) {
583
- var _a;
584
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/questions/generate' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
585
- };
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
+ }
586
999
  /**
587
1000
  * Regenerate question
588
1001
  *
589
1002
  * Update a question using an AI prompt.
590
1003
  */
591
- Examplary.prototype.postExamsIdQuestionsQuestionIdGenerate = function (options) {
592
- var _a;
593
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/questions/{questionId}/generate' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
594
- };
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 {
595
1018
  /**
596
1019
  * Export QTI 3 package
597
1020
  *
598
1021
  * Export an exam as a QTI 3 ZIP package.
599
1022
  */
600
- Examplary.prototype.postExamsIdExportQti3Zip = function (options) {
601
- var _a;
602
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/export/qti3-zip' }, options));
603
- };
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
+ }
604
1031
  /**
605
1032
  * Export QTI 2.1 package
606
1033
  *
607
1034
  * Export an exam as a QTI 2.1 ZIP package.
608
1035
  */
609
- Examplary.prototype.postExamsIdExportQti21Zip = function (options) {
610
- var _a;
611
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/export/qti21-zip' }, options));
612
- };
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 {
613
1059
  /**
614
1060
  * List exams
615
1061
  *
616
1062
  * Get a list of all exams within your workspace.
617
1063
  */
618
- Examplary.prototype.getExams = function (options) {
619
- var _a;
620
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams' }, options));
621
- };
1064
+ list(options) {
1065
+ return (options?.client ?? this.client).get({
1066
+ security: [{ name: 'Authorization', type: 'apiKey' }],
1067
+ url: '/exams',
1068
+ ...options
1069
+ });
1070
+ }
622
1071
  /**
623
1072
  * Create exam
624
1073
  *
625
1074
  * Create a new exam within your workspace.
626
1075
  */
627
- Examplary.prototype.postExams = function (options) {
628
- var _a;
629
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
630
- };
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
+ }
631
1087
  /**
632
1088
  * Import exam
633
1089
  *
634
1090
  * Create an exam by importing one or more source materials (e.g. an existing exam).
635
1091
  */
636
- Examplary.prototype.postExamsImport = function (options) {
637
- var _a;
638
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/import' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
639
- };
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
+ }
640
1103
  /**
641
1104
  * Delete exam
642
1105
  *
643
1106
  * Delete the exam.
644
1107
  */
645
- Examplary.prototype.deleteExamsId = function (options) {
646
- var _a;
647
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}' }, options));
648
- };
1108
+ delete(options) {
1109
+ return (options.client ?? this.client).delete({
1110
+ security: [{ name: 'Authorization', type: 'apiKey' }],
1111
+ url: '/exams/{id}',
1112
+ ...options
1113
+ });
1114
+ }
649
1115
  /**
650
1116
  * Get exam
651
1117
  *
652
1118
  * Get a single exam by its ID.
653
1119
  */
654
- Examplary.prototype.getExamsId = function (options) {
655
- var _a;
656
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}' }, options));
657
- };
1120
+ get(options) {
1121
+ return (options.client ?? this.client).get({
1122
+ security: [{ name: 'Authorization', type: 'apiKey' }],
1123
+ url: '/exams/{id}',
1124
+ ...options
1125
+ });
1126
+ }
658
1127
  /**
659
1128
  * Update exam
660
1129
  *
661
1130
  * Update an existing exam.
662
1131
  */
663
- Examplary.prototype.postExamsId = function (options) {
664
- var _a;
665
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}' }, options));
666
- };
1132
+ update(options) {
1133
+ return (options.client ?? this.client).post({
1134
+ security: [{ name: 'Authorization', type: 'apiKey' }],
1135
+ url: '/exams/{id}',
1136
+ ...options
1137
+ });
1138
+ }
667
1139
  /**
668
1140
  * Duplicate exam
669
1141
  *
670
1142
  * Duplicate the exam's questions and settings to a new exam.
671
1143
  */
672
- Examplary.prototype.postExamsIdDuplicate = function (options) {
673
- var _a;
674
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/duplicate' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
675
- };
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
+ }
676
1155
  /**
677
1156
  * Print exam
678
1157
  *
679
1158
  * Export an exam to a PDF file or Word document.
680
1159
  */
681
- Examplary.prototype.postExamsIdPrint = function (options) {
682
- var _a;
683
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/print' }, options));
684
- };
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
+ }
685
1167
  /**
686
1168
  * Generate exam
687
1169
  *
688
1170
  * Initiate a job to generate new questions for the exam using AI, based on the source materials and metadata specified.
689
1171
  */
690
- Examplary.prototype.postExamsIdGenerate = function (options) {
691
- var _a;
692
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/generate' }, options));
693
- };
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
+ }
694
1179
  /**
695
1180
  * Cancel exam generation
696
1181
  *
697
1182
  * Cancel an ongoing job to generate new questions for the exam using AI.
698
1183
  */
699
- Examplary.prototype.postExamsIdGenerateCancel = function (options) {
700
- var _a;
701
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/generate/cancel' }, options));
702
- };
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
+ }
703
1191
  /**
704
1192
  * Get exam context suggestions
705
1193
  *
706
1194
  * Get AI-generated suggestions for context/instructions to include in the exam generation prompt, based on the source materials linked to the exam.
707
1195
  */
708
- Examplary.prototype.getExamsIdContextSuggestions = function (options) {
709
- var _a;
710
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/context-suggestions' }, options));
711
- };
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 {
712
1292
  /**
713
1293
  * List practice spaces
714
1294
  *
715
1295
  * Get a list of all practice spaces you have access to in this workspace.
716
1296
  */
717
- Examplary.prototype.getPracticeSpaces = function (options) {
718
- var _a;
719
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/practice-spaces' }, options));
720
- };
1297
+ list(options) {
1298
+ return (options?.client ?? this.client).get({
1299
+ security: [{ name: 'Authorization', type: 'apiKey' }],
1300
+ url: '/practice-spaces',
1301
+ ...options
1302
+ });
1303
+ }
721
1304
  /**
722
1305
  * Create practice space
723
1306
  *
724
1307
  * Create a new practice space within your workspace.
725
1308
  */
726
- Examplary.prototype.postPracticeSpaces = function (options) {
727
- var _a;
728
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/practice-spaces' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
729
- };
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
+ }
730
1320
  /**
731
1321
  * Delete practice space
732
1322
  *
733
1323
  * Delete the practice space.
734
1324
  */
735
- Examplary.prototype.deletePracticeSpacesId = function (options) {
736
- var _a;
737
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/practice-spaces/{id}' }, options));
738
- };
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
+ }
739
1332
  /**
740
1333
  * Get practice space
741
1334
  *
742
1335
  * Get a single practice space by its ID.
743
1336
  */
744
- Examplary.prototype.getPracticeSpacesId = function (options) {
745
- var _a;
746
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/practice-spaces/{id}' }, options));
747
- };
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
+ }
748
1344
  /**
749
1345
  * Update practice space
750
1346
  *
751
1347
  * Update an existing practice space.
752
1348
  */
753
- Examplary.prototype.postPracticeSpacesId = function (options) {
754
- var _a;
755
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/practice-spaces/{id}' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
756
- };
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
+ }
757
1400
  /**
758
1401
  * Preview top practice space questions
759
1402
  *
760
1403
  * Get a preview of the top practice space questions by quality score.
761
1404
  */
762
- Examplary.prototype.getPracticeSpacesIdQuestionsPreview = function (options) {
763
- var _a;
764
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/practice-spaces/{id}/questions-preview' }, options));
765
- };
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 {
766
1449
  /**
767
1450
  * List source materials in org
768
1451
  *
769
1452
  * Returns a list of source materials for the current organization.
770
1453
  */
771
- Examplary.prototype.getSourceMaterials = function (options) {
772
- var _a;
773
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/source-materials' }, options));
774
- };
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
+ }
775
1462
  /**
776
1463
  * Add source material
777
1464
  *
778
1465
  * Add a source material and start processing it for later use in an exam.
779
1466
  */
780
- Examplary.prototype.postSourceMaterials = function (options) {
781
- var _a;
782
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/source-materials' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
783
- };
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
+ }
784
1479
  /**
785
1480
  * Delete source material
786
1481
  *
787
1482
  * Deletes the specified source material.
788
1483
  */
789
- Examplary.prototype.deleteSourceMaterialsId = function (options) {
790
- var _a;
791
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/source-materials/{id}' }, options));
792
- };
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
+ }
793
1491
  /**
794
1492
  * Get source material
795
1493
  *
796
1494
  * Returns the current status and facts extracted from the specified source material.
797
1495
  */
798
- Examplary.prototype.getSourceMaterialsId = function (options) {
799
- var _a;
800
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/source-materials/{id}' }, options));
801
- };
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
+ }
802
1504
  /**
803
1505
  * Update source material
804
1506
  *
805
1507
  * Updates the specified source material.
806
1508
  */
807
- Examplary.prototype.patchSourceMaterialsId = function (options) {
808
- var _a;
809
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).patch(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/source-materials/{id}' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
810
- };
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
+ }
811
1520
  /**
812
1521
  * Create a source material slice
813
1522
  *
814
1523
  * Create a new source material based on a specific page range of an existing source material.
815
1524
  */
816
- Examplary.prototype.postSourceMaterialsIdSlice = function (options) {
817
- var _a;
818
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/source-materials/{id}/slice' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
819
- };
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 {
820
1540
  /**
821
1541
  * Get folders
822
1542
  *
823
1543
  * Get a list of folders for exam organisation that exist within the current workspace.
824
1544
  */
825
- Examplary.prototype.getFolders = function (options) {
826
- var _a;
827
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/folders' }, options));
828
- };
1545
+ list(options) {
1546
+ return (options?.client ?? this.client).get({
1547
+ security: [{ name: 'Authorization', type: 'apiKey' }],
1548
+ url: '/folders',
1549
+ ...options
1550
+ });
1551
+ }
829
1552
  /**
830
1553
  * Create folder
831
1554
  *
832
1555
  * Create a new folder in the current workspace.
833
1556
  */
834
- Examplary.prototype.postFolders = function (options) {
835
- var _a;
836
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/folders' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
837
- };
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
+ }
838
1568
  /**
839
1569
  * Delete folder
840
1570
  *
841
1571
  * Delete a folder from the current workspace. If there are any exams in the folder, they will be moved out of the folder.
842
1572
  */
843
- Examplary.prototype.deleteFoldersId = function (options) {
844
- var _a;
845
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/folders/{id}' }, options));
846
- };
1573
+ delete(options) {
1574
+ return (options.client ?? this.client).delete({
1575
+ security: [{ name: 'Authorization', type: 'apiKey' }],
1576
+ url: '/folders/{id}',
1577
+ ...options
1578
+ });
1579
+ }
847
1580
  /**
848
1581
  * Update folder
849
1582
  *
850
1583
  * Update an existing folder in the current workspace.
851
1584
  */
852
- Examplary.prototype.postFoldersId = function (options) {
853
- var _a;
854
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/folders/{id}' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
855
- };
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 {
856
1599
  /**
857
1600
  * Get question bank items
858
1601
  *
859
1602
  * Get a list of question bank items that exist within the current workspace.
860
1603
  */
861
- Examplary.prototype.getQuestionBank = function (options) {
862
- var _a;
863
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-bank' }, options));
864
- };
1604
+ list(options) {
1605
+ return (options?.client ?? this.client).get({
1606
+ security: [{ name: 'Authorization', type: 'apiKey' }],
1607
+ url: '/question-bank',
1608
+ ...options
1609
+ });
1610
+ }
865
1611
  /**
866
1612
  * Add question to question bank
867
1613
  *
868
1614
  * Add a question to the question bank in the current workspace.
869
1615
  */
870
- Examplary.prototype.postQuestionBank = function (options) {
871
- var _a;
872
- return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-bank' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers) }));
873
- };
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
+ }
874
1627
  /**
875
1628
  * Delete question bank item
876
1629
  *
877
1630
  * Delete a question bank item from the current workspace.
878
1631
  */
879
- Examplary.prototype.deleteQuestionBankId = function (options) {
880
- var _a;
881
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-bank/{id}' }, options));
882
- };
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
+ }
883
1639
  /**
884
1640
  * Update question bank item
885
1641
  *
886
1642
  * Update an existing question bank item in the current workspace.
887
1643
  */
888
- Examplary.prototype.patchQuestionBankId = function (options) {
889
- var _a;
890
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).patch(__assign(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-bank/{id}' }, options), { headers: __assign({ 'Content-Type': 'application/json' }, options.headers) }));
891
- };
892
- Examplary.__registry = new HeyApiRegistry();
893
- return Examplary;
894
- }(HeyApiClient));
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
+ }
895
1825
  exports.Examplary = Examplary;
1826
+ Examplary.__registry = new HeyApiRegistry();