@emilgroup/partner-sdk-node 1.22.1-beta.6 → 1.22.1-beta.8

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 (71) hide show
  1. package/.openapi-generator/FILES +16 -1
  2. package/README.md +2 -2
  3. package/api/blacklist-api.ts +666 -0
  4. package/api/blacklist-reasons-api.ts +784 -0
  5. package/api/{default-api.ts → health-api.ts} +13 -13
  6. package/api.ts +6 -2
  7. package/dist/api/blacklist-api.d.ts +375 -0
  8. package/dist/api/blacklist-api.js +633 -0
  9. package/dist/api/blacklist-reasons-api.d.ts +440 -0
  10. package/dist/api/blacklist-reasons-api.js +732 -0
  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 +3 -1
  14. package/dist/api.js +3 -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/blacklist-reason-class.d.ts +78 -0
  18. package/dist/models/blacklist-reason-class.js +15 -0
  19. package/dist/models/create-blacklist-item-request-dto.d.ts +36 -0
  20. package/dist/models/create-blacklist-item-request-dto.js +15 -0
  21. package/dist/models/create-blacklist-item-response-class.d.ts +25 -0
  22. package/dist/models/create-blacklist-item-response-class.js +15 -0
  23. package/dist/models/create-blacklist-reason-request-dto.d.ts +36 -0
  24. package/dist/models/create-blacklist-reason-request-dto.js +15 -0
  25. package/dist/models/create-blacklist-reason-response-class.d.ts +25 -0
  26. package/dist/models/create-blacklist-reason-response-class.js +15 -0
  27. package/dist/models/get-blacklist-item-response-class.d.ts +25 -0
  28. package/dist/models/get-blacklist-item-response-class.js +15 -0
  29. package/dist/models/get-blacklist-reason-response-class.d.ts +25 -0
  30. package/dist/models/get-blacklist-reason-response-class.js +15 -0
  31. package/dist/models/index.d.ts +13 -0
  32. package/dist/models/index.js +13 -0
  33. package/dist/models/is-blacklisted-response-class.d.ts +54 -0
  34. package/dist/models/is-blacklisted-response-class.js +15 -0
  35. package/dist/models/list-blacklist-items-response-class.d.ts +43 -0
  36. package/dist/models/list-blacklist-items-response-class.js +15 -0
  37. package/dist/models/list-blacklist-reasons-response-class.d.ts +43 -0
  38. package/dist/models/list-blacklist-reasons-response-class.js +15 -0
  39. package/dist/models/list-partner-relation-class.d.ts +18 -6
  40. package/dist/models/list-partner-relation-types-class.d.ts +18 -6
  41. package/dist/models/list-partner-types-response-class.d.ts +18 -6
  42. package/dist/models/list-partner-versions-response-class.d.ts +18 -6
  43. package/dist/models/list-partners-response-class.d.ts +18 -6
  44. package/dist/models/list-related-partners-response-class.d.ts +18 -6
  45. package/dist/models/list-tags-response-class.d.ts +18 -6
  46. package/dist/models/update-blacklist-reason-request-dto.d.ts +30 -0
  47. package/dist/models/update-blacklist-reason-request-dto.js +15 -0
  48. package/dist/models/update-blacklist-reason-response-class.d.ts +25 -0
  49. package/dist/models/update-blacklist-reason-response-class.js +15 -0
  50. package/models/blacklist-item-class.ts +84 -0
  51. package/models/blacklist-reason-class.ts +84 -0
  52. package/models/create-blacklist-item-request-dto.ts +42 -0
  53. package/models/create-blacklist-item-response-class.ts +31 -0
  54. package/models/create-blacklist-reason-request-dto.ts +42 -0
  55. package/models/create-blacklist-reason-response-class.ts +31 -0
  56. package/models/get-blacklist-item-response-class.ts +31 -0
  57. package/models/get-blacklist-reason-response-class.ts +31 -0
  58. package/models/index.ts +13 -0
  59. package/models/is-blacklisted-response-class.ts +60 -0
  60. package/models/list-blacklist-items-response-class.ts +49 -0
  61. package/models/list-blacklist-reasons-response-class.ts +49 -0
  62. package/models/list-partner-relation-class.ts +18 -6
  63. package/models/list-partner-relation-types-class.ts +18 -6
  64. package/models/list-partner-types-response-class.ts +18 -6
  65. package/models/list-partner-versions-response-class.ts +18 -6
  66. package/models/list-partners-response-class.ts +18 -6
  67. package/models/list-related-partners-response-class.ts +18 -6
  68. package/models/list-tags-response-class.ts +18 -6
  69. package/models/update-blacklist-reason-request-dto.ts +36 -0
  70. package/models/update-blacklist-reason-response-class.ts +31 -0
  71. package/package.json +1 -1
