@emilgroup/validation-rules-sdk-node 1.0.1-beta.0 → 1.0.1-beta.2

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 (54) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +2 -2
  3. package/api/investigation-blocks-api.ts +231 -25
  4. package/api/validation-rules-api.ts +447 -12
  5. package/dist/api/investigation-blocks-api.d.ts +132 -20
  6. package/dist/api/investigation-blocks-api.js +209 -25
  7. package/dist/api/validation-rules-api.d.ts +244 -12
  8. package/dist/api/validation-rules-api.js +383 -9
  9. package/dist/models/cancel-investigation-block-response-class.d.ts +25 -0
  10. package/dist/models/cancel-investigation-block-response-class.js +15 -0
  11. package/dist/models/create-validation-rule-request-dto.d.ts +17 -12
  12. package/dist/models/create-validation-rule-request-dto.js +5 -1
  13. package/dist/models/execute-rule-request-dto.d.ts +41 -0
  14. package/dist/models/execute-rule-request-dto.js +20 -0
  15. package/dist/models/execute-rule-response-class.d.ts +54 -0
  16. package/dist/models/execute-rule-response-class.js +20 -0
  17. package/dist/models/execute-rule-result-class.d.ts +53 -0
  18. package/dist/models/execute-rule-result-class.js +20 -0
  19. package/dist/models/execute-rule-with-dry-run-request-dto.d.ts +30 -0
  20. package/dist/models/execute-rule-with-dry-run-request-dto.js +15 -0
  21. package/dist/models/execute-rule-with-dry-run-response-class.d.ts +36 -0
  22. package/dist/models/execute-rule-with-dry-run-response-class.js +15 -0
  23. package/dist/models/execute-rules-by-type-request-dto.d.ts +35 -0
  24. package/dist/models/execute-rules-by-type-request-dto.js +20 -0
  25. package/dist/models/index.d.ts +10 -0
  26. package/dist/models/index.js +10 -0
  27. package/dist/models/investigation-block-class.d.ts +25 -2
  28. package/dist/models/investigation-block-class.js +10 -0
  29. package/dist/models/resolve-investigation-block-response-class.d.ts +25 -0
  30. package/dist/models/resolve-investigation-block-response-class.js +15 -0
  31. package/dist/models/update-investigation-block-request-dto.d.ts +1 -1
  32. package/dist/models/update-investigation-block-request-dto.js +1 -1
  33. package/dist/models/update-validation-rule-request-dto.d.ts +88 -0
  34. package/dist/models/update-validation-rule-request-dto.js +24 -0
  35. package/dist/models/update-validation-rule-response-class.d.ts +25 -0
  36. package/dist/models/update-validation-rule-response-class.js +15 -0
  37. package/dist/models/validation-rule-class.d.ts +16 -5
  38. package/dist/models/validation-rule-class.js +5 -1
  39. package/models/cancel-investigation-block-response-class.ts +31 -0
  40. package/models/create-validation-rule-request-dto.ts +18 -12
  41. package/models/execute-rule-request-dto.ts +50 -0
  42. package/models/execute-rule-response-class.ts +63 -0
  43. package/models/execute-rule-result-class.ts +62 -0
  44. package/models/execute-rule-with-dry-run-request-dto.ts +36 -0
  45. package/models/execute-rule-with-dry-run-response-class.ts +42 -0
  46. package/models/execute-rules-by-type-request-dto.ts +44 -0
  47. package/models/index.ts +10 -0
  48. package/models/investigation-block-class.ts +29 -2
  49. package/models/resolve-investigation-block-response-class.ts +31 -0
  50. package/models/update-investigation-block-request-dto.ts +1 -1
  51. package/models/update-validation-rule-request-dto.ts +98 -0
  52. package/models/update-validation-rule-response-class.ts +31 -0
  53. package/models/validation-rule-class.ts +17 -5
  54. package/package.json +1 -1
@@ -193,6 +193,153 @@ var ValidationRulesApiAxiosParamCreator = function (configuration) {
193
193
  });
194
194
  });
195
195
  },
