Skip to content

Commit a034ca5

Browse files
committed
ran codegen?
1 parent 80ae7cf commit a034ca5

36 files changed

+6288
-5993
lines changed
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/* istanbul ignore file */
22
/* tslint:disable */
33
/* eslint-disable */
4-
import type { ApiResult } from "./ApiResult";
4+
import type { ApiResult } from './ApiResult';
55

66
export class ApiError extends Error {
7-
public readonly url: string;
8-
public readonly status: number;
9-
public readonly statusText: string;
10-
public readonly body: any;
7+
public readonly url: string;
8+
public readonly status: number;
9+
public readonly statusText: string;
10+
public readonly body: any;
1111

12-
constructor(response: ApiResult, message: string) {
13-
super(message);
12+
constructor(response: ApiResult, message: string) {
13+
super(message);
1414

15-
this.name = "ApiError";
16-
this.url = response.url;
17-
this.status = response.status;
18-
this.statusText = response.statusText;
19-
this.body = response.body;
20-
}
21-
}
15+
this.name = 'ApiError';
16+
this.url = response.url;
17+
this.status = response.status;
18+
this.statusText = response.statusText;
19+
this.body = response.body;
20+
}
21+
}

frontend/src/openapi/v1/core/ApiRequestOptions.ts

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,14 @@
22
/* tslint:disable */
33
/* eslint-disable */
44
export type ApiRequestOptions = {
5-
readonly method:
6-
| "GET"
7-
| "PUT"
8-
| "POST"
9-
| "DELETE"
10-
| "OPTIONS"
11-
| "HEAD"
12-
| "PATCH";
13-
readonly path: string;
14-
readonly cookies?: Record<string, any>;
15-
readonly headers?: Record<string, any>;
16-
readonly query?: Record<string, any>;
17-
readonly formData?: Record<string, any>;
18-
readonly body?: any;
19-
readonly mediaType?: string;
20-
readonly responseHeader?: string;
21-
readonly errors?: Record<number, string>;
22-
};
5+
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
6+
readonly path: string;
7+
readonly cookies?: Record<string, any>;
8+
readonly headers?: Record<string, any>;
9+
readonly query?: Record<string, any>;
10+
readonly formData?: Record<string, any>;
11+
readonly body?: any;
12+
readonly mediaType?: string;
13+
readonly responseHeader?: string;
14+
readonly errors?: Record<number, string>;
15+
}

frontend/src/openapi/v1/core/ApiResult.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
/* tslint:disable */
33
/* eslint-disable */
44
export type ApiResult = {
5-
readonly url: string;
6-
readonly ok: boolean;
7-
readonly status: number;
8-
readonly statusText: string;
9-
readonly body: any;
10-
};
5+
readonly url: string;
6+
readonly ok: boolean;
7+
readonly status: number;
8+
readonly statusText: string;
9+
readonly body: any;
10+
}

frontend/src/openapi/v1/core/CancelablePromise.ts

Lines changed: 103 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -2,112 +2,113 @@
22
/* tslint:disable */
33
/* eslint-disable */
44
export class CancelError extends Error {
5-
constructor(reason: string = "Promise was canceled") {
6-
super(reason);
7-
this.name = "CancelError";
8-
}
9-
10-
public get isCancelled(): boolean {
11-
return true;
12-
}
5+
6+
constructor(reason: string = 'Promise was canceled') {
7+
super(reason);
8+
this.name = 'CancelError';
9+
}
10+
11+
public get isCancelled(): boolean {
12+
return true;
13+
}
1314
}
1415

1516
export interface OnCancel {
16-
readonly isPending: boolean;
17-
readonly isCancelled: boolean;
17+
readonly isPending: boolean;
18+
readonly isCancelled: boolean;
1819

19-
(cancelHandler: () => void): void;
20+
(cancelHandler: () => void): void;
2021
}
2122

