@se-uulm/snowballr-api-client 0.2.1-beta.79fd7d5 → 0.2.1-beta.82bd06f
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/.openapi-generator/FILES +7 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +102 -28
- package/dist/apis/ProjectsControllerApi.d.ts +54 -1
- package/dist/apis/ProjectsControllerApi.js +56 -19
- package/dist/esm/apis/ProjectsControllerApi.d.ts +54 -1
- package/dist/esm/apis/ProjectsControllerApi.js +52 -15
- package/dist/esm/models/CreateProjectRequest.d.ts +0 -2
- package/dist/esm/models/DecisionMatrixPattern.d.ts +0 -4
- package/dist/esm/models/DecisionMatrixPattern.js +1 -1
- package/dist/esm/models/DecisionMatrixPatternEntry.d.ts +0 -4
- package/dist/esm/models/DecisionMatrixPatternEntry.js +1 -1
- package/dist/esm/models/Project.d.ts +0 -14
- package/dist/esm/models/Project.js +4 -3
- package/dist/esm/models/ProjectSettings.d.ts +0 -10
- package/dist/esm/models/ProjectSettings.js +1 -1
- package/dist/esm/models/ReviewDecisionMatrix.d.ts +0 -4
- package/dist/esm/runtime.d.ts +34 -1
- package/dist/esm/runtime.js +130 -4
- package/dist/models/CreateProjectRequest.d.ts +0 -2
- package/dist/models/DecisionMatrixPattern.d.ts +0 -4
- package/dist/models/DecisionMatrixPattern.js +1 -1
- package/dist/models/DecisionMatrixPatternEntry.d.ts +0 -4
- package/dist/models/DecisionMatrixPatternEntry.js +1 -1
- package/dist/models/Project.d.ts +0 -14
- package/dist/models/Project.js +4 -3
- package/dist/models/ProjectSettings.d.ts +0 -10
- package/dist/models/ProjectSettings.js +1 -1
- package/dist/models/ReviewDecisionMatrix.d.ts +0 -4
- package/dist/runtime.d.ts +34 -1
- package/dist/runtime.js +136 -4
- package/docs/CreateProjectRequest.md +34 -0
- package/docs/DecisionMatrixPattern.md +36 -0
- package/docs/DecisionMatrixPatternEntry.md +36 -0
- package/docs/Project.md +46 -0
- package/docs/ProjectSettings.md +42 -0
- package/docs/ProjectsControllerApi.md +264 -0
- package/docs/ReviewDecisionMatrix.md +36 -0
- package/package.json +2 -2
- package/src/apis/ProjectsControllerApi.ts +91 -20
- package/src/models/CreateProjectRequest.ts +0 -2
- package/src/models/DecisionMatrixPattern.ts +1 -5
- package/src/models/DecisionMatrixPatternEntry.ts +1 -5
- package/src/models/Project.ts +4 -18
- package/src/models/ProjectSettings.ts +1 -11
- package/src/models/ReviewDecisionMatrix.ts +0 -4
- package/src/runtime.ts +146 -6
- package/tsconfig.json +1 -1
package/dist/models/Project.d.ts
CHANGED
|
@@ -18,44 +18,30 @@ import type { ProjectSettings } from './ProjectSettings';
|
|
|
18
18
|
export interface Project {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @type {string}
|
|
22
|
-
* @memberof Project
|
|
23
21
|
*/
|
|
24
22
|
id?: string;
|
|
25
23
|
/**
|
|
26
24
|
*
|
|
27
|
-
* @type {string}
|
|
28
|
-
* @memberof Project
|
|
29
25
|
*/
|
|
30
26
|
name?: string;
|
|
31
27
|
/**
|
|
32
28
|
*
|
|
33
|
-
* @type {string}
|
|
34
|
-
* @memberof Project
|
|
35
29
|
*/
|
|
36
30
|
status?: ProjectStatusEnum;
|
|
37
31
|
/**
|
|
38
32
|
*
|
|
39
|
-
* @type {number}
|
|
40
|
-
* @memberof Project
|
|
41
33
|
*/
|
|
42
34
|
currentStage?: number;
|
|
43
35
|
/**
|
|
44
36
|
*
|
|
45
|
-
* @type {number}
|
|
46
|
-
* @memberof Project
|
|
47
37
|
*/
|
|
48
38
|
maxStage?: number;
|
|
49
39
|
/**
|
|
50
40
|
*
|
|
51
|
-
* @type {Date}
|
|
52
|
-
* @memberof Project
|
|
53
41
|
*/
|
|
54
42
|
currentStageStartedAt?: Date;
|
|
55
43
|
/**
|
|
56
44
|
*
|
|
57
|
-
* @type {ProjectSettings}
|
|
58
|
-
* @memberof Project
|
|
59
45
|
*/
|
|
60
46
|
settings?: ProjectSettings;
|
|
61
47
|
}
|
package/dist/models/Project.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.ProjectFromJSON = ProjectFromJSON;
|
|
|
19
19
|
exports.ProjectFromJSONTyped = ProjectFromJSONTyped;
|
|
20
20
|
exports.ProjectToJSON = ProjectToJSON;
|
|
21
21
|
exports.ProjectToJSONTyped = ProjectToJSONTyped;
|
|
22
|
+
const runtime_1 = require("../runtime");
|
|
22
23
|
const ProjectSettings_1 = require("./ProjectSettings");
|
|
23
24
|
/**
|
|
24
25
|
* @export
|
|
@@ -28,7 +29,7 @@ exports.ProjectStatusEnum = {
|
|
|
28
29
|
ACTIVE_LOCKED: 'ACTIVE_LOCKED',
|
|
29
30
|
ARCHIVED: 'ARCHIVED',
|
|
30
31
|
DELETED: 'DELETED',
|
|
31
|
-
CLEARED: 'CLEARED'
|
|
32
|
+
CLEARED: 'CLEARED',
|
|
32
33
|
};
|
|
33
34
|
/**
|
|
34
35
|
* Check if a given object implements the Project interface.
|
|
@@ -49,7 +50,7 @@ function ProjectFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
50
|
'status': json['status'] == null ? undefined : json['status'],
|
|
50
51
|
'currentStage': json['currentStage'] == null ? undefined : json['currentStage'],
|
|
51
52
|
'maxStage': json['maxStage'] == null ? undefined : json['maxStage'],
|
|
52
|
-
'currentStageStartedAt': json['currentStageStartedAt'] == null ? undefined : (
|
|
53
|
+
'currentStageStartedAt': json['currentStageStartedAt'] == null ? undefined : ((0, runtime_1.parseDateTime)(json['currentStageStartedAt'])),
|
|
53
54
|
'settings': json['settings'] == null ? undefined : (0, ProjectSettings_1.ProjectSettingsFromJSON)(json['settings']),
|
|
54
55
|
};
|
|
55
56
|
}
|
|
@@ -66,7 +67,7 @@ function ProjectToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
66
67
|
'status': value['status'],
|
|
67
68
|
'currentStage': value['currentStage'],
|
|
68
69
|
'maxStage': value['maxStage'],
|
|
69
|
-
'currentStageStartedAt': value['currentStageStartedAt'] == null ?
|
|
70
|
+
'currentStageStartedAt': value['currentStageStartedAt'] == null ? value['currentStageStartedAt'] : (0, runtime_1.serializeDateTime)(value['currentStageStartedAt']),
|
|
70
71
|
'settings': (0, ProjectSettings_1.ProjectSettingsToJSON)(value['settings']),
|
|
71
72
|
};
|
|
72
73
|
}
|
|
@@ -18,32 +18,22 @@ import type { ReviewDecisionMatrix } from './ReviewDecisionMatrix';
|
|
|
18
18
|
export interface ProjectSettings {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @type {number}
|
|
22
|
-
* @memberof ProjectSettings
|
|
23
21
|
*/
|
|
24
22
|
similarityThreshold?: number;
|
|
25
23
|
/**
|
|
26
24
|
*
|
|
27
|
-
* @type {string}
|
|
28
|
-
* @memberof ProjectSettings
|
|
29
25
|
*/
|
|
30
26
|
snowballingType?: ProjectSettingsSnowballingTypeEnum;
|
|
31
27
|
/**
|
|
32
28
|
*
|
|
33
|
-
* @type {boolean}
|
|
34
|
-
* @memberof ProjectSettings
|
|
35
29
|
*/
|
|
36
30
|
reviewMaybeAllowed?: boolean;
|
|
37
31
|
/**
|
|
38
32
|
*
|
|
39
|
-
* @type {ReviewDecisionMatrix}
|
|
40
|
-
* @memberof ProjectSettings
|
|
41
33
|
*/
|
|
42
34
|
reviewDecisionMatrix?: ReviewDecisionMatrix;
|
|
43
35
|
/**
|
|
44
36
|
*
|
|
45
|
-
* @type {{ [key: string]: { [key: string]: string; }; }}
|
|
46
|
-
* @memberof ProjectSettings
|
|
47
37
|
*/
|
|
48
38
|
fetchers?: {
|
|
49
39
|
[key: string]: {
|
|
@@ -26,7 +26,7 @@ const ReviewDecisionMatrix_1 = require("./ReviewDecisionMatrix");
|
|
|
26
26
|
exports.ProjectSettingsSnowballingTypeEnum = {
|
|
27
27
|
FORWARD: 'FORWARD',
|
|
28
28
|
BACKWARD: 'BACKWARD',
|
|
29
|
-
BOTH: 'BOTH'
|
|
29
|
+
BOTH: 'BOTH',
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
32
|
* Check if a given object implements the ProjectSettings interface.
|
|
@@ -18,14 +18,10 @@ import type { DecisionMatrixPattern } from './DecisionMatrixPattern';
|
|
|
18
18
|
export interface ReviewDecisionMatrix {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @type {number}
|
|
22
|
-
* @memberof ReviewDecisionMatrix
|
|
23
21
|
*/
|
|
24
22
|
numberOfReviewers?: number;
|
|
25
23
|
/**
|
|
26
24
|
*
|
|
27
|
-
* @type {Array<DecisionMatrixPattern>}
|
|
28
|
-
* @memberof ReviewDecisionMatrix
|
|
29
25
|
*/
|
|
30
26
|
patterns?: Array<DecisionMatrixPattern>;
|
|
31
27
|
}
|
package/dist/runtime.d.ts
CHANGED
|
@@ -124,9 +124,21 @@ export interface RequestOpts {
|
|
|
124
124
|
}
|
|
125
125
|
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
126
126
|
export declare function exists(json: any, key: string): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Every generated date call site routes through these.
|
|
129
|
+
*
|
|
130
|
+
* `format: date` is a calendar date, with no time and no offset, so it is converted
|
|
131
|
+
* against the local calendar on both ends: they have to agree or the date shifts by
|
|
132
|
+
* a day. `format: date-time` is an instant and uses UTC.
|
|
133
|
+
*/
|
|
134
|
+
export declare function serializeDateTime(value: Date): string;
|
|
135
|
+
export declare function serializeDate(value: Date): string;
|
|
136
|
+
export declare function parseDate(value: Date | string): Date;
|
|
137
|
+
export declare function parseDateTime(value: any): Date;
|
|
127
138
|
export declare function mapValues(data: any, fn: (item: any) => any): {
|
|
128
139
|
[key: string]: any;
|
|
129
140
|
};
|
|
141
|
+
export declare function anyToJSON(value: any): any;
|
|
130
142
|
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
131
143
|
export interface Consume {
|
|
132
144
|
contentType: string;
|
|
@@ -172,11 +184,32 @@ export declare class VoidApiResponse {
|
|
|
172
184
|
constructor(raw: Response);
|
|
173
185
|
value(): Promise<void>;
|
|
174
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* A Blob carrying the file name the server advertised, empty when it did not send one. It is a File
|
|
189
|
+
* wherever one can be built, and the bare Blob given a name otherwise. Same name and shape as the
|
|
190
|
+
* `typescript` generator's browser HttpFile.
|
|
191
|
+
*/
|
|
192
|
+
export type HttpFile = Blob & {
|
|
193
|
+
readonly name: string;
|
|
194
|
+
};
|
|
175
195
|
export declare class BlobApiResponse {
|
|
176
196
|
raw: Response;
|
|
177
197
|
constructor(raw: Response);
|
|
178
|
-
|
|
198
|
+
/**
|
|
199
|
+
* The body named after the Content-Disposition header, so that a download keeps the name the
|
|
200
|
+
* server gave it. A File is built from a native Blob; the Blob itself is named where there is no
|
|
201
|
+
* global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
|
|
202
|
+
* native one, as returned by an injected fetch implementation such as node-fetch, which a File
|
|
203
|
+
* would stringify instead of wrapping.
|
|
204
|
+
*/
|
|
205
|
+
value(): Promise<HttpFile>;
|
|
179
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
|
|
209
|
+
* `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
|
|
210
|
+
* or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
|
|
211
|
+
*/
|
|
212
|
+
export declare function parseContentDispositionFilename(headers: Headers): string | undefined;
|
|
180
213
|
export declare class TextApiResponse {
|
|
181
214
|
raw: Response;
|
|
182
215
|
constructor(raw: Response);
|
package/dist/runtime.js
CHANGED
|
@@ -25,8 +25,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
|
|
26
26
|
exports.querystring = querystring;
|
|
27
27
|
exports.exists = exists;
|
|
28
|
+
exports.serializeDateTime = serializeDateTime;
|
|
29
|
+
exports.serializeDate = serializeDate;
|
|
30
|
+
exports.parseDate = parseDate;
|
|
31
|
+
exports.parseDateTime = parseDateTime;
|
|
28
32
|
exports.mapValues = mapValues;
|
|
33
|
+
exports.anyToJSON = anyToJSON;
|
|
29
34
|
exports.canConsumeForm = canConsumeForm;
|
|
35
|
+
exports.parseContentDispositionFilename = parseContentDispositionFilename;
|
|
30
36
|
exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
31
37
|
class Configuration {
|
|
32
38
|
constructor(configuration = {}) {
|
|
@@ -219,7 +225,7 @@ class BaseAPI {
|
|
|
219
225
|
}
|
|
220
226
|
}
|
|
221
227
|
exports.BaseAPI = BaseAPI;
|
|
222
|
-
BaseAPI.jsonRegex =
|
|
228
|
+
BaseAPI.jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
|
|
223
229
|
;
|
|
224
230
|
function isBlob(value) {
|
|
225
231
|
return typeof Blob !== 'undefined' && value instanceof Blob;
|
|
@@ -232,6 +238,11 @@ class ResponseError extends Error {
|
|
|
232
238
|
super(msg);
|
|
233
239
|
this.response = response;
|
|
234
240
|
this.name = "ResponseError";
|
|
241
|
+
// restore prototype chain
|
|
242
|
+
const actualProto = new.target.prototype;
|
|
243
|
+
if (Object.setPrototypeOf) {
|
|
244
|
+
Object.setPrototypeOf(this, actualProto);
|
|
245
|
+
}
|
|
235
246
|
}
|
|
236
247
|
}
|
|
237
248
|
exports.ResponseError = ResponseError;
|
|
@@ -240,6 +251,11 @@ class FetchError extends Error {
|
|
|
240
251
|
super(msg);
|
|
241
252
|
this.cause = cause;
|
|
242
253
|
this.name = "FetchError";
|
|
254
|
+
// restore prototype chain
|
|
255
|
+
const actualProto = new.target.prototype;
|
|
256
|
+
if (Object.setPrototypeOf) {
|
|
257
|
+
Object.setPrototypeOf(this, actualProto);
|
|
258
|
+
}
|
|
243
259
|
}
|
|
244
260
|
}
|
|
245
261
|
exports.FetchError = FetchError;
|
|
@@ -248,6 +264,11 @@ class RequiredError extends Error {
|
|
|
248
264
|
super(msg);
|
|
249
265
|
this.field = field;
|
|
250
266
|
this.name = "RequiredError";
|
|
267
|
+
// restore prototype chain
|
|
268
|
+
const actualProto = new.target.prototype;
|
|
269
|
+
if (Object.setPrototypeOf) {
|
|
270
|
+
Object.setPrototypeOf(this, actualProto);
|
|
271
|
+
}
|
|
251
272
|
}
|
|
252
273
|
}
|
|
253
274
|
exports.RequiredError = RequiredError;
|
|
@@ -275,7 +296,7 @@ function querystringSingleKey(key, value, keyPrefix = '') {
|
|
|
275
296
|
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
|
276
297
|
}
|
|
277
298
|
if (value instanceof Date) {
|
|
278
|
-
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value
|
|
299
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(serializeDateTime(value))}`;
|
|
279
300
|
}
|
|
280
301
|
if (value instanceof Object) {
|
|
281
302
|
return querystring(value, fullKey);
|
|
@@ -286,6 +307,52 @@ function exists(json, key) {
|
|
|
286
307
|
const value = json[key];
|
|
287
308
|
return value !== null && value !== undefined;
|
|
288
309
|
}
|
|
310
|
+
/**
|
|
311
|
+
* Every generated date call site routes through these.
|
|
312
|
+
*
|
|
313
|
+
* `format: date` is a calendar date, with no time and no offset, so it is converted
|
|
314
|
+
* against the local calendar on both ends: they have to agree or the date shifts by
|
|
315
|
+
* a day. `format: date-time` is an instant and uses UTC.
|
|
316
|
+
*/
|
|
317
|
+
function serializeDateTime(value) {
|
|
318
|
+
return value.toISOString();
|
|
319
|
+
}
|
|
320
|
+
function serializeDate(value) {
|
|
321
|
+
if (isNaN(value.getTime())) {
|
|
322
|
+
throw new RangeError('Invalid time value');
|
|
323
|
+
}
|
|
324
|
+
const year = ('000' + value.getFullYear()).slice(-4);
|
|
325
|
+
const month = ('0' + (value.getMonth() + 1)).slice(-2);
|
|
326
|
+
const day = ('0' + value.getDate()).slice(-2);
|
|
327
|
+
return `${year}-${month}-${day}`;
|
|
328
|
+
}
|
|
329
|
+
function parseDate(value) {
|
|
330
|
+
if (value instanceof Date) {
|
|
331
|
+
return value;
|
|
332
|
+
}
|
|
333
|
+
// `new Date("2026-08-05")` would parse as UTC midnight: a different day west of UTC.
|
|
334
|
+
// Local midnight is the stated day everywhere. setFullYear avoids the 1900 offset the
|
|
335
|
+
// multi-argument constructor applies to years 0-99.
|
|
336
|
+
const fullDate = /^(\d{4})-(\d{2})-(\d{2})$/.exec(String(value));
|
|
337
|
+
if (fullDate) {
|
|
338
|
+
const year = Number(fullDate[1]);
|
|
339
|
+
const month = Number(fullDate[2]) - 1;
|
|
340
|
+
const day = Number(fullDate[3]);
|
|
341
|
+
const date = new Date(0);
|
|
342
|
+
date.setFullYear(year, month, day);
|
|
343
|
+
date.setHours(0, 0, 0, 0);
|
|
344
|
+
// Out-of-range components (or a day the local zone skipped) silently roll over,
|
|
345
|
+
// which would hand back a date the server never sent.
|
|
346
|
+
if (date.getFullYear() !== year || date.getMonth() !== month || date.getDate() !== day) {
|
|
347
|
+
return new Date(NaN);
|
|
348
|
+
}
|
|
349
|
+
return date;
|
|
350
|
+
}
|
|
351
|
+
return new Date(value);
|
|
352
|
+
}
|
|
353
|
+
function parseDateTime(value) {
|
|
354
|
+
return new Date(value);
|
|
355
|
+
}
|
|
289
356
|
function mapValues(data, fn) {
|
|
290
357
|
const result = {};
|
|
291
358
|
for (const key of Object.keys(data)) {
|
|
@@ -293,9 +360,14 @@ function mapValues(data, fn) {
|
|
|
293
360
|
}
|
|
294
361
|
return result;
|
|
295
362
|
}
|
|
363
|
+
// Pass-through serializer for `any`-typed properties in form data. See #1877.
|
|
364
|
+
function anyToJSON(value) {
|
|
365
|
+
return value;
|
|
366
|
+
}
|
|
296
367
|
function canConsumeForm(consumes) {
|
|
368
|
+
var _a;
|
|
297
369
|
for (const consume of consumes) {
|
|
298
|
-
if ('multipart/form-data'
|
|
370
|
+
if (((_a = consume.contentType) === null || _a === void 0 ? void 0 : _a.startsWith('multipart/form-data')) == true) {
|
|
299
371
|
return true;
|
|
300
372
|
}
|
|
301
373
|
}
|
|
@@ -328,14 +400,74 @@ class BlobApiResponse {
|
|
|
328
400
|
constructor(raw) {
|
|
329
401
|
this.raw = raw;
|
|
330
402
|
}
|
|
403
|
+
/**
|
|
404
|
+
* The body named after the Content-Disposition header, so that a download keeps the name the
|
|
405
|
+
* server gave it. A File is built from a native Blob; the Blob itself is named where there is no
|
|
406
|
+
* global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
|
|
407
|
+
* native one, as returned by an injected fetch implementation such as node-fetch, which a File
|
|
408
|
+
* would stringify instead of wrapping.
|
|
409
|
+
*/
|
|
331
410
|
value() {
|
|
332
411
|
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
-
|
|
412
|
+
var _a;
|
|
413
|
+
const blob = yield this.raw.blob();
|
|
414
|
+
const name = (_a = parseContentDispositionFilename(this.raw.headers)) !== null && _a !== void 0 ? _a : '';
|
|
415
|
+
if (typeof File !== 'undefined' && blob instanceof Blob) {
|
|
416
|
+
try {
|
|
417
|
+
return new File([blob], name, { type: blob.type });
|
|
418
|
+
}
|
|
419
|
+
catch (_b) {
|
|
420
|
+
// File cannot be constructed: name the Blob itself
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return Object.assign(blob, { name });
|
|
334
424
|
});
|
|
335
425
|
}
|
|
336
426
|
;
|
|
337
427
|
}
|
|
338
428
|
exports.BlobApiResponse = BlobApiResponse;
|
|
429
|
+
/**
|
|
430
|
+
* The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
|
|
431
|
+
* `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
|
|
432
|
+
* or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
|
|
433
|
+
*/
|
|
434
|
+
function parseContentDispositionFilename(headers) {
|
|
435
|
+
var _a, _b;
|
|
436
|
+
const params = parseHeaderParameters((_a = headers.get('Content-Disposition')) !== null && _a !== void 0 ? _a : '');
|
|
437
|
+
return (_b = basename(decodeExtValue(params.get('filename*')))) !== null && _b !== void 0 ? _b : basename(params.get('filename'));
|
|
438
|
+
}
|
|
439
|
+
/** The decoded RFC 5987 ext-value, or undefined when it is not UTF-8 or its percent-encoding is malformed. */
|
|
440
|
+
function decodeExtValue(value) {
|
|
441
|
+
const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
|
|
442
|
+
try {
|
|
443
|
+
return match ? decodeURIComponent(match[1]) : undefined;
|
|
444
|
+
}
|
|
445
|
+
catch (_a) {
|
|
446
|
+
return undefined;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* The `name=value` parameters of a header value, consumed one at a time so that a quoted-string is
|
|
451
|
+
* taken whole, `;` included. Names are lower-cased, quoted-string values are unquoted with their
|
|
452
|
+
* backslash escapes resolved, and the first occurrence of a name wins.
|
|
453
|
+
*/
|
|
454
|
+
function parseHeaderParameters(value) {
|
|
455
|
+
const params = new Map();
|
|
456
|
+
const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
|
|
457
|
+
let match;
|
|
458
|
+
while ((match = parameter.exec(value)) !== null) {
|
|
459
|
+
const name = match[1].toLowerCase();
|
|
460
|
+
if (!params.has(name)) {
|
|
461
|
+
params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
return params;
|
|
465
|
+
}
|
|
466
|
+
/** The last `/` or `\` separated segment of a file name, or undefined when it is not a file name. */
|
|
467
|
+
function basename(name) {
|
|
468
|
+
const base = name === null || name === void 0 ? void 0 : name.split(/[\\/]/).pop();
|
|
469
|
+
return !base || base === '.' || base === '..' ? undefined : base;
|
|
470
|
+
}
|
|
339
471
|
class TextApiResponse {
|
|
340
472
|
constructor(raw) {
|
|
341
473
|
this.raw = raw;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# CreateProjectRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { CreateProjectRequest } from '@se-uulm/snowballr-api-client'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"name": null,
|
|
19
|
+
} satisfies CreateProjectRequest
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as CreateProjectRequest
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# DecisionMatrixPattern
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`decision` | string
|
|
10
|
+
`entries` | [Array<DecisionMatrixPatternEntry>](DecisionMatrixPatternEntry.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { DecisionMatrixPattern } from '@se-uulm/snowballr-api-client'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"decision": null,
|
|
20
|
+
"entries": null,
|
|
21
|
+
} satisfies DecisionMatrixPattern
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as DecisionMatrixPattern
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# DecisionMatrixPatternEntry
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`decision` | string
|
|
10
|
+
`count` | number
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { DecisionMatrixPatternEntry } from '@se-uulm/snowballr-api-client'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"decision": null,
|
|
20
|
+
"count": null,
|
|
21
|
+
} satisfies DecisionMatrixPatternEntry
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as DecisionMatrixPatternEntry
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
package/docs/Project.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
# Project
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`name` | string
|
|
11
|
+
`status` | string
|
|
12
|
+
`currentStage` | number
|
|
13
|
+
`maxStage` | number
|
|
14
|
+
`currentStageStartedAt` | Date
|
|
15
|
+
`settings` | [ProjectSettings](ProjectSettings.md)
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import type { Project } from '@se-uulm/snowballr-api-client'
|
|
21
|
+
|
|
22
|
+
// TODO: Update the object below with actual values
|
|
23
|
+
const example = {
|
|
24
|
+
"id": null,
|
|
25
|
+
"name": null,
|
|
26
|
+
"status": null,
|
|
27
|
+
"currentStage": null,
|
|
28
|
+
"maxStage": null,
|
|
29
|
+
"currentStageStartedAt": null,
|
|
30
|
+
"settings": null,
|
|
31
|
+
} satisfies Project
|
|
32
|
+
|
|
33
|
+
console.log(example)
|
|
34
|
+
|
|
35
|
+
// Convert the instance to a JSON string
|
|
36
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
37
|
+
console.log(exampleJSON)
|
|
38
|
+
|
|
39
|
+
// Parse the JSON string back to an object
|
|
40
|
+
const exampleParsed = JSON.parse(exampleJSON) as Project
|
|
41
|
+
console.log(exampleParsed)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
# ProjectSettings
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`similarityThreshold` | number
|
|
10
|
+
`snowballingType` | string
|
|
11
|
+
`reviewMaybeAllowed` | boolean
|
|
12
|
+
`reviewDecisionMatrix` | [ReviewDecisionMatrix](ReviewDecisionMatrix.md)
|
|
13
|
+
`fetchers` | { [key: string]: { [key: string]: string; }; }
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { ProjectSettings } from '@se-uulm/snowballr-api-client'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"similarityThreshold": null,
|
|
23
|
+
"snowballingType": null,
|
|
24
|
+
"reviewMaybeAllowed": null,
|
|
25
|
+
"reviewDecisionMatrix": null,
|
|
26
|
+
"fetchers": null,
|
|
27
|
+
} satisfies ProjectSettings
|
|
28
|
+
|
|
29
|
+
console.log(example)
|
|
30
|
+
|
|
31
|
+
// Convert the instance to a JSON string
|
|
32
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
+
console.log(exampleJSON)
|
|
34
|
+
|
|
35
|
+
// Parse the JSON string back to an object
|
|
36
|
+
const exampleParsed = JSON.parse(exampleJSON) as ProjectSettings
|
|
37
|
+
console.log(exampleParsed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
41
|
+
|
|
42
|
+
|