196
+ /**
197
+ * Executes all enabled validation rules for a given entity type and entity code **Required Permissions** \"validation-rules-management.validation-rules.view\"
198
+ * @summary Create the execute rule
199
+ * @param {ExecuteRuleRequestDto} executeRuleRequestDto
200
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
201
+ * @param {*} [options] Override http request option.
202
+ * @throws {RequiredError}
203
+ */
204
+ executeRule: function (executeRuleRequestDto, authorization, options) {
205
+ if (options === void 0) { options = {}; }
206
+ return __awaiter(_this, void 0, void 0, function () {
207
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
208
+ return __generator(this, function (_a) {
209
+ switch (_a.label) {
210
+ case 0:
211
+ // verify required parameter 'executeRuleRequestDto' is not null or undefined
212
+ (0, common_1.assertParamExists)('executeRule', 'executeRuleRequestDto', executeRuleRequestDto);
213
+ localVarPath = "/validation-rules-service/v1/validation-rules/execute";
214
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
215
+ if (configuration) {
216
+ baseOptions = configuration.baseOptions;
217
+ baseAccessToken = configuration.accessToken;
218
+ }
219
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
220
+ localVarHeaderParameter = {};
221
+ localVarQueryParameter = {};
222
+ // authentication bearer required
223
+ // http bearer authentication required
224
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
225
+ case 1:
226
+ // authentication bearer required
227
+ // http bearer authentication required
228
+ _a.sent();
229
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
230
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
231
+ }
232
+ localVarHeaderParameter['Content-Type'] = 'application/json';
233
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
234
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
235
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
236
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(executeRuleRequestDto, localVarRequestOptions, configuration);
237
+ return [2 /*return*/, {
238
+ url: (0, common_1.toPathString)(localVarUrlObj),
239
+ options: localVarRequestOptions,
240
+ }];
241
+ }
242
+ });
243
+ });
244
+ },
245
+ /**
246
+ * Tests a FEEL expression against provided sample data **Required Permissions** \"validation-rules-management.validation-rules.view\"
247
+ * @summary Create the test rule
248
+ * @param {ExecuteRuleWithDryRunRequestDto} executeRuleWithDryRunRequestDto
249
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ executeRuleWithDryRun: function (executeRuleWithDryRunRequestDto, authorization, options) {
254
+ if (options === void 0) { options = {}; }
255
+ return __awaiter(_this, void 0, void 0, function () {
256
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
257
+ return __generator(this, function (_a) {
258
+ switch (_a.label) {
259
+ case 0:
260
+ // verify required parameter 'executeRuleWithDryRunRequestDto' is not null or undefined
261
+ (0, common_1.assertParamExists)('executeRuleWithDryRun', 'executeRuleWithDryRunRequestDto', executeRuleWithDryRunRequestDto);
262
+ localVarPath = "/validation-rules-service/v1/validation-rules/test";
263
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
264
+ if (configuration) {
265
+ baseOptions = configuration.baseOptions;
266
+ baseAccessToken = configuration.accessToken;
267
+ }
268
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
269
+ localVarHeaderParameter = {};
270
+ localVarQueryParameter = {};
271
+ // authentication bearer required
272
+ // http bearer authentication required
273
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
274
+ case 1:
275
+ // authentication bearer required
276
+ // http bearer authentication required
277
+ _a.sent();
278
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
279
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
280
+ }
281
+ localVarHeaderParameter['Content-Type'] = 'application/json';
282
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
283
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
284
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
285
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(executeRuleWithDryRunRequestDto, localVarRequestOptions, configuration);
286
+ return [2 /*return*/, {
287
+ url: (0, common_1.toPathString)(localVarUrlObj),
288
+ options: localVarRequestOptions,
289
+ }];
290
+ }
291
+ });
292
+ });
293
+ },
294
+ /**
295
+ * Executes all enabled validation rules matching a given entity type and product version **Required Permissions** \"validation-rules-management.validation-rules.view\"
296
+ * @summary Create the execute rules by type
297
+ * @param {ExecuteRulesByTypeRequestDto} executeRulesByTypeRequestDto
298
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
299
+ * @param {*} [options] Override http request option.
300
+ * @throws {RequiredError}
301
+ */
302
+ executeRulesByType: function (executeRulesByTypeRequestDto, authorization, options) {
303
+ if (options === void 0) { options = {}; }
304
+ return __awaiter(_this, void 0, void 0, function () {
305
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
306
+ return __generator(this, function (_a) {
307
+ switch (_a.label) {
308
+ case 0:
309
+ // verify required parameter 'executeRulesByTypeRequestDto' is not null or undefined
310
+ (0, common_1.assertParamExists)('executeRulesByType', 'executeRulesByTypeRequestDto', executeRulesByTypeRequestDto);
311
+ localVarPath = "/validation-rules-service/v1/validation-rules/execute/by-type";
312
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
313
+ if (configuration) {
314
+ baseOptions = configuration.baseOptions;
315
+ baseAccessToken = configuration.accessToken;
316
+ }
317
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
318
+ localVarHeaderParameter = {};
319
+ localVarQueryParameter = {};
320
+ // authentication bearer required
321
+ // http bearer authentication required
322
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
323
+ case 1:
324
+ // authentication bearer required
325
+ // http bearer authentication required
326
+ _a.sent();
327
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
328
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
329
+ }
330
+ localVarHeaderParameter['Content-Type'] = 'application/json';
331
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
332
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
333
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
334
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(executeRulesByTypeRequestDto, localVarRequestOptions, configuration);
335
+ return [2 /*return*/, {
336
+ url: (0, common_1.toPathString)(localVarUrlObj),
337
+ options: localVarRequestOptions,
338
+ }];
339
+ }
340
+ });
341
+ });
342
+ },
196
343
  /**
197
344
  * Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
198
345
  * @summary Retrieve the validation rule
@@ -247,11 +394,11 @@ var ValidationRulesApiAxiosParamCreator = function (configuration) {
247
394
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
248
395
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
249
396
  * @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.
250
- * @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>
397
+ * @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, productVersionId, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
251
398
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
252
- * @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>
399
+ * @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, productVersionId, severity, isEnabled, createdAt, updatedAt</i>
253
400
  * @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/>
254
- * @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>
401
+ * @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, productVersionId, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
255
402
  * @param {*} [options] Override http request option.
256
403
  * @throws {RequiredError}
257
404
  */
