@cirrobio/api-client 0.12.14 → 0.12.15
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 +1 -1
- package/dist/apis/AppRegistrationsApi.d.ts +108 -0
- package/dist/apis/AppRegistrationsApi.js +304 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/AppRegistrationsApi.d.ts +108 -0
- package/dist/esm/apis/AppRegistrationsApi.js +300 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AppRegistration.d.ts +93 -0
- package/dist/esm/models/AppRegistration.js +75 -0
- package/dist/esm/models/AppRegistrationDetail.d.ts +125 -0
- package/dist/esm/models/AppRegistrationDetail.js +92 -0
- package/dist/esm/models/AppRegistrationInput.d.ts +77 -0
- package/dist/esm/models/AppRegistrationInput.js +68 -0
- package/dist/esm/models/AppRegistrationSecretResponse.d.ts +49 -0
- package/dist/esm/models/AppRegistrationSecretResponse.js +52 -0
- package/dist/esm/models/AppType.d.ts +22 -0
- package/dist/esm/models/AppType.js +31 -0
- package/dist/esm/models/FeatureFlags.d.ts +6 -0
- package/dist/esm/models/FeatureFlags.js +3 -0
- package/dist/esm/models/PaginatedResponseAppRegistrationDto.d.ts +38 -0
- package/dist/esm/models/PaginatedResponseAppRegistrationDto.js +47 -0
- package/dist/esm/models/Permission.d.ts +79 -0
- package/dist/esm/models/Permission.js +88 -0
- package/dist/esm/models/PrincipalType.d.ts +23 -0
- package/dist/esm/models/PrincipalType.js +32 -0
- package/dist/esm/models/ProjectPermissionSet.d.ts +37 -0
- package/dist/esm/models/ProjectPermissionSet.js +46 -0
- package/dist/esm/models/index.d.ts +9 -0
- package/dist/esm/models/index.js +9 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/AppRegistration.d.ts +93 -0
- package/dist/models/AppRegistration.js +82 -0
- package/dist/models/AppRegistrationDetail.d.ts +125 -0
- package/dist/models/AppRegistrationDetail.js +99 -0
- package/dist/models/AppRegistrationInput.d.ts +77 -0
- package/dist/models/AppRegistrationInput.js +75 -0
- package/dist/models/AppRegistrationSecretResponse.d.ts +49 -0
- package/dist/models/AppRegistrationSecretResponse.js +59 -0
- package/dist/models/AppType.d.ts +22 -0
- package/dist/models/AppType.js +37 -0
- package/dist/models/FeatureFlags.d.ts +6 -0
- package/dist/models/FeatureFlags.js +3 -0
- package/dist/models/PaginatedResponseAppRegistrationDto.d.ts +38 -0
- package/dist/models/PaginatedResponseAppRegistrationDto.js +54 -0
- package/dist/models/Permission.d.ts +79 -0
- package/dist/models/Permission.js +94 -0
- package/dist/models/PrincipalType.d.ts +23 -0
- package/dist/models/PrincipalType.js +38 -0
- package/dist/models/ProjectPermissionSet.d.ts +37 -0
- package/dist/models/ProjectPermissionSet.js +53 -0
- package/dist/models/index.d.ts +9 -0
- package/dist/models/index.js +9 -0
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cirro Data
|
|
3
|
+
* Cirro Data Platform service API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: latest
|
|
6
|
+
* Contact: support@cirro.bio
|
|
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 { AppRegistration, AppRegistrationDetail, AppRegistrationInput, AppRegistrationSecretResponse, PaginatedResponseAppRegistrationDto } from '../models/index';
|
|
14
|
+
export interface ArchiveAppRegistrationRequest {
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateAppRegistrationRequest {
|
|
18
|
+
appRegistrationInput: AppRegistrationInput;
|
|
19
|
+
}
|
|
20
|
+
export interface GetAppRegistrationRequest {
|
|
21
|
+
id: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ListAppRegistrationsRequest {
|
|
24
|
+
limit: number;
|
|
25
|
+
nextToken: string;
|
|
26
|
+
}
|
|
27
|
+
export interface RegenerateSecretRequest {
|
|
28
|
+
id: string;
|
|
29
|
+
}
|
|
30
|
+
export interface UpdateAppRegistrationRequest {
|
|
31
|
+
id: string;
|
|
32
|
+
appRegistrationInput: AppRegistrationInput;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
export declare class AppRegistrationsApi extends runtime.BaseAPI {
|
|
38
|
+
/**
|
|
39
|
+
* Archives an app registration. Archived registrations cannot authenticate.
|
|
40
|
+
* Archive app registration
|
|
41
|
+
*/
|
|
42
|
+
archiveAppRegistrationRaw(requestParameters: ArchiveAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
43
|
+
/**
|
|
44
|
+
* Archives an app registration. Archived registrations cannot authenticate.
|
|
45
|
+
* Archive app registration
|
|
46
|
+
*/
|
|
47
|
+
archiveAppRegistration(requestParameters: ArchiveAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Creates a new OAuth client app registration. Returns the client secret which is only shown once.
|
|
50
|
+
* Create app registration
|
|
51
|
+
*/
|
|
52
|
+
createAppRegistrationRaw(requestParameters: CreateAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppRegistrationSecretResponse>>;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a new OAuth client app registration. Returns the client secret which is only shown once.
|
|
55
|
+
* Create app registration
|
|
56
|
+
*/
|
|
57
|
+
createAppRegistration(requestParameters: CreateAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppRegistrationSecretResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Gets detailed information about an app registration.
|
|
60
|
+
* Get app registration
|
|
61
|
+
*/
|
|
62
|
+
getAppRegistrationRaw(requestParameters: GetAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppRegistrationDetail>>;
|
|
63
|
+
/**
|
|
64
|
+
* Gets detailed information about an app registration.
|
|
65
|
+
* Get app registration
|
|
66
|
+
*/
|
|
67
|
+
getAppRegistration(requestParameters: GetAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppRegistrationDetail>;
|
|
68
|
+
/**
|
|
69
|
+
* Lists all app registrations in the system.
|
|
70
|
+
* List app registrations
|
|
71
|
+
*/
|
|
72
|
+
listAppRegistrationsRaw(requestParameters: ListAppRegistrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAppRegistrationDto>>;
|
|
73
|
+
/**
|
|
74
|
+
* Lists all app registrations in the system.
|
|
75
|
+
* List app registrations
|
|
76
|
+
*/
|
|
77
|
+
listAppRegistrations(requestParameters: ListAppRegistrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAppRegistrationDto>;
|
|
78
|
+
/**
|
|
79
|
+
* Lists app registrations created by the current user.
|
|
80
|
+
* List my app registrations
|
|
81
|
+
*/
|
|
82
|
+
listMyAppRegistrationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AppRegistration>>>;
|
|
83
|
+
/**
|
|
84
|
+
* Lists app registrations created by the current user.
|
|
85
|
+
* List my app registrations
|
|
86
|
+
*/
|
|
87
|
+
listMyAppRegistrations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AppRegistration>>;
|
|
88
|
+
/**
|
|
89
|
+
* Generates a new client secret for the app registration. The old secret is invalidated.
|
|
90
|
+
* Regenerate client secret
|
|
91
|
+
*/
|
|
92
|
+
regenerateSecretRaw(requestParameters: RegenerateSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppRegistrationSecretResponse>>;
|
|
93
|
+
/**
|
|
94
|
+
* Generates a new client secret for the app registration. The old secret is invalidated.
|
|
95
|
+
* Regenerate client secret
|
|
96
|
+
*/
|
|
97
|
+
regenerateSecret(requestParameters: RegenerateSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppRegistrationSecretResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* Updates an existing app registration.
|
|
100
|
+
* Update app registration
|
|
101
|
+
*/
|
|
102
|
+
updateAppRegistrationRaw(requestParameters: UpdateAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppRegistrationDetail>>;
|
|
103
|
+
/**
|
|
104
|
+
* Updates an existing app registration.
|
|
105
|
+
* Update app registration
|
|
106
|
+
*/
|
|
107
|
+
updateAppRegistration(requestParameters: UpdateAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppRegistrationDetail>;
|
|
108
|
+
}
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Cirro Data
|
|
6
|
+
* Cirro Data Platform service API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: latest
|
|
9
|
+
* Contact: support@cirro.bio
|
|
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.AppRegistrationsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class AppRegistrationsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Archives an app registration. Archived registrations cannot authenticate.
|
|
34
|
+
* Archive app registration
|
|
35
|
+
*/
|
|
36
|
+
archiveAppRegistrationRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
39
|
+
throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling archiveAppRegistration.');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
44
|
+
const token = this.configuration.accessToken;
|
|
45
|
+
const tokenString = yield token("accessToken", []);
|
|
46
|
+
if (tokenString) {
|
|
47
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const response = yield this.request({
|
|
51
|
+
path: `/app-registrations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
52
|
+
method: 'DELETE',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.VoidApiResponse(response);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Archives an app registration. Archived registrations cannot authenticate.
|
|
61
|
+
* Archive app registration
|
|
62
|
+
*/
|
|
63
|
+
archiveAppRegistration(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
yield this.archiveAppRegistrationRaw(requestParameters, initOverrides);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Creates a new OAuth client app registration. Returns the client secret which is only shown once.
|
|
70
|
+
* Create app registration
|
|
71
|
+
*/
|
|
72
|
+
createAppRegistrationRaw(requestParameters, initOverrides) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
if (requestParameters.appRegistrationInput === null || requestParameters.appRegistrationInput === undefined) {
|
|
75
|
+
throw new runtime.RequiredError('appRegistrationInput', 'Required parameter requestParameters.appRegistrationInput was null or undefined when calling createAppRegistration.');
|
|
76
|
+
}
|
|
77
|
+
const queryParameters = {};
|
|
78
|
+
const headerParameters = {};
|
|
79
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
80
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
81
|
+
const token = this.configuration.accessToken;
|
|
82
|
+
const tokenString = yield token("accessToken", []);
|
|
83
|
+
if (tokenString) {
|
|
84
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const response = yield this.request({
|
|
88
|
+
path: `/app-registrations`,
|
|
89
|
+
method: 'POST',
|
|
90
|
+
headers: headerParameters,
|
|
91
|
+
query: queryParameters,
|
|
92
|
+
body: (0, index_1.AppRegistrationInputToJSON)(requestParameters.appRegistrationInput),
|
|
93
|
+
}, initOverrides);
|
|
94
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AppRegistrationSecretResponseFromJSON)(jsonValue));
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Creates a new OAuth client app registration. Returns the client secret which is only shown once.
|
|
99
|
+
* Create app registration
|
|
100
|
+
*/
|
|
101
|
+
createAppRegistration(requestParameters, initOverrides) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const response = yield this.createAppRegistrationRaw(requestParameters, initOverrides);
|
|
104
|
+
return yield response.value();
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Gets detailed information about an app registration.
|
|
109
|
+
* Get app registration
|
|
110
|
+
*/
|
|
111
|
+
getAppRegistrationRaw(requestParameters, initOverrides) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
114
|
+
throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling getAppRegistration.');
|
|
115
|
+
}
|
|
116
|
+
const queryParameters = {};
|
|
117
|
+
const headerParameters = {};
|
|
118
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
119
|
+
const token = this.configuration.accessToken;
|
|
120
|
+
const tokenString = yield token("accessToken", []);
|
|
121
|
+
if (tokenString) {
|
|
122
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const response = yield this.request({
|
|
126
|
+
path: `/app-registrations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
127
|
+
method: 'GET',
|
|
128
|
+
headers: headerParameters,
|
|
129
|
+
query: queryParameters,
|
|
130
|
+
}, initOverrides);
|
|
131
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AppRegistrationDetailFromJSON)(jsonValue));
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Gets detailed information about an app registration.
|
|
136
|
+
* Get app registration
|
|
137
|
+
*/
|
|
138
|
+
getAppRegistration(requestParameters, initOverrides) {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
const response = yield this.getAppRegistrationRaw(requestParameters, initOverrides);
|
|
141
|
+
return yield response.value();
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Lists all app registrations in the system.
|
|
146
|
+
* List app registrations
|
|
147
|
+
*/
|
|
148
|
+
listAppRegistrationsRaw(requestParameters, initOverrides) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
if (requestParameters.limit === null || requestParameters.limit === undefined) {
|
|
151
|
+
throw new runtime.RequiredError('limit', 'Required parameter requestParameters.limit was null or undefined when calling listAppRegistrations.');
|
|
152
|
+
}
|
|
153
|
+
if (requestParameters.nextToken === null || requestParameters.nextToken === undefined) {
|
|
154
|
+
throw new runtime.RequiredError('nextToken', 'Required parameter requestParameters.nextToken was null or undefined when calling listAppRegistrations.');
|
|
155
|
+
}
|
|
156
|
+
const queryParameters = {};
|
|
157
|
+
if (requestParameters.limit !== undefined) {
|
|
158
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
159
|
+
}
|
|
160
|
+
if (requestParameters.nextToken !== undefined) {
|
|
161
|
+
queryParameters['nextToken'] = requestParameters.nextToken;
|
|
162
|
+
}
|
|
163
|
+
const headerParameters = {};
|
|
164
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
165
|
+
const token = this.configuration.accessToken;
|
|
166
|
+
const tokenString = yield token("accessToken", []);
|
|
167
|
+
if (tokenString) {
|
|
168
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const response = yield this.request({
|
|
172
|
+
path: `/app-registrations`,
|
|
173
|
+
method: 'GET',
|
|
174
|
+
headers: headerParameters,
|
|
175
|
+
query: queryParameters,
|
|
176
|
+
}, initOverrides);
|
|
177
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedResponseAppRegistrationDtoFromJSON)(jsonValue));
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Lists all app registrations in the system.
|
|
182
|
+
* List app registrations
|
|
183
|
+
*/
|
|
184
|
+
listAppRegistrations(requestParameters, initOverrides) {
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
const response = yield this.listAppRegistrationsRaw(requestParameters, initOverrides);
|
|
187
|
+
return yield response.value();
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Lists app registrations created by the current user.
|
|
192
|
+
* List my app registrations
|
|
193
|
+
*/
|
|
194
|
+
listMyAppRegistrationsRaw(initOverrides) {
|
|
195
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
+
const queryParameters = {};
|
|
197
|
+
const headerParameters = {};
|
|
198
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
199
|
+
const token = this.configuration.accessToken;
|
|
200
|
+
const tokenString = yield token("accessToken", []);
|
|
201
|
+
if (tokenString) {
|
|
202
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
const response = yield this.request({
|
|
206
|
+
path: `/app-registrations/mine`,
|
|
207
|
+
method: 'GET',
|
|
208
|
+
headers: headerParameters,
|
|
209
|
+
query: queryParameters,
|
|
210
|
+
}, initOverrides);
|
|
211
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AppRegistrationFromJSON));
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Lists app registrations created by the current user.
|
|
216
|
+
* List my app registrations
|
|
217
|
+
*/
|
|
218
|
+
listMyAppRegistrations(initOverrides) {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
+
const response = yield this.listMyAppRegistrationsRaw(initOverrides);
|
|
221
|
+
return yield response.value();
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Generates a new client secret for the app registration. The old secret is invalidated.
|
|
226
|
+
* Regenerate client secret
|
|
227
|
+
*/
|
|
228
|
+
regenerateSecretRaw(requestParameters, initOverrides) {
|
|
229
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
231
|
+
throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling regenerateSecret.');
|
|
232
|
+
}
|
|
233
|
+
const queryParameters = {};
|
|
234
|
+
const headerParameters = {};
|
|
235
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
236
|
+
const token = this.configuration.accessToken;
|
|
237
|
+
const tokenString = yield token("accessToken", []);
|
|
238
|
+
if (tokenString) {
|
|
239
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const response = yield this.request({
|
|
243
|
+
path: `/app-registrations/{id}:regenerate-secret`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
244
|
+
method: 'POST',
|
|
245
|
+
headers: headerParameters,
|
|
246
|
+
query: queryParameters,
|
|
247
|
+
}, initOverrides);
|
|
248
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AppRegistrationSecretResponseFromJSON)(jsonValue));
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Generates a new client secret for the app registration. The old secret is invalidated.
|
|
253
|
+
* Regenerate client secret
|
|
254
|
+
*/
|
|
255
|
+
regenerateSecret(requestParameters, initOverrides) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
const response = yield this.regenerateSecretRaw(requestParameters, initOverrides);
|
|
258
|
+
return yield response.value();
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Updates an existing app registration.
|
|
263
|
+
* Update app registration
|
|
264
|
+
*/
|
|
265
|
+
updateAppRegistrationRaw(requestParameters, initOverrides) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
if (requestParameters.id === null || requestParameters.id === undefined) {
|
|
268
|
+
throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling updateAppRegistration.');
|
|
269
|
+
}
|
|
270
|
+
if (requestParameters.appRegistrationInput === null || requestParameters.appRegistrationInput === undefined) {
|
|
271
|
+
throw new runtime.RequiredError('appRegistrationInput', 'Required parameter requestParameters.appRegistrationInput was null or undefined when calling updateAppRegistration.');
|
|
272
|
+
}
|
|
273
|
+
const queryParameters = {};
|
|
274
|
+
const headerParameters = {};
|
|
275
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
276
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
277
|
+
const token = this.configuration.accessToken;
|
|
278
|
+
const tokenString = yield token("accessToken", []);
|
|
279
|
+
if (tokenString) {
|
|
280
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
const response = yield this.request({
|
|
284
|
+
path: `/app-registrations/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
|
|
285
|
+
method: 'PUT',
|
|
286
|
+
headers: headerParameters,
|
|
287
|
+
query: queryParameters,
|
|
288
|
+
body: (0, index_1.AppRegistrationInputToJSON)(requestParameters.appRegistrationInput),
|
|
289
|
+
}, initOverrides);
|
|
290
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AppRegistrationDetailFromJSON)(jsonValue));
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Updates an existing app registration.
|
|
295
|
+
* Update app registration
|
|
296
|
+
*/
|
|
297
|
+
updateAppRegistration(requestParameters, initOverrides) {
|
|
298
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
299
|
+
const response = yield this.updateAppRegistrationRaw(requestParameters, initOverrides);
|
|
300
|
+
return yield response.value();
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
exports.AppRegistrationsApi = AppRegistrationsApi;
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./AppRegistrationsApi"), exports);
|
|
19
20
|
__exportStar(require("./AuditApi"), exports);
|
|
20
21
|
__exportStar(require("./BillingApi"), exports);
|
|
21
22
|
__exportStar(require("./ComputeEnvironmentApi"), exports);
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cirro Data
|
|
3
|
+
* Cirro Data Platform service API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: latest
|
|
6
|
+
* Contact: support@cirro.bio
|
|
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 { AppRegistration, AppRegistrationDetail, AppRegistrationInput, AppRegistrationSecretResponse, PaginatedResponseAppRegistrationDto } from '../models/index';
|
|
14
|
+
export interface ArchiveAppRegistrationRequest {
|
|
15
|
+
id: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateAppRegistrationRequest {
|
|
18
|
+
appRegistrationInput: AppRegistrationInput;
|
|
19
|
+
}
|
|
20
|
+
export interface GetAppRegistrationRequest {
|
|
21
|
+
id: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ListAppRegistrationsRequest {
|
|
24
|
+
limit: number;
|
|
25
|
+
nextToken: string;
|
|
26
|
+
}
|
|
27
|
+
export interface RegenerateSecretRequest {
|
|
28
|
+
id: string;
|
|
29
|
+
}
|
|
30
|
+
export interface UpdateAppRegistrationRequest {
|
|
31
|
+
id: string;
|
|
32
|
+
appRegistrationInput: AppRegistrationInput;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
export declare class AppRegistrationsApi extends runtime.BaseAPI {
|
|
38
|
+
/**
|
|
39
|
+
* Archives an app registration. Archived registrations cannot authenticate.
|
|
40
|
+
* Archive app registration
|
|
41
|
+
*/
|
|
42
|
+
archiveAppRegistrationRaw(requestParameters: ArchiveAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
43
|
+
/**
|
|
44
|
+
* Archives an app registration. Archived registrations cannot authenticate.
|
|
45
|
+
* Archive app registration
|
|
46
|
+
*/
|
|
47
|
+
archiveAppRegistration(requestParameters: ArchiveAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Creates a new OAuth client app registration. Returns the client secret which is only shown once.
|
|
50
|
+
* Create app registration
|
|
51
|
+
*/
|
|
52
|
+
createAppRegistrationRaw(requestParameters: CreateAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppRegistrationSecretResponse>>;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a new OAuth client app registration. Returns the client secret which is only shown once.
|
|
55
|
+
* Create app registration
|
|
56
|
+
*/
|
|
57
|
+
createAppRegistration(requestParameters: CreateAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppRegistrationSecretResponse>;
|
|
58
|
+
/**
|
|
59
|
+
* Gets detailed information about an app registration.
|
|
60
|
+
* Get app registration
|
|
61
|
+
*/
|
|
62
|
+
getAppRegistrationRaw(requestParameters: GetAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppRegistrationDetail>>;
|
|
63
|
+
/**
|
|
64
|
+
* Gets detailed information about an app registration.
|
|
65
|
+
* Get app registration
|
|
66
|
+
*/
|
|
67
|
+
getAppRegistration(requestParameters: GetAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppRegistrationDetail>;
|
|
68
|
+
/**
|
|
69
|
+
* Lists all app registrations in the system.
|
|
70
|
+
* List app registrations
|
|
71
|
+
*/
|
|
72
|
+
listAppRegistrationsRaw(requestParameters: ListAppRegistrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAppRegistrationDto>>;
|
|
73
|
+
/**
|
|
74
|
+
* Lists all app registrations in the system.
|
|
75
|
+
* List app registrations
|
|
76
|
+
*/
|
|
77
|
+
listAppRegistrations(requestParameters: ListAppRegistrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAppRegistrationDto>;
|
|
78
|
+
/**
|
|
79
|
+
* Lists app registrations created by the current user.
|
|
80
|
+
* List my app registrations
|
|
81
|
+
*/
|
|
82
|
+
listMyAppRegistrationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AppRegistration>>>;
|
|
83
|
+
/**
|
|
84
|
+
* Lists app registrations created by the current user.
|
|
85
|
+
* List my app registrations
|
|
86
|
+
*/
|
|
87
|
+
listMyAppRegistrations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AppRegistration>>;
|
|
88
|
+
/**
|
|
89
|
+
* Generates a new client secret for the app registration. The old secret is invalidated.
|
|
90
|
+
* Regenerate client secret
|
|
91
|
+
*/
|
|
92
|
+
regenerateSecretRaw(requestParameters: RegenerateSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppRegistrationSecretResponse>>;
|
|
93
|
+
/**
|
|
94
|
+
* Generates a new client secret for the app registration. The old secret is invalidated.
|
|
95
|
+
* Regenerate client secret
|
|
96
|
+
*/
|
|
97
|
+
regenerateSecret(requestParameters: RegenerateSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppRegistrationSecretResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* Updates an existing app registration.
|
|
100
|
+
* Update app registration
|
|
101
|
+
*/
|
|
102
|
+
updateAppRegistrationRaw(requestParameters: UpdateAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AppRegistrationDetail>>;
|
|
103
|
+
/**
|
|
104
|
+
* Updates an existing app registration.
|
|
105
|
+
* Update app registration
|
|
106
|
+
*/
|
|
107
|
+
updateAppRegistration(requestParameters: UpdateAppRegistrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AppRegistrationDetail>;
|
|
108
|
+
}
|