@daytonaio/api-client 0.4.0 → 0.5.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/.openapi-generator/FILES +4 -8
- package/README.md +2 -2
- package/api/api-keys-api.ts +353 -0
- package/api/default-api.ts +36 -3313
- package/api/docker-registry-api.ts +108 -108
- package/api/nodes-api.ts +274 -0
- package/api/users-api.ts +274 -0
- package/api/workspace-api.ts +760 -0
- package/api.ts +4 -0
- package/dist/api/api-keys-api.d.ts +171 -0
- package/dist/api/api-keys-api.js +339 -0
- package/dist/api/default-api.d.ts +15 -1454
- package/dist/api/default-api.js +43 -3090
- package/dist/api/docker-registry-api.d.ts +64 -64
- package/dist/api/docker-registry-api.js +108 -108
- package/dist/api/nodes-api.d.ts +135 -0
- package/dist/api/nodes-api.js +270 -0
- package/dist/api/users-api.d.ts +135 -0
- package/dist/api/users-api.js +270 -0
- package/dist/api/workspace-api.d.ts +356 -0
- package/dist/api/workspace-api.js +722 -0
- package/dist/api.d.ts +4 -0
- package/dist/api.js +4 -0
- package/dist/esm/api/api-keys-api.d.ts +171 -0
- package/dist/esm/api/api-keys-api.js +332 -0
- package/dist/esm/api/default-api.d.ts +15 -1454
- package/dist/esm/api/default-api.js +41 -3088
- package/dist/esm/api/docker-registry-api.d.ts +64 -64
- package/dist/esm/api/docker-registry-api.js +108 -108
- package/dist/esm/api/nodes-api.d.ts +135 -0
- package/dist/esm/api/nodes-api.js +263 -0
- package/dist/esm/api/users-api.d.ts +135 -0
- package/dist/esm/api/users-api.js +263 -0
- package/dist/esm/api/workspace-api.d.ts +356 -0
- package/dist/esm/api/workspace-api.js +715 -0
- package/dist/esm/api.d.ts +4 -0
- package/dist/esm/api.js +4 -0
- package/dist/esm/models/create-workspace-dto.d.ts +1 -1
- package/dist/esm/models/index.d.ts +0 -8
- package/dist/esm/models/index.js +0 -8
- package/dist/esm/models/workspace-dto.d.ts +14 -0
- package/dist/models/create-workspace-dto.d.ts +1 -1
- package/dist/models/index.d.ts +0 -8
- package/dist/models/index.js +0 -8
- package/dist/models/workspace-dto.d.ts +14 -0
- package/models/create-workspace-dto.ts +1 -1
- package/models/index.ts +0 -8
- package/models/workspace-dto.ts +12 -0
- package/package.json +1 -1
- package/dist/esm/models/execute-request-dto.d.ts +0 -30
- package/dist/esm/models/execute-request-dto.js +0 -14
- package/dist/esm/models/execute-response-dto.d.ts +0 -30
- package/dist/esm/models/execute-response-dto.js +0 -14
- package/dist/esm/models/git-add-request-dto.d.ts +0 -30
- package/dist/esm/models/git-add-request-dto.js +0 -14
- package/dist/esm/models/git-branch-request-dto.d.ts +0 -30
- package/dist/esm/models/git-branch-request-dto.js +0 -14
- package/dist/esm/models/git-clone-request-dto.d.ts +0 -54
- package/dist/esm/models/git-clone-request-dto.js +0 -14
- package/dist/esm/models/git-commit-request-dto.d.ts +0 -42
- package/dist/esm/models/git-commit-request-dto.js +0 -14
- package/dist/esm/models/git-repo-request-dto.d.ts +0 -36
- package/dist/esm/models/git-repo-request-dto.js +0 -14
- package/dist/esm/models/replace-request-dto.d.ts +0 -36
- package/dist/esm/models/replace-request-dto.js +0 -14
- package/dist/models/execute-request-dto.d.ts +0 -30
- package/dist/models/execute-request-dto.js +0 -15
- package/dist/models/execute-response-dto.d.ts +0 -30
- package/dist/models/execute-response-dto.js +0 -15
- package/dist/models/git-add-request-dto.d.ts +0 -30
- package/dist/models/git-add-request-dto.js +0 -15
- package/dist/models/git-branch-request-dto.d.ts +0 -30
- package/dist/models/git-branch-request-dto.js +0 -15
- package/dist/models/git-clone-request-dto.d.ts +0 -54
- package/dist/models/git-clone-request-dto.js +0 -15
- package/dist/models/git-commit-request-dto.d.ts +0 -42
- package/dist/models/git-commit-request-dto.js +0 -15
- package/dist/models/git-repo-request-dto.d.ts +0 -36
- package/dist/models/git-repo-request-dto.js +0 -15
- package/dist/models/replace-request-dto.d.ts +0 -36
- package/dist/models/replace-request-dto.js +0 -15
- package/models/execute-request-dto.ts +0 -36
- package/models/execute-response-dto.ts +0 -36
- package/models/git-add-request-dto.ts +0 -36
- package/models/git-branch-request-dto.ts +0 -36
- package/models/git-clone-request-dto.ts +0 -60
- package/models/git-commit-request-dto.ts +0 -48
- package/models/git-repo-request-dto.ts +0 -42
- package/models/replace-request-dto.ts +0 -42
package/api/nodes-api.ts
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Daytona Workspaces
|
|
5
|
+
* Daytona Workspaces API Docs
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
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
|
+
|
|
16
|
+
import type { Configuration } from '../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
/**
|
|
25
|
+
* NodesApi - axios parameter creator
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
export const NodesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
29
|
+
return {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @summary Create node
|
|
33
|
+
* @param {object} body
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
createNode: async (body: object, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38
|
+
// verify required parameter 'body' is not null or undefined
|
|
39
|
+
assertParamExists('createNode', 'body', body)
|
|
40
|
+
const localVarPath = `/nodes`;
|
|
41
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
42
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
43
|
+
let baseOptions;
|
|
44
|
+
if (configuration) {
|
|
45
|
+
baseOptions = configuration.baseOptions;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
49
|
+
const localVarHeaderParameter = {} as any;
|
|
50
|
+
const localVarQueryParameter = {} as any;
|
|
51
|
+
|
|
52
|
+
// authentication oauth2 required
|
|
53
|
+
// oauth required
|
|
54
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
59
|
+
|
|
60
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
61
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
62
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
63
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
url: toPathString(localVarUrlObj),
|
|
67
|
+
options: localVarRequestOptions,
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @summary List all nodes
|
|
73
|
+
* @param {*} [options] Override http request option.
|
|
74
|
+
* @throws {RequiredError}
|
|
75
|
+
*/
|
|
76
|
+
listNodes: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
77
|
+
const localVarPath = `/nodes`;
|
|
78
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
79
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
80
|
+
let baseOptions;
|
|
81
|
+
if (configuration) {
|
|
82
|
+
baseOptions = configuration.baseOptions;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
86
|
+
const localVarHeaderParameter = {} as any;
|
|
87
|
+
const localVarQueryParameter = {} as any;
|
|
88
|
+
|
|
89
|
+
// authentication oauth2 required
|
|
90
|
+
// oauth required
|
|
91
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
96
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
97
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
url: toPathString(localVarUrlObj),
|
|
101
|
+
options: localVarRequestOptions,
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @summary Update node scheduling status
|
|
107
|
+
* @param {string} id
|
|
108
|
+
* @param {*} [options] Override http request option.
|
|
109
|
+
* @throws {RequiredError}
|
|
110
|
+
*/
|
|
111
|
+
updateNodeScheduling: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
112
|
+
// verify required parameter 'id' is not null or undefined
|
|
113
|
+
assertParamExists('updateNodeScheduling', 'id', id)
|
|
114
|
+
const localVarPath = `/nodes/{id}/scheduling`
|
|
115
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
116
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
117
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
118
|
+
let baseOptions;
|
|
119
|
+
if (configuration) {
|
|
120
|
+
baseOptions = configuration.baseOptions;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
124
|
+
const localVarHeaderParameter = {} as any;
|
|
125
|
+
const localVarQueryParameter = {} as any;
|
|
126
|
+
|
|
127
|
+
// authentication oauth2 required
|
|
128
|
+
// oauth required
|
|
129
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
134
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
135
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
url: toPathString(localVarUrlObj),
|
|
139
|
+
options: localVarRequestOptions,
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* NodesApi - functional programming interface
|
|
147
|
+
* @export
|
|
148
|
+
*/
|
|
149
|
+
export const NodesApiFp = function(configuration?: Configuration) {
|
|
150
|
+
const localVarAxiosParamCreator = NodesApiAxiosParamCreator(configuration)
|
|
151
|
+
return {
|
|
152
|
+
/**
|
|
153
|
+
*
|
|
154
|
+
* @summary Create node
|
|
155
|
+
* @param {object} body
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
*/
|
|
159
|
+
async createNode(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
160
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createNode(body, options);
|
|
161
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
162
|
+
const localVarOperationServerBasePath = operationServerMap['NodesApi.createNode']?.[localVarOperationServerIndex]?.url;
|
|
163
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
164
|
+
},
|
|
165
|
+
/**
|
|
166
|
+
*
|
|
167
|
+
* @summary List all nodes
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
*/
|
|
171
|
+
async listNodes(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
172
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listNodes(options);
|
|
173
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
174
|
+
const localVarOperationServerBasePath = operationServerMap['NodesApi.listNodes']?.[localVarOperationServerIndex]?.url;
|
|
175
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
176
|
+
},
|
|
177
|
+
/**
|
|
178
|
+
*
|
|
179
|
+
* @summary Update node scheduling status
|
|
180
|
+
* @param {string} id
|
|
181
|
+
* @param {*} [options] Override http request option.
|
|
182
|
+
* @throws {RequiredError}
|
|
183
|
+
*/
|
|
184
|
+
async updateNodeScheduling(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
185
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateNodeScheduling(id, options);
|
|
186
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
187
|
+
const localVarOperationServerBasePath = operationServerMap['NodesApi.updateNodeScheduling']?.[localVarOperationServerIndex]?.url;
|
|
188
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
189
|
+
},
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* NodesApi - factory interface
|
|
195
|
+
* @export
|
|
196
|
+
*/
|
|
197
|
+
export const NodesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
198
|
+
const localVarFp = NodesApiFp(configuration)
|
|
199
|
+
return {
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
* @summary Create node
|
|
203
|
+
* @param {object} body
|
|
204
|
+
* @param {*} [options] Override http request option.
|
|
205
|
+
* @throws {RequiredError}
|
|
206
|
+
*/
|
|
207
|
+
createNode(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
208
|
+
return localVarFp.createNode(body, options).then((request) => request(axios, basePath));
|
|
209
|
+
},
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @summary List all nodes
|
|
213
|
+
* @param {*} [options] Override http request option.
|
|
214
|
+
* @throws {RequiredError}
|
|
215
|
+
*/
|
|
216
|
+
listNodes(options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
217
|
+
return localVarFp.listNodes(options).then((request) => request(axios, basePath));
|
|
218
|
+
},
|
|
219
|
+
/**
|
|
220
|
+
*
|
|
221
|
+
* @summary Update node scheduling status
|
|
222
|
+
* @param {string} id
|
|
223
|
+
* @param {*} [options] Override http request option.
|
|
224
|
+
* @throws {RequiredError}
|
|
225
|
+
*/
|
|
226
|
+
updateNodeScheduling(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
227
|
+
return localVarFp.updateNodeScheduling(id, options).then((request) => request(axios, basePath));
|
|
228
|
+
},
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* NodesApi - object-oriented interface
|
|
234
|
+
* @export
|
|
235
|
+
* @class NodesApi
|
|
236
|
+
* @extends {BaseAPI}
|
|
237
|
+
*/
|
|
238
|
+
export class NodesApi extends BaseAPI {
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @summary Create node
|
|
242
|
+
* @param {object} body
|
|
243
|
+
* @param {*} [options] Override http request option.
|
|
244
|
+
* @throws {RequiredError}
|
|
245
|
+
* @memberof NodesApi
|
|
246
|
+
*/
|
|
247
|
+
public createNode(body: object, options?: RawAxiosRequestConfig) {
|
|
248
|
+
return NodesApiFp(this.configuration).createNode(body, options).then((request) => request(this.axios, this.basePath));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
*
|
|
253
|
+
* @summary List all nodes
|
|
254
|
+
* @param {*} [options] Override http request option.
|
|
255
|
+
* @throws {RequiredError}
|
|
256
|
+
* @memberof NodesApi
|
|
257
|
+
*/
|
|
258
|
+
public listNodes(options?: RawAxiosRequestConfig) {
|
|
259
|
+
return NodesApiFp(this.configuration).listNodes(options).then((request) => request(this.axios, this.basePath));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
*
|
|
264
|
+
* @summary Update node scheduling status
|
|
265
|
+
* @param {string} id
|
|
266
|
+
* @param {*} [options] Override http request option.
|
|
267
|
+
* @throws {RequiredError}
|
|
268
|
+
* @memberof NodesApi
|
|
269
|
+
*/
|
|
270
|
+
public updateNodeScheduling(id: string, options?: RawAxiosRequestConfig) {
|
|
271
|
+
return NodesApiFp(this.configuration).updateNodeScheduling(id, options).then((request) => request(this.axios, this.basePath));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
package/api/users-api.ts
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Daytona Workspaces
|
|
5
|
+
* Daytona Workspaces API Docs
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
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
|
+
|
|
16
|
+
import type { Configuration } from '../configuration';
|
|
17
|
+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
18
|
+
import globalAxios from 'axios';
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
/**
|
|
25
|
+
* UsersApi - axios parameter creator
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
export const UsersApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
29
|
+
return {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @summary Create user
|
|
33
|
+
* @param {object} body
|
|
34
|
+
* @param {*} [options] Override http request option.
|
|
35
|
+
* @throws {RequiredError}
|
|
36
|
+
*/
|
|
37
|
+
createUser: async (body: object, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38
|
+
// verify required parameter 'body' is not null or undefined
|
|
39
|
+
assertParamExists('createUser', 'body', body)
|
|
40
|
+
const localVarPath = `/users`;
|
|
41
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
42
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
43
|
+
let baseOptions;
|
|
44
|
+
if (configuration) {
|
|
45
|
+
baseOptions = configuration.baseOptions;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
49
|
+
const localVarHeaderParameter = {} as any;
|
|
50
|
+
const localVarQueryParameter = {} as any;
|
|
51
|
+
|
|
52
|
+
// authentication oauth2 required
|
|
53
|
+
// oauth required
|
|
54
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
59
|
+
|
|
60
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
61
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
62
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
63
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
url: toPathString(localVarUrlObj),
|
|
67
|
+
options: localVarRequestOptions,
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @summary List all users
|
|
73
|
+
* @param {*} [options] Override http request option.
|
|
74
|
+
* @throws {RequiredError}
|
|
75
|
+
*/
|
|
76
|
+
listUsers: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
77
|
+
const localVarPath = `/users`;
|
|
78
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
79
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
80
|
+
let baseOptions;
|
|
81
|
+
if (configuration) {
|
|
82
|
+
baseOptions = configuration.baseOptions;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
86
|
+
const localVarHeaderParameter = {} as any;
|
|
87
|
+
const localVarQueryParameter = {} as any;
|
|
88
|
+
|
|
89
|
+
// authentication oauth2 required
|
|
90
|
+
// oauth required
|
|
91
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
96
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
97
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
url: toPathString(localVarUrlObj),
|
|
101
|
+
options: localVarRequestOptions,
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @summary Regenerate user key pair
|
|
107
|
+
* @param {string} id
|
|
108
|
+
* @param {*} [options] Override http request option.
|
|
109
|
+
* @throws {RequiredError}
|
|
110
|
+
*/
|
|
111
|
+
regenerateKeyPair: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
112
|
+
// verify required parameter 'id' is not null or undefined
|
|
113
|
+
assertParamExists('regenerateKeyPair', 'id', id)
|
|
114
|
+
const localVarPath = `/users/{id}/regenerate-key-pair`
|
|
115
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
116
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
117
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
118
|
+
let baseOptions;
|
|
119
|
+
if (configuration) {
|
|
120
|
+
baseOptions = configuration.baseOptions;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
124
|
+
const localVarHeaderParameter = {} as any;
|
|
125
|
+
const localVarQueryParameter = {} as any;
|
|
126
|
+
|
|
127
|
+
// authentication oauth2 required
|
|
128
|
+
// oauth required
|
|
129
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["openid", "profile", "email"], configuration)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
134
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
135
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
url: toPathString(localVarUrlObj),
|
|
139
|
+
options: localVarRequestOptions,
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* UsersApi - functional programming interface
|
|
147
|
+
* @export
|
|
148
|
+
*/
|
|
149
|
+
export const UsersApiFp = function(configuration?: Configuration) {
|
|
150
|
+
const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration)
|
|
151
|
+
return {
|
|
152
|
+
/**
|
|
153
|
+
*
|
|
154
|
+
* @summary Create user
|
|
155
|
+
* @param {object} body
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
*/
|
|
159
|
+
async createUser(body: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
160
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createUser(body, options);
|
|
161
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
162
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.createUser']?.[localVarOperationServerIndex]?.url;
|
|
163
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
164
|
+
},
|
|
165
|
+
/**
|
|
166
|
+
*
|
|
167
|
+
* @summary List all users
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
*/
|
|
171
|
+
async listUsers(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
172
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listUsers(options);
|
|
173
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
174
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.listUsers']?.[localVarOperationServerIndex]?.url;
|
|
175
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
176
|
+
},
|
|
177
|
+
/**
|
|
178
|
+
*
|
|
179
|
+
* @summary Regenerate user key pair
|
|
180
|
+
* @param {string} id
|
|
181
|
+
* @param {*} [options] Override http request option.
|
|
182
|
+
* @throws {RequiredError}
|
|
183
|
+
*/
|
|
184
|
+
async regenerateKeyPair(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
185
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.regenerateKeyPair(id, options);
|
|
186
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
187
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.regenerateKeyPair']?.[localVarOperationServerIndex]?.url;
|
|
188
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
189
|
+
},
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* UsersApi - factory interface
|
|
195
|
+
* @export
|
|
196
|
+
*/
|
|
197
|
+
export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
198
|
+
const localVarFp = UsersApiFp(configuration)
|
|
199
|
+
return {
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
* @summary Create user
|
|
203
|
+
* @param {object} body
|
|
204
|
+
* @param {*} [options] Override http request option.
|
|
205
|
+
* @throws {RequiredError}
|
|
206
|
+
*/
|
|
207
|
+
createUser(body: object, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
208
|
+
return localVarFp.createUser(body, options).then((request) => request(axios, basePath));
|
|
209
|
+
},
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* @summary List all users
|
|
213
|
+
* @param {*} [options] Override http request option.
|
|
214
|
+
* @throws {RequiredError}
|
|
215
|
+
*/
|
|
216
|
+
listUsers(options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
217
|
+
return localVarFp.listUsers(options).then((request) => request(axios, basePath));
|
|
218
|
+
},
|
|
219
|
+
/**
|
|
220
|
+
*
|
|
221
|
+
* @summary Regenerate user key pair
|
|
222
|
+
* @param {string} id
|
|
223
|
+
* @param {*} [options] Override http request option.
|
|
224
|
+
* @throws {RequiredError}
|
|
225
|
+
*/
|
|
226
|
+
regenerateKeyPair(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
227
|
+
return localVarFp.regenerateKeyPair(id, options).then((request) => request(axios, basePath));
|
|
228
|
+
},
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* UsersApi - object-oriented interface
|
|
234
|
+
* @export
|
|
235
|
+
* @class UsersApi
|
|
236
|
+
* @extends {BaseAPI}
|
|
237
|
+
*/
|
|
238
|
+
export class UsersApi extends BaseAPI {
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @summary Create user
|
|
242
|
+
* @param {object} body
|
|
243
|
+
* @param {*} [options] Override http request option.
|
|
244
|
+
* @throws {RequiredError}
|
|
245
|
+
* @memberof UsersApi
|
|
246
|
+
*/
|
|
247
|
+
public createUser(body: object, options?: RawAxiosRequestConfig) {
|
|
248
|
+
return UsersApiFp(this.configuration).createUser(body, options).then((request) => request(this.axios, this.basePath));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
*
|
|
253
|
+
* @summary List all users
|
|
254
|
+
* @param {*} [options] Override http request option.
|
|
255
|
+
* @throws {RequiredError}
|
|
256
|
+
* @memberof UsersApi
|
|
257
|
+
*/
|
|
258
|
+
public listUsers(options?: RawAxiosRequestConfig) {
|
|
259
|
+
return UsersApiFp(this.configuration).listUsers(options).then((request) => request(this.axios, this.basePath));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
*
|
|
264
|
+
* @summary Regenerate user key pair
|
|
265
|
+
* @param {string} id
|
|
266
|
+
* @param {*} [options] Override http request option.
|
|
267
|
+
* @throws {RequiredError}
|
|
268
|
+
* @memberof UsersApi
|
|
269
|
+
*/
|
|
270
|
+
public regenerateKeyPair(id: string, options?: RawAxiosRequestConfig) {
|
|
271
|
+
return UsersApiFp(this.configuration).regenerateKeyPair(id, options).then((request) => request(this.axios, this.basePath));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|