@emilgroup/partner-sdk-node 1.22.1-beta.13 → 1.22.1-beta.15

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 (81) hide show
  1. package/.openapi-generator/FILES +23 -0
  2. package/README.md +2 -2
  3. package/api/partner-hierarchies-api.ts +1346 -0
  4. package/api/partner-hierarchy-nodes-api.ts +1182 -0
  5. package/api/partners-api.ts +12 -12
  6. package/api.ts +4 -0
  7. package/dist/api/partner-hierarchies-api.d.ts +760 -0
  8. package/dist/api/partner-hierarchies-api.js +1168 -0
  9. package/dist/api/partner-hierarchy-nodes-api.d.ts +663 -0
  10. package/dist/api/partner-hierarchy-nodes-api.js +1047 -0
  11. package/dist/api/partners-api.d.ts +12 -12
  12. package/dist/api/partners-api.js +9 -9
  13. package/dist/api.d.ts +2 -0
  14. package/dist/api.js +2 -0
  15. package/dist/models/create-partner-hierarchy-node-request-dto.d.ts +42 -0
  16. package/dist/models/create-partner-hierarchy-node-request-dto.js +15 -0
  17. package/dist/models/create-partner-hierarchy-node-response-class.d.ts +25 -0
  18. package/dist/models/create-partner-hierarchy-node-response-class.js +15 -0
  19. package/dist/models/create-partner-hierarchy-request-dto.d.ts +30 -0
  20. package/dist/models/create-partner-hierarchy-request-dto.js +15 -0
  21. package/dist/models/create-partner-hierarchy-response-class.d.ts +25 -0
  22. package/dist/models/create-partner-hierarchy-response-class.js +15 -0
  23. package/dist/models/get-partner-hierarchy-node-response-class.d.ts +25 -0
  24. package/dist/models/get-partner-hierarchy-node-response-class.js +15 -0
  25. package/dist/models/get-partner-hierarchy-response-class.d.ts +25 -0
  26. package/dist/models/get-partner-hierarchy-response-class.js +15 -0
  27. package/dist/models/get-partner-hierarchy-tree-response-class.d.ts +25 -0
  28. package/dist/models/get-partner-hierarchy-tree-response-class.js +15 -0
  29. package/dist/models/index.d.ts +21 -0
  30. package/dist/models/index.js +21 -0
  31. package/dist/models/list-partner-hierarchies-response-class.d.ts +43 -0
  32. package/dist/models/list-partner-hierarchies-response-class.js +15 -0
  33. package/dist/models/list-partner-hierarchy-node-history-response-class.d.ts +43 -0
  34. package/dist/models/list-partner-hierarchy-node-history-response-class.js +15 -0
  35. package/dist/models/list-partner-hierarchy-nodes-response-class.d.ts +43 -0
  36. package/dist/models/list-partner-hierarchy-nodes-response-class.js +15 -0
  37. package/dist/models/move-partner-hierarchy-node-request-dto.d.ts +30 -0
  38. package/dist/models/move-partner-hierarchy-node-request-dto.js +15 -0
  39. package/dist/models/move-partner-hierarchy-node-response-class.d.ts +25 -0
  40. package/dist/models/move-partner-hierarchy-node-response-class.js +15 -0
  41. package/dist/models/partner-hierarchy-class.d.ts +78 -0
  42. package/dist/models/partner-hierarchy-class.js +15 -0
  43. package/dist/models/partner-hierarchy-node-class.d.ts +109 -0
  44. package/dist/models/partner-hierarchy-node-class.js +15 -0
  45. package/dist/models/partner-hierarchy-node-history-class.d.ts +97 -0
  46. package/dist/models/partner-hierarchy-node-history-class.js +15 -0
  47. package/dist/models/partner-hierarchy-node-tree-class.d.ts +96 -0
  48. package/dist/models/partner-hierarchy-node-tree-class.js +15 -0
  49. package/dist/models/unassign-partner-hierarchy-node-response-class.d.ts +25 -0
  50. package/dist/models/unassign-partner-hierarchy-node-response-class.js +15 -0
  51. package/dist/models/update-partner-hierarchy-node-request-dto.d.ts +30 -0
  52. package/dist/models/update-partner-hierarchy-node-request-dto.js +15 -0
  53. package/dist/models/update-partner-hierarchy-node-response-class.d.ts +25 -0
  54. package/dist/models/update-partner-hierarchy-node-response-class.js +15 -0
  55. package/dist/models/update-partner-hierarchy-request-dto.d.ts +24 -0
  56. package/dist/models/update-partner-hierarchy-request-dto.js +15 -0
  57. package/dist/models/update-partner-hierarchy-response-class.d.ts +25 -0
  58. package/dist/models/update-partner-hierarchy-response-class.js +15 -0
  59. package/models/create-partner-hierarchy-node-request-dto.ts +48 -0
  60. package/models/create-partner-hierarchy-node-response-class.ts +31 -0
  61. package/models/create-partner-hierarchy-request-dto.ts +36 -0
  62. package/models/create-partner-hierarchy-response-class.ts +31 -0
  63. package/models/get-partner-hierarchy-node-response-class.ts +31 -0
  64. package/models/get-partner-hierarchy-response-class.ts +31 -0
  65. package/models/get-partner-hierarchy-tree-response-class.ts +31 -0
  66. package/models/index.ts +21 -0
  67. package/models/list-partner-hierarchies-response-class.ts +49 -0
  68. package/models/list-partner-hierarchy-node-history-response-class.ts +49 -0
  69. package/models/list-partner-hierarchy-nodes-response-class.ts +49 -0
  70. package/models/move-partner-hierarchy-node-request-dto.ts +36 -0
  71. package/models/move-partner-hierarchy-node-response-class.ts +31 -0
  72. package/models/partner-hierarchy-class.ts +84 -0
  73. package/models/partner-hierarchy-node-class.ts +115 -0
  74. package/models/partner-hierarchy-node-history-class.ts +103 -0
  75. package/models/partner-hierarchy-node-tree-class.ts +102 -0
  76. package/models/unassign-partner-hierarchy-node-response-class.ts +31 -0
  77. package/models/update-partner-hierarchy-node-request-dto.ts +36 -0
  78. package/models/update-partner-hierarchy-node-response-class.ts +31 -0
  79. package/models/update-partner-hierarchy-request-dto.ts +30 -0
  80. package/models/update-partner-hierarchy-response-class.ts +31 -0
  81. package/package.json +1 -1
