@envsync-cloud/envsync-ts-sdk 0.3.7 → 0.6.1
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 +21 -0
- package/README.md +67 -3
- package/dist/index.d.mts +580 -7
- package/dist/index.d.ts +580 -7
- package/dist/index.js +713 -10
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +704 -10
- package/dist/index.mjs.map +1 -0
- package/package.json +30 -11
- package/dist/index.global.js +0 -2297
package/dist/index.global.js
DELETED
|
@@ -1,2297 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(() => {
|
|
3
|
-
// src/core/BaseHttpRequest.ts
|
|
4
|
-
var BaseHttpRequest = class {
|
|
5
|
-
constructor(config) {
|
|
6
|
-
this.config = config;
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
// src/core/ApiError.ts
|
|
11
|
-
var ApiError = class extends Error {
|
|
12
|
-
url;
|
|
13
|
-
status;
|
|
14
|
-
statusText;
|
|
15
|
-
body;
|
|
16
|
-
request;
|
|
17
|
-
constructor(request2, response, message) {
|
|
18
|
-
super(message);
|
|
19
|
-
this.name = "ApiError";
|
|
20
|
-
this.url = response.url;
|
|
21
|
-
this.status = response.status;
|
|
22
|
-
this.statusText = response.statusText;
|
|
23
|
-
this.body = response.body;
|
|
24
|
-
this.request = request2;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
// src/core/CancelablePromise.ts
|
|
29
|
-
var CancelError = class extends Error {
|
|
30
|
-
constructor(message) {
|
|
31
|
-
super(message);
|
|
32
|
-
this.name = "CancelError";
|
|
33
|
-
}
|
|
34
|
-
get isCancelled() {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var CancelablePromise = class {
|
|
39
|
-
#isResolved;
|
|
40
|
-
#isRejected;
|
|
41
|
-
#isCancelled;
|
|
42
|
-
#cancelHandlers;
|
|
43
|
-
#promise;
|
|
44
|
-
#resolve;
|
|
45
|
-
#reject;
|
|
46
|
-
constructor(executor) {
|
|
47
|
-
this.#isResolved = false;
|
|
48
|
-
this.#isRejected = false;
|
|
49
|
-
this.#isCancelled = false;
|
|
50
|
-
this.#cancelHandlers = [];
|
|
51
|
-
this.#promise = new Promise((resolve2, reject) => {
|
|
52
|
-
this.#resolve = resolve2;
|
|
53
|
-
this.#reject = reject;
|
|
54
|
-
const onResolve = (value) => {
|
|
55
|
-
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
this.#isResolved = true;
|
|
59
|
-
if (this.#resolve) this.#resolve(value);
|
|
60
|
-
};
|
|
61
|
-
const onReject = (reason) => {
|
|
62
|
-
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
this.#isRejected = true;
|
|
66
|
-
if (this.#reject) this.#reject(reason);
|
|
67
|
-
};
|
|
68
|
-
const onCancel = (cancelHandler) => {
|
|
69
|
-
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
this.#cancelHandlers.push(cancelHandler);
|
|
73
|
-
};
|
|
74
|
-
Object.defineProperty(onCancel, "isResolved", {
|
|
75
|
-
get: () => this.#isResolved
|
|
76
|
-
});
|
|
77
|
-
Object.defineProperty(onCancel, "isRejected", {
|
|
78
|
-
get: () => this.#isRejected
|
|
79
|
-
});
|
|
80
|
-
Object.defineProperty(onCancel, "isCancelled", {
|
|
81
|
-
get: () => this.#isCancelled
|
|
82
|
-
});
|
|
83
|
-
return executor(onResolve, onReject, onCancel);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
get [Symbol.toStringTag]() {
|
|
87
|
-
return "Cancellable Promise";
|
|
88
|
-
}
|
|
89
|
-
then(onFulfilled, onRejected) {
|
|
90
|
-
return this.#promise.then(onFulfilled, onRejected);
|
|
91
|
-
}
|
|
92
|
-
catch(onRejected) {
|
|
93
|
-
return this.#promise.catch(onRejected);
|
|
94
|
-
}
|
|
95
|
-
finally(onFinally) {
|
|
96
|
-
return this.#promise.finally(onFinally);
|
|
97
|
-
}
|
|
98
|
-
cancel() {
|
|
99
|
-
if (this.#isResolved || this.#isRejected || this.#isCancelled) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
this.#isCancelled = true;
|
|
103
|
-
if (this.#cancelHandlers.length) {
|
|
104
|
-
try {
|
|
105
|
-
for (const cancelHandler of this.#cancelHandlers) {
|
|
106
|
-
cancelHandler();
|
|
107
|
-
}
|
|
108
|
-
} catch (error) {
|
|
109
|
-
console.warn("Cancellation threw an error", error);
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
this.#cancelHandlers.length = 0;
|
|
114
|
-
if (this.#reject) this.#reject(new CancelError("Request aborted"));
|
|
115
|
-
}
|
|
116
|
-
get isCancelled() {
|
|
117
|
-
return this.#isCancelled;
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
// src/core/request.ts
|
|
122
|
-
var isDefined = (value) => {
|
|
123
|
-
return value !== void 0 && value !== null;
|
|
124
|
-
};
|
|
125
|
-
var isString = (value) => {
|
|
126
|
-
return typeof value === "string";
|
|
127
|
-
};
|
|
128
|
-
var isStringWithValue = (value) => {
|
|
129
|
-
return isString(value) && value !== "";
|
|
130
|
-
};
|
|
131
|
-
var isBlob = (value) => {
|
|
132
|
-
return typeof value === "object" && typeof value.type === "string" && typeof value.stream === "function" && typeof value.arrayBuffer === "function" && typeof value.constructor === "function" && typeof value.constructor.name === "string" && /^(Blob|File)$/.test(value.constructor.name) && /^(Blob|File)$/.test(value[Symbol.toStringTag]);
|
|
133
|
-
};
|
|
134
|
-
var isFormData = (value) => {
|
|
135
|
-
return value instanceof FormData;
|
|
136
|
-
};
|
|
137
|
-
var base64 = (str) => {
|
|
138
|
-
try {
|
|
139
|
-
return btoa(str);
|
|
140
|
-
} catch (err) {
|
|
141
|
-
return Buffer.from(str).toString("base64");
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
var getQueryString = (params) => {
|
|
145
|
-
const qs = [];
|
|
146
|
-
const append = (key, value) => {
|
|
147
|
-
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
|
148
|
-
};
|
|
149
|
-
const process = (key, value) => {
|
|
150
|
-
if (isDefined(value)) {
|
|
151
|
-
if (Array.isArray(value)) {
|
|
152
|
-
value.forEach((v) => {
|
|
153
|
-
process(key, v);
|
|
154
|
-
});
|
|
155
|
-
} else if (typeof value === "object") {
|
|
156
|
-
Object.entries(value).forEach(([k, v]) => {
|
|
157
|
-
process(`${key}[${k}]`, v);
|
|
158
|
-
});
|
|
159
|
-
} else {
|
|
160
|
-
append(key, value);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
Object.entries(params).forEach(([key, value]) => {
|
|
165
|
-
process(key, value);
|
|
166
|
-
});
|
|
167
|
-
if (qs.length > 0) {
|
|
168
|
-
return `?${qs.join("&")}`;
|
|
169
|
-
}
|
|
170
|
-
return "";
|
|
171
|
-
};
|
|
172
|
-
var getUrl = (config, options) => {
|
|
173
|
-
const encoder = config.ENCODE_PATH || encodeURI;
|
|
174
|
-
const path = options.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring, group) => {
|
|
175
|
-
if (options.path?.hasOwnProperty(group)) {
|
|
176
|
-
return encoder(String(options.path[group]));
|
|
177
|
-
}
|
|
178
|
-
return substring;
|
|
179
|
-
});
|
|
180
|
-
const url = `${config.BASE}${path}`;
|
|
181
|
-
if (options.query) {
|
|
182
|
-
return `${url}${getQueryString(options.query)}`;
|
|
183
|
-
}
|
|
184
|
-
return url;
|
|
185
|
-
};
|
|
186
|
-
var getFormData = (options) => {
|
|
187
|
-
if (options.formData) {
|
|
188
|
-
const formData = new FormData();
|
|
189
|
-
const process = (key, value) => {
|
|
190
|
-
if (isString(value) || isBlob(value)) {
|
|
191
|
-
formData.append(key, value);
|
|
192
|
-
} else {
|
|
193
|
-
formData.append(key, JSON.stringify(value));
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
Object.entries(options.formData).filter(([_, value]) => isDefined(value)).forEach(([key, value]) => {
|
|
197
|
-
if (Array.isArray(value)) {
|
|
198
|
-
value.forEach((v) => process(key, v));
|
|
199
|
-
} else {
|
|
200
|
-
process(key, value);
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
return formData;
|
|
204
|
-
}
|
|
205
|
-
return void 0;
|
|
206
|
-
};
|
|
207
|
-
var resolve = async (options, resolver) => {
|
|
208
|
-
if (typeof resolver === "function") {
|
|
209
|
-
return resolver(options);
|
|
210
|
-
}
|
|
211
|
-
return resolver;
|
|
212
|
-
};
|
|
213
|
-
var getHeaders = async (config, options) => {
|
|
214
|
-
const [token, username, password, additionalHeaders] = await Promise.all([
|
|
215
|
-
resolve(options, config.TOKEN),
|
|
216
|
-
resolve(options, config.USERNAME),
|
|
217
|
-
resolve(options, config.PASSWORD),
|
|
218
|
-
resolve(options, config.HEADERS)
|
|
219
|
-
]);
|
|
220
|
-
const headers = Object.entries({
|
|
221
|
-
Accept: "application/json",
|
|
222
|
-
...additionalHeaders,
|
|
223
|
-
...options.headers
|
|
224
|
-
}).filter(([_, value]) => isDefined(value)).reduce((headers2, [key, value]) => ({
|
|
225
|
-
...headers2,
|
|
226
|
-
[key]: String(value)
|
|
227
|
-
}), {});
|
|
228
|
-
if (isStringWithValue(token)) {
|
|
229
|
-
headers["Authorization"] = `Bearer ${token}`;
|
|
230
|
-
}
|
|
231
|
-
if (isStringWithValue(username) && isStringWithValue(password)) {
|
|
232
|
-
const credentials = base64(`${username}:${password}`);
|
|
233
|
-
headers["Authorization"] = `Basic ${credentials}`;
|
|
234
|
-
}
|
|
235
|
-
if (options.body !== void 0) {
|
|
236
|
-
if (options.mediaType) {
|
|
237
|
-
headers["Content-Type"] = options.mediaType;
|
|
238
|
-
} else if (isBlob(options.body)) {
|
|
239
|
-
headers["Content-Type"] = options.body.type || "application/octet-stream";
|
|
240
|
-
} else if (isString(options.body)) {
|
|
241
|
-
headers["Content-Type"] = "text/plain";
|
|
242
|
-
} else if (!isFormData(options.body)) {
|
|
243
|
-
headers["Content-Type"] = "application/json";
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
return new Headers(headers);
|
|
247
|
-
};
|
|
248
|
-
var getRequestBody = (options) => {
|
|
249
|
-
if (options.body !== void 0) {
|
|
250
|
-
if (options.mediaType?.includes("/json")) {
|
|
251
|
-
return JSON.stringify(options.body);
|
|
252
|
-
} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {
|
|
253
|
-
return options.body;
|
|
254
|
-
} else {
|
|
255
|
-
return JSON.stringify(options.body);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
return void 0;
|
|
259
|
-
};
|
|
260
|
-
var sendRequest = async (config, options, url, body, formData, headers, onCancel) => {
|
|
261
|
-
const controller = new AbortController();
|
|
262
|
-
const request2 = {
|
|
263
|
-
headers,
|
|
264
|
-
body: body ?? formData,
|
|
265
|
-
method: options.method,
|
|
266
|
-
signal: controller.signal
|
|
267
|
-
};
|
|
268
|
-
if (config.WITH_CREDENTIALS) {
|
|
269
|
-
request2.credentials = config.CREDENTIALS;
|
|
270
|
-
}
|
|
271
|
-
onCancel(() => controller.abort());
|
|
272
|
-
return await fetch(url, request2);
|
|
273
|
-
};
|
|
274
|
-
var getResponseHeader = (response, responseHeader) => {
|
|
275
|
-
if (responseHeader) {
|
|
276
|
-
const content = response.headers.get(responseHeader);
|
|
277
|
-
if (isString(content)) {
|
|
278
|
-
return content;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
return void 0;
|
|
282
|
-
};
|
|
283
|
-
var getResponseBody = async (response) => {
|
|
284
|
-
if (response.status !== 204) {
|
|
285
|
-
try {
|
|
286
|
-
const contentType = response.headers.get("Content-Type");
|
|
287
|
-
if (contentType) {
|
|
288
|
-
const jsonTypes = ["application/json", "application/problem+json"];
|
|
289
|
-
const isJSON = jsonTypes.some((type) => contentType.toLowerCase().startsWith(type));
|
|
290
|
-
if (isJSON) {
|
|
291
|
-
return await response.json();
|
|
292
|
-
} else {
|
|
293
|
-
return await response.text();
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
} catch (error) {
|
|
297
|
-
console.error(error);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
return void 0;
|
|
301
|
-
};
|
|
302
|
-
var catchErrorCodes = (options, result) => {
|
|
303
|
-
const errors = {
|
|
304
|
-
400: "Bad Request",
|
|
305
|
-
401: "Unauthorized",
|
|
306
|
-
403: "Forbidden",
|
|
307
|
-
404: "Not Found",
|
|
308
|
-
500: "Internal Server Error",
|
|
309
|
-
502: "Bad Gateway",
|
|
310
|
-
503: "Service Unavailable",
|
|
311
|
-
...options.errors
|
|
312
|
-
};
|
|
313
|
-
const error = errors[result.status];
|
|
314
|
-
if (error) {
|
|
315
|
-
throw new ApiError(options, result, error);
|
|
316
|
-
}
|
|
317
|
-
if (!result.ok) {
|
|
318
|
-
const errorStatus = result.status ?? "unknown";
|
|
319
|
-
const errorStatusText = result.statusText ?? "unknown";
|
|
320
|
-
const errorBody = (() => {
|
|
321
|
-
try {
|
|
322
|
-
return JSON.stringify(result.body, null, 2);
|
|
323
|
-
} catch (e) {
|
|
324
|
-
return void 0;
|
|
325
|
-
}
|
|
326
|
-
})();
|
|
327
|
-
throw new ApiError(
|
|
328
|
-
options,
|
|
329
|
-
result,
|
|
330
|
-
`Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`
|
|
331
|
-
);
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
var request = (config, options) => {
|
|
335
|
-
return new CancelablePromise(async (resolve2, reject, onCancel) => {
|
|
336
|
-
try {
|
|
337
|
-
const url = getUrl(config, options);
|
|
338
|
-
const formData = getFormData(options);
|
|
339
|
-
const body = getRequestBody(options);
|
|
340
|
-
const headers = await getHeaders(config, options);
|
|
341
|
-
if (!onCancel.isCancelled) {
|
|
342
|
-
const response = await sendRequest(config, options, url, body, formData, headers, onCancel);
|
|
343
|
-
const responseBody = await getResponseBody(response);
|
|
344
|
-
const responseHeader = getResponseHeader(response, options.responseHeader);
|
|
345
|
-
const result = {
|
|
346
|
-
url,
|
|
347
|
-
ok: response.ok,
|
|
348
|
-
status: response.status,
|
|
349
|
-
statusText: response.statusText,
|
|
350
|
-
body: responseHeader ?? responseBody
|
|
351
|
-
};
|
|
352
|
-
catchErrorCodes(options, result);
|
|
353
|
-
resolve2(result.body);
|
|
354
|
-
}
|
|
355
|
-
} catch (error) {
|
|
356
|
-
reject(error);
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
// src/core/FetchHttpRequest.ts
|
|
362
|
-
var FetchHttpRequest = class extends BaseHttpRequest {
|
|
363
|
-
constructor(config) {
|
|
364
|
-
super(config);
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* Request method
|
|
368
|
-
* @param options The request options from the service
|
|
369
|
-
* @returns CancelablePromise<T>
|
|
370
|
-
* @throws ApiError
|
|
371
|
-
*/
|
|
372
|
-
request(options) {
|
|
373
|
-
return request(this.config, options);
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
// src/services/AccessService.ts
|
|
378
|
-
var AccessService = class {
|
|
379
|
-
constructor(httpRequest) {
|
|
380
|
-
this.httpRequest = httpRequest;
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* Initiate CLI Login
|
|
384
|
-
* Generate authentication URL for CLI login
|
|
385
|
-
* @returns LoginUrlResponse CLI login initiated successfully.
|
|
386
|
-
* @throws ApiError
|
|
387
|
-
*/
|
|
388
|
-
createCliLogin() {
|
|
389
|
-
return this.httpRequest.request({
|
|
390
|
-
method: "GET",
|
|
391
|
-
url: "/api/access/cli",
|
|
392
|
-
errors: {
|
|
393
|
-
500: `Internal server error`
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Create Web Login URL
|
|
399
|
-
* Generate authentication URL for web login
|
|
400
|
-
* @returns LoginUrlResponse Web login URL created successfully
|
|
401
|
-
* @throws ApiError
|
|
402
|
-
*/
|
|
403
|
-
createWebLogin() {
|
|
404
|
-
return this.httpRequest.request({
|
|
405
|
-
method: "GET",
|
|
406
|
-
url: "/api/access/web",
|
|
407
|
-
errors: {
|
|
408
|
-
500: `Internal server error`
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
/**
|
|
413
|
-
* Web Login Callback
|
|
414
|
-
* Handle web login callback from Auth0
|
|
415
|
-
* @param code
|
|
416
|
-
* @returns void
|
|
417
|
-
* @throws ApiError
|
|
418
|
-
*/
|
|
419
|
-
callbackWebLogin(code) {
|
|
420
|
-
return this.httpRequest.request({
|
|
421
|
-
method: "GET",
|
|
422
|
-
url: "/api/access/web/callback",
|
|
423
|
-
query: {
|
|
424
|
-
"code": code
|
|
425
|
-
},
|
|
426
|
-
errors: {
|
|
427
|
-
302: `Redirect with authentication token`,
|
|
428
|
-
500: `Internal server error`
|
|
429
|
-
}
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
/**
|
|
433
|
-
* Create API Login URL
|
|
434
|
-
* Generate authentication URL for API login
|
|
435
|
-
* @returns LoginUrlResponse API login URL created successfully
|
|
436
|
-
* @throws ApiError
|
|
437
|
-
*/
|
|
438
|
-
createApiLogin() {
|
|
439
|
-
return this.httpRequest.request({
|
|
440
|
-
method: "GET",
|
|
441
|
-
url: "/api/access/api",
|
|
442
|
-
errors: {
|
|
443
|
-
500: `Internal server error`
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
/**
|
|
448
|
-
* API Login Callback
|
|
449
|
-
* Handle API login callback from Auth0
|
|
450
|
-
* @param code
|
|
451
|
-
* @returns CallbackResponse API login callback successful
|
|
452
|
-
* @throws ApiError
|
|
453
|
-
*/
|
|
454
|
-
callbackApiLogin(code) {
|
|
455
|
-
return this.httpRequest.request({
|
|
456
|
-
method: "GET",
|
|
457
|
-
url: "/api/access/api/callback",
|
|
458
|
-
query: {
|
|
459
|
-
"code": code
|
|
460
|
-
},
|
|
461
|
-
errors: {
|
|
462
|
-
500: `Internal server error`
|
|
463
|
-
}
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
};
|
|
467
|
-
|
|
468
|
-
// src/services/ApiKeysService.ts
|
|
469
|
-
var ApiKeysService = class {
|
|
470
|
-
constructor(httpRequest) {
|
|
471
|
-
this.httpRequest = httpRequest;
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Create API Key
|
|
475
|
-
* Create a new API key for the organization
|
|
476
|
-
* @param requestBody
|
|
477
|
-
* @returns ApiKeyResponse API key created successfully
|
|
478
|
-
* @throws ApiError
|
|
479
|
-
*/
|
|
480
|
-
createApiKey(requestBody) {
|
|
481
|
-
return this.httpRequest.request({
|
|
482
|
-
method: "POST",
|
|
483
|
-
url: "/api/api_key",
|
|
484
|
-
body: requestBody,
|
|
485
|
-
mediaType: "application/json",
|
|
486
|
-
errors: {
|
|
487
|
-
500: `Internal server error`
|
|
488
|
-
}
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* Get All API Keys
|
|
493
|
-
* Retrieve all API keys for the organization
|
|
494
|
-
* @returns ApiKeysResponse API keys retrieved successfully
|
|
495
|
-
* @throws ApiError
|
|
496
|
-
*/
|
|
497
|
-
getAllApiKeys() {
|
|
498
|
-
return this.httpRequest.request({
|
|
499
|
-
method: "GET",
|
|
500
|
-
url: "/api/api_key",
|
|
501
|
-
errors: {
|
|
502
|
-
500: `Internal server error`
|
|
503
|
-
}
|
|
504
|
-
});
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* Get API Key
|
|
508
|
-
* Retrieve a specific API key
|
|
509
|
-
* @param id
|
|
510
|
-
* @returns ApiKeyResponse API key retrieved successfully
|
|
511
|
-
* @throws ApiError
|
|
512
|
-
*/
|
|
513
|
-
getApiKey(id) {
|
|
514
|
-
return this.httpRequest.request({
|
|
515
|
-
method: "GET",
|
|
516
|
-
url: "/api/api_key/{id}",
|
|
517
|
-
path: {
|
|
518
|
-
"id": id
|
|
519
|
-
},
|
|
520
|
-
errors: {
|
|
521
|
-
500: `Internal server error`
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
/**
|
|
526
|
-
* Update API Key
|
|
527
|
-
* Update an existing API key
|
|
528
|
-
* @param id
|
|
529
|
-
* @param requestBody
|
|
530
|
-
* @returns ApiKeyResponse API key updated successfully
|
|
531
|
-
* @throws ApiError
|
|
532
|
-
*/
|
|
533
|
-
updateApiKey(id, requestBody) {
|
|
534
|
-
return this.httpRequest.request({
|
|
535
|
-
method: "PUT",
|
|
536
|
-
url: "/api/api_key/{id}",
|
|
537
|
-
path: {
|
|
538
|
-
"id": id
|
|
539
|
-
},
|
|
540
|
-
body: requestBody,
|
|
541
|
-
mediaType: "application/json",
|
|
542
|
-
errors: {
|
|
543
|
-
500: `Internal server error`
|
|
544
|
-
}
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* Delete API Key
|
|
549
|
-
* Delete an existing API key
|
|
550
|
-
* @param id
|
|
551
|
-
* @returns ApiKeyResponse API key deleted successfully
|
|
552
|
-
* @throws ApiError
|
|
553
|
-
*/
|
|
554
|
-
deleteApiKey(id) {
|
|
555
|
-
return this.httpRequest.request({
|
|
556
|
-
method: "DELETE",
|
|
557
|
-
url: "/api/api_key/{id}",
|
|
558
|
-
path: {
|
|
559
|
-
"id": id
|
|
560
|
-
},
|
|
561
|
-
errors: {
|
|
562
|
-
500: `Internal server error`
|
|
563
|
-
}
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* Regenerate API Key
|
|
568
|
-
* Generate a new value for an existing API key
|
|
569
|
-
* @param id
|
|
570
|
-
* @returns RegenerateApiKeyResponse API key regenerated successfully
|
|
571
|
-
* @throws ApiError
|
|
572
|
-
*/
|
|
573
|
-
regenerateApiKey(id) {
|
|
574
|
-
return this.httpRequest.request({
|
|
575
|
-
method: "GET",
|
|
576
|
-
url: "/api/api_key/{id}/regenerate",
|
|
577
|
-
path: {
|
|
578
|
-
"id": id
|
|
579
|
-
},
|
|
580
|
-
errors: {
|
|
581
|
-
500: `Internal server error`
|
|
582
|
-
}
|
|
583
|
-
});
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
|
|
587
|
-
// src/services/ApplicationsService.ts
|
|
588
|
-
var ApplicationsService = class {
|
|
589
|
-
constructor(httpRequest) {
|
|
590
|
-
this.httpRequest = httpRequest;
|
|
591
|
-
}
|
|
592
|
-
/**
|
|
593
|
-
* Get All Applications
|
|
594
|
-
* Retrieve all applications for the organization
|
|
595
|
-
* @returns GetAppsResponse Applications retrieved successfully
|
|
596
|
-
* @throws ApiError
|
|
597
|
-
*/
|
|
598
|
-
getApps() {
|
|
599
|
-
return this.httpRequest.request({
|
|
600
|
-
method: "GET",
|
|
601
|
-
url: "/api/app",
|
|
602
|
-
errors: {
|
|
603
|
-
500: `Internal server error`
|
|
604
|
-
}
|
|
605
|
-
});
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* Create Application
|
|
609
|
-
* Create a new application
|
|
610
|
-
* @param requestBody
|
|
611
|
-
* @returns CreateAppResponse Application created successfully
|
|
612
|
-
* @throws ApiError
|
|
613
|
-
*/
|
|
614
|
-
createApp(requestBody) {
|
|
615
|
-
return this.httpRequest.request({
|
|
616
|
-
method: "POST",
|
|
617
|
-
url: "/api/app",
|
|
618
|
-
body: requestBody,
|
|
619
|
-
mediaType: "application/json",
|
|
620
|
-
errors: {
|
|
621
|
-
500: `Internal server error`
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
/**
|
|
626
|
-
* Get Application
|
|
627
|
-
* Retrieve a specific application by ID
|
|
628
|
-
* @param id
|
|
629
|
-
* @returns GetAppResponse Application retrieved successfully
|
|
630
|
-
* @throws ApiError
|
|
631
|
-
*/
|
|
632
|
-
getApp(id) {
|
|
633
|
-
return this.httpRequest.request({
|
|
634
|
-
method: "GET",
|
|
635
|
-
url: "/api/app/{id}",
|
|
636
|
-
path: {
|
|
637
|
-
"id": id
|
|
638
|
-
},
|
|
639
|
-
errors: {
|
|
640
|
-
500: `Internal server error`
|
|
641
|
-
}
|
|
642
|
-
});
|
|
643
|
-
}
|
|
644
|
-
/**
|
|
645
|
-
* Update Application
|
|
646
|
-
* Update an existing application
|
|
647
|
-
* @param id
|
|
648
|
-
* @param requestBody
|
|
649
|
-
* @returns UpdateAppResponse Application updated successfully
|
|
650
|
-
* @throws ApiError
|
|
651
|
-
*/
|
|
652
|
-
updateApp(id, requestBody) {
|
|
653
|
-
return this.httpRequest.request({
|
|
654
|
-
method: "PATCH",
|
|
655
|
-
url: "/api/app/{id}",
|
|
656
|
-
path: {
|
|
657
|
-
"id": id
|
|
658
|
-
},
|
|
659
|
-
body: requestBody,
|
|
660
|
-
mediaType: "application/json",
|
|
661
|
-
errors: {
|
|
662
|
-
500: `Internal server error`
|
|
663
|
-
}
|
|
664
|
-
});
|
|
665
|
-
}
|
|
666
|
-
/**
|
|
667
|
-
* Delete Application
|
|
668
|
-
* Delete an existing application
|
|
669
|
-
* @param id
|
|
670
|
-
* @returns DeleteAppResponse Application deleted successfully
|
|
671
|
-
* @throws ApiError
|
|
672
|
-
*/
|
|
673
|
-
deleteApp(id) {
|
|
674
|
-
return this.httpRequest.request({
|
|
675
|
-
method: "DELETE",
|
|
676
|
-
url: "/api/app/{id}",
|
|
677
|
-
path: {
|
|
678
|
-
"id": id
|
|
679
|
-
},
|
|
680
|
-
errors: {
|
|
681
|
-
500: `Internal server error`
|
|
682
|
-
}
|
|
683
|
-
});
|
|
684
|
-
}
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
// src/services/AuditLogsService.ts
|
|
688
|
-
var AuditLogsService = class {
|
|
689
|
-
constructor(httpRequest) {
|
|
690
|
-
this.httpRequest = httpRequest;
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* Get Audit Logs
|
|
694
|
-
* Retrieve audit logs for the organization with pagination
|
|
695
|
-
* @param page
|
|
696
|
-
* @param perPage
|
|
697
|
-
* @param filterByUser
|
|
698
|
-
* @param filterByCategory
|
|
699
|
-
* @param filterByPastTime
|
|
700
|
-
* @returns GetAuditLogsResponseWrapper Audit logs retrieved successfully
|
|
701
|
-
* @throws ApiError
|
|
702
|
-
*/
|
|
703
|
-
getAuditLogs(page = "1", perPage = "20", filterByUser, filterByCategory, filterByPastTime) {
|
|
704
|
-
return this.httpRequest.request({
|
|
705
|
-
method: "GET",
|
|
706
|
-
url: "/api/audit_log",
|
|
707
|
-
query: {
|
|
708
|
-
"page": page,
|
|
709
|
-
"per_page": perPage,
|
|
710
|
-
"filter_by_user": filterByUser,
|
|
711
|
-
"filter_by_category": filterByCategory,
|
|
712
|
-
"filter_by_past_time": filterByPastTime
|
|
713
|
-
},
|
|
714
|
-
errors: {
|
|
715
|
-
500: `Internal server error`
|
|
716
|
-
}
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
};
|
|
720
|
-
|
|
721
|
-
// src/services/AuthenticationService.ts
|
|
722
|
-
var AuthenticationService = class {
|
|
723
|
-
constructor(httpRequest) {
|
|
724
|
-
this.httpRequest = httpRequest;
|
|
725
|
-
}
|
|
726
|
-
/**
|
|
727
|
-
* Get Current User
|
|
728
|
-
* Retrieve the current authenticated user's information and their organization details
|
|
729
|
-
* @returns WhoAmIResponse User information retrieved successfully
|
|
730
|
-
* @throws ApiError
|
|
731
|
-
*/
|
|
732
|
-
whoami() {
|
|
733
|
-
return this.httpRequest.request({
|
|
734
|
-
method: "GET",
|
|
735
|
-
url: "/api/auth/me",
|
|
736
|
-
errors: {
|
|
737
|
-
500: `Internal server error`
|
|
738
|
-
}
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
};
|
|
742
|
-
|
|
743
|
-
// src/services/EnvironmentTypesService.ts
|
|
744
|
-
var EnvironmentTypesService = class {
|
|
745
|
-
constructor(httpRequest) {
|
|
746
|
-
this.httpRequest = httpRequest;
|
|
747
|
-
}
|
|
748
|
-
/**
|
|
749
|
-
* Get Environment Types
|
|
750
|
-
* Retrieve all environment types for the organization
|
|
751
|
-
* @returns EnvTypesResponse Environment types retrieved successfully
|
|
752
|
-
* @throws ApiError
|
|
753
|
-
*/
|
|
754
|
-
getEnvTypes() {
|
|
755
|
-
return this.httpRequest.request({
|
|
756
|
-
method: "GET",
|
|
757
|
-
url: "/api/env_type",
|
|
758
|
-
errors: {
|
|
759
|
-
500: `Internal server error`
|
|
760
|
-
}
|
|
761
|
-
});
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* Create Environment Type
|
|
765
|
-
* Create a new environment type
|
|
766
|
-
* @param requestBody
|
|
767
|
-
* @returns EnvTypeResponse Environment type created successfully
|
|
768
|
-
* @throws ApiError
|
|
769
|
-
*/
|
|
770
|
-
createEnvType(requestBody) {
|
|
771
|
-
return this.httpRequest.request({
|
|
772
|
-
method: "POST",
|
|
773
|
-
url: "/api/env_type",
|
|
774
|
-
body: requestBody,
|
|
775
|
-
mediaType: "application/json",
|
|
776
|
-
errors: {
|
|
777
|
-
500: `Internal server error`
|
|
778
|
-
}
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
/**
|
|
782
|
-
* Get Environment Type
|
|
783
|
-
* Retrieve a specific environment type
|
|
784
|
-
* @param id
|
|
785
|
-
* @returns EnvTypeResponse Environment type retrieved successfully
|
|
786
|
-
* @throws ApiError
|
|
787
|
-
*/
|
|
788
|
-
getEnvType(id) {
|
|
789
|
-
return this.httpRequest.request({
|
|
790
|
-
method: "GET",
|
|
791
|
-
url: "/api/env_type/{id}",
|
|
792
|
-
path: {
|
|
793
|
-
"id": id
|
|
794
|
-
},
|
|
795
|
-
errors: {
|
|
796
|
-
500: `Internal server error`
|
|
797
|
-
}
|
|
798
|
-
});
|
|
799
|
-
}
|
|
800
|
-
/**
|
|
801
|
-
* Update Environment Type
|
|
802
|
-
* Update an existing environment type
|
|
803
|
-
* @param id
|
|
804
|
-
* @param requestBody
|
|
805
|
-
* @returns EnvTypeResponse Environment type updated successfully
|
|
806
|
-
* @throws ApiError
|
|
807
|
-
*/
|
|
808
|
-
updateEnvType(id, requestBody) {
|
|
809
|
-
return this.httpRequest.request({
|
|
810
|
-
method: "PATCH",
|
|
811
|
-
url: "/api/env_type/{id}",
|
|
812
|
-
path: {
|
|
813
|
-
"id": id
|
|
814
|
-
},
|
|
815
|
-
body: requestBody,
|
|
816
|
-
mediaType: "application/json",
|
|
817
|
-
errors: {
|
|
818
|
-
500: `Internal server error`
|
|
819
|
-
}
|
|
820
|
-
});
|
|
821
|
-
}
|
|
822
|
-
/**
|
|
823
|
-
* Delete Environment Type
|
|
824
|
-
* Delete an existing environment type
|
|
825
|
-
* @param id
|
|
826
|
-
* @returns DeleteEnvTypeRequest Environment type deleted successfully
|
|
827
|
-
* @throws ApiError
|
|
828
|
-
*/
|
|
829
|
-
deleteEnvType(id) {
|
|
830
|
-
return this.httpRequest.request({
|
|
831
|
-
method: "DELETE",
|
|
832
|
-
url: "/api/env_type/{id}",
|
|
833
|
-
path: {
|
|
834
|
-
"id": id
|
|
835
|
-
},
|
|
836
|
-
errors: {
|
|
837
|
-
500: `Internal server error`
|
|
838
|
-
}
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
};
|
|
842
|
-
|
|
843
|
-
// src/services/EnvironmentVariablesService.ts
|
|
844
|
-
var EnvironmentVariablesService = class {
|
|
845
|
-
constructor(httpRequest) {
|
|
846
|
-
this.httpRequest = httpRequest;
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* Get Environment Variables
|
|
850
|
-
* Retrieve all environment variables for an application and environment type
|
|
851
|
-
* @param requestBody
|
|
852
|
-
* @returns EnvsResponse Environment variables retrieved successfully
|
|
853
|
-
* @throws ApiError
|
|
854
|
-
*/
|
|
855
|
-
getEnvs(requestBody) {
|
|
856
|
-
return this.httpRequest.request({
|
|
857
|
-
method: "POST",
|
|
858
|
-
url: "/api/env",
|
|
859
|
-
body: requestBody,
|
|
860
|
-
mediaType: "application/json",
|
|
861
|
-
errors: {
|
|
862
|
-
500: `Internal server error`
|
|
863
|
-
}
|
|
864
|
-
});
|
|
865
|
-
}
|
|
866
|
-
/**
|
|
867
|
-
* Delete Environment Variable
|
|
868
|
-
* Delete an existing environment variable
|
|
869
|
-
* @param requestBody
|
|
870
|
-
* @returns DeleteEnvRequest Environment variable deleted successfully
|
|
871
|
-
* @throws ApiError
|
|
872
|
-
*/
|
|
873
|
-
deleteEnv(requestBody) {
|
|
874
|
-
return this.httpRequest.request({
|
|
875
|
-
method: "DELETE",
|
|
876
|
-
url: "/api/env",
|
|
877
|
-
body: requestBody,
|
|
878
|
-
mediaType: "application/json",
|
|
879
|
-
errors: {
|
|
880
|
-
500: `Internal server error`
|
|
881
|
-
}
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* Get Single Environment Variable
|
|
886
|
-
* Retrieve a specific environment variable
|
|
887
|
-
* @param key
|
|
888
|
-
* @param requestBody
|
|
889
|
-
* @returns EnvResponse Environment variable retrieved successfully
|
|
890
|
-
* @throws ApiError
|
|
891
|
-
*/
|
|
892
|
-
getEnv(key, requestBody) {
|
|
893
|
-
return this.httpRequest.request({
|
|
894
|
-
method: "POST",
|
|
895
|
-
url: "/api/env/i/{key}",
|
|
896
|
-
path: {
|
|
897
|
-
"key": key
|
|
898
|
-
},
|
|
899
|
-
body: requestBody,
|
|
900
|
-
mediaType: "application/json",
|
|
901
|
-
errors: {
|
|
902
|
-
500: `Internal server error`
|
|
903
|
-
}
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
/**
|
|
907
|
-
* Update Environment Variable
|
|
908
|
-
* Update an existing environment variable
|
|
909
|
-
* @param key
|
|
910
|
-
* @param requestBody
|
|
911
|
-
* @returns EnvResponse Environment variable updated successfully
|
|
912
|
-
* @throws ApiError
|
|
913
|
-
*/
|
|
914
|
-
updateEnv(key, requestBody) {
|
|
915
|
-
return this.httpRequest.request({
|
|
916
|
-
method: "PATCH",
|
|
917
|
-
url: "/api/env/i/{key}",
|
|
918
|
-
path: {
|
|
919
|
-
"key": key
|
|
920
|
-
},
|
|
921
|
-
body: requestBody,
|
|
922
|
-
mediaType: "application/json",
|
|
923
|
-
errors: {
|
|
924
|
-
500: `Internal server error`
|
|
925
|
-
}
|
|
926
|
-
});
|
|
927
|
-
}
|
|
928
|
-
/**
|
|
929
|
-
* Create Environment Variable
|
|
930
|
-
* Create a new environment variable
|
|
931
|
-
* @param requestBody
|
|
932
|
-
* @returns EnvResponse Environment variable created successfully
|
|
933
|
-
* @throws ApiError
|
|
934
|
-
*/
|
|
935
|
-
createEnv(requestBody) {
|
|
936
|
-
return this.httpRequest.request({
|
|
937
|
-
method: "PUT",
|
|
938
|
-
url: "/api/env/single",
|
|
939
|
-
body: requestBody,
|
|
940
|
-
mediaType: "application/json",
|
|
941
|
-
errors: {
|
|
942
|
-
500: `Internal server error`
|
|
943
|
-
}
|
|
944
|
-
});
|
|
945
|
-
}
|
|
946
|
-
/**
|
|
947
|
-
* Batch Create Environment Variables
|
|
948
|
-
* Create multiple environment variables in a single request
|
|
949
|
-
* @param requestBody
|
|
950
|
-
* @returns BatchEnvsResponse Environment variables created successfully
|
|
951
|
-
* @throws ApiError
|
|
952
|
-
*/
|
|
953
|
-
batchCreateEnvs(requestBody) {
|
|
954
|
-
return this.httpRequest.request({
|
|
955
|
-
method: "PUT",
|
|
956
|
-
url: "/api/env/batch",
|
|
957
|
-
body: requestBody,
|
|
958
|
-
mediaType: "application/json",
|
|
959
|
-
errors: {
|
|
960
|
-
500: `Internal server error`
|
|
961
|
-
}
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
/**
|
|
965
|
-
* Batch Update Environment Variables
|
|
966
|
-
* Update multiple environment variables in a single request
|
|
967
|
-
* @param requestBody
|
|
968
|
-
* @returns BatchEnvsResponse Environment variables updated successfully
|
|
969
|
-
* @throws ApiError
|
|
970
|
-
*/
|
|
971
|
-
batchUpdateEnvs(requestBody) {
|
|
972
|
-
return this.httpRequest.request({
|
|
973
|
-
method: "PATCH",
|
|
974
|
-
url: "/api/env/batch",
|
|
975
|
-
body: requestBody,
|
|
976
|
-
mediaType: "application/json",
|
|
977
|
-
errors: {
|
|
978
|
-
500: `Internal server error`
|
|
979
|
-
}
|
|
980
|
-
});
|
|
981
|
-
}
|
|
982
|
-
/**
|
|
983
|
-
* Batch Delete Environment Variables
|
|
984
|
-
* Delete multiple environment variables in a single request
|
|
985
|
-
* @param requestBody
|
|
986
|
-
* @returns BatchEnvsResponse Environment variables deleted successfully
|
|
987
|
-
* @throws ApiError
|
|
988
|
-
*/
|
|
989
|
-
deleteBatchEnv(requestBody) {
|
|
990
|
-
return this.httpRequest.request({
|
|
991
|
-
method: "DELETE",
|
|
992
|
-
url: "/api/env/batch",
|
|
993
|
-
body: requestBody,
|
|
994
|
-
mediaType: "application/json",
|
|
995
|
-
errors: {
|
|
996
|
-
500: `Internal server error`
|
|
997
|
-
}
|
|
998
|
-
});
|
|
999
|
-
}
|
|
1000
|
-
};
|
|
1001
|
-
|
|
1002
|
-
// src/services/EnvironmentVariablesPointInTimeService.ts
|
|
1003
|
-
var EnvironmentVariablesPointInTimeService = class {
|
|
1004
|
-
constructor(httpRequest) {
|
|
1005
|
-
this.httpRequest = httpRequest;
|
|
1006
|
-
}
|
|
1007
|
-
/**
|
|
1008
|
-
* Get Environment Variables History
|
|
1009
|
-
* Retrieve paginated history of environment variable changes
|
|
1010
|
-
* @param requestBody
|
|
1011
|
-
* @returns EnvHistoryResponse Environment variables history retrieved successfully
|
|
1012
|
-
* @throws ApiError
|
|
1013
|
-
*/
|
|
1014
|
-
getEnvHistory(requestBody) {
|
|
1015
|
-
return this.httpRequest.request({
|
|
1016
|
-
method: "POST",
|
|
1017
|
-
url: "/api/env/history",
|
|
1018
|
-
body: requestBody,
|
|
1019
|
-
mediaType: "application/json",
|
|
1020
|
-
errors: {
|
|
1021
|
-
500: `Internal server error`
|
|
1022
|
-
}
|
|
1023
|
-
});
|
|
1024
|
-
}
|
|
1025
|
-
/**
|
|
1026
|
-
* Get Environment Variables at Point in Time
|
|
1027
|
-
* Retrieve environment variables state at a specific point in time
|
|
1028
|
-
* @param requestBody
|
|
1029
|
-
* @returns EnvPitStateResponse Environment variables at point in time retrieved successfully
|
|
1030
|
-
* @throws ApiError
|
|
1031
|
-
*/
|
|
1032
|
-
getEnvsAtPointInTime(requestBody) {
|
|
1033
|
-
return this.httpRequest.request({
|
|
1034
|
-
method: "POST",
|
|
1035
|
-
url: "/api/env/pit",
|
|
1036
|
-
body: requestBody,
|
|
1037
|
-
mediaType: "application/json",
|
|
1038
|
-
errors: {
|
|
1039
|
-
500: `Internal server error`
|
|
1040
|
-
}
|
|
1041
|
-
});
|
|
1042
|
-
}
|
|
1043
|
-
/**
|
|
1044
|
-
* Get Environment Variables at Timestamp
|
|
1045
|
-
* Retrieve environment variables state at a specific timestamp
|
|
1046
|
-
* @param requestBody
|
|
1047
|
-
* @returns EnvPitStateResponse Environment variables at timestamp retrieved successfully
|
|
1048
|
-
* @throws ApiError
|
|
1049
|
-
*/
|
|
1050
|
-
getEnvsAtTimestamp(requestBody) {
|
|
1051
|
-
return this.httpRequest.request({
|
|
1052
|
-
method: "POST",
|
|
1053
|
-
url: "/api/env/timestamp",
|
|
1054
|
-
body: requestBody,
|
|
1055
|
-
mediaType: "application/json",
|
|
1056
|
-
errors: {
|
|
1057
|
-
500: `Internal server error`
|
|
1058
|
-
}
|
|
1059
|
-
});
|
|
1060
|
-
}
|
|
1061
|
-
/**
|
|
1062
|
-
* Get Environment Variables Diff
|
|
1063
|
-
* Compare environment variables between two points in time
|
|
1064
|
-
* @param requestBody
|
|
1065
|
-
* @returns EnvDiffResponse Environment variables diff retrieved successfully
|
|
1066
|
-
* @throws ApiError
|
|
1067
|
-
*/
|
|
1068
|
-
getEnvDiff(requestBody) {
|
|
1069
|
-
return this.httpRequest.request({
|
|
1070
|
-
method: "POST",
|
|
1071
|
-
url: "/api/env/diff",
|
|
1072
|
-
body: requestBody,
|
|
1073
|
-
mediaType: "application/json",
|
|
1074
|
-
errors: {
|
|
1075
|
-
500: `Internal server error`
|
|
1076
|
-
}
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
/**
|
|
1080
|
-
* Get Variable Timeline
|
|
1081
|
-
* Get timeline of changes for a specific environment variable
|
|
1082
|
-
* @param key
|
|
1083
|
-
* @param requestBody
|
|
1084
|
-
* @returns VariableTimelineResponse Variable timeline retrieved successfully
|
|
1085
|
-
* @throws ApiError
|
|
1086
|
-
*/
|
|
1087
|
-
getVariableTimeline(key, requestBody) {
|
|
1088
|
-
return this.httpRequest.request({
|
|
1089
|
-
method: "POST",
|
|
1090
|
-
url: "/api/env/timeline/{key}",
|
|
1091
|
-
path: {
|
|
1092
|
-
"key": key
|
|
1093
|
-
},
|
|
1094
|
-
body: requestBody,
|
|
1095
|
-
mediaType: "application/json",
|
|
1096
|
-
errors: {
|
|
1097
|
-
500: `Internal server error`
|
|
1098
|
-
}
|
|
1099
|
-
});
|
|
1100
|
-
}
|
|
1101
|
-
};
|
|
1102
|
-
|
|
1103
|
-
// src/services/EnvironmentVariablesRollbackService.ts
|
|
1104
|
-
var EnvironmentVariablesRollbackService = class {
|
|
1105
|
-
constructor(httpRequest) {
|
|
1106
|
-
this.httpRequest = httpRequest;
|
|
1107
|
-
}
|
|
1108
|
-
/**
|
|
1109
|
-
* Rollback Environment Variables to Point in Time
|
|
1110
|
-
* Rollback all environment variables to a specific point in time
|
|
1111
|
-
* @param requestBody
|
|
1112
|
-
* @returns RollbackResponse Environment variables rolled back successfully
|
|
1113
|
-
* @throws ApiError
|
|
1114
|
-
*/
|
|
1115
|
-
rollbackEnvsToPitId(requestBody) {
|
|
1116
|
-
return this.httpRequest.request({
|
|
1117
|
-
method: "POST",
|
|
1118
|
-
url: "/api/env/rollback/pit",
|
|
1119
|
-
body: requestBody,
|
|
1120
|
-
mediaType: "application/json",
|
|
1121
|
-
errors: {
|
|
1122
|
-
500: `Internal server error`
|
|
1123
|
-
}
|
|
1124
|
-
});
|
|
1125
|
-
}
|
|
1126
|
-
/**
|
|
1127
|
-
* Rollback Environment Variables to Timestamp
|
|
1128
|
-
* Rollback all environment variables to a specific timestamp
|
|
1129
|
-
* @param requestBody
|
|
1130
|
-
* @returns RollbackResponse Environment variables rolled back successfully
|
|
1131
|
-
* @throws ApiError
|
|
1132
|
-
*/
|
|
1133
|
-
rollbackEnvsToTimestamp(requestBody) {
|
|
1134
|
-
return this.httpRequest.request({
|
|
1135
|
-
method: "POST",
|
|
1136
|
-
url: "/api/env/rollback/timestamp",
|
|
1137
|
-
body: requestBody,
|
|
1138
|
-
mediaType: "application/json",
|
|
1139
|
-
errors: {
|
|
1140
|
-
500: `Internal server error`
|
|
1141
|
-
}
|
|
1142
|
-
});
|
|
1143
|
-
}
|
|
1144
|
-
/**
|
|
1145
|
-
* Rollback Single Variable to Point in Time
|
|
1146
|
-
* Rollback a specific environment variable to a point in time
|
|
1147
|
-
* @param key
|
|
1148
|
-
* @param requestBody
|
|
1149
|
-
* @returns VariableRollbackResponse Variable rolled back successfully
|
|
1150
|
-
* @throws ApiError
|
|
1151
|
-
*/
|
|
1152
|
-
rollbackVariableToPitId(key, requestBody) {
|
|
1153
|
-
return this.httpRequest.request({
|
|
1154
|
-
method: "POST",
|
|
1155
|
-
url: "/api/env/rollback/variable/{key}/pit",
|
|
1156
|
-
path: {
|
|
1157
|
-
"key": key
|
|
1158
|
-
},
|
|
1159
|
-
body: requestBody,
|
|
1160
|
-
mediaType: "application/json",
|
|
1161
|
-
errors: {
|
|
1162
|
-
500: `Internal server error`
|
|
1163
|
-
}
|
|
1164
|
-
});
|
|
1165
|
-
}
|
|
1166
|
-
/**
|
|
1167
|
-
* Rollback Single Variable to Timestamp
|
|
1168
|
-
* Rollback a specific environment variable to a timestamp
|
|
1169
|
-
* @param key
|
|
1170
|
-
* @param requestBody
|
|
1171
|
-
* @returns VariableRollbackResponse Variable rolled back successfully
|
|
1172
|
-
* @throws ApiError
|
|
1173
|
-
*/
|
|
1174
|
-
rollbackVariableToTimestamp(key, requestBody) {
|
|
1175
|
-
return this.httpRequest.request({
|
|
1176
|
-
method: "POST",
|
|
1177
|
-
url: "/api/env/rollback/variable/{key}/timestamp",
|
|
1178
|
-
path: {
|
|
1179
|
-
"key": key
|
|
1180
|
-
},
|
|
1181
|
-
body: requestBody,
|
|
1182
|
-
mediaType: "application/json",
|
|
1183
|
-
errors: {
|
|
1184
|
-
500: `Internal server error`
|
|
1185
|
-
}
|
|
1186
|
-
});
|
|
1187
|
-
}
|
|
1188
|
-
};
|
|
1189
|
-
|
|
1190
|
-
// src/services/FileUploadService.ts
|
|
1191
|
-
var FileUploadService = class {
|
|
1192
|
-
constructor(httpRequest) {
|
|
1193
|
-
this.httpRequest = httpRequest;
|
|
1194
|
-
}
|
|
1195
|
-
/**
|
|
1196
|
-
* Upload File
|
|
1197
|
-
* Upload a file to the server. The file should be less than 5MB in size.
|
|
1198
|
-
* @param formData
|
|
1199
|
-
* @returns UploadFileResponse File uploaded successfully
|
|
1200
|
-
* @throws ApiError
|
|
1201
|
-
*/
|
|
1202
|
-
uploadFile(formData) {
|
|
1203
|
-
return this.httpRequest.request({
|
|
1204
|
-
method: "POST",
|
|
1205
|
-
url: "/api/upload/file",
|
|
1206
|
-
formData,
|
|
1207
|
-
mediaType: "multipart/form-data",
|
|
1208
|
-
errors: {
|
|
1209
|
-
500: `Internal server error`
|
|
1210
|
-
}
|
|
1211
|
-
});
|
|
1212
|
-
}
|
|
1213
|
-
};
|
|
1214
|
-
|
|
1215
|
-
// src/services/OnboardingService.ts
|
|
1216
|
-
var OnboardingService = class {
|
|
1217
|
-
constructor(httpRequest) {
|
|
1218
|
-
this.httpRequest = httpRequest;
|
|
1219
|
-
}
|
|
1220
|
-
/**
|
|
1221
|
-
* Create Organization Invite
|
|
1222
|
-
* Create an organization invite
|
|
1223
|
-
* @param requestBody
|
|
1224
|
-
* @returns CreateOrgInviteResponse Successful greeting response
|
|
1225
|
-
* @throws ApiError
|
|
1226
|
-
*/
|
|
1227
|
-
createOrgInvite(requestBody) {
|
|
1228
|
-
return this.httpRequest.request({
|
|
1229
|
-
method: "POST",
|
|
1230
|
-
url: "/api/onboarding/org",
|
|
1231
|
-
body: requestBody,
|
|
1232
|
-
mediaType: "application/json",
|
|
1233
|
-
errors: {
|
|
1234
|
-
500: `Internal server error`
|
|
1235
|
-
}
|
|
1236
|
-
});
|
|
1237
|
-
}
|
|
1238
|
-
/**
|
|
1239
|
-
* Get Organization Invite by Code
|
|
1240
|
-
* Get organization invite by code
|
|
1241
|
-
* @param inviteCode
|
|
1242
|
-
* @returns GetOrgInviteByCodeResponse Organization invite retrieved successfully
|
|
1243
|
-
* @throws ApiError
|
|
1244
|
-
*/
|
|
1245
|
-
getOrgInviteByCode(inviteCode) {
|
|
1246
|
-
return this.httpRequest.request({
|
|
1247
|
-
method: "GET",
|
|
1248
|
-
url: "/api/onboarding/org/{invite_code}",
|
|
1249
|
-
path: {
|
|
1250
|
-
"invite_code": inviteCode
|
|
1251
|
-
},
|
|
1252
|
-
errors: {
|
|
1253
|
-
500: `Internal server error`
|
|
1254
|
-
}
|
|
1255
|
-
});
|
|
1256
|
-
}
|
|
1257
|
-
/**
|
|
1258
|
-
* Accept Organization Invite
|
|
1259
|
-
* Accept organization invite
|
|
1260
|
-
* @param inviteCode
|
|
1261
|
-
* @param requestBody
|
|
1262
|
-
* @returns AcceptOrgInviteResponse Organization invite accepted successfully
|
|
1263
|
-
* @throws ApiError
|
|
1264
|
-
*/
|
|
1265
|
-
acceptOrgInvite(inviteCode, requestBody) {
|
|
1266
|
-
return this.httpRequest.request({
|
|
1267
|
-
method: "PUT",
|
|
1268
|
-
url: "/api/onboarding/org/{invite_code}/accept",
|
|
1269
|
-
path: {
|
|
1270
|
-
"invite_code": inviteCode
|
|
1271
|
-
},
|
|
1272
|
-
body: requestBody,
|
|
1273
|
-
mediaType: "application/json",
|
|
1274
|
-
errors: {
|
|
1275
|
-
500: `Internal server error`
|
|
1276
|
-
}
|
|
1277
|
-
});
|
|
1278
|
-
}
|
|
1279
|
-
/**
|
|
1280
|
-
* Get User Invite by Code
|
|
1281
|
-
* Get user invite by code
|
|
1282
|
-
* @param inviteCode
|
|
1283
|
-
* @returns GetUserInviteByTokenResponse User invite retrieved successfully
|
|
1284
|
-
* @throws ApiError
|
|
1285
|
-
*/
|
|
1286
|
-
getUserInviteByCode(inviteCode) {
|
|
1287
|
-
return this.httpRequest.request({
|
|
1288
|
-
method: "GET",
|
|
1289
|
-
url: "/api/onboarding/user/{invite_code}",
|
|
1290
|
-
path: {
|
|
1291
|
-
"invite_code": inviteCode
|
|
1292
|
-
},
|
|
1293
|
-
errors: {
|
|
1294
|
-
500: `Internal server error`
|
|
1295
|
-
}
|
|
1296
|
-
});
|
|
1297
|
-
}
|
|
1298
|
-
/**
|
|
1299
|
-
* Update User Invite
|
|
1300
|
-
* Update user invite
|
|
1301
|
-
* @param inviteCode
|
|
1302
|
-
* @param requestBody
|
|
1303
|
-
* @returns UpdateUserInviteResponse User invite updated successfully
|
|
1304
|
-
* @throws ApiError
|
|
1305
|
-
*/
|
|
1306
|
-
updateUserInvite(inviteCode, requestBody) {
|
|
1307
|
-
return this.httpRequest.request({
|
|
1308
|
-
method: "PATCH",
|
|
1309
|
-
url: "/api/onboarding/user/{invite_code}",
|
|
1310
|
-
path: {
|
|
1311
|
-
"invite_code": inviteCode
|
|
1312
|
-
},
|
|
1313
|
-
body: requestBody,
|
|
1314
|
-
mediaType: "application/json",
|
|
1315
|
-
errors: {
|
|
1316
|
-
500: `Internal server error`
|
|
1317
|
-
}
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1320
|
-
/**
|
|
1321
|
-
* Accept User Invite
|
|
1322
|
-
* Accept user invite
|
|
1323
|
-
* @param inviteCode
|
|
1324
|
-
* @param requestBody
|
|
1325
|
-
* @returns AcceptUserInviteResponse User invite accepted successfully
|
|
1326
|
-
* @throws ApiError
|
|
1327
|
-
*/
|
|
1328
|
-
acceptUserInvite(inviteCode, requestBody) {
|
|
1329
|
-
return this.httpRequest.request({
|
|
1330
|
-
method: "PUT",
|
|
1331
|
-
url: "/api/onboarding/user/{invite_code}/accept",
|
|
1332
|
-
path: {
|
|
1333
|
-
"invite_code": inviteCode
|
|
1334
|
-
},
|
|
1335
|
-
body: requestBody,
|
|
1336
|
-
mediaType: "application/json",
|
|
1337
|
-
errors: {
|
|
1338
|
-
500: `Internal server error`
|
|
1339
|
-
}
|
|
1340
|
-
});
|
|
1341
|
-
}
|
|
1342
|
-
/**
|
|
1343
|
-
* Create User Invite
|
|
1344
|
-
* Create a user invite
|
|
1345
|
-
* @param requestBody
|
|
1346
|
-
* @returns CreateUserInviteResponse User invite created successfully
|
|
1347
|
-
* @throws ApiError
|
|
1348
|
-
*/
|
|
1349
|
-
createUserInvite(requestBody) {
|
|
1350
|
-
return this.httpRequest.request({
|
|
1351
|
-
method: "POST",
|
|
1352
|
-
url: "/api/onboarding/user",
|
|
1353
|
-
body: requestBody,
|
|
1354
|
-
mediaType: "application/json",
|
|
1355
|
-
errors: {
|
|
1356
|
-
500: `Internal server error`
|
|
1357
|
-
}
|
|
1358
|
-
});
|
|
1359
|
-
}
|
|
1360
|
-
/**
|
|
1361
|
-
* Get All User Invites
|
|
1362
|
-
* Get all user invites
|
|
1363
|
-
* @returns GetUserInviteByTokenResponse User invites retrieved successfully
|
|
1364
|
-
* @throws ApiError
|
|
1365
|
-
*/
|
|
1366
|
-
getAllUserInvites() {
|
|
1367
|
-
return this.httpRequest.request({
|
|
1368
|
-
method: "GET",
|
|
1369
|
-
url: "/api/onboarding/user",
|
|
1370
|
-
errors: {
|
|
1371
|
-
500: `Internal server error`
|
|
1372
|
-
}
|
|
1373
|
-
});
|
|
1374
|
-
}
|
|
1375
|
-
/**
|
|
1376
|
-
* Delete User Invite
|
|
1377
|
-
* Delete user invite
|
|
1378
|
-
* @param inviteId
|
|
1379
|
-
* @param requestBody
|
|
1380
|
-
* @returns DeleteUserInviteResponse User invite deleted successfully
|
|
1381
|
-
* @throws ApiError
|
|
1382
|
-
*/
|
|
1383
|
-
deleteUserInvite(inviteId, requestBody) {
|
|
1384
|
-
return this.httpRequest.request({
|
|
1385
|
-
method: "DELETE",
|
|
1386
|
-
url: "/api/onboarding/user/{invite_id}",
|
|
1387
|
-
path: {
|
|
1388
|
-
"invite_id": inviteId
|
|
1389
|
-
},
|
|
1390
|
-
body: requestBody,
|
|
1391
|
-
mediaType: "application/json",
|
|
1392
|
-
errors: {
|
|
1393
|
-
500: `Internal server error`
|
|
1394
|
-
}
|
|
1395
|
-
});
|
|
1396
|
-
}
|
|
1397
|
-
};
|
|
1398
|
-
|
|
1399
|
-
// src/services/OrganizationsService.ts
|
|
1400
|
-
var OrganizationsService = class {
|
|
1401
|
-
constructor(httpRequest) {
|
|
1402
|
-
this.httpRequest = httpRequest;
|
|
1403
|
-
}
|
|
1404
|
-
/**
|
|
1405
|
-
* Get Organization
|
|
1406
|
-
* Retrieve the current organization's details
|
|
1407
|
-
* @returns OrgResponse Organization retrieved successfully
|
|
1408
|
-
* @throws ApiError
|
|
1409
|
-
*/
|
|
1410
|
-
getOrg() {
|
|
1411
|
-
return this.httpRequest.request({
|
|
1412
|
-
method: "GET",
|
|
1413
|
-
url: "/api/org",
|
|
1414
|
-
errors: {
|
|
1415
|
-
500: `Internal server error`
|
|
1416
|
-
}
|
|
1417
|
-
});
|
|
1418
|
-
}
|
|
1419
|
-
/**
|
|
1420
|
-
* Update Organization
|
|
1421
|
-
* Update the current organization's details
|
|
1422
|
-
* @param requestBody
|
|
1423
|
-
* @returns OrgResponse Organization updated successfully
|
|
1424
|
-
* @throws ApiError
|
|
1425
|
-
*/
|
|
1426
|
-
updateOrg(requestBody) {
|
|
1427
|
-
return this.httpRequest.request({
|
|
1428
|
-
method: "PATCH",
|
|
1429
|
-
url: "/api/org",
|
|
1430
|
-
body: requestBody,
|
|
1431
|
-
mediaType: "application/json",
|
|
1432
|
-
errors: {
|
|
1433
|
-
500: `Internal server error`
|
|
1434
|
-
}
|
|
1435
|
-
});
|
|
1436
|
-
}
|
|
1437
|
-
/**
|
|
1438
|
-
* Check Slug Availability
|
|
1439
|
-
* Check if an organization slug is available
|
|
1440
|
-
* @param slug
|
|
1441
|
-
* @returns CheckSlugResponse Slug availability checked successfully
|
|
1442
|
-
* @throws ApiError
|
|
1443
|
-
*/
|
|
1444
|
-
checkIfSlugExists(slug) {
|
|
1445
|
-
return this.httpRequest.request({
|
|
1446
|
-
method: "GET",
|
|
1447
|
-
url: "/api/org/check-slug",
|
|
1448
|
-
query: {
|
|
1449
|
-
"slug": slug
|
|
1450
|
-
},
|
|
1451
|
-
errors: {
|
|
1452
|
-
500: `Internal server error`
|
|
1453
|
-
}
|
|
1454
|
-
});
|
|
1455
|
-
}
|
|
1456
|
-
};
|
|
1457
|
-
|
|
1458
|
-
// src/services/RolesService.ts
|
|
1459
|
-
var RolesService = class {
|
|
1460
|
-
constructor(httpRequest) {
|
|
1461
|
-
this.httpRequest = httpRequest;
|
|
1462
|
-
}
|
|
1463
|
-
/**
|
|
1464
|
-
* Get All Roles
|
|
1465
|
-
* Retrieve all roles in the organization
|
|
1466
|
-
* @returns RolesResponse Roles retrieved successfully
|
|
1467
|
-
* @throws ApiError
|
|
1468
|
-
*/
|
|
1469
|
-
getAllRoles() {
|
|
1470
|
-
return this.httpRequest.request({
|
|
1471
|
-
method: "GET",
|
|
1472
|
-
url: "/api/role",
|
|
1473
|
-
errors: {
|
|
1474
|
-
500: `Internal server error`
|
|
1475
|
-
}
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
/**
|
|
1479
|
-
* Create Role
|
|
1480
|
-
* Create a new role in the organization
|
|
1481
|
-
* @param requestBody
|
|
1482
|
-
* @returns RoleResponse Role created successfully
|
|
1483
|
-
* @throws ApiError
|
|
1484
|
-
*/
|
|
1485
|
-
createRole(requestBody) {
|
|
1486
|
-
return this.httpRequest.request({
|
|
1487
|
-
method: "POST",
|
|
1488
|
-
url: "/api/role",
|
|
1489
|
-
body: requestBody,
|
|
1490
|
-
mediaType: "application/json",
|
|
1491
|
-
errors: {
|
|
1492
|
-
500: `Internal server error`
|
|
1493
|
-
}
|
|
1494
|
-
});
|
|
1495
|
-
}
|
|
1496
|
-
/**
|
|
1497
|
-
* Get Role Statistics
|
|
1498
|
-
* Retrieve statistics about roles in the organization
|
|
1499
|
-
* @returns RoleStatsResponse Role statistics retrieved successfully
|
|
1500
|
-
* @throws ApiError
|
|
1501
|
-
*/
|
|
1502
|
-
getRoleStats() {
|
|
1503
|
-
return this.httpRequest.request({
|
|
1504
|
-
method: "GET",
|
|
1505
|
-
url: "/api/role/stats",
|
|
1506
|
-
errors: {
|
|
1507
|
-
500: `Internal server error`
|
|
1508
|
-
}
|
|
1509
|
-
});
|
|
1510
|
-
}
|
|
1511
|
-
/**
|
|
1512
|
-
* Get Role
|
|
1513
|
-
* Retrieve a specific role by ID
|
|
1514
|
-
* @param id
|
|
1515
|
-
* @returns RoleResponse Role retrieved successfully
|
|
1516
|
-
* @throws ApiError
|
|
1517
|
-
*/
|
|
1518
|
-
getRole(id) {
|
|
1519
|
-
return this.httpRequest.request({
|
|
1520
|
-
method: "GET",
|
|
1521
|
-
url: "/api/role/{id}",
|
|
1522
|
-
path: {
|
|
1523
|
-
"id": id
|
|
1524
|
-
},
|
|
1525
|
-
errors: {
|
|
1526
|
-
500: `Internal server error`
|
|
1527
|
-
}
|
|
1528
|
-
});
|
|
1529
|
-
}
|
|
1530
|
-
/**
|
|
1531
|
-
* Update Role
|
|
1532
|
-
* Update an existing role
|
|
1533
|
-
* @param id
|
|
1534
|
-
* @param requestBody
|
|
1535
|
-
* @returns RoleResponse Role updated successfully
|
|
1536
|
-
* @throws ApiError
|
|
1537
|
-
*/
|
|
1538
|
-
updateRole(id, requestBody) {
|
|
1539
|
-
return this.httpRequest.request({
|
|
1540
|
-
method: "PATCH",
|
|
1541
|
-
url: "/api/role/{id}",
|
|
1542
|
-
path: {
|
|
1543
|
-
"id": id
|
|
1544
|
-
},
|
|
1545
|
-
body: requestBody,
|
|
1546
|
-
mediaType: "application/json",
|
|
1547
|
-
errors: {
|
|
1548
|
-
500: `Internal server error`
|
|
1549
|
-
}
|
|
1550
|
-
});
|
|
1551
|
-
}
|
|
1552
|
-
/**
|
|
1553
|
-
* Delete Role
|
|
1554
|
-
* Delete an existing role (non-master roles only)
|
|
1555
|
-
* @param id
|
|
1556
|
-
* @returns RoleResponse Role deleted successfully
|
|
1557
|
-
* @throws ApiError
|
|
1558
|
-
*/
|
|
1559
|
-
deleteRole(id) {
|
|
1560
|
-
return this.httpRequest.request({
|
|
1561
|
-
method: "DELETE",
|
|
1562
|
-
url: "/api/role/{id}",
|
|
1563
|
-
path: {
|
|
1564
|
-
"id": id
|
|
1565
|
-
},
|
|
1566
|
-
errors: {
|
|
1567
|
-
500: `Internal server error`
|
|
1568
|
-
}
|
|
1569
|
-
});
|
|
1570
|
-
}
|
|
1571
|
-
};
|
|
1572
|
-
|
|
1573
|
-
// src/services/SecretsService.ts
|
|
1574
|
-
var SecretsService = class {
|
|
1575
|
-
constructor(httpRequest) {
|
|
1576
|
-
this.httpRequest = httpRequest;
|
|
1577
|
-
}
|
|
1578
|
-
/**
|
|
1579
|
-
* Get Secrets
|
|
1580
|
-
* Retrieve all secrets for an application and environment type
|
|
1581
|
-
* @param requestBody
|
|
1582
|
-
* @returns SecretsResponse Secrets retrieved successfully
|
|
1583
|
-
* @throws ApiError
|
|
1584
|
-
*/
|
|
1585
|
-
getSecrets(requestBody) {
|
|
1586
|
-
return this.httpRequest.request({
|
|
1587
|
-
method: "POST",
|
|
1588
|
-
url: "/api/secret",
|
|
1589
|
-
body: requestBody,
|
|
1590
|
-
mediaType: "application/json",
|
|
1591
|
-
errors: {
|
|
1592
|
-
500: `Internal server error`
|
|
1593
|
-
}
|
|
1594
|
-
});
|
|
1595
|
-
}
|
|
1596
|
-
/**
|
|
1597
|
-
* Delete Secret
|
|
1598
|
-
* Delete an existing secret
|
|
1599
|
-
* @param requestBody
|
|
1600
|
-
* @returns BatchSecretsResponse Secret deleted successfully
|
|
1601
|
-
* @throws ApiError
|
|
1602
|
-
*/
|
|
1603
|
-
deleteSecret(requestBody) {
|
|
1604
|
-
return this.httpRequest.request({
|
|
1605
|
-
method: "DELETE",
|
|
1606
|
-
url: "/api/secret",
|
|
1607
|
-
body: requestBody,
|
|
1608
|
-
mediaType: "application/json",
|
|
1609
|
-
errors: {
|
|
1610
|
-
500: `Internal server error`
|
|
1611
|
-
}
|
|
1612
|
-
});
|
|
1613
|
-
}
|
|
1614
|
-
/**
|
|
1615
|
-
* Get Single Secret
|
|
1616
|
-
* Retrieve a specific secret
|
|
1617
|
-
* @param key
|
|
1618
|
-
* @param requestBody
|
|
1619
|
-
* @returns SecretResponse Secret retrieved successfully
|
|
1620
|
-
* @throws ApiError
|
|
1621
|
-
*/
|
|
1622
|
-
getSecret(key, requestBody) {
|
|
1623
|
-
return this.httpRequest.request({
|
|
1624
|
-
method: "POST",
|
|
1625
|
-
url: "/api/secret/i/{key}",
|
|
1626
|
-
path: {
|
|
1627
|
-
"key": key
|
|
1628
|
-
},
|
|
1629
|
-
body: requestBody,
|
|
1630
|
-
mediaType: "application/json",
|
|
1631
|
-
errors: {
|
|
1632
|
-
500: `Internal server error`
|
|
1633
|
-
}
|
|
1634
|
-
});
|
|
1635
|
-
}
|
|
1636
|
-
/**
|
|
1637
|
-
* Update Secret
|
|
1638
|
-
* Update an existing secret
|
|
1639
|
-
* @param key
|
|
1640
|
-
* @param requestBody
|
|
1641
|
-
* @returns BatchSecretsResponse Secret updated successfully
|
|
1642
|
-
* @throws ApiError
|
|
1643
|
-
*/
|
|
1644
|
-
updateSecret(key, requestBody) {
|
|
1645
|
-
return this.httpRequest.request({
|
|
1646
|
-
method: "PATCH",
|
|
1647
|
-
url: "/api/secret/i/{key}",
|
|
1648
|
-
path: {
|
|
1649
|
-
"key": key
|
|
1650
|
-
},
|
|
1651
|
-
body: requestBody,
|
|
1652
|
-
mediaType: "application/json",
|
|
1653
|
-
errors: {
|
|
1654
|
-
500: `Internal server error`
|
|
1655
|
-
}
|
|
1656
|
-
});
|
|
1657
|
-
}
|
|
1658
|
-
/**
|
|
1659
|
-
* Create Secret
|
|
1660
|
-
* Create a new secret
|
|
1661
|
-
* @param requestBody
|
|
1662
|
-
* @returns SecretResponse Secret created successfully
|
|
1663
|
-
* @throws ApiError
|
|
1664
|
-
*/
|
|
1665
|
-
createSecret(requestBody) {
|
|
1666
|
-
return this.httpRequest.request({
|
|
1667
|
-
method: "PUT",
|
|
1668
|
-
url: "/api/secret/single",
|
|
1669
|
-
body: requestBody,
|
|
1670
|
-
mediaType: "application/json",
|
|
1671
|
-
errors: {
|
|
1672
|
-
500: `Internal server error`
|
|
1673
|
-
}
|
|
1674
|
-
});
|
|
1675
|
-
}
|
|
1676
|
-
/**
|
|
1677
|
-
* Batch Create Secrets
|
|
1678
|
-
* Create multiple secrets in a single request
|
|
1679
|
-
* @param requestBody
|
|
1680
|
-
* @returns BatchSecretsResponse Secrets created successfully
|
|
1681
|
-
* @throws ApiError
|
|
1682
|
-
*/
|
|
1683
|
-
batchCreateSecrets(requestBody) {
|
|
1684
|
-
return this.httpRequest.request({
|
|
1685
|
-
method: "PUT",
|
|
1686
|
-
url: "/api/secret/batch",
|
|
1687
|
-
body: requestBody,
|
|
1688
|
-
mediaType: "application/json",
|
|
1689
|
-
errors: {
|
|
1690
|
-
500: `Internal server error`
|
|
1691
|
-
}
|
|
1692
|
-
});
|
|
1693
|
-
}
|
|
1694
|
-
/**
|
|
1695
|
-
* Batch Update Secrets
|
|
1696
|
-
* Update multiple secrets in a single request
|
|
1697
|
-
* @param requestBody
|
|
1698
|
-
* @returns BatchSecretsResponse Secrets updated successfully
|
|
1699
|
-
* @throws ApiError
|
|
1700
|
-
*/
|
|
1701
|
-
batchUpdateSecrets(requestBody) {
|
|
1702
|
-
return this.httpRequest.request({
|
|
1703
|
-
method: "PATCH",
|
|
1704
|
-
url: "/api/secret/batch",
|
|
1705
|
-
body: requestBody,
|
|
1706
|
-
mediaType: "application/json",
|
|
1707
|
-
errors: {
|
|
1708
|
-
500: `Internal server error`
|
|
1709
|
-
}
|
|
1710
|
-
});
|
|
1711
|
-
}
|
|
1712
|
-
/**
|
|
1713
|
-
* Batch Delete Secrets
|
|
1714
|
-
* Delete multiple secrets in a single request
|
|
1715
|
-
* @param requestBody
|
|
1716
|
-
* @returns BatchSecretsResponse Secrets deleted successfully
|
|
1717
|
-
* @throws ApiError
|
|
1718
|
-
*/
|
|
1719
|
-
deleteBatchSecrets(requestBody) {
|
|
1720
|
-
return this.httpRequest.request({
|
|
1721
|
-
method: "DELETE",
|
|
1722
|
-
url: "/api/secret/batch",
|
|
1723
|
-
body: requestBody,
|
|
1724
|
-
mediaType: "application/json",
|
|
1725
|
-
errors: {
|
|
1726
|
-
500: `Internal server error`
|
|
1727
|
-
}
|
|
1728
|
-
});
|
|
1729
|
-
}
|
|
1730
|
-
/**
|
|
1731
|
-
* Reveal Secrets
|
|
1732
|
-
* Decrypt and reveal secret values for managed apps
|
|
1733
|
-
* @param requestBody
|
|
1734
|
-
* @returns RevealSecretsResponse Secrets revealed successfully
|
|
1735
|
-
* @throws ApiError
|
|
1736
|
-
*/
|
|
1737
|
-
revealSecrets(requestBody) {
|
|
1738
|
-
return this.httpRequest.request({
|
|
1739
|
-
method: "POST",
|
|
1740
|
-
url: "/api/secret/reveal",
|
|
1741
|
-
body: requestBody,
|
|
1742
|
-
mediaType: "application/json",
|
|
1743
|
-
errors: {
|
|
1744
|
-
500: `Internal server error`
|
|
1745
|
-
}
|
|
1746
|
-
});
|
|
1747
|
-
}
|
|
1748
|
-
};
|
|
1749
|
-
|
|
1750
|
-
// src/services/SecretsPointInTimeService.ts
|
|
1751
|
-
var SecretsPointInTimeService = class {
|
|
1752
|
-
constructor(httpRequest) {
|
|
1753
|
-
this.httpRequest = httpRequest;
|
|
1754
|
-
}
|
|
1755
|
-
/**
|
|
1756
|
-
* Get Secrets History
|
|
1757
|
-
* Retrieve paginated history of secret changes
|
|
1758
|
-
* @param requestBody
|
|
1759
|
-
* @returns SecretHistoryResponse Secrets history retrieved successfully
|
|
1760
|
-
* @throws ApiError
|
|
1761
|
-
*/
|
|
1762
|
-
getSecretHistory(requestBody) {
|
|
1763
|
-
return this.httpRequest.request({
|
|
1764
|
-
method: "POST",
|
|
1765
|
-
url: "/api/secret/history",
|
|
1766
|
-
body: requestBody,
|
|
1767
|
-
mediaType: "application/json",
|
|
1768
|
-
errors: {
|
|
1769
|
-
500: `Internal server error`
|
|
1770
|
-
}
|
|
1771
|
-
});
|
|
1772
|
-
}
|
|
1773
|
-
/**
|
|
1774
|
-
* Get Secrets at Point in Time
|
|
1775
|
-
* Retrieve secrets state at a specific point in time
|
|
1776
|
-
* @param requestBody
|
|
1777
|
-
* @returns SecretPitStateResponse Secrets at point in time retrieved successfully
|
|
1778
|
-
* @throws ApiError
|
|
1779
|
-
*/
|
|
1780
|
-
getSecretsAtPointInTime(requestBody) {
|
|
1781
|
-
return this.httpRequest.request({
|
|
1782
|
-
method: "POST",
|
|
1783
|
-
url: "/api/secret/pit",
|
|
1784
|
-
body: requestBody,
|
|
1785
|
-
mediaType: "application/json",
|
|
1786
|
-
errors: {
|
|
1787
|
-
500: `Internal server error`
|
|
1788
|
-
}
|
|
1789
|
-
});
|
|
1790
|
-
}
|
|
1791
|
-
/**
|
|
1792
|
-
* Get Secrets at Timestamp
|
|
1793
|
-
* Retrieve secrets state at a specific timestamp
|
|
1794
|
-
* @param requestBody
|
|
1795
|
-
* @returns SecretPitStateResponse Secrets at timestamp retrieved successfully
|
|
1796
|
-
* @throws ApiError
|
|
1797
|
-
*/
|
|
1798
|
-
getSecretsAtTimestamp(requestBody) {
|
|
1799
|
-
return this.httpRequest.request({
|
|
1800
|
-
method: "POST",
|
|
1801
|
-
url: "/api/secret/timestamp",
|
|
1802
|
-
body: requestBody,
|
|
1803
|
-
mediaType: "application/json",
|
|
1804
|
-
errors: {
|
|
1805
|
-
500: `Internal server error`
|
|
1806
|
-
}
|
|
1807
|
-
});
|
|
1808
|
-
}
|
|
1809
|
-
/**
|
|
1810
|
-
* Get Secrets Diff
|
|
1811
|
-
* Compare secrets between two points in time
|
|
1812
|
-
* @param requestBody
|
|
1813
|
-
* @returns SecretDiffResponse Secrets diff retrieved successfully
|
|
1814
|
-
* @throws ApiError
|
|
1815
|
-
*/
|
|
1816
|
-
getSecretDiff(requestBody) {
|
|
1817
|
-
return this.httpRequest.request({
|
|
1818
|
-
method: "POST",
|
|
1819
|
-
url: "/api/secret/diff",
|
|
1820
|
-
body: requestBody,
|
|
1821
|
-
mediaType: "application/json",
|
|
1822
|
-
errors: {
|
|
1823
|
-
500: `Internal server error`
|
|
1824
|
-
}
|
|
1825
|
-
});
|
|
1826
|
-
}
|
|
1827
|
-
/**
|
|
1828
|
-
* Get Secret Variable Timeline
|
|
1829
|
-
* Get timeline of changes for a specific secret variable
|
|
1830
|
-
* @param key
|
|
1831
|
-
* @param requestBody
|
|
1832
|
-
* @returns SecretVariableTimelineResponse Secret variable timeline retrieved successfully
|
|
1833
|
-
* @throws ApiError
|
|
1834
|
-
*/
|
|
1835
|
-
getSecretVariableTimeline(key, requestBody) {
|
|
1836
|
-
return this.httpRequest.request({
|
|
1837
|
-
method: "POST",
|
|
1838
|
-
url: "/api/secret/timeline/{key}",
|
|
1839
|
-
path: {
|
|
1840
|
-
"key": key
|
|
1841
|
-
},
|
|
1842
|
-
body: requestBody,
|
|
1843
|
-
mediaType: "application/json",
|
|
1844
|
-
errors: {
|
|
1845
|
-
500: `Internal server error`
|
|
1846
|
-
}
|
|
1847
|
-
});
|
|
1848
|
-
}
|
|
1849
|
-
};
|
|
1850
|
-
|
|
1851
|
-
// src/services/SecretsRollbackService.ts
|
|
1852
|
-
var SecretsRollbackService = class {
|
|
1853
|
-
constructor(httpRequest) {
|
|
1854
|
-
this.httpRequest = httpRequest;
|
|
1855
|
-
}
|
|
1856
|
-
/**
|
|
1857
|
-
* Rollback Secrets to Point in Time
|
|
1858
|
-
* Rollback all secrets to a specific point in time
|
|
1859
|
-
* @param requestBody
|
|
1860
|
-
* @returns RollbackSecretsResponse Secrets rolled back successfully
|
|
1861
|
-
* @throws ApiError
|
|
1862
|
-
*/
|
|
1863
|
-
rollbackSecretsToPitId(requestBody) {
|
|
1864
|
-
return this.httpRequest.request({
|
|
1865
|
-
method: "POST",
|
|
1866
|
-
url: "/api/secret/rollback/pit",
|
|
1867
|
-
body: requestBody,
|
|
1868
|
-
mediaType: "application/json",
|
|
1869
|
-
errors: {
|
|
1870
|
-
500: `Internal server error`
|
|
1871
|
-
}
|
|
1872
|
-
});
|
|
1873
|
-
}
|
|
1874
|
-
/**
|
|
1875
|
-
* Rollback Secrets to Timestamp
|
|
1876
|
-
* Rollback all secrets to a specific timestamp
|
|
1877
|
-
* @param requestBody
|
|
1878
|
-
* @returns RollbackSecretsResponse Secrets rolled back successfully
|
|
1879
|
-
* @throws ApiError
|
|
1880
|
-
*/
|
|
1881
|
-
rollbackSecretsToTimestamp(requestBody) {
|
|
1882
|
-
return this.httpRequest.request({
|
|
1883
|
-
method: "POST",
|
|
1884
|
-
url: "/api/secret/rollback/timestamp",
|
|
1885
|
-
body: requestBody,
|
|
1886
|
-
mediaType: "application/json",
|
|
1887
|
-
errors: {
|
|
1888
|
-
500: `Internal server error`
|
|
1889
|
-
}
|
|
1890
|
-
});
|
|
1891
|
-
}
|
|
1892
|
-
/**
|
|
1893
|
-
* Rollback Single Secret Variable to Point in Time
|
|
1894
|
-
* Rollback a specific secret variable to a point in time
|
|
1895
|
-
* @param key
|
|
1896
|
-
* @param requestBody
|
|
1897
|
-
* @returns SecretVariableRollbackResponse Secret variable rolled back successfully
|
|
1898
|
-
* @throws ApiError
|
|
1899
|
-
*/
|
|
1900
|
-
rollbackSecretVariableToPitId(key, requestBody) {
|
|
1901
|
-
return this.httpRequest.request({
|
|
1902
|
-
method: "POST",
|
|
1903
|
-
url: "/api/secret/rollback/variable/{key}/pit",
|
|
1904
|
-
path: {
|
|
1905
|
-
"key": key
|
|
1906
|
-
},
|
|
1907
|
-
body: requestBody,
|
|
1908
|
-
mediaType: "application/json",
|
|
1909
|
-
errors: {
|
|
1910
|
-
500: `Internal server error`
|
|
1911
|
-
}
|
|
1912
|
-
});
|
|
1913
|
-
}
|
|
1914
|
-
/**
|
|
1915
|
-
* Rollback Single Secret Variable to Timestamp
|
|
1916
|
-
* Rollback a specific secret variable to a timestamp
|
|
1917
|
-
* @param key
|
|
1918
|
-
* @param requestBody
|
|
1919
|
-
* @returns SecretVariableRollbackResponse Secret variable rolled back successfully
|
|
1920
|
-
* @throws ApiError
|
|
1921
|
-
*/
|
|
1922
|
-
rollbackSecretVariableToTimestamp(key, requestBody) {
|
|
1923
|
-
return this.httpRequest.request({
|
|
1924
|
-
method: "POST",
|
|
1925
|
-
url: "/api/secret/rollback/variable/{key}/timestamp",
|
|
1926
|
-
path: {
|
|
1927
|
-
"key": key
|
|
1928
|
-
},
|
|
1929
|
-
body: requestBody,
|
|
1930
|
-
mediaType: "application/json",
|
|
1931
|
-
errors: {
|
|
1932
|
-
500: `Internal server error`
|
|
1933
|
-
}
|
|
1934
|
-
});
|
|
1935
|
-
}
|
|
1936
|
-
};
|
|
1937
|
-
|
|
1938
|
-
// src/services/UsersService.ts
|
|
1939
|
-
var UsersService = class {
|
|
1940
|
-
constructor(httpRequest) {
|
|
1941
|
-
this.httpRequest = httpRequest;
|
|
1942
|
-
}
|
|
1943
|
-
/**
|
|
1944
|
-
* Get All Users
|
|
1945
|
-
* Retrieve all users in the organization
|
|
1946
|
-
* @returns UsersResponse Users retrieved successfully
|
|
1947
|
-
* @throws ApiError
|
|
1948
|
-
*/
|
|
1949
|
-
getUsers() {
|
|
1950
|
-
return this.httpRequest.request({
|
|
1951
|
-
method: "GET",
|
|
1952
|
-
url: "/api/user",
|
|
1953
|
-
errors: {
|
|
1954
|
-
500: `Internal server error`
|
|
1955
|
-
}
|
|
1956
|
-
});
|
|
1957
|
-
}
|
|
1958
|
-
/**
|
|
1959
|
-
* Get User by ID
|
|
1960
|
-
* Retrieve a specific user by their ID
|
|
1961
|
-
* @param id
|
|
1962
|
-
* @returns UserResponse User retrieved successfully
|
|
1963
|
-
* @throws ApiError
|
|
1964
|
-
*/
|
|
1965
|
-
getUserById(id) {
|
|
1966
|
-
return this.httpRequest.request({
|
|
1967
|
-
method: "GET",
|
|
1968
|
-
url: "/api/user/{id}",
|
|
1969
|
-
path: {
|
|
1970
|
-
"id": id
|
|
1971
|
-
},
|
|
1972
|
-
errors: {
|
|
1973
|
-
500: `Internal server error`
|
|
1974
|
-
}
|
|
1975
|
-
});
|
|
1976
|
-
}
|
|
1977
|
-
/**
|
|
1978
|
-
* Update User
|
|
1979
|
-
* Update a user's profile information
|
|
1980
|
-
* @param id
|
|
1981
|
-
* @param requestBody
|
|
1982
|
-
* @returns UserResponse User updated successfully
|
|
1983
|
-
* @throws ApiError
|
|
1984
|
-
*/
|
|
1985
|
-
updateUser(id, requestBody) {
|
|
1986
|
-
return this.httpRequest.request({
|
|
1987
|
-
method: "PATCH",
|
|
1988
|
-
url: "/api/user/{id}",
|
|
1989
|
-
path: {
|
|
1990
|
-
"id": id
|
|
1991
|
-
},
|
|
1992
|
-
body: requestBody,
|
|
1993
|
-
mediaType: "application/json",
|
|
1994
|
-
errors: {
|
|
1995
|
-
500: `Internal server error`
|
|
1996
|
-
}
|
|
1997
|
-
});
|
|
1998
|
-
}
|
|
1999
|
-
/**
|
|
2000
|
-
* Delete User
|
|
2001
|
-
* Delete a user from the organization (Admin only)
|
|
2002
|
-
* @param id
|
|
2003
|
-
* @returns UserResponse User deleted successfully
|
|
2004
|
-
* @throws ApiError
|
|
2005
|
-
*/
|
|
2006
|
-
deleteUser(id) {
|
|
2007
|
-
return this.httpRequest.request({
|
|
2008
|
-
method: "DELETE",
|
|
2009
|
-
url: "/api/user/{id}",
|
|
2010
|
-
path: {
|
|
2011
|
-
"id": id
|
|
2012
|
-
},
|
|
2013
|
-
errors: {
|
|
2014
|
-
500: `Internal server error`
|
|
2015
|
-
}
|
|
2016
|
-
});
|
|
2017
|
-
}
|
|
2018
|
-
/**
|
|
2019
|
-
* Update User Role
|
|
2020
|
-
* Update a user's role (Admin only)
|
|
2021
|
-
* @param id
|
|
2022
|
-
* @param requestBody
|
|
2023
|
-
* @returns UserResponse User role updated successfully
|
|
2024
|
-
* @throws ApiError
|
|
2025
|
-
*/
|
|
2026
|
-
updateRole(id, requestBody) {
|
|
2027
|
-
return this.httpRequest.request({
|
|
2028
|
-
method: "PATCH",
|
|
2029
|
-
url: "/api/user/role/{id}",
|
|
2030
|
-
path: {
|
|
2031
|
-
"id": id
|
|
2032
|
-
},
|
|
2033
|
-
body: requestBody,
|
|
2034
|
-
mediaType: "application/json",
|
|
2035
|
-
errors: {
|
|
2036
|
-
500: `Internal server error`
|
|
2037
|
-
}
|
|
2038
|
-
});
|
|
2039
|
-
}
|
|
2040
|
-
/**
|
|
2041
|
-
* Update User Password
|
|
2042
|
-
* Update a user's password (Admin only)
|
|
2043
|
-
* @param id
|
|
2044
|
-
* @returns UserResponse Password update request sent successfully
|
|
2045
|
-
* @throws ApiError
|
|
2046
|
-
*/
|
|
2047
|
-
updatePassword(id) {
|
|
2048
|
-
return this.httpRequest.request({
|
|
2049
|
-
method: "PATCH",
|
|
2050
|
-
url: "/api/user/password/{id}",
|
|
2051
|
-
path: {
|
|
2052
|
-
"id": id
|
|
2053
|
-
},
|
|
2054
|
-
errors: {
|
|
2055
|
-
500: `Internal server error`
|
|
2056
|
-
}
|
|
2057
|
-
});
|
|
2058
|
-
}
|
|
2059
|
-
};
|
|
2060
|
-
|
|
2061
|
-
// src/services/WebhooksService.ts
|
|
2062
|
-
var WebhooksService = class {
|
|
2063
|
-
constructor(httpRequest) {
|
|
2064
|
-
this.httpRequest = httpRequest;
|
|
2065
|
-
}
|
|
2066
|
-
/**
|
|
2067
|
-
* Create Webhook
|
|
2068
|
-
* Create a new webhook for the organization
|
|
2069
|
-
* @param requestBody
|
|
2070
|
-
* @returns WebhookResponse Webhook created successfully
|
|
2071
|
-
* @throws ApiError
|
|
2072
|
-
*/
|
|
2073
|
-
createWebhook(requestBody) {
|
|
2074
|
-
return this.httpRequest.request({
|
|
2075
|
-
method: "POST",
|
|
2076
|
-
url: "/api/webhook",
|
|
2077
|
-
body: requestBody,
|
|
2078
|
-
mediaType: "application/json",
|
|
2079
|
-
errors: {
|
|
2080
|
-
500: `Internal server error`
|
|
2081
|
-
}
|
|
2082
|
-
});
|
|
2083
|
-
}
|
|
2084
|
-
/**
|
|
2085
|
-
* Get All Webhooks
|
|
2086
|
-
* Retrieve all webhooks for the organization
|
|
2087
|
-
* @returns WebhooksResponse Webhooks retrieved successfully
|
|
2088
|
-
* @throws ApiError
|
|
2089
|
-
*/
|
|
2090
|
-
getWebhooks() {
|
|
2091
|
-
return this.httpRequest.request({
|
|
2092
|
-
method: "GET",
|
|
2093
|
-
url: "/api/webhook",
|
|
2094
|
-
errors: {
|
|
2095
|
-
500: `Internal server error`
|
|
2096
|
-
}
|
|
2097
|
-
});
|
|
2098
|
-
}
|
|
2099
|
-
/**
|
|
2100
|
-
* Get Webhook
|
|
2101
|
-
* Retrieve a specific webhook
|
|
2102
|
-
* @param id
|
|
2103
|
-
* @returns WebhookResponse Webhook retrieved successfully
|
|
2104
|
-
* @throws ApiError
|
|
2105
|
-
*/
|
|
2106
|
-
getWebhook(id) {
|
|
2107
|
-
return this.httpRequest.request({
|
|
2108
|
-
method: "GET",
|
|
2109
|
-
url: "/api/webhook/{id}",
|
|
2110
|
-
path: {
|
|
2111
|
-
"id": id
|
|
2112
|
-
},
|
|
2113
|
-
errors: {
|
|
2114
|
-
500: `Internal server error`
|
|
2115
|
-
}
|
|
2116
|
-
});
|
|
2117
|
-
}
|
|
2118
|
-
/**
|
|
2119
|
-
* Update Webhook
|
|
2120
|
-
* Update an existing webhook
|
|
2121
|
-
* @param id
|
|
2122
|
-
* @param requestBody
|
|
2123
|
-
* @returns WebhookResponse Webhook updated successfully
|
|
2124
|
-
* @throws ApiError
|
|
2125
|
-
*/
|
|
2126
|
-
updateWebhook(id, requestBody) {
|
|
2127
|
-
return this.httpRequest.request({
|
|
2128
|
-
method: "PUT",
|
|
2129
|
-
url: "/api/webhook/{id}",
|
|
2130
|
-
path: {
|
|
2131
|
-
"id": id
|
|
2132
|
-
},
|
|
2133
|
-
body: requestBody,
|
|
2134
|
-
mediaType: "application/json",
|
|
2135
|
-
errors: {
|
|
2136
|
-
500: `Internal server error`
|
|
2137
|
-
}
|
|
2138
|
-
});
|
|
2139
|
-
}
|
|
2140
|
-
/**
|
|
2141
|
-
* Delete Webhook
|
|
2142
|
-
* Delete an existing webhook
|
|
2143
|
-
* @param id
|
|
2144
|
-
* @returns WebhookResponse Webhook deleted successfully
|
|
2145
|
-
* @throws ApiError
|
|
2146
|
-
*/
|
|
2147
|
-
deleteWebhook(id) {
|
|
2148
|
-
return this.httpRequest.request({
|
|
2149
|
-
method: "DELETE",
|
|
2150
|
-
url: "/api/webhook/{id}",
|
|
2151
|
-
path: {
|
|
2152
|
-
"id": id
|
|
2153
|
-
},
|
|
2154
|
-
errors: {
|
|
2155
|
-
500: `Internal server error`
|
|
2156
|
-
}
|
|
2157
|
-
});
|
|
2158
|
-
}
|
|
2159
|
-
};
|
|
2160
|
-
|
|
2161
|
-
// src/EnvSyncAPISDK.ts
|
|
2162
|
-
var EnvSyncAPISDK = class {
|
|
2163
|
-
access;
|
|
2164
|
-
apiKeys;
|
|
2165
|
-
applications;
|
|
2166
|
-
auditLogs;
|
|
2167
|
-
authentication;
|
|
2168
|
-
environmentTypes;
|
|
2169
|
-
environmentVariables;
|
|
2170
|
-
environmentVariablesPointInTime;
|
|
2171
|
-
environmentVariablesRollback;
|
|
2172
|
-
fileUpload;
|
|
2173
|
-
onboarding;
|
|
2174
|
-
organizations;
|
|
2175
|
-
roles;
|
|
2176
|
-
secrets;
|
|
2177
|
-
secretsPointInTime;
|
|
2178
|
-
secretsRollback;
|
|
2179
|
-
users;
|
|
2180
|
-
webhooks;
|
|
2181
|
-
request;
|
|
2182
|
-
constructor(config, HttpRequest = FetchHttpRequest) {
|
|
2183
|
-
this.request = new HttpRequest({
|
|
2184
|
-
BASE: config?.BASE ?? "http://localhost:8600",
|
|
2185
|
-
VERSION: config?.VERSION ?? "0.3.7",
|
|
2186
|
-
WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,
|
|
2187
|
-
CREDENTIALS: config?.CREDENTIALS ?? "include",
|
|
2188
|
-
TOKEN: config?.TOKEN,
|
|
2189
|
-
USERNAME: config?.USERNAME,
|
|
2190
|
-
PASSWORD: config?.PASSWORD,
|
|
2191
|
-
HEADERS: config?.HEADERS,
|
|
2192
|
-
ENCODE_PATH: config?.ENCODE_PATH
|
|
2193
|
-
});
|
|
2194
|
-
this.access = new AccessService(this.request);
|
|
2195
|
-
this.apiKeys = new ApiKeysService(this.request);
|
|
2196
|
-
this.applications = new ApplicationsService(this.request);
|
|
2197
|
-
this.auditLogs = new AuditLogsService(this.request);
|
|
2198
|
-
this.authentication = new AuthenticationService(this.request);
|
|
2199
|
-
this.environmentTypes = new EnvironmentTypesService(this.request);
|
|
2200
|
-
this.environmentVariables = new EnvironmentVariablesService(this.request);
|
|
2201
|
-
this.environmentVariablesPointInTime = new EnvironmentVariablesPointInTimeService(this.request);
|
|
2202
|
-
this.environmentVariablesRollback = new EnvironmentVariablesRollbackService(this.request);
|
|
2203
|
-
this.fileUpload = new FileUploadService(this.request);
|
|
2204
|
-
this.onboarding = new OnboardingService(this.request);
|
|
2205
|
-
this.organizations = new OrganizationsService(this.request);
|
|
2206
|
-
this.roles = new RolesService(this.request);
|
|
2207
|
-
this.secrets = new SecretsService(this.request);
|
|
2208
|
-
this.secretsPointInTime = new SecretsPointInTimeService(this.request);
|
|
2209
|
-
this.secretsRollback = new SecretsRollbackService(this.request);
|
|
2210
|
-
this.users = new UsersService(this.request);
|
|
2211
|
-
this.webhooks = new WebhooksService(this.request);
|
|
2212
|
-
}
|
|
2213
|
-
};
|
|
2214
|
-
|
|
2215
|
-
// src/core/OpenAPI.ts
|
|
2216
|
-
var OpenAPI = {
|
|
2217
|
-
BASE: "http://localhost:8600",
|
|
2218
|
-
VERSION: "0.3.7",
|
|
2219
|
-
WITH_CREDENTIALS: false,
|
|
2220
|
-
CREDENTIALS: "include",
|
|
2221
|
-
TOKEN: void 0,
|
|
2222
|
-
USERNAME: void 0,
|
|
2223
|
-
PASSWORD: void 0,
|
|
2224
|
-
HEADERS: void 0,
|
|
2225
|
-
ENCODE_PATH: void 0
|
|
2226
|
-
};
|
|
2227
|
-
|
|
2228
|
-
// src/models/CreateWebhookRequest.ts
|
|
2229
|
-
var CreateWebhookRequest;
|
|
2230
|
-
((CreateWebhookRequest2) => {
|
|
2231
|
-
let webhook_type;
|
|
2232
|
-
((webhook_type2) => {
|
|
2233
|
-
webhook_type2["DISCORD"] = "DISCORD";
|
|
2234
|
-
webhook_type2["SLACK"] = "SLACK";
|
|
2235
|
-
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2236
|
-
})(webhook_type = CreateWebhookRequest2.webhook_type || (CreateWebhookRequest2.webhook_type = {}));
|
|
2237
|
-
let linked_to;
|
|
2238
|
-
((linked_to2) => {
|
|
2239
|
-
linked_to2["ORG"] = "org";
|
|
2240
|
-
linked_to2["APP"] = "app";
|
|
2241
|
-
})(linked_to = CreateWebhookRequest2.linked_to || (CreateWebhookRequest2.linked_to = {}));
|
|
2242
|
-
})(CreateWebhookRequest || (CreateWebhookRequest = {}));
|
|
2243
|
-
|
|
2244
|
-
// src/models/SecretVariableRollbackResponse.ts
|
|
2245
|
-
var SecretVariableRollbackResponse;
|
|
2246
|
-
((SecretVariableRollbackResponse2) => {
|
|
2247
|
-
let operation;
|
|
2248
|
-
((operation2) => {
|
|
2249
|
-
operation2["CREATE"] = "CREATE";
|
|
2250
|
-
operation2["UPDATE"] = "UPDATE";
|
|
2251
|
-
operation2["DELETE"] = "DELETE";
|
|
2252
|
-
})(operation = SecretVariableRollbackResponse2.operation || (SecretVariableRollbackResponse2.operation = {}));
|
|
2253
|
-
})(SecretVariableRollbackResponse || (SecretVariableRollbackResponse = {}));
|
|
2254
|
-
|
|
2255
|
-
// src/models/UpdateWebhookRequest.ts
|
|
2256
|
-
var UpdateWebhookRequest;
|
|
2257
|
-
((UpdateWebhookRequest2) => {
|
|
2258
|
-
let webhook_type;
|
|
2259
|
-
((webhook_type2) => {
|
|
2260
|
-
webhook_type2["DISCORD"] = "DISCORD";
|
|
2261
|
-
webhook_type2["SLACK"] = "SLACK";
|
|
2262
|
-
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2263
|
-
})(webhook_type = UpdateWebhookRequest2.webhook_type || (UpdateWebhookRequest2.webhook_type = {}));
|
|
2264
|
-
let linked_to;
|
|
2265
|
-
((linked_to2) => {
|
|
2266
|
-
linked_to2["ORG"] = "org";
|
|
2267
|
-
linked_to2["APP"] = "app";
|
|
2268
|
-
})(linked_to = UpdateWebhookRequest2.linked_to || (UpdateWebhookRequest2.linked_to = {}));
|
|
2269
|
-
})(UpdateWebhookRequest || (UpdateWebhookRequest = {}));
|
|
2270
|
-
|
|
2271
|
-
// src/models/VariableRollbackResponse.ts
|
|
2272
|
-
var VariableRollbackResponse;
|
|
2273
|
-
((VariableRollbackResponse2) => {
|
|
2274
|
-
let operation;
|
|
2275
|
-
((operation2) => {
|
|
2276
|
-
operation2["CREATE"] = "CREATE";
|
|
2277
|
-
operation2["UPDATE"] = "UPDATE";
|
|
2278
|
-
operation2["DELETE"] = "DELETE";
|
|
2279
|
-
})(operation = VariableRollbackResponse2.operation || (VariableRollbackResponse2.operation = {}));
|
|
2280
|
-
})(VariableRollbackResponse || (VariableRollbackResponse = {}));
|
|
2281
|
-
|
|
2282
|
-
// src/models/WebhookResponse.ts
|
|
2283
|
-
var WebhookResponse;
|
|
2284
|
-
((WebhookResponse2) => {
|
|
2285
|
-
let webhook_type;
|
|
2286
|
-
((webhook_type2) => {
|
|
2287
|
-
webhook_type2["DISCORD"] = "DISCORD";
|
|
2288
|
-
webhook_type2["SLACK"] = "SLACK";
|
|
2289
|
-
webhook_type2["CUSTOM"] = "CUSTOM";
|
|
2290
|
-
})(webhook_type = WebhookResponse2.webhook_type || (WebhookResponse2.webhook_type = {}));
|
|
2291
|
-
let linked_to;
|
|
2292
|
-
((linked_to2) => {
|
|
2293
|
-
linked_to2["ORG"] = "org";
|
|
2294
|
-
linked_to2["APP"] = "app";
|
|
2295
|
-
})(linked_to = WebhookResponse2.linked_to || (WebhookResponse2.linked_to = {}));
|
|
2296
|
-
})(WebhookResponse || (WebhookResponse = {}));
|
|
2297
|
-
})();
|