@emilgroup/setting-sdk 0.2.2 → 0.3.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +26 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +2 -2
- package/api/default-api.ts +120 -0
- package/api/public-keys-api.ts +785 -0
- package/api.ts +29 -0
- package/base.ts +282 -0
- package/common.ts +198 -0
- package/configuration.ts +110 -0
- package/dist/api/default-api.d.ts +66 -0
- package/dist/api/default-api.js +196 -0
- package/dist/api/public-keys-api.d.ts +441 -0
- package/dist/api/public-keys-api.js +731 -0
- package/dist/api.d.ts +13 -0
- package/dist/api.js +31 -0
- package/dist/base.d.ts +77 -0
- package/dist/base.js +324 -0
- package/dist/common.d.ts +91 -0
- package/dist/common.js +276 -0
- package/dist/configuration.d.ts +89 -0
- package/dist/configuration.js +52 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +36 -0
- package/dist/models/create-public-key-request-dto.d.ts +24 -0
- package/dist/models/create-public-key-request-dto.js +15 -0
- package/dist/models/create-public-key-response-class.d.ts +25 -0
- package/dist/models/create-public-key-response-class.js +15 -0
- package/dist/models/delete-public-key-request-dto.d.ts +24 -0
- package/dist/models/delete-public-key-request-dto.js +15 -0
- package/dist/models/get-public-key-response-class.d.ts +25 -0
- package/dist/models/get-public-key-response-class.js +15 -0
- package/dist/models/index.d.ts +11 -0
- package/dist/models/index.js +27 -0
- package/dist/models/inline-response200.d.ts +54 -0
- package/dist/models/inline-response200.js +15 -0
- package/dist/models/inline-response503.d.ts +54 -0
- package/dist/models/inline-response503.js +15 -0
- package/dist/models/list-public-keys-response-class.d.ts +43 -0
- package/dist/models/list-public-keys-response-class.js +15 -0
- package/dist/models/public-key-class.d.ts +66 -0
- package/dist/models/public-key-class.js +15 -0
- package/dist/models/rotate-public-key-response-class.d.ts +25 -0
- package/dist/models/rotate-public-key-response-class.js +15 -0
- package/dist/models/update-public-key-request-dto.d.ts +30 -0
- package/dist/models/update-public-key-request-dto.js +15 -0
- package/dist/models/update-public-key-response-class.d.ts +25 -0
- package/dist/models/update-public-key-response-class.js +15 -0
- package/git_push.sh +57 -0
- package/index.ts +19 -0
- package/models/create-public-key-request-dto.ts +30 -0
- package/models/create-public-key-response-class.ts +31 -0
- package/models/delete-public-key-request-dto.ts +30 -0
- package/models/get-public-key-response-class.ts +31 -0
- package/models/index.ts +11 -0
- package/models/inline-response200.ts +48 -0
- package/models/inline-response503.ts +48 -0
- package/models/list-public-keys-response-class.ts +49 -0
- package/models/public-key-class.ts +72 -0
- package/models/rotate-public-key-response-class.ts +31 -0
- package/models/update-public-key-request-dto.ts +36 -0
- package/models/update-public-key-response-class.ts +31 -0
- package/package.json +22 -8
- package/tsconfig.json +23 -0
- package/index.js +0 -99
- package/scripts/deploy.js +0 -81
|
@@ -0,0 +1,785 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL SettingService
|
|
5
|
+
* The EMIL SettingService API description
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
17
|
+
import { Configuration } from '../configuration';
|
|
18
|
+
// Some imports not used depending on template conditions
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import { CreatePublicKeyRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CreatePublicKeyResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { DeletePublicKeyRequestDto } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { GetPublicKeyResponseClass } from '../models';
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
import { ListPublicKeysResponseClass } from '../models';
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
import { RotatePublicKeyResponseClass } from '../models';
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
import { UpdatePublicKeyRequestDto } from '../models';
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
import { UpdatePublicKeyResponseClass } from '../models';
|
|
39
|
+
/**
|
|
40
|
+
* PublicKeysApi - axios parameter creator
|
|
41
|
+
* @export
|
|
42
|
+
*/
|
|
43
|
+
export const PublicKeysApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
44
|
+
return {
|
|
45
|
+
/**
|
|
46
|
+
* Create a new public key. Use the returned key for public API authentication. We recommend rotating keys every three months.
|
|
47
|
+
* @summary Create the public key
|
|
48
|
+
* @param {CreatePublicKeyRequestDto} createPublicKeyRequestDto
|
|
49
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
50
|
+
* @param {*} [options] Override http request option.
|
|
51
|
+
* @throws {RequiredError}
|
|
52
|
+
*/
|
|
53
|
+
createPublicKey: async (createPublicKeyRequestDto: CreatePublicKeyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
54
|
+
// verify required parameter 'createPublicKeyRequestDto' is not null or undefined
|
|
55
|
+
assertParamExists('createPublicKey', 'createPublicKeyRequestDto', createPublicKeyRequestDto)
|
|
56
|
+
const localVarPath = `/settingservice/v1/public-keys`;
|
|
57
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
58
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
59
|
+
let baseOptions;
|
|
60
|
+
let baseAccessToken;
|
|
61
|
+
if (configuration) {
|
|
62
|
+
baseOptions = configuration.baseOptions;
|
|
63
|
+
baseAccessToken = configuration.accessToken;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
67
|
+
const localVarHeaderParameter = {} as any;
|
|
68
|
+
const localVarQueryParameter = {} as any;
|
|
69
|
+
|
|
70
|
+
// authentication bearer required
|
|
71
|
+
// http bearer authentication required
|
|
72
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
73
|
+
|
|
74
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
75
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
81
|
+
|
|
82
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
83
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
84
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
85
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createPublicKeyRequestDto, localVarRequestOptions, configuration)
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
url: toPathString(localVarUrlObj),
|
|
89
|
+
options: localVarRequestOptions,
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* Delete a public key by code. Ensure no integrations or services depend on this key before deleting.
|
|
94
|
+
* @summary Delete the public key
|
|
95
|
+
* @param {string} code Unique identifier for the object.
|
|
96
|
+
* @param {DeletePublicKeyRequestDto} deletePublicKeyRequestDto
|
|
97
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
98
|
+
* @param {*} [options] Override http request option.
|
|
99
|
+
* @throws {RequiredError}
|
|
100
|
+
*/
|
|
101
|
+
deletePublicKey: async (code: string, deletePublicKeyRequestDto: DeletePublicKeyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
102
|
+
// verify required parameter 'code' is not null or undefined
|
|
103
|
+
assertParamExists('deletePublicKey', 'code', code)
|
|
104
|
+
// verify required parameter 'deletePublicKeyRequestDto' is not null or undefined
|
|
105
|
+
assertParamExists('deletePublicKey', 'deletePublicKeyRequestDto', deletePublicKeyRequestDto)
|
|
106
|
+
const localVarPath = `/settingservice/v1/public-keys/{code}`
|
|
107
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
108
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
109
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
110
|
+
let baseOptions;
|
|
111
|
+
let baseAccessToken;
|
|
112
|
+
if (configuration) {
|
|
113
|
+
baseOptions = configuration.baseOptions;
|
|
114
|
+
baseAccessToken = configuration.accessToken;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
118
|
+
const localVarHeaderParameter = {} as any;
|
|
119
|
+
const localVarQueryParameter = {} as any;
|
|
120
|
+
|
|
121
|
+
// authentication bearer required
|
|
122
|
+
// http bearer authentication required
|
|
123
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
124
|
+
|
|
125
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
126
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
132
|
+
|
|
133
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
134
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
135
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
136
|
+
localVarRequestOptions.data = serializeDataIfNeeded(deletePublicKeyRequestDto, localVarRequestOptions, configuration)
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
url: toPathString(localVarUrlObj),
|
|
140
|
+
options: localVarRequestOptions,
|
|
141
|
+
};
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* Retrieve a single public key by its code.
|
|
145
|
+
* @summary Retrieve the public key
|
|
146
|
+
* @param {string} code
|
|
147
|
+
* @param {string} expand
|
|
148
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
149
|
+
* @param {*} [options] Override http request option.
|
|
150
|
+
* @throws {RequiredError}
|
|
151
|
+
*/
|
|
152
|
+
getPublicKey: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
153
|
+
// verify required parameter 'code' is not null or undefined
|
|
154
|
+
assertParamExists('getPublicKey', 'code', code)
|
|
155
|
+
// verify required parameter 'expand' is not null or undefined
|
|
156
|
+
assertParamExists('getPublicKey', 'expand', expand)
|
|
157
|
+
const localVarPath = `/settingservice/v1/public-keys/{code}`
|
|
158
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
159
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
160
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
161
|
+
let baseOptions;
|
|
162
|
+
let baseAccessToken;
|
|
163
|
+
if (configuration) {
|
|
164
|
+
baseOptions = configuration.baseOptions;
|
|
165
|
+
baseAccessToken = configuration.accessToken;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
169
|
+
const localVarHeaderParameter = {} as any;
|
|
170
|
+
const localVarQueryParameter = {} as any;
|
|
171
|
+
|
|
172
|
+
// authentication bearer required
|
|
173
|
+
// http bearer authentication required
|
|
174
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
175
|
+
|
|
176
|
+
if (expand !== undefined) {
|
|
177
|
+
localVarQueryParameter['expand'] = expand;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
181
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
187
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
188
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
189
|
+
|
|
190
|
+
return {
|
|
191
|
+
url: toPathString(localVarUrlObj),
|
|
192
|
+
options: localVarRequestOptions,
|
|
193
|
+
};
|
|
194
|
+
},
|
|
195
|
+
/**
|
|
196
|
+
* List public keys with optional filters, sorting, and pagination. Use filters to find keys by slug, code, or other attributes.
|
|
197
|
+
* @summary List public keys
|
|
198
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
199
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, slug, key, createdAt, updatedAt, deletedAt</i>
|
|
200
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, slug, key, createdAt, updatedAt, deletedAt</i>
|
|
201
|
+
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, slug, key</i>
|
|
202
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt</i>
|
|
203
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
204
|
+
* @param {*} [options] Override http request option.
|
|
205
|
+
* @throws {RequiredError}
|
|
206
|
+
*/
|
|
207
|
+
listPublicKeys: async (authorization?: string, filter?: string, filters?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
208
|
+
const localVarPath = `/settingservice/v1/public-keys`;
|
|
209
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
210
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
211
|
+
let baseOptions;
|
|
212
|
+
let baseAccessToken;
|
|
213
|
+
if (configuration) {
|
|
214
|
+
baseOptions = configuration.baseOptions;
|
|
215
|
+
baseAccessToken = configuration.accessToken;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
219
|
+
const localVarHeaderParameter = {} as any;
|
|
220
|
+
const localVarQueryParameter = {} as any;
|
|
221
|
+
|
|
222
|
+
// authentication bearer required
|
|
223
|
+
// http bearer authentication required
|
|
224
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
225
|
+
|
|
226
|
+
if (filter !== undefined) {
|
|
227
|
+
localVarQueryParameter['filter'] = filter;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (filters !== undefined) {
|
|
231
|
+
localVarQueryParameter['filters'] = filters;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (search !== undefined) {
|
|
235
|
+
localVarQueryParameter['search'] = search;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (order !== undefined) {
|
|
239
|
+
localVarQueryParameter['order'] = order;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (expand !== undefined) {
|
|
243
|
+
localVarQueryParameter['expand'] = expand;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
247
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
253
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
254
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
255
|
+
|
|
256
|
+
return {
|
|
257
|
+
url: toPathString(localVarUrlObj),
|
|
258
|
+
options: localVarRequestOptions,
|
|
259
|
+
};
|
|
260
|
+
},
|
|
261
|
+
/**
|
|
262
|
+
* Rotate (replace) a public key with new key material. The code stays the same; only the key value changes. We recommend rotating keys every three months for security. Returns the updated public key.
|
|
263
|
+
* @summary Create the public key
|
|
264
|
+
* @param {string} code
|
|
265
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
266
|
+
* @param {*} [options] Override http request option.
|
|
267
|
+
* @throws {RequiredError}
|
|
268
|
+
*/
|
|
269
|
+
rotatePublicKey: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
270
|
+
// verify required parameter 'code' is not null or undefined
|
|
271
|
+
assertParamExists('rotatePublicKey', 'code', code)
|
|
272
|
+
const localVarPath = `/settingservice/v1/public-keys/{code}/rotate`
|
|
273
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
274
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
275
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
276
|
+
let baseOptions;
|
|
277
|
+
let baseAccessToken;
|
|
278
|
+
if (configuration) {
|
|
279
|
+
baseOptions = configuration.baseOptions;
|
|
280
|
+
baseAccessToken = configuration.accessToken;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
284
|
+
const localVarHeaderParameter = {} as any;
|
|
285
|
+
const localVarQueryParameter = {} as any;
|
|
286
|
+
|
|
287
|
+
// authentication bearer required
|
|
288
|
+
// http bearer authentication required
|
|
289
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
290
|
+
|
|
291
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
292
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
298
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
299
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
300
|
+
|
|
301
|
+
return {
|
|
302
|
+
url: toPathString(localVarUrlObj),
|
|
303
|
+
options: localVarRequestOptions,
|
|
304
|
+
};
|
|
305
|
+
},
|
|
306
|
+
/**
|
|
307
|
+
* Update a public key\'s metadata (e.g. slug). Does not change the key material; use rotate to replace the key.
|
|
308
|
+
* @summary Update the public key
|
|
309
|
+
* @param {string} code
|
|
310
|
+
* @param {UpdatePublicKeyRequestDto} updatePublicKeyRequestDto
|
|
311
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
312
|
+
* @param {*} [options] Override http request option.
|
|
313
|
+
* @throws {RequiredError}
|
|
314
|
+
*/
|
|
315
|
+
updatePublicKey: async (code: string, updatePublicKeyRequestDto: UpdatePublicKeyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
316
|
+
// verify required parameter 'code' is not null or undefined
|
|
317
|
+
assertParamExists('updatePublicKey', 'code', code)
|
|
318
|
+
// verify required parameter 'updatePublicKeyRequestDto' is not null or undefined
|
|
319
|
+
assertParamExists('updatePublicKey', 'updatePublicKeyRequestDto', updatePublicKeyRequestDto)
|
|
320
|
+
const localVarPath = `/settingservice/v1/public-keys/{code}`
|
|
321
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
322
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
323
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
324
|
+
let baseOptions;
|
|
325
|
+
let baseAccessToken;
|
|
326
|
+
if (configuration) {
|
|
327
|
+
baseOptions = configuration.baseOptions;
|
|
328
|
+
baseAccessToken = configuration.accessToken;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
332
|
+
const localVarHeaderParameter = {} as any;
|
|
333
|
+
const localVarQueryParameter = {} as any;
|
|
334
|
+
|
|
335
|
+
// authentication bearer required
|
|
336
|
+
// http bearer authentication required
|
|
337
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
338
|
+
|
|
339
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
340
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
346
|
+
|
|
347
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
348
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
349
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
350
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updatePublicKeyRequestDto, localVarRequestOptions, configuration)
|
|
351
|
+
|
|
352
|
+
return {
|
|
353
|
+
url: toPathString(localVarUrlObj),
|
|
354
|
+
options: localVarRequestOptions,
|
|
355
|
+
};
|
|
356
|
+
},
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* PublicKeysApi - functional programming interface
|
|
362
|
+
* @export
|
|
363
|
+
*/
|
|
364
|
+
export const PublicKeysApiFp = function(configuration?: Configuration) {
|
|
365
|
+
const localVarAxiosParamCreator = PublicKeysApiAxiosParamCreator(configuration)
|
|
366
|
+
return {
|
|
367
|
+
/**
|
|
368
|
+
* Create a new public key. Use the returned key for public API authentication. We recommend rotating keys every three months.
|
|
369
|
+
* @summary Create the public key
|
|
370
|
+
* @param {CreatePublicKeyRequestDto} createPublicKeyRequestDto
|
|
371
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
372
|
+
* @param {*} [options] Override http request option.
|
|
373
|
+
* @throws {RequiredError}
|
|
374
|
+
*/
|
|
375
|
+
async createPublicKey(createPublicKeyRequestDto: CreatePublicKeyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePublicKeyResponseClass>> {
|
|
376
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createPublicKey(createPublicKeyRequestDto, authorization, options);
|
|
377
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
378
|
+
},
|
|
379
|
+
/**
|
|
380
|
+
* Delete a public key by code. Ensure no integrations or services depend on this key before deleting.
|
|
381
|
+
* @summary Delete the public key
|
|
382
|
+
* @param {string} code Unique identifier for the object.
|
|
383
|
+
* @param {DeletePublicKeyRequestDto} deletePublicKeyRequestDto
|
|
384
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
385
|
+
* @param {*} [options] Override http request option.
|
|
386
|
+
* @throws {RequiredError}
|
|
387
|
+
*/
|
|
388
|
+
async deletePublicKey(code: string, deletePublicKeyRequestDto: DeletePublicKeyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
389
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deletePublicKey(code, deletePublicKeyRequestDto, authorization, options);
|
|
390
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
391
|
+
},
|
|
392
|
+
/**
|
|
393
|
+
* Retrieve a single public key by its code.
|
|
394
|
+
* @summary Retrieve the public key
|
|
395
|
+
* @param {string} code
|
|
396
|
+
* @param {string} expand
|
|
397
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
398
|
+
* @param {*} [options] Override http request option.
|
|
399
|
+
* @throws {RequiredError}
|
|
400
|
+
*/
|
|
401
|
+
async getPublicKey(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPublicKeyResponseClass>> {
|
|
402
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicKey(code, expand, authorization, options);
|
|
403
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
404
|
+
},
|
|
405
|
+
/**
|
|
406
|
+
* List public keys with optional filters, sorting, and pagination. Use filters to find keys by slug, code, or other attributes.
|
|
407
|
+
* @summary List public keys
|
|
408
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
409
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, slug, key, createdAt, updatedAt, deletedAt</i>
|
|
410
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, slug, key, createdAt, updatedAt, deletedAt</i>
|
|
411
|
+
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, slug, key</i>
|
|
412
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt</i>
|
|
413
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
414
|
+
* @param {*} [options] Override http request option.
|
|
415
|
+
* @throws {RequiredError}
|
|
416
|
+
*/
|
|
417
|
+
async listPublicKeys(authorization?: string, filter?: string, filters?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPublicKeysResponseClass>> {
|
|
418
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listPublicKeys(authorization, filter, filters, search, order, expand, options);
|
|
419
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
420
|
+
},
|
|
421
|
+
/**
|
|
422
|
+
* Rotate (replace) a public key with new key material. The code stays the same; only the key value changes. We recommend rotating keys every three months for security. Returns the updated public key.
|
|
423
|
+
* @summary Create the public key
|
|
424
|
+
* @param {string} code
|
|
425
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
426
|
+
* @param {*} [options] Override http request option.
|
|
427
|
+
* @throws {RequiredError}
|
|
428
|
+
*/
|
|
429
|
+
async rotatePublicKey(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RotatePublicKeyResponseClass>> {
|
|
430
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.rotatePublicKey(code, authorization, options);
|
|
431
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
432
|
+
},
|
|
433
|
+
/**
|
|
434
|
+
* Update a public key\'s metadata (e.g. slug). Does not change the key material; use rotate to replace the key.
|
|
435
|
+
* @summary Update the public key
|
|
436
|
+
* @param {string} code
|
|
437
|
+
* @param {UpdatePublicKeyRequestDto} updatePublicKeyRequestDto
|
|
438
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
439
|
+
* @param {*} [options] Override http request option.
|
|
440
|
+
* @throws {RequiredError}
|
|
441
|
+
*/
|
|
442
|
+
async updatePublicKey(code: string, updatePublicKeyRequestDto: UpdatePublicKeyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdatePublicKeyResponseClass>> {
|
|
443
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePublicKey(code, updatePublicKeyRequestDto, authorization, options);
|
|
444
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
445
|
+
},
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* PublicKeysApi - factory interface
|
|
451
|
+
* @export
|
|
452
|
+
*/
|
|
453
|
+
export const PublicKeysApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
454
|
+
const localVarFp = PublicKeysApiFp(configuration)
|
|
455
|
+
return {
|
|
456
|
+
/**
|
|
457
|
+
* Create a new public key. Use the returned key for public API authentication. We recommend rotating keys every three months.
|
|
458
|
+
* @summary Create the public key
|
|
459
|
+
* @param {CreatePublicKeyRequestDto} createPublicKeyRequestDto
|
|
460
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
461
|
+
* @param {*} [options] Override http request option.
|
|
462
|
+
* @throws {RequiredError}
|
|
463
|
+
*/
|
|
464
|
+
createPublicKey(createPublicKeyRequestDto: CreatePublicKeyRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePublicKeyResponseClass> {
|
|
465
|
+
return localVarFp.createPublicKey(createPublicKeyRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
466
|
+
},
|
|
467
|
+
/**
|
|
468
|
+
* Delete a public key by code. Ensure no integrations or services depend on this key before deleting.
|
|
469
|
+
* @summary Delete the public key
|
|
470
|
+
* @param {string} code Unique identifier for the object.
|
|
471
|
+
* @param {DeletePublicKeyRequestDto} deletePublicKeyRequestDto
|
|
472
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
473
|
+
* @param {*} [options] Override http request option.
|
|
474
|
+
* @throws {RequiredError}
|
|
475
|
+
*/
|
|
476
|
+
deletePublicKey(code: string, deletePublicKeyRequestDto: DeletePublicKeyRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
|
|
477
|
+
return localVarFp.deletePublicKey(code, deletePublicKeyRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
478
|
+
},
|
|
479
|
+
/**
|
|
480
|
+
* Retrieve a single public key by its code.
|
|
481
|
+
* @summary Retrieve the public key
|
|
482
|
+
* @param {string} code
|
|
483
|
+
* @param {string} expand
|
|
484
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
485
|
+
* @param {*} [options] Override http request option.
|
|
486
|
+
* @throws {RequiredError}
|
|
487
|
+
*/
|
|
488
|
+
getPublicKey(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetPublicKeyResponseClass> {
|
|
489
|
+
return localVarFp.getPublicKey(code, expand, authorization, options).then((request) => request(axios, basePath));
|
|
490
|
+
},
|
|
491
|
+
/**
|
|
492
|
+
* List public keys with optional filters, sorting, and pagination. Use filters to find keys by slug, code, or other attributes.
|
|
493
|
+
* @summary List public keys
|
|
494
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
495
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, slug, key, createdAt, updatedAt, deletedAt</i>
|
|
496
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, slug, key, createdAt, updatedAt, deletedAt</i>
|
|
497
|
+
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, slug, key</i>
|
|
498
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt</i>
|
|
499
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
500
|
+
* @param {*} [options] Override http request option.
|
|
501
|
+
* @throws {RequiredError}
|
|
502
|
+
*/
|
|
503
|
+
listPublicKeys(authorization?: string, filter?: string, filters?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListPublicKeysResponseClass> {
|
|
504
|
+
return localVarFp.listPublicKeys(authorization, filter, filters, search, order, expand, options).then((request) => request(axios, basePath));
|
|
505
|
+
},
|
|
506
|
+
/**
|
|
507
|
+
* Rotate (replace) a public key with new key material. The code stays the same; only the key value changes. We recommend rotating keys every three months for security. Returns the updated public key.
|
|
508
|
+
* @summary Create the public key
|
|
509
|
+
* @param {string} code
|
|
510
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
511
|
+
* @param {*} [options] Override http request option.
|
|
512
|
+
* @throws {RequiredError}
|
|
513
|
+
*/
|
|
514
|
+
rotatePublicKey(code: string, authorization?: string, options?: any): AxiosPromise<RotatePublicKeyResponseClass> {
|
|
515
|
+
return localVarFp.rotatePublicKey(code, authorization, options).then((request) => request(axios, basePath));
|
|
516
|
+
},
|
|
517
|
+
/**
|
|
518
|
+
* Update a public key\'s metadata (e.g. slug). Does not change the key material; use rotate to replace the key.
|
|
519
|
+
* @summary Update the public key
|
|
520
|
+
* @param {string} code
|
|
521
|
+
* @param {UpdatePublicKeyRequestDto} updatePublicKeyRequestDto
|
|
522
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
523
|
+
* @param {*} [options] Override http request option.
|
|
524
|
+
* @throws {RequiredError}
|
|
525
|
+
*/
|
|
526
|
+
updatePublicKey(code: string, updatePublicKeyRequestDto: UpdatePublicKeyRequestDto, authorization?: string, options?: any): AxiosPromise<UpdatePublicKeyResponseClass> {
|
|
527
|
+
return localVarFp.updatePublicKey(code, updatePublicKeyRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
528
|
+
},
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Request parameters for createPublicKey operation in PublicKeysApi.
|
|
534
|
+
* @export
|
|
535
|
+
* @interface PublicKeysApiCreatePublicKeyRequest
|
|
536
|
+
*/
|
|
537
|
+
export interface PublicKeysApiCreatePublicKeyRequest {
|
|
538
|
+
/**
|
|
539
|
+
*
|
|
540
|
+
* @type {CreatePublicKeyRequestDto}
|
|
541
|
+
* @memberof PublicKeysApiCreatePublicKey
|
|
542
|
+
*/
|
|
543
|
+
readonly createPublicKeyRequestDto: CreatePublicKeyRequestDto
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
547
|
+
* @type {string}
|
|
548
|
+
* @memberof PublicKeysApiCreatePublicKey
|
|
549
|
+
*/
|
|
550
|
+
readonly authorization?: string
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Request parameters for deletePublicKey operation in PublicKeysApi.
|
|
555
|
+
* @export
|
|
556
|
+
* @interface PublicKeysApiDeletePublicKeyRequest
|
|
557
|
+
*/
|
|
558
|
+
export interface PublicKeysApiDeletePublicKeyRequest {
|
|
559
|
+
/**
|
|
560
|
+
* Unique identifier for the object.
|
|
561
|
+
* @type {string}
|
|
562
|
+
* @memberof PublicKeysApiDeletePublicKey
|
|
563
|
+
*/
|
|
564
|
+
readonly code: string
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
*
|
|
568
|
+
* @type {DeletePublicKeyRequestDto}
|
|
569
|
+
* @memberof PublicKeysApiDeletePublicKey
|
|
570
|
+
*/
|
|
571
|
+
readonly deletePublicKeyRequestDto: DeletePublicKeyRequestDto
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
575
|
+
* @type {string}
|
|
576
|
+
* @memberof PublicKeysApiDeletePublicKey
|
|
577
|
+
*/
|
|
578
|
+
readonly authorization?: string
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Request parameters for getPublicKey operation in PublicKeysApi.
|
|
583
|
+
* @export
|
|
584
|
+
* @interface PublicKeysApiGetPublicKeyRequest
|
|
585
|
+
*/
|
|
586
|
+
export interface PublicKeysApiGetPublicKeyRequest {
|
|
587
|
+
/**
|
|
588
|
+
*
|
|
589
|
+
* @type {string}
|
|
590
|
+
* @memberof PublicKeysApiGetPublicKey
|
|
591
|
+
*/
|
|
592
|
+
readonly code: string
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
*
|
|
596
|
+
* @type {string}
|
|
597
|
+
* @memberof PublicKeysApiGetPublicKey
|
|
598
|
+
*/
|
|
599
|
+
readonly expand: string
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
603
|
+
* @type {string}
|
|
604
|
+
* @memberof PublicKeysApiGetPublicKey
|
|
605
|
+
*/
|
|
606
|
+
readonly authorization?: string
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Request parameters for listPublicKeys operation in PublicKeysApi.
|
|
611
|
+
* @export
|
|
612
|
+
* @interface PublicKeysApiListPublicKeysRequest
|
|
613
|
+
*/
|
|
614
|
+
export interface PublicKeysApiListPublicKeysRequest {
|
|
615
|
+
/**
|
|
616
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
617
|
+
* @type {string}
|
|
618
|
+
* @memberof PublicKeysApiListPublicKeys
|
|
619
|
+
*/
|
|
620
|
+
readonly authorization?: string
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, slug, key, createdAt, updatedAt, deletedAt</i>
|
|
624
|
+
* @type {string}
|
|
625
|
+
* @memberof PublicKeysApiListPublicKeys
|
|
626
|
+
*/
|
|
627
|
+
readonly filter?: string
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, slug, key, createdAt, updatedAt, deletedAt</i>
|
|
631
|
+
* @type {string}
|
|
632
|
+
* @memberof PublicKeysApiListPublicKeys
|
|
633
|
+
*/
|
|
634
|
+
readonly filters?: string
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: code, slug, key</i>
|
|
638
|
+
* @type {string}
|
|
639
|
+
* @memberof PublicKeysApiListPublicKeys
|
|
640
|
+
*/
|
|
641
|
+
readonly search?: string
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: createdAt</i>
|
|
645
|
+
* @type {string}
|
|
646
|
+
* @memberof PublicKeysApiListPublicKeys
|
|
647
|
+
*/
|
|
648
|
+
readonly order?: string
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
652
|
+
* @type {string}
|
|
653
|
+
* @memberof PublicKeysApiListPublicKeys
|
|
654
|
+
*/
|
|
655
|
+
readonly expand?: string
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Request parameters for rotatePublicKey operation in PublicKeysApi.
|
|
660
|
+
* @export
|
|
661
|
+
* @interface PublicKeysApiRotatePublicKeyRequest
|
|
662
|
+
*/
|
|
663
|
+
export interface PublicKeysApiRotatePublicKeyRequest {
|
|
664
|
+
/**
|
|
665
|
+
*
|
|
666
|
+
* @type {string}
|
|
667
|
+
* @memberof PublicKeysApiRotatePublicKey
|
|
668
|
+
*/
|
|
669
|
+
readonly code: string
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
673
|
+
* @type {string}
|
|
674
|
+
* @memberof PublicKeysApiRotatePublicKey
|
|
675
|
+
*/
|
|
676
|
+
readonly authorization?: string
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Request parameters for updatePublicKey operation in PublicKeysApi.
|
|
681
|
+
* @export
|
|
682
|
+
* @interface PublicKeysApiUpdatePublicKeyRequest
|
|
683
|
+
*/
|
|
684
|
+
export interface PublicKeysApiUpdatePublicKeyRequest {
|
|
685
|
+
/**
|
|
686
|
+
*
|
|
687
|
+
* @type {string}
|
|
688
|
+
* @memberof PublicKeysApiUpdatePublicKey
|
|
689
|
+
*/
|
|
690
|
+
readonly code: string
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
*
|
|
694
|
+
* @type {UpdatePublicKeyRequestDto}
|
|
695
|
+
* @memberof PublicKeysApiUpdatePublicKey
|
|
696
|
+
*/
|
|
697
|
+
readonly updatePublicKeyRequestDto: UpdatePublicKeyRequestDto
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
701
|
+
* @type {string}
|
|
702
|
+
* @memberof PublicKeysApiUpdatePublicKey
|
|
703
|
+
*/
|
|
704
|
+
readonly authorization?: string
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* PublicKeysApi - object-oriented interface
|
|
709
|
+
* @export
|
|
710
|
+
* @class PublicKeysApi
|
|
711
|
+
* @extends {BaseAPI}
|
|
712
|
+
*/
|
|
713
|
+
export class PublicKeysApi extends BaseAPI {
|
|
714
|
+
/**
|
|
715
|
+
* Create a new public key. Use the returned key for public API authentication. We recommend rotating keys every three months.
|
|
716
|
+
* @summary Create the public key
|
|
717
|
+
* @param {PublicKeysApiCreatePublicKeyRequest} requestParameters Request parameters.
|
|
718
|
+
* @param {*} [options] Override http request option.
|
|
719
|
+
* @throws {RequiredError}
|
|
720
|
+
* @memberof PublicKeysApi
|
|
721
|
+
*/
|
|
722
|
+
public createPublicKey(requestParameters: PublicKeysApiCreatePublicKeyRequest, options?: AxiosRequestConfig) {
|
|
723
|
+
return PublicKeysApiFp(this.configuration).createPublicKey(requestParameters.createPublicKeyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Delete a public key by code. Ensure no integrations or services depend on this key before deleting.
|
|
728
|
+
* @summary Delete the public key
|
|
729
|
+
* @param {PublicKeysApiDeletePublicKeyRequest} requestParameters Request parameters.
|
|
730
|
+
* @param {*} [options] Override http request option.
|
|
731
|
+
* @throws {RequiredError}
|
|
732
|
+
* @memberof PublicKeysApi
|
|
733
|
+
*/
|
|
734
|
+
public deletePublicKey(requestParameters: PublicKeysApiDeletePublicKeyRequest, options?: AxiosRequestConfig) {
|
|
735
|
+
return PublicKeysApiFp(this.configuration).deletePublicKey(requestParameters.code, requestParameters.deletePublicKeyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Retrieve a single public key by its code.
|
|
740
|
+
* @summary Retrieve the public key
|
|
741
|
+
* @param {PublicKeysApiGetPublicKeyRequest} requestParameters Request parameters.
|
|
742
|
+
* @param {*} [options] Override http request option.
|
|
743
|
+
* @throws {RequiredError}
|
|
744
|
+
* @memberof PublicKeysApi
|
|
745
|
+
*/
|
|
746
|
+
public getPublicKey(requestParameters: PublicKeysApiGetPublicKeyRequest, options?: AxiosRequestConfig) {
|
|
747
|
+
return PublicKeysApiFp(this.configuration).getPublicKey(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* List public keys with optional filters, sorting, and pagination. Use filters to find keys by slug, code, or other attributes.
|
|
752
|
+
* @summary List public keys
|
|
753
|
+
* @param {PublicKeysApiListPublicKeysRequest} requestParameters Request parameters.
|
|
754
|
+
* @param {*} [options] Override http request option.
|
|
755
|
+
* @throws {RequiredError}
|
|
756
|
+
* @memberof PublicKeysApi
|
|
757
|
+
*/
|
|
758
|
+
public listPublicKeys(requestParameters: PublicKeysApiListPublicKeysRequest = {}, options?: AxiosRequestConfig) {
|
|
759
|
+
return PublicKeysApiFp(this.configuration).listPublicKeys(requestParameters.authorization, requestParameters.filter, requestParameters.filters, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* Rotate (replace) a public key with new key material. The code stays the same; only the key value changes. We recommend rotating keys every three months for security. Returns the updated public key.
|
|
764
|
+
* @summary Create the public key
|
|
765
|
+
* @param {PublicKeysApiRotatePublicKeyRequest} requestParameters Request parameters.
|
|
766
|
+
* @param {*} [options] Override http request option.
|
|
767
|
+
* @throws {RequiredError}
|
|
768
|
+
* @memberof PublicKeysApi
|
|
769
|
+
*/
|
|
770
|
+
public rotatePublicKey(requestParameters: PublicKeysApiRotatePublicKeyRequest, options?: AxiosRequestConfig) {
|
|
771
|
+
return PublicKeysApiFp(this.configuration).rotatePublicKey(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* Update a public key\'s metadata (e.g. slug). Does not change the key material; use rotate to replace the key.
|
|
776
|
+
* @summary Update the public key
|
|
777
|
+
* @param {PublicKeysApiUpdatePublicKeyRequest} requestParameters Request parameters.
|
|
778
|
+
* @param {*} [options] Override http request option.
|
|
779
|
+
* @throws {RequiredError}
|
|
780
|
+
* @memberof PublicKeysApi
|
|
781
|
+
*/
|
|
782
|
+
public updatePublicKey(requestParameters: PublicKeysApiUpdatePublicKeyRequest, options?: AxiosRequestConfig) {
|
|
783
|
+
return PublicKeysApiFp(this.configuration).updatePublicKey(requestParameters.code, requestParameters.updatePublicKeyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
784
|
+
}
|
|
785
|
+
}
|