@se-uulm/snowballr-api-client 0.2.1-alpha.08dc516 → 0.2.1-alpha.0d3f25e
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/README.md +111 -28
- package/dist/apis/AuthControllerApi.d.ts +181 -0
- package/dist/apis/AuthControllerApi.js +216 -0
- package/dist/apis/ProjectsControllerApi.d.ts +66 -13
- package/dist/apis/ProjectsControllerApi.js +60 -23
- package/dist/apis/UsersControllerApi.d.ts +60 -0
- package/dist/apis/UsersControllerApi.js +70 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/AuthControllerApi.d.ts +181 -0
- package/dist/esm/apis/AuthControllerApi.js +212 -0
- package/dist/esm/apis/ProjectsControllerApi.d.ts +66 -13
- package/dist/esm/apis/ProjectsControllerApi.js +59 -22
- package/dist/esm/apis/UsersControllerApi.d.ts +60 -0
- package/dist/esm/apis/UsersControllerApi.js +66 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/ChangePasswordRequest.d.ts +34 -0
- package/dist/esm/models/ChangePasswordRequest.js +43 -0
- package/dist/esm/models/CreateProjectRequest.d.ts +0 -2
- package/dist/esm/models/DecisionMatrixPattern.d.ts +0 -4
- package/dist/esm/models/DecisionMatrixPattern.js +1 -1
- package/dist/esm/models/DecisionMatrixPatternEntry.d.ts +0 -4
- package/dist/esm/models/DecisionMatrixPatternEntry.js +1 -1
- package/dist/esm/models/LoginRequest.d.ts +34 -0
- package/dist/esm/models/LoginRequest.js +43 -0
- package/dist/esm/models/ProjectResponse.d.ts +66 -0
- package/dist/esm/models/ProjectResponse.js +65 -0
- package/dist/esm/models/ProjectSettings.d.ts +60 -0
- package/dist/esm/models/{Project.js → ProjectSettings.js} +10 -32
- package/dist/esm/models/RegisterRequest.d.ts +42 -0
- package/dist/esm/models/RegisterRequest.js +47 -0
- package/dist/esm/models/ReviewDecisionMatrix.d.ts +0 -4
- package/dist/esm/models/index.d.ts +5 -1
- package/dist/esm/models/index.js +5 -1
- package/dist/esm/runtime.d.ts +34 -1
- package/dist/esm/runtime.js +130 -4
- package/dist/models/ChangePasswordRequest.d.ts +34 -0
- package/dist/models/ChangePasswordRequest.js +50 -0
- package/dist/models/CreateProjectRequest.d.ts +0 -2
- package/dist/models/DecisionMatrixPattern.d.ts +0 -4
- package/dist/models/DecisionMatrixPattern.js +1 -1
- package/dist/models/DecisionMatrixPatternEntry.d.ts +0 -4
- package/dist/models/DecisionMatrixPatternEntry.js +1 -1
- package/dist/models/LoginRequest.d.ts +34 -0
- package/dist/models/LoginRequest.js +50 -0
- package/dist/models/ProjectResponse.d.ts +66 -0
- package/dist/models/ProjectResponse.js +73 -0
- package/dist/models/ProjectSettings.d.ts +60 -0
- package/dist/models/ProjectSettings.js +66 -0
- package/dist/models/RegisterRequest.d.ts +42 -0
- package/dist/models/RegisterRequest.js +54 -0
- package/dist/models/ReviewDecisionMatrix.d.ts +0 -4
- package/dist/models/index.d.ts +5 -1
- package/dist/models/index.js +5 -1
- package/dist/runtime.d.ts +34 -1
- package/dist/runtime.js +136 -4
- package/package.json +11 -5
- package/.openapi-generator/FILES +0 -17
- package/.openapi-generator/VERSION +0 -1
- package/.openapi-generator-ignore +0 -23
- package/dist/esm/models/Project.d.ts +0 -117
- package/dist/models/Project.d.ts +0 -117
- package/dist/models/Project.js +0 -88
- package/src/apis/ProjectsControllerApi.ts +0 -238
- package/src/apis/index.ts +0 -3
- package/src/index.ts +0 -5
- package/src/models/CreateProjectRequest.ts +0 -65
- package/src/models/DecisionMatrixPattern.ts +0 -94
- package/src/models/DecisionMatrixPatternEntry.ts +0 -85
- package/src/models/Project.ts +0 -177
- package/src/models/ReviewDecisionMatrix.ts +0 -81
- package/src/models/index.ts +0 -7
- package/src/runtime.ts +0 -432
- package/tsconfig.esm.json +0 -7
- package/tsconfig.json +0 -16
package/README.md
CHANGED
|
@@ -1,46 +1,129 @@
|
|
|
1
|
-
|
|
1
|
+
# @se-uulm/snowballr-api-client@0.2.1-alpha.0d3f25e
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
* Node.js
|
|
7
|
-
* Webpack
|
|
8
|
-
* Browserify
|
|
5
|
+
## Usage
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
* ES5 - you must have a Promises/A+ library installed
|
|
12
|
-
* ES6
|
|
7
|
+
First, install the SDK from npm.
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
```bash
|
|
10
|
+
npm install @se-uulm/snowballr-api-client --save
|
|
11
|
+
```
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
Next, try it out.
|
|
19
14
|
|
|
20
|
-
### Building
|
|
21
15
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
```ts
|
|
17
|
+
import {
|
|
18
|
+
Configuration,
|
|
19
|
+
AuthControllerApi,
|
|
20
|
+
} from '@se-uulm/snowballr-api-client';
|
|
21
|
+
import type { ChangePasswordOperationRequest } from '@se-uulm/snowballr-api-client';
|
|
22
|
+
|
|
23
|
+
async function example() {
|
|
24
|
+
console.log("🚀 Testing @se-uulm/snowballr-api-client SDK...");
|
|
25
|
+
const api = new AuthControllerApi();
|
|
26
|
+
|
|
27
|
+
const body = {
|
|
28
|
+
// ChangePasswordRequest
|
|
29
|
+
changePasswordRequest: ...,
|
|
30
|
+
} satisfies ChangePasswordOperationRequest;
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
const data = await api.changePassword(body);
|
|
34
|
+
console.log(data);
|
|
35
|
+
} catch (error) {
|
|
36
|
+
console.error(error);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Run the test
|
|
41
|
+
example().catch(console.error);
|
|
26
42
|
```
|
|
27
43
|
|
|
28
|
-
### Publishing
|
|
29
44
|
|
|
30
|
-
|
|
45
|
+
## Documentation
|
|
31
46
|
|
|
32
|
-
###
|
|
47
|
+
### API Endpoints
|
|
33
48
|
|
|
34
|
-
|
|
49
|
+
All URIs are relative to *http://localhost*
|
|
35
50
|
|
|
36
|
-
|
|
51
|
+
| Class | Method | HTTP request | Description
|
|
52
|
+
| ----- | ------ | ------------ | -------------
|
|
53
|
+
*AuthControllerApi* | [**changePassword**](docs/AuthControllerApi.md#changepasswordoperation) | **POST** /api/v1/auth/change-password |
|
|
54
|
+
*AuthControllerApi* | [**getAuthStatus**](docs/AuthControllerApi.md#getauthstatus) | **GET** /api/v1/auth/status |
|
|
55
|
+
*AuthControllerApi* | [**login**](docs/AuthControllerApi.md#loginoperation) | **POST** /api/v1/auth/login |
|
|
56
|
+
*AuthControllerApi* | [**logout**](docs/AuthControllerApi.md#logout) | **POST** /api/v1/auth/logout |
|
|
57
|
+
*AuthControllerApi* | [**verifyEmail**](docs/AuthControllerApi.md#verifyemail) | **POST** /api/v1/auth/verify-email |
|
|
58
|
+
*ProjectsControllerApi* | [**createProject**](docs/ProjectsControllerApi.md#createprojectoperation) | **POST** /api/v1/projects |
|
|
59
|
+
*ProjectsControllerApi* | [**deleteProject**](docs/ProjectsControllerApi.md#deleteproject) | **DELETE** /api/v1/projects/{id} |
|
|
60
|
+
*ProjectsControllerApi* | [**getAllProjects**](docs/ProjectsControllerApi.md#getallprojects) | **GET** /api/v1/projects |
|
|
61
|
+
*ProjectsControllerApi* | [**getProject**](docs/ProjectsControllerApi.md#getproject) | **GET** /api/v1/projects/{id} |
|
|
62
|
+
*UsersControllerApi* | [**register**](docs/UsersControllerApi.md#registeroperation) | **POST** /api/v1/users |
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
### Models
|
|
66
|
+
|
|
67
|
+
- [ChangePasswordRequest](docs/ChangePasswordRequest.md)
|
|
68
|
+
- [CreateProjectRequest](docs/CreateProjectRequest.md)
|
|
69
|
+
- [DecisionMatrixPattern](docs/DecisionMatrixPattern.md)
|
|
70
|
+
- [DecisionMatrixPatternEntry](docs/DecisionMatrixPatternEntry.md)
|
|
71
|
+
- [LoginRequest](docs/LoginRequest.md)
|
|
72
|
+
- [ProjectResponse](docs/ProjectResponse.md)
|
|
73
|
+
- [ProjectSettings](docs/ProjectSettings.md)
|
|
74
|
+
- [RegisterRequest](docs/RegisterRequest.md)
|
|
75
|
+
- [ReviewDecisionMatrix](docs/ReviewDecisionMatrix.md)
|
|
76
|
+
|
|
77
|
+
### Authorization
|
|
78
|
+
|
|
79
|
+
Endpoints do not require authorization.
|
|
37
80
|
|
|
38
|
-
```
|
|
39
|
-
npm install @se-uulm/snowballr-api-client@0.2.1-alpha.08dc516 --save
|
|
40
|
-
```
|
|
41
81
|
|
|
42
|
-
|
|
82
|
+
## About
|
|
43
83
|
|
|
84
|
+
This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.org/)
|
|
85
|
+
and is automatically generated by the
|
|
86
|
+
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
87
|
+
|
|
88
|
+
- API version: `v1`
|
|
89
|
+
- Package version: `0.2.1-alpha.0d3f25e`
|
|
90
|
+
- Generator version: `7.26.0`
|
|
91
|
+
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
92
|
+
|
|
93
|
+
The generated npm module supports the following:
|
|
94
|
+
|
|
95
|
+
- Environments
|
|
96
|
+
* Node.js
|
|
97
|
+
* Webpack
|
|
98
|
+
* Browserify
|
|
99
|
+
- Language levels
|
|
100
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
101
|
+
* ES6
|
|
102
|
+
- Module systems
|
|
103
|
+
* CommonJS
|
|
104
|
+
* ES6 module system
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## Development
|
|
108
|
+
|
|
109
|
+
### Building
|
|
110
|
+
|
|
111
|
+
To build the TypeScript source code, you need to have Node.js and npm installed.
|
|
112
|
+
After cloning the repository, navigate to the project directory and run:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npm install
|
|
116
|
+
npm run build
|
|
44
117
|
```
|
|
45
|
-
|
|
118
|
+
|
|
119
|
+
### Publishing
|
|
120
|
+
|
|
121
|
+
Once you've built the package, you can publish it to npm:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm publish
|
|
46
125
|
```
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
[]()
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SnowballR API
|
|
3
|
+
* REST API for the SnowballR Application
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import { type ChangePasswordRequest } from '../models/ChangePasswordRequest';
|
|
14
|
+
import { type LoginRequest } from '../models/LoginRequest';
|
|
15
|
+
export interface ChangePasswordOperationRequest {
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
changePasswordRequest: ChangePasswordRequest;
|
|
20
|
+
}
|
|
21
|
+
export interface LoginOperationRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
loginRequest: LoginRequest;
|
|
26
|
+
}
|
|
27
|
+
export interface VerifyEmailRequest {
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
token: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* AuthControllerApi - interface
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @interface AuthControllerApiInterface
|
|
38
|
+
*/
|
|
39
|
+
export interface AuthControllerApiInterface {
|
|
40
|
+
/**
|
|
41
|
+
* Creates request options for changePassword without sending the request
|
|
42
|
+
* @param {ChangePasswordRequest} changePasswordRequest
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
* @memberof AuthControllerApiInterface
|
|
45
|
+
*/
|
|
46
|
+
changePasswordRequestOpts(requestParameters: ChangePasswordOperationRequest): Promise<runtime.RequestOpts>;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @param {ChangePasswordRequest} changePasswordRequest
|
|
50
|
+
* @param {*} [options] Override http request option.
|
|
51
|
+
* @throws {RequiredError}
|
|
52
|
+
* @memberof AuthControllerApiInterface
|
|
53
|
+
*/
|
|
54
|
+
changePasswordRaw(requestParameters: ChangePasswordOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
55
|
+
/**
|
|
56
|
+
*/
|
|
57
|
+
changePassword(requestParameters: ChangePasswordOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Creates request options for getAuthStatus without sending the request
|
|
60
|
+
* @throws {RequiredError}
|
|
61
|
+
* @memberof AuthControllerApiInterface
|
|
62
|
+
*/
|
|
63
|
+
getAuthStatusRequestOpts(): Promise<runtime.RequestOpts>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @param {*} [options] Override http request option.
|
|
67
|
+
* @throws {RequiredError}
|
|
68
|
+
* @memberof AuthControllerApiInterface
|
|
69
|
+
*/
|
|
70
|
+
getAuthStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
71
|
+
/**
|
|
72
|
+
*/
|
|
73
|
+
getAuthStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
74
|
+
/**
|
|
75
|
+
* Creates request options for login without sending the request
|
|
76
|
+
* @param {LoginRequest} loginRequest
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
* @memberof AuthControllerApiInterface
|
|
79
|
+
*/
|
|
80
|
+
loginRequestOpts(requestParameters: LoginOperationRequest): Promise<runtime.RequestOpts>;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @param {LoginRequest} loginRequest
|
|
84
|
+
* @param {*} [options] Override http request option.
|
|
85
|
+
* @throws {RequiredError}
|
|
86
|
+
* @memberof AuthControllerApiInterface
|
|
87
|
+
*/
|
|
88
|
+
loginRaw(requestParameters: LoginOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
89
|
+
/**
|
|
90
|
+
*/
|
|
91
|
+
login(requestParameters: LoginOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Creates request options for logout without sending the request
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
* @memberof AuthControllerApiInterface
|
|
96
|
+
*/
|
|
97
|
+
logoutRequestOpts(): Promise<runtime.RequestOpts>;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
* @memberof AuthControllerApiInterface
|
|
103
|
+
*/
|
|
104
|
+
logoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
105
|
+
/**
|
|
106
|
+
*/
|
|
107
|
+
logout(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Creates request options for verifyEmail without sending the request
|
|
110
|
+
* @param {string} token
|
|
111
|
+
* @throws {RequiredError}
|
|
112
|
+
* @memberof AuthControllerApiInterface
|
|
113
|
+
*/
|
|
114
|
+
verifyEmailRequestOpts(requestParameters: VerifyEmailRequest): Promise<runtime.RequestOpts>;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @param {string} token
|
|
118
|
+
* @param {*} [options] Override http request option.
|
|
119
|
+
* @throws {RequiredError}
|
|
120
|
+
* @memberof AuthControllerApiInterface
|
|
121
|
+
*/
|
|
122
|
+
verifyEmailRaw(requestParameters: VerifyEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
123
|
+
/**
|
|
124
|
+
*/
|
|
125
|
+
verifyEmail(requestParameters: VerifyEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
*
|
|
129
|
+
*/
|
|
130
|
+
export declare class AuthControllerApi extends runtime.BaseAPI implements AuthControllerApiInterface {
|
|
131
|
+
/**
|
|
132
|
+
* Creates request options for changePassword without sending the request
|
|
133
|
+
*/
|
|
134
|
+
changePasswordRequestOpts(requestParameters: ChangePasswordOperationRequest): Promise<runtime.RequestOpts>;
|
|
135
|
+
/**
|
|
136
|
+
*/
|
|
137
|
+
changePasswordRaw(requestParameters: ChangePasswordOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
138
|
+
/**
|
|
139
|
+
*/
|
|
140
|
+
changePassword(requestParameters: ChangePasswordOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Creates request options for getAuthStatus without sending the request
|
|
143
|
+
*/
|
|
144
|
+
getAuthStatusRequestOpts(): Promise<runtime.RequestOpts>;
|
|
145
|
+
/**
|
|
146
|
+
*/
|
|
147
|
+
getAuthStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
148
|
+
/**
|
|
149
|
+
*/
|
|
150
|
+
getAuthStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
151
|
+
/**
|
|
152
|
+
* Creates request options for login without sending the request
|
|
153
|
+
*/
|
|
154
|
+
loginRequestOpts(requestParameters: LoginOperationRequest): Promise<runtime.RequestOpts>;
|
|
155
|
+
/**
|
|
156
|
+
*/
|
|
157
|
+
loginRaw(requestParameters: LoginOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
158
|
+
/**
|
|
159
|
+
*/
|
|
160
|
+
login(requestParameters: LoginOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Creates request options for logout without sending the request
|
|
163
|
+
*/
|
|
164
|
+
logoutRequestOpts(): Promise<runtime.RequestOpts>;
|
|
165
|
+
/**
|
|
166
|
+
*/
|
|
167
|
+
logoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
168
|
+
/**
|
|
169
|
+
*/
|
|
170
|
+
logout(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Creates request options for verifyEmail without sending the request
|
|
173
|
+
*/
|
|
174
|
+
verifyEmailRequestOpts(requestParameters: VerifyEmailRequest): Promise<runtime.RequestOpts>;
|
|
175
|
+
/**
|
|
176
|
+
*/
|
|
177
|
+
verifyEmailRaw(requestParameters: VerifyEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
178
|
+
/**
|
|
179
|
+
*/
|
|
180
|
+
verifyEmail(requestParameters: VerifyEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
181
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* SnowballR API
|
|
6
|
+
* REST API for the SnowballR Application
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.AuthControllerApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const ChangePasswordRequest_1 = require("../models/ChangePasswordRequest");
|
|
28
|
+
const LoginRequest_1 = require("../models/LoginRequest");
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
class AuthControllerApi extends runtime.BaseAPI {
|
|
33
|
+
/**
|
|
34
|
+
* Creates request options for changePassword without sending the request
|
|
35
|
+
*/
|
|
36
|
+
changePasswordRequestOpts(requestParameters) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['changePasswordRequest'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('changePasswordRequest', 'Required parameter "changePasswordRequest" was null or undefined when calling changePassword().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
+
let urlPath = `/api/v1/auth/change-password`;
|
|
45
|
+
return {
|
|
46
|
+
path: urlPath,
|
|
47
|
+
method: 'POST',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
body: (0, ChangePasswordRequest_1.ChangePasswordRequestToJSON)(requestParameters['changePasswordRequest']),
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
*/
|
|
56
|
+
changePasswordRaw(requestParameters, initOverrides) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const requestOptions = yield this.changePasswordRequestOpts(requestParameters);
|
|
59
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
60
|
+
return new runtime.VoidApiResponse(response);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
*/
|
|
65
|
+
changePassword(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
yield this.changePasswordRaw(requestParameters, initOverrides);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates request options for getAuthStatus without sending the request
|
|
72
|
+
*/
|
|
73
|
+
getAuthStatusRequestOpts() {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const queryParameters = {};
|
|
76
|
+
const headerParameters = {};
|
|
77
|
+
let urlPath = `/api/v1/auth/status`;
|
|
78
|
+
return {
|
|
79
|
+
path: urlPath,
|
|
80
|
+
method: 'GET',
|
|
81
|
+
headers: headerParameters,
|
|
82
|
+
query: queryParameters,
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
*/
|
|
88
|
+
getAuthStatusRaw(initOverrides) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const requestOptions = yield this.getAuthStatusRequestOpts();
|
|
91
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
92
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
93
|
+
return new runtime.JSONApiResponse(response);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
return new runtime.TextApiResponse(response);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
*/
|
|
102
|
+
getAuthStatus(initOverrides) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
const response = yield this.getAuthStatusRaw(initOverrides);
|
|
105
|
+
return yield response.value();
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Creates request options for login without sending the request
|
|
110
|
+
*/
|
|
111
|
+
loginRequestOpts(requestParameters) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
if (requestParameters['loginRequest'] == null) {
|
|
114
|
+
throw new runtime.RequiredError('loginRequest', 'Required parameter "loginRequest" was null or undefined when calling login().');
|
|
115
|
+
}
|
|
116
|
+
const queryParameters = {};
|
|
117
|
+
const headerParameters = {};
|
|
118
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
119
|
+
let urlPath = `/api/v1/auth/login`;
|
|
120
|
+
return {
|
|
121
|
+
path: urlPath,
|
|
122
|
+
method: 'POST',
|
|
123
|
+
headers: headerParameters,
|
|
124
|
+
query: queryParameters,
|
|
125
|
+
body: (0, LoginRequest_1.LoginRequestToJSON)(requestParameters['loginRequest']),
|
|
126
|
+
};
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
*/
|
|
131
|
+
loginRaw(requestParameters, initOverrides) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
const requestOptions = yield this.loginRequestOpts(requestParameters);
|
|
134
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
135
|
+
return new runtime.VoidApiResponse(response);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
*/
|
|
140
|
+
login(requestParameters, initOverrides) {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
yield this.loginRaw(requestParameters, initOverrides);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Creates request options for logout without sending the request
|
|
147
|
+
*/
|
|
148
|
+
logoutRequestOpts() {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
const queryParameters = {};
|
|
151
|
+
const headerParameters = {};
|
|
152
|
+
let urlPath = `/api/v1/auth/logout`;
|
|
153
|
+
return {
|
|
154
|
+
path: urlPath,
|
|
155
|
+
method: 'POST',
|
|
156
|
+
headers: headerParameters,
|
|
157
|
+
query: queryParameters,
|
|
158
|
+
};
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
*/
|
|
163
|
+
logoutRaw(initOverrides) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
const requestOptions = yield this.logoutRequestOpts();
|
|
166
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
167
|
+
return new runtime.VoidApiResponse(response);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
*/
|
|
172
|
+
logout(initOverrides) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
yield this.logoutRaw(initOverrides);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Creates request options for verifyEmail without sending the request
|
|
179
|
+
*/
|
|
180
|
+
verifyEmailRequestOpts(requestParameters) {
|
|
181
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
if (requestParameters['token'] == null) {
|
|
183
|
+
throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling verifyEmail().');
|
|
184
|
+
}
|
|
185
|
+
const queryParameters = {};
|
|
186
|
+
if (requestParameters['token'] != null) {
|
|
187
|
+
queryParameters['token'] = requestParameters['token'];
|
|
188
|
+
}
|
|
189
|
+
const headerParameters = {};
|
|
190
|
+
let urlPath = `/api/v1/auth/verify-email`;
|
|
191
|
+
return {
|
|
192
|
+
path: urlPath,
|
|
193
|
+
method: 'POST',
|
|
194
|
+
headers: headerParameters,
|
|
195
|
+
query: queryParameters,
|
|
196
|
+
};
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
*/
|
|
201
|
+
verifyEmailRaw(requestParameters, initOverrides) {
|
|
202
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
203
|
+
const requestOptions = yield this.verifyEmailRequestOpts(requestParameters);
|
|
204
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
205
|
+
return new runtime.VoidApiResponse(response);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
*/
|
|
210
|
+
verifyEmail(requestParameters, initOverrides) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
yield this.verifyEmailRaw(requestParameters, initOverrides);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
exports.AuthControllerApi = AuthControllerApi;
|