@smartytalent/api-client 0.1.33-dev.35 → 0.1.33-dev.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apis/AttemptsApi.d.ts +287 -0
- package/dist/apis/AttemptsApi.d.ts.map +1 -0
- package/dist/apis/AttemptsApi.js +643 -0
- package/dist/apis/AttemptsApi.js.map +1 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.d.ts.map +1 -1
- package/dist/apis/index.js +1 -0
- package/dist/apis/index.js.map +1 -1
- package/dist/models/CreateAttemptRequest.d.ts +34 -0
- package/dist/models/CreateAttemptRequest.d.ts.map +1 -0
- package/dist/models/CreateAttemptRequest.js +52 -0
- package/dist/models/CreateAttemptRequest.js.map +1 -0
- package/dist/models/CreateAttemptRequestData.d.ts +54 -0
- package/dist/models/CreateAttemptRequestData.d.ts.map +1 -0
- package/dist/models/CreateAttemptRequestData.js +66 -0
- package/dist/models/CreateAttemptRequestData.js.map +1 -0
- package/dist/models/CreateAttemptRequestDataAttributes.d.ts +45 -0
- package/dist/models/CreateAttemptRequestDataAttributes.d.ts.map +1 -0
- package/dist/models/CreateAttemptRequestDataAttributes.js +53 -0
- package/dist/models/CreateAttemptRequestDataAttributes.js.map +1 -0
- package/dist/models/CreateAttemptRequestDataRelationships.d.ts +45 -0
- package/dist/models/CreateAttemptRequestDataRelationships.d.ts.map +1 -0
- package/dist/models/CreateAttemptRequestDataRelationships.js +57 -0
- package/dist/models/CreateAttemptRequestDataRelationships.js.map +1 -0
- package/dist/models/StartGuestAttemptRequest.d.ts +41 -0
- package/dist/models/StartGuestAttemptRequest.d.ts.map +1 -0
- package/dist/models/StartGuestAttemptRequest.js +57 -0
- package/dist/models/StartGuestAttemptRequest.js.map +1 -0
- package/dist/models/StartGuestAttemptRequestData.d.ts +46 -0
- package/dist/models/StartGuestAttemptRequestData.d.ts.map +1 -0
- package/dist/models/StartGuestAttemptRequestData.js +62 -0
- package/dist/models/StartGuestAttemptRequestData.js.map +1 -0
- package/dist/models/StartGuestAttemptRequestMeta.d.ts +39 -0
- package/dist/models/StartGuestAttemptRequestMeta.d.ts.map +1 -0
- package/dist/models/StartGuestAttemptRequestMeta.js +55 -0
- package/dist/models/StartGuestAttemptRequestMeta.js.map +1 -0
- package/dist/models/UpdateAttemptRequest.d.ts +34 -0
- package/dist/models/UpdateAttemptRequest.d.ts.map +1 -0
- package/dist/models/UpdateAttemptRequest.js +52 -0
- package/dist/models/UpdateAttemptRequest.js.map +1 -0
- package/dist/models/UpdateAttemptRequestData.d.ts +58 -0
- package/dist/models/UpdateAttemptRequestData.d.ts.map +1 -0
- package/dist/models/UpdateAttemptRequestData.js +66 -0
- package/dist/models/UpdateAttemptRequestData.js.map +1 -0
- package/dist/models/UpdateGuestAttemptRequest.d.ts +41 -0
- package/dist/models/UpdateGuestAttemptRequest.d.ts.map +1 -0
- package/dist/models/UpdateGuestAttemptRequest.js +57 -0
- package/dist/models/UpdateGuestAttemptRequest.js.map +1 -0
- package/dist/models/UpdateGuestAttemptRequestData.d.ts +53 -0
- package/dist/models/UpdateGuestAttemptRequestData.d.ts.map +1 -0
- package/dist/models/UpdateGuestAttemptRequestData.js +65 -0
- package/dist/models/UpdateGuestAttemptRequestData.js.map +1 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributes.d.ts +53 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributes.d.ts.map +1 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributes.js +61 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributes.js.map +1 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributesAnswersInner.d.ts +46 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributesAnswersInner.d.ts.map +1 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributesAnswersInner.js +54 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributesAnswersInner.js.map +1 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributesAnswersInnerFilesInner.d.ts +51 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributesAnswersInnerFilesInner.d.ts.map +1 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributesAnswersInnerFilesInner.js +55 -0
- package/dist/models/UpdateGuestAttemptRequestDataAttributesAnswersInnerFilesInner.js.map +1 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +14 -0
- package/dist/models/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,643 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* SmartyMeet Dev03 API REST
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.1
|
|
9
|
+
* Contact: developer@smartymeet.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.ListAttemptsFilterStatusEnum = exports.DeleteAttemptPermanentDeleteEnum = exports.AttemptsApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class AttemptsApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Creates request options for attemptOptions without sending the request
|
|
58
|
+
*/
|
|
59
|
+
async attemptOptionsRequestOpts(requestParameters) {
|
|
60
|
+
if (requestParameters['attemptId'] == null) {
|
|
61
|
+
throw new runtime.RequiredError('attemptId', 'Required parameter "attemptId" was null or undefined when calling attemptOptions().');
|
|
62
|
+
}
|
|
63
|
+
const queryParameters = {};
|
|
64
|
+
const headerParameters = {};
|
|
65
|
+
let urlPath = `/v1/attempts/{attemptId}`;
|
|
66
|
+
urlPath = urlPath.replace(`{${"attemptId"}}`, encodeURIComponent(String(requestParameters['attemptId'])));
|
|
67
|
+
return {
|
|
68
|
+
path: urlPath,
|
|
69
|
+
method: 'OPTIONS',
|
|
70
|
+
headers: headerParameters,
|
|
71
|
+
query: queryParameters,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Enable CORS by returning correct headers
|
|
76
|
+
* Attempt Options
|
|
77
|
+
*/
|
|
78
|
+
async attemptOptionsRaw(requestParameters, initOverrides) {
|
|
79
|
+
const requestOptions = await this.attemptOptionsRequestOpts(requestParameters);
|
|
80
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
81
|
+
return new runtime.VoidApiResponse(response);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Enable CORS by returning correct headers
|
|
85
|
+
* Attempt Options
|
|
86
|
+
*/
|
|
87
|
+
async attemptOptions(requestParameters, initOverrides) {
|
|
88
|
+
await this.attemptOptionsRaw(requestParameters, initOverrides);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Creates request options for attemptsOptions without sending the request
|
|
92
|
+
*/
|
|
93
|
+
async attemptsOptionsRequestOpts() {
|
|
94
|
+
const queryParameters = {};
|
|
95
|
+
const headerParameters = {};
|
|
96
|
+
let urlPath = `/v1/attempts`;
|
|
97
|
+
return {
|
|
98
|
+
path: urlPath,
|
|
99
|
+
method: 'OPTIONS',
|
|
100
|
+
headers: headerParameters,
|
|
101
|
+
query: queryParameters,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Enable CORS by returning correct headers
|
|
106
|
+
* Attempts Options
|
|
107
|
+
*/
|
|
108
|
+
async attemptsOptionsRaw(initOverrides) {
|
|
109
|
+
const requestOptions = await this.attemptsOptionsRequestOpts();
|
|
110
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
111
|
+
return new runtime.VoidApiResponse(response);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Enable CORS by returning correct headers
|
|
115
|
+
* Attempts Options
|
|
116
|
+
*/
|
|
117
|
+
async attemptsOptions(initOverrides) {
|
|
118
|
+
await this.attemptsOptionsRaw(initOverrides);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Creates request options for createAttempt without sending the request
|
|
122
|
+
*/
|
|
123
|
+
async createAttemptRequestOpts(requestParameters) {
|
|
124
|
+
if (requestParameters['createAttemptRequest'] == null) {
|
|
125
|
+
throw new runtime.RequiredError('createAttemptRequest', 'Required parameter "createAttemptRequest" was null or undefined when calling createAttempt().');
|
|
126
|
+
}
|
|
127
|
+
const queryParameters = {};
|
|
128
|
+
const headerParameters = {};
|
|
129
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
130
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
131
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
132
|
+
}
|
|
133
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
134
|
+
// oauth required
|
|
135
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Auth", []);
|
|
136
|
+
}
|
|
137
|
+
let urlPath = `/v1/attempts`;
|
|
138
|
+
return {
|
|
139
|
+
path: urlPath,
|
|
140
|
+
method: 'POST',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
body: (0, index_1.CreateAttemptRequestToJSON)(requestParameters['createAttemptRequest']),
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Assigns an assessment template to a candidate. Generates an access token (returned in meta.accessToken on the response) that the FE composes into a candidate link of shape `https://assess.{domain}/attempts/{attemptId}?token={hex}`. Required relationships: assessment (FK), candidate.
|
|
148
|
+
* Create Attempt
|
|
149
|
+
*/
|
|
150
|
+
async createAttemptRaw(requestParameters, initOverrides) {
|
|
151
|
+
const requestOptions = await this.createAttemptRequestOpts(requestParameters);
|
|
152
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
153
|
+
return new runtime.VoidApiResponse(response);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Assigns an assessment template to a candidate. Generates an access token (returned in meta.accessToken on the response) that the FE composes into a candidate link of shape `https://assess.{domain}/attempts/{attemptId}?token={hex}`. Required relationships: assessment (FK), candidate.
|
|
157
|
+
* Create Attempt
|
|
158
|
+
*/
|
|
159
|
+
async createAttempt(requestParameters, initOverrides) {
|
|
160
|
+
await this.createAttemptRaw(requestParameters, initOverrides);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Creates request options for deleteAttempt without sending the request
|
|
164
|
+
*/
|
|
165
|
+
async deleteAttemptRequestOpts(requestParameters) {
|
|
166
|
+
if (requestParameters['attemptId'] == null) {
|
|
167
|
+
throw new runtime.RequiredError('attemptId', 'Required parameter "attemptId" was null or undefined when calling deleteAttempt().');
|
|
168
|
+
}
|
|
169
|
+
const queryParameters = {};
|
|
170
|
+
if (requestParameters['permanentDelete'] != null) {
|
|
171
|
+
queryParameters['permanentDelete'] = requestParameters['permanentDelete'];
|
|
172
|
+
}
|
|
173
|
+
const headerParameters = {};
|
|
174
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
175
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
176
|
+
}
|
|
177
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
178
|
+
// oauth required
|
|
179
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Auth", []);
|
|
180
|
+
}
|
|
181
|
+
let urlPath = `/v1/attempts/{attemptId}`;
|
|
182
|
+
urlPath = urlPath.replace(`{${"attemptId"}}`, encodeURIComponent(String(requestParameters['attemptId'])));
|
|
183
|
+
return {
|
|
184
|
+
path: urlPath,
|
|
185
|
+
method: 'DELETE',
|
|
186
|
+
headers: headerParameters,
|
|
187
|
+
query: queryParameters,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Soft delete (status=anonymized + drops PII) by default. `?permanentDelete=true` for hard delete (GDPR right to erasure). Soft default keeps evaluation summary for analytics.
|
|
192
|
+
* Delete Attempt
|
|
193
|
+
*/
|
|
194
|
+
async deleteAttemptRaw(requestParameters, initOverrides) {
|
|
195
|
+
const requestOptions = await this.deleteAttemptRequestOpts(requestParameters);
|
|
196
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
197
|
+
return new runtime.VoidApiResponse(response);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Soft delete (status=anonymized + drops PII) by default. `?permanentDelete=true` for hard delete (GDPR right to erasure). Soft default keeps evaluation summary for analytics.
|
|
201
|
+
* Delete Attempt
|
|
202
|
+
*/
|
|
203
|
+
async deleteAttempt(requestParameters, initOverrides) {
|
|
204
|
+
await this.deleteAttemptRaw(requestParameters, initOverrides);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Creates request options for guestAttemptOptions without sending the request
|
|
208
|
+
*/
|
|
209
|
+
async guestAttemptOptionsRequestOpts(requestParameters) {
|
|
210
|
+
if (requestParameters['attemptId'] == null) {
|
|
211
|
+
throw new runtime.RequiredError('attemptId', 'Required parameter "attemptId" was null or undefined when calling guestAttemptOptions().');
|
|
212
|
+
}
|
|
213
|
+
const queryParameters = {};
|
|
214
|
+
const headerParameters = {};
|
|
215
|
+
let urlPath = `/v1/guest/attempts/{attemptId}`;
|
|
216
|
+
urlPath = urlPath.replace(`{${"attemptId"}}`, encodeURIComponent(String(requestParameters['attemptId'])));
|
|
217
|
+
return {
|
|
218
|
+
path: urlPath,
|
|
219
|
+
method: 'OPTIONS',
|
|
220
|
+
headers: headerParameters,
|
|
221
|
+
query: queryParameters,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Enable CORS by returning correct headers
|
|
226
|
+
* Guest Attempt Options
|
|
227
|
+
*/
|
|
228
|
+
async guestAttemptOptionsRaw(requestParameters, initOverrides) {
|
|
229
|
+
const requestOptions = await this.guestAttemptOptionsRequestOpts(requestParameters);
|
|
230
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
231
|
+
return new runtime.VoidApiResponse(response);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Enable CORS by returning correct headers
|
|
235
|
+
* Guest Attempt Options
|
|
236
|
+
*/
|
|
237
|
+
async guestAttemptOptions(requestParameters, initOverrides) {
|
|
238
|
+
await this.guestAttemptOptionsRaw(requestParameters, initOverrides);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Creates request options for guestAttemptsOptions without sending the request
|
|
242
|
+
*/
|
|
243
|
+
async guestAttemptsOptionsRequestOpts() {
|
|
244
|
+
const queryParameters = {};
|
|
245
|
+
const headerParameters = {};
|
|
246
|
+
let urlPath = `/v1/guest/attempts`;
|
|
247
|
+
return {
|
|
248
|
+
path: urlPath,
|
|
249
|
+
method: 'OPTIONS',
|
|
250
|
+
headers: headerParameters,
|
|
251
|
+
query: queryParameters,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Enable CORS by returning correct headers
|
|
256
|
+
* Guest Attempts Options
|
|
257
|
+
*/
|
|
258
|
+
async guestAttemptsOptionsRaw(initOverrides) {
|
|
259
|
+
const requestOptions = await this.guestAttemptsOptionsRequestOpts();
|
|
260
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
261
|
+
return new runtime.VoidApiResponse(response);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Enable CORS by returning correct headers
|
|
265
|
+
* Guest Attempts Options
|
|
266
|
+
*/
|
|
267
|
+
async guestAttemptsOptions(initOverrides) {
|
|
268
|
+
await this.guestAttemptsOptionsRaw(initOverrides);
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Creates request options for listAttempts without sending the request
|
|
272
|
+
*/
|
|
273
|
+
async listAttemptsRequestOpts(requestParameters) {
|
|
274
|
+
const queryParameters = {};
|
|
275
|
+
if (requestParameters['filterStatus'] != null) {
|
|
276
|
+
queryParameters['filterStatus'] = requestParameters['filterStatus'];
|
|
277
|
+
}
|
|
278
|
+
if (requestParameters['filterAssessmentId'] != null) {
|
|
279
|
+
queryParameters['filterAssessmentId'] = requestParameters['filterAssessmentId'];
|
|
280
|
+
}
|
|
281
|
+
if (requestParameters['filterCandidateId'] != null) {
|
|
282
|
+
queryParameters['filterCandidateId'] = requestParameters['filterCandidateId'];
|
|
283
|
+
}
|
|
284
|
+
if (requestParameters['filterCreatedFrom'] != null) {
|
|
285
|
+
queryParameters['filterCreatedFrom'] = requestParameters['filterCreatedFrom'].toISOString();
|
|
286
|
+
}
|
|
287
|
+
if (requestParameters['filterCreatedTo'] != null) {
|
|
288
|
+
queryParameters['filterCreatedTo'] = requestParameters['filterCreatedTo'].toISOString();
|
|
289
|
+
}
|
|
290
|
+
if (requestParameters['filterModifiedFrom'] != null) {
|
|
291
|
+
queryParameters['filterModifiedFrom'] = requestParameters['filterModifiedFrom'].toISOString();
|
|
292
|
+
}
|
|
293
|
+
if (requestParameters['filterModifiedTo'] != null) {
|
|
294
|
+
queryParameters['filterModifiedTo'] = requestParameters['filterModifiedTo'].toISOString();
|
|
295
|
+
}
|
|
296
|
+
if (requestParameters['pageSize'] != null) {
|
|
297
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
298
|
+
}
|
|
299
|
+
if (requestParameters['pageNumber'] != null) {
|
|
300
|
+
queryParameters['pageNumber'] = requestParameters['pageNumber'];
|
|
301
|
+
}
|
|
302
|
+
if (requestParameters['pageAfter'] != null) {
|
|
303
|
+
queryParameters['pageAfter'] = requestParameters['pageAfter'];
|
|
304
|
+
}
|
|
305
|
+
if (requestParameters['pageBefore'] != null) {
|
|
306
|
+
queryParameters['pageBefore'] = requestParameters['pageBefore'];
|
|
307
|
+
}
|
|
308
|
+
const headerParameters = {};
|
|
309
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
310
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
311
|
+
}
|
|
312
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
313
|
+
// oauth required
|
|
314
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Auth", []);
|
|
315
|
+
}
|
|
316
|
+
let urlPath = `/v1/attempts`;
|
|
317
|
+
return {
|
|
318
|
+
path: urlPath,
|
|
319
|
+
method: 'GET',
|
|
320
|
+
headers: headerParameters,
|
|
321
|
+
query: queryParameters,
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* List attempts. Most common queries: - filterAssessmentId=<id> - all attempts of a template - filterCandidateId=<id> - all attempts by a candidate - filterStatus=evaluated - completed evaluations
|
|
326
|
+
* List Attempts
|
|
327
|
+
*/
|
|
328
|
+
async listAttemptsRaw(requestParameters, initOverrides) {
|
|
329
|
+
const requestOptions = await this.listAttemptsRequestOpts(requestParameters);
|
|
330
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
331
|
+
return new runtime.VoidApiResponse(response);
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* List attempts. Most common queries: - filterAssessmentId=<id> - all attempts of a template - filterCandidateId=<id> - all attempts by a candidate - filterStatus=evaluated - completed evaluations
|
|
335
|
+
* List Attempts
|
|
336
|
+
*/
|
|
337
|
+
async listAttempts(requestParameters = {}, initOverrides) {
|
|
338
|
+
await this.listAttemptsRaw(requestParameters, initOverrides);
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Creates request options for reevaluateAttempt without sending the request
|
|
342
|
+
*/
|
|
343
|
+
async reevaluateAttemptRequestOpts(requestParameters) {
|
|
344
|
+
if (requestParameters['attemptId'] == null) {
|
|
345
|
+
throw new runtime.RequiredError('attemptId', 'Required parameter "attemptId" was null or undefined when calling reevaluateAttempt().');
|
|
346
|
+
}
|
|
347
|
+
const queryParameters = {};
|
|
348
|
+
const headerParameters = {};
|
|
349
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
350
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
351
|
+
}
|
|
352
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
353
|
+
// oauth required
|
|
354
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Auth", []);
|
|
355
|
+
}
|
|
356
|
+
let urlPath = `/v1/attempts/{attemptId}/reevaluate`;
|
|
357
|
+
urlPath = urlPath.replace(`{${"attemptId"}}`, encodeURIComponent(String(requestParameters['attemptId'])));
|
|
358
|
+
return {
|
|
359
|
+
path: urlPath,
|
|
360
|
+
method: 'POST',
|
|
361
|
+
headers: headerParameters,
|
|
362
|
+
query: queryParameters,
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Re-runs the evaluation Step Function against the same answers (e.g. after the AI evaluator was upgraded). Resets evaluation.status=\'pending\' and emits ATTEMPT_REEVALUATION_REQUESTED. Action-style endpoint (POST + verb suffix) because this triggers work, not just a state mutation.
|
|
367
|
+
* Reevaluate Attempt
|
|
368
|
+
*/
|
|
369
|
+
async reevaluateAttemptRaw(requestParameters, initOverrides) {
|
|
370
|
+
const requestOptions = await this.reevaluateAttemptRequestOpts(requestParameters);
|
|
371
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
372
|
+
return new runtime.VoidApiResponse(response);
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Re-runs the evaluation Step Function against the same answers (e.g. after the AI evaluator was upgraded). Resets evaluation.status=\'pending\' and emits ATTEMPT_REEVALUATION_REQUESTED. Action-style endpoint (POST + verb suffix) because this triggers work, not just a state mutation.
|
|
376
|
+
* Reevaluate Attempt
|
|
377
|
+
*/
|
|
378
|
+
async reevaluateAttempt(requestParameters, initOverrides) {
|
|
379
|
+
await this.reevaluateAttemptRaw(requestParameters, initOverrides);
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Creates request options for reevaluateAttemptOptions without sending the request
|
|
383
|
+
*/
|
|
384
|
+
async reevaluateAttemptOptionsRequestOpts(requestParameters) {
|
|
385
|
+
if (requestParameters['attemptId'] == null) {
|
|
386
|
+
throw new runtime.RequiredError('attemptId', 'Required parameter "attemptId" was null or undefined when calling reevaluateAttemptOptions().');
|
|
387
|
+
}
|
|
388
|
+
const queryParameters = {};
|
|
389
|
+
const headerParameters = {};
|
|
390
|
+
let urlPath = `/v1/attempts/{attemptId}/reevaluate`;
|
|
391
|
+
urlPath = urlPath.replace(`{${"attemptId"}}`, encodeURIComponent(String(requestParameters['attemptId'])));
|
|
392
|
+
return {
|
|
393
|
+
path: urlPath,
|
|
394
|
+
method: 'OPTIONS',
|
|
395
|
+
headers: headerParameters,
|
|
396
|
+
query: queryParameters,
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Enable CORS by returning correct headers
|
|
401
|
+
* Reevaluate Options
|
|
402
|
+
*/
|
|
403
|
+
async reevaluateAttemptOptionsRaw(requestParameters, initOverrides) {
|
|
404
|
+
const requestOptions = await this.reevaluateAttemptOptionsRequestOpts(requestParameters);
|
|
405
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
406
|
+
return new runtime.VoidApiResponse(response);
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Enable CORS by returning correct headers
|
|
410
|
+
* Reevaluate Options
|
|
411
|
+
*/
|
|
412
|
+
async reevaluateAttemptOptions(requestParameters, initOverrides) {
|
|
413
|
+
await this.reevaluateAttemptOptionsRaw(requestParameters, initOverrides);
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Creates request options for showAttempt without sending the request
|
|
417
|
+
*/
|
|
418
|
+
async showAttemptRequestOpts(requestParameters) {
|
|
419
|
+
if (requestParameters['attemptId'] == null) {
|
|
420
|
+
throw new runtime.RequiredError('attemptId', 'Required parameter "attemptId" was null or undefined when calling showAttempt().');
|
|
421
|
+
}
|
|
422
|
+
const queryParameters = {};
|
|
423
|
+
const headerParameters = {};
|
|
424
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
425
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
426
|
+
}
|
|
427
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
428
|
+
// oauth required
|
|
429
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Auth", []);
|
|
430
|
+
}
|
|
431
|
+
let urlPath = `/v1/attempts/{attemptId}`;
|
|
432
|
+
urlPath = urlPath.replace(`{${"attemptId"}}`, encodeURIComponent(String(requestParameters['attemptId'])));
|
|
433
|
+
return {
|
|
434
|
+
path: urlPath,
|
|
435
|
+
method: 'GET',
|
|
436
|
+
headers: headerParameters,
|
|
437
|
+
query: queryParameters,
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Returns full attempt details including evaluation block (recruiter view).
|
|
442
|
+
* Show Attempt
|
|
443
|
+
*/
|
|
444
|
+
async showAttemptRaw(requestParameters, initOverrides) {
|
|
445
|
+
const requestOptions = await this.showAttemptRequestOpts(requestParameters);
|
|
446
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
447
|
+
return new runtime.VoidApiResponse(response);
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Returns full attempt details including evaluation block (recruiter view).
|
|
451
|
+
* Show Attempt
|
|
452
|
+
*/
|
|
453
|
+
async showAttempt(requestParameters, initOverrides) {
|
|
454
|
+
await this.showAttemptRaw(requestParameters, initOverrides);
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Creates request options for showGuestAttempt without sending the request
|
|
458
|
+
*/
|
|
459
|
+
async showGuestAttemptRequestOpts(requestParameters) {
|
|
460
|
+
if (requestParameters['attemptId'] == null) {
|
|
461
|
+
throw new runtime.RequiredError('attemptId', 'Required parameter "attemptId" was null or undefined when calling showGuestAttempt().');
|
|
462
|
+
}
|
|
463
|
+
if (requestParameters['tenantId'] == null) {
|
|
464
|
+
throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling showGuestAttempt().');
|
|
465
|
+
}
|
|
466
|
+
if (requestParameters['token'] == null) {
|
|
467
|
+
throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling showGuestAttempt().');
|
|
468
|
+
}
|
|
469
|
+
const queryParameters = {};
|
|
470
|
+
if (requestParameters['tenantId'] != null) {
|
|
471
|
+
queryParameters['tenantId'] = requestParameters['tenantId'];
|
|
472
|
+
}
|
|
473
|
+
if (requestParameters['token'] != null) {
|
|
474
|
+
queryParameters['token'] = requestParameters['token'];
|
|
475
|
+
}
|
|
476
|
+
const headerParameters = {};
|
|
477
|
+
let urlPath = `/v1/guest/attempts/{attemptId}`;
|
|
478
|
+
urlPath = urlPath.replace(`{${"attemptId"}}`, encodeURIComponent(String(requestParameters['attemptId'])));
|
|
479
|
+
return {
|
|
480
|
+
path: urlPath,
|
|
481
|
+
method: 'GET',
|
|
482
|
+
headers: headerParameters,
|
|
483
|
+
query: queryParameters,
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Read-only fetch. tenantId + token via query string. Returns attempt + filtered template (no answer keys). Returns 404 on token mismatch (intentionally - we don\'t leak whether a given attempt exists).
|
|
488
|
+
* Show Guest Attempt
|
|
489
|
+
*/
|
|
490
|
+
async showGuestAttemptRaw(requestParameters, initOverrides) {
|
|
491
|
+
const requestOptions = await this.showGuestAttemptRequestOpts(requestParameters);
|
|
492
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
493
|
+
return new runtime.VoidApiResponse(response);
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Read-only fetch. tenantId + token via query string. Returns attempt + filtered template (no answer keys). Returns 404 on token mismatch (intentionally - we don\'t leak whether a given attempt exists).
|
|
497
|
+
* Show Guest Attempt
|
|
498
|
+
*/
|
|
499
|
+
async showGuestAttempt(requestParameters, initOverrides) {
|
|
500
|
+
await this.showGuestAttemptRaw(requestParameters, initOverrides);
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Creates request options for startGuestAttempt without sending the request
|
|
504
|
+
*/
|
|
505
|
+
async startGuestAttemptRequestOpts(requestParameters) {
|
|
506
|
+
if (requestParameters['startGuestAttemptRequest'] == null) {
|
|
507
|
+
throw new runtime.RequiredError('startGuestAttemptRequest', 'Required parameter "startGuestAttemptRequest" was null or undefined when calling startGuestAttempt().');
|
|
508
|
+
}
|
|
509
|
+
const queryParameters = {};
|
|
510
|
+
const headerParameters = {};
|
|
511
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
512
|
+
let urlPath = `/v1/guest/attempts`;
|
|
513
|
+
return {
|
|
514
|
+
path: urlPath,
|
|
515
|
+
method: 'POST',
|
|
516
|
+
headers: headerParameters,
|
|
517
|
+
query: queryParameters,
|
|
518
|
+
body: (0, index_1.StartGuestAttemptRequestToJSON)(requestParameters['startGuestAttemptRequest']),
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Candidate clicks the assessment link. Validates token and transitions the attempt from pending -> inProgress (idempotent). Returns attempt + filtered template (no answer keys).
|
|
523
|
+
* Start Guest Attempt
|
|
524
|
+
*/
|
|
525
|
+
async startGuestAttemptRaw(requestParameters, initOverrides) {
|
|
526
|
+
const requestOptions = await this.startGuestAttemptRequestOpts(requestParameters);
|
|
527
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
528
|
+
return new runtime.VoidApiResponse(response);
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Candidate clicks the assessment link. Validates token and transitions the attempt from pending -> inProgress (idempotent). Returns attempt + filtered template (no answer keys).
|
|
532
|
+
* Start Guest Attempt
|
|
533
|
+
*/
|
|
534
|
+
async startGuestAttempt(requestParameters, initOverrides) {
|
|
535
|
+
await this.startGuestAttemptRaw(requestParameters, initOverrides);
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Creates request options for updateAttempt without sending the request
|
|
539
|
+
*/
|
|
540
|
+
async updateAttemptRequestOpts(requestParameters) {
|
|
541
|
+
if (requestParameters['attemptId'] == null) {
|
|
542
|
+
throw new runtime.RequiredError('attemptId', 'Required parameter "attemptId" was null or undefined when calling updateAttempt().');
|
|
543
|
+
}
|
|
544
|
+
if (requestParameters['updateAttemptRequest'] == null) {
|
|
545
|
+
throw new runtime.RequiredError('updateAttemptRequest', 'Required parameter "updateAttemptRequest" was null or undefined when calling updateAttempt().');
|
|
546
|
+
}
|
|
547
|
+
const queryParameters = {};
|
|
548
|
+
const headerParameters = {};
|
|
549
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
550
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
551
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
|
552
|
+
}
|
|
553
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
554
|
+
// oauth required
|
|
555
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2Auth", []);
|
|
556
|
+
}
|
|
557
|
+
let urlPath = `/v1/attempts/{attemptId}`;
|
|
558
|
+
urlPath = urlPath.replace(`{${"attemptId"}}`, encodeURIComponent(String(requestParameters['attemptId'])));
|
|
559
|
+
return {
|
|
560
|
+
path: urlPath,
|
|
561
|
+
method: 'PATCH',
|
|
562
|
+
headers: headerParameters,
|
|
563
|
+
query: queryParameters,
|
|
564
|
+
body: (0, index_1.UpdateAttemptRequestToJSON)(requestParameters['updateAttemptRequest']),
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Recruiter / admin override path. Allowed updates: status, languageCode, evaluation (manual override), proctoring, expiresAt, durationMinutes, evaluatorVersion. answers is NOT allowed - candidate\'s guest endpoint owns that.
|
|
569
|
+
* Update Attempt
|
|
570
|
+
*/
|
|
571
|
+
async updateAttemptRaw(requestParameters, initOverrides) {
|
|
572
|
+
const requestOptions = await this.updateAttemptRequestOpts(requestParameters);
|
|
573
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
574
|
+
return new runtime.VoidApiResponse(response);
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Recruiter / admin override path. Allowed updates: status, languageCode, evaluation (manual override), proctoring, expiresAt, durationMinutes, evaluatorVersion. answers is NOT allowed - candidate\'s guest endpoint owns that.
|
|
578
|
+
* Update Attempt
|
|
579
|
+
*/
|
|
580
|
+
async updateAttempt(requestParameters, initOverrides) {
|
|
581
|
+
await this.updateAttemptRaw(requestParameters, initOverrides);
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Creates request options for updateGuestAttempt without sending the request
|
|
585
|
+
*/
|
|
586
|
+
async updateGuestAttemptRequestOpts(requestParameters) {
|
|
587
|
+
if (requestParameters['attemptId'] == null) {
|
|
588
|
+
throw new runtime.RequiredError('attemptId', 'Required parameter "attemptId" was null or undefined when calling updateGuestAttempt().');
|
|
589
|
+
}
|
|
590
|
+
if (requestParameters['updateGuestAttemptRequest'] == null) {
|
|
591
|
+
throw new runtime.RequiredError('updateGuestAttemptRequest', 'Required parameter "updateGuestAttemptRequest" was null or undefined when calling updateGuestAttempt().');
|
|
592
|
+
}
|
|
593
|
+
const queryParameters = {};
|
|
594
|
+
const headerParameters = {};
|
|
595
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
596
|
+
let urlPath = `/v1/guest/attempts/{attemptId}`;
|
|
597
|
+
urlPath = urlPath.replace(`{${"attemptId"}}`, encodeURIComponent(String(requestParameters['attemptId'])));
|
|
598
|
+
return {
|
|
599
|
+
path: urlPath,
|
|
600
|
+
method: 'PATCH',
|
|
601
|
+
headers: headerParameters,
|
|
602
|
+
query: queryParameters,
|
|
603
|
+
body: (0, index_1.UpdateGuestAttemptRequestToJSON)(requestParameters['updateGuestAttemptRequest']),
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Candidate autosave OR finalize. Two flows in one operation: - autosave: data.attributes.answers / proctoring updates while status=inProgress - finalize: data.attributes.status=\'submitted\' transitions attempt and emits ATTEMPT_SUBMITTED (eval SF picks it up)
|
|
608
|
+
* Update Guest Attempt
|
|
609
|
+
*/
|
|
610
|
+
async updateGuestAttemptRaw(requestParameters, initOverrides) {
|
|
611
|
+
const requestOptions = await this.updateGuestAttemptRequestOpts(requestParameters);
|
|
612
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
613
|
+
return new runtime.VoidApiResponse(response);
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Candidate autosave OR finalize. Two flows in one operation: - autosave: data.attributes.answers / proctoring updates while status=inProgress - finalize: data.attributes.status=\'submitted\' transitions attempt and emits ATTEMPT_SUBMITTED (eval SF picks it up)
|
|
617
|
+
* Update Guest Attempt
|
|
618
|
+
*/
|
|
619
|
+
async updateGuestAttempt(requestParameters, initOverrides) {
|
|
620
|
+
await this.updateGuestAttemptRaw(requestParameters, initOverrides);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
exports.AttemptsApi = AttemptsApi;
|
|
624
|
+
/**
|
|
625
|
+
* @export
|
|
626
|
+
*/
|
|
627
|
+
exports.DeleteAttemptPermanentDeleteEnum = {
|
|
628
|
+
True: 'true',
|
|
629
|
+
False: 'false'
|
|
630
|
+
};
|
|
631
|
+
/**
|
|
632
|
+
* @export
|
|
633
|
+
*/
|
|
634
|
+
exports.ListAttemptsFilterStatusEnum = {
|
|
635
|
+
Pending: 'pending',
|
|
636
|
+
InProgress: 'inProgress',
|
|
637
|
+
Submitted: 'submitted',
|
|
638
|
+
Evaluated: 'evaluated',
|
|
639
|
+
Reviewed: 'reviewed',
|
|
640
|
+
Anonymized: 'anonymized',
|
|
641
|
+
Failed: 'failed'
|
|
642
|
+
};
|
|
643
|
+
//# sourceMappingURL=AttemptsApi.js.map
|