@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,537 @@
|
|
|
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
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
+
};
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.ValidationRulesApi = exports.ValidationRulesApiFactory = exports.ValidationRulesApiFp = exports.ValidationRulesApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
/**
|
|
89
|
+
* ValidationRulesApi - axios parameter creator
|
|
90
|
+
* @export
|
|
91
|
+
*/
|
|
92
|
+
var ValidationRulesApiAxiosParamCreator = function (configuration) {
|
|
93
|
+
var _this = this;
|
|
94
|
+
return {
|
|
95
|
+
/**
|
|
96
|
+
* Creates a new validation rule **Required Permissions** \"validation-rules-management.validation-rules.create\"
|
|
97
|
+
* @summary Create the validation rule
|
|
98
|
+
* @param {CreateValidationRuleRequestDto} createValidationRuleRequestDto
|
|
99
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
createValidationRule: function (createValidationRuleRequestDto, authorization, options) {
|
|
104
|
+
if (options === void 0) { options = {}; }
|
|
105
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
106
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
107
|
+
return __generator(this, function (_a) {
|
|
108
|
+
switch (_a.label) {
|
|
109
|
+
case 0:
|
|
110
|
+
// verify required parameter 'createValidationRuleRequestDto' is not null or undefined
|
|
111
|
+
(0, common_1.assertParamExists)('createValidationRule', 'createValidationRuleRequestDto', createValidationRuleRequestDto);
|
|
112
|
+
localVarPath = "/validation-rules-service/v1/validation-rules";
|
|
113
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
114
|
+
if (configuration) {
|
|
115
|
+
baseOptions = configuration.baseOptions;
|
|
116
|
+
baseAccessToken = configuration.accessToken;
|
|
117
|
+
}
|
|
118
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
119
|
+
localVarHeaderParameter = {};
|
|
120
|
+
localVarQueryParameter = {};
|
|
121
|
+
// authentication bearer required
|
|
122
|
+
// http bearer authentication required
|
|
123
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
124
|
+
case 1:
|
|
125
|
+
// authentication bearer required
|
|
126
|
+
// http bearer authentication required
|
|
127
|
+
_a.sent();
|
|
128
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
129
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
130
|
+
}
|
|
131
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
132
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
133
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
134
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
135
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createValidationRuleRequestDto, localVarRequestOptions, configuration);
|
|
136
|
+
return [2 /*return*/, {
|
|
137
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
138
|
+
options: localVarRequestOptions,
|
|
139
|
+
}];
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* Deletes a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.delete\"
|
|
146
|
+
* @summary Delete the validation rule
|
|
147
|
+
* @param {string} code Unique identifier for the object.
|
|
148
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
149
|
+
* @param {*} [options] Override http request option.
|
|
150
|
+
* @throws {RequiredError}
|
|
151
|
+
*/
|
|
152
|
+
deleteValidationRule: function (code, authorization, options) {
|
|
153
|
+
if (options === void 0) { options = {}; }
|
|
154
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
155
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
156
|
+
return __generator(this, function (_a) {
|
|
157
|
+
switch (_a.label) {
|
|
158
|
+
case 0:
|
|
159
|
+
// verify required parameter 'code' is not null or undefined
|
|
160
|
+
(0, common_1.assertParamExists)('deleteValidationRule', 'code', code);
|
|
161
|
+
localVarPath = "/validation-rules-service/v1/validation-rules/{code}"
|
|
162
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
163
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
164
|
+
if (configuration) {
|
|
165
|
+
baseOptions = configuration.baseOptions;
|
|
166
|
+
baseAccessToken = configuration.accessToken;
|
|
167
|
+
}
|
|
168
|
+
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
169
|
+
localVarHeaderParameter = {};
|
|
170
|
+
localVarQueryParameter = {};
|
|
171
|
+
// authentication bearer required
|
|
172
|
+
// http bearer authentication required
|
|
173
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
174
|
+
case 1:
|
|
175
|
+
// authentication bearer required
|
|
176
|
+
// http bearer authentication required
|
|
177
|
+
_a.sent();
|
|
178
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
179
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
180
|
+
}
|
|
181
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
182
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
183
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
184
|
+
return [2 /*return*/, {
|
|
185
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
186
|
+
options: localVarRequestOptions,
|
|
187
|
+
}];
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
194
|
+
* @summary Retrieve the validation rule
|
|
195
|
+
* @param {string} code Unique identifier for the object.
|
|
196
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
197
|
+
* @param {*} [options] Override http request option.
|
|
198
|
+
* @throws {RequiredError}
|
|
199
|
+
*/
|
|
200
|
+
getValidationRule: function (code, authorization, options) {
|
|
201
|
+
if (options === void 0) { options = {}; }
|
|
202
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
203
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
204
|
+
return __generator(this, function (_a) {
|
|
205
|
+
switch (_a.label) {
|
|
206
|
+
case 0:
|
|
207
|
+
// verify required parameter 'code' is not null or undefined
|
|
208
|
+
(0, common_1.assertParamExists)('getValidationRule', 'code', code);
|
|
209
|
+
localVarPath = "/validation-rules-service/v1/validation-rules/{code}"
|
|
210
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
211
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
212
|
+
if (configuration) {
|
|
213
|
+
baseOptions = configuration.baseOptions;
|
|
214
|
+
baseAccessToken = configuration.accessToken;
|
|
215
|
+
}
|
|
216
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
217
|
+
localVarHeaderParameter = {};
|
|
218
|
+
localVarQueryParameter = {};
|
|
219
|
+
// authentication bearer required
|
|
220
|
+
// http bearer authentication required
|
|
221
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
222
|
+
case 1:
|
|
223
|
+
// authentication bearer required
|
|
224
|
+
// http bearer authentication required
|
|
225
|
+
_a.sent();
|
|
226
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
227
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
228
|
+
}
|
|
229
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
230
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
231
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
232
|
+
return [2 /*return*/, {
|
|
233
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
234
|
+
options: localVarRequestOptions,
|
|
235
|
+
}];
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
},
|
|
240
|
+
/**
|
|
241
|
+
* Lists all validation rules with optional filters **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
242
|
+
* @summary List validation rules
|
|
243
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
244
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
245
|
+
* @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.
|
|
246
|
+
* @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>
|
|
247
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
248
|
+
* @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>
|
|
249
|
+
* @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/>
|
|
250
|
+
* @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>
|
|
251
|
+
* @param {*} [options] Override http request option.
|
|
252
|
+
* @throws {RequiredError}
|
|
253
|
+
*/
|
|
254
|
+
listValidationRules: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
255
|
+
if (options === void 0) { options = {}; }
|
|
256
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
257
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
258
|
+
return __generator(this, function (_a) {
|
|
259
|
+
switch (_a.label) {
|
|
260
|
+
case 0:
|
|
261
|
+
localVarPath = "/validation-rules-service/v1/validation-rules";
|
|
262
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
263
|
+
if (configuration) {
|
|
264
|
+
baseOptions = configuration.baseOptions;
|
|
265
|
+
baseAccessToken = configuration.accessToken;
|
|
266
|
+
}
|
|
267
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
268
|
+
localVarHeaderParameter = {};
|
|
269
|
+
localVarQueryParameter = {};
|
|
270
|
+
// authentication bearer required
|
|
271
|
+
// http bearer authentication required
|
|
272
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
273
|
+
case 1:
|
|
274
|
+
// authentication bearer required
|
|
275
|
+
// http bearer authentication required
|
|
276
|
+
_a.sent();
|
|
277
|
+
if (pageSize !== undefined) {
|
|
278
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
279
|
+
}
|
|
280
|
+
if (pageToken !== undefined) {
|
|
281
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
282
|
+
}
|
|
283
|
+
if (filter !== undefined) {
|
|
284
|
+
localVarQueryParameter['filter'] = filter;
|
|
285
|
+
}
|
|
286
|
+
if (search !== undefined) {
|
|
287
|
+
localVarQueryParameter['search'] = search;
|
|
288
|
+
}
|
|
289
|
+
if (order !== undefined) {
|
|
290
|
+
localVarQueryParameter['order'] = order;
|
|
291
|
+
}
|
|
292
|
+
if (expand !== undefined) {
|
|
293
|
+
localVarQueryParameter['expand'] = expand;
|
|
294
|
+
}
|
|
295
|
+
if (filters !== undefined) {
|
|
296
|
+
localVarQueryParameter['filters'] = filters;
|
|
297
|
+
}
|
|
298
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
299
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
300
|
+
}
|
|
301
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
302
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
303
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
304
|
+
return [2 /*return*/, {
|
|
305
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
306
|
+
options: localVarRequestOptions,
|
|
307
|
+
}];
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
},
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
exports.ValidationRulesApiAxiosParamCreator = ValidationRulesApiAxiosParamCreator;
|
|
315
|
+
/**
|
|
316
|
+
* ValidationRulesApi - functional programming interface
|
|
317
|
+
* @export
|
|
318
|
+
*/
|
|
319
|
+
var ValidationRulesApiFp = function (configuration) {
|
|
320
|
+
var localVarAxiosParamCreator = (0, exports.ValidationRulesApiAxiosParamCreator)(configuration);
|
|
321
|
+
return {
|
|
322
|
+
/**
|
|
323
|
+
* Creates a new validation rule **Required Permissions** \"validation-rules-management.validation-rules.create\"
|
|
324
|
+
* @summary Create the validation rule
|
|
325
|
+
* @param {CreateValidationRuleRequestDto} createValidationRuleRequestDto
|
|
326
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
327
|
+
* @param {*} [options] Override http request option.
|
|
328
|
+
* @throws {RequiredError}
|
|
329
|
+
*/
|
|
330
|
+
createValidationRule: function (createValidationRuleRequestDto, authorization, options) {
|
|
331
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
332
|
+
var localVarAxiosArgs;
|
|
333
|
+
return __generator(this, function (_a) {
|
|
334
|
+
switch (_a.label) {
|
|
335
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createValidationRule(createValidationRuleRequestDto, authorization, options)];
|
|
336
|
+
case 1:
|
|
337
|
+
localVarAxiosArgs = _a.sent();
|
|
338
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
},
|
|
343
|
+
/**
|
|
344
|
+
* Deletes a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.delete\"
|
|
345
|
+
* @summary Delete the validation rule
|
|
346
|
+
* @param {string} code Unique identifier for the object.
|
|
347
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
348
|
+
* @param {*} [options] Override http request option.
|
|
349
|
+
* @throws {RequiredError}
|
|
350
|
+
*/
|
|
351
|
+
deleteValidationRule: function (code, authorization, options) {
|
|
352
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
353
|
+
var localVarAxiosArgs;
|
|
354
|
+
return __generator(this, function (_a) {
|
|
355
|
+
switch (_a.label) {
|
|
356
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteValidationRule(code, authorization, options)];
|
|
357
|
+
case 1:
|
|
358
|
+
localVarAxiosArgs = _a.sent();
|
|
359
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
},
|
|
364
|
+
/**
|
|
365
|
+
* Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
366
|
+
* @summary Retrieve the validation rule
|
|
367
|
+
* @param {string} code Unique identifier for the object.
|
|
368
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
369
|
+
* @param {*} [options] Override http request option.
|
|
370
|
+
* @throws {RequiredError}
|
|
371
|
+
*/
|
|
372
|
+
getValidationRule: function (code, authorization, options) {
|
|
373
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
374
|
+
var localVarAxiosArgs;
|
|
375
|
+
return __generator(this, function (_a) {
|
|
376
|
+
switch (_a.label) {
|
|
377
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getValidationRule(code, authorization, options)];
|
|
378
|
+
case 1:
|
|
379
|
+
localVarAxiosArgs = _a.sent();
|
|
380
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
},
|
|
385
|
+
/**
|
|
386
|
+
* Lists all validation rules with optional filters **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
387
|
+
* @summary List validation rules
|
|
388
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
389
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
390
|
+
* @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.
|
|
391
|
+
* @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>
|
|
392
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
393
|
+
* @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>
|
|
394
|
+
* @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/>
|
|
395
|
+
* @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>
|
|
396
|
+
* @param {*} [options] Override http request option.
|
|
397
|
+
* @throws {RequiredError}
|
|
398
|
+
*/
|
|
399
|
+
listValidationRules: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
400
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
401
|
+
var localVarAxiosArgs;
|
|
402
|
+
return __generator(this, function (_a) {
|
|
403
|
+
switch (_a.label) {
|
|
404
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listValidationRules(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
|
|
405
|
+
case 1:
|
|
406
|
+
localVarAxiosArgs = _a.sent();
|
|
407
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
},
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
exports.ValidationRulesApiFp = ValidationRulesApiFp;
|
|
415
|
+
/**
|
|
416
|
+
* ValidationRulesApi - factory interface
|
|
417
|
+
* @export
|
|
418
|
+
*/
|
|
419
|
+
var ValidationRulesApiFactory = function (configuration, basePath, axios) {
|
|
420
|
+
var localVarFp = (0, exports.ValidationRulesApiFp)(configuration);
|
|
421
|
+
return {
|
|
422
|
+
/**
|
|
423
|
+
* Creates a new validation rule **Required Permissions** \"validation-rules-management.validation-rules.create\"
|
|
424
|
+
* @summary Create the validation rule
|
|
425
|
+
* @param {CreateValidationRuleRequestDto} createValidationRuleRequestDto
|
|
426
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
427
|
+
* @param {*} [options] Override http request option.
|
|
428
|
+
* @throws {RequiredError}
|
|
429
|
+
*/
|
|
430
|
+
createValidationRule: function (createValidationRuleRequestDto, authorization, options) {
|
|
431
|
+
return localVarFp.createValidationRule(createValidationRuleRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
432
|
+
},
|
|
433
|
+
/**
|
|
434
|
+
* Deletes a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.delete\"
|
|
435
|
+
* @summary Delete the validation rule
|
|
436
|
+
* @param {string} code Unique identifier for the object.
|
|
437
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
438
|
+
* @param {*} [options] Override http request option.
|
|
439
|
+
* @throws {RequiredError}
|
|
440
|
+
*/
|
|
441
|
+
deleteValidationRule: function (code, authorization, options) {
|
|
442
|
+
return localVarFp.deleteValidationRule(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
443
|
+
},
|
|
444
|
+
/**
|
|
445
|
+
* Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
446
|
+
* @summary Retrieve the validation rule
|
|
447
|
+
* @param {string} code Unique identifier for the object.
|
|
448
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
449
|
+
* @param {*} [options] Override http request option.
|
|
450
|
+
* @throws {RequiredError}
|
|
451
|
+
*/
|
|
452
|
+
getValidationRule: function (code, authorization, options) {
|
|
453
|
+
return localVarFp.getValidationRule(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
454
|
+
},
|
|
455
|
+
/**
|
|
456
|
+
* Lists all validation rules with optional filters **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
457
|
+
* @summary List validation rules
|
|
458
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
459
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
460
|
+
* @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.
|
|
461
|
+
* @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>
|
|
462
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
463
|
+
* @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>
|
|
464
|
+
* @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/>
|
|
465
|
+
* @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>
|
|
466
|
+
* @param {*} [options] Override http request option.
|
|
467
|
+
* @throws {RequiredError}
|
|
468
|
+
*/
|
|
469
|
+
listValidationRules: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
470
|
+
return localVarFp.listValidationRules(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
471
|
+
},
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
exports.ValidationRulesApiFactory = ValidationRulesApiFactory;
|
|
475
|
+
/**
|
|
476
|
+
* ValidationRulesApi - object-oriented interface
|
|
477
|
+
* @export
|
|
478
|
+
* @class ValidationRulesApi
|
|
479
|
+
* @extends {BaseAPI}
|
|
480
|
+
*/
|
|
481
|
+
var ValidationRulesApi = /** @class */ (function (_super) {
|
|
482
|
+
__extends(ValidationRulesApi, _super);
|
|
483
|
+
function ValidationRulesApi() {
|
|
484
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Creates a new validation rule **Required Permissions** \"validation-rules-management.validation-rules.create\"
|
|
488
|
+
* @summary Create the validation rule
|
|
489
|
+
* @param {ValidationRulesApiCreateValidationRuleRequest} requestParameters Request parameters.
|
|
490
|
+
* @param {*} [options] Override http request option.
|
|
491
|
+
* @throws {RequiredError}
|
|
492
|
+
* @memberof ValidationRulesApi
|
|
493
|
+
*/
|
|
494
|
+
ValidationRulesApi.prototype.createValidationRule = function (requestParameters, options) {
|
|
495
|
+
var _this = this;
|
|
496
|
+
return (0, exports.ValidationRulesApiFp)(this.configuration).createValidationRule(requestParameters.createValidationRuleRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
497
|
+
};
|
|
498
|
+
/**
|
|
499
|
+
* Deletes a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.delete\"
|
|
500
|
+
* @summary Delete the validation rule
|
|
501
|
+
* @param {ValidationRulesApiDeleteValidationRuleRequest} requestParameters Request parameters.
|
|
502
|
+
* @param {*} [options] Override http request option.
|
|
503
|
+
* @throws {RequiredError}
|
|
504
|
+
* @memberof ValidationRulesApi
|
|
505
|
+
*/
|
|
506
|
+
ValidationRulesApi.prototype.deleteValidationRule = function (requestParameters, options) {
|
|
507
|
+
var _this = this;
|
|
508
|
+
return (0, exports.ValidationRulesApiFp)(this.configuration).deleteValidationRule(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
509
|
+
};
|
|
510
|
+
/**
|
|
511
|
+
* Retrieves a validation rule by its code **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
512
|
+
* @summary Retrieve the validation rule
|
|
513
|
+
* @param {ValidationRulesApiGetValidationRuleRequest} requestParameters Request parameters.
|
|
514
|
+
* @param {*} [options] Override http request option.
|
|
515
|
+
* @throws {RequiredError}
|
|
516
|
+
* @memberof ValidationRulesApi
|
|
517
|
+
*/
|
|
518
|
+
ValidationRulesApi.prototype.getValidationRule = function (requestParameters, options) {
|
|
519
|
+
var _this = this;
|
|
520
|
+
return (0, exports.ValidationRulesApiFp)(this.configuration).getValidationRule(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
521
|
+
};
|
|
522
|
+
/**
|
|
523
|
+
* Lists all validation rules with optional filters **Required Permissions** \"validation-rules-management.validation-rules.view\"
|
|
524
|
+
* @summary List validation rules
|
|
525
|
+
* @param {ValidationRulesApiListValidationRulesRequest} requestParameters Request parameters.
|
|
526
|
+
* @param {*} [options] Override http request option.
|
|
527
|
+
* @throws {RequiredError}
|
|
528
|
+
* @memberof ValidationRulesApi
|
|
529
|
+
*/
|
|
530
|
+
ValidationRulesApi.prototype.listValidationRules = function (requestParameters, options) {
|
|
531
|
+
var _this = this;
|
|
532
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
533
|
+
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); });
|
|
534
|
+
};
|
|
535
|
+
return ValidationRulesApi;
|
|
536
|
+
}(base_1.BaseAPI));
|
|
537
|
+
exports.ValidationRulesApi = ValidationRulesApi;
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
export * from './api/health-checks-api';
|
|
13
|
+
export * from './api/investigation-blocks-api';
|
|
14
|
+
export * from './api/validation-rules-api';
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
__exportStar(require("./api/health-checks-api"), exports);
|
|
31
|
+
__exportStar(require("./api/investigation-blocks-api"), exports);
|
|
32
|
+
__exportStar(require("./api/validation-rules-api"), exports);
|