@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.
@@ -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
- 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 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
- QuestionTypes.prototype.listPublic = function (options) {
67
- var _a;
68
- 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));
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
- QuestionTypes.prototype.delete = function (options) {
76
- var _a;
77
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types/{id}' }, options));
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
- QuestionTypes.prototype.get = function (options) {
85
- var _a;
86
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types/{id}' }, options));
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
- QuestionTypes.prototype.getQti3Pci = function (options) {
94
- var _a;
95
- 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));
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
- QuestionTypes.prototype.list = function (options) {
103
- var _a;
104
- 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));
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
- QuestionTypes.prototype.upsert = function (options) {
112
- var _a;
113
- 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) }));
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
- QuestionTypes.prototype.enable = function (options) {
121
- var _a;
122
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types/{id}/enable' }, options));
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
- QuestionTypes.prototype.disable = function (options) {
130
- var _a;
131
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-types/{id}/disable' }, options));
132
- };
133
- return QuestionTypes;
134
- }(HeyApiClient));
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
- Items.prototype.list = function (options) {
147
- var _a;
148
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/publishers/{publisherId}/items' }, options));
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
- Items.prototype.create = function (options) {
156
- var _a;
157
- 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) }));
158
- };
159
- return Items;
160
- }(HeyApiClient));
161
- exports.Items = Items;
162
- var Publishers = /** @class */ (function (_super) {
163
- __extends(Publishers, _super);
164
- function Publishers() {
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
- Publishers.prototype.listFeatured = function (options) {
173
- var _a;
174
- 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));
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
- Publishers.prototype.listAll = function (options) {
182
- var _a;
183
- 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));
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
- Publishers.prototype.create = function (options) {
191
- var _a;
192
- 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) }));
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
- Publishers.prototype.listMine = function (options) {
200
- var _a;
201
- 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));
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
- Publishers.prototype.delete = function (options) {
209
- var _a;
210
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/publishers/{publisherId}' }, options));
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
- Publishers.prototype.update = function (options) {
218
- var _a;
219
- 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) }));
220
- };
221
- Object.defineProperty(Publishers.prototype, "items", {
222
- get: function () {
223
- var _a;
224
- return (_a = this._items) !== null && _a !== void 0 ? _a : (this._items = new Items({ client: this.client }));
225
- },
226
- enumerable: false,
227
- configurable: true
228
- });
229
- return Publishers;
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
- Items2.prototype.listFeatured = function (options) {
243
- var _a;
244
- 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));
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
- Items2.prototype.delete = function (options) {
252
- var _a;
253
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/library/items/{itemId}' }, options));
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
- Items2.prototype.update = function (options) {
261
- var _a;
262
- 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) }));
263
- };
264
- return Items2;
265
- }(HeyApiClient));
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
- var Library = /** @class */ (function (_super) {
268
- __extends(Library, _super);
269
- function Library() {
270
- return _super !== null && _super.apply(this, arguments) || this;
271
- }
272
- Object.defineProperty(Library.prototype, "publishers", {
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
- Oauth.prototype.authorize = function (options) {
302
- var _a;
303
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/oauth/authorize' }, options));
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
- Oauth.prototype.token = function (options) {
311
- var _a;
312
- 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));
313
- };
314
- return Oauth;
315
- }(HeyApiClient));
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
- EmbedSessions.prototype.create = function (options) {
328
- var _a;
329
- 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) }));
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
- EmbedSessions.prototype.revoke = function (options) {
337
- var _a;
338
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/embed-sessions/{id}' }, options));
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
- EmbedSessions.prototype.get = function (options) {
346
- var _a;
347
- 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));
348
- };
349
- return EmbedSessions;
350
- }(HeyApiClient));
351
- exports.EmbedSessions = EmbedSessions;
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
- Me.prototype.get = function (options) {
363
- var _a;
364
- 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));
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
- Me.prototype.update = function (options) {
372
- var _a;
373
- 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) }));
374
- };
375
- return Me;
376
- }(HeyApiClient));
377
- exports.Me = Me;
378
- var Media = /** @class */ (function (_super) {
379
- __extends(Media, _super);
380
- function Media() {
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
- Media.prototype.upload = function (options) {
389
- var _a;
390
- 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));
391
- };
392
- return Media;
393
- }(HeyApiClient));
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
- var Org = /** @class */ (function (_super) {
396
- __extends(Org, _super);
397
- function Org() {
398
- return _super !== null && _super.apply(this, arguments) || this;
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
- Org.prototype.delete = function (options) {
404
- var _a;
405
- 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));
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
- Org.prototype.get = function (options) {
411
- var _a;
412
- 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));
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
- Org.prototype.update = function (options) {
418
- var _a;
419
- 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) }));
420
- };
421
- return Org;
422
- }(HeyApiClient));
423
- exports.Org = Org;
424
- var Orgs = /** @class */ (function (_super) {
425
- __extends(Orgs, _super);
426
- function Orgs() {
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
- Orgs.prototype.list = function (options) {
433
- var _a;
434
- 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));
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
- Orgs.prototype.create = function (options) {
442
- var _a;
443
- 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) }));
444
- };
445
- return Orgs;
446
- }(HeyApiClient));
447
- exports.Orgs = Orgs;
448
- var ApiKeys = /** @class */ (function (_super) {
449
- __extends(ApiKeys, _super);
450
- function ApiKeys() {
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
- ApiKeys.prototype.get = function (options) {
459
- var _a;
460
- 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));
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
- ApiKeys.prototype.reset = function (options) {
468
- var _a;
469
- 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));
470
- };
471
- return ApiKeys;
472
- }(HeyApiClient));
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
- var Taxonomies = /** @class */ (function (_super) {
475
- __extends(Taxonomies, _super);
476
- function Taxonomies() {
477
- return _super !== null && _super.apply(this, arguments) || this;
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
- Taxonomies.prototype.list = function (options) {
485
- var _a;
486
- 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));
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
- Taxonomies.prototype.create = function (options) {
494
- var _a;
495
- 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) }));
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
- Taxonomies.prototype.delete = function (options) {
503
- var _a;
504
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/taxonomies/{id}' }, options));
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
- Taxonomies.prototype.update = function (options) {
512
- var _a;
513
- 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) }));
514
- };
515
- return Taxonomies;
516
- }(HeyApiClient));
517
- exports.Taxonomies = Taxonomies;
518
- var Permissions = /** @class */ (function (_super) {
519
- __extends(Permissions, _super);
520
- function Permissions() {
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
- Permissions.prototype.list = function (options) {
529
- var _a;
530
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ responseType: 'json', security: [{ name: 'Authorization', type: 'apiKey' }], url: '/permissions/{resource}' }, options));
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
- Permissions.prototype.assign = function (options) {
538
- var _a;
539
- 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) }));
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
- Permissions.prototype.delete = function (options) {
547
- var _a;
548
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/permissions/{resource}/{actor}' }, options));
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
- Permissions.prototype.getActorRole = function (options) {
556
- var _a;
557
- 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));
558
- };
559
- return Permissions;
560
- }(HeyApiClient));
561
- exports.Permissions = Permissions;
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
- StudentLevels.prototype.list = function (options) {
573
- var _a;
574
- 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));
575
- };
576
- return StudentLevels;
577
- }(HeyApiClient));
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
- Users.prototype.list = function (options) {
590
- var _a;
591
- 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));
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
- Users.prototype.create = function (options) {
599
- var _a;
600
- 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) }));
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
- Users.prototype.delete = function (options) {
608
- var _a;
609
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/users/{id}' }, options));
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
- Users.prototype.update = function (options) {
617
- var _a;
618
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).patch(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/users/{id}' }, options));
619
- };
620
- return Users;
621
- }(HeyApiClient));
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
- Sessions.prototype.list = function (options) {
634
- var _a;
635
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions' }, options));
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
- Sessions.prototype.import = function (options) {
643
- var _a;
644
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions' }, options));
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
- Sessions.prototype.scan = function (options) {
652
- var _a;
653
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/scan' }, options));
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
- Sessions.prototype.delete = function (options) {
661
- var _a;
662
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/{sessionId}' }, options));
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
- Sessions.prototype.get = function (options) {
670
- var _a;
671
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/sessions/{sessionId}' }, options));
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
- Sessions.prototype.saveFeedback = function (options) {
679
- var _a;
680
- 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) }));
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
- Sessions.prototype.saveOverallFeedback = function (options) {
688
- var _a;
689
- 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) }));
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
- Sessions.prototype.generateOverallFeedback = function (options) {
697
- var _a;
698
- 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));
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
- Sessions.prototype.acceptAllSuggestions = function (options) {
706
- var _a;
707
- 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));
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
- Sessions.prototype.acceptSuggestion = function (options) {
715
- var _a;
716
- 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));
717
- };
718
- return Sessions;
719
- }(HeyApiClient));
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
- Questions.prototype.import = function (options) {
732
- var _a;
733
- 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) }));
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
- Questions.prototype.generate = function (options) {
741
- var _a;
742
- 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) }));
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
- Questions.prototype.regenerate = function (options) {
750
- var _a;
751
- 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) }));
752
- };
753
- return Questions;
754
- }(HeyApiClient));
755
- exports.Questions = Questions;
756
- var Export = /** @class */ (function (_super) {
757
- __extends(Export, _super);
758
- function Export() {
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
- Export.prototype.qti3Zip = function (options) {
767
- var _a;
768
- 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));
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
- Export.prototype.qti21Zip = function (options) {
776
- var _a;
777
- 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));
778
- };
779
- return Export;
780
- }(HeyApiClient));
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
- var Exam = /** @class */ (function (_super) {
783
- __extends(Exam, _super);
784
- function Exam() {
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
- Exams.prototype.list = function (options) {
825
- var _a;
826
- 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));
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
- Exams.prototype.create = function (options) {
834
- var _a;
835
- 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) }));
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
- Exams.prototype.import = function (options) {
843
- var _a;
844
- 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) }));
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
- Exams.prototype.delete = function (options) {
852
- var _a;
853
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}' }, options));
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
- Exams.prototype.get = function (options) {
861
- var _a;
862
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}' }, options));
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
- Exams.prototype.update = function (options) {
870
- var _a;
871
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}' }, options));
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
- Exams.prototype.duplicate = function (options) {
879
- var _a;
880
- 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) }));
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
- Exams.prototype.print = function (options) {
888
- var _a;
889
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/print' }, options));
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
- Exams.prototype.startGeneration = function (options) {
897
- var _a;
898
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/generate' }, options));
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
- Exams.prototype.cancelGeneration = function (options) {
906
- var _a;
907
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).post(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/generate/cancel' }, options));
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
- Exams.prototype.getContextSuggestions = function (options) {
915
- var _a;
916
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/exams/{id}/context-suggestions' }, options));
917
- };
918
- return Exams;
919
- }(HeyApiClient));
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
- var PracticeSpaces = /** @class */ (function (_super) {
922
- __extends(PracticeSpaces, _super);
923
- function PracticeSpaces() {
924
- return _super !== null && _super.apply(this, arguments) || this;
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
- PracticeSpaces.prototype.list = function (options) {
932
- var _a;
933
- 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));
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
- PracticeSpaces.prototype.create = function (options) {
941
- var _a;
942
- 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) }));
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
- PracticeSpaces.prototype.delete = function (options) {
950
- var _a;
951
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/practice-spaces/{id}' }, options));
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
- PracticeSpaces.prototype.get = function (options) {
959
- var _a;
960
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/practice-spaces/{id}' }, options));
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
- PracticeSpaces.prototype.update = function (options) {
968
- var _a;
969
- 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) }));
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
- PracticeSpaces.prototype.questionsPreview = function (options) {
977
- var _a;
978
- 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));
979
- };
980
- return PracticeSpaces;
981
- }(HeyApiClient));
982
- exports.PracticeSpaces = PracticeSpaces;
983
- var SourceMaterials = /** @class */ (function (_super) {
984
- __extends(SourceMaterials, _super);
985
- function SourceMaterials() {
986
- return _super !== null && _super.apply(this, arguments) || this;
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
- SourceMaterials.prototype.list = function (options) {
994
- var _a;
995
- 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));
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
- SourceMaterials.prototype.create = function (options) {
1003
- var _a;
1004
- 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) }));
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
- SourceMaterials.prototype.delete = function (options) {
1012
- var _a;
1013
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/source-materials/{id}' }, options));
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
- SourceMaterials.prototype.get = function (options) {
1021
- var _a;
1022
- 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));
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
- SourceMaterials.prototype.update = function (options) {
1030
- var _a;
1031
- 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) }));
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
- SourceMaterials.prototype.slice = function (options) {
1039
- var _a;
1040
- 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) }));
1041
- };
1042
- return SourceMaterials;
1043
- }(HeyApiClient));
1044
- exports.SourceMaterials = SourceMaterials;
1045
- var Folders = /** @class */ (function (_super) {
1046
- __extends(Folders, _super);
1047
- function Folders() {
1048
- return _super !== null && _super.apply(this, arguments) || this;
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
- Folders.prototype.list = function (options) {
1056
- var _a;
1057
- 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));
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
- Folders.prototype.create = function (options) {
1065
- var _a;
1066
- 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) }));
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
- Folders.prototype.delete = function (options) {
1074
- var _a;
1075
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/folders/{id}' }, options));
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
- Folders.prototype.update = function (options) {
1083
- var _a;
1084
- 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) }));
1085
- };
1086
- return Folders;
1087
- }(HeyApiClient));
1088
- exports.Folders = Folders;
1089
- var QuestionBank = /** @class */ (function (_super) {
1090
- __extends(QuestionBank, _super);
1091
- function QuestionBank() {
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
- QuestionBank.prototype.list = function (options) {
1100
- var _a;
1101
- 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));
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
- QuestionBank.prototype.create = function (options) {
1109
- var _a;
1110
- 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) }));
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
- QuestionBank.prototype.delete = function (options) {
1118
- var _a;
1119
- return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).delete(__assign({ security: [{ name: 'Authorization', type: 'apiKey' }], url: '/question-bank/{id}' }, options));
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
- QuestionBank.prototype.update = function (options) {
1127
- var _a;
1128
- 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) }));
1129
- };
1130
- return QuestionBank;
1131
- }(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
+ }
1132
1656
  exports.QuestionBank = QuestionBank;
