@emilgroup/validation-rules-sdk 1.0.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 +30 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +51 -0
- package/api/health-checks-api.ts +150 -0
- package/api/investigation-blocks-api.ts +693 -0
- package/api/validation-rules-api.ts +557 -0
- package/api.ts +31 -0
- package/base.ts +331 -0
- package/common.ts +198 -0
- package/configuration.ts +110 -0
- package/dist/api/health-checks-api.d.ts +87 -0
- package/dist/api/health-checks-api.js +218 -0
- package/dist/api/investigation-blocks-api.d.ts +393 -0
- package/dist/api/investigation-blocks-api.js +644 -0
- package/dist/api/validation-rules-api.d.ts +318 -0
- package/dist/api/validation-rules-api.js +537 -0
- package/dist/api.d.ts +14 -0
- package/dist/api.js +32 -0
- package/dist/base.d.ts +86 -0
- package/dist/base.js +367 -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-investigation-block-request-dto.d.ts +41 -0
- package/dist/models/create-investigation-block-request-dto.js +20 -0
- package/dist/models/create-investigation-block-response-class.d.ts +25 -0
- package/dist/models/create-investigation-block-response-class.js +15 -0
- package/dist/models/create-validation-rule-request-dto.d.ts +83 -0
- package/dist/models/create-validation-rule-request-dto.js +20 -0
- package/dist/models/create-validation-rule-response-class.d.ts +25 -0
- package/dist/models/create-validation-rule-response-class.js +15 -0
- package/dist/models/get-investigation-block-response-class.d.ts +25 -0
- package/dist/models/get-investigation-block-response-class.js +15 -0
- package/dist/models/get-validation-rule-response-class.d.ts +25 -0
- package/dist/models/get-validation-rule-response-class.js +15 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/index.js +30 -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/investigation-block-class.d.ts +90 -0
- package/dist/models/investigation-block-class.js +15 -0
- package/dist/models/list-investigation-blocks-response-class.d.ts +43 -0
- package/dist/models/list-investigation-blocks-response-class.js +15 -0
- package/dist/models/list-validation-rules-response-class.d.ts +43 -0
- package/dist/models/list-validation-rules-response-class.js +15 -0
- package/dist/models/update-investigation-block-request-dto.d.ts +59 -0
- package/dist/models/update-investigation-block-request-dto.js +25 -0
- package/dist/models/update-investigation-block-response-class.d.ts +25 -0
- package/dist/models/update-investigation-block-response-class.js +15 -0
- package/dist/models/validation-rule-class.d.ts +119 -0
- package/dist/models/validation-rule-class.js +20 -0
- package/git_push.sh +57 -0
- package/index.ts +19 -0
- package/models/create-investigation-block-request-dto.ts +50 -0
- package/models/create-investigation-block-response-class.ts +31 -0
- package/models/create-validation-rule-request-dto.ts +92 -0
- package/models/create-validation-rule-response-class.ts +31 -0
- package/models/get-investigation-block-response-class.ts +31 -0
- package/models/get-validation-rule-response-class.ts +31 -0
- package/models/index.ts +14 -0
- package/models/inline-response200.ts +48 -0
- package/models/inline-response503.ts +48 -0
- package/models/investigation-block-class.ts +96 -0
- package/models/list-investigation-blocks-response-class.ts +49 -0
- package/models/list-validation-rules-response-class.ts +49 -0
- package/models/update-investigation-block-request-dto.ts +69 -0
- package/models/update-investigation-block-response-class.ts +31 -0
- package/models/validation-rule-class.ts +128 -0
- package/package.json +27 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL Validation Rules Service
|
|
5
|
+
* The EMIL Validation Rules Service 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 { CreateValidationRuleRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { CreateValidationRuleResponseClass } from '../models';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { GetValidationRuleResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { ListValidationRulesResponseClass } from '../models';
|
|
31
|
+
/**
|
|
32
|
+
* ValidationRulesApi - axios parameter creator
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export const ValidationRulesApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new validation rule **Required Permissions** \"validation-rules-management.validation-rules.create\"
|
|
39
|
+
* @summary Create the validation rule
|
|
40
|
+
* @param {CreateValidationRuleRequestDto} createValidationRuleRequestDto
|
|
41
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
*/
|
|
45
|
+
createValidationRule: async (createValidationRuleRequestDto: CreateValidationRuleRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
|
+
// verify required parameter 'createValidationRuleRequestDto' is not null or undefined
|
|
47
|
+
assertParamExists('createValidationRule', 'createValidationRuleRequestDto', createValidationRuleRequestDto)
|
|
48
|
+
const localVarPath = `/validation-rules-service/v1/validation-rules`;
|
|
49
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
50
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
51
|
+
let baseOptions;
|
|
52
|
+
let baseAccessToken;
|
|
53
|
+
if (configuration) {
|
|
54
|
+
baseOptions = configuration.baseOptions;
|
|
55
|
+
baseAccessToken = configuration.accessToken;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
59
|
+
const localVarHeaderParameter = {} as any;
|
|
60
|
+
const localVarQueryParameter = {} as any;
|
|
61
|
+
|
|
62
|
+
// authentication bearer required
|
|
63
|
+
// http bearer authentication required
|
|
64
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
65
|
+
|
|
66
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
67
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
73
|
+
|
|
74
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
75
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
76
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
77
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createValidationRuleRequestDto, localVarRequestOptions, configuration)
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
url: toPathString(localVarUrlObj),
|
|
81
|
+
options: localVarRequestOptions,
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* Deletes a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.delete\"
|
|
86
|
+
* @summary Delete the validation rule
|
|
87
|
+
* @param {string} code Unique identifier for the object.
|
|
88
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
*/
|
|
92
|
+
deleteValidationRule: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
93
|
+
// verify required parameter 'code' is not null or undefined
|
|
94
|
+
assertParamExists('deleteValidationRule', 'code', code)
|
|
95
|
+
const localVarPath = `/validation-rules-service/v1/validation-rules/{code}`
|
|
96
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
97
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
98
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
99
|
+
let baseOptions;
|
|
100
|
+
let baseAccessToken;
|
|
101
|
+
if (configuration) {
|
|
102
|
+
baseOptions = configuration.baseOptions;
|
|
103
|
+
baseAccessToken = configuration.accessToken;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
107
|
+
const localVarHeaderParameter = {} as any;
|
|
108
|
+
const localVarQueryParameter = {} as any;
|
|
109
|
+
|
|
110
|
+
// authentication bearer required
|
|
111
|
+
// http bearer authentication required
|
|
112
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
113
|
+
|
|
114
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
115
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
121
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
122
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
url: toPathString(localVarUrlObj),
|
|
126
|
+
options: localVarRequestOptions,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
/**
|
|
130
|
+
* Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
131
|
+
* @summary Retrieve the validation rule
|
|
132
|
+
* @param {string} code Unique identifier for the object.
|
|
133
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
134
|
+
* @param {*} [options] Override http request option.
|
|
135
|
+
* @throws {RequiredError}
|
|
136
|
+
*/
|
|
137
|
+
getValidationRule: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
138
|
+
// verify required parameter 'code' is not null or undefined
|
|
139
|
+
assertParamExists('getValidationRule', 'code', code)
|
|
140
|
+
const localVarPath = `/validation-rules-service/v1/validation-rules/{code}`
|
|
141
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
142
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
143
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
144
|
+
let baseOptions;
|
|
145
|
+
let baseAccessToken;
|
|
146
|
+
if (configuration) {
|
|
147
|
+
baseOptions = configuration.baseOptions;
|
|
148
|
+
baseAccessToken = configuration.accessToken;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
152
|
+
const localVarHeaderParameter = {} as any;
|
|
153
|
+
const localVarQueryParameter = {} as any;
|
|
154
|
+
|
|
155
|
+
// authentication bearer required
|
|
156
|
+
// http bearer authentication required
|
|
157
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
158
|
+
|
|
159
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
160
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
166
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
167
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
168
|
+
|
|
169
|
+
return {
|
|
170
|
+
url: toPathString(localVarUrlObj),
|
|
171
|
+
options: localVarRequestOptions,
|
|
172
|
+
};
|
|
173
|
+
},
|
|
174
|
+
/**
|
|
175
|
+
* Lists all validation rules with optional filters **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
176
|
+
* @summary List validation rules
|
|
177
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
178
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
179
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
180
|
+
* @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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
181
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
182
|
+
* @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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt</i>
|
|
183
|
+
* @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/>
|
|
184
|
+
* @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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
185
|
+
* @param {*} [options] Override http request option.
|
|
186
|
+
* @throws {RequiredError}
|
|
187
|
+
*/
|
|
188
|
+
listValidationRules: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
189
|
+
const localVarPath = `/validation-rules-service/v1/validation-rules`;
|
|
190
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
191
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
192
|
+
let baseOptions;
|
|
193
|
+
let baseAccessToken;
|
|
194
|
+
if (configuration) {
|
|
195
|
+
baseOptions = configuration.baseOptions;
|
|
196
|
+
baseAccessToken = configuration.accessToken;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
200
|
+
const localVarHeaderParameter = {} as any;
|
|
201
|
+
const localVarQueryParameter = {} as any;
|
|
202
|
+
|
|
203
|
+
// authentication bearer required
|
|
204
|
+
// http bearer authentication required
|
|
205
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
206
|
+
|
|
207
|
+
if (pageSize !== undefined) {
|
|
208
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (pageToken !== undefined) {
|
|
212
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (filter !== undefined) {
|
|
216
|
+
localVarQueryParameter['filter'] = filter;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (search !== undefined) {
|
|
220
|
+
localVarQueryParameter['search'] = search;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (order !== undefined) {
|
|
224
|
+
localVarQueryParameter['order'] = order;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (expand !== undefined) {
|
|
228
|
+
localVarQueryParameter['expand'] = expand;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
if (filters !== undefined) {
|
|
232
|
+
localVarQueryParameter['filters'] = filters;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
236
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
242
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
243
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
244
|
+
|
|
245
|
+
return {
|
|
246
|
+
url: toPathString(localVarUrlObj),
|
|
247
|
+
options: localVarRequestOptions,
|
|
248
|
+
};
|
|
249
|
+
},
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* ValidationRulesApi - functional programming interface
|
|
255
|
+
* @export
|
|
256
|
+
*/
|
|
257
|
+
export const ValidationRulesApiFp = function(configuration?: Configuration) {
|
|
258
|
+
const localVarAxiosParamCreator = ValidationRulesApiAxiosParamCreator(configuration)
|
|
259
|
+
return {
|
|
260
|
+
/**
|
|
261
|
+
* Creates a new validation rule **Required Permissions** \"validation-rules-management.validation-rules.create\"
|
|
262
|
+
* @summary Create the validation rule
|
|
263
|
+
* @param {CreateValidationRuleRequestDto} createValidationRuleRequestDto
|
|
264
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
265
|
+
* @param {*} [options] Override http request option.
|
|
266
|
+
* @throws {RequiredError}
|
|
267
|
+
*/
|
|
268
|
+
async createValidationRule(createValidationRuleRequestDto: CreateValidationRuleRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateValidationRuleResponseClass>> {
|
|
269
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createValidationRule(createValidationRuleRequestDto, authorization, options);
|
|
270
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
271
|
+
},
|
|
272
|
+
/**
|
|
273
|
+
* Deletes a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.delete\"
|
|
274
|
+
* @summary Delete the validation rule
|
|
275
|
+
* @param {string} code Unique identifier for the object.
|
|
276
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
277
|
+
* @param {*} [options] Override http request option.
|
|
278
|
+
* @throws {RequiredError}
|
|
279
|
+
*/
|
|
280
|
+
async deleteValidationRule(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
281
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteValidationRule(code, authorization, options);
|
|
282
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
283
|
+
},
|
|
284
|
+
/**
|
|
285
|
+
* Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
286
|
+
* @summary Retrieve the validation rule
|
|
287
|
+
* @param {string} code Unique identifier for the object.
|
|
288
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
289
|
+
* @param {*} [options] Override http request option.
|
|
290
|
+
* @throws {RequiredError}
|
|
291
|
+
*/
|
|
292
|
+
async getValidationRule(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetValidationRuleResponseClass>> {
|
|
293
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getValidationRule(code, authorization, options);
|
|
294
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
295
|
+
},
|
|
296
|
+
/**
|
|
297
|
+
* Lists all validation rules with optional filters **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
298
|
+
* @summary List validation rules
|
|
299
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
300
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
301
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
302
|
+
* @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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
303
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
304
|
+
* @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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt</i>
|
|
305
|
+
* @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/>
|
|
306
|
+
* @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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
307
|
+
* @param {*} [options] Override http request option.
|
|
308
|
+
* @throws {RequiredError}
|
|
309
|
+
*/
|
|
310
|
+
async listValidationRules(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListValidationRulesResponseClass>> {
|
|
311
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listValidationRules(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
312
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
313
|
+
},
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* ValidationRulesApi - factory interface
|
|
319
|
+
* @export
|
|
320
|
+
*/
|
|
321
|
+
export const ValidationRulesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
322
|
+
const localVarFp = ValidationRulesApiFp(configuration)
|
|
323
|
+
return {
|
|
324
|
+
/**
|
|
325
|
+
* Creates a new validation rule **Required Permissions** \"validation-rules-management.validation-rules.create\"
|
|
326
|
+
* @summary Create the validation rule
|
|
327
|
+
* @param {CreateValidationRuleRequestDto} createValidationRuleRequestDto
|
|
328
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
329
|
+
* @param {*} [options] Override http request option.
|
|
330
|
+
* @throws {RequiredError}
|
|
331
|
+
*/
|
|
332
|
+
createValidationRule(createValidationRuleRequestDto: CreateValidationRuleRequestDto, authorization?: string, options?: any): AxiosPromise<CreateValidationRuleResponseClass> {
|
|
333
|
+
return localVarFp.createValidationRule(createValidationRuleRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
334
|
+
},
|
|
335
|
+
/**
|
|
336
|
+
* Deletes a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.delete\"
|
|
337
|
+
* @summary Delete the validation rule
|
|
338
|
+
* @param {string} code Unique identifier for the object.
|
|
339
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
340
|
+
* @param {*} [options] Override http request option.
|
|
341
|
+
* @throws {RequiredError}
|
|
342
|
+
*/
|
|
343
|
+
deleteValidationRule(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
344
|
+
return localVarFp.deleteValidationRule(code, authorization, options).then((request) => request(axios, basePath));
|
|
345
|
+
},
|
|
346
|
+
/**
|
|
347
|
+
* Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
348
|
+
* @summary Retrieve the validation rule
|
|
349
|
+
* @param {string} code Unique identifier for the object.
|
|
350
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
351
|
+
* @param {*} [options] Override http request option.
|
|
352
|
+
* @throws {RequiredError}
|
|
353
|
+
*/
|
|
354
|
+
getValidationRule(code: string, authorization?: string, options?: any): AxiosPromise<GetValidationRuleResponseClass> {
|
|
355
|
+
return localVarFp.getValidationRule(code, authorization, options).then((request) => request(axios, basePath));
|
|
356
|
+
},
|
|
357
|
+
/**
|
|
358
|
+
* Lists all validation rules with optional filters **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
359
|
+
* @summary List validation rules
|
|
360
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
361
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
362
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
363
|
+
* @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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
364
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
365
|
+
* @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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt</i>
|
|
366
|
+
* @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/>
|
|
367
|
+
* @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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
368
|
+
* @param {*} [options] Override http request option.
|
|
369
|
+
* @throws {RequiredError}
|
|
370
|
+
*/
|
|
371
|
+
listValidationRules(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListValidationRulesResponseClass> {
|
|
372
|
+
return localVarFp.listValidationRules(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
373
|
+
},
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Request parameters for createValidationRule operation in ValidationRulesApi.
|
|
379
|
+
* @export
|
|
380
|
+
* @interface ValidationRulesApiCreateValidationRuleRequest
|
|
381
|
+
*/
|
|
382
|
+
export interface ValidationRulesApiCreateValidationRuleRequest {
|
|
383
|
+
/**
|
|
384
|
+
*
|
|
385
|
+
* @type {CreateValidationRuleRequestDto}
|
|
386
|
+
* @memberof ValidationRulesApiCreateValidationRule
|
|
387
|
+
*/
|
|
388
|
+
readonly createValidationRuleRequestDto: CreateValidationRuleRequestDto
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
392
|
+
* @type {string}
|
|
393
|
+
* @memberof ValidationRulesApiCreateValidationRule
|
|
394
|
+
*/
|
|
395
|
+
readonly authorization?: string
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Request parameters for deleteValidationRule operation in ValidationRulesApi.
|
|
400
|
+
* @export
|
|
401
|
+
* @interface ValidationRulesApiDeleteValidationRuleRequest
|
|
402
|
+
*/
|
|
403
|
+
export interface ValidationRulesApiDeleteValidationRuleRequest {
|
|
404
|
+
/**
|
|
405
|
+
* Unique identifier for the object.
|
|
406
|
+
* @type {string}
|
|
407
|
+
* @memberof ValidationRulesApiDeleteValidationRule
|
|
408
|
+
*/
|
|
409
|
+
readonly code: string
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
413
|
+
* @type {string}
|
|
414
|
+
* @memberof ValidationRulesApiDeleteValidationRule
|
|
415
|
+
*/
|
|
416
|
+
readonly authorization?: string
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Request parameters for getValidationRule operation in ValidationRulesApi.
|
|
421
|
+
* @export
|
|
422
|
+
* @interface ValidationRulesApiGetValidationRuleRequest
|
|
423
|
+
*/
|
|
424
|
+
export interface ValidationRulesApiGetValidationRuleRequest {
|
|
425
|
+
/**
|
|
426
|
+
* Unique identifier for the object.
|
|
427
|
+
* @type {string}
|
|
428
|
+
* @memberof ValidationRulesApiGetValidationRule
|
|
429
|
+
*/
|
|
430
|
+
readonly code: string
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
434
|
+
* @type {string}
|
|
435
|
+
* @memberof ValidationRulesApiGetValidationRule
|
|
436
|
+
*/
|
|
437
|
+
readonly authorization?: string
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Request parameters for listValidationRules operation in ValidationRulesApi.
|
|
442
|
+
* @export
|
|
443
|
+
* @interface ValidationRulesApiListValidationRulesRequest
|
|
444
|
+
*/
|
|
445
|
+
export interface ValidationRulesApiListValidationRulesRequest {
|
|
446
|
+
/**
|
|
447
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
448
|
+
* @type {string}
|
|
449
|
+
* @memberof ValidationRulesApiListValidationRules
|
|
450
|
+
*/
|
|
451
|
+
readonly authorization?: string
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
455
|
+
* @type {number}
|
|
456
|
+
* @memberof ValidationRulesApiListValidationRules
|
|
457
|
+
*/
|
|
458
|
+
readonly pageSize?: number
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
462
|
+
* @type {string}
|
|
463
|
+
* @memberof ValidationRulesApiListValidationRules
|
|
464
|
+
*/
|
|
465
|
+
readonly pageToken?: string
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* 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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
469
|
+
* @type {string}
|
|
470
|
+
* @memberof ValidationRulesApiListValidationRules
|
|
471
|
+
*/
|
|
472
|
+
readonly filter?: string
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* To search the list by any field, pass search=xxx to fetch the result.
|
|
476
|
+
* @type {string}
|
|
477
|
+
* @memberof ValidationRulesApiListValidationRules
|
|
478
|
+
*/
|
|
479
|
+
readonly search?: string
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* 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: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt</i>
|
|
483
|
+
* @type {string}
|
|
484
|
+
* @memberof ValidationRulesApiListValidationRules
|
|
485
|
+
*/
|
|
486
|
+
readonly order?: string
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* 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/>
|
|
490
|
+
* @type {string}
|
|
491
|
+
* @memberof ValidationRulesApiListValidationRules
|
|
492
|
+
*/
|
|
493
|
+
readonly expand?: string
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, slug, entityType, productSlug, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
497
|
+
* @type {string}
|
|
498
|
+
* @memberof ValidationRulesApiListValidationRules
|
|
499
|
+
*/
|
|
500
|
+
readonly filters?: string
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* ValidationRulesApi - object-oriented interface
|
|
505
|
+
* @export
|
|
506
|
+
* @class ValidationRulesApi
|
|
507
|
+
* @extends {BaseAPI}
|
|
508
|
+
*/
|
|
509
|
+
export class ValidationRulesApi extends BaseAPI {
|
|
510
|
+
/**
|
|
511
|
+
* Creates a new validation rule **Required Permissions** \"validation-rules-management.validation-rules.create\"
|
|
512
|
+
* @summary Create the validation rule
|
|
513
|
+
* @param {ValidationRulesApiCreateValidationRuleRequest} requestParameters Request parameters.
|
|
514
|
+
* @param {*} [options] Override http request option.
|
|
515
|
+
* @throws {RequiredError}
|
|
516
|
+
* @memberof ValidationRulesApi
|
|
517
|
+
*/
|
|
518
|
+
public createValidationRule(requestParameters: ValidationRulesApiCreateValidationRuleRequest, options?: AxiosRequestConfig) {
|
|
519
|
+
return ValidationRulesApiFp(this.configuration).createValidationRule(requestParameters.createValidationRuleRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Deletes a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.delete\"
|
|
524
|
+
* @summary Delete the validation rule
|
|
525
|
+
* @param {ValidationRulesApiDeleteValidationRuleRequest} requestParameters Request parameters.
|
|
526
|
+
* @param {*} [options] Override http request option.
|
|
527
|
+
* @throws {RequiredError}
|
|
528
|
+
* @memberof ValidationRulesApi
|
|
529
|
+
*/
|
|
530
|
+
public deleteValidationRule(requestParameters: ValidationRulesApiDeleteValidationRuleRequest, options?: AxiosRequestConfig) {
|
|
531
|
+
return ValidationRulesApiFp(this.configuration).deleteValidationRule(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
536
|
+
* @summary Retrieve the validation rule
|
|
537
|
+
* @param {ValidationRulesApiGetValidationRuleRequest} requestParameters Request parameters.
|
|
538
|
+
* @param {*} [options] Override http request option.
|
|
539
|
+
* @throws {RequiredError}
|
|
540
|
+
* @memberof ValidationRulesApi
|
|
541
|
+
*/
|
|
542
|
+
public getValidationRule(requestParameters: ValidationRulesApiGetValidationRuleRequest, options?: AxiosRequestConfig) {
|
|
543
|
+
return ValidationRulesApiFp(this.configuration).getValidationRule(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Lists all validation rules with optional filters **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
548
|
+
* @summary List validation rules
|
|
549
|
+
* @param {ValidationRulesApiListValidationRulesRequest} requestParameters Request parameters.
|
|
550
|
+
* @param {*} [options] Override http request option.
|
|
551
|
+
* @throws {RequiredError}
|
|
552
|
+
* @memberof ValidationRulesApi
|
|
553
|
+
*/
|
|
554
|
+
public listValidationRules(requestParameters: ValidationRulesApiListValidationRulesRequest = {}, options?: AxiosRequestConfig) {
|
|
555
|
+
return ValidationRulesApiFp(this.configuration).listValidationRules(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
556
|
+
}
|
|
557
|
+
}
|
package/api.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL Validation Rules Service
|
|
5
|
+
* The EMIL Validation Rules Service 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 { Configuration } from './configuration';
|
|
17
|
+
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
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
|
+
import { HealthChecksApi } from './api';
|
|
24
|
+
import { InvestigationBlocksApi } from './api';
|
|
25
|
+
import { ValidationRulesApi } from './api';
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export * from './api/health-checks-api';
|
|
29
|
+
export * from './api/investigation-blocks-api';
|
|
30
|
+
export * from './api/validation-rules-api';
|
|
31
|
+
|