@@ -0,0 +1,1168 @@
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.PartnerHierarchiesApi = exports.PartnerHierarchiesApiFactory = exports.PartnerHierarchiesApiFp = exports.PartnerHierarchiesApiAxiosParamCreator = 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
+ * PartnerHierarchiesApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var PartnerHierarchiesApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * Creates a partner hierarchy from an existing hierarchy type. The hierarchy starts empty, so nodes can be added after it is created. **Required Permissions** \"partner-management.partners.create\"
101
+ * @summary Create the partner hierarchy
102
+ * @param {CreatePartnerHierarchyRequestDto} createPartnerHierarchyRequestDto
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
+ createPartnerHierarchy: function (createPartnerHierarchyRequestDto, 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 'createPartnerHierarchyRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('createPartnerHierarchy', 'createPartnerHierarchyRequestDto', createPartnerHierarchyRequestDto);
116
+ localVarPath = "/partnerservice/v1/partner-hierarchies";
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)(createPartnerHierarchyRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
148
+ /**
149
+ * Deletes a partner hierarchy. The hierarchy must have no nodes before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
150
+ * @summary Delete the partner hierarchy
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
+ deletePartnerHierarchy: 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)('deletePartnerHierarchy', 'code', code);
165
+ localVarPath = "/partnerservice/v1/partner-hierarchies/{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
+ * Returns a pre-signed upload URL for a hierarchy tree file. Use the uploaded file key for tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.update\"
198
+ * @summary Create the partner hierarchy upload url
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
+ generateUploadUrl: 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)('generateUploadUrl', 'code', code);
213
+ localVarPath = "/partnerservice/v1/partner-hierarchies/{code}/upload-url"
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: 'POST' }, 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
+ * Returns the details of one partner hierarchy, including its name and hierarchy type. **Required Permissions** \"partner-management.partners.view\"
246
+ * @summary Retrieve the partner hierarchy
247
+ * @param {string} code Unique identifier for the object.
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
+ getPartnerHierarchy: function (code, 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 'code' is not null or undefined
260
+ (0, common_1.assertParamExists)('getPartnerHierarchy', 'code', code);
261
+ localVarPath = "/partnerservice/v1/partner-hierarchies/{code}"
262
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
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 one part of the hierarchy tree: the selected node and its direct children. If no node is selected, it starts from the top of the hierarchy. **Required Permissions** \"partner-management.partners.view\"
294
+ * @summary Retrieve the partner hierarchy tree
295
+ * @param {string} code Unique identifier for the object.
296
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
297
+ * @param {string} [nodeCode] Node to start from. Omit this to start from the top of the hierarchy.
298
+ * @param {number} [pageSize] Maximum number of direct children to return for the selected node. Default is 30 and the maximum is 50.
299
+ * @param {string} [pageToken] Value returned by the previous response when more children are available.
300
+ * @param {string} [asOf] Shows the hierarchy as it was at this time. Omit this to show the current hierarchy.
301
+ * @param {*} [options] Override http request option.
302
+ * @throws {RequiredError}
303
+ */
304
+ getPartnerHierarchyTree: function (code, authorization, nodeCode, pageSize, pageToken, asOf, options) {
305
+ if (options === void 0) { options = {}; }
306
+ return __awaiter(_this, void 0, void 0, function () {
307
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
308
+ return __generator(this, function (_a) {
309
+ switch (_a.label) {
310
+ case 0:
311
+ // verify required parameter 'code' is not null or undefined
312
+ (0, common_1.assertParamExists)('getPartnerHierarchyTree', 'code', code);
313
+ localVarPath = "/partnerservice/v1/partner-hierarchies/{code}/tree"
314
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
315
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
316
+ if (configuration) {
317
+ baseOptions = configuration.baseOptions;
318
+ baseAccessToken = configuration.accessToken;
319
+ }
320
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
321
+ localVarHeaderParameter = {};
322
+ localVarQueryParameter = {};
323
+ // authentication bearer required
324
+ // http bearer authentication required
325
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
326
+ case 1:
327
+ // authentication bearer required
328
+ // http bearer authentication required
329
+ _a.sent();
330
+ if (nodeCode !== undefined) {
331
+ localVarQueryParameter['nodeCode'] = nodeCode;
332
+ }
333
+ if (pageSize !== undefined) {
334
+ localVarQueryParameter['pageSize'] = pageSize;
335
+ }
336
+ if (pageToken !== undefined) {
337
+ localVarQueryParameter['pageToken'] = pageToken;
338
+ }
339
+ if (asOf !== undefined) {
340
+ localVarQueryParameter['asOf'] = (asOf instanceof Date) ?
341
+ asOf.toISOString() :
342
+ asOf;
343
+ }
344
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
345
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
346
+ }
347
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
348
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
349
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
350
+ return [2 /*return*/, {
351
+ url: (0, common_1.toPathString)(localVarUrlObj),
352
+ options: localVarRequestOptions,
353
+ }];
354
+ }
355
+ });
356
+ });
357
+ },
358
+ /**
359
+ * Returns a download URL for the full hierarchy tree file. If the file is not ready, it starts a tree file build operation; check the operation status and call this endpoint again when it is done. **Required Permissions** \"partner-management.partners.view\"
360
+ * @summary Retrieve the partner hierarchy tree file
361
+ * @param {string} code Unique identifier for the object.
362
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ getPartnerHierarchyTreeFile: function (code, authorization, options) {
367
+ if (options === void 0) { options = {}; }
368
+ return __awaiter(_this, void 0, void 0, function () {
369
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
370
+ return __generator(this, function (_a) {
371
+ switch (_a.label) {
372
+ case 0:
373
+ // verify required parameter 'code' is not null or undefined
374
+ (0, common_1.assertParamExists)('getPartnerHierarchyTreeFile', 'code', code);
375
+ localVarPath = "/partnerservice/v1/partner-hierarchies/{code}/tree/file"
376
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
377
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
378
+ if (configuration) {
379
+ baseOptions = configuration.baseOptions;
380
+ baseAccessToken = configuration.accessToken;
381
+ }
382
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
383
+ localVarHeaderParameter = {};
384
+ localVarQueryParameter = {};
385
+ // authentication bearer required
386
+ // http bearer authentication required
387
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
388
+ case 1:
389
+ // authentication bearer required
390
+ // http bearer authentication required
391
+ _a.sent();
392
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
393
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
394
+ }
395
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
396
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
397
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
398
+ return [2 /*return*/, {
399
+ url: (0, common_1.toPathString)(localVarUrlObj),
400
+ options: localVarRequestOptions,
401
+ }];
402
+ }
403
+ });
404
+ });
405
+ },
406
+ /**
407
+ * Returns a paginated list of partner hierarchies. **Required Permissions** \"partner-management.partners.view\"
408
+ * @summary List partner hierarchies
409
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
410
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
411
+ * @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.
412
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
413
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
414
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, createdAt, updatedAt&lt;/i&gt;
415
+ * @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;
416
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
417
+ * @param {*} [options] Override http request option.
418
+ * @throws {RequiredError}
419
+ */
420
+ listPartnerHierarchies: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
421
+ if (options === void 0) { options = {}; }
422
+ return __awaiter(_this, void 0, void 0, function () {
423
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
424
+ return __generator(this, function (_a) {
425
+ switch (_a.label) {
426
+ case 0:
427
+ localVarPath = "/partnerservice/v1/partner-hierarchies";
428
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
429
+ if (configuration) {
430
+ baseOptions = configuration.baseOptions;
431
+ baseAccessToken = configuration.accessToken;
432
+ }
433
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
434
+ localVarHeaderParameter = {};
435
+ localVarQueryParameter = {};
436
+ // authentication bearer required
437
+ // http bearer authentication required
438
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
439
+ case 1:
440
+ // authentication bearer required
441
+ // http bearer authentication required
442
+ _a.sent();
443
+ if (pageSize !== undefined) {
444
+ localVarQueryParameter['pageSize'] = pageSize;
445
+ }
446
+ if (pageToken !== undefined) {
447
+ localVarQueryParameter['pageToken'] = pageToken;
448
+ }
449
+ if (filter !== undefined) {
450
+ localVarQueryParameter['filter'] = filter;
451
+ }
452
+ if (search !== undefined) {
453
+ localVarQueryParameter['search'] = search;
454
+ }
455
+ if (order !== undefined) {
456
+ localVarQueryParameter['order'] = order;
457
+ }
458
+ if (expand !== undefined) {
459
+ localVarQueryParameter['expand'] = expand;
460
+ }
461
+ if (filters !== undefined) {
462
+ localVarQueryParameter['filters'] = filters;
463
+ }
464
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
465
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
466
+ }
467
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
468
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
469
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
470
+ return [2 /*return*/, {
471
+ url: (0, common_1.toPathString)(localVarUrlObj),
472
+ options: localVarRequestOptions,
473
+ }];
474
+ }
475
+ });
476
+ });
477
+ },
478
+ /**
479
+ * Returns long-running file operations for this hierarchy, such as tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.view\"
480
+ * @summary List partner hierarchy operations
481
+ * @param {any} code Unique identifier for the object.
482
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
483
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
484
+ * @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.
485
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
486
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
487
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, createdAt, updatedAt&lt;/i&gt;
488
+ * @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;
489
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
490
+ * @param {*} [options] Override http request option.
491
+ * @throws {RequiredError}
492
+ */
493
+ listPartnerHierarchyOperations: function (code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
494
+ if (options === void 0) { options = {}; }
495
+ return __awaiter(_this, void 0, void 0, function () {
496
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
497
+ return __generator(this, function (_a) {
498
+ switch (_a.label) {
499
+ case 0:
500
+ // verify required parameter 'code' is not null or undefined
501
+ (0, common_1.assertParamExists)('listPartnerHierarchyOperations', 'code', code);
502
+ localVarPath = "/partnerservice/v1/partner-hierarchies/{code}/operations"
503
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
504
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
505
+ if (configuration) {
506
+ baseOptions = configuration.baseOptions;
507
+ baseAccessToken = configuration.accessToken;
508
+ }
509
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
510
+ localVarHeaderParameter = {};
511
+ localVarQueryParameter = {};
512
+ // authentication bearer required
513
+ // http bearer authentication required
514
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
515
+ case 1:
516
+ // authentication bearer required
517
+ // http bearer authentication required
518
+ _a.sent();
519
+ if (pageSize !== undefined) {
520
+ localVarQueryParameter['pageSize'] = pageSize;
521
+ }
522
+ if (pageToken !== undefined) {
523
+ localVarQueryParameter['pageToken'] = pageToken;
524
+ }
525
+ if (filter !== undefined) {
526
+ localVarQueryParameter['filter'] = filter;
527
+ }
528
+ if (search !== undefined) {
529
+ localVarQueryParameter['search'] = search;
530
+ }
531
+ if (order !== undefined) {
532
+ localVarQueryParameter['order'] = order;
533
+ }
534
+ if (expand !== undefined) {
535
+ localVarQueryParameter['expand'] = expand;
536
+ }
537
+ if (filters !== undefined) {
538
+ localVarQueryParameter['filters'] = filters;
539
+ }
540
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
541
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
542
+ }
543
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
544
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
545
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
546
+ return [2 /*return*/, {
547
+ url: (0, common_1.toPathString)(localVarUrlObj),
548
+ options: localVarRequestOptions,
549
+ }];
550
+ }
551
+ });
552
+ });
553
+ },
554
+ /**
555
+ * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
556
+ * @summary Update the partner hierarchy
557
+ * @param {string} code Unique identifier for the object.
558
+ * @param {UpdatePartnerHierarchyRequestDto} updatePartnerHierarchyRequestDto
559
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
560
+ * @param {*} [options] Override http request option.
561
+ * @throws {RequiredError}
562
+ */
563
+ updatePartnerHierarchy: function (code, updatePartnerHierarchyRequestDto, authorization, options) {
564
+ if (options === void 0) { options = {}; }
565
+ return __awaiter(_this, void 0, void 0, function () {
566
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
567
+ return __generator(this, function (_a) {
568
+ switch (_a.label) {
569
+ case 0:
570
+ // verify required parameter 'code' is not null or undefined
571
+ (0, common_1.assertParamExists)('updatePartnerHierarchy', 'code', code);
572
+ // verify required parameter 'updatePartnerHierarchyRequestDto' is not null or undefined
573
+ (0, common_1.assertParamExists)('updatePartnerHierarchy', 'updatePartnerHierarchyRequestDto', updatePartnerHierarchyRequestDto);
574
+ localVarPath = "/partnerservice/v1/partner-hierarchies/{code}"
575
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
576
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
577
+ if (configuration) {
578
+ baseOptions = configuration.baseOptions;
579
+ baseAccessToken = configuration.accessToken;
580
+ }
581
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
582
+ localVarHeaderParameter = {};
583
+ localVarQueryParameter = {};
584
+ // authentication bearer required
585
+ // http bearer authentication required
586
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
587
+ case 1:
588
+ // authentication bearer required
589
+ // http bearer authentication required
590
+ _a.sent();
591
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
592
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
593
+ }
594
+ localVarHeaderParameter['Content-Type'] = 'application/json';
595
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
596
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
597
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
598
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updatePartnerHierarchyRequestDto, localVarRequestOptions, configuration);
599
+ return [2 /*return*/, {
600
+ url: (0, common_1.toPathString)(localVarUrlObj),
601
+ options: localVarRequestOptions,
602
+ }];
603
+ }
604
+ });
605
+ });
606
+ },
607
+ /**
608
+ * Replaces the hierarchy tree with an uploaded file. **Required Permissions** \"partner-management.partners.update\"
609
+ * @summary Update the partner hierarchy tree
610
+ * @param {string} code Unique identifier for the object.
611
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
612
+ * @param {*} [options] Override http request option.
613
+ * @throws {RequiredError}
614
+ */
615
+ updatePartnerHierarchyTree: function (code, authorization, options) {
616
+ if (options === void 0) { options = {}; }
617
+ return __awaiter(_this, void 0, void 0, function () {
618
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
619
+ return __generator(this, function (_a) {
620
+ switch (_a.label) {
621
+ case 0:
622
+ // verify required parameter 'code' is not null or undefined
623
+ (0, common_1.assertParamExists)('updatePartnerHierarchyTree', 'code', code);
624
+ localVarPath = "/partnerservice/v1/partner-hierarchies/{code}/tree"
625
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
626
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
627
+ if (configuration) {
628
+ baseOptions = configuration.baseOptions;
629
+ baseAccessToken = configuration.accessToken;
630
+ }
631
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
632
+ localVarHeaderParameter = {};
633
+ localVarQueryParameter = {};
634
+ // authentication bearer required
635
+ // http bearer authentication required
636
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
637
+ case 1:
638
+ // authentication bearer required
639
+ // http bearer authentication required
640
+ _a.sent();
641
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
642
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
643
+ }
644
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
645
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
646
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
647
+ return [2 /*return*/, {
648
+ url: (0, common_1.toPathString)(localVarUrlObj),
649
+ options: localVarRequestOptions,
650
+ }];
651
+ }
652
+ });
653
+ });
654
+ },
655
+ };
656
+ };
657
+ exports.PartnerHierarchiesApiAxiosParamCreator = PartnerHierarchiesApiAxiosParamCreator;
658
+ /**
659
+ * PartnerHierarchiesApi - functional programming interface
660
+ * @export
661
+ */
662
+ var PartnerHierarchiesApiFp = function (configuration) {
663
+ var localVarAxiosParamCreator = (0, exports.PartnerHierarchiesApiAxiosParamCreator)(configuration);
664
+ return {
665
+ /**
666
+ * Creates a partner hierarchy from an existing hierarchy type. The hierarchy starts empty, so nodes can be added after it is created. **Required Permissions** \"partner-management.partners.create\"
667
+ * @summary Create the partner hierarchy
668
+ * @param {CreatePartnerHierarchyRequestDto} createPartnerHierarchyRequestDto
669
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
670
+ * @param {*} [options] Override http request option.
671
+ * @throws {RequiredError}
672
+ */
673
+ createPartnerHierarchy: function (createPartnerHierarchyRequestDto, authorization, options) {
674
+ return __awaiter(this, void 0, void 0, function () {
675
+ var localVarAxiosArgs;
676
+ return __generator(this, function (_a) {
677
+ switch (_a.label) {
678
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPartnerHierarchy(createPartnerHierarchyRequestDto, authorization, options)];
679
+ case 1:
680
+ localVarAxiosArgs = _a.sent();
681
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
682
+ }
683
+ });
684
+ });
685
+ },
686
+ /**
687
+ * Deletes a partner hierarchy. The hierarchy must have no nodes before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
688
+ * @summary Delete the partner hierarchy
689
+ * @param {string} code Unique identifier for the object.
690
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
691
+ * @param {*} [options] Override http request option.
692
+ * @throws {RequiredError}
693
+ */
694
+ deletePartnerHierarchy: function (code, authorization, options) {
695
+ return __awaiter(this, void 0, void 0, function () {
696
+ var localVarAxiosArgs;
697
+ return __generator(this, function (_a) {
698
+ switch (_a.label) {
699
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deletePartnerHierarchy(code, authorization, options)];
700
+ case 1:
701
+ localVarAxiosArgs = _a.sent();
702
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
703
+ }
704
+ });
705
+ });
706
+ },
707
+ /**
708
+ * Returns a pre-signed upload URL for a hierarchy tree file. Use the uploaded file key for tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.update\"
709
+ * @summary Create the partner hierarchy upload url
710
+ * @param {string} code Unique identifier for the object.
711
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
712
+ * @param {*} [options] Override http request option.
713
+ * @throws {RequiredError}
714
+ */
715
+ generateUploadUrl: function (code, authorization, options) {
716
+ return __awaiter(this, void 0, void 0, function () {
717
+ var localVarAxiosArgs;
718
+ return __generator(this, function (_a) {
719
+ switch (_a.label) {
720
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.generateUploadUrl(code, authorization, options)];
721
+ case 1:
722
+ localVarAxiosArgs = _a.sent();
723
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
724
+ }
725
+ });
726
+ });
727
+ },
728
+ /**
729
+ * Returns the details of one partner hierarchy, including its name and hierarchy type. **Required Permissions** \"partner-management.partners.view\"
730
+ * @summary Retrieve the partner hierarchy
731
+ * @param {string} code Unique identifier for the object.
732
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
733
+ * @param {*} [options] Override http request option.
734
+ * @throws {RequiredError}
735
+ */
736
+ getPartnerHierarchy: function (code, authorization, options) {
737
+ return __awaiter(this, void 0, void 0, function () {
738
+ var localVarAxiosArgs;
739
+ return __generator(this, function (_a) {
740
+ switch (_a.label) {
741
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPartnerHierarchy(code, authorization, options)];
742
+ case 1:
743
+ localVarAxiosArgs = _a.sent();
744
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
745
+ }
746
+ });
747
+ });
748
+ },
749
+ /**
750
+ * Returns one part of the hierarchy tree: the selected node and its direct children. If no node is selected, it starts from the top of the hierarchy. **Required Permissions** \"partner-management.partners.view\"
751
+ * @summary Retrieve the partner hierarchy tree
752
+ * @param {string} code Unique identifier for the object.
753
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
754
+ * @param {string} [nodeCode] Node to start from. Omit this to start from the top of the hierarchy.
755
+ * @param {number} [pageSize] Maximum number of direct children to return for the selected node. Default is 30 and the maximum is 50.
756
+ * @param {string} [pageToken] Value returned by the previous response when more children are available.
757
+ * @param {string} [asOf] Shows the hierarchy as it was at this time. Omit this to show the current hierarchy.
758
+ * @param {*} [options] Override http request option.
759
+ * @throws {RequiredError}
760
+ */
761
+ getPartnerHierarchyTree: function (code, authorization, nodeCode, pageSize, pageToken, asOf, options) {
762
+ return __awaiter(this, void 0, void 0, function () {
763
+ var localVarAxiosArgs;
764
+ return __generator(this, function (_a) {
765
+ switch (_a.label) {
766
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPartnerHierarchyTree(code, authorization, nodeCode, pageSize, pageToken, asOf, options)];
767
+ case 1:
768
+ localVarAxiosArgs = _a.sent();
769
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
770
+ }
771
+ });
772
+ });
773
+ },
774
+ /**
775
+ * Returns a download URL for the full hierarchy tree file. If the file is not ready, it starts a tree file build operation; check the operation status and call this endpoint again when it is done. **Required Permissions** \"partner-management.partners.view\"
776
+ * @summary Retrieve the partner hierarchy tree file
777
+ * @param {string} code Unique identifier for the object.
778
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
779
+ * @param {*} [options] Override http request option.
780
+ * @throws {RequiredError}
781
+ */
782
+ getPartnerHierarchyTreeFile: function (code, authorization, options) {
783
+ return __awaiter(this, void 0, void 0, function () {
784
+ var localVarAxiosArgs;
785
+ return __generator(this, function (_a) {
786
+ switch (_a.label) {
787
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPartnerHierarchyTreeFile(code, authorization, options)];
788
+ case 1:
789
+ localVarAxiosArgs = _a.sent();
790
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
791
+ }
792
+ });
793
+ });
794
+ },
795
+ /**
796
+ * Returns a paginated list of partner hierarchies. **Required Permissions** \"partner-management.partners.view\"
797
+ * @summary List partner hierarchies
798
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
799
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
800
+ * @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.
801
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
802
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
803
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, createdAt, updatedAt&lt;/i&gt;
804
+ * @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;
805
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
806
+ * @param {*} [options] Override http request option.
807
+ * @throws {RequiredError}
808
+ */
809
+ listPartnerHierarchies: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
810
+ return __awaiter(this, void 0, void 0, function () {
811
+ var localVarAxiosArgs;
812
+ return __generator(this, function (_a) {
813
+ switch (_a.label) {
814
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPartnerHierarchies(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
815
+ case 1:
816
+ localVarAxiosArgs = _a.sent();
817
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
818
+ }
819
+ });
820
+ });
821
+ },
822
+ /**
823
+ * Returns long-running file operations for this hierarchy, such as tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.view\"
824
+ * @summary List partner hierarchy operations
825
+ * @param {any} code Unique identifier for the object.
826
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
827
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
828
+ * @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.
829
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
830
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
831
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, createdAt, updatedAt&lt;/i&gt;
832
+ * @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;
833
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
834
+ * @param {*} [options] Override http request option.
835
+ * @throws {RequiredError}
836
+ */
837
+ listPartnerHierarchyOperations: function (code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
838
+ return __awaiter(this, void 0, void 0, function () {
839
+ var localVarAxiosArgs;
840
+ return __generator(this, function (_a) {
841
+ switch (_a.label) {
842
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPartnerHierarchyOperations(code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
843
+ case 1:
844
+ localVarAxiosArgs = _a.sent();
845
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
846
+ }
847
+ });
848
+ });
849
+ },
850
+ /**
851
+ * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
852
+ * @summary Update the partner hierarchy
853
+ * @param {string} code Unique identifier for the object.
854
+ * @param {UpdatePartnerHierarchyRequestDto} updatePartnerHierarchyRequestDto
855
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
856
+ * @param {*} [options] Override http request option.
857
+ * @throws {RequiredError}
858
+ */
859
+ updatePartnerHierarchy: function (code, updatePartnerHierarchyRequestDto, authorization, options) {
860
+ return __awaiter(this, void 0, void 0, function () {
861
+ var localVarAxiosArgs;
862
+ return __generator(this, function (_a) {
863
+ switch (_a.label) {
864
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updatePartnerHierarchy(code, updatePartnerHierarchyRequestDto, authorization, options)];
865
+ case 1:
866
+ localVarAxiosArgs = _a.sent();
867
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
868
+ }
869
+ });
870
+ });
871
+ },
872
+ /**
873
+ * Replaces the hierarchy tree with an uploaded file. **Required Permissions** \"partner-management.partners.update\"
874
+ * @summary Update the partner hierarchy tree
875
+ * @param {string} code Unique identifier for the object.
876
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
877
+ * @param {*} [options] Override http request option.
878
+ * @throws {RequiredError}
879
+ */
880
+ updatePartnerHierarchyTree: function (code, authorization, options) {
881
+ return __awaiter(this, void 0, void 0, function () {
882
+ var localVarAxiosArgs;
883
+ return __generator(this, function (_a) {
884
+ switch (_a.label) {
885
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updatePartnerHierarchyTree(code, authorization, options)];
886
+ case 1:
887
+ localVarAxiosArgs = _a.sent();
888
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
889
+ }
890
+ });
891
+ });
892
+ },
893
+ };
894
+ };
895
+ exports.PartnerHierarchiesApiFp = PartnerHierarchiesApiFp;
896
+ /**
897
+ * PartnerHierarchiesApi - factory interface
898
+ * @export
899
+ */
900
+ var PartnerHierarchiesApiFactory = function (configuration, basePath, axios) {
901
+ var localVarFp = (0, exports.PartnerHierarchiesApiFp)(configuration);
902
+ return {
903
+ /**
904
+ * Creates a partner hierarchy from an existing hierarchy type. The hierarchy starts empty, so nodes can be added after it is created. **Required Permissions** \"partner-management.partners.create\"
905
+ * @summary Create the partner hierarchy
906
+ * @param {CreatePartnerHierarchyRequestDto} createPartnerHierarchyRequestDto
907
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
908
+ * @param {*} [options] Override http request option.
909
+ * @throws {RequiredError}
910
+ */
911
+ createPartnerHierarchy: function (createPartnerHierarchyRequestDto, authorization, options) {
912
+ return localVarFp.createPartnerHierarchy(createPartnerHierarchyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
913
+ },
914
+ /**
915
+ * Deletes a partner hierarchy. The hierarchy must have no nodes before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
916
+ * @summary Delete the partner hierarchy
917
+ * @param {string} code Unique identifier for the object.
918
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
919
+ * @param {*} [options] Override http request option.
920
+ * @throws {RequiredError}
921
+ */
922
+ deletePartnerHierarchy: function (code, authorization, options) {
923
+ return localVarFp.deletePartnerHierarchy(code, authorization, options).then(function (request) { return request(axios, basePath); });
924
+ },
925
+ /**
926
+ * Returns a pre-signed upload URL for a hierarchy tree file. Use the uploaded file key for tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.update\"
927
+ * @summary Create the partner hierarchy upload url
928
+ * @param {string} code Unique identifier for the object.
929
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
930
+ * @param {*} [options] Override http request option.
931
+ * @throws {RequiredError}
932
+ */
933
+ generateUploadUrl: function (code, authorization, options) {
934
+ return localVarFp.generateUploadUrl(code, authorization, options).then(function (request) { return request(axios, basePath); });
935
+ },
936
+ /**
937
+ * Returns the details of one partner hierarchy, including its name and hierarchy type. **Required Permissions** \"partner-management.partners.view\"
938
+ * @summary Retrieve the partner hierarchy
939
+ * @param {string} code Unique identifier for the object.
940
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
941
+ * @param {*} [options] Override http request option.
942
+ * @throws {RequiredError}
943
+ */
944
+ getPartnerHierarchy: function (code, authorization, options) {
945
+ return localVarFp.getPartnerHierarchy(code, authorization, options).then(function (request) { return request(axios, basePath); });
946
+ },
947
+ /**
948
+ * Returns one part of the hierarchy tree: the selected node and its direct children. If no node is selected, it starts from the top of the hierarchy. **Required Permissions** \"partner-management.partners.view\"
949
+ * @summary Retrieve the partner hierarchy tree
950
+ * @param {string} code Unique identifier for the object.
951
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
952
+ * @param {string} [nodeCode] Node to start from. Omit this to start from the top of the hierarchy.
953
+ * @param {number} [pageSize] Maximum number of direct children to return for the selected node. Default is 30 and the maximum is 50.
954
+ * @param {string} [pageToken] Value returned by the previous response when more children are available.
955
+ * @param {string} [asOf] Shows the hierarchy as it was at this time. Omit this to show the current hierarchy.
956
+ * @param {*} [options] Override http request option.
957
+ * @throws {RequiredError}
958
+ */
959
+ getPartnerHierarchyTree: function (code, authorization, nodeCode, pageSize, pageToken, asOf, options) {
960
+ return localVarFp.getPartnerHierarchyTree(code, authorization, nodeCode, pageSize, pageToken, asOf, options).then(function (request) { return request(axios, basePath); });
961
+ },
962
+ /**
963
+ * Returns a download URL for the full hierarchy tree file. If the file is not ready, it starts a tree file build operation; check the operation status and call this endpoint again when it is done. **Required Permissions** \"partner-management.partners.view\"
964
+ * @summary Retrieve the partner hierarchy tree file
965
+ * @param {string} code Unique identifier for the object.
966
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
967
+ * @param {*} [options] Override http request option.
968
+ * @throws {RequiredError}
969
+ */
970
+ getPartnerHierarchyTreeFile: function (code, authorization, options) {
971
+ return localVarFp.getPartnerHierarchyTreeFile(code, authorization, options).then(function (request) { return request(axios, basePath); });
972
+ },
973
+ /**
974
+ * Returns a paginated list of partner hierarchies. **Required Permissions** \"partner-management.partners.view\"
975
+ * @summary List partner hierarchies
976
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
977
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
978
+ * @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.
979
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
980
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
981
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, createdAt, updatedAt&lt;/i&gt;
982
+ * @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;
983
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
984
+ * @param {*} [options] Override http request option.
985
+ * @throws {RequiredError}
986
+ */
987
+ listPartnerHierarchies: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
988
+ return localVarFp.listPartnerHierarchies(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
989
+ },
990
+ /**
991
+ * Returns long-running file operations for this hierarchy, such as tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.view\"
992
+ * @summary List partner hierarchy operations
993
+ * @param {any} code Unique identifier for the object.
994
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
995
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
996
+ * @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.
997
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
998
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
999
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, createdAt, updatedAt&lt;/i&gt;
1000
+ * @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;
1001
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
1002
+ * @param {*} [options] Override http request option.
1003
+ * @throws {RequiredError}
1004
+ */
1005
+ listPartnerHierarchyOperations: function (code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
1006
+ return localVarFp.listPartnerHierarchyOperations(code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
1007
+ },
1008
+ /**
1009
+ * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
1010
+ * @summary Update the partner hierarchy
1011
+ * @param {string} code Unique identifier for the object.
1012
+ * @param {UpdatePartnerHierarchyRequestDto} updatePartnerHierarchyRequestDto
1013
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1014
+ * @param {*} [options] Override http request option.
1015
+ * @throws {RequiredError}
1016
+ */
1017
+ updatePartnerHierarchy: function (code, updatePartnerHierarchyRequestDto, authorization, options) {
1018
+ return localVarFp.updatePartnerHierarchy(code, updatePartnerHierarchyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1019
+ },
1020
+ /**
1021
+ * Replaces the hierarchy tree with an uploaded file. **Required Permissions** \"partner-management.partners.update\"
1022
+ * @summary Update the partner hierarchy tree
1023
+ * @param {string} code Unique identifier for the object.
1024
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1025
+ * @param {*} [options] Override http request option.
1026
+ * @throws {RequiredError}
1027
+ */
1028
+ updatePartnerHierarchyTree: function (code, authorization, options) {
1029
+ return localVarFp.updatePartnerHierarchyTree(code, authorization, options).then(function (request) { return request(axios, basePath); });
1030
+ },
1031
+ };
1032
+ };
1033
+ exports.PartnerHierarchiesApiFactory = PartnerHierarchiesApiFactory;
1034
+ /**
1035
+ * PartnerHierarchiesApi - object-oriented interface
1036
+ * @export
1037
+ * @class PartnerHierarchiesApi
1038
+ * @extends {BaseAPI}
1039
+ */
1040
+ var PartnerHierarchiesApi = /** @class */ (function (_super) {
1041
+ __extends(PartnerHierarchiesApi, _super);
1042
+ function PartnerHierarchiesApi() {
1043
+ return _super !== null && _super.apply(this, arguments) || this;
1044
+ }
1045
+ /**
1046
+ * Creates a partner hierarchy from an existing hierarchy type. The hierarchy starts empty, so nodes can be added after it is created. **Required Permissions** \"partner-management.partners.create\"
1047
+ * @summary Create the partner hierarchy
1048
+ * @param {PartnerHierarchiesApiCreatePartnerHierarchyRequest} requestParameters Request parameters.
1049
+ * @param {*} [options] Override http request option.
1050
+ * @throws {RequiredError}
1051
+ * @memberof PartnerHierarchiesApi
1052
+ */
1053
+ PartnerHierarchiesApi.prototype.createPartnerHierarchy = function (requestParameters, options) {
1054
+ var _this = this;
1055
+ return (0, exports.PartnerHierarchiesApiFp)(this.configuration).createPartnerHierarchy(requestParameters.createPartnerHierarchyRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1056
+ };
1057
+ /**
1058
+ * Deletes a partner hierarchy. The hierarchy must have no nodes before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
1059
+ * @summary Delete the partner hierarchy
1060
+ * @param {PartnerHierarchiesApiDeletePartnerHierarchyRequest} requestParameters Request parameters.
1061
+ * @param {*} [options] Override http request option.
1062
+ * @throws {RequiredError}
1063
+ * @memberof PartnerHierarchiesApi
1064
+ */
1065
+ PartnerHierarchiesApi.prototype.deletePartnerHierarchy = function (requestParameters, options) {
1066
+ var _this = this;
1067
+ return (0, exports.PartnerHierarchiesApiFp)(this.configuration).deletePartnerHierarchy(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1068
+ };
1069
+ /**
1070
+ * Returns a pre-signed upload URL for a hierarchy tree file. Use the uploaded file key for tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.update\"
1071
+ * @summary Create the partner hierarchy upload url
1072
+ * @param {PartnerHierarchiesApiGenerateUploadUrlRequest} requestParameters Request parameters.
1073
+ * @param {*} [options] Override http request option.
1074
+ * @throws {RequiredError}
1075
+ * @memberof PartnerHierarchiesApi
1076
+ */
1077
+ PartnerHierarchiesApi.prototype.generateUploadUrl = function (requestParameters, options) {
1078
+ var _this = this;
1079
+ return (0, exports.PartnerHierarchiesApiFp)(this.configuration).generateUploadUrl(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1080
+ };
1081
+ /**
1082
+ * Returns the details of one partner hierarchy, including its name and hierarchy type. **Required Permissions** \"partner-management.partners.view\"
1083
+ * @summary Retrieve the partner hierarchy
1084
+ * @param {PartnerHierarchiesApiGetPartnerHierarchyRequest} requestParameters Request parameters.
1085
+ * @param {*} [options] Override http request option.
1086
+ * @throws {RequiredError}
1087
+ * @memberof PartnerHierarchiesApi
1088
+ */
1089
+ PartnerHierarchiesApi.prototype.getPartnerHierarchy = function (requestParameters, options) {
1090
+ var _this = this;
1091
+ return (0, exports.PartnerHierarchiesApiFp)(this.configuration).getPartnerHierarchy(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1092
+ };
1093
+ /**
1094
+ * Returns one part of the hierarchy tree: the selected node and its direct children. If no node is selected, it starts from the top of the hierarchy. **Required Permissions** \"partner-management.partners.view\"
1095
+ * @summary Retrieve the partner hierarchy tree
1096
+ * @param {PartnerHierarchiesApiGetPartnerHierarchyTreeRequest} requestParameters Request parameters.
1097
+ * @param {*} [options] Override http request option.
1098
+ * @throws {RequiredError}
1099
+ * @memberof PartnerHierarchiesApi
1100
+ */
1101
+ PartnerHierarchiesApi.prototype.getPartnerHierarchyTree = function (requestParameters, options) {
1102
+ var _this = this;
1103
+ return (0, exports.PartnerHierarchiesApiFp)(this.configuration).getPartnerHierarchyTree(requestParameters.code, requestParameters.authorization, requestParameters.nodeCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.asOf, options).then(function (request) { return request(_this.axios, _this.basePath); });
1104
+ };
1105
+ /**
1106
+ * Returns a download URL for the full hierarchy tree file. If the file is not ready, it starts a tree file build operation; check the operation status and call this endpoint again when it is done. **Required Permissions** \"partner-management.partners.view\"
1107
+ * @summary Retrieve the partner hierarchy tree file
1108
+ * @param {PartnerHierarchiesApiGetPartnerHierarchyTreeFileRequest} requestParameters Request parameters.
1109
+ * @param {*} [options] Override http request option.
1110
+ * @throws {RequiredError}
1111
+ * @memberof PartnerHierarchiesApi
1112
+ */
1113
+ PartnerHierarchiesApi.prototype.getPartnerHierarchyTreeFile = function (requestParameters, options) {
1114
+ var _this = this;
1115
+ return (0, exports.PartnerHierarchiesApiFp)(this.configuration).getPartnerHierarchyTreeFile(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1116
+ };
1117
+ /**
1118
+ * Returns a paginated list of partner hierarchies. **Required Permissions** \"partner-management.partners.view\"
1119
+ * @summary List partner hierarchies
1120
+ * @param {PartnerHierarchiesApiListPartnerHierarchiesRequest} requestParameters Request parameters.
1121
+ * @param {*} [options] Override http request option.
1122
+ * @throws {RequiredError}
1123
+ * @memberof PartnerHierarchiesApi
1124
+ */
1125
+ PartnerHierarchiesApi.prototype.listPartnerHierarchies = function (requestParameters, options) {
1126
+ var _this = this;
1127
+ if (requestParameters === void 0) { requestParameters = {}; }
1128
+ return (0, exports.PartnerHierarchiesApiFp)(this.configuration).listPartnerHierarchies(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); });
1129
+ };
1130
+ /**
1131
+ * Returns long-running file operations for this hierarchy, such as tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.view\"
1132
+ * @summary List partner hierarchy operations
1133
+ * @param {PartnerHierarchiesApiListPartnerHierarchyOperationsRequest} requestParameters Request parameters.
1134
+ * @param {*} [options] Override http request option.
1135
+ * @throws {RequiredError}
1136
+ * @memberof PartnerHierarchiesApi
1137
+ */
1138
+ PartnerHierarchiesApi.prototype.listPartnerHierarchyOperations = function (requestParameters, options) {
1139
+ var _this = this;
1140
+ return (0, exports.PartnerHierarchiesApiFp)(this.configuration).listPartnerHierarchyOperations(requestParameters.code, 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); });
1141
+ };
1142
+ /**
1143
+ * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
1144
+ * @summary Update the partner hierarchy
1145
+ * @param {PartnerHierarchiesApiUpdatePartnerHierarchyRequest} requestParameters Request parameters.
1146
+ * @param {*} [options] Override http request option.
1147
+ * @throws {RequiredError}
1148
+ * @memberof PartnerHierarchiesApi
1149
+ */
1150
+ PartnerHierarchiesApi.prototype.updatePartnerHierarchy = function (requestParameters, options) {
1151
+ var _this = this;
1152
+ return (0, exports.PartnerHierarchiesApiFp)(this.configuration).updatePartnerHierarchy(requestParameters.code, requestParameters.updatePartnerHierarchyRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1153
+ };
1154
+ /**
1155
+ * Replaces the hierarchy tree with an uploaded file. **Required Permissions** \"partner-management.partners.update\"
1156
+ * @summary Update the partner hierarchy tree
1157
+ * @param {PartnerHierarchiesApiUpdatePartnerHierarchyTreeRequest} requestParameters Request parameters.
1158
+ * @param {*} [options] Override http request option.
1159
+ * @throws {RequiredError}
1160
+ * @memberof PartnerHierarchiesApi
1161
+ */
1162
+ PartnerHierarchiesApi.prototype.updatePartnerHierarchyTree = function (requestParameters, options) {
1163
+ var _this = this;
1164
+ return (0, exports.PartnerHierarchiesApiFp)(this.configuration).updatePartnerHierarchyTree(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1165
+ };
1166
+ return PartnerHierarchiesApi;
1167
+ }(base_1.BaseAPI));
1168
+ exports.PartnerHierarchiesApi = PartnerHierarchiesApi;