@anzar-auth/core 1.5.10
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/LICENSE +674 -0
- package/dist/index.cjs +967 -0
- package/dist/index.d.cts +1184 -0
- package/dist/index.d.ts +1184 -0
- package/dist/index.js +934 -0
- package/package.json +55 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1184 @@
|
|
|
1
|
+
import * as axios from 'axios';
|
|
2
|
+
import { AxiosInstance, RawAxiosRequestConfig, AxiosPromise } from 'axios';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Anzar Software API
|
|
6
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.7.15
|
|
9
|
+
* Contact: dev@anzar.io
|
|
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
|
+
interface AWSv4Configuration {
|
|
16
|
+
options?: {
|
|
17
|
+
region?: string;
|
|
18
|
+
service?: string;
|
|
19
|
+
};
|
|
20
|
+
credentials?: {
|
|
21
|
+
accessKeyId?: string;
|
|
22
|
+
secretAccessKey?: string;
|
|
23
|
+
sessionToken?: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
interface ConfigurationParameters {
|
|
27
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
28
|
+
username?: string;
|
|
29
|
+
password?: string;
|
|
30
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
31
|
+
awsv4?: AWSv4Configuration;
|
|
32
|
+
basePath?: string;
|
|
33
|
+
serverIndex?: number;
|
|
34
|
+
baseOptions?: any;
|
|
35
|
+
formDataCtor?: new () => any;
|
|
36
|
+
}
|
|
37
|
+
declare class Configuration {
|
|
38
|
+
/**
|
|
39
|
+
* parameter for apiKey security
|
|
40
|
+
* @param name security name
|
|
41
|
+
*/
|
|
42
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
43
|
+
/**
|
|
44
|
+
* parameter for basic security
|
|
45
|
+
*/
|
|
46
|
+
username?: string;
|
|
47
|
+
/**
|
|
48
|
+
* parameter for basic security
|
|
49
|
+
*/
|
|
50
|
+
password?: string;
|
|
51
|
+
/**
|
|
52
|
+
* parameter for oauth2 security
|
|
53
|
+
* @param name security name
|
|
54
|
+
* @param scopes oauth2 scope
|
|
55
|
+
*/
|
|
56
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
57
|
+
/**
|
|
58
|
+
* parameter for aws4 signature security
|
|
59
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
60
|
+
* @param {string} options.region - aws region
|
|
61
|
+
* @param {string} options.service - name of the service.
|
|
62
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
63
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
64
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
65
|
+
* @memberof Configuration
|
|
66
|
+
*/
|
|
67
|
+
awsv4?: AWSv4Configuration;
|
|
68
|
+
/**
|
|
69
|
+
* override base path
|
|
70
|
+
*/
|
|
71
|
+
basePath?: string;
|
|
72
|
+
/**
|
|
73
|
+
* override server index
|
|
74
|
+
*/
|
|
75
|
+
serverIndex?: number;
|
|
76
|
+
/**
|
|
77
|
+
* base options for axios calls
|
|
78
|
+
*/
|
|
79
|
+
baseOptions?: any;
|
|
80
|
+
/**
|
|
81
|
+
* The FormData constructor that will be used to create multipart form data
|
|
82
|
+
* requests. You can inject this here so that execution environments that
|
|
83
|
+
* do not support the FormData class can still run the generated client.
|
|
84
|
+
*
|
|
85
|
+
* @type {new () => FormData}
|
|
86
|
+
*/
|
|
87
|
+
formDataCtor?: new () => any;
|
|
88
|
+
constructor(param?: ConfigurationParameters);
|
|
89
|
+
/**
|
|
90
|
+
* Check if the given MIME is a JSON MIME.
|
|
91
|
+
* JSON MIME examples:
|
|
92
|
+
* application/json
|
|
93
|
+
* application/json; charset=UTF8
|
|
94
|
+
* APPLICATION/JSON
|
|
95
|
+
* application/vnd.company+json
|
|
96
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
97
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
98
|
+
*/
|
|
99
|
+
isJsonMime(mime: string): boolean;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Anzar Software API
|
|
104
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
105
|
+
*
|
|
106
|
+
* The version of the OpenAPI document: 0.7.15
|
|
107
|
+
* Contact: dev@anzar.io
|
|
108
|
+
*
|
|
109
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
110
|
+
* https://openapi-generator.tech
|
|
111
|
+
* Do not edit the class manually.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
interface RequestArgs {
|
|
115
|
+
url: string;
|
|
116
|
+
options: RawAxiosRequestConfig;
|
|
117
|
+
}
|
|
118
|
+
declare class BaseAPI {
|
|
119
|
+
protected basePath: string;
|
|
120
|
+
protected axios: AxiosInstance;
|
|
121
|
+
protected configuration: Configuration | undefined;
|
|
122
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Anzar Software API
|
|
127
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
128
|
+
*
|
|
129
|
+
* The version of the OpenAPI document: 0.7.15
|
|
130
|
+
* Contact: dev@anzar.io
|
|
131
|
+
*
|
|
132
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
133
|
+
* https://openapi-generator.tech
|
|
134
|
+
* Do not edit the class manually.
|
|
135
|
+
*/
|
|
136
|
+
declare const AlgorithmConfig: {
|
|
137
|
+
readonly Hs256: "HS256";
|
|
138
|
+
readonly Hs384: "HS384";
|
|
139
|
+
readonly Hs512: "HS512";
|
|
140
|
+
readonly Es256: "ES256";
|
|
141
|
+
readonly Es384: "ES384";
|
|
142
|
+
readonly Rs256: "RS256";
|
|
143
|
+
readonly Rs384: "RS384";
|
|
144
|
+
readonly Rs512: "RS512";
|
|
145
|
+
readonly Ps256: "PS256";
|
|
146
|
+
readonly Ps384: "PS384";
|
|
147
|
+
readonly Ps512: "PS512";
|
|
148
|
+
readonly EdDsa: "EdDSA";
|
|
149
|
+
};
|
|
150
|
+
type AlgorithmConfig = typeof AlgorithmConfig[keyof typeof AlgorithmConfig];
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Anzar Software API
|
|
154
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
155
|
+
*
|
|
156
|
+
* The version of the OpenAPI document: 0.7.15
|
|
157
|
+
* Contact: dev@anzar.io
|
|
158
|
+
*
|
|
159
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
160
|
+
* https://openapi-generator.tech
|
|
161
|
+
* Do not edit the class manually.
|
|
162
|
+
*/
|
|
163
|
+
interface App {
|
|
164
|
+
'environment': string;
|
|
165
|
+
'url': string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Anzar Software API
|
|
170
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
171
|
+
*
|
|
172
|
+
* The version of the OpenAPI document: 0.7.15
|
|
173
|
+
* Contact: dev@anzar.io
|
|
174
|
+
*
|
|
175
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
176
|
+
* https://openapi-generator.tech
|
|
177
|
+
* Do not edit the class manually.
|
|
178
|
+
*/
|
|
179
|
+
declare const AuthStrategy: {
|
|
180
|
+
readonly Session: "Session";
|
|
181
|
+
readonly Jwt: "Jwt";
|
|
182
|
+
};
|
|
183
|
+
type AuthStrategy = typeof AuthStrategy[keyof typeof AuthStrategy];
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Anzar Software API
|
|
187
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
188
|
+
*
|
|
189
|
+
* The version of the OpenAPI document: 0.7.15
|
|
190
|
+
* Contact: dev@anzar.io
|
|
191
|
+
*
|
|
192
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
193
|
+
* https://openapi-generator.tech
|
|
194
|
+
* Do not edit the class manually.
|
|
195
|
+
*/
|
|
196
|
+
interface EmailVerification {
|
|
197
|
+
'error_redirect'?: string | null;
|
|
198
|
+
'required'?: boolean;
|
|
199
|
+
'success_redirect'?: string | null;
|
|
200
|
+
'token_expires_in'?: number;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Anzar Software API
|
|
205
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
206
|
+
*
|
|
207
|
+
* The version of the OpenAPI document: 0.7.15
|
|
208
|
+
* Contact: dev@anzar.io
|
|
209
|
+
*
|
|
210
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
211
|
+
* https://openapi-generator.tech
|
|
212
|
+
* Do not edit the class manually.
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
interface EmailConfig {
|
|
216
|
+
'verification'?: EmailVerification;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Anzar Software API
|
|
221
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
222
|
+
*
|
|
223
|
+
* The version of the OpenAPI document: 0.7.15
|
|
224
|
+
* Contact: dev@anzar.io
|
|
225
|
+
*
|
|
226
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
227
|
+
* https://openapi-generator.tech
|
|
228
|
+
* Do not edit the class manually.
|
|
229
|
+
*/
|
|
230
|
+
|
|
231
|
+
interface JwtConfig {
|
|
232
|
+
'access_token_expires_in'?: number;
|
|
233
|
+
'algorithm'?: AlgorithmConfig;
|
|
234
|
+
'audience'?: string;
|
|
235
|
+
'issuer'?: string;
|
|
236
|
+
'refresh_token_expires_in'?: number;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Anzar Software API
|
|
241
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
242
|
+
*
|
|
243
|
+
* The version of the OpenAPI document: 0.7.15
|
|
244
|
+
* Contact: dev@anzar.io
|
|
245
|
+
*
|
|
246
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
247
|
+
* https://openapi-generator.tech
|
|
248
|
+
* Do not edit the class manually.
|
|
249
|
+
*/
|
|
250
|
+
interface PasswordRequirements {
|
|
251
|
+
'max_length'?: number;
|
|
252
|
+
'min_length'?: number;
|
|
253
|
+
'require_number'?: boolean;
|
|
254
|
+
'require_special_char'?: boolean;
|
|
255
|
+
'require_uppercase'?: boolean;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Anzar Software API
|
|
260
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
261
|
+
*
|
|
262
|
+
* The version of the OpenAPI document: 0.7.15
|
|
263
|
+
* Contact: dev@anzar.io
|
|
264
|
+
*
|
|
265
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
266
|
+
* https://openapi-generator.tech
|
|
267
|
+
* Do not edit the class manually.
|
|
268
|
+
*/
|
|
269
|
+
interface PasswordReset {
|
|
270
|
+
'error_redirect'?: string | null;
|
|
271
|
+
'success_redirect'?: string | null;
|
|
272
|
+
'token_expires_in'?: number;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Anzar Software API
|
|
277
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
278
|
+
*
|
|
279
|
+
* The version of the OpenAPI document: 0.7.15
|
|
280
|
+
* Contact: dev@anzar.io
|
|
281
|
+
*
|
|
282
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
283
|
+
* https://openapi-generator.tech
|
|
284
|
+
* Do not edit the class manually.
|
|
285
|
+
*/
|
|
286
|
+
interface PasswordSecurity {
|
|
287
|
+
'lockout_duration'?: number;
|
|
288
|
+
'max_failed_attempts'?: number;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Anzar Software API
|
|
293
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
294
|
+
*
|
|
295
|
+
* The version of the OpenAPI document: 0.7.15
|
|
296
|
+
* Contact: dev@anzar.io
|
|
297
|
+
*
|
|
298
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
299
|
+
* https://openapi-generator.tech
|
|
300
|
+
* Do not edit the class manually.
|
|
301
|
+
*/
|
|
302
|
+
|
|
303
|
+
interface PasswordConfig {
|
|
304
|
+
'requirements'?: PasswordRequirements;
|
|
305
|
+
'reset'?: PasswordReset;
|
|
306
|
+
'security'?: PasswordSecurity;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Anzar Software API
|
|
311
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
312
|
+
*
|
|
313
|
+
* The version of the OpenAPI document: 0.7.15
|
|
314
|
+
* Contact: dev@anzar.io
|
|
315
|
+
*
|
|
316
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
317
|
+
* https://openapi-generator.tech
|
|
318
|
+
* Do not edit the class manually.
|
|
319
|
+
*/
|
|
320
|
+
declare const SameSiteConfig: {
|
|
321
|
+
readonly Strict: "Strict";
|
|
322
|
+
readonly Lax: "Lax";
|
|
323
|
+
readonly None: "None";
|
|
324
|
+
};
|
|
325
|
+
type SameSiteConfig = typeof SameSiteConfig[keyof typeof SameSiteConfig];
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Anzar Software API
|
|
329
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
330
|
+
*
|
|
331
|
+
* The version of the OpenAPI document: 0.7.15
|
|
332
|
+
* Contact: dev@anzar.io
|
|
333
|
+
*
|
|
334
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
335
|
+
* https://openapi-generator.tech
|
|
336
|
+
* Do not edit the class manually.
|
|
337
|
+
*/
|
|
338
|
+
|
|
339
|
+
interface SessionConfig {
|
|
340
|
+
'http_only'?: boolean;
|
|
341
|
+
'max_age'?: number;
|
|
342
|
+
'name'?: string;
|
|
343
|
+
'same_site'?: SameSiteConfig;
|
|
344
|
+
'secure'?: boolean;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Anzar Software API
|
|
349
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
350
|
+
*
|
|
351
|
+
* The version of the OpenAPI document: 0.7.15
|
|
352
|
+
* Contact: dev@anzar.io
|
|
353
|
+
*
|
|
354
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
355
|
+
* https://openapi-generator.tech
|
|
356
|
+
* Do not edit the class manually.
|
|
357
|
+
*/
|
|
358
|
+
|
|
359
|
+
interface Authentication {
|
|
360
|
+
'email'?: EmailConfig;
|
|
361
|
+
'jwt'?: JwtConfig;
|
|
362
|
+
'password'?: PasswordConfig;
|
|
363
|
+
'session'?: SessionConfig;
|
|
364
|
+
'strategy'?: AuthStrategy;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Anzar Software API
|
|
369
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
370
|
+
*
|
|
371
|
+
* The version of the OpenAPI document: 0.7.15
|
|
372
|
+
* Contact: dev@anzar.io
|
|
373
|
+
*
|
|
374
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
375
|
+
* https://openapi-generator.tech
|
|
376
|
+
* Do not edit the class manually.
|
|
377
|
+
*/
|
|
378
|
+
declare const CacheDriver: {
|
|
379
|
+
readonly MemCached: "MemCached";
|
|
380
|
+
readonly Redis: "Redis";
|
|
381
|
+
};
|
|
382
|
+
type CacheDriver = typeof CacheDriver[keyof typeof CacheDriver];
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Anzar Software API
|
|
386
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
387
|
+
*
|
|
388
|
+
* The version of the OpenAPI document: 0.7.15
|
|
389
|
+
* Contact: dev@anzar.io
|
|
390
|
+
*
|
|
391
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
392
|
+
* https://openapi-generator.tech
|
|
393
|
+
* Do not edit the class manually.
|
|
394
|
+
*/
|
|
395
|
+
|
|
396
|
+
interface Cache {
|
|
397
|
+
'driver': CacheDriver;
|
|
398
|
+
'url': string;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Anzar Software API
|
|
403
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
404
|
+
*
|
|
405
|
+
* The version of the OpenAPI document: 0.7.15
|
|
406
|
+
* Contact: dev@anzar.io
|
|
407
|
+
*
|
|
408
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
409
|
+
* https://openapi-generator.tech
|
|
410
|
+
* Do not edit the class manually.
|
|
411
|
+
*/
|
|
412
|
+
declare const DatabaseDriver: {
|
|
413
|
+
readonly SqLite: "SQLite";
|
|
414
|
+
readonly PostgreSql: "PostgreSQL";
|
|
415
|
+
readonly MongoDb: "MongoDB";
|
|
416
|
+
};
|
|
417
|
+
type DatabaseDriver = typeof DatabaseDriver[keyof typeof DatabaseDriver];
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Anzar Software API
|
|
421
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
422
|
+
*
|
|
423
|
+
* The version of the OpenAPI document: 0.7.15
|
|
424
|
+
* Contact: dev@anzar.io
|
|
425
|
+
*
|
|
426
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
427
|
+
* https://openapi-generator.tech
|
|
428
|
+
* Do not edit the class manually.
|
|
429
|
+
*/
|
|
430
|
+
|
|
431
|
+
interface Database {
|
|
432
|
+
'cache': Cache;
|
|
433
|
+
'connection_string': string;
|
|
434
|
+
'driver': DatabaseDriver;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Anzar Software API
|
|
439
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
440
|
+
*
|
|
441
|
+
* The version of the OpenAPI document: 0.7.15
|
|
442
|
+
* Contact: dev@anzar.io
|
|
443
|
+
*
|
|
444
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
445
|
+
* https://openapi-generator.tech
|
|
446
|
+
* Do not edit the class manually.
|
|
447
|
+
*/
|
|
448
|
+
interface Security {
|
|
449
|
+
'headers'?: Array<Array<any>>;
|
|
450
|
+
'secret_key': string;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Anzar Software API
|
|
455
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
456
|
+
*
|
|
457
|
+
* The version of the OpenAPI document: 0.7.15
|
|
458
|
+
* Contact: dev@anzar.io
|
|
459
|
+
*
|
|
460
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
461
|
+
* https://openapi-generator.tech
|
|
462
|
+
* Do not edit the class manually.
|
|
463
|
+
*/
|
|
464
|
+
interface CorsConfig {
|
|
465
|
+
'allow_credentials'?: boolean;
|
|
466
|
+
'allowed_headers'?: Array<string>;
|
|
467
|
+
'allowed_methods'?: Array<string>;
|
|
468
|
+
'allowed_origins'?: Array<string>;
|
|
469
|
+
'enabled'?: boolean;
|
|
470
|
+
'max_age'?: number;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Anzar Software API
|
|
475
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
476
|
+
*
|
|
477
|
+
* The version of the OpenAPI document: 0.7.15
|
|
478
|
+
* Contact: dev@anzar.io
|
|
479
|
+
*
|
|
480
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
481
|
+
* https://openapi-generator.tech
|
|
482
|
+
* Do not edit the class manually.
|
|
483
|
+
*/
|
|
484
|
+
interface HttpsConfig {
|
|
485
|
+
'cert_path'?: string | null;
|
|
486
|
+
'enabled'?: boolean;
|
|
487
|
+
'key_path'?: string | null;
|
|
488
|
+
'port'?: number;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Anzar Software API
|
|
493
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
494
|
+
*
|
|
495
|
+
* The version of the OpenAPI document: 0.7.15
|
|
496
|
+
* Contact: dev@anzar.io
|
|
497
|
+
*
|
|
498
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
499
|
+
* https://openapi-generator.tech
|
|
500
|
+
* Do not edit the class manually.
|
|
501
|
+
*/
|
|
502
|
+
|
|
503
|
+
interface Server {
|
|
504
|
+
'cors'?: CorsConfig;
|
|
505
|
+
'https'?: HttpsConfig;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Anzar Software API
|
|
510
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
511
|
+
*
|
|
512
|
+
* The version of the OpenAPI document: 0.7.15
|
|
513
|
+
* Contact: dev@anzar.io
|
|
514
|
+
*
|
|
515
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
516
|
+
* https://openapi-generator.tech
|
|
517
|
+
* Do not edit the class manually.
|
|
518
|
+
*/
|
|
519
|
+
|
|
520
|
+
interface AnzarConfiguration {
|
|
521
|
+
'app': App;
|
|
522
|
+
'auth'?: Authentication;
|
|
523
|
+
'database': Database;
|
|
524
|
+
'security': Security;
|
|
525
|
+
'server'?: Server;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Anzar Software API
|
|
530
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
531
|
+
*
|
|
532
|
+
* The version of the OpenAPI document: 0.7.15
|
|
533
|
+
* Contact: dev@anzar.io
|
|
534
|
+
*
|
|
535
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
536
|
+
* https://openapi-generator.tech
|
|
537
|
+
* Do not edit the class manually.
|
|
538
|
+
*/
|
|
539
|
+
/**
|
|
540
|
+
* SessionTokens model
|
|
541
|
+
*/
|
|
542
|
+
interface SessionTokens {
|
|
543
|
+
'access': string;
|
|
544
|
+
'expires_in': number;
|
|
545
|
+
'refresh': string;
|
|
546
|
+
'token_type': string;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Anzar Software API
|
|
551
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
552
|
+
*
|
|
553
|
+
* The version of the OpenAPI document: 0.7.15
|
|
554
|
+
* Contact: dev@anzar.io
|
|
555
|
+
*
|
|
556
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
557
|
+
* https://openapi-generator.tech
|
|
558
|
+
* Do not edit the class manually.
|
|
559
|
+
*/
|
|
560
|
+
declare const Role: {
|
|
561
|
+
readonly User: "User";
|
|
562
|
+
readonly Admin: "Admin";
|
|
563
|
+
};
|
|
564
|
+
type Role = typeof Role[keyof typeof Role];
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Anzar Software API
|
|
568
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
569
|
+
*
|
|
570
|
+
* The version of the OpenAPI document: 0.7.15
|
|
571
|
+
* Contact: dev@anzar.io
|
|
572
|
+
*
|
|
573
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
574
|
+
* https://openapi-generator.tech
|
|
575
|
+
* Do not edit the class manually.
|
|
576
|
+
*/
|
|
577
|
+
|
|
578
|
+
interface User {
|
|
579
|
+
'_id'?: string | null;
|
|
580
|
+
'createdAt': string;
|
|
581
|
+
'email': string;
|
|
582
|
+
'role': Role;
|
|
583
|
+
'username': string;
|
|
584
|
+
'verified': boolean;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Anzar Software API
|
|
589
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
590
|
+
*
|
|
591
|
+
* The version of the OpenAPI document: 0.7.15
|
|
592
|
+
* Contact: dev@anzar.io
|
|
593
|
+
*
|
|
594
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
595
|
+
* https://openapi-generator.tech
|
|
596
|
+
* Do not edit the class manually.
|
|
597
|
+
*/
|
|
598
|
+
/**
|
|
599
|
+
* Verification model
|
|
600
|
+
*/
|
|
601
|
+
interface Verification {
|
|
602
|
+
'link': string;
|
|
603
|
+
'token': string;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Anzar Software API
|
|
608
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
609
|
+
*
|
|
610
|
+
* The version of the OpenAPI document: 0.7.15
|
|
611
|
+
* Contact: dev@anzar.io
|
|
612
|
+
*
|
|
613
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
614
|
+
* https://openapi-generator.tech
|
|
615
|
+
* Do not edit the class manually.
|
|
616
|
+
*/
|
|
617
|
+
|
|
618
|
+
interface AuthResponse {
|
|
619
|
+
'tokens'?: SessionTokens | null;
|
|
620
|
+
'user': User;
|
|
621
|
+
'verification'?: Verification | null;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Anzar Software API
|
|
626
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
627
|
+
*
|
|
628
|
+
* The version of the OpenAPI document: 0.7.15
|
|
629
|
+
* Contact: dev@anzar.io
|
|
630
|
+
*
|
|
631
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
632
|
+
* https://openapi-generator.tech
|
|
633
|
+
* Do not edit the class manually.
|
|
634
|
+
*/
|
|
635
|
+
interface EmailRequest {
|
|
636
|
+
'email': string;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Anzar Software API
|
|
641
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
642
|
+
*
|
|
643
|
+
* The version of the OpenAPI document: 0.7.15
|
|
644
|
+
* Contact: dev@anzar.io
|
|
645
|
+
*
|
|
646
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
647
|
+
* https://openapi-generator.tech
|
|
648
|
+
* Do not edit the class manually.
|
|
649
|
+
*/
|
|
650
|
+
declare const ErrorCode: {
|
|
651
|
+
readonly InvalidToken: "InvalidToken";
|
|
652
|
+
readonly TokenNotFound: "TokenNotFound";
|
|
653
|
+
readonly TokenExpired: "TokenExpired";
|
|
654
|
+
readonly TokenAlreadyUsed: "TokenAlreadyUsed";
|
|
655
|
+
readonly TokenCreationFailed: "TokenCreationFailed";
|
|
656
|
+
readonly TokenRevocationFailed: "TokenRevocationFailed";
|
|
657
|
+
readonly AccountNotVerified: "AccountNotVerified";
|
|
658
|
+
readonly InvalidCredentials: "InvalidCredentials";
|
|
659
|
+
readonly MissingCredentials: "MissingCredentials";
|
|
660
|
+
readonly AccountSuspended: "AccountSuspended";
|
|
661
|
+
readonly UserNotFound: "UserNotFound";
|
|
662
|
+
readonly RateLimitExceeded: "RateLimitExceeded";
|
|
663
|
+
readonly EmailSendFailed: "EmailSendFailed";
|
|
664
|
+
readonly TlsConfig: "TlsConfig";
|
|
665
|
+
readonly HashingFailure: "HashingFailure";
|
|
666
|
+
readonly MalformedData: "MalformedData";
|
|
667
|
+
readonly DatabaseError: "DatabaseError";
|
|
668
|
+
readonly InvalidRequest: "InvalidRequest";
|
|
669
|
+
readonly UnsupportedMediaType: "UnsupportedMediaType";
|
|
670
|
+
readonly BadRequest: "BadRequest";
|
|
671
|
+
readonly InternalServerError: "InternalServerError";
|
|
672
|
+
};
|
|
673
|
+
type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode];
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Anzar Software API
|
|
677
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
678
|
+
*
|
|
679
|
+
* The version of the OpenAPI document: 0.7.15
|
|
680
|
+
* Contact: dev@anzar.io
|
|
681
|
+
*
|
|
682
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
683
|
+
* https://openapi-generator.tech
|
|
684
|
+
* Do not edit the class manually.
|
|
685
|
+
*/
|
|
686
|
+
|
|
687
|
+
interface ErrorResponse {
|
|
688
|
+
'code': ErrorCode;
|
|
689
|
+
'details'?: any;
|
|
690
|
+
'message': string;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Anzar Software API
|
|
695
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
696
|
+
*
|
|
697
|
+
* The version of the OpenAPI document: 0.7.15
|
|
698
|
+
* Contact: dev@anzar.io
|
|
699
|
+
*
|
|
700
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
701
|
+
* https://openapi-generator.tech
|
|
702
|
+
* Do not edit the class manually.
|
|
703
|
+
*/
|
|
704
|
+
interface LoginRequest {
|
|
705
|
+
'email': string;
|
|
706
|
+
'password': string;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Anzar Software API
|
|
711
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
712
|
+
*
|
|
713
|
+
* The version of the OpenAPI document: 0.7.15
|
|
714
|
+
* Contact: dev@anzar.io
|
|
715
|
+
*
|
|
716
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
717
|
+
* https://openapi-generator.tech
|
|
718
|
+
* Do not edit the class manually.
|
|
719
|
+
*/
|
|
720
|
+
interface RefreshTokenRequest {
|
|
721
|
+
'refresh_token': string;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Anzar Software API
|
|
726
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
727
|
+
*
|
|
728
|
+
* The version of the OpenAPI document: 0.7.15
|
|
729
|
+
* Contact: dev@anzar.io
|
|
730
|
+
*
|
|
731
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
732
|
+
* https://openapi-generator.tech
|
|
733
|
+
* Do not edit the class manually.
|
|
734
|
+
*/
|
|
735
|
+
interface RegisterRequest {
|
|
736
|
+
'email': string;
|
|
737
|
+
'password': string;
|
|
738
|
+
'username': string;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Anzar Software API
|
|
743
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
744
|
+
*
|
|
745
|
+
* The version of the OpenAPI document: 0.7.15
|
|
746
|
+
* Contact: dev@anzar.io
|
|
747
|
+
*
|
|
748
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
749
|
+
* https://openapi-generator.tech
|
|
750
|
+
* Do not edit the class manually.
|
|
751
|
+
*/
|
|
752
|
+
interface ResetLink {
|
|
753
|
+
'expires_at': string;
|
|
754
|
+
'link': string;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Anzar Software API
|
|
759
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
760
|
+
*
|
|
761
|
+
* The version of the OpenAPI document: 0.7.15
|
|
762
|
+
* Contact: dev@anzar.io
|
|
763
|
+
*
|
|
764
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
765
|
+
* https://openapi-generator.tech
|
|
766
|
+
* Do not edit the class manually.
|
|
767
|
+
*/
|
|
768
|
+
interface ResetPasswordRequest {
|
|
769
|
+
'csrf_token': string;
|
|
770
|
+
'password': string;
|
|
771
|
+
'token': string;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Anzar Software API
|
|
776
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
777
|
+
*
|
|
778
|
+
* The version of the OpenAPI document: 0.7.15
|
|
779
|
+
* Contact: dev@anzar.io
|
|
780
|
+
*
|
|
781
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
782
|
+
* https://openapi-generator.tech
|
|
783
|
+
* Do not edit the class manually.
|
|
784
|
+
*/
|
|
785
|
+
interface Session {
|
|
786
|
+
'_id'?: string | null;
|
|
787
|
+
'expiresAt': string;
|
|
788
|
+
'issuedAt': string;
|
|
789
|
+
'token': string;
|
|
790
|
+
'usedAt'?: string | null;
|
|
791
|
+
'userId'?: string;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Anzar Software API
|
|
796
|
+
* REST API for the Anzar platform. All protected routes require a Bearer token.
|
|
797
|
+
*
|
|
798
|
+
* The version of the OpenAPI document: 0.7.15
|
|
799
|
+
* Contact: dev@anzar.io
|
|
800
|
+
*
|
|
801
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
802
|
+
* https://openapi-generator.tech
|
|
803
|
+
* Do not edit the class manually.
|
|
804
|
+
*/
|
|
805
|
+
interface TokenQuery {
|
|
806
|
+
'token': string;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* AuthApi - axios parameter creator
|
|
811
|
+
*/
|
|
812
|
+
declare const AuthApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
813
|
+
/**
|
|
814
|
+
* Returns the currently authenticated user\'s session data. Requires a valid Bearer token.
|
|
815
|
+
* @summary Get current session
|
|
816
|
+
* @param {*} [options] Override http request option.
|
|
817
|
+
* @throws {RequiredError}
|
|
818
|
+
*/
|
|
819
|
+
getSession: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
820
|
+
/**
|
|
821
|
+
* Authenticates a user with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
822
|
+
* @summary User login
|
|
823
|
+
* @param {LoginRequest} loginRequest User login credentials
|
|
824
|
+
* @param {*} [options] Override http request option.
|
|
825
|
+
* @throws {RequiredError}
|
|
826
|
+
*/
|
|
827
|
+
login: (loginRequest: LoginRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
828
|
+
/**
|
|
829
|
+
* Invalidates the current session and refresh token. The client should discard stored tokens.
|
|
830
|
+
* @summary Logout
|
|
831
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
832
|
+
* @param {*} [options] Override http request option.
|
|
833
|
+
* @throws {RequiredError}
|
|
834
|
+
*/
|
|
835
|
+
logout: (refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
836
|
+
/**
|
|
837
|
+
* Issues a new access token using a valid refresh token. Rotate refresh tokens on each call.
|
|
838
|
+
* @summary Refresh access token
|
|
839
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
840
|
+
* @param {*} [options] Override http request option.
|
|
841
|
+
* @throws {RequiredError}
|
|
842
|
+
*/
|
|
843
|
+
refreshToken: (refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
844
|
+
/**
|
|
845
|
+
* Creates a new user account with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
846
|
+
* @summary Register a new user
|
|
847
|
+
* @param {RegisterRequest} registerRequest User register credentials
|
|
848
|
+
* @param {*} [options] Override http request option.
|
|
849
|
+
* @throws {RequiredError}
|
|
850
|
+
*/
|
|
851
|
+
register: (registerRequest: RegisterRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
852
|
+
/**
|
|
853
|
+
* Validates the reset token from the email link and renders the password reset form.
|
|
854
|
+
* @summary Render password reset form
|
|
855
|
+
* @param {TokenQuery} token Password reset token
|
|
856
|
+
* @param {*} [options] Override http request option.
|
|
857
|
+
* @throws {RequiredError}
|
|
858
|
+
*/
|
|
859
|
+
renderResetForm: (token: TokenQuery, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
860
|
+
/**
|
|
861
|
+
* Sends a password reset link to the provided email address if an account exists.
|
|
862
|
+
* @summary Request a password reset
|
|
863
|
+
* @param {EmailRequest} emailRequest Email address to send the reset link to
|
|
864
|
+
* @param {*} [options] Override http request option.
|
|
865
|
+
* @throws {RequiredError}
|
|
866
|
+
*/
|
|
867
|
+
requestPasswordReset: (emailRequest: EmailRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
868
|
+
/**
|
|
869
|
+
* Submits a new password using a valid reset token. Invalidates the token after use.
|
|
870
|
+
* @summary Submit new password
|
|
871
|
+
* @param {ResetPasswordRequest} resetPasswordRequest Reset token and the new password
|
|
872
|
+
* @param {*} [options] Override http request option.
|
|
873
|
+
* @throws {RequiredError}
|
|
874
|
+
*/
|
|
875
|
+
submitNewPassword: (resetPasswordRequest: ResetPasswordRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
876
|
+
};
|
|
877
|
+
/**
|
|
878
|
+
* AuthApi - functional programming interface
|
|
879
|
+
*/
|
|
880
|
+
declare const AuthApiFp: (configuration?: Configuration) => {
|
|
881
|
+
/**
|
|
882
|
+
* Returns the currently authenticated user\'s session data. Requires a valid Bearer token.
|
|
883
|
+
* @summary Get current session
|
|
884
|
+
* @param {*} [options] Override http request option.
|
|
885
|
+
* @throws {RequiredError}
|
|
886
|
+
*/
|
|
887
|
+
getSession(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Session>>;
|
|
888
|
+
/**
|
|
889
|
+
* Authenticates a user with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
890
|
+
* @summary User login
|
|
891
|
+
* @param {LoginRequest} loginRequest User login credentials
|
|
892
|
+
* @param {*} [options] Override http request option.
|
|
893
|
+
* @throws {RequiredError}
|
|
894
|
+
*/
|
|
895
|
+
login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthResponse>>;
|
|
896
|
+
/**
|
|
897
|
+
* Invalidates the current session and refresh token. The client should discard stored tokens.
|
|
898
|
+
* @summary Logout
|
|
899
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
900
|
+
* @param {*} [options] Override http request option.
|
|
901
|
+
* @throws {RequiredError}
|
|
902
|
+
*/
|
|
903
|
+
logout(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
904
|
+
/**
|
|
905
|
+
* Issues a new access token using a valid refresh token. Rotate refresh tokens on each call.
|
|
906
|
+
* @summary Refresh access token
|
|
907
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
908
|
+
* @param {*} [options] Override http request option.
|
|
909
|
+
* @throws {RequiredError}
|
|
910
|
+
*/
|
|
911
|
+
refreshToken(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthResponse>>;
|
|
912
|
+
/**
|
|
913
|
+
* Creates a new user account with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
914
|
+
* @summary Register a new user
|
|
915
|
+
* @param {RegisterRequest} registerRequest User register credentials
|
|
916
|
+
* @param {*} [options] Override http request option.
|
|
917
|
+
* @throws {RequiredError}
|
|
918
|
+
*/
|
|
919
|
+
register(registerRequest: RegisterRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthResponse>>;
|
|
920
|
+
/**
|
|
921
|
+
* Validates the reset token from the email link and renders the password reset form.
|
|
922
|
+
* @summary Render password reset form
|
|
923
|
+
* @param {TokenQuery} token Password reset token
|
|
924
|
+
* @param {*} [options] Override http request option.
|
|
925
|
+
* @throws {RequiredError}
|
|
926
|
+
*/
|
|
927
|
+
renderResetForm(token: TokenQuery, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
|
|
928
|
+
/**
|
|
929
|
+
* Sends a password reset link to the provided email address if an account exists.
|
|
930
|
+
* @summary Request a password reset
|
|
931
|
+
* @param {EmailRequest} emailRequest Email address to send the reset link to
|
|
932
|
+
* @param {*} [options] Override http request option.
|
|
933
|
+
* @throws {RequiredError}
|
|
934
|
+
*/
|
|
935
|
+
requestPasswordReset(emailRequest: EmailRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ResetLink>>;
|
|
936
|
+
/**
|
|
937
|
+
* Submits a new password using a valid reset token. Invalidates the token after use.
|
|
938
|
+
* @summary Submit new password
|
|
939
|
+
* @param {ResetPasswordRequest} resetPasswordRequest Reset token and the new password
|
|
940
|
+
* @param {*} [options] Override http request option.
|
|
941
|
+
* @throws {RequiredError}
|
|
942
|
+
*/
|
|
943
|
+
submitNewPassword(resetPasswordRequest: ResetPasswordRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
944
|
+
};
|
|
945
|
+
/**
|
|
946
|
+
* AuthApi - factory interface
|
|
947
|
+
*/
|
|
948
|
+
declare const AuthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
949
|
+
/**
|
|
950
|
+
* Returns the currently authenticated user\'s session data. Requires a valid Bearer token.
|
|
951
|
+
* @summary Get current session
|
|
952
|
+
* @param {*} [options] Override http request option.
|
|
953
|
+
* @throws {RequiredError}
|
|
954
|
+
*/
|
|
955
|
+
getSession(options?: RawAxiosRequestConfig): AxiosPromise<Session>;
|
|
956
|
+
/**
|
|
957
|
+
* Authenticates a user with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
958
|
+
* @summary User login
|
|
959
|
+
* @param {LoginRequest} loginRequest User login credentials
|
|
960
|
+
* @param {*} [options] Override http request option.
|
|
961
|
+
* @throws {RequiredError}
|
|
962
|
+
*/
|
|
963
|
+
login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponse>;
|
|
964
|
+
/**
|
|
965
|
+
* Invalidates the current session and refresh token. The client should discard stored tokens.
|
|
966
|
+
* @summary Logout
|
|
967
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
968
|
+
* @param {*} [options] Override http request option.
|
|
969
|
+
* @throws {RequiredError}
|
|
970
|
+
*/
|
|
971
|
+
logout(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
972
|
+
/**
|
|
973
|
+
* Issues a new access token using a valid refresh token. Rotate refresh tokens on each call.
|
|
974
|
+
* @summary Refresh access token
|
|
975
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
976
|
+
* @param {*} [options] Override http request option.
|
|
977
|
+
* @throws {RequiredError}
|
|
978
|
+
*/
|
|
979
|
+
refreshToken(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponse>;
|
|
980
|
+
/**
|
|
981
|
+
* Creates a new user account with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
982
|
+
* @summary Register a new user
|
|
983
|
+
* @param {RegisterRequest} registerRequest User register credentials
|
|
984
|
+
* @param {*} [options] Override http request option.
|
|
985
|
+
* @throws {RequiredError}
|
|
986
|
+
*/
|
|
987
|
+
register(registerRequest: RegisterRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponse>;
|
|
988
|
+
/**
|
|
989
|
+
* Validates the reset token from the email link and renders the password reset form.
|
|
990
|
+
* @summary Render password reset form
|
|
991
|
+
* @param {TokenQuery} token Password reset token
|
|
992
|
+
* @param {*} [options] Override http request option.
|
|
993
|
+
* @throws {RequiredError}
|
|
994
|
+
*/
|
|
995
|
+
renderResetForm(token: TokenQuery, options?: RawAxiosRequestConfig): AxiosPromise<string>;
|
|
996
|
+
/**
|
|
997
|
+
* Sends a password reset link to the provided email address if an account exists.
|
|
998
|
+
* @summary Request a password reset
|
|
999
|
+
* @param {EmailRequest} emailRequest Email address to send the reset link to
|
|
1000
|
+
* @param {*} [options] Override http request option.
|
|
1001
|
+
* @throws {RequiredError}
|
|
1002
|
+
*/
|
|
1003
|
+
requestPasswordReset(emailRequest: EmailRequest, options?: RawAxiosRequestConfig): AxiosPromise<ResetLink>;
|
|
1004
|
+
/**
|
|
1005
|
+
* Submits a new password using a valid reset token. Invalidates the token after use.
|
|
1006
|
+
* @summary Submit new password
|
|
1007
|
+
* @param {ResetPasswordRequest} resetPasswordRequest Reset token and the new password
|
|
1008
|
+
* @param {*} [options] Override http request option.
|
|
1009
|
+
* @throws {RequiredError}
|
|
1010
|
+
*/
|
|
1011
|
+
submitNewPassword(resetPasswordRequest: ResetPasswordRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
1012
|
+
};
|
|
1013
|
+
/**
|
|
1014
|
+
* AuthApi - object-oriented interface
|
|
1015
|
+
*/
|
|
1016
|
+
declare class AuthApi extends BaseAPI {
|
|
1017
|
+
/**
|
|
1018
|
+
* Returns the currently authenticated user\'s session data. Requires a valid Bearer token.
|
|
1019
|
+
* @summary Get current session
|
|
1020
|
+
* @param {*} [options] Override http request option.
|
|
1021
|
+
* @throws {RequiredError}
|
|
1022
|
+
*/
|
|
1023
|
+
getSession(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<Session, any, {}>>;
|
|
1024
|
+
/**
|
|
1025
|
+
* Authenticates a user with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
1026
|
+
* @summary User login
|
|
1027
|
+
* @param {LoginRequest} loginRequest User login credentials
|
|
1028
|
+
* @param {*} [options] Override http request option.
|
|
1029
|
+
* @throws {RequiredError}
|
|
1030
|
+
*/
|
|
1031
|
+
login(loginRequest: LoginRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<AuthResponse, any, {}>>;
|
|
1032
|
+
/**
|
|
1033
|
+
* Invalidates the current session and refresh token. The client should discard stored tokens.
|
|
1034
|
+
* @summary Logout
|
|
1035
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
1036
|
+
* @param {*} [options] Override http request option.
|
|
1037
|
+
* @throws {RequiredError}
|
|
1038
|
+
*/
|
|
1039
|
+
logout(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<void, any, {}>>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Issues a new access token using a valid refresh token. Rotate refresh tokens on each call.
|
|
1042
|
+
* @summary Refresh access token
|
|
1043
|
+
* @param {RefreshTokenRequest} refreshTokenRequest
|
|
1044
|
+
* @param {*} [options] Override http request option.
|
|
1045
|
+
* @throws {RequiredError}
|
|
1046
|
+
*/
|
|
1047
|
+
refreshToken(refreshTokenRequest: RefreshTokenRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<AuthResponse, any, {}>>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Creates a new user account with email and password. **Session strategy**: Returns a session cookie (`id`) managed by the server. **JWT strategy**: Returns `access` and `refresh` in the response body.
|
|
1050
|
+
* @summary Register a new user
|
|
1051
|
+
* @param {RegisterRequest} registerRequest User register credentials
|
|
1052
|
+
* @param {*} [options] Override http request option.
|
|
1053
|
+
* @throws {RequiredError}
|
|
1054
|
+
*/
|
|
1055
|
+
register(registerRequest: RegisterRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<AuthResponse, any, {}>>;
|
|
1056
|
+
/**
|
|
1057
|
+
* Validates the reset token from the email link and renders the password reset form.
|
|
1058
|
+
* @summary Render password reset form
|
|
1059
|
+
* @param {TokenQuery} token Password reset token
|
|
1060
|
+
* @param {*} [options] Override http request option.
|
|
1061
|
+
* @throws {RequiredError}
|
|
1062
|
+
*/
|
|
1063
|
+
renderResetForm(token: TokenQuery, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<string, any, {}>>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Sends a password reset link to the provided email address if an account exists.
|
|
1066
|
+
* @summary Request a password reset
|
|
1067
|
+
* @param {EmailRequest} emailRequest Email address to send the reset link to
|
|
1068
|
+
* @param {*} [options] Override http request option.
|
|
1069
|
+
* @throws {RequiredError}
|
|
1070
|
+
*/
|
|
1071
|
+
requestPasswordReset(emailRequest: EmailRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<ResetLink, any, {}>>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Submits a new password using a valid reset token. Invalidates the token after use.
|
|
1074
|
+
* @summary Submit new password
|
|
1075
|
+
* @param {ResetPasswordRequest} resetPasswordRequest Reset token and the new password
|
|
1076
|
+
* @param {*} [options] Override http request option.
|
|
1077
|
+
* @throws {RequiredError}
|
|
1078
|
+
*/
|
|
1079
|
+
submitNewPassword(resetPasswordRequest: ResetPasswordRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<void, any, {}>>;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* EmailApi - axios parameter creator
|
|
1084
|
+
*/
|
|
1085
|
+
declare const EmailApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
1086
|
+
/**
|
|
1087
|
+
* Validates the email token and update the user account.
|
|
1088
|
+
* @summary Verify user email
|
|
1089
|
+
* @param {TokenQuery} token Email Verification Token
|
|
1090
|
+
* @param {*} [options] Override http request option.
|
|
1091
|
+
* @throws {RequiredError}
|
|
1092
|
+
*/
|
|
1093
|
+
verifyEmail: (token: TokenQuery, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1094
|
+
};
|
|
1095
|
+
/**
|
|
1096
|
+
* EmailApi - functional programming interface
|
|
1097
|
+
*/
|
|
1098
|
+
declare const EmailApiFp: (configuration?: Configuration) => {
|
|
1099
|
+
/**
|
|
1100
|
+
* Validates the email token and update the user account.
|
|
1101
|
+
* @summary Verify user email
|
|
1102
|
+
* @param {TokenQuery} token Email Verification Token
|
|
1103
|
+
* @param {*} [options] Override http request option.
|
|
1104
|
+
* @throws {RequiredError}
|
|
1105
|
+
*/
|
|
1106
|
+
verifyEmail(token: TokenQuery, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
|
|
1107
|
+
};
|
|
1108
|
+
/**
|
|
1109
|
+
* EmailApi - factory interface
|
|
1110
|
+
*/
|
|
1111
|
+
declare const EmailApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
1112
|
+
/**
|
|
1113
|
+
* Validates the email token and update the user account.
|
|
1114
|
+
* @summary Verify user email
|
|
1115
|
+
* @param {TokenQuery} token Email Verification Token
|
|
1116
|
+
* @param {*} [options] Override http request option.
|
|
1117
|
+
* @throws {RequiredError}
|
|
1118
|
+
*/
|
|
1119
|
+
verifyEmail(token: TokenQuery, options?: RawAxiosRequestConfig): AxiosPromise<void>;
|
|
1120
|
+
};
|
|
1121
|
+
/**
|
|
1122
|
+
* EmailApi - object-oriented interface
|
|
1123
|
+
*/
|
|
1124
|
+
declare class EmailApi extends BaseAPI {
|
|
1125
|
+
/**
|
|
1126
|
+
* Validates the email token and update the user account.
|
|
1127
|
+
* @summary Verify user email
|
|
1128
|
+
* @param {TokenQuery} token Email Verification Token
|
|
1129
|
+
* @param {*} [options] Override http request option.
|
|
1130
|
+
* @throws {RequiredError}
|
|
1131
|
+
*/
|
|
1132
|
+
verifyEmail(token: TokenQuery, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<void, any, {}>>;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* UsersApi - axios parameter creator
|
|
1137
|
+
*/
|
|
1138
|
+
declare const UsersApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
1139
|
+
/**
|
|
1140
|
+
* Returns the currently authenticated user\'s data. Requires a valid Bearer token.
|
|
1141
|
+
* @summary Get current User
|
|
1142
|
+
* @param {*} [options] Override http request option.
|
|
1143
|
+
* @throws {RequiredError}
|
|
1144
|
+
*/
|
|
1145
|
+
findUser: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1146
|
+
};
|
|
1147
|
+
/**
|
|
1148
|
+
* UsersApi - functional programming interface
|
|
1149
|
+
*/
|
|
1150
|
+
declare const UsersApiFp: (configuration?: Configuration) => {
|
|
1151
|
+
/**
|
|
1152
|
+
* Returns the currently authenticated user\'s data. Requires a valid Bearer token.
|
|
1153
|
+
* @summary Get current User
|
|
1154
|
+
* @param {*} [options] Override http request option.
|
|
1155
|
+
* @throws {RequiredError}
|
|
1156
|
+
*/
|
|
1157
|
+
findUser(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>>;
|
|
1158
|
+
};
|
|
1159
|
+
/**
|
|
1160
|
+
* UsersApi - factory interface
|
|
1161
|
+
*/
|
|
1162
|
+
declare const UsersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
1163
|
+
/**
|
|
1164
|
+
* Returns the currently authenticated user\'s data. Requires a valid Bearer token.
|
|
1165
|
+
* @summary Get current User
|
|
1166
|
+
* @param {*} [options] Override http request option.
|
|
1167
|
+
* @throws {RequiredError}
|
|
1168
|
+
*/
|
|
1169
|
+
findUser(options?: RawAxiosRequestConfig): AxiosPromise<User>;
|
|
1170
|
+
};
|
|
1171
|
+
/**
|
|
1172
|
+
* UsersApi - object-oriented interface
|
|
1173
|
+
*/
|
|
1174
|
+
declare class UsersApi extends BaseAPI {
|
|
1175
|
+
/**
|
|
1176
|
+
* Returns the currently authenticated user\'s data. Requires a valid Bearer token.
|
|
1177
|
+
* @summary Get current User
|
|
1178
|
+
* @param {*} [options] Override http request option.
|
|
1179
|
+
* @throws {RequiredError}
|
|
1180
|
+
*/
|
|
1181
|
+
findUser(options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<User, any, {}>>;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
export { AlgorithmConfig, type AnzarConfiguration, type App, AuthApi, AuthApiAxiosParamCreator, AuthApiFactory, AuthApiFp, type AuthResponse, AuthStrategy, type Authentication, type Cache, CacheDriver, Configuration, type ConfigurationParameters, type CorsConfig, type Database, DatabaseDriver, EmailApi, EmailApiAxiosParamCreator, EmailApiFactory, EmailApiFp, type EmailConfig, type EmailRequest, type EmailVerification, ErrorCode, type ErrorResponse, type HttpsConfig, type JwtConfig, type LoginRequest, type PasswordConfig, type PasswordRequirements, type PasswordReset, type PasswordSecurity, type RefreshTokenRequest, type RegisterRequest, type ResetLink, type ResetPasswordRequest, Role, SameSiteConfig, type Security, type Server, type Session, type SessionConfig, type SessionTokens, type TokenQuery, type User, UsersApi, UsersApiAxiosParamCreator, UsersApiFactory, UsersApiFp, type Verification };
|