@emilgroup/partner-sdk 1.22.1-beta.1 → 1.22.1-beta.10

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 (53) hide show
  1. package/.openapi-generator/FILES +9 -1
  2. package/README.md +2 -2
  3. package/api/blacklist-api.ts +662 -0
  4. package/api/blacklist-reasons-api.ts +23 -6
  5. package/api/{default-api.ts → health-api.ts} +13 -13
  6. package/api.ts +4 -2
  7. package/dist/api/blacklist-api.d.ts +375 -0
  8. package/dist/api/blacklist-api.js +629 -0
  9. package/dist/api/blacklist-reasons-api.d.ts +13 -3
  10. package/dist/api/blacklist-reasons-api.js +13 -6
  11. package/dist/api/{default-api.d.ts → health-api.d.ts} +10 -10
  12. package/dist/api/{default-api.js → health-api.js} +22 -22
  13. package/dist/api.d.ts +2 -1
  14. package/dist/api.js +2 -1
  15. package/dist/models/blacklist-item-class.d.ts +78 -0
  16. package/dist/models/blacklist-item-class.js +15 -0
  17. package/dist/models/create-blacklist-item-request-dto.d.ts +36 -0
  18. package/dist/models/create-blacklist-item-request-dto.js +15 -0
  19. package/dist/models/create-blacklist-item-response-class.d.ts +25 -0
  20. package/dist/models/create-blacklist-item-response-class.js +15 -0
  21. package/dist/models/get-blacklist-item-response-class.d.ts +25 -0
  22. package/dist/models/get-blacklist-item-response-class.js +15 -0
  23. package/dist/models/index.d.ts +7 -0
  24. package/dist/models/index.js +7 -0
  25. package/dist/models/is-blacklisted-response-class.d.ts +54 -0
  26. package/dist/models/is-blacklisted-response-class.js +15 -0
  27. package/dist/models/list-blacklist-items-response-class.d.ts +43 -0
  28. package/dist/models/list-blacklist-items-response-class.js +15 -0
  29. package/dist/models/list-partner-relation-class.d.ts +18 -6
  30. package/dist/models/list-partner-relation-types-class.d.ts +18 -6
  31. package/dist/models/list-partner-types-response-class.d.ts +18 -6
  32. package/dist/models/list-partner-versions-response-class.d.ts +18 -6
  33. package/dist/models/list-partners-response-class.d.ts +18 -6
  34. package/dist/models/list-related-partners-response-class.d.ts +18 -6
  35. package/dist/models/list-tags-response-class.d.ts +18 -6
  36. package/dist/models/update-blacklist-reason-status-request-dto.d.ts +24 -0
  37. package/dist/models/update-blacklist-reason-status-request-dto.js +15 -0
  38. package/models/blacklist-item-class.ts +84 -0
  39. package/models/create-blacklist-item-request-dto.ts +42 -0
  40. package/models/create-blacklist-item-response-class.ts +31 -0
  41. package/models/get-blacklist-item-response-class.ts +31 -0
  42. package/models/index.ts +7 -0
  43. package/models/is-blacklisted-response-class.ts +60 -0
  44. package/models/list-blacklist-items-response-class.ts +49 -0
  45. package/models/list-partner-relation-class.ts +18 -6
  46. package/models/list-partner-relation-types-class.ts +18 -6
  47. package/models/list-partner-types-response-class.ts +18 -6
  48. package/models/list-partner-versions-response-class.ts +18 -6
  49. package/models/list-partners-response-class.ts +18 -6
  50. package/models/list-related-partners-response-class.ts +18 -6
  51. package/models/list-tags-response-class.ts +18 -6
  52. package/models/update-blacklist-reason-status-request-dto.ts +30 -0
  53. package/package.json +1 -1
