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