2223
export class CancelablePromise<T> implements Promise<T> {
23-
readonly [Symbol.toStringTag]: string;
24-
25-
#isPending: boolean;
26-
#isCancelled: boolean;
27-
readonly #cancelHandlers: (() => void)[];
28-
readonly #promise: Promise<T>;
29-
#resolve?: (value: T | PromiseLike<T>) => void;
30-
#reject?: (reason?: any) => void;
31-
32-
constructor(
33-
executor: (
34-
resolve: (value: T | PromiseLike<T>) => void,
35-
reject: (reason?: any) => void,
36-
onCancel: OnCancel
37-
) => void
38-
) {
39-
this.#isPending = true;
40-
this.#isCancelled = false;
41-
this.#cancelHandlers = [];
42-
this.#promise = new Promise<T>((resolve, reject) => {
43-
this.#resolve = resolve;
44-
this.#reject = reject;
45-
46-
const onResolve = (value: T | PromiseLike<T>): void => {
47-
if (!this.#isCancelled) {
48-
this.#isPending = false;
49-
this.#resolve?.(value);
50-
}
51-
};
52-
53-
const onReject = (reason?: any): void => {
54-
this.#isPending = false;
55-
this.#reject?.(reason);
56-
};
57-
58-
const onCancel = (cancelHandler: () => void): void => {
59-
if (this.#isPending) {
60-
this.#cancelHandlers.push(cancelHandler);
61-
}
62-
};
63-
64-
Object.defineProperty(onCancel, "isPending", {
65-
get: (): boolean => this.#isPending,
66-
});
67-
68-
Object.defineProperty(onCancel, "isCancelled", {
69-
get: (): boolean => this.#isCancelled,
70-
});
71-
72-
return executor(onResolve, onReject, onCancel as OnCancel);
73-
});
74-
}
75-
76-
public then<TResult1 = T, TResult2 = never>(
77-
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
78-
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
79-
): Promise<TResult1 | TResult2> {
80-
return this.#promise.then(onFulfilled, onRejected);
81-
}
82-
83-
public catch<TResult = never>(
84-
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null
85-
): Promise<T | TResult> {
86-
return this.#promise.catch(onRejected);
87-
}
88-
89-
public finally(onFinally?: (() => void) | null): Promise<T> {
90-
return this.#promise.finally(onFinally);
91-
}
92-
93-
public cancel(): void {
94-
if (!this.#isPending || this.#isCancelled) {
95-
return;
96-
}
97-
this.#isCancelled = true;
98-
if (this.#cancelHandlers.length) {
99-
try {
100-
for (const cancelHandler of this.#cancelHandlers) {
101-
cancelHandler();
102-
}
103-
} catch (error) {
104-
this.#reject?.(error);
105-
return;
106-
}
107-
}
108-
}
109-
110-
public get isCancelled(): boolean {
111-
return this.#isCancelled;
112-
}
113-
}
24+
readonly [Symbol.toStringTag]: string;
25+
26+
#isPending: boolean;
27+
#isCancelled: boolean;
28+
readonly #cancelHandlers: (() => void)[];
29+
readonly #promise: Promise<T>;
30+
#resolve?: (value: T | PromiseLike<T>) => void;
31+
#reject?: (reason?: any) => void;
32+
33+
constructor(
34+
executor: (
35+
resolve: (value: T | PromiseLike<T>) => void,
36+
reject: (reason?: any) => void,
37+
onCancel: OnCancel
38+
) => void
39+
) {
40+
this.#isPending = true;
41+
this.#isCancelled = false;
42+
this.#cancelHandlers = [];
43+
this.#promise = new Promise<T>((resolve, reject) => {
44+
this.#resolve = resolve;
45+
this.#reject = reject;
46+
47+
const onResolve = (value: T | PromiseLike<T>): void => {
48+
if (!this.#isCancelled) {
49+
this.#isPending = false;
50+
this.#resolve?.(value);
51+
}
52+
};
53+
54+
const onReject = (reason?: any): void => {
55+
this.#isPending = false;
56+
this.#reject?.(reason);
57+
};
58+
59+
const onCancel = (cancelHandler: () => void): void => {
60+
if (this.#isPending) {
61+
this.#cancelHandlers.push(cancelHandler);
62+
}
63+
};
64+
65+
Object.defineProperty(onCancel, 'isPending', {
66+
get: (): boolean => this.#isPending,
67+
});
68+
69+
Object.defineProperty(onCancel, 'isCancelled', {
70+
get: (): boolean => this.#isCancelled,
71+
});
72+
73+
return executor(onResolve, onReject, onCancel as OnCancel);
74+
});
75+
}
76+
77+
public then<TResult1 = T, TResult2 = never>(
78+
onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
79+
onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null
80+
): Promise<TResult1 | TResult2> {
81+
return this.#promise.then(onFulfilled, onRejected);
82+
}
83+
84+
public catch<TResult = never>(
85+
onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null
86+
): Promise<T | TResult> {
87+
return this.#promise.catch(onRejected);
88+
}
89+
90+
public finally(onFinally?: (() => void) | null): Promise<T> {
91+
return this.#promise.finally(onFinally);
92+
}
93+
94+
public cancel(): void {
95+
if (!this.#isPending || this.#isCancelled) {
96+
return;
97+
}
98+
this.#isCancelled = true;
99+
if (this.#cancelHandlers.length) {
100+
try {
101+
for (const cancelHandler of this.#cancelHandlers) {
102+
cancelHandler();
103+
}
104+
} catch (error) {
105+
this.#reject?.(error);
106+
return;
107+
}
108+
}
109+
}
110+
111+
public get isCancelled(): boolean {
112+
return this.#isCancelled;
113+
}
114+
}
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
/* istanbul ignore file */
22
/* tslint:disable */
33
/* eslint-disable */
4-
import type { ApiRequestOptions } from "./ApiRequestOptions";
4+
import type { ApiRequestOptions } from './ApiRequestOptions';
55

