@se-uulm/snowballr-api-client 0.2.1-beta.9bf37cd → 0.2.1-beta.b53578d

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.
Files changed (53) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +102 -28
  4. package/dist/apis/ProjectsControllerApi.d.ts +54 -1
  5. package/dist/apis/ProjectsControllerApi.js +56 -19
  6. package/dist/esm/apis/ProjectsControllerApi.d.ts +54 -1
  7. package/dist/esm/apis/ProjectsControllerApi.js +52 -15
  8. package/dist/esm/models/CreateProjectRequest.d.ts +0 -2
  9. package/dist/esm/models/DecisionMatrixPattern.d.ts +0 -4
  10. package/dist/esm/models/DecisionMatrixPattern.js +1 -1
  11. package/dist/esm/models/DecisionMatrixPatternEntry.d.ts +0 -4
  12. package/dist/esm/models/DecisionMatrixPatternEntry.js +1 -1
  13. package/dist/esm/models/Project.d.ts +3 -54
  14. package/dist/esm/models/Project.js +7 -22
  15. package/dist/esm/models/ProjectSettings.d.ts +60 -0
  16. package/dist/esm/models/ProjectSettings.js +58 -0
  17. package/dist/esm/models/ReviewDecisionMatrix.d.ts +0 -4
  18. package/dist/esm/models/index.d.ts +1 -0
  19. package/dist/esm/models/index.js +1 -0
  20. package/dist/esm/runtime.d.ts +34 -1
  21. package/dist/esm/runtime.js +130 -4
  22. package/dist/models/CreateProjectRequest.d.ts +0 -2
  23. package/dist/models/DecisionMatrixPattern.d.ts +0 -4
  24. package/dist/models/DecisionMatrixPattern.js +1 -1
  25. package/dist/models/DecisionMatrixPatternEntry.d.ts +0 -4
  26. package/dist/models/DecisionMatrixPatternEntry.js +1 -1
  27. package/dist/models/Project.d.ts +3 -54
  28. package/dist/models/Project.js +8 -23
  29. package/dist/models/ProjectSettings.d.ts +60 -0
  30. package/dist/models/ProjectSettings.js +66 -0
  31. package/dist/models/ReviewDecisionMatrix.d.ts +0 -4
  32. package/dist/models/index.d.ts +1 -0
  33. package/dist/models/index.js +1 -0
  34. package/dist/runtime.d.ts +34 -1
  35. package/dist/runtime.js +136 -4
  36. package/docs/CreateProjectRequest.md +34 -0
  37. package/docs/DecisionMatrixPattern.md +36 -0
  38. package/docs/DecisionMatrixPatternEntry.md +36 -0
  39. package/docs/Project.md +46 -0
  40. package/docs/ProjectSettings.md +42 -0
  41. package/docs/ProjectsControllerApi.md +264 -0
  42. package/docs/ReviewDecisionMatrix.md +36 -0
  43. package/package.json +2 -2
  44. package/src/apis/ProjectsControllerApi.ts +91 -20
  45. package/src/models/CreateProjectRequest.ts +0 -2
  46. package/src/models/DecisionMatrixPattern.ts +1 -5
  47. package/src/models/DecisionMatrixPatternEntry.ts +1 -5
  48. package/src/models/Project.ts +14 -70
  49. package/src/models/ProjectSettings.ts +107 -0
  50. package/src/models/ReviewDecisionMatrix.ts +0 -4
  51. package/src/models/index.ts +1 -0
  52. package/src/runtime.ts +146 -6
  53. package/tsconfig.json +1 -1
@@ -210,7 +210,7 @@ export class BaseAPI {
210
210
  return next;
211
211
  }
212
212
  }
213
- BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
213
+ BaseAPI.jsonRegex = /^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$/i;
214
214
  ;
215
215
  function isBlob(value) {
216
216
  return typeof Blob !== 'undefined' && value instanceof Blob;
@@ -223,6 +223,11 @@ export class ResponseError extends Error {
223
223
  super(msg);
224
224
  this.response = response;
225
225
  this.name = "ResponseError";
226
+ // restore prototype chain
227
+ const actualProto = new.target.prototype;
228
+ if (Object.setPrototypeOf) {
229
+ Object.setPrototypeOf(this, actualProto);
230
+ }
226
231
  }
227
232
  }