@@ -313,6 +460,58 @@ var ValidationRulesApiAxiosParamCreator = function (configuration) {
313
460
  });
314
461
  });
315
462
  },
463
+ /**
464
+ * undefined **Required Permissions** \"validation-rules-management.validation-rules.update\"
465
+ * @param {string} code
466
+ * @param {UpdateValidationRuleRequestDto} updateValidationRuleRequestDto
467
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
468
+ * @param {*} [options] Override http request option.
469
+ * @throws {RequiredError}
470
+ */
471
+ updateValidationRule: function (code, updateValidationRuleRequestDto, authorization, options) {
472
+ if (options === void 0) { options = {}; }
473
+ return __awaiter(_this, void 0, void 0, function () {
474
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
475
+ return __generator(this, function (_a) {
476
+ switch (_a.label) {
477
+ case 0:
478
+ // verify required parameter 'code' is not null or undefined
479
+ (0, common_1.assertParamExists)('updateValidationRule', 'code', code);
480
+ // verify required parameter 'updateValidationRuleRequestDto' is not null or undefined
481
+ (0, common_1.assertParamExists)('updateValidationRule', 'updateValidationRuleRequestDto', updateValidationRuleRequestDto);
482
+ localVarPath = "/validation-rules-service/v1/validation-rules/{code}"
483
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
484
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
485
+ if (configuration) {
486
+ baseOptions = configuration.baseOptions;
487
+ baseAccessToken = configuration.accessToken;
488
+ }
489
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
490
+ localVarHeaderParameter = {};
491
+ localVarQueryParameter = {};
492
+ // authentication bearer required
493
+ // http bearer authentication required
494
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
495
+ case 1:
496
+ // authentication bearer required
497
+ // http bearer authentication required
498
+ _a.sent();
499
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
500
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
501
+ }
502
+ localVarHeaderParameter['Content-Type'] = 'application/json';
503
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
504
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
505
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
506
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateValidationRuleRequestDto, localVarRequestOptions, configuration);
507
+ return [2 /*return*/, {
508
+ url: (0, common_1.toPathString)(localVarUrlObj),
509
+ options: localVarRequestOptions,
510
+ }];
511
+ }
512
+ });
513
+ });
514
+ },
316
515
  };
317
516
  };
318
517
  exports.ValidationRulesApiAxiosParamCreator = ValidationRulesApiAxiosParamCreator;