66
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
77
type Headers = Record<string, string>;
88

99
type Config = {
10-
BASE: string;
11-
VERSION: string;
12-
WITH_CREDENTIALS: boolean;
13-
CREDENTIALS: "include" | "omit" | "same-origin";
14-
TOKEN?: string | Resolver<string>;
15-
USERNAME?: string | Resolver<string>;
16-
PASSWORD?: string | Resolver<string>;
17-
HEADERS?: Headers | Resolver<Headers>;
18-
ENCODE_PATH?: (path: string) => string;
19-
};
10+
BASE: string;
11+
VERSION: string;
12+
WITH_CREDENTIALS: boolean;
13+
CREDENTIALS: 'include' | 'omit' | 'same-origin';
14+
TOKEN?: string | Resolver<string>;
15+
USERNAME?: string | Resolver<string>;
16+
PASSWORD?: string | Resolver<string>;
17+
HEADERS?: Headers | Resolver<Headers>;
18+
ENCODE_PATH?: (path: string) => string;
19+
}
2020

2121
export const OpenAPI: Config = {
22-
BASE: "https://clowder.ncsa.illinois.edu/clowder/api",
23-
VERSION: "1.21.0",
24-
WITH_CREDENTIALS: false,
25-
CREDENTIALS: "include",
26-
TOKEN: undefined,
27-
USERNAME: undefined,
28-
PASSWORD: undefined,
29-
HEADERS: undefined,
30-
ENCODE_PATH: undefined,
31-
};
22+
BASE: 'https://clowder.ncsa.illinois.edu/clowder/api',
23+
VERSION: '1.23.0',
24+
WITH_CREDENTIALS: false,
25+
CREDENTIALS: 'include',
26+
TOKEN: undefined,
27+
USERNAME: undefined,
28+
PASSWORD: undefined,
29+
HEADERS: undefined,
30+
ENCODE_PATH: undefined,
31+
};

0 commit comments

Comments
 (0)