@@ -0,0 +1,629 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL PartnerService
6
+ * The EMIL PartnerService 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.BlacklistApi = exports.BlacklistApiFactory = exports.BlacklistApiFp = exports.BlacklistApiAxiosParamCreator = 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
+ * BlacklistApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var BlacklistApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * Add a partner to the blacklist. **Required Permissions** \"partner-management.partners.create\"
97
+ * @summary Create the blacklist item
98
+ * @param {CreateBlacklistItemRequestDto} createBlacklistItemRequestDto
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
+ createBlacklistItem: function (createBlacklistItemRequestDto, 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 'createBlacklistItemRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createBlacklistItem', 'createBlacklistItemRequestDto', createBlacklistItemRequestDto);
112
+ localVarPath = "/partnerservice/v1/partner-blacklist";
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)(createBlacklistItemRequestDto, localVarRequestOptions, configuration);
136
+ return [2 /*return*/, {
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ }];
140
+ }
141
+ });
142
+ });
143
+ },
144
+ /**
145
+ * Permanently deletes the blacklist item. Supply the unique code that was returned when you created the blacklist item and this will delete it. **Required Permissions** \"partner-management.partners.delete\"
146
+ * @summary Delete the blacklist item
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
+ deleteBlacklistItem: 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)('deleteBlacklistItem', 'code', code);
161
+ localVarPath = "/partnerservice/v1/partner-blacklist/{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 the details of the blacklist item that was previously created. Supply the unique blacklist item code that was returned when you created it and Emil Api will return the corresponding blacklist item information. **Required Permissions** \"partner-management.partners.view\"
194
+ * @summary Retrieve the blacklist item
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
+ getBlacklistItem: 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)('getBlacklistItem', 'code', code);
209
+ localVarPath = "/partnerservice/v1/partner-blacklist/{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
+ * Retrieves the details of the blacklist item that was previously created. Supply the unique blacklist item code that was returned when you created it and Emil Api will return the corresponding blacklist item information. **Required Permissions** \"partner-management.partners.view\"
242
+ * @summary Check if a partner is blacklisted
243
+ * @param {string} partnerCode
244
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ isBlacklisted: function (partnerCode, authorization, options) {
249
+ if (options === void 0) { options = {}; }
250
+ return __awaiter(_this, void 0, void 0, function () {
251
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
252
+ return __generator(this, function (_a) {
253
+ switch (_a.label) {
254
+ case 0:
255
+ // verify required parameter 'partnerCode' is not null or undefined
256
+ (0, common_1.assertParamExists)('isBlacklisted', 'partnerCode', partnerCode);
257
+ localVarPath = "/partnerservice/v1/partner-blacklist/by-partner/{partnerCode}"
258
+ .replace("{".concat("partnerCode", "}"), encodeURIComponent(String(partnerCode)));
259
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
260
+ if (configuration) {
261
+ baseOptions = configuration.baseOptions;
262
+ baseAccessToken = configuration.accessToken;
263
+ }
264
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
265
+ localVarHeaderParameter = {};
266
+ localVarQueryParameter = {};
267
+ // authentication bearer required
268
+ // http bearer authentication required
269
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
270
+ case 1:
271
+ // authentication bearer required
272
+ // http bearer authentication required
273
+ _a.sent();
274
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
275
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
276
+ }
277
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
278
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
279
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
280
+ return [2 /*return*/, {
281
+ url: (0, common_1.toPathString)(localVarUrlObj),
282
+ options: localVarRequestOptions,
283
+ }];
284
+ }
285
+ });
286
+ });
287
+ },
288
+ /**
289
+ * Returns a list of blacklist-items you have previously created. The blacklist-items are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"partner-management.partners.view\"
290
+ * @summary List blacklist-items
291
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
292
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
293
+ * @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.
294
+ * @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: code, partnerCode, reasonCode, blockedFrom&lt;/i&gt;
295
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
296
+ * @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: code, partnerCode, reasonCode, blockedFrom, createdAt, updatedAt&lt;/i&gt;
297
+ * @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;
298
+ * @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: code, partnerCode, reasonCode, blockedFrom&lt;/i&gt;
299
+ * @param {*} [options] Override http request option.
300
+ * @throws {RequiredError}
301
+ */
302
+ listBlacklistItems: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, 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
+ localVarPath = "/partnerservice/v1/partner-blacklist";
310
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
311
+ if (configuration) {
312
+ baseOptions = configuration.baseOptions;
313
+ baseAccessToken = configuration.accessToken;
314
+ }
315
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
316
+ localVarHeaderParameter = {};
317
+ localVarQueryParameter = {};
318
+ // authentication bearer required
319
+ // http bearer authentication required
320
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
321
+ case 1:
322
+ // authentication bearer required
323
+ // http bearer authentication required
324
+ _a.sent();
325
+ if (pageSize !== undefined) {
326
+ localVarQueryParameter['pageSize'] = pageSize;
327
+ }
328
+ if (pageToken !== undefined) {
329
+ localVarQueryParameter['pageToken'] = pageToken;
330
+ }
331
+ if (filter !== undefined) {
332
+ localVarQueryParameter['filter'] = filter;
333
+ }
334
+ if (search !== undefined) {
335
+ localVarQueryParameter['search'] = search;
336
+ }
337
+ if (order !== undefined) {
338
+ localVarQueryParameter['order'] = order;
339
+ }
340
+ if (expand !== undefined) {
341
+ localVarQueryParameter['expand'] = expand;
342
+ }
343
+ if (filters !== undefined) {
344
+ localVarQueryParameter['filters'] = filters;
345
+ }
346
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
347
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
348
+ }
349
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
350
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
351
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
352
+ return [2 /*return*/, {
353
+ url: (0, common_1.toPathString)(localVarUrlObj),
354
+ options: localVarRequestOptions,
355
+ }];
356
+ }
357
+ });
358
+ });
359
+ },
360
+ };
361
+ };
362
+ exports.BlacklistApiAxiosParamCreator = BlacklistApiAxiosParamCreator;
363
+ /**
364
+ * BlacklistApi - functional programming interface
365
+ * @export
366
+ */
367
+ var BlacklistApiFp = function (configuration) {
368
+ var localVarAxiosParamCreator = (0, exports.BlacklistApiAxiosParamCreator)(configuration);
369
+ return {
370
+ /**
371
+ * Add a partner to the blacklist. **Required Permissions** \"partner-management.partners.create\"
372
+ * @summary Create the blacklist item
373
+ * @param {CreateBlacklistItemRequestDto} createBlacklistItemRequestDto
374
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ */
378
+ createBlacklistItem: function (createBlacklistItemRequestDto, authorization, options) {
379
+ return __awaiter(this, void 0, void 0, function () {
380
+ var localVarAxiosArgs;
381
+ return __generator(this, function (_a) {
382
+ switch (_a.label) {
383
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createBlacklistItem(createBlacklistItemRequestDto, authorization, options)];
384
+ case 1:
385
+ localVarAxiosArgs = _a.sent();
386
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
387
+ }
388
+ });
389
+ });
390
+ },
391
+ /**
392
+ * Permanently deletes the blacklist item. Supply the unique code that was returned when you created the blacklist item and this will delete it. **Required Permissions** \"partner-management.partners.delete\"
393
+ * @summary Delete the blacklist item
394
+ * @param {string} code Unique identifier for the object.
395
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
396
+ * @param {*} [options] Override http request option.
397
+ * @throws {RequiredError}
398
+ */
399
+ deleteBlacklistItem: function (code, authorization, 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.deleteBlacklistItem(code, authorization, 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
+ * Retrieves the details of the blacklist item that was previously created. Supply the unique blacklist item code that was returned when you created it and Emil Api will return the corresponding blacklist item information. **Required Permissions** \"partner-management.partners.view\"
414
+ * @summary Retrieve the blacklist item
415
+ * @param {string} code Unique identifier for the object.
416
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
417
+ * @param {*} [options] Override http request option.
418
+ * @throws {RequiredError}
419
+ */
420
+ getBlacklistItem: function (code, authorization, options) {
421
+ return __awaiter(this, void 0, void 0, function () {
422
+ var localVarAxiosArgs;
423
+ return __generator(this, function (_a) {
424
+ switch (_a.label) {
425
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getBlacklistItem(code, authorization, options)];
426
+ case 1:
427
+ localVarAxiosArgs = _a.sent();
428
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
429
+ }
430
+ });
431
+ });
432
+ },
433
+ /**
434
+ * Retrieves the details of the blacklist item that was previously created. Supply the unique blacklist item code that was returned when you created it and Emil Api will return the corresponding blacklist item information. **Required Permissions** \"partner-management.partners.view\"
435
+ * @summary Check if a partner is blacklisted
436
+ * @param {string} partnerCode
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
+ isBlacklisted: function (partnerCode, authorization, options) {
442
+ return __awaiter(this, void 0, void 0, function () {
443
+ var localVarAxiosArgs;
444
+ return __generator(this, function (_a) {
445
+ switch (_a.label) {
446
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.isBlacklisted(partnerCode, authorization, options)];
447
+ case 1:
448
+ localVarAxiosArgs = _a.sent();
449
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
450
+ }
451
+ });
452
+ });
453
+ },
454
+ /**
455
+ * Returns a list of blacklist-items you have previously created. The blacklist-items are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"partner-management.partners.view\"
456
+ * @summary List blacklist-items
457
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
458
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
459
+ * @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.
460
+ * @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: code, partnerCode, reasonCode, blockedFrom&lt;/i&gt;
461
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
462
+ * @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: code, partnerCode, reasonCode, blockedFrom, createdAt, updatedAt&lt;/i&gt;
463
+ * @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;
464
+ * @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: code, partnerCode, reasonCode, blockedFrom&lt;/i&gt;
465
+ * @param {*} [options] Override http request option.
466
+ * @throws {RequiredError}
467
+ */
468
+ listBlacklistItems: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
469
+ return __awaiter(this, void 0, void 0, function () {
470
+ var localVarAxiosArgs;
471
+ return __generator(this, function (_a) {
472
+ switch (_a.label) {
473
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listBlacklistItems(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
474
+ case 1:
475
+ localVarAxiosArgs = _a.sent();
476
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
477
+ }
478
+ });
479
+ });
480
+ },
481
+ };
482
+ };
483
+ exports.BlacklistApiFp = BlacklistApiFp;
484
+ /**
485
+ * BlacklistApi - factory interface
486
+ * @export
487
+ */
488
+ var BlacklistApiFactory = function (configuration, basePath, axios) {
489
+ var localVarFp = (0, exports.BlacklistApiFp)(configuration);
490
+ return {
491
+ /**
492
+ * Add a partner to the blacklist. **Required Permissions** \"partner-management.partners.create\"
493
+ * @summary Create the blacklist item
494
+ * @param {CreateBlacklistItemRequestDto} createBlacklistItemRequestDto
495
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
496
+ * @param {*} [options] Override http request option.
497
+ * @throws {RequiredError}
498
+ */
499
+ createBlacklistItem: function (createBlacklistItemRequestDto, authorization, options) {
500
+ return localVarFp.createBlacklistItem(createBlacklistItemRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
501
+ },
502
+ /**
503
+ * Permanently deletes the blacklist item. Supply the unique code that was returned when you created the blacklist item and this will delete it. **Required Permissions** \"partner-management.partners.delete\"
504
+ * @summary Delete the blacklist item
505
+ * @param {string} code Unique identifier for the object.
506
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
507
+ * @param {*} [options] Override http request option.
508
+ * @throws {RequiredError}
509
+ */
510
+ deleteBlacklistItem: function (code, authorization, options) {
511
+ return localVarFp.deleteBlacklistItem(code, authorization, options).then(function (request) { return request(axios, basePath); });
512
+ },
513
+ /**
514
+ * Retrieves the details of the blacklist item that was previously created. Supply the unique blacklist item code that was returned when you created it and Emil Api will return the corresponding blacklist item information. **Required Permissions** \"partner-management.partners.view\"
515
+ * @summary Retrieve the blacklist item
516
+ * @param {string} code Unique identifier for the object.
517
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ getBlacklistItem: function (code, authorization, options) {
522
+ return localVarFp.getBlacklistItem(code, authorization, options).then(function (request) { return request(axios, basePath); });
523
+ },
524
+ /**
525
+ * Retrieves the details of the blacklist item that was previously created. Supply the unique blacklist item code that was returned when you created it and Emil Api will return the corresponding blacklist item information. **Required Permissions** \"partner-management.partners.view\"
526
+ * @summary Check if a partner is blacklisted
527
+ * @param {string} partnerCode
528
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
529
+ * @param {*} [options] Override http request option.
530
+ * @throws {RequiredError}
531
+ */
532
+ isBlacklisted: function (partnerCode, authorization, options) {
533
+ return localVarFp.isBlacklisted(partnerCode, authorization, options).then(function (request) { return request(axios, basePath); });
534
+ },
535
+ /**
536
+ * Returns a list of blacklist-items you have previously created. The blacklist-items are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"partner-management.partners.view\"
537
+ * @summary List blacklist-items
538
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
539
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
540
+ * @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.
541
+ * @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: code, partnerCode, reasonCode, blockedFrom&lt;/i&gt;
542
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
543
+ * @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: code, partnerCode, reasonCode, blockedFrom, createdAt, updatedAt&lt;/i&gt;
544
+ * @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;
545
+ * @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: code, partnerCode, reasonCode, blockedFrom&lt;/i&gt;
546
+ * @param {*} [options] Override http request option.
547
+ * @throws {RequiredError}
548
+ */
549
+ listBlacklistItems: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
550
+ return localVarFp.listBlacklistItems(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
551
+ },
552
+ };
553
+ };
554
+ exports.BlacklistApiFactory = BlacklistApiFactory;
555
+ /**
556
+ * BlacklistApi - object-oriented interface
557
+ * @export
558
+ * @class BlacklistApi
559
+ * @extends {BaseAPI}
560
+ */
561
+ var BlacklistApi = /** @class */ (function (_super) {
562
+ __extends(BlacklistApi, _super);
563
+ function BlacklistApi() {
564
+ return _super !== null && _super.apply(this, arguments) || this;
565
+ }
566
+ /**
567
+ * Add a partner to the blacklist. **Required Permissions** \"partner-management.partners.create\"
568
+ * @summary Create the blacklist item
569
+ * @param {BlacklistApiCreateBlacklistItemRequest} requestParameters Request parameters.
570
+ * @param {*} [options] Override http request option.
571
+ * @throws {RequiredError}
572
+ * @memberof BlacklistApi
573
+ */
574
+ BlacklistApi.prototype.createBlacklistItem = function (requestParameters, options) {
575
+ var _this = this;
576
+ return (0, exports.BlacklistApiFp)(this.configuration).createBlacklistItem(requestParameters.createBlacklistItemRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
577
+ };
578
+ /**
579
+ * Permanently deletes the blacklist item. Supply the unique code that was returned when you created the blacklist item and this will delete it. **Required Permissions** \"partner-management.partners.delete\"
580
+ * @summary Delete the blacklist item
581
+ * @param {BlacklistApiDeleteBlacklistItemRequest} requestParameters Request parameters.
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ * @memberof BlacklistApi
585
+ */
586
+ BlacklistApi.prototype.deleteBlacklistItem = function (requestParameters, options) {
587
+ var _this = this;
588
+ return (0, exports.BlacklistApiFp)(this.configuration).deleteBlacklistItem(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
589
+ };
590
+ /**
591
+ * Retrieves the details of the blacklist item that was previously created. Supply the unique blacklist item code that was returned when you created it and Emil Api will return the corresponding blacklist item information. **Required Permissions** \"partner-management.partners.view\"
592
+ * @summary Retrieve the blacklist item
593
+ * @param {BlacklistApiGetBlacklistItemRequest} requestParameters Request parameters.
594
+ * @param {*} [options] Override http request option.
595
+ * @throws {RequiredError}
596
+ * @memberof BlacklistApi
597
+ */
598
+ BlacklistApi.prototype.getBlacklistItem = function (requestParameters, options) {
599
+ var _this = this;
600
+ return (0, exports.BlacklistApiFp)(this.configuration).getBlacklistItem(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
601
+ };
602
+ /**
603
+ * Retrieves the details of the blacklist item that was previously created. Supply the unique blacklist item code that was returned when you created it and Emil Api will return the corresponding blacklist item information. **Required Permissions** \"partner-management.partners.view\"
604
+ * @summary Check if a partner is blacklisted
605
+ * @param {BlacklistApiIsBlacklistedRequest} requestParameters Request parameters.
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ * @memberof BlacklistApi
609
+ */
610
+ BlacklistApi.prototype.isBlacklisted = function (requestParameters, options) {
611
+ var _this = this;
612
+ return (0, exports.BlacklistApiFp)(this.configuration).isBlacklisted(requestParameters.partnerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
613
+ };
614
+ /**
615
+ * Returns a list of blacklist-items you have previously created. The blacklist-items are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"partner-management.partners.view\"
616
+ * @summary List blacklist-items
617
+ * @param {BlacklistApiListBlacklistItemsRequest} requestParameters Request parameters.
618
+ * @param {*} [options] Override http request option.
619
+ * @throws {RequiredError}
620
+ * @memberof BlacklistApi
621
+ */
622
+ BlacklistApi.prototype.listBlacklistItems = function (requestParameters, options) {
623
+ var _this = this;
624
+ if (requestParameters === void 0) { requestParameters = {}; }
625
+ return (0, exports.BlacklistApiFp)(this.configuration).listBlacklistItems(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); });
626
+ };
627
+ return BlacklistApi;
628
+ }(base_1.BaseAPI));
629
+ exports.BlacklistApi = BlacklistApi;