1133
- var Examplary = /** @class */ (function (_super) {
1134
- __extends(Examplary, _super);
1135
- function Examplary(args) {
1136
- var _this = _super.call(this, args) || this;
1137
- Examplary.__registry.set(_this, args === null || args === void 0 ? void 0 : args.key);
1138
- return _this;
1139
- }
1140
- Object.defineProperty(Examplary.prototype, "questionTypes", {
1141
- get: function () {
1142
- var _a;
1143
- return (_a = this._questionTypes) !== null && _a !== void 0 ? _a : (this._questionTypes = new QuestionTypes({ client: this.client }));
1144
- },
1145
- enumerable: false,
1146
- configurable: true
1147
- });
1148
- Object.defineProperty(Examplary.prototype, "library", {
1149
- get: function () {
1150
- var _a;
1151
- return (_a = this._library) !== null && _a !== void 0 ? _a : (this._library = new Library({ client: this.client }));
1152
- },
1153
- enumerable: false,
1154
- configurable: true
1155
- });
1156
- Object.defineProperty(Examplary.prototype, "oauth", {
1157
- get: function () {
1158
- var _a;
1159
- return (_a = this._oauth) !== null && _a !== void 0 ? _a : (this._oauth = new Oauth({ client: this.client }));
1160
- },
1161
- enumerable: false,
1162
- configurable: true
1163
- });
1164
- Object.defineProperty(Examplary.prototype, "embedSessions", {
1165
- get: function () {
1166
- var _a;
1167
- return (_a = this._embedSessions) !== null && _a !== void 0 ? _a : (this._embedSessions = new EmbedSessions({ client: this.client }));
1168
- },
1169
- enumerable: false,
1170
- configurable: true
1171
- });
1172
- Object.defineProperty(Examplary.prototype, "me", {
1173
- get: function () {
1174
- var _a;
1175
- return (_a = this._me) !== null && _a !== void 0 ? _a : (this._me = new Me({ client: this.client }));
1176
- },
1177
- enumerable: false,
1178
- configurable: true
1179
- });
1180
- Object.defineProperty(Examplary.prototype, "media", {
1181
- get: function () {
1182
- var _a;
1183
- return (_a = this._media) !== null && _a !== void 0 ? _a : (this._media = new Media({ client: this.client }));
1184
- },
1185
- enumerable: false,
1186
- configurable: true
1187
- });
1188
- Object.defineProperty(Examplary.prototype, "org", {
1189
- get: function () {
1190
- var _a;
1191
- return (_a = this._org) !== null && _a !== void 0 ? _a : (this._org = new Org({ client: this.client }));
1192
- },
1193
- enumerable: false,
1194
- configurable: true
1195
- });
1196
- Object.defineProperty(Examplary.prototype, "orgs", {
1197
- get: function () {
1198
- var _a;
1199
- return (_a = this._orgs) !== null && _a !== void 0 ? _a : (this._orgs = new Orgs({ client: this.client }));
1200
- },
1201
- enumerable: false,
1202
- configurable: true
1203
- });
1204
- Object.defineProperty(Examplary.prototype, "apiKeys", {
1205
- get: function () {
1206
- var _a;
1207
- return (_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new ApiKeys({ client: this.client }));
1208
- },
1209
- enumerable: false,
1210
- configurable: true
1211
- });
1212
- Object.defineProperty(Examplary.prototype, "taxonomies", {
1213
- get: function () {
1214
- var _a;
1215
- return (_a = this._taxonomies) !== null && _a !== void 0 ? _a : (this._taxonomies = new Taxonomies({ client: this.client }));
1216
- },
1217
- enumerable: false,
1218
- configurable: true
1219
- });
1220
- Object.defineProperty(Examplary.prototype, "permissions", {
1221
- get: function () {
1222
- var _a;
1223
- return (_a = this._permissions) !== null && _a !== void 0 ? _a : (this._permissions = new Permissions({ client: this.client }));
1224
- },
1225
- enumerable: false,
1226
- configurable: true
1227
- });
1228
- Object.defineProperty(Examplary.prototype, "studentLevels", {
1229
- get: function () {
1230
- var _a;
1231
- return (_a = this._studentLevels) !== null && _a !== void 0 ? _a : (this._studentLevels = new StudentLevels({ client: this.client }));
1232
- },
1233
- enumerable: false,
1234
- configurable: true
1235
- });
1236
- Object.defineProperty(Examplary.prototype, "users", {
1237
- get: function () {
1238
- var _a;
1239
- return (_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Users({ client: this.client }));
1240
- },
1241
- enumerable: false,
1242
- configurable: true
1243
- });
1244
- Object.defineProperty(Examplary.prototype, "exam", {
1245
- get: function () {
1246
- var _a;
1247
- return (_a = this._exam) !== null && _a !== void 0 ? _a : (this._exam = new Exam({ client: this.client }));
1248
- },
1249
- enumerable: false,
1250
- configurable: true
1251
- });
1252
- Object.defineProperty(Examplary.prototype, "exams", {
1253
- get: function () {
1254
- var _a;
1255
- return (_a = this._exams) !== null && _a !== void 0 ? _a : (this._exams = new Exams({ client: this.client }));
1256
- },
1257
- enumerable: false,
1258
- configurable: true
1259
- });
1260
- Object.defineProperty(Examplary.prototype, "practiceSpaces", {
1261
- get: function () {
1262
- var _a;
1263
- return (_a = this._practiceSpaces) !== null && _a !== void 0 ? _a : (this._practiceSpaces = new PracticeSpaces({ client: this.client }));
1264
- },
1265
- enumerable: false,
1266
- configurable: true
1267
- });
1268
- Object.defineProperty(Examplary.prototype, "sourceMaterials", {
1269
- get: function () {
1270
- var _a;
1271
- return (_a = this._sourceMaterials) !== null && _a !== void 0 ? _a : (this._sourceMaterials = new SourceMaterials({ client: this.client }));
1272
- },
1273
- enumerable: false,
1274
- configurable: true
1275
- });
1276
- Object.defineProperty(Examplary.prototype, "folders", {
1277
- get: function () {
1278
- var _a;
1279
- return (_a = this._folders) !== null && _a !== void 0 ? _a : (this._folders = new Folders({ client: this.client }));
1280
- },
1281
- enumerable: false,
1282
- configurable: true
1283
- });
1284
- Object.defineProperty(Examplary.prototype, "questionBank", {
1285
- get: function () {
1286
- var _a;
1287
- return (_a = this._questionBank) !== null && _a !== void 0 ? _a : (this._questionBank = new QuestionBank({ client: this.client }));
1288
- },
1289
- enumerable: false,
1290
- configurable: true
1291
- });
1292
- Examplary.__registry = new HeyApiRegistry();
1293
- return Examplary;
1294
- }(HeyApiClient));
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();