@@ -365,6 +564,69 @@ var ValidationRulesApiFp = function (configuration) {
365
564
  });
366
565
  });
367
566
  },
567
+ /**
568
+ * Executes all enabled validation rules for a given entity type and entity code **Required Permissions** \"validation-rules-management.validation-rules.view\"
569
+ * @summary Create the execute rule
570
+ * @param {ExecuteRuleRequestDto} executeRuleRequestDto
571
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
572
+ * @param {*} [options] Override http request option.
573
+ * @throws {RequiredError}
574
+ */
575
+ executeRule: function (executeRuleRequestDto, authorization, options) {
576
+ return __awaiter(this, void 0, void 0, function () {
577
+ var localVarAxiosArgs;
578
+ return __generator(this, function (_a) {
579
+ switch (_a.label) {
580
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.executeRule(executeRuleRequestDto, authorization, options)];
581
+ case 1:
582
+ localVarAxiosArgs = _a.sent();
583
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
584
+ }
585
+ });
586
+ });
587
+ },
588
+ /**
589
+ * Tests a FEEL expression against provided sample data **Required Permissions** \"validation-rules-management.validation-rules.view\"
590
+ * @summary Create the test rule
591
+ * @param {ExecuteRuleWithDryRunRequestDto} executeRuleWithDryRunRequestDto
592
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
593
+ * @param {*} [options] Override http request option.
594
+ * @throws {RequiredError}
595
+ */
596
+ executeRuleWithDryRun: function (executeRuleWithDryRunRequestDto, authorization, options) {
597
+ return __awaiter(this, void 0, void 0, function () {
598
+ var localVarAxiosArgs;
599
+ return __generator(this, function (_a) {
600
+ switch (_a.label) {
601
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.executeRuleWithDryRun(executeRuleWithDryRunRequestDto, authorization, options)];
602
+ case 1:
603
+ localVarAxiosArgs = _a.sent();
604
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
605
+ }
606
+ });
607
+ });
608
+ },
609
+ /**
610
+ * Executes all enabled validation rules matching a given entity type and product version **Required Permissions** \"validation-rules-management.validation-rules.view\"
611
+ * @summary Create the execute rules by type
612
+ * @param {ExecuteRulesByTypeRequestDto} executeRulesByTypeRequestDto
613
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
614
+ * @param {*} [options] Override http request option.
615
+ * @throws {RequiredError}
616
+ */
617
+ executeRulesByType: function (executeRulesByTypeRequestDto, authorization, options) {
618
+ return __awaiter(this, void 0, void 0, function () {
619
+ var localVarAxiosArgs;
620
+ return __generator(this, function (_a) {
621
+ switch (_a.label) {
622
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.executeRulesByType(executeRulesByTypeRequestDto, authorization, options)];
623
+ case 1:
624
+ localVarAxiosArgs = _a.sent();
625
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
626
+ }
627
+ });
628
+ });
629
+ },
368
630
  /**
369
631
  * Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
370
632
  * @summary Retrieve the validation rule
@@ -392,11 +654,11 @@ var ValidationRulesApiFp = function (configuration) {
392
654
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
393
655
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
394
656
  * @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.
395
- * @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>
657
+ * @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, productVersionId, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
396
658
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
397
- * @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>
659
+ * @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, productVersionId, severity, isEnabled, createdAt, updatedAt</i>
398
660
  * @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/>
399
- * @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>
661
+ * @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, productVersionId, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
400
662
  * @param {*} [options] Override http request option.
401
663
  * @throws {RequiredError}
402
664
  */
@@ -413,6 +675,27 @@ var ValidationRulesApiFp = function (configuration) {
413
675
  });
414
676
  });
415
677
  },
678
+ /**
679
+ * undefined **Required Permissions** \"validation-rules-management.validation-rules.update\"
680
+ * @param {string} code
681
+ * @param {UpdateValidationRuleRequestDto} updateValidationRuleRequestDto
682
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
683
+ * @param {*} [options] Override http request option.
684
+ * @throws {RequiredError}
685
+ */
686
+ updateValidationRule: function (code, updateValidationRuleRequestDto, authorization, options) {
687
+ return __awaiter(this, void 0, void 0, function () {
688
+ var localVarAxiosArgs;
689
+ return __generator(this, function (_a) {
690
+ switch (_a.label) {
691
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateValidationRule(code, updateValidationRuleRequestDto, authorization, options)];
692
+ case 1:
693
+ localVarAxiosArgs = _a.sent();
694
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
695
+ }
696
+ });
697
+ });
698
+ },
416
699
  };
