-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdata-credentials.d.ts
294 lines (292 loc) · 9.91 KB
/
data-credentials.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
import { A as ApiCallOptions } from './invoke-fetch-types-BXn-uSF5.js';
import './auth-types-PkN9CAF_.js';
type ActionFilterOrphanRequest = {
/** Filtering on datasource ID of credentials */
datasourceID?: string;
/** Filtering on separate status of credentials: * 0 - embedded credential * 1 - separated credential */
qSeparated?: 0 | 1;
/** Filtering on type of credentials */
qType?: string;
};
type ActionFilterOrphanResponse = {
/** Number of orphan credentials found */
count: number;
data: OrphanCredentialResItem[];
};
type Credential = {
/** Datetime when the credential was created */
created?: string;
/** ID datasource that the credential is created for */
datasourceID?: string;
links?: Link;
/** Number of linked connections */
qConnCount: number;
/** UUID of the credential */
qID: string;
/** Name of the credential */
qName: string;
/** Reference key of credential in redis */
qReferenceKey?: string;
/** Type of credential */
qType: string;
/** Datetime when the credential was last updated */
updated?: string;
};
/**
* Credential
*/
type CredentialCreate = {
/** ID of connection that will be associated with the credential */
connectionId?: string;
/** ID datasource that the credential is created for */
datasourceID?: string;
/** UUID of the credential */
qID?: string;
/** Name of the credential */
qName: string;
/** Password */
qPassword: string;
/** Type of credential (i.e. connector provider of the corresponding connection) */
qType: string;
/** User name */
qUsername: string;
};
type Error = {
/** Unique internal error code */
code?: string;
/** More concrete details */
detail?: string;
/** HTTP status code */
status?: number;
/** A summary in english explaining what went wrong */
title?: string;
};
type Errors = Error[];
type Link = {
/** Link to current query */
self: {
/** URL pointing to the resource */
href: string;
};
};
/**
* Orphan credential
*/
type OrphanCredentialResItem = {
/** Datetime when the credential was created */
created: string;
/** ID datasource that the credential is created for */
datasourceID?: string;
/** UUID of the credential */
qID: string;
/** Name of the credential */
qName: string;
/** Type of credential (i.e. connector provider of the corresponding connection) */
qType: string;
/** Tenant ID of the credential's owner */
tenant?: string;
/** Datetime when the credential was last updated */
updated: string;
/** User ID of the credential's owner */
user?: string;
};
type PatchRequest = {
patchData: {
/** Operation type */
op?: "add" | "replace" | "remove";
/** Path to the target field to be patched */
path?: string;
/** The value used for the patch, only needed for 'add' or 'replace'. Value type could be either string or integer, should match with the type of the target field */
value?: string;
}[];
};
type ResponseErrors = {
errors?: Errors;
};
/**
* Gets list of orphan data credentials (i.e. credentials that are not associated to any data connection) filtering on properties defined in request body
*
* @param body an object with the body content
* @throws FilterOrphanedDataCredentialsHttpError
*/
declare const filterOrphanedDataCredentials: (body: ActionFilterOrphanRequest, options?: ApiCallOptions) => Promise<FilterOrphanedDataCredentialsHttpResponse>;
type FilterOrphanedDataCredentialsHttpResponse = {
data: ActionFilterOrphanResponse;
headers: Headers;
status: 200;
};
type FilterOrphanedDataCredentialsHttpError = {
data: ResponseErrors;
headers: Headers;
status: 400 | 403;
};
/**
* Deletes the specified credential by ID (or by name when type=credentialname is set in query)
* @example
* deleteDataCredential(
* "027d2703-e745-43ec-8876-a2e6ac341700",
* {
* byCredentialName: false
* }
* )
*
* @param qID Credential ID
* @param query an object with query parameters
* @throws DeleteDataCredentialHttpError
*/
declare const deleteDataCredential: (qID: string, query: {
/** If set to true, credentialId in the query will be interpreted as credential's name */
byCredentialName?: boolean;
}, options?: ApiCallOptions) => Promise<DeleteDataCredentialHttpResponse>;
type DeleteDataCredentialHttpResponse = {
data: void;
headers: Headers;
status: 204;
};
type DeleteDataCredentialHttpError = {
data: ResponseErrors;
headers: Headers;
status: 404;
};
/**
* Gets a credential by ID (or by name when bycredentialname=true is set in query)
* @example
* getDataCredential(
* "027d2703-e745-43ec-8876-a2e6ac341700",
* {
* byCredentialName: false
* }
* )
*
* @param qID Credential ID
* @param query an object with query parameters
* @throws GetDataCredentialHttpError
*/
declare const getDataCredential: (qID: string, query: {
/** If set to true, credentialId in the query will be interpreted as credential's name */
byCredentialName?: boolean;
}, options?: ApiCallOptions) => Promise<GetDataCredentialHttpResponse>;
type GetDataCredentialHttpResponse = {
data: Credential;
headers: Headers;
status: 200;
};
type GetDataCredentialHttpError = {
data: ResponseErrors;
headers: Headers;
status: 400 | 404;
};
/**
* Patches a credential specified by ID (or by name when bycredentialname=true is set in query)
*
* @param qID Credential ID
* @param query an object with query parameters
* @param body an object with the body content
* @throws PatchDataCredentialHttpError
*/
declare const patchDataCredential: (qID: string, query: {
/** If set to true, credentialId in the query will be interpreted as credential's name */
byCredentialName?: boolean;
}, body: PatchRequest, options?: ApiCallOptions) => Promise<PatchDataCredentialHttpResponse>;
type PatchDataCredentialHttpResponse = {
data: void;
headers: Headers;
status: 204;
};
type PatchDataCredentialHttpError = {
data: ResponseErrors;
headers: Headers;
status: 400 | 404 | 409;
};
/**
* Updates a credential specified by ID (or by name when bycredentialname=true is set in query)
*
* @param qID Credential ID
* @param query an object with query parameters
* @param body an object with the body content
* @throws UpdateDataCredentialHttpError
*/
declare const updateDataCredential: (qID: string, query: {
/** If set to true, credentialId in the query will be interpreted as credential's name */
byCredentialName?: boolean;
}, body: CredentialCreate, options?: ApiCallOptions) => Promise<UpdateDataCredentialHttpResponse>;
type UpdateDataCredentialHttpResponse = {
data: void;
headers: Headers;
status: 204;
};
type UpdateDataCredentialHttpError = {
data: ResponseErrors;
headers: Headers;
status: 400 | 404 | 409;
};
/**
* Clears the cache for data-credentials api requests.
*/
declare function clearCache(): void;
interface DataCredentialsAPI {
/**
* Gets list of orphan data credentials (i.e. credentials that are not associated to any data connection) filtering on properties defined in request body
*
* @param body an object with the body content
* @throws FilterOrphanedDataCredentialsHttpError
*/
filterOrphanedDataCredentials: typeof filterOrphanedDataCredentials;
/**
* Deletes the specified credential by ID (or by name when type=credentialname is set in query)
* @example
* deleteDataCredential(
* "027d2703-e745-43ec-8876-a2e6ac341700",
* {
* byCredentialName: false
* }
* )
*
* @param qID Credential ID
* @param query an object with query parameters
* @throws DeleteDataCredentialHttpError
*/
deleteDataCredential: typeof deleteDataCredential;
/**
* Gets a credential by ID (or by name when bycredentialname=true is set in query)
* @example
* getDataCredential(
* "027d2703-e745-43ec-8876-a2e6ac341700",
* {
* byCredentialName: false
* }
* )
*
* @param qID Credential ID
* @param query an object with query parameters
* @throws GetDataCredentialHttpError
*/
getDataCredential: typeof getDataCredential;
/**
* Patches a credential specified by ID (or by name when bycredentialname=true is set in query)
*
* @param qID Credential ID
* @param query an object with query parameters
* @param body an object with the body content
* @throws PatchDataCredentialHttpError
*/
patchDataCredential: typeof patchDataCredential;
/**
* Updates a credential specified by ID (or by name when bycredentialname=true is set in query)
*
* @param qID Credential ID
* @param query an object with query parameters
* @param body an object with the body content
* @throws UpdateDataCredentialHttpError
*/
updateDataCredential: typeof updateDataCredential;
/**
* Clears the cache for data-credentials api requests.
*/
clearCache: typeof clearCache;
}
/**
* Functions for the data-credentials api
*/
declare const dataCredentialsExport: DataCredentialsAPI;
export { type ActionFilterOrphanRequest, type ActionFilterOrphanResponse, type Credential, type CredentialCreate, type DataCredentialsAPI, type DeleteDataCredentialHttpError, type DeleteDataCredentialHttpResponse, type Error, type Errors, type FilterOrphanedDataCredentialsHttpError, type FilterOrphanedDataCredentialsHttpResponse, type GetDataCredentialHttpError, type GetDataCredentialHttpResponse, type Link, type OrphanCredentialResItem, type PatchDataCredentialHttpError, type PatchDataCredentialHttpResponse, type PatchRequest, type ResponseErrors, type UpdateDataCredentialHttpError, type UpdateDataCredentialHttpResponse, clearCache, dataCredentialsExport as default, deleteDataCredential, filterOrphanedDataCredentials, getDataCredential, patchDataCredential, updateDataCredential };