228
233
  export class FetchError extends Error {
@@ -230,6 +235,11 @@ export class FetchError extends Error {
230
235
  super(msg);
231
236
  this.cause = cause;
232
237
  this.name = "FetchError";
238
+ // restore prototype chain
239
+ const actualProto = new.target.prototype;
240
+ if (Object.setPrototypeOf) {
241
+ Object.setPrototypeOf(this, actualProto);
242
+ }
233
243
  }
234
244
  }
235
245
  export class RequiredError extends Error {
@@ -237,6 +247,11 @@ export class RequiredError extends Error {
237
247
  super(msg);
238
248
  this.field = field;
239
249
  this.name = "RequiredError";
250
+ // restore prototype chain
251
+ const actualProto = new.target.prototype;
252
+ if (Object.setPrototypeOf) {
253
+ Object.setPrototypeOf(this, actualProto);
254
+ }
240
255
  }
241
256
  }
242
257
  export const COLLECTION_FORMATS = {
@@ -263,7 +278,7 @@ function querystringSingleKey(key, value, keyPrefix = '') {
263
278
  return querystringSingleKey(key, valueAsArray, keyPrefix);
264
279
  }
265
280
  if (value instanceof Date) {
266
- return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
281
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(serializeDateTime(value))}`;
267
282
  }
268
283
  if (value instanceof Object) {
269
284
  return querystring(value, fullKey);
@@ -274,6 +289,52 @@ export function exists(json, key) {
274
289
  const value = json[key];
275
290
  return value !== null && value !== undefined;
276
291
  }
292
+ /**
293
+ * Every generated date call site routes through these.
294
+ *
295
+ * `format: date` is a calendar date, with no time and no offset, so it is converted
296
+ * against the local calendar on both ends: they have to agree or the date shifts by
297
+ * a day. `format: date-time` is an instant and uses UTC.
298
+ */
299
+ export function serializeDateTime(value) {
300
+ return value.toISOString();
301
+ }
302
+ export function serializeDate(value) {
303
+ if (isNaN(value.getTime())) {
304
+ throw new RangeError('Invalid time value');
305
+ }
306
+ const year = ('000' + value.getFullYear()).slice(-4);
307
+ const month = ('0' + (value.getMonth() + 1)).slice(-2);
308
+ const day = ('0' + value.getDate()).slice(-2);
309
+ return `${year}-${month}-${day}`;
310
+ }
311
+ export function parseDate(value) {
312
+ if (value instanceof Date) {
313
+ return value;
314
+ }
315
+ // `new Date("2026-08-05")` would parse as UTC midnight: a different day west of UTC.
316
+ // Local midnight is the stated day everywhere. setFullYear avoids the 1900 offset the
317
+ // multi-argument constructor applies to years 0-99.
318
+ const fullDate = /^(\d{4})-(\d{2})-(\d{2})$/.exec(String(value));
319
+ if (fullDate) {
320
+ const year = Number(fullDate[1]);
321
+ const month = Number(fullDate[2]) - 1;
322
+ const day = Number(fullDate[3]);
323
+ const date = new Date(0);
324
+ date.setFullYear(year, month, day);
325
+ date.setHours(0, 0, 0, 0);
326
+ // Out-of-range components (or a day the local zone skipped) silently roll over,
327
+ // which would hand back a date the server never sent.
328
+ if (date.getFullYear() !== year || date.getMonth() !== month || date.getDate() !== day) {
329
+ return new Date(NaN);
330
+ }
331
+ return date;
332
+ }
333
+ return new Date(value);
334
+ }
335
+ export function parseDateTime(value) {
336
+ return new Date(value);
337
+ }
277
338
  export function mapValues(data, fn) {
278
339
  const result = {};
279
340
  for (const key of Object.keys(data)) {
@@ -281,9 +342,14 @@ export function mapValues(data, fn) {
281
342
  }
282
343
  return result;
283
344
  }
345
+ // Pass-through serializer for `any`-typed properties in form data. See #1877.
346
+ export function anyToJSON(value) {
347
+ return value;
348
+ }
284
349
  export function canConsumeForm(consumes) {
350
+ var _a;
285
351
  for (const consume of consumes) {
286
- if ('multipart/form-data' === consume.contentType) {
352
+ if (((_a = consume.contentType) === null || _a === void 0 ? void 0 : _a.startsWith('multipart/form-data')) == true) {
287
353
  return true;
288
354
  }
289
355
  }
@@ -314,13 +380,73 @@ export class BlobApiResponse {
314
380
  constructor(raw) {
315
381
  this.raw = raw;
316
382
  }
383
+ /**
384
+ * The body named after the Content-Disposition header, so that a download keeps the name the
385
+ * server gave it. A File is built from a native Blob; the Blob itself is named where there is no
386
+ * global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
387
+ * native one, as returned by an injected fetch implementation such as node-fetch, which a File
388
+ * would stringify instead of wrapping.
389
+ */
317
390
  value() {
318
391
  return __awaiter(this, void 0, void 0, function* () {
319
- return yield this.raw.blob();
392
+ var _a;
393
+ const blob = yield this.raw.blob();
394
+ const name = (_a = parseContentDispositionFilename(this.raw.headers)) !== null && _a !== void 0 ? _a : '';
395
+ if (typeof File !== 'undefined' && blob instanceof Blob) {
396
+ try {
397
+ return new File([blob], name, { type: blob.type });
398
+ }
399
+ catch (_b) {
400
+ // File cannot be constructed: name the Blob itself
401
+ }
402
+ }
403
+ return Object.assign(blob, { name });
320
404
  });
321
405
  }
322
406
  ;
323
407
  }
408
+ /**
409
+ * The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
410
+ * `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
411
+ * or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
412
+ */
413
+ export function parseContentDispositionFilename(headers) {
414
+ var _a, _b;
415
+ const params = parseHeaderParameters((_a = headers.get('Content-Disposition')) !== null && _a !== void 0 ? _a : '');
416
+ return (_b = basename(decodeExtValue(params.get('filename*')))) !== null && _b !== void 0 ? _b : basename(params.get('filename'));
417
+ }
418
+ /** The decoded RFC 5987 ext-value, or undefined when it is not UTF-8 or its percent-encoding is malformed. */
419
+ function decodeExtValue(value) {
420
+ const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
421
+ try {
422
+ return match ? decodeURIComponent(match[1]) : undefined;
423
+ }
424
+ catch (_a) {
425
+ return undefined;
426
+ }
427
+ }
428
+ /**
429
+ * The `name=value` parameters of a header value, consumed one at a time so that a quoted-string is
430
+ * taken whole, `;` included. Names are lower-cased, quoted-string values are unquoted with their
431
+ * backslash escapes resolved, and the first occurrence of a name wins.
432
+ */
433
+ function parseHeaderParameters(value) {
434
+ const params = new Map();
435
+ const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
436
+ let match;
437
+ while ((match = parameter.exec(value)) !== null) {
438
+ const name = match[1].toLowerCase();
439
+ if (!params.has(name)) {
440
+ params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
441
+ }
442
+ }
443
+ return params;
444
+ }
445
+ /** The last `/` or `\` separated segment of a file name, or undefined when it is not a file name. */
446
+ function basename(name) {
447
+ const base = name === null || name === void 0 ? void 0 : name.split(/[\\/]/).pop();
448
+ return !base || base === '.' || base === '..' ? undefined : base;
449
+ }
324
450
  export class TextApiResponse {
325
451
  constructor(raw) {
326
452
  this.raw = raw;
@@ -17,8 +17,6 @@
17
17
  export interface CreateProjectRequest {
18
18
  /**
19
19
  *
20
- * @type {string}
21
- * @memberof CreateProjectRequest
22
20
  */
23
21
  name?: string;
24
22
  }
@@ -18,14 +18,10 @@ import type { DecisionMatrixPatternEntry } from './DecisionMatrixPatternEntry';
18
18
  export interface DecisionMatrixPattern {
19
19
  /**
20
20
  *
21
- * @type {string}
22
- * @memberof DecisionMatrixPattern
23
21
  */
24
22
  decision?: DecisionMatrixPatternDecisionEnum;
25
23
  /**
26
24
  *
27
- * @type {Array<DecisionMatrixPatternEntry>}
28
- * @memberof DecisionMatrixPattern
29
25
  */
30
26
  entries?: Array<DecisionMatrixPatternEntry>;
31
27
  }
@@ -27,7 +27,7 @@ exports.DecisionMatrixPatternDecisionEnum = {
27
27
  UNREVIEWED: 'UNREVIEWED',
28
28
  IN_REVIEW: 'IN_REVIEW',
29
29
  DECLINED: 'DECLINED',
30
- ACCEPTED: 'ACCEPTED'
30
+ ACCEPTED: 'ACCEPTED',
31
31
  };
32
32
  /**
33
33
  * Check if a given object implements the DecisionMatrixPattern interface.
@@ -17,14 +17,10 @@
17
17
  export interface DecisionMatrixPatternEntry {
18
18
  /**
19
19
  *
20
- * @type {string}
21
- * @memberof DecisionMatrixPatternEntry
22
20
  */
23
21
  decision?: DecisionMatrixPatternEntryDecisionEnum;
24
22
  /**
25
23
  *
26
- * @type {number}
27
- * @memberof DecisionMatrixPatternEntry
28
24
  */
29
25
  count?: number;
30
26
  }
@@ -25,7 +25,7 @@ exports.DecisionMatrixPatternEntryToJSONTyped = DecisionMatrixPatternEntryToJSON
25
25
  exports.DecisionMatrixPatternEntryDecisionEnum = {
26
26
  DECLINED: 'DECLINED',
27
27
  MAYBE: 'MAYBE',
28
- ACCEPTED: 'ACCEPTED'
28
+ ACCEPTED: 'ACCEPTED',
29
29
  };
30
30
  /**
31
31
  * Check if a given object implements the DecisionMatrixPatternEntry interface.
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { ReviewDecisionMatrix } from './ReviewDecisionMatrix';
12
+ import type { ProjectSettings } from './ProjectSettings';
13
13
  /**
14
14
  *
15
15
  * @export
@@ -18,74 +18,32 @@ import type { ReviewDecisionMatrix } from './ReviewDecisionMatrix';
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 {number}
52
- * @memberof Project
53
41
  */
54
- similarityThreshold?: number;
55
- /**
56
- *
57
- * @type {string}
58
- * @memberof Project
59
- */
60
- snowballingType?: ProjectSnowballingTypeEnum;
61
- /**
62
- *
63
- * @type {boolean}
64
- * @memberof Project
65
- */
66
- reviewMaybeAllowed?: boolean;
67
- /**
68
- *
69
- * @type {ReviewDecisionMatrix}
70
- * @memberof Project
71
- */
72
- reviewDecisionMatrix?: ReviewDecisionMatrix;
73
- /**
74
- *
75
- * @type {{ [key: string]: { [key: string]: string; }; }}
76
- * @memberof Project
77
- */
78
- fetchers?: {
79
- [key: string]: {
80
- [key: string]: string;
81
- };
82
- };
42
+ currentStageStartedAt?: Date;
83
43
  /**
84
44
  *
85
- * @type {Date}
86
- * @memberof Project
87
45
  */
88
- currentStageStartedAt?: Date;
46
+ settings?: ProjectSettings;
89
47
  }
90
48
  /**
91
49
  * @export
@@ -98,15 +56,6 @@ export declare const ProjectStatusEnum: {
98
56
  readonly CLEARED: "CLEARED";
99
57
  };
100
58
  export type ProjectStatusEnum = typeof ProjectStatusEnum[keyof typeof ProjectStatusEnum];
101
- /**
102
- * @export
103
- */
104
- export declare const ProjectSnowballingTypeEnum: {
105
- readonly FORWARD: "FORWARD";
106
- readonly BACKWARD: "BACKWARD";
107
- readonly BOTH: "BOTH";
108
- };
109
- export type ProjectSnowballingTypeEnum = typeof ProjectSnowballingTypeEnum[keyof typeof ProjectSnowballingTypeEnum];
110
59
  /**
111
60
  * Check if a given object implements the Project interface.
112
61
  */
@@ -13,13 +13,14 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ProjectSnowballingTypeEnum = exports.ProjectStatusEnum = void 0;
16
+ exports.ProjectStatusEnum = void 0;
17
17
  exports.instanceOfProject = instanceOfProject;
18
18
  exports.ProjectFromJSON = ProjectFromJSON;
19
19
  exports.ProjectFromJSONTyped = ProjectFromJSONTyped;
20
20
  exports.ProjectToJSON = ProjectToJSON;
21
21
  exports.ProjectToJSONTyped = ProjectToJSONTyped;
22
- const ReviewDecisionMatrix_1 = require("./ReviewDecisionMatrix");
22
+ const runtime_1 = require("../runtime");
23
+ const ProjectSettings_1 = require("./ProjectSettings");
23
24
  /**
24
25
  * @export
25
26
  */
@@ -28,15 +29,7 @@ exports.ProjectStatusEnum = {
28
29
  ACTIVE_LOCKED: 'ACTIVE_LOCKED',
29
30
  ARCHIVED: 'ARCHIVED',
30
31
  DELETED: 'DELETED',
31
- CLEARED: 'CLEARED'
32
- };
33
- /**
34
- * @export
35
- */
36
- exports.ProjectSnowballingTypeEnum = {
37
- FORWARD: 'FORWARD',
38
- BACKWARD: 'BACKWARD',
39
- BOTH: 'BOTH'
32
+ CLEARED: 'CLEARED',
40
33
  };
41
34
  /**
42
35
  * Check if a given object implements the Project interface.
@@ -57,12 +50,8 @@ function ProjectFromJSONTyped(json, ignoreDiscriminator) {
57
50
  'status': json['status'] == null ? undefined : json['status'],
58
51
  'currentStage': json['currentStage'] == null ? undefined : json['currentStage'],
59
52
  'maxStage': json['maxStage'] == null ? undefined : json['maxStage'],
60
- 'similarityThreshold': json['similarityThreshold'] == null ? undefined : json['similarityThreshold'],
61
- 'snowballingType': json['snowballingType'] == null ? undefined : json['snowballingType'],
62
- 'reviewMaybeAllowed': json['reviewMaybeAllowed'] == null ? undefined : json['reviewMaybeAllowed'],
63
- 'reviewDecisionMatrix': json['reviewDecisionMatrix'] == null ? undefined : (0, ReviewDecisionMatrix_1.ReviewDecisionMatrixFromJSON)(json['reviewDecisionMatrix']),
64
- 'fetchers': json['fetchers'] == null ? undefined : json['fetchers'],
65
- 'currentStageStartedAt': json['currentStageStartedAt'] == null ? undefined : (new Date(json['currentStageStartedAt'])),
53
+ 'currentStageStartedAt': json['currentStageStartedAt'] == null ? undefined : ((0, runtime_1.parseDateTime)(json['currentStageStartedAt'])),
54
+ 'settings': json['settings'] == null ? undefined : (0, ProjectSettings_1.ProjectSettingsFromJSON)(json['settings']),
66
55
  };
67
56
  }
68
57
  function ProjectToJSON(json) {
@@ -78,11 +67,7 @@ function ProjectToJSONTyped(value, ignoreDiscriminator = false) {
78
67
  'status': value['status'],
79
68
  'currentStage': value['currentStage'],
80
69
  'maxStage': value['maxStage'],
81
- 'similarityThreshold': value['similarityThreshold'],
82
- 'snowballingType': value['snowballingType'],
83
- 'reviewMaybeAllowed': value['reviewMaybeAllowed'],
84
- 'reviewDecisionMatrix': (0, ReviewDecisionMatrix_1.ReviewDecisionMatrixToJSON)(value['reviewDecisionMatrix']),
85
- 'fetchers': value['fetchers'],
86
- 'currentStageStartedAt': value['currentStageStartedAt'] == null ? undefined : ((value['currentStageStartedAt']).toISOString()),
70
+ 'currentStageStartedAt': value['currentStageStartedAt'] == null ? value['currentStageStartedAt'] : (0, runtime_1.serializeDateTime)(value['currentStageStartedAt']),
71
+ 'settings': (0, ProjectSettings_1.ProjectSettingsToJSON)(value['settings']),
87
72
  };
88
73
  }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * SnowballR API
3
+ * REST API for the SnowballR Application
4
+ *
5
+ * The version of the OpenAPI document: v1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { ReviewDecisionMatrix } from './ReviewDecisionMatrix';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ProjectSettings
17
+ */
18
+ export interface ProjectSettings {
19
+ /**
20
+ *
21
+ */
22
+ similarityThreshold?: number;
23
+ /**
24
+ *
25
+ */
26
+ snowballingType?: ProjectSettingsSnowballingTypeEnum;
27
+ /**
28
+ *
29
+ */
30
+ reviewMaybeAllowed?: boolean;
31
+ /**
32
+ *
33
+ */
34
+ reviewDecisionMatrix?: ReviewDecisionMatrix;
35
+ /**
36
+ *
37
+ */
38
+ fetchers?: {
39
+ [key: string]: {
40
+ [key: string]: string;
41
+ };
42
+ };
43
+ }
44
+ /**
45
+ * @export
46
+ */
47
+ export declare const ProjectSettingsSnowballingTypeEnum: {
48
+ readonly FORWARD: "FORWARD";
49
+ readonly BACKWARD: "BACKWARD";
50
+ readonly BOTH: "BOTH";
51
+ };
52
+ export type ProjectSettingsSnowballingTypeEnum = typeof ProjectSettingsSnowballingTypeEnum[keyof typeof ProjectSettingsSnowballingTypeEnum];
53
+ /**
54
+ * Check if a given object implements the ProjectSettings interface.
55
+ */
56
+ export declare function instanceOfProjectSettings(value: object): value is ProjectSettings;
57
+ export declare function ProjectSettingsFromJSON(json: any): ProjectSettings;
58
+ export declare function ProjectSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectSettings;
59
+ export declare function ProjectSettingsToJSON(json: any): ProjectSettings;
60
+ export declare function ProjectSettingsToJSONTyped(value?: ProjectSettings | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * SnowballR API
6
+ * REST API for the SnowballR Application
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ProjectSettingsSnowballingTypeEnum = void 0;
17
+ exports.instanceOfProjectSettings = instanceOfProjectSettings;
18
+ exports.ProjectSettingsFromJSON = ProjectSettingsFromJSON;
19
+ exports.ProjectSettingsFromJSONTyped = ProjectSettingsFromJSONTyped;
20
+ exports.ProjectSettingsToJSON = ProjectSettingsToJSON;
21
+ exports.ProjectSettingsToJSONTyped = ProjectSettingsToJSONTyped;
22
+ const ReviewDecisionMatrix_1 = require("./ReviewDecisionMatrix");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.ProjectSettingsSnowballingTypeEnum = {
27
+ FORWARD: 'FORWARD',
28
+ BACKWARD: 'BACKWARD',
29
+ BOTH: 'BOTH',
30
+ };
31
+ /**
32
+ * Check if a given object implements the ProjectSettings interface.
33
+ */
34
+ function instanceOfProjectSettings(value) {
35
+ return true;
36
+ }
37
+ function ProjectSettingsFromJSON(json) {
38
+ return ProjectSettingsFromJSONTyped(json, false);
39
+ }
40
+ function ProjectSettingsFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'similarityThreshold': json['similarityThreshold'] == null ? undefined : json['similarityThreshold'],
46
+ 'snowballingType': json['snowballingType'] == null ? undefined : json['snowballingType'],
47
+ 'reviewMaybeAllowed': json['reviewMaybeAllowed'] == null ? undefined : json['reviewMaybeAllowed'],
48
+ 'reviewDecisionMatrix': json['reviewDecisionMatrix'] == null ? undefined : (0, ReviewDecisionMatrix_1.ReviewDecisionMatrixFromJSON)(json['reviewDecisionMatrix']),
49
+ 'fetchers': json['fetchers'] == null ? undefined : json['fetchers'],
50
+ };
51
+ }
52
+ function ProjectSettingsToJSON(json) {
53
+ return ProjectSettingsToJSONTyped(json, false);
54
+ }
55
+ function ProjectSettingsToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'similarityThreshold': value['similarityThreshold'],
61
+ 'snowballingType': value['snowballingType'],
62
+ 'reviewMaybeAllowed': value['reviewMaybeAllowed'],
63
+ 'reviewDecisionMatrix': (0, ReviewDecisionMatrix_1.ReviewDecisionMatrixToJSON)(value['reviewDecisionMatrix']),
64
+ 'fetchers': value['fetchers'],
65
+ };
66
+ }
@@ -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
  }
@@ -2,4 +2,5 @@ export * from './CreateProjectRequest';
2
2
  export * from './DecisionMatrixPattern';
3
3
  export * from './DecisionMatrixPatternEntry';
4
4
  export * from './Project';
5
+ export * from './ProjectSettings';
5
6
  export * from './ReviewDecisionMatrix';
@@ -20,4 +20,5 @@ __exportStar(require("./CreateProjectRequest"), exports);
20
20
  __exportStar(require("./DecisionMatrixPattern"), exports);
21
21
  __exportStar(require("./DecisionMatrixPatternEntry"), exports);
22
22
  __exportStar(require("./Project"), exports);
23
+ __exportStar(require("./ProjectSettings"), exports);
23
24
  __exportStar(require("./ReviewDecisionMatrix"), exports);
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
- value(): Promise<Blob>;
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);