kleisterjs 1.0.0
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/.codacy.yml +6 -0
- package/.editorconfig +24 -0
- package/.github/issue_template.md +9 -0
- package/.github/pull_request_template.md +8 -0
- package/.github/renovate.json +6 -0
- package/.github/semantic.yml +23 -0
- package/.github/settings.yml +44 -0
- package/.github/workflows/automerge.yml +49 -0
- package/.github/workflows/flake.yml +56 -0
- package/.github/workflows/general.yml +39 -0
- package/.github/workflows/openapi.yml +74 -0
- package/.github/workflows/release.yml +56 -0
- package/.openapi-generator/FILES +94 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +3 -0
- package/.releaserc +195 -0
- package/CHANGELOG.md +17 -0
- package/CONTRIBUTING.md +121 -0
- package/DCO +34 -0
- package/LICENSE +202 -0
- package/README.md +88 -0
- package/api/auth-api.ts +743 -0
- package/api/fabric-api.ts +943 -0
- package/api/forge-api.ts +942 -0
- package/api/minecraft-api.ts +949 -0
- package/api/mod-api.ts +4028 -0
- package/api/neoforge-api.ts +945 -0
- package/api/pack-api.ts +4007 -0
- package/api/profile-api.ts +431 -0
- package/api/quilt-api.ts +942 -0
- package/api/team-api.ts +3216 -0
- package/api/user-api.ts +3210 -0
- package/api.ts +25 -0
- package/base.ts +91 -0
- package/common.ts +203 -0
- package/configuration.ts +132 -0
- package/flake.lock +472 -0
- package/flake.nix +59 -0
- package/hack/generate-client.sh +36 -0
- package/hack/openapi/templates/README.mustache +93 -0
- package/hack/openapi/templates/gitignore +6 -0
- package/index.ts +17 -0
- package/model/auth-login.ts +33 -0
- package/model/auth-token.ts +33 -0
- package/model/auth-verify.ts +33 -0
- package/model/build-version-params.ts +33 -0
- package/model/build-version.ts +64 -0
- package/model/build-versions.ts +55 -0
- package/model/build.ts +169 -0
- package/model/builds.ts +46 -0
- package/model/fabric-build-params.ts +33 -0
- package/model/fabric-builds.ts +46 -0
- package/model/fabric.ts +45 -0
- package/model/fabrics.ts +37 -0
- package/model/forge-build-params.ts +33 -0
- package/model/forge-builds.ts +46 -0
- package/model/forge.ts +51 -0
- package/model/forges.ts +37 -0
- package/model/index.ts +73 -0
- package/model/minecraft-build-params.ts +33 -0
- package/model/minecraft-builds.ts +46 -0
- package/model/minecraft.ts +51 -0
- package/model/minecrafts.ts +37 -0
- package/model/mod-team-params.ts +42 -0
- package/model/mod-teams.ts +46 -0
- package/model/mod-user-params.ts +42 -0
- package/model/mod-users.ts +46 -0
- package/model/mod.ts +123 -0
- package/model/mods.ts +37 -0
- package/model/neoforge-build-params.ts +33 -0
- package/model/neoforge-builds.ts +46 -0
- package/model/neoforge.ts +51 -0
- package/model/neoforges.ts +37 -0
- package/model/notification.ts +43 -0
- package/model/pack-back.ts +91 -0
- package/model/pack-icon.ts +91 -0
- package/model/pack-logo.ts +91 -0
- package/model/pack-team-params.ts +42 -0
- package/model/pack-teams.ts +46 -0
- package/model/pack-user-params.ts +42 -0
- package/model/pack-users.ts +46 -0
- package/model/pack.ts +142 -0
- package/model/packs.ts +37 -0
- package/model/profile.ts +118 -0
- package/model/quilt-build-params.ts +33 -0
- package/model/quilt-builds.ts +46 -0
- package/model/quilt.ts +45 -0
- package/model/quilts.ts +37 -0
- package/model/team-mod-params.ts +42 -0
- package/model/team-mod.ts +79 -0
- package/model/team-mods.ts +46 -0
- package/model/team-pack-params.ts +42 -0
- package/model/team-pack.ts +79 -0
- package/model/team-packs.ts +46 -0
- package/model/team-user-params.ts +42 -0
- package/model/team-users.ts +46 -0
- package/model/team.ts +79 -0
- package/model/teams.ts +37 -0
- package/model/user-auth.ts +45 -0
- package/model/user-mod-params.ts +42 -0
- package/model/user-mod.ts +79 -0
- package/model/user-mods.ts +46 -0
- package/model/user-pack-params.ts +42 -0
- package/model/user-pack.ts +79 -0
- package/model/user-packs.ts +46 -0
- package/model/user-team-params.ts +42 -0
- package/model/user-team.ts +79 -0
- package/model/user-teams.ts +46 -0
- package/model/user.ts +118 -0
- package/model/users.ts +37 -0
- package/model/validation.ts +33 -0
- package/model/version-build-params.ts +33 -0
- package/model/version-builds.ts +55 -0
- package/model/version-file.ts +91 -0
- package/model/version.ts +91 -0
- package/model/versions.ts +46 -0
- package/openapi.yml +12 -0
- package/openapitools.json +7 -0
- package/package.json +41 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +18 -0
package/api/auth-api.ts
ADDED
|
@@ -0,0 +1,743 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Kleister OpenAPI
|
|
5
|
+
* API definition for Kleister, manage mod packs for Minecraft
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0-alpha1
|
|
8
|
+
* Contact: kleister@webhippie.de
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { Configuration } from "../configuration";
|
|
16
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from "axios";
|
|
17
|
+
import globalAxios from "axios";
|
|
18
|
+
// URLSearchParams not necessarily used
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { URL, URLSearchParams } from "url";
|
|
21
|
+
// Some imports not used depending on template conditions
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import {
|
|
24
|
+
DUMMY_BASE_URL,
|
|
25
|
+
assertParamExists,
|
|
26
|
+
setApiKeyToObject,
|
|
27
|
+
setBasicAuthToObject,
|
|
28
|
+
setBearerAuthToObject,
|
|
29
|
+
setOAuthToObject,
|
|
30
|
+
setSearchParams,
|
|
31
|
+
serializeDataIfNeeded,
|
|
32
|
+
toPathString,
|
|
33
|
+
createRequestFunction,
|
|
34
|
+
} from "../common";
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
import {
|
|
37
|
+
BASE_PATH,
|
|
38
|
+
COLLECTION_FORMATS,
|
|
39
|
+
type RequestArgs,
|
|
40
|
+
BaseAPI,
|
|
41
|
+
RequiredError,
|
|
42
|
+
operationServerMap,
|
|
43
|
+
} from "../base";
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
import type { AuthLogin } from "../model";
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
import type { AuthToken } from "../model";
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
import type { AuthVerify } from "../model";
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
import type { Notification } from "../model";
|
|
52
|
+
/**
|
|
53
|
+
* AuthApi - axios parameter creator
|
|
54
|
+
* @export
|
|
55
|
+
*/
|
|
56
|
+
export const AuthApiAxiosParamCreator = function (
|
|
57
|
+
configuration?: Configuration,
|
|
58
|
+
) {
|
|
59
|
+
return {
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @summary Callback for external authentication
|
|
63
|
+
* @param {string} provider An identifier for the auth provider
|
|
64
|
+
* @param {string} [state] Auth state
|
|
65
|
+
* @param {string} [code] Auth code
|
|
66
|
+
* @param {*} [options] Override http request option.
|
|
67
|
+
* @throws {RequiredError}
|
|
68
|
+
*/
|
|
69
|
+
externalCallback: async (
|
|
70
|
+
provider: string,
|
|
71
|
+
state?: string,
|
|
72
|
+
code?: string,
|
|
73
|
+
options: RawAxiosRequestConfig = {},
|
|
74
|
+
): Promise<RequestArgs> => {
|
|
75
|
+
// verify required parameter 'provider' is not null or undefined
|
|
76
|
+
assertParamExists("externalCallback", "provider", provider);
|
|
77
|
+
const localVarPath = `/auth/{provider}/callback`.replace(
|
|
78
|
+
`{${"provider"}}`,
|
|
79
|
+
encodeURIComponent(String(provider)),
|
|
80
|
+
);
|
|
81
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
82
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
83
|
+
let baseOptions;
|
|
84
|
+
if (configuration) {
|
|
85
|
+
baseOptions = configuration.baseOptions;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const localVarRequestOptions = {
|
|
89
|
+
method: "GET",
|
|
90
|
+
...baseOptions,
|
|
91
|
+
...options,
|
|
92
|
+
};
|
|
93
|
+
const localVarHeaderParameter = {} as any;
|
|
94
|
+
const localVarQueryParameter = {} as any;
|
|
95
|
+
|
|
96
|
+
if (state !== undefined) {
|
|
97
|
+
localVarQueryParameter["state"] = state;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (code !== undefined) {
|
|
101
|
+
localVarQueryParameter["code"] = code;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
105
|
+
let headersFromBaseOptions =
|
|
106
|
+
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
107
|
+
localVarRequestOptions.headers = {
|
|
108
|
+
...localVarHeaderParameter,
|
|
109
|
+
...headersFromBaseOptions,
|
|
110
|
+
...options.headers,
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
url: toPathString(localVarUrlObj),
|
|
115
|
+
options: localVarRequestOptions,
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @summary Initialize the external authentication
|
|
121
|
+
* @param {string} provider An identifier for the auth provider
|
|
122
|
+
* @param {string} [state] Auth state
|
|
123
|
+
* @param {*} [options] Override http request option.
|
|
124
|
+
* @throws {RequiredError}
|
|
125
|
+
*/
|
|
126
|
+
externalInitialize: async (
|
|
127
|
+
provider: string,
|
|
128
|
+
state?: string,
|
|
129
|
+
options: RawAxiosRequestConfig = {},
|
|
130
|
+
): Promise<RequestArgs> => {
|
|
131
|
+
// verify required parameter 'provider' is not null or undefined
|
|
132
|
+
assertParamExists("externalInitialize", "provider", provider);
|
|
133
|
+
const localVarPath = `/auth/{provider}/initialize`.replace(
|
|
134
|
+
`{${"provider"}}`,
|
|
135
|
+
encodeURIComponent(String(provider)),
|
|
136
|
+
);
|
|
137
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
138
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
139
|
+
let baseOptions;
|
|
140
|
+
if (configuration) {
|
|
141
|
+
baseOptions = configuration.baseOptions;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const localVarRequestOptions = {
|
|
145
|
+
method: "GET",
|
|
146
|
+
...baseOptions,
|
|
147
|
+
...options,
|
|
148
|
+
};
|
|
149
|
+
const localVarHeaderParameter = {} as any;
|
|
150
|
+
const localVarQueryParameter = {} as any;
|
|
151
|
+
|
|
152
|
+
if (state !== undefined) {
|
|
153
|
+
localVarQueryParameter["state"] = state;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
157
|
+
let headersFromBaseOptions =
|
|
158
|
+
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
159
|
+
localVarRequestOptions.headers = {
|
|
160
|
+
...localVarHeaderParameter,
|
|
161
|
+
...headersFromBaseOptions,
|
|
162
|
+
...options.headers,
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
return {
|
|
166
|
+
url: toPathString(localVarUrlObj),
|
|
167
|
+
options: localVarRequestOptions,
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
/**
|
|
171
|
+
*
|
|
172
|
+
* @summary Authenticate an user by credentials
|
|
173
|
+
* @param {AuthLogin} authLogin The credentials to authenticate
|
|
174
|
+
* @param {*} [options] Override http request option.
|
|
175
|
+
* @throws {RequiredError}
|
|
176
|
+
*/
|
|
177
|
+
loginAuth: async (
|
|
178
|
+
authLogin: AuthLogin,
|
|
179
|
+
options: RawAxiosRequestConfig = {},
|
|
180
|
+
): Promise<RequestArgs> => {
|
|
181
|
+
// verify required parameter 'authLogin' is not null or undefined
|
|
182
|
+
assertParamExists("loginAuth", "authLogin", authLogin);
|
|
183
|
+
const localVarPath = `/auth/login`;
|
|
184
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
185
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
186
|
+
let baseOptions;
|
|
187
|
+
if (configuration) {
|
|
188
|
+
baseOptions = configuration.baseOptions;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const localVarRequestOptions = {
|
|
192
|
+
method: "POST",
|
|
193
|
+
...baseOptions,
|
|
194
|
+
...options,
|
|
195
|
+
};
|
|
196
|
+
const localVarHeaderParameter = {} as any;
|
|
197
|
+
const localVarQueryParameter = {} as any;
|
|
198
|
+
|
|
199
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
200
|
+
|
|
201
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
202
|
+
let headersFromBaseOptions =
|
|
203
|
+
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
204
|
+
localVarRequestOptions.headers = {
|
|
205
|
+
...localVarHeaderParameter,
|
|
206
|
+
...headersFromBaseOptions,
|
|
207
|
+
...options.headers,
|
|
208
|
+
};
|
|
209
|
+
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
210
|
+
authLogin,
|
|
211
|
+
localVarRequestOptions,
|
|
212
|
+
configuration,
|
|
213
|
+
);
|
|
214
|
+
|
|
215
|
+
return {
|
|
216
|
+
url: toPathString(localVarUrlObj),
|
|
217
|
+
options: localVarRequestOptions,
|
|
218
|
+
};
|
|
219
|
+
},
|
|
220
|
+
/**
|
|
221
|
+
*
|
|
222
|
+
* @summary Refresh an auth token before it expires
|
|
223
|
+
* @param {*} [options] Override http request option.
|
|
224
|
+
* @throws {RequiredError}
|
|
225
|
+
*/
|
|
226
|
+
refreshAuth: async (
|
|
227
|
+
options: RawAxiosRequestConfig = {},
|
|
228
|
+
): Promise<RequestArgs> => {
|
|
229
|
+
const localVarPath = `/auth/refresh`;
|
|
230
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
231
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
232
|
+
let baseOptions;
|
|
233
|
+
if (configuration) {
|
|
234
|
+
baseOptions = configuration.baseOptions;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const localVarRequestOptions = {
|
|
238
|
+
method: "GET",
|
|
239
|
+
...baseOptions,
|
|
240
|
+
...options,
|
|
241
|
+
};
|
|
242
|
+
const localVarHeaderParameter = {} as any;
|
|
243
|
+
const localVarQueryParameter = {} as any;
|
|
244
|
+
|
|
245
|
+
// authentication Cookie required
|
|
246
|
+
await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
|
|
247
|
+
|
|
248
|
+
// authentication Basic required
|
|
249
|
+
// http basic authentication required
|
|
250
|
+
setBasicAuthToObject(localVarRequestOptions, configuration);
|
|
251
|
+
|
|
252
|
+
// authentication Header required
|
|
253
|
+
await setApiKeyToObject(
|
|
254
|
+
localVarHeaderParameter,
|
|
255
|
+
"X-API-Key",
|
|
256
|
+
configuration,
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
// authentication Bearer required
|
|
260
|
+
// http bearer authentication required
|
|
261
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
262
|
+
|
|
263
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
264
|
+
let headersFromBaseOptions =
|
|
265
|
+
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
266
|
+
localVarRequestOptions.headers = {
|
|
267
|
+
...localVarHeaderParameter,
|
|
268
|
+
...headersFromBaseOptions,
|
|
269
|
+
...options.headers,
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
return {
|
|
273
|
+
url: toPathString(localVarUrlObj),
|
|
274
|
+
options: localVarRequestOptions,
|
|
275
|
+
};
|
|
276
|
+
},
|
|
277
|
+
/**
|
|
278
|
+
*
|
|
279
|
+
* @summary Verify validity for an authentication token
|
|
280
|
+
* @param {*} [options] Override http request option.
|
|
281
|
+
* @throws {RequiredError}
|
|
282
|
+
*/
|
|
283
|
+
verifyAuth: async (
|
|
284
|
+
options: RawAxiosRequestConfig = {},
|
|
285
|
+
): Promise<RequestArgs> => {
|
|
286
|
+
const localVarPath = `/auth/verify`;
|
|
287
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
288
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
289
|
+
let baseOptions;
|
|
290
|
+
if (configuration) {
|
|
291
|
+
baseOptions = configuration.baseOptions;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const localVarRequestOptions = {
|
|
295
|
+
method: "GET",
|
|
296
|
+
...baseOptions,
|
|
297
|
+
...options,
|
|
298
|
+
};
|
|
299
|
+
const localVarHeaderParameter = {} as any;
|
|
300
|
+
const localVarQueryParameter = {} as any;
|
|
301
|
+
|
|
302
|
+
// authentication Cookie required
|
|
303
|
+
await setApiKeyToObject(localVarHeaderParameter, "Cookie", configuration);
|
|
304
|
+
|
|
305
|
+
// authentication Basic required
|
|
306
|
+
// http basic authentication required
|
|
307
|
+
setBasicAuthToObject(localVarRequestOptions, configuration);
|
|
308
|
+
|
|
309
|
+
// authentication Header required
|
|
310
|
+
await setApiKeyToObject(
|
|
311
|
+
localVarHeaderParameter,
|
|
312
|
+
"X-API-Key",
|
|
313
|
+
configuration,
|
|
314
|
+
);
|
|
315
|
+
|
|
316
|
+
// authentication Bearer required
|
|
317
|
+
// http bearer authentication required
|
|
318
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
319
|
+
|
|
320
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
321
|
+
let headersFromBaseOptions =
|
|
322
|
+
baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
323
|
+
localVarRequestOptions.headers = {
|
|
324
|
+
...localVarHeaderParameter,
|
|
325
|
+
...headersFromBaseOptions,
|
|
326
|
+
...options.headers,
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
return {
|
|
330
|
+
url: toPathString(localVarUrlObj),
|
|
331
|
+
options: localVarRequestOptions,
|
|
332
|
+
};
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* AuthApi - functional programming interface
|
|
339
|
+
* @export
|
|
340
|
+
*/
|
|
341
|
+
export const AuthApiFp = function (configuration?: Configuration) {
|
|
342
|
+
const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration);
|
|
343
|
+
return {
|
|
344
|
+
/**
|
|
345
|
+
*
|
|
346
|
+
* @summary Callback for external authentication
|
|
347
|
+
* @param {string} provider An identifier for the auth provider
|
|
348
|
+
* @param {string} [state] Auth state
|
|
349
|
+
* @param {string} [code] Auth code
|
|
350
|
+
* @param {*} [options] Override http request option.
|
|
351
|
+
* @throws {RequiredError}
|
|
352
|
+
*/
|
|
353
|
+
async externalCallback(
|
|
354
|
+
provider: string,
|
|
355
|
+
state?: string,
|
|
356
|
+
code?: string,
|
|
357
|
+
options?: RawAxiosRequestConfig,
|
|
358
|
+
): Promise<
|
|
359
|
+
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
|
|
360
|
+
> {
|
|
361
|
+
const localVarAxiosArgs =
|
|
362
|
+
await localVarAxiosParamCreator.externalCallback(
|
|
363
|
+
provider,
|
|
364
|
+
state,
|
|
365
|
+
code,
|
|
366
|
+
options,
|
|
367
|
+
);
|
|
368
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
369
|
+
const localVarOperationServerBasePath =
|
|
370
|
+
operationServerMap["AuthApi.externalCallback"]?.[
|
|
371
|
+
localVarOperationServerIndex
|
|
372
|
+
]?.url;
|
|
373
|
+
return (axios, basePath) =>
|
|
374
|
+
createRequestFunction(
|
|
375
|
+
localVarAxiosArgs,
|
|
376
|
+
globalAxios,
|
|
377
|
+
BASE_PATH,
|
|
378
|
+
configuration,
|
|
379
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
380
|
+
},
|
|
381
|
+
/**
|
|
382
|
+
*
|
|
383
|
+
* @summary Initialize the external authentication
|
|
384
|
+
* @param {string} provider An identifier for the auth provider
|
|
385
|
+
* @param {string} [state] Auth state
|
|
386
|
+
* @param {*} [options] Override http request option.
|
|
387
|
+
* @throws {RequiredError}
|
|
388
|
+
*/
|
|
389
|
+
async externalInitialize(
|
|
390
|
+
provider: string,
|
|
391
|
+
state?: string,
|
|
392
|
+
options?: RawAxiosRequestConfig,
|
|
393
|
+
): Promise<
|
|
394
|
+
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Notification>
|
|
395
|
+
> {
|
|
396
|
+
const localVarAxiosArgs =
|
|
397
|
+
await localVarAxiosParamCreator.externalInitialize(
|
|
398
|
+
provider,
|
|
399
|
+
state,
|
|
400
|
+
options,
|
|
401
|
+
);
|
|
402
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
403
|
+
const localVarOperationServerBasePath =
|
|
404
|
+
operationServerMap["AuthApi.externalInitialize"]?.[
|
|
405
|
+
localVarOperationServerIndex
|
|
406
|
+
]?.url;
|
|
407
|
+
return (axios, basePath) =>
|
|
408
|
+
createRequestFunction(
|
|
409
|
+
localVarAxiosArgs,
|
|
410
|
+
globalAxios,
|
|
411
|
+
BASE_PATH,
|
|
412
|
+
configuration,
|
|
413
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
414
|
+
},
|
|
415
|
+
/**
|
|
416
|
+
*
|
|
417
|
+
* @summary Authenticate an user by credentials
|
|
418
|
+
* @param {AuthLogin} authLogin The credentials to authenticate
|
|
419
|
+
* @param {*} [options] Override http request option.
|
|
420
|
+
* @throws {RequiredError}
|
|
421
|
+
*/
|
|
422
|
+
async loginAuth(
|
|
423
|
+
authLogin: AuthLogin,
|
|
424
|
+
options?: RawAxiosRequestConfig,
|
|
425
|
+
): Promise<
|
|
426
|
+
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthToken>
|
|
427
|
+
> {
|
|
428
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.loginAuth(
|
|
429
|
+
authLogin,
|
|
430
|
+
options,
|
|
431
|
+
);
|
|
432
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
433
|
+
const localVarOperationServerBasePath =
|
|
434
|
+
operationServerMap["AuthApi.loginAuth"]?.[localVarOperationServerIndex]
|
|
435
|
+
?.url;
|
|
436
|
+
return (axios, basePath) =>
|
|
437
|
+
createRequestFunction(
|
|
438
|
+
localVarAxiosArgs,
|
|
439
|
+
globalAxios,
|
|
440
|
+
BASE_PATH,
|
|
441
|
+
configuration,
|
|
442
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
443
|
+
},
|
|
444
|
+
/**
|
|
445
|
+
*
|
|
446
|
+
* @summary Refresh an auth token before it expires
|
|
447
|
+
* @param {*} [options] Override http request option.
|
|
448
|
+
* @throws {RequiredError}
|
|
449
|
+
*/
|
|
450
|
+
async refreshAuth(
|
|
451
|
+
options?: RawAxiosRequestConfig,
|
|
452
|
+
): Promise<
|
|
453
|
+
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthToken>
|
|
454
|
+
> {
|
|
455
|
+
const localVarAxiosArgs =
|
|
456
|
+
await localVarAxiosParamCreator.refreshAuth(options);
|
|
457
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
458
|
+
const localVarOperationServerBasePath =
|
|
459
|
+
operationServerMap["AuthApi.refreshAuth"]?.[
|
|
460
|
+
localVarOperationServerIndex
|
|
461
|
+
]?.url;
|
|
462
|
+
return (axios, basePath) =>
|
|
463
|
+
createRequestFunction(
|
|
464
|
+
localVarAxiosArgs,
|
|
465
|
+
globalAxios,
|
|
466
|
+
BASE_PATH,
|
|
467
|
+
configuration,
|
|
468
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
469
|
+
},
|
|
470
|
+
/**
|
|
471
|
+
*
|
|
472
|
+
* @summary Verify validity for an authentication token
|
|
473
|
+
* @param {*} [options] Override http request option.
|
|
474
|
+
* @throws {RequiredError}
|
|
475
|
+
*/
|
|
476
|
+
async verifyAuth(
|
|
477
|
+
options?: RawAxiosRequestConfig,
|
|
478
|
+
): Promise<
|
|
479
|
+
(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthVerify>
|
|
480
|
+
> {
|
|
481
|
+
const localVarAxiosArgs =
|
|
482
|
+
await localVarAxiosParamCreator.verifyAuth(options);
|
|
483
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
484
|
+
const localVarOperationServerBasePath =
|
|
485
|
+
operationServerMap["AuthApi.verifyAuth"]?.[localVarOperationServerIndex]
|
|
486
|
+
?.url;
|
|
487
|
+
return (axios, basePath) =>
|
|
488
|
+
createRequestFunction(
|
|
489
|
+
localVarAxiosArgs,
|
|
490
|
+
globalAxios,
|
|
491
|
+
BASE_PATH,
|
|
492
|
+
configuration,
|
|
493
|
+
)(axios, localVarOperationServerBasePath || basePath);
|
|
494
|
+
},
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* AuthApi - factory interface
|
|
500
|
+
* @export
|
|
501
|
+
*/
|
|
502
|
+
export const AuthApiFactory = function (
|
|
503
|
+
configuration?: Configuration,
|
|
504
|
+
basePath?: string,
|
|
505
|
+
axios?: AxiosInstance,
|
|
506
|
+
) {
|
|
507
|
+
const localVarFp = AuthApiFp(configuration);
|
|
508
|
+
return {
|
|
509
|
+
/**
|
|
510
|
+
*
|
|
511
|
+
* @summary Callback for external authentication
|
|
512
|
+
* @param {AuthApiExternalCallbackRequest} requestParameters Request parameters.
|
|
513
|
+
* @param {*} [options] Override http request option.
|
|
514
|
+
* @throws {RequiredError}
|
|
515
|
+
*/
|
|
516
|
+
externalCallback(
|
|
517
|
+
requestParameters: AuthApiExternalCallbackRequest,
|
|
518
|
+
options?: RawAxiosRequestConfig,
|
|
519
|
+
): AxiosPromise<Notification> {
|
|
520
|
+
return localVarFp
|
|
521
|
+
.externalCallback(
|
|
522
|
+
requestParameters.provider,
|
|
523
|
+
requestParameters.state,
|
|
524
|
+
requestParameters.code,
|
|
525
|
+
options,
|
|
526
|
+
)
|
|
527
|
+
.then((request) => request(axios, basePath));
|
|
528
|
+
},
|
|
529
|
+
/**
|
|
530
|
+
*
|
|
531
|
+
* @summary Initialize the external authentication
|
|
532
|
+
* @param {AuthApiExternalInitializeRequest} requestParameters Request parameters.
|
|
533
|
+
* @param {*} [options] Override http request option.
|
|
534
|
+
* @throws {RequiredError}
|
|
535
|
+
*/
|
|
536
|
+
externalInitialize(
|
|
537
|
+
requestParameters: AuthApiExternalInitializeRequest,
|
|
538
|
+
options?: RawAxiosRequestConfig,
|
|
539
|
+
): AxiosPromise<Notification> {
|
|
540
|
+
return localVarFp
|
|
541
|
+
.externalInitialize(
|
|
542
|
+
requestParameters.provider,
|
|
543
|
+
requestParameters.state,
|
|
544
|
+
options,
|
|
545
|
+
)
|
|
546
|
+
.then((request) => request(axios, basePath));
|
|
547
|
+
},
|
|
548
|
+
/**
|
|
549
|
+
*
|
|
550
|
+
* @summary Authenticate an user by credentials
|
|
551
|
+
* @param {AuthApiLoginAuthRequest} requestParameters Request parameters.
|
|
552
|
+
* @param {*} [options] Override http request option.
|
|
553
|
+
* @throws {RequiredError}
|
|
554
|
+
*/
|
|
555
|
+
loginAuth(
|
|
556
|
+
requestParameters: AuthApiLoginAuthRequest,
|
|
557
|
+
options?: RawAxiosRequestConfig,
|
|
558
|
+
): AxiosPromise<AuthToken> {
|
|
559
|
+
return localVarFp
|
|
560
|
+
.loginAuth(requestParameters.authLogin, options)
|
|
561
|
+
.then((request) => request(axios, basePath));
|
|
562
|
+
},
|
|
563
|
+
/**
|
|
564
|
+
*
|
|
565
|
+
* @summary Refresh an auth token before it expires
|
|
566
|
+
* @param {*} [options] Override http request option.
|
|
567
|
+
* @throws {RequiredError}
|
|
568
|
+
*/
|
|
569
|
+
refreshAuth(options?: RawAxiosRequestConfig): AxiosPromise<AuthToken> {
|
|
570
|
+
return localVarFp
|
|
571
|
+
.refreshAuth(options)
|
|
572
|
+
.then((request) => request(axios, basePath));
|
|
573
|
+
},
|
|
574
|
+
/**
|
|
575
|
+
*
|
|
576
|
+
* @summary Verify validity for an authentication token
|
|
577
|
+
* @param {*} [options] Override http request option.
|
|
578
|
+
* @throws {RequiredError}
|
|
579
|
+
*/
|
|
580
|
+
verifyAuth(options?: RawAxiosRequestConfig): AxiosPromise<AuthVerify> {
|
|
581
|
+
return localVarFp
|
|
582
|
+
.verifyAuth(options)
|
|
583
|
+
.then((request) => request(axios, basePath));
|
|
584
|
+
},
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Request parameters for externalCallback operation in AuthApi.
|
|
590
|
+
* @export
|
|
591
|
+
* @interface AuthApiExternalCallbackRequest
|
|
592
|
+
*/
|
|
593
|
+
export interface AuthApiExternalCallbackRequest {
|
|
594
|
+
/**
|
|
595
|
+
* An identifier for the auth provider
|
|
596
|
+
* @type {string}
|
|
597
|
+
* @memberof AuthApiExternalCallback
|
|
598
|
+
*/
|
|
599
|
+
readonly provider: string;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Auth state
|
|
603
|
+
* @type {string}
|
|
604
|
+
* @memberof AuthApiExternalCallback
|
|
605
|
+
*/
|
|
606
|
+
readonly state?: string;
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Auth code
|
|
610
|
+
* @type {string}
|
|
611
|
+
* @memberof AuthApiExternalCallback
|
|
612
|
+
*/
|
|
613
|
+
readonly code?: string;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Request parameters for externalInitialize operation in AuthApi.
|
|
618
|
+
* @export
|
|
619
|
+
* @interface AuthApiExternalInitializeRequest
|
|
620
|
+
*/
|
|
621
|
+
export interface AuthApiExternalInitializeRequest {
|
|
622
|
+
/**
|
|
623
|
+
* An identifier for the auth provider
|
|
624
|
+
* @type {string}
|
|
625
|
+
* @memberof AuthApiExternalInitialize
|
|
626
|
+
*/
|
|
627
|
+
readonly provider: string;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Auth state
|
|
631
|
+
* @type {string}
|
|
632
|
+
* @memberof AuthApiExternalInitialize
|
|
633
|
+
*/
|
|
634
|
+
readonly state?: string;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Request parameters for loginAuth operation in AuthApi.
|
|
639
|
+
* @export
|
|
640
|
+
* @interface AuthApiLoginAuthRequest
|
|
641
|
+
*/
|
|
642
|
+
export interface AuthApiLoginAuthRequest {
|
|
643
|
+
/**
|
|
644
|
+
* The credentials to authenticate
|
|
645
|
+
* @type {AuthLogin}
|
|
646
|
+
* @memberof AuthApiLoginAuth
|
|
647
|
+
*/
|
|
648
|
+
readonly authLogin: AuthLogin;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* AuthApi - object-oriented interface
|
|
653
|
+
* @export
|
|
654
|
+
* @class AuthApi
|
|
655
|
+
* @extends {BaseAPI}
|
|
656
|
+
*/
|
|
657
|
+
export class AuthApi extends BaseAPI {
|
|
658
|
+
/**
|
|
659
|
+
*
|
|
660
|
+
* @summary Callback for external authentication
|
|
661
|
+
* @param {AuthApiExternalCallbackRequest} requestParameters Request parameters.
|
|
662
|
+
* @param {*} [options] Override http request option.
|
|
663
|
+
* @throws {RequiredError}
|
|
664
|
+
* @memberof AuthApi
|
|
665
|
+
*/
|
|
666
|
+
public externalCallback(
|
|
667
|
+
requestParameters: AuthApiExternalCallbackRequest,
|
|
668
|
+
options?: RawAxiosRequestConfig,
|
|
669
|
+
) {
|
|
670
|
+
return AuthApiFp(this.configuration)
|
|
671
|
+
.externalCallback(
|
|
672
|
+
requestParameters.provider,
|
|
673
|
+
requestParameters.state,
|
|
674
|
+
requestParameters.code,
|
|
675
|
+
options,
|
|
676
|
+
)
|
|
677
|
+
.then((request) => request(this.axios, this.basePath));
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
*
|
|
682
|
+
* @summary Initialize the external authentication
|
|
683
|
+
* @param {AuthApiExternalInitializeRequest} requestParameters Request parameters.
|
|
684
|
+
* @param {*} [options] Override http request option.
|
|
685
|
+
* @throws {RequiredError}
|
|
686
|
+
* @memberof AuthApi
|
|
687
|
+
*/
|
|
688
|
+
public externalInitialize(
|
|
689
|
+
requestParameters: AuthApiExternalInitializeRequest,
|
|
690
|
+
options?: RawAxiosRequestConfig,
|
|
691
|
+
) {
|
|
692
|
+
return AuthApiFp(this.configuration)
|
|
693
|
+
.externalInitialize(
|
|
694
|
+
requestParameters.provider,
|
|
695
|
+
requestParameters.state,
|
|
696
|
+
options,
|
|
697
|
+
)
|
|
698
|
+
.then((request) => request(this.axios, this.basePath));
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
*
|
|
703
|
+
* @summary Authenticate an user by credentials
|
|
704
|
+
* @param {AuthApiLoginAuthRequest} requestParameters Request parameters.
|
|
705
|
+
* @param {*} [options] Override http request option.
|
|
706
|
+
* @throws {RequiredError}
|
|
707
|
+
* @memberof AuthApi
|
|
708
|
+
*/
|
|
709
|
+
public loginAuth(
|
|
710
|
+
requestParameters: AuthApiLoginAuthRequest,
|
|
711
|
+
options?: RawAxiosRequestConfig,
|
|
712
|
+
) {
|
|
713
|
+
return AuthApiFp(this.configuration)
|
|
714
|
+
.loginAuth(requestParameters.authLogin, options)
|
|
715
|
+
.then((request) => request(this.axios, this.basePath));
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
*
|
|
720
|
+
* @summary Refresh an auth token before it expires
|
|
721
|
+
* @param {*} [options] Override http request option.
|
|
722
|
+
* @throws {RequiredError}
|
|
723
|
+
* @memberof AuthApi
|
|
724
|
+
*/
|
|
725
|
+
public refreshAuth(options?: RawAxiosRequestConfig) {
|
|
726
|
+
return AuthApiFp(this.configuration)
|
|
727
|
+
.refreshAuth(options)
|
|
728
|
+
.then((request) => request(this.axios, this.basePath));
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
*
|
|
733
|
+
* @summary Verify validity for an authentication token
|
|
734
|
+
* @param {*} [options] Override http request option.
|
|
735
|
+
* @throws {RequiredError}
|
|
736
|
+
* @memberof AuthApi
|
|
737
|
+
*/
|
|
738
|
+
public verifyAuth(options?: RawAxiosRequestConfig) {
|
|
739
|
+
return AuthApiFp(this.configuration)
|
|
740
|
+
.verifyAuth(options)
|
|
741
|
+
.then((request) => request(this.axios, this.basePath));
|
|
742
|
+
}
|
|
743
|
+
}
|