@@ -0,0 +1,633 @@
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
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * BlacklistApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var BlacklistApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * Add a partner to the blacklist. **Required Permissions** \"partner-management.partners.create\"
101
+ * @summary Create the blacklist item
102
+ * @param {CreateBlacklistItemRequestDto} createBlacklistItemRequestDto
103
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ createBlacklistItem: function (createBlacklistItemRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'createBlacklistItemRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('createBlacklistItem', 'createBlacklistItemRequestDto', createBlacklistItemRequestDto);
116
+ localVarPath = "/partnerservice/v1/partner-blacklist";
117
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createBlacklistItemRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
148
+ /**
149
+ * 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\"
150
+ * @summary Delete the blacklist item
151
+ * @param {string} code Unique identifier for the object.
152
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ deleteBlacklistItem: function (code, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'code' is not null or undefined
164
+ (0, common_1.assertParamExists)('deleteBlacklistItem', 'code', code);
165
+ localVarPath = "/partnerservice/v1/partner-blacklist/{code}"
166
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
167
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ baseAccessToken = configuration.accessToken;
171
+ }
172
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
173
+ localVarHeaderParameter = {};
174
+ localVarQueryParameter = {};
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
178
+ case 1:
179
+ // authentication bearer required
180
+ // http bearer authentication required
181
+ _a.sent();
182
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
184
+ }
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ return [2 /*return*/, {
189
+ url: (0, common_1.toPathString)(localVarUrlObj),
190
+ options: localVarRequestOptions,
191
+ }];
192
+ }
193
+ });
194
+ });
195
+ },
196
+ /**
197
+ * 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\"
198
+ * @summary Retrieve the blacklist item
199
+ * @param {string} code Unique identifier for the object.
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
+ getBlacklistItem: function (code, 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 'code' is not null or undefined
212
+ (0, common_1.assertParamExists)('getBlacklistItem', 'code', code);
213
+ localVarPath = "/partnerservice/v1/partner-blacklist/{code}"
214
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
215
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
216
+ if (configuration) {
217
+ baseOptions = configuration.baseOptions;
218
+ baseAccessToken = configuration.accessToken;
219
+ }
220
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
221
+ localVarHeaderParameter = {};
222
+ localVarQueryParameter = {};
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
226
+ case 1:
227
+ // authentication bearer required
228
+ // http bearer authentication required
229
+ _a.sent();
230
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
232
+ }
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
+ return [2 /*return*/, {
237
+ url: (0, common_1.toPathString)(localVarUrlObj),
238
+ options: localVarRequestOptions,
239
+ }];
240
+ }
241
+ });
242
+ });
243
+ },
244
+ /**
245
+ * 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\"
246
+ * @summary Check if a partner is blacklisted
247
+ * @param {string} partnerCode
248
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
249
+ * @param {*} [options] Override http request option.
250
+ * @throws {RequiredError}
251
+ */
252
+ isBlacklisted: function (partnerCode, authorization, options) {
253
+ if (options === void 0) { options = {}; }
254
+ return __awaiter(_this, void 0, void 0, function () {
255
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
256
+ return __generator(this, function (_a) {
257
+ switch (_a.label) {
258
+ case 0:
259
+ // verify required parameter 'partnerCode' is not null or undefined
260
+ (0, common_1.assertParamExists)('isBlacklisted', 'partnerCode', partnerCode);
261
+ localVarPath = "/partnerservice/v1/partner-blacklist/by-partner/{partnerCode}"
262
+ .replace("{".concat("partnerCode", "}"), encodeURIComponent(String(partnerCode)));
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: 'GET' }, 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
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
282
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
283
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
284
+ return [2 /*return*/, {
285
+ url: (0, common_1.toPathString)(localVarUrlObj),
286
+ options: localVarRequestOptions,
287
+ }];
288
+ }
289
+ });
290
+ });
291
+ },
292
+ /**
293
+ * 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\"
294
+ * @summary List blacklist-items
295
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
296
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
297
+ * @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.
298
+ * @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;
299
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
300
+ * @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;
301
+ * @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;
302
+ * @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;
303
+ * @param {*} [options] Override http request option.
304
+ * @throws {RequiredError}
305
+ */
306
+ listBlacklistItems: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
307
+ if (options === void 0) { options = {}; }
308
+ return __awaiter(_this, void 0, void 0, function () {
309
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
310
+ return __generator(this, function (_a) {
311
+ switch (_a.label) {
312
+ case 0:
313
+ localVarPath = "/partnerservice/v1/partner-blacklist";
314
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
315
+ if (configuration) {
316
+ baseOptions = configuration.baseOptions;
317
+ baseAccessToken = configuration.accessToken;
318
+ }
319
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
320
+ localVarHeaderParameter = {};
321
+ localVarQueryParameter = {};
322
+ // authentication bearer required
323
+ // http bearer authentication required
324
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
325
+ case 1:
326
+ // authentication bearer required
327
+ // http bearer authentication required
328
+ _a.sent();
329
+ if (pageSize !== undefined) {
330
+ localVarQueryParameter['pageSize'] = pageSize;
331
+ }
332
+ if (pageToken !== undefined) {
333
+ localVarQueryParameter['pageToken'] = pageToken;
334
+ }
335
+ if (filter !== undefined) {
336
+ localVarQueryParameter['filter'] = filter;
337
+ }
338
+ if (search !== undefined) {
339
+ localVarQueryParameter['search'] = search;
340
+ }
341
+ if (order !== undefined) {
342
+ localVarQueryParameter['order'] = order;
343
+ }
344
+ if (expand !== undefined) {
345
+ localVarQueryParameter['expand'] = expand;
346
+ }
347
+ if (filters !== undefined) {
348
+ localVarQueryParameter['filters'] = filters;
349
+ }
350
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
351
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
352
+ }
353
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
354
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
355
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
356
+ return [2 /*return*/, {
357
+ url: (0, common_1.toPathString)(localVarUrlObj),
358
+ options: localVarRequestOptions,
359
+ }];
360
+ }
361
+ });
362
+ });
363
+ },
364
+ };
365
+ };
366
+ exports.BlacklistApiAxiosParamCreator = BlacklistApiAxiosParamCreator;
367
+ /**
368
+ * BlacklistApi - functional programming interface
369
+ * @export
370
+ */
371
+ var BlacklistApiFp = function (configuration) {
372
+ var localVarAxiosParamCreator = (0, exports.BlacklistApiAxiosParamCreator)(configuration);
373
+ return {
374
+ /**
375
+ * Add a partner to the blacklist. **Required Permissions** \"partner-management.partners.create\"
376
+ * @summary Create the blacklist item
377
+ * @param {CreateBlacklistItemRequestDto} createBlacklistItemRequestDto
378
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
379
+ * @param {*} [options] Override http request option.
380
+ * @throws {RequiredError}
381
+ */
382
+ createBlacklistItem: function (createBlacklistItemRequestDto, authorization, options) {
383
+ return __awaiter(this, void 0, void 0, function () {
384
+ var localVarAxiosArgs;
385
+ return __generator(this, function (_a) {
386
+ switch (_a.label) {
387
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createBlacklistItem(createBlacklistItemRequestDto, authorization, options)];
388
+ case 1:
389
+ localVarAxiosArgs = _a.sent();
390
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
391
+ }
392
+ });
393
+ });
394
+ },
395
+ /**
396
+ * 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\"
397
+ * @summary Delete the blacklist item
398
+ * @param {string} code Unique identifier for the object.
399
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ */
403
+ deleteBlacklistItem: function (code, authorization, options) {
404
+ return __awaiter(this, void 0, void 0, function () {
405
+ var localVarAxiosArgs;
406
+ return __generator(this, function (_a) {
407
+ switch (_a.label) {
408
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteBlacklistItem(code, authorization, options)];
409
+ case 1:
410
+ localVarAxiosArgs = _a.sent();
411
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
412
+ }
413
+ });
414
+ });
415
+ },
416
+ /**
417
+ * 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\"
418
+ * @summary Retrieve the blacklist item
419
+ * @param {string} code Unique identifier for the object.
420
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
421
+ * @param {*} [options] Override http request option.
422
+ * @throws {RequiredError}
423
+ */
424
+ getBlacklistItem: function (code, authorization, options) {
425
+ return __awaiter(this, void 0, void 0, function () {
426
+ var localVarAxiosArgs;
427
+ return __generator(this, function (_a) {
428
+ switch (_a.label) {
429
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getBlacklistItem(code, authorization, options)];
430
+ case 1:
431
+ localVarAxiosArgs = _a.sent();
432
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
433
+ }
434
+ });
435
+ });
436
+ },
437
+ /**
438
+ * 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\"
439
+ * @summary Check if a partner is blacklisted
440
+ * @param {string} partnerCode
441
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ isBlacklisted: function (partnerCode, authorization, options) {
446
+ return __awaiter(this, void 0, void 0, function () {
447
+ var localVarAxiosArgs;
448
+ return __generator(this, function (_a) {
449
+ switch (_a.label) {
450
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.isBlacklisted(partnerCode, authorization, options)];
451
+ case 1:
452
+ localVarAxiosArgs = _a.sent();
453
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
454
+ }
455
+ });
456
+ });
457
+ },
458
+ /**
459
+ * 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\"
460
+ * @summary List blacklist-items
461
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
462
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
463
+ * @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.
464
+ * @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;
465
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
466
+ * @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;
467
+ * @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;
468
+ * @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;
469
+ * @param {*} [options] Override http request option.
470
+ * @throws {RequiredError}
471
+ */
472
+ listBlacklistItems: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
473
+ return __awaiter(this, void 0, void 0, function () {
474
+ var localVarAxiosArgs;
475
+ return __generator(this, function (_a) {
476
+ switch (_a.label) {
477
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listBlacklistItems(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
478
+ case 1:
479
+ localVarAxiosArgs = _a.sent();
480
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
481
+ }
482
+ });
483
+ });
484
+ },
485
+ };
486
+ };
487
+ exports.BlacklistApiFp = BlacklistApiFp;
488
+ /**
489
+ * BlacklistApi - factory interface
490
+ * @export
491
+ */
492
+ var BlacklistApiFactory = function (configuration, basePath, axios) {
493
+ var localVarFp = (0, exports.BlacklistApiFp)(configuration);
494
+ return {
495
+ /**
496
+ * Add a partner to the blacklist. **Required Permissions** \"partner-management.partners.create\"
497
+ * @summary Create the blacklist item
498
+ * @param {CreateBlacklistItemRequestDto} createBlacklistItemRequestDto
499
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
500
+ * @param {*} [options] Override http request option.
501
+ * @throws {RequiredError}
502
+ */
503
+ createBlacklistItem: function (createBlacklistItemRequestDto, authorization, options) {
504
+ return localVarFp.createBlacklistItem(createBlacklistItemRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
505
+ },
506
+ /**
507
+ * 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\"
508
+ * @summary Delete the blacklist item
509
+ * @param {string} code Unique identifier for the object.
510
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
511
+ * @param {*} [options] Override http request option.
512
+ * @throws {RequiredError}
513
+ */
514
+ deleteBlacklistItem: function (code, authorization, options) {
515
+ return localVarFp.deleteBlacklistItem(code, authorization, options).then(function (request) { return request(axios, basePath); });
516
+ },
517
+ /**
518
+ * 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\"
519
+ * @summary Retrieve the blacklist item
520
+ * @param {string} code Unique identifier for the object.
521
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ */
525
+ getBlacklistItem: function (code, authorization, options) {
526
+ return localVarFp.getBlacklistItem(code, authorization, options).then(function (request) { return request(axios, basePath); });
527
+ },
528
+ /**
529
+ * 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\"
530
+ * @summary Check if a partner is blacklisted
531
+ * @param {string} partnerCode
532
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
533
+ * @param {*} [options] Override http request option.
534
+ * @throws {RequiredError}
535
+ */
536
+ isBlacklisted: function (partnerCode, authorization, options) {
537
+ return localVarFp.isBlacklisted(partnerCode, authorization, options).then(function (request) { return request(axios, basePath); });
538
+ },
539
+ /**
540
+ * 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\"
541
+ * @summary List blacklist-items
542
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
543
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
544
+ * @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.
545
+ * @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;
546
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
547
+ * @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;
548
+ * @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;
549
+ * @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;
550
+ * @param {*} [options] Override http request option.
551
+ * @throws {RequiredError}
552
+ */
553
+ listBlacklistItems: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
554
+ return localVarFp.listBlacklistItems(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
555
+ },
556
+ };
557
+ };
558
+ exports.BlacklistApiFactory = BlacklistApiFactory;
559
+ /**
560
+ * BlacklistApi - object-oriented interface
561
+ * @export
562
+ * @class BlacklistApi
563
+ * @extends {BaseAPI}
564
+ */
565
+ var BlacklistApi = /** @class */ (function (_super) {
566
+ __extends(BlacklistApi, _super);
567
+ function BlacklistApi() {
568
+ return _super !== null && _super.apply(this, arguments) || this;
569
+ }
570
+ /**
571
+ * Add a partner to the blacklist. **Required Permissions** \"partner-management.partners.create\"
572
+ * @summary Create the blacklist item
573
+ * @param {BlacklistApiCreateBlacklistItemRequest} requestParameters Request parameters.
574
+ * @param {*} [options] Override http request option.
575
+ * @throws {RequiredError}
576
+ * @memberof BlacklistApi
577
+ */
578
+ BlacklistApi.prototype.createBlacklistItem = function (requestParameters, options) {
579
+ var _this = this;
580
+ return (0, exports.BlacklistApiFp)(this.configuration).createBlacklistItem(requestParameters.createBlacklistItemRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
581
+ };
582
+ /**
583
+ * 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\"
584
+ * @summary Delete the blacklist item
585
+ * @param {BlacklistApiDeleteBlacklistItemRequest} requestParameters Request parameters.
586
+ * @param {*} [options] Override http request option.
587
+ * @throws {RequiredError}
588
+ * @memberof BlacklistApi
589
+ */
590
+ BlacklistApi.prototype.deleteBlacklistItem = function (requestParameters, options) {
591
+ var _this = this;
592
+ return (0, exports.BlacklistApiFp)(this.configuration).deleteBlacklistItem(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
593
+ };
594
+ /**
595
+ * 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\"
596
+ * @summary Retrieve the blacklist item
597
+ * @param {BlacklistApiGetBlacklistItemRequest} requestParameters Request parameters.
598
+ * @param {*} [options] Override http request option.
599
+ * @throws {RequiredError}
600
+ * @memberof BlacklistApi
601
+ */
602
+ BlacklistApi.prototype.getBlacklistItem = function (requestParameters, options) {
603
+ var _this = this;
604
+ return (0, exports.BlacklistApiFp)(this.configuration).getBlacklistItem(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
605
+ };
606
+ /**
607
+ * 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\"
608
+ * @summary Check if a partner is blacklisted
609
+ * @param {BlacklistApiIsBlacklistedRequest} requestParameters Request parameters.
610
+ * @param {*} [options] Override http request option.
611
+ * @throws {RequiredError}
612
+ * @memberof BlacklistApi
613
+ */
614
+ BlacklistApi.prototype.isBlacklisted = function (requestParameters, options) {
615
+ var _this = this;
616
+ return (0, exports.BlacklistApiFp)(this.configuration).isBlacklisted(requestParameters.partnerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
617
+ };
618
+ /**
619
+ * 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\"
620
+ * @summary List blacklist-items
621
+ * @param {BlacklistApiListBlacklistItemsRequest} requestParameters Request parameters.
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ * @memberof BlacklistApi
625
+ */
626
+ BlacklistApi.prototype.listBlacklistItems = function (requestParameters, options) {
627
+ var _this = this;
628
+ if (requestParameters === void 0) { requestParameters = {}; }
629
+ 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); });
630
+ };
631
+ return BlacklistApi;
632
+ }(base_1.BaseAPI));
633
+ exports.BlacklistApi = BlacklistApi;