417
700
  };
418
701
  exports.ValidationRulesApiFp = ValidationRulesApiFp;
@@ -445,6 +728,39 @@ var ValidationRulesApiFactory = function (configuration, basePath, axios) {
445
728
  deleteValidationRule: function (code, authorization, options) {
446
729
  return localVarFp.deleteValidationRule(code, authorization, options).then(function (request) { return request(axios, basePath); });
447
730
  },
731
+ /**
732
+ * Executes all enabled validation rules for a given entity type and entity code **Required Permissions** \"validation-rules-management.validation-rules.view\"
733
+ * @summary Create the execute rule
734
+ * @param {ExecuteRuleRequestDto} executeRuleRequestDto
735
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
736
+ * @param {*} [options] Override http request option.
737
+ * @throws {RequiredError}
738
+ */
739
+ executeRule: function (executeRuleRequestDto, authorization, options) {
740
+ return localVarFp.executeRule(executeRuleRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
741
+ },
742
+ /**
743
+ * Tests a FEEL expression against provided sample data **Required Permissions** \"validation-rules-management.validation-rules.view\"
744
+ * @summary Create the test rule
745
+ * @param {ExecuteRuleWithDryRunRequestDto} executeRuleWithDryRunRequestDto
746
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
747
+ * @param {*} [options] Override http request option.
748
+ * @throws {RequiredError}
749
+ */
750
+ executeRuleWithDryRun: function (executeRuleWithDryRunRequestDto, authorization, options) {
751
+ return localVarFp.executeRuleWithDryRun(executeRuleWithDryRunRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
752
+ },
753
+ /**
754
+ * Executes all enabled validation rules matching a given entity type and product version **Required Permissions** \"validation-rules-management.validation-rules.view\"
755
+ * @summary Create the execute rules by type
756
+ * @param {ExecuteRulesByTypeRequestDto} executeRulesByTypeRequestDto
757
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
758
+ * @param {*} [options] Override http request option.
759
+ * @throws {RequiredError}
760
+ */
761
+ executeRulesByType: function (executeRulesByTypeRequestDto, authorization, options) {
762
+ return localVarFp.executeRulesByType(executeRulesByTypeRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
763
+ },
448
764
  /**
449
765
  * Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
450
766
  * @summary Retrieve the validation rule
@@ -462,17 +778,28 @@ var ValidationRulesApiFactory = function (configuration, basePath, axios) {
462
778
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
463
779
  * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
464
780
  * @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.
465
- * @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>
781
+ * @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, productVersionId, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
466
782
  * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
467
- * @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>
783
+ * @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, productVersionId, severity, isEnabled, createdAt, updatedAt</i>
468
784
  * @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/>
469
- * @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>
785
+ * @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, productVersionId, productVersionCode, severity, isEnabled, createdAt, updatedAt, createdBy, updatedBy</i>
470
786
  * @param {*} [options] Override http request option.
471
787
  * @throws {RequiredError}
472
788
  */
473
789
  listValidationRules: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
474
790
  return localVarFp.listValidationRules(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
475
791
  },
792
+ /**
793
+ * undefined **Required Permissions** \"validation-rules-management.validation-rules.update\"
794
+ * @param {string} code
795
+ * @param {UpdateValidationRuleRequestDto} updateValidationRuleRequestDto
796
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
797
+ * @param {*} [options] Override http request option.
798
+ * @throws {RequiredError}
799
+ */
800
+ updateValidationRule: function (code, updateValidationRuleRequestDto, authorization, options) {
801
+ return localVarFp.updateValidationRule(code, updateValidationRuleRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
802
+ },
476
803
  };
477
804
  };
478
805
  exports.ValidationRulesApiFactory = ValidationRulesApiFactory;
@@ -511,6 +838,42 @@ var ValidationRulesApi = /** @class */ (function (_super) {
511
838
  var _this = this;
512
839
  return (0, exports.ValidationRulesApiFp)(this.configuration).deleteValidationRule(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
513
840
  };
841
+ /**
842
+ * Executes all enabled validation rules for a given entity type and entity code **Required Permissions** \"validation-rules-management.validation-rules.view\"
843
+ * @summary Create the execute rule
844
+ * @param {ValidationRulesApiExecuteRuleRequest} requestParameters Request parameters.
845
+ * @param {*} [options] Override http request option.
846
+ * @throws {RequiredError}
847
+ * @memberof ValidationRulesApi
848
+ */
849
+ ValidationRulesApi.prototype.executeRule = function (requestParameters, options) {
850
+ var _this = this;
851
+ return (0, exports.ValidationRulesApiFp)(this.configuration).executeRule(requestParameters.executeRuleRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
852
+ };
853
+ /**
854
+ * Tests a FEEL expression against provided sample data **Required Permissions** \"validation-rules-management.validation-rules.view\"
855
+ * @summary Create the test rule
856
+ * @param {ValidationRulesApiExecuteRuleWithDryRunRequest} requestParameters Request parameters.
857
+ * @param {*} [options] Override http request option.
858
+ * @throws {RequiredError}
859
+ * @memberof ValidationRulesApi
860
+ */
861
+ ValidationRulesApi.prototype.executeRuleWithDryRun = function (requestParameters, options) {
862
+ var _this = this;
863
+ return (0, exports.ValidationRulesApiFp)(this.configuration).executeRuleWithDryRun(requestParameters.executeRuleWithDryRunRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
864
+ };
865
+ /**
866
+ * Executes all enabled validation rules matching a given entity type and product version **Required Permissions** \"validation-rules-management.validation-rules.view\"
867
+ * @summary Create the execute rules by type
868
+ * @param {ValidationRulesApiExecuteRulesByTypeRequest} requestParameters Request parameters.
869
+ * @param {*} [options] Override http request option.
870
+ * @throws {RequiredError}
871
+ * @memberof ValidationRulesApi
872
+ */
873
+ ValidationRulesApi.prototype.executeRulesByType = function (requestParameters, options) {
874
+ var _this = this;
875
+ return (0, exports.ValidationRulesApiFp)(this.configuration).executeRulesByType(requestParameters.executeRulesByTypeRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
876
+ };
514
877
  /**
515
878
  * Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
516
879
  * @summary Retrieve the validation rule
@@ -536,6 +899,17 @@ var ValidationRulesApi = /** @class */ (function (_super) {
536
899
  if (requestParameters === void 0) { requestParameters = {}; }
537
900
  return (0, exports.ValidationRulesApiFp)(this.configuration).listValidationRules(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
538
901
  };
902
+ /**
903
+ * undefined **Required Permissions** \"validation-rules-management.validation-rules.update\"
904
+ * @param {ValidationRulesApiUpdateValidationRuleRequest} requestParameters Request parameters.
905
+ * @param {*} [options] Override http request option.
906
+ * @throws {RequiredError}
907
+ * @memberof ValidationRulesApi
908
+ */
909
+ ValidationRulesApi.prototype.updateValidationRule = function (requestParameters, options) {
910
+ var _this = this;
911
+ return (0, exports.ValidationRulesApiFp)(this.configuration).updateValidationRule(requestParameters.code, requestParameters.updateValidationRuleRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
912
+ };
539
913
  return ValidationRulesApi;
540
914
  }(base_1.BaseAPI));
541
915
  exports.ValidationRulesApi = ValidationRulesApi;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * EMIL Validation Rules Service
3
+ * The EMIL Validation Rules Service API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { InvestigationBlockClass } from './investigation-block-class';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface CancelInvestigationBlockResponseClass
17
+ */
18
+ export interface CancelInvestigationBlockResponseClass {
19
+ /**
20
+ * investigationBlock
21
+ * @type {InvestigationBlockClass}
22
+ * @memberof CancelInvestigationBlockResponseClass
23
+ */
24
+ 'investigationBlock'?: InvestigationBlockClass;
25
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Validation Rules Service
6
+ * The EMIL Validation Rules Service API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -16,29 +16,29 @@
16
16
  */
17
17
  export interface CreateValidationRuleRequestDto {
18
18
  /**
19
- * Unique rule identifier
19
+ * Human-readable unique identifier
20
20
  * @type {string}
21
21
  * @memberof CreateValidationRuleRequestDto
22
22
  */
23
- 'code': string;
23
+ 'slug': string;
24
24
  /**
25
- * Human-readable unique identifier
25
+ * Root entity type this rule applies to
26
26
  * @type {string}
27
27
  * @memberof CreateValidationRuleRequestDto
28
28
  */
29
- 'slug': string;
29
+ 'entityType': CreateValidationRuleRequestDtoEntityTypeEnum;
30
30
  /**
31
- * Entity type this rule applies to
31
+ * Product slug this rule belongs to
32
32
  * @type {string}
33
33
  * @memberof CreateValidationRuleRequestDto
34
34
  */
35
- 'entityType': string;
35
+ 'productSlug': string;
36
36
  /**
37
- * Product version code; product_slug is derived from this
38
- * @type {string}
37
+ * Product version ID
38
+ * @type {number}
39
39
  * @memberof CreateValidationRuleRequestDto
40
40
  */
41
- 'productVersionCode': string;
41
+ 'productVersionId': number;
42
42
  /**
43
43
  * Human-readable message shown when rule triggers
44
44
  * @type {string}
@@ -58,11 +58,11 @@ export interface CreateValidationRuleRequestDto {
58
58
  */
59
59
  'severity': CreateValidationRuleRequestDtoSeverityEnum;
60
60
  /**
61
- * JsonLogic expression for rule evaluation
62
- * @type {object}
61
+ * FEEL expression for rule evaluation
62
+ * @type {string}
63
63
  * @memberof CreateValidationRuleRequestDto
64
64
  */
65
- 'expression'?: object;
65
+ 'expression': string;
66
66
  /**
67
67
  * Related entities to load for evaluation
68
68
  * @type {Array<string>}
@@ -76,6 +76,11 @@ export interface CreateValidationRuleRequestDto {
76
76
  */
77
77
  'isEnabled'?: boolean;
78
78
  }
79
+ export declare const CreateValidationRuleRequestDtoEntityTypeEnum: {
80
+ readonly Policy: "Policy";
81
+ readonly Claim: "Claim";
82
+ };
83
+ export type CreateValidationRuleRequestDtoEntityTypeEnum = typeof CreateValidationRuleRequestDtoEntityTypeEnum[keyof typeof CreateValidationRuleRequestDtoEntityTypeEnum];
79
84
  export declare const CreateValidationRuleRequestDtoSeverityEnum: {
80
85
  readonly Warning: "Warning";
81
86
  readonly Error: "Error";
@@ -13,7 +13,11 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CreateValidationRuleRequestDtoSeverityEnum = void 0;
16
+ exports.CreateValidationRuleRequestDtoSeverityEnum = exports.CreateValidationRuleRequestDtoEntityTypeEnum = void 0;
17
+ exports.CreateValidationRuleRequestDtoEntityTypeEnum = {
18
+ Policy: 'Policy',
19
+ Claim: 'Claim'
20
+ };
17
21
  exports.CreateValidationRuleRequestDtoSeverityEnum = {
18
22
  Warning: 'Warning',
19
23
  Error: 'Error'
@@ -0,0 +1,41 @@
1
+ /**
2
+ * EMIL Validation Rules Service
3
+ * The EMIL Validation Rules Service API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface ExecuteRuleRequestDto
16
+ */
17
+ export interface ExecuteRuleRequestDto {
18
+ /**
19
+ * Code of the validation rule to execute
20
+ * @type {string}
21
+ * @memberof ExecuteRuleRequestDto
22
+ */
23
+ 'ruleCode': string;
24
+ /**
25
+ * Entity type to validate
26
+ * @type {string}
27
+ * @memberof ExecuteRuleRequestDto
28
+ */
29
+ 'entityType': ExecuteRuleRequestDtoEntityTypeEnum;
30
+ /**
31
+ * Code of the entity to validate
32
+ * @type {string}
33
+ * @memberof ExecuteRuleRequestDto
34
+ */
35
+ 'entityCode': string;
36
+ }
37
+ export declare const ExecuteRuleRequestDtoEntityTypeEnum: {
38
+ readonly Policy: "Policy";
39
+ readonly Claim: "Claim";
40
+ };
41
+ export type ExecuteRuleRequestDtoEntityTypeEnum = typeof ExecuteRuleRequestDtoEntityTypeEnum[keyof typeof ExecuteRuleRequestDtoEntityTypeEnum];