@emilgroup/partner-sdk-node 1.22.1-beta.22 → 1.22.1-beta.23

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 (163) hide show
  1. package/.openapi-generator/FILES +42 -1
  2. package/README.md +2 -2
  3. package/api/blacklist-api.ts +3 -3
  4. package/api/blacklist-reasons-api.ts +3 -3
  5. package/api/{default-api.ts → health-api.ts} +13 -13
  6. package/api/partner-hierarchies-api.ts +1371 -0
  7. package/api/partner-hierarchy-nodes-api.ts +1400 -0
  8. package/api/partner-hierarchy-types-api.ts +683 -0
  9. package/api/partners-api.ts +119 -12
  10. package/api.ts +8 -2
  11. package/base.ts +1 -0
  12. package/dist/api/blacklist-api.d.ts +4 -4
  13. package/dist/api/blacklist-reasons-api.d.ts +4 -4
  14. package/dist/api/{default-api.d.ts → health-api.d.ts} +10 -10
  15. package/dist/api/{default-api.js → health-api.js} +22 -22
  16. package/dist/api/partner-hierarchies-api.d.ts +774 -0
  17. package/dist/api/partner-hierarchies-api.js +1175 -0
  18. package/dist/api/partner-hierarchy-nodes-api.d.ts +792 -0
  19. package/dist/api/partner-hierarchy-nodes-api.js +1187 -0
  20. package/dist/api/partner-hierarchy-types-api.d.ts +385 -0
  21. package/dist/api/partner-hierarchy-types-api.js +640 -0
  22. package/dist/api/partners-api.d.ts +69 -12
  23. package/dist/api/partners-api.js +102 -9
  24. package/dist/api.d.ts +4 -1
  25. package/dist/api.js +4 -1
  26. package/dist/base.d.ts +2 -1
  27. package/dist/base.js +1 -0
  28. package/dist/models/batch-create-partner-hierarchy-nodes-request-dto.d.ts +30 -0
  29. package/dist/models/batch-create-partner-hierarchy-nodes-request-dto.js +15 -0
  30. package/dist/models/create-partner-hierarchy-node-request-dto.d.ts +42 -0
  31. package/dist/models/create-partner-hierarchy-node-request-dto.js +15 -0
  32. package/dist/models/create-partner-hierarchy-node-response-class.d.ts +25 -0
  33. package/dist/models/create-partner-hierarchy-node-response-class.js +15 -0
  34. package/dist/models/create-partner-hierarchy-request-dto.d.ts +30 -0
  35. package/dist/models/create-partner-hierarchy-request-dto.js +15 -0
  36. package/dist/models/create-partner-hierarchy-response-class.d.ts +25 -0
  37. package/dist/models/create-partner-hierarchy-response-class.js +15 -0
  38. package/dist/models/create-partner-hierarchy-type-request-dto.d.ts +30 -0
  39. package/dist/models/create-partner-hierarchy-type-request-dto.js +15 -0
  40. package/dist/models/create-partner-hierarchy-type-response-class.d.ts +25 -0
  41. package/dist/models/create-partner-hierarchy-type-response-class.js +15 -0
  42. package/dist/models/delete-by-code-response-class.d.ts +24 -0
  43. package/dist/models/delete-by-code-response-class.js +15 -0
  44. package/dist/models/generate-upload-url-response-class.d.ts +36 -0
  45. package/dist/models/generate-upload-url-response-class.js +15 -0
  46. package/dist/models/get-partner-hierarchy-node-response-class.d.ts +25 -0
  47. package/dist/models/get-partner-hierarchy-node-response-class.js +15 -0
  48. package/dist/models/get-partner-hierarchy-response-class.d.ts +25 -0
  49. package/dist/models/get-partner-hierarchy-response-class.js +15 -0
  50. package/dist/models/get-partner-hierarchy-tree-file-response-class.d.ts +42 -0
  51. package/dist/models/get-partner-hierarchy-tree-file-response-class.js +15 -0
  52. package/dist/models/get-partner-hierarchy-tree-response-class.d.ts +25 -0
  53. package/dist/models/get-partner-hierarchy-tree-response-class.js +15 -0
  54. package/dist/models/get-partner-hierarchy-type-response-class.d.ts +25 -0
  55. package/dist/models/get-partner-hierarchy-type-response-class.js +15 -0
  56. package/dist/models/index.d.ts +38 -0
  57. package/dist/models/index.js +38 -0
  58. package/dist/models/list-blacklist-items-response-class.d.ts +12 -0
  59. package/dist/models/list-partner-hierarchies-response-class.d.ts +43 -0
  60. package/dist/models/list-partner-hierarchies-response-class.js +15 -0
  61. package/dist/models/list-partner-hierarchy-node-history-response-class.d.ts +43 -0
  62. package/dist/models/list-partner-hierarchy-node-history-response-class.js +15 -0
  63. package/dist/models/list-partner-hierarchy-nodes-response-class.d.ts +43 -0
  64. package/dist/models/list-partner-hierarchy-nodes-response-class.js +15 -0
  65. package/dist/models/list-partner-hierarchy-operations-response-class.d.ts +43 -0
  66. package/dist/models/list-partner-hierarchy-operations-response-class.js +15 -0
  67. package/dist/models/list-partner-hierarchy-types-response-class.d.ts +43 -0
  68. package/dist/models/list-partner-hierarchy-types-response-class.js +15 -0
  69. package/dist/models/list-partner-relation-class.d.ts +18 -6
  70. package/dist/models/list-partner-relation-types-class.d.ts +18 -6
  71. package/dist/models/list-partner-types-response-class.d.ts +18 -6
  72. package/dist/models/list-partner-versions-response-class.d.ts +18 -6
  73. package/dist/models/list-partners-response-class.d.ts +18 -6
  74. package/dist/models/list-related-partners-response-class.d.ts +18 -6
  75. package/dist/models/list-tags-response-class.d.ts +18 -6
  76. package/dist/models/move-partner-hierarchy-node-request-dto.d.ts +30 -0
  77. package/dist/models/move-partner-hierarchy-node-request-dto.js +15 -0
  78. package/dist/models/move-partner-hierarchy-node-response-class.d.ts +25 -0
  79. package/dist/models/move-partner-hierarchy-node-response-class.js +15 -0
  80. package/dist/models/partner-hierarchy-async-operation-response-class.d.ts +30 -0
  81. package/dist/models/partner-hierarchy-async-operation-response-class.js +15 -0
  82. package/dist/models/partner-hierarchy-class.d.ts +78 -0
  83. package/dist/models/partner-hierarchy-class.js +15 -0
  84. package/dist/models/partner-hierarchy-node-class.d.ts +109 -0
  85. package/dist/models/partner-hierarchy-node-class.js +15 -0
  86. package/dist/models/partner-hierarchy-node-history-class.d.ts +97 -0
  87. package/dist/models/partner-hierarchy-node-history-class.js +15 -0
  88. package/dist/models/partner-hierarchy-node-tree-class.d.ts +96 -0
  89. package/dist/models/partner-hierarchy-node-tree-class.js +15 -0
  90. package/dist/models/partner-hierarchy-operation-class.d.ts +90 -0
  91. package/dist/models/partner-hierarchy-operation-class.js +15 -0
  92. package/dist/models/partner-hierarchy-type-class.d.ts +66 -0
  93. package/dist/models/partner-hierarchy-type-class.js +15 -0
  94. package/dist/models/unassign-partner-hierarchy-node-response-class.d.ts +25 -0
  95. package/dist/models/unassign-partner-hierarchy-node-response-class.js +15 -0
  96. package/dist/models/update-blacklist-reason-status-request-dto.d.ts +1 -1
  97. package/dist/models/update-partner-hierarchy-node-request-dto.d.ts +30 -0
  98. package/dist/models/update-partner-hierarchy-node-request-dto.js +15 -0
  99. package/dist/models/update-partner-hierarchy-node-response-class.d.ts +25 -0
  100. package/dist/models/update-partner-hierarchy-node-response-class.js +15 -0
  101. package/dist/models/update-partner-hierarchy-request-dto.d.ts +24 -0
  102. package/dist/models/update-partner-hierarchy-request-dto.js +15 -0
  103. package/dist/models/update-partner-hierarchy-response-class.d.ts +25 -0
  104. package/dist/models/update-partner-hierarchy-response-class.js +15 -0
  105. package/dist/models/update-partner-hierarchy-tree-request-body-dto.d.ts +24 -0
  106. package/dist/models/update-partner-hierarchy-tree-request-body-dto.js +15 -0
  107. package/dist/models/update-partner-hierarchy-type-request-dto.d.ts +30 -0
  108. package/dist/models/update-partner-hierarchy-type-request-dto.js +15 -0
  109. package/dist/models/update-partner-hierarchy-type-response-class.d.ts +25 -0
  110. package/dist/models/update-partner-hierarchy-type-response-class.js +15 -0
  111. package/dist/models/validate-partner-request-dto.d.ts +30 -0
  112. package/dist/models/validate-partner-request-dto.js +15 -0
  113. package/dist/models/validate-partner-response-class.d.ts +30 -0
  114. package/dist/models/validate-partner-response-class.js +15 -0
  115. package/models/batch-create-partner-hierarchy-nodes-request-dto.ts +36 -0
  116. package/models/create-partner-hierarchy-node-request-dto.ts +48 -0
  117. package/models/create-partner-hierarchy-node-response-class.ts +31 -0
  118. package/models/create-partner-hierarchy-request-dto.ts +36 -0
  119. package/models/create-partner-hierarchy-response-class.ts +31 -0
  120. package/models/create-partner-hierarchy-type-request-dto.ts +36 -0
  121. package/models/create-partner-hierarchy-type-response-class.ts +31 -0
  122. package/models/delete-by-code-response-class.ts +30 -0
  123. package/models/generate-upload-url-response-class.ts +42 -0
  124. package/models/get-partner-hierarchy-node-response-class.ts +31 -0
  125. package/models/get-partner-hierarchy-response-class.ts +31 -0
  126. package/models/get-partner-hierarchy-tree-file-response-class.ts +48 -0
  127. package/models/get-partner-hierarchy-tree-response-class.ts +31 -0
  128. package/models/get-partner-hierarchy-type-response-class.ts +31 -0
  129. package/models/index.ts +38 -0
  130. package/models/list-blacklist-items-response-class.ts +12 -0
  131. package/models/list-partner-hierarchies-response-class.ts +49 -0
  132. package/models/list-partner-hierarchy-node-history-response-class.ts +49 -0
  133. package/models/list-partner-hierarchy-nodes-response-class.ts +49 -0
  134. package/models/list-partner-hierarchy-operations-response-class.ts +49 -0
  135. package/models/list-partner-hierarchy-types-response-class.ts +49 -0
  136. package/models/list-partner-relation-class.ts +18 -6
  137. package/models/list-partner-relation-types-class.ts +18 -6
  138. package/models/list-partner-types-response-class.ts +18 -6
  139. package/models/list-partner-versions-response-class.ts +18 -6
  140. package/models/list-partners-response-class.ts +18 -6
  141. package/models/list-related-partners-response-class.ts +18 -6
  142. package/models/list-tags-response-class.ts +18 -6
  143. package/models/move-partner-hierarchy-node-request-dto.ts +36 -0
  144. package/models/move-partner-hierarchy-node-response-class.ts +31 -0
  145. package/models/partner-hierarchy-async-operation-response-class.ts +36 -0
  146. package/models/partner-hierarchy-class.ts +84 -0
  147. package/models/partner-hierarchy-node-class.ts +115 -0
  148. package/models/partner-hierarchy-node-history-class.ts +103 -0
  149. package/models/partner-hierarchy-node-tree-class.ts +102 -0
  150. package/models/partner-hierarchy-operation-class.ts +96 -0
  151. package/models/partner-hierarchy-type-class.ts +72 -0
  152. package/models/unassign-partner-hierarchy-node-response-class.ts +31 -0
  153. package/models/update-blacklist-reason-status-request-dto.ts +1 -1
  154. package/models/update-partner-hierarchy-node-request-dto.ts +36 -0
  155. package/models/update-partner-hierarchy-node-response-class.ts +31 -0
  156. package/models/update-partner-hierarchy-request-dto.ts +30 -0
  157. package/models/update-partner-hierarchy-response-class.ts +31 -0
  158. package/models/update-partner-hierarchy-tree-request-body-dto.ts +30 -0
  159. package/models/update-partner-hierarchy-type-request-dto.ts +36 -0
  160. package/models/update-partner-hierarchy-type-response-class.ts +31 -0
  161. package/models/validate-partner-request-dto.ts +36 -0
  162. package/models/validate-partner-response-class.ts +36 -0
  163. package/package.json +1 -1
@@ -0,0 +1,1187 @@
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.PartnerHierarchyNodesApi = exports.PartnerHierarchyNodesApiFactory = exports.PartnerHierarchyNodesApiFp = exports.PartnerHierarchyNodesApiAxiosParamCreator = 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
+ * PartnerHierarchyNodesApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var PartnerHierarchyNodesApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * Starts batch node creation from an uploaded file and returns the operation status. **Required Permissions** \"partner-management.partners.create\"
101
+ * @summary Batch create partner hierarchy nodes
102
+ * @param {BatchCreatePartnerHierarchyNodesRequestDto} batchCreatePartnerHierarchyNodesRequestDto
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
+ batchCreatePartnerHierarchyNodes: function (batchCreatePartnerHierarchyNodesRequestDto, 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 'batchCreatePartnerHierarchyNodesRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('batchCreatePartnerHierarchyNodes', 'batchCreatePartnerHierarchyNodesRequestDto', batchCreatePartnerHierarchyNodesRequestDto);
116
+ localVarPath = "/partnerservice/v1/partner-hierarchy-nodes/batch";
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)(batchCreatePartnerHierarchyNodesRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
148
+ /**
149
+ * Creates a node in a partner hierarchy. The node can be placed at the top of the hierarchy or under another node, and it can be created with or without an assigned partner. **Required Permissions** \"partner-management.partners.create\"
150
+ * @summary Create a partner hierarchy node
151
+ * @param {CreatePartnerHierarchyNodeRequestDto} createPartnerHierarchyNodeRequestDto
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
+ createPartnerHierarchyNode: function (createPartnerHierarchyNodeRequestDto, 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 'createPartnerHierarchyNodeRequestDto' is not null or undefined
164
+ (0, common_1.assertParamExists)('createPartnerHierarchyNode', 'createPartnerHierarchyNodeRequestDto', createPartnerHierarchyNodeRequestDto);
165
+ localVarPath = "/partnerservice/v1/partner-hierarchy-nodes";
166
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
167
+ if (configuration) {
168
+ baseOptions = configuration.baseOptions;
169
+ baseAccessToken = configuration.accessToken;
170
+ }
171
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
172
+ localVarHeaderParameter = {};
173
+ localVarQueryParameter = {};
174
+ // authentication bearer required
175
+ // http bearer authentication required
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
177
+ case 1:
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ _a.sent();
181
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ }
184
+ localVarHeaderParameter['Content-Type'] = 'application/json';
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
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPartnerHierarchyNodeRequestDto, localVarRequestOptions, configuration);
189
+ return [2 /*return*/, {
190
+ url: (0, common_1.toPathString)(localVarUrlObj),
191
+ options: localVarRequestOptions,
192
+ }];
193
+ }
194
+ });
195
+ });
196
+ },
197
+ /**
198
+ * Deletes a partner hierarchy node. The node must have no children before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
199
+ * @summary Delete a partner hierarchy node
200
+ * @param {string} code
201
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ deletePartnerHierarchyNode: function (code, authorization, options) {
206
+ if (options === void 0) { options = {}; }
207
+ return __awaiter(_this, void 0, void 0, function () {
208
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
+ return __generator(this, function (_a) {
210
+ switch (_a.label) {
211
+ case 0:
212
+ // verify required parameter 'code' is not null or undefined
213
+ (0, common_1.assertParamExists)('deletePartnerHierarchyNode', 'code', code);
214
+ localVarPath = "/partnerservice/v1/partner-hierarchy-nodes/{code}"
215
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
216
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
217
+ if (configuration) {
218
+ baseOptions = configuration.baseOptions;
219
+ baseAccessToken = configuration.accessToken;
220
+ }
221
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
222
+ localVarHeaderParameter = {};
223
+ localVarQueryParameter = {};
224
+ // authentication bearer required
225
+ // http bearer authentication required
226
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
227
+ case 1:
228
+ // authentication bearer required
229
+ // http bearer authentication required
230
+ _a.sent();
231
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
232
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
233
+ }
234
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
235
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
236
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
237
+ return [2 /*return*/, {
238
+ url: (0, common_1.toPathString)(localVarUrlObj),
239
+ options: localVarRequestOptions,
240
+ }];
241
+ }
242
+ });
243
+ });
244
+ },
245
+ /**
246
+ * Returns the details of one partner hierarchy node. Partner and parent node details can be included when needed. **Required Permissions** \"partner-management.partners.view\"
247
+ * @summary Get a partner hierarchy node
248
+ * @param {string} code
249
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ getPartnerHierarchyNode: function (code, authorization, options) {
254
+ if (options === void 0) { options = {}; }
255
+ return __awaiter(_this, void 0, void 0, function () {
256
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
257
+ return __generator(this, function (_a) {
258
+ switch (_a.label) {
259
+ case 0:
260
+ // verify required parameter 'code' is not null or undefined
261
+ (0, common_1.assertParamExists)('getPartnerHierarchyNode', 'code', code);
262
+ localVarPath = "/partnerservice/v1/partner-hierarchy-nodes/{code}"
263
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
264
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
265
+ if (configuration) {
266
+ baseOptions = configuration.baseOptions;
267
+ baseAccessToken = configuration.accessToken;
268
+ }
269
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
270
+ localVarHeaderParameter = {};
271
+ localVarQueryParameter = {};
272
+ // authentication bearer required
273
+ // http bearer authentication required
274
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
275
+ case 1:
276
+ // authentication bearer required
277
+ // http bearer authentication required
278
+ _a.sent();
279
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
280
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
281
+ }
282
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
283
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
284
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
285
+ return [2 /*return*/, {
286
+ url: (0, common_1.toPathString)(localVarUrlObj),
287
+ options: localVarRequestOptions,
288
+ }];
289
+ }
290
+ });
291
+ });
292
+ },
293
+ /**
294
+ * Returns a flat paginated list of descendant hierarchy nodes for the selected partner. The partner\'s own nodes are not included. **Required Permissions** \"partner-management.partners.view\"
295
+ * @summary List descendant partner hierarchy nodes
296
+ * @param {string} partnerCode Code of the partner used to find descendant hierarchy nodes.
297
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
298
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
299
+ * @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.
300
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
301
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
302
+ * @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, depth, createdAt, updatedAt&lt;/i&gt;
303
+ * @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; &lt;i&gt;Allowed values: partner, parentNode&lt;i&gt;
304
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
305
+ * @param {*} [options] Override http request option.
306
+ * @throws {RequiredError}
307
+ */
308
+ listDescendantPartnerHierarchyNodes: function (partnerCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
309
+ if (options === void 0) { options = {}; }
310
+ return __awaiter(_this, void 0, void 0, function () {
311
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
312
+ return __generator(this, function (_a) {
313
+ switch (_a.label) {
314
+ case 0:
315
+ // verify required parameter 'partnerCode' is not null or undefined
316
+ (0, common_1.assertParamExists)('listDescendantPartnerHierarchyNodes', 'partnerCode', partnerCode);
317
+ localVarPath = "/partnerservice/v1/partner-hierarchy-nodes/descendants/{partnerCode}"
318
+ .replace("{".concat("partnerCode", "}"), encodeURIComponent(String(partnerCode)));
319
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
320
+ if (configuration) {
321
+ baseOptions = configuration.baseOptions;
322
+ baseAccessToken = configuration.accessToken;
323
+ }
324
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
325
+ localVarHeaderParameter = {};
326
+ localVarQueryParameter = {};
327
+ // authentication bearer required
328
+ // http bearer authentication required
329
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
330
+ case 1:
331
+ // authentication bearer required
332
+ // http bearer authentication required
333
+ _a.sent();
334
+ if (pageSize !== undefined) {
335
+ localVarQueryParameter['pageSize'] = pageSize;
336
+ }
337
+ if (pageToken !== undefined) {
338
+ localVarQueryParameter['pageToken'] = pageToken;
339
+ }
340
+ if (filter !== undefined) {
341
+ localVarQueryParameter['filter'] = filter;
342
+ }
343
+ if (search !== undefined) {
344
+ localVarQueryParameter['search'] = search;
345
+ }
346
+ if (order !== undefined) {
347
+ localVarQueryParameter['order'] = order;
348
+ }
349
+ if (expand !== undefined) {
350
+ localVarQueryParameter['expand'] = expand;
351
+ }
352
+ if (filters !== undefined) {
353
+ localVarQueryParameter['filters'] = filters;
354
+ }
355
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
356
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
357
+ }
358
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
359
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
360
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
361
+ return [2 /*return*/, {
362
+ url: (0, common_1.toPathString)(localVarUrlObj),
363
+ options: localVarRequestOptions,
364
+ }];
365
+ }
366
+ });
367
+ });
368
+ },
369
+ /**
370
+ * Returns a paginated list of previous versions of partner hierarchy nodes for history review. **Required Permissions** \"partner-management.partners.view\"
371
+ * @summary List partner hierarchy node history
372
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
373
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
374
+ * @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.
375
+ * @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, partnerHierarchyCode, validFrom&lt;/i&gt;
376
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
377
+ * @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, validFrom, validTo, createdAt&lt;/i&gt;
378
+ * @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; &lt;i&gt;Allowed values: partner&lt;i&gt;
379
+ * @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, partnerHierarchyCode, validFrom&lt;/i&gt;
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ */
383
+ listPartnerHierarchyNodeHistory: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
384
+ if (options === void 0) { options = {}; }
385
+ return __awaiter(_this, void 0, void 0, function () {
386
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
387
+ return __generator(this, function (_a) {
388
+ switch (_a.label) {
389
+ case 0:
390
+ localVarPath = "/partnerservice/v1/partner-hierarchy-nodes/histories";
391
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
392
+ if (configuration) {
393
+ baseOptions = configuration.baseOptions;
394
+ baseAccessToken = configuration.accessToken;
395
+ }
396
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
397
+ localVarHeaderParameter = {};
398
+ localVarQueryParameter = {};
399
+ // authentication bearer required
400
+ // http bearer authentication required
401
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
402
+ case 1:
403
+ // authentication bearer required
404
+ // http bearer authentication required
405
+ _a.sent();
406
+ if (pageSize !== undefined) {
407
+ localVarQueryParameter['pageSize'] = pageSize;
408
+ }
409
+ if (pageToken !== undefined) {
410
+ localVarQueryParameter['pageToken'] = pageToken;
411
+ }
412
+ if (filter !== undefined) {
413
+ localVarQueryParameter['filter'] = filter;
414
+ }
415
+ if (search !== undefined) {
416
+ localVarQueryParameter['search'] = search;
417
+ }
418
+ if (order !== undefined) {
419
+ localVarQueryParameter['order'] = order;
420
+ }
421
+ if (expand !== undefined) {
422
+ localVarQueryParameter['expand'] = expand;
423
+ }
424
+ if (filters !== undefined) {
425
+ localVarQueryParameter['filters'] = filters;
426
+ }
427
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
428
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
429
+ }
430
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
431
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
432
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
433
+ return [2 /*return*/, {
434
+ url: (0, common_1.toPathString)(localVarUrlObj),
435
+ options: localVarRequestOptions,
436
+ }];
437
+ }
438
+ });
439
+ });
440
+ },
441
+ /**
442
+ * Returns a paginated list of partner hierarchy nodes. **Required Permissions** \"partner-management.partners.view\"
443
+ * @summary List partner hierarchy nodes
444
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
445
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
446
+ * @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.
447
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
448
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
449
+ * @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, depth, createdAt, updatedAt&lt;/i&gt;
450
+ * @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; &lt;i&gt;Allowed values: partner, parentNode&lt;i&gt;
451
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
452
+ * @param {*} [options] Override http request option.
453
+ * @throws {RequiredError}
454
+ */
455
+ listPartnerHierarchyNodes: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
456
+ if (options === void 0) { options = {}; }
457
+ return __awaiter(_this, void 0, void 0, function () {
458
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
459
+ return __generator(this, function (_a) {
460
+ switch (_a.label) {
461
+ case 0:
462
+ localVarPath = "/partnerservice/v1/partner-hierarchy-nodes";
463
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
464
+ if (configuration) {
465
+ baseOptions = configuration.baseOptions;
466
+ baseAccessToken = configuration.accessToken;
467
+ }
468
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
469
+ localVarHeaderParameter = {};
470
+ localVarQueryParameter = {};
471
+ // authentication bearer required
472
+ // http bearer authentication required
473
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
474
+ case 1:
475
+ // authentication bearer required
476
+ // http bearer authentication required
477
+ _a.sent();
478
+ if (pageSize !== undefined) {
479
+ localVarQueryParameter['pageSize'] = pageSize;
480
+ }
481
+ if (pageToken !== undefined) {
482
+ localVarQueryParameter['pageToken'] = pageToken;
483
+ }
484
+ if (filter !== undefined) {
485
+ localVarQueryParameter['filter'] = filter;
486
+ }
487
+ if (search !== undefined) {
488
+ localVarQueryParameter['search'] = search;
489
+ }
490
+ if (order !== undefined) {
491
+ localVarQueryParameter['order'] = order;
492
+ }
493
+ if (expand !== undefined) {
494
+ localVarQueryParameter['expand'] = expand;
495
+ }
496
+ if (filters !== undefined) {
497
+ localVarQueryParameter['filters'] = filters;
498
+ }
499
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
500
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
501
+ }
502
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
503
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
504
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
505
+ return [2 /*return*/, {
506
+ url: (0, common_1.toPathString)(localVarUrlObj),
507
+ options: localVarRequestOptions,
508
+ }];
509
+ }
510
+ });
511
+ });
512
+ },
513
+ /**
514
+ * Moves a node under another parent at the same level in the same hierarchy. Any nodes below it move with it. **Required Permissions** \"partner-management.partners.update\"
515
+ * @summary Move a partner hierarchy node to a new parent
516
+ * @param {string} code
517
+ * @param {MovePartnerHierarchyNodeRequestDto} movePartnerHierarchyNodeRequestDto
518
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
519
+ * @param {*} [options] Override http request option.
520
+ * @throws {RequiredError}
521
+ */
522
+ movePartnerHierarchyNode: function (code, movePartnerHierarchyNodeRequestDto, authorization, options) {
523
+ if (options === void 0) { options = {}; }
524
+ return __awaiter(_this, void 0, void 0, function () {
525
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
526
+ return __generator(this, function (_a) {
527
+ switch (_a.label) {
528
+ case 0:
529
+ // verify required parameter 'code' is not null or undefined
530
+ (0, common_1.assertParamExists)('movePartnerHierarchyNode', 'code', code);
531
+ // verify required parameter 'movePartnerHierarchyNodeRequestDto' is not null or undefined
532
+ (0, common_1.assertParamExists)('movePartnerHierarchyNode', 'movePartnerHierarchyNodeRequestDto', movePartnerHierarchyNodeRequestDto);
533
+ localVarPath = "/partnerservice/v1/partner-hierarchy-nodes/{code}/move"
534
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
535
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
536
+ if (configuration) {
537
+ baseOptions = configuration.baseOptions;
538
+ baseAccessToken = configuration.accessToken;
539
+ }
540
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
541
+ localVarHeaderParameter = {};
542
+ localVarQueryParameter = {};
543
+ // authentication bearer required
544
+ // http bearer authentication required
545
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
546
+ case 1:
547
+ // authentication bearer required
548
+ // http bearer authentication required
549
+ _a.sent();
550
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
551
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
552
+ }
553
+ localVarHeaderParameter['Content-Type'] = 'application/json';
554
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
555
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
556
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
557
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(movePartnerHierarchyNodeRequestDto, localVarRequestOptions, configuration);
558
+ return [2 /*return*/, {
559
+ url: (0, common_1.toPathString)(localVarUrlObj),
560
+ options: localVarRequestOptions,
561
+ }];
562
+ }
563
+ });
564
+ });
565
+ },
566
+ /**
567
+ * Removes the partner assigned to a partner hierarchy node while keeping the node in the tree. **Required Permissions** \"partner-management.partners.update\"
568
+ * @summary Unassign a partner from a partner hierarchy node
569
+ * @param {string} code
570
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
571
+ * @param {*} [options] Override http request option.
572
+ * @throws {RequiredError}
573
+ */
574
+ unassignPartnerHierarchyNode: function (code, authorization, options) {
575
+ if (options === void 0) { options = {}; }
576
+ return __awaiter(_this, void 0, void 0, function () {
577
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
578
+ return __generator(this, function (_a) {
579
+ switch (_a.label) {
580
+ case 0:
581
+ // verify required parameter 'code' is not null or undefined
582
+ (0, common_1.assertParamExists)('unassignPartnerHierarchyNode', 'code', code);
583
+ localVarPath = "/partnerservice/v1/partner-hierarchy-nodes/{code}/unassign"
584
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
585
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
586
+ if (configuration) {
587
+ baseOptions = configuration.baseOptions;
588
+ baseAccessToken = configuration.accessToken;
589
+ }
590
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
591
+ localVarHeaderParameter = {};
592
+ localVarQueryParameter = {};
593
+ // authentication bearer required
594
+ // http bearer authentication required
595
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
596
+ case 1:
597
+ // authentication bearer required
598
+ // http bearer authentication required
599
+ _a.sent();
600
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
601
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
602
+ }
603
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
604
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
605
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
606
+ return [2 /*return*/, {
607
+ url: (0, common_1.toPathString)(localVarUrlObj),
608
+ options: localVarRequestOptions,
609
+ }];
610
+ }
611
+ });
612
+ });
613
+ },
614
+ /**
615
+ * Updates a node role or changes the partner assigned to the node. It does not move the node in the tree. **Required Permissions** \"partner-management.partners.update\"
616
+ * @summary Update a partner hierarchy node
617
+ * @param {string} code
618
+ * @param {UpdatePartnerHierarchyNodeRequestDto} updatePartnerHierarchyNodeRequestDto
619
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
620
+ * @param {*} [options] Override http request option.
621
+ * @throws {RequiredError}
622
+ */
623
+ updatePartnerHierarchyNode: function (code, updatePartnerHierarchyNodeRequestDto, authorization, options) {
624
+ if (options === void 0) { options = {}; }
625
+ return __awaiter(_this, void 0, void 0, function () {
626
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
627
+ return __generator(this, function (_a) {
628
+ switch (_a.label) {
629
+ case 0:
630
+ // verify required parameter 'code' is not null or undefined
631
+ (0, common_1.assertParamExists)('updatePartnerHierarchyNode', 'code', code);
632
+ // verify required parameter 'updatePartnerHierarchyNodeRequestDto' is not null or undefined
633
+ (0, common_1.assertParamExists)('updatePartnerHierarchyNode', 'updatePartnerHierarchyNodeRequestDto', updatePartnerHierarchyNodeRequestDto);
634
+ localVarPath = "/partnerservice/v1/partner-hierarchy-nodes/{code}"
635
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
636
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
637
+ if (configuration) {
638
+ baseOptions = configuration.baseOptions;
639
+ baseAccessToken = configuration.accessToken;
640
+ }
641
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
642
+ localVarHeaderParameter = {};
643
+ localVarQueryParameter = {};
644
+ // authentication bearer required
645
+ // http bearer authentication required
646
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
647
+ case 1:
648
+ // authentication bearer required
649
+ // http bearer authentication required
650
+ _a.sent();
651
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
652
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
653
+ }
654
+ localVarHeaderParameter['Content-Type'] = 'application/json';
655
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
656
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
657
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
658
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updatePartnerHierarchyNodeRequestDto, localVarRequestOptions, configuration);
659
+ return [2 /*return*/, {
660
+ url: (0, common_1.toPathString)(localVarUrlObj),
661
+ options: localVarRequestOptions,
662
+ }];
663
+ }
664
+ });
665
+ });
666
+ },
667
+ };
668
+ };
669
+ exports.PartnerHierarchyNodesApiAxiosParamCreator = PartnerHierarchyNodesApiAxiosParamCreator;
670
+ /**
671
+ * PartnerHierarchyNodesApi - functional programming interface
672
+ * @export
673
+ */
674
+ var PartnerHierarchyNodesApiFp = function (configuration) {
675
+ var localVarAxiosParamCreator = (0, exports.PartnerHierarchyNodesApiAxiosParamCreator)(configuration);
676
+ return {
677
+ /**
678
+ * Starts batch node creation from an uploaded file and returns the operation status. **Required Permissions** \"partner-management.partners.create\"
679
+ * @summary Batch create partner hierarchy nodes
680
+ * @param {BatchCreatePartnerHierarchyNodesRequestDto} batchCreatePartnerHierarchyNodesRequestDto
681
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
682
+ * @param {*} [options] Override http request option.
683
+ * @throws {RequiredError}
684
+ */
685
+ batchCreatePartnerHierarchyNodes: function (batchCreatePartnerHierarchyNodesRequestDto, authorization, options) {
686
+ return __awaiter(this, void 0, void 0, function () {
687
+ var localVarAxiosArgs;
688
+ return __generator(this, function (_a) {
689
+ switch (_a.label) {
690
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.batchCreatePartnerHierarchyNodes(batchCreatePartnerHierarchyNodesRequestDto, authorization, options)];
691
+ case 1:
692
+ localVarAxiosArgs = _a.sent();
693
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
694
+ }
695
+ });
696
+ });
697
+ },
698
+ /**
699
+ * Creates a node in a partner hierarchy. The node can be placed at the top of the hierarchy or under another node, and it can be created with or without an assigned partner. **Required Permissions** \"partner-management.partners.create\"
700
+ * @summary Create a partner hierarchy node
701
+ * @param {CreatePartnerHierarchyNodeRequestDto} createPartnerHierarchyNodeRequestDto
702
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
703
+ * @param {*} [options] Override http request option.
704
+ * @throws {RequiredError}
705
+ */
706
+ createPartnerHierarchyNode: function (createPartnerHierarchyNodeRequestDto, authorization, options) {
707
+ return __awaiter(this, void 0, void 0, function () {
708
+ var localVarAxiosArgs;
709
+ return __generator(this, function (_a) {
710
+ switch (_a.label) {
711
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPartnerHierarchyNode(createPartnerHierarchyNodeRequestDto, authorization, options)];
712
+ case 1:
713
+ localVarAxiosArgs = _a.sent();
714
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
715
+ }
716
+ });
717
+ });
718
+ },
719
+ /**
720
+ * Deletes a partner hierarchy node. The node must have no children before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
721
+ * @summary Delete a partner hierarchy node
722
+ * @param {string} code
723
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
724
+ * @param {*} [options] Override http request option.
725
+ * @throws {RequiredError}
726
+ */
727
+ deletePartnerHierarchyNode: function (code, authorization, options) {
728
+ return __awaiter(this, void 0, void 0, function () {
729
+ var localVarAxiosArgs;
730
+ return __generator(this, function (_a) {
731
+ switch (_a.label) {
732
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deletePartnerHierarchyNode(code, authorization, options)];
733
+ case 1:
734
+ localVarAxiosArgs = _a.sent();
735
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
736
+ }
737
+ });
738
+ });
739
+ },
740
+ /**
741
+ * Returns the details of one partner hierarchy node. Partner and parent node details can be included when needed. **Required Permissions** \"partner-management.partners.view\"
742
+ * @summary Get a partner hierarchy node
743
+ * @param {string} code
744
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
745
+ * @param {*} [options] Override http request option.
746
+ * @throws {RequiredError}
747
+ */
748
+ getPartnerHierarchyNode: function (code, authorization, options) {
749
+ return __awaiter(this, void 0, void 0, function () {
750
+ var localVarAxiosArgs;
751
+ return __generator(this, function (_a) {
752
+ switch (_a.label) {
753
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPartnerHierarchyNode(code, authorization, options)];
754
+ case 1:
755
+ localVarAxiosArgs = _a.sent();
756
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
757
+ }
758
+ });
759
+ });
760
+ },
761
+ /**
762
+ * Returns a flat paginated list of descendant hierarchy nodes for the selected partner. The partner\'s own nodes are not included. **Required Permissions** \"partner-management.partners.view\"
763
+ * @summary List descendant partner hierarchy nodes
764
+ * @param {string} partnerCode Code of the partner used to find descendant hierarchy nodes.
765
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
766
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
767
+ * @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.
768
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
769
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
770
+ * @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, depth, createdAt, updatedAt&lt;/i&gt;
771
+ * @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; &lt;i&gt;Allowed values: partner, parentNode&lt;i&gt;
772
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
773
+ * @param {*} [options] Override http request option.
774
+ * @throws {RequiredError}
775
+ */
776
+ listDescendantPartnerHierarchyNodes: function (partnerCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
777
+ return __awaiter(this, void 0, void 0, function () {
778
+ var localVarAxiosArgs;
779
+ return __generator(this, function (_a) {
780
+ switch (_a.label) {
781
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listDescendantPartnerHierarchyNodes(partnerCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
782
+ case 1:
783
+ localVarAxiosArgs = _a.sent();
784
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
785
+ }
786
+ });
787
+ });
788
+ },
789
+ /**
790
+ * Returns a paginated list of previous versions of partner hierarchy nodes for history review. **Required Permissions** \"partner-management.partners.view\"
791
+ * @summary List partner hierarchy node history
792
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
793
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
794
+ * @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.
795
+ * @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, partnerHierarchyCode, validFrom&lt;/i&gt;
796
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
797
+ * @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, validFrom, validTo, createdAt&lt;/i&gt;
798
+ * @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; &lt;i&gt;Allowed values: partner&lt;i&gt;
799
+ * @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, partnerHierarchyCode, validFrom&lt;/i&gt;
800
+ * @param {*} [options] Override http request option.
801
+ * @throws {RequiredError}
802
+ */
803
+ listPartnerHierarchyNodeHistory: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
804
+ return __awaiter(this, void 0, void 0, function () {
805
+ var localVarAxiosArgs;
806
+ return __generator(this, function (_a) {
807
+ switch (_a.label) {
808
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPartnerHierarchyNodeHistory(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
809
+ case 1:
810
+ localVarAxiosArgs = _a.sent();
811
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
812
+ }
813
+ });
814
+ });
815
+ },
816
+ /**
817
+ * Returns a paginated list of partner hierarchy nodes. **Required Permissions** \"partner-management.partners.view\"
818
+ * @summary List partner hierarchy nodes
819
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
820
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
821
+ * @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.
822
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
823
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
824
+ * @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, depth, createdAt, updatedAt&lt;/i&gt;
825
+ * @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; &lt;i&gt;Allowed values: partner, parentNode&lt;i&gt;
826
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
827
+ * @param {*} [options] Override http request option.
828
+ * @throws {RequiredError}
829
+ */
830
+ listPartnerHierarchyNodes: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
831
+ return __awaiter(this, void 0, void 0, function () {
832
+ var localVarAxiosArgs;
833
+ return __generator(this, function (_a) {
834
+ switch (_a.label) {
835
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPartnerHierarchyNodes(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
836
+ case 1:
837
+ localVarAxiosArgs = _a.sent();
838
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
839
+ }
840
+ });
841
+ });
842
+ },
843
+ /**
844
+ * Moves a node under another parent at the same level in the same hierarchy. Any nodes below it move with it. **Required Permissions** \"partner-management.partners.update\"
845
+ * @summary Move a partner hierarchy node to a new parent
846
+ * @param {string} code
847
+ * @param {MovePartnerHierarchyNodeRequestDto} movePartnerHierarchyNodeRequestDto
848
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
849
+ * @param {*} [options] Override http request option.
850
+ * @throws {RequiredError}
851
+ */
852
+ movePartnerHierarchyNode: function (code, movePartnerHierarchyNodeRequestDto, authorization, options) {
853
+ return __awaiter(this, void 0, void 0, function () {
854
+ var localVarAxiosArgs;
855
+ return __generator(this, function (_a) {
856
+ switch (_a.label) {
857
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.movePartnerHierarchyNode(code, movePartnerHierarchyNodeRequestDto, authorization, options)];
858
+ case 1:
859
+ localVarAxiosArgs = _a.sent();
860
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
861
+ }
862
+ });
863
+ });
864
+ },
865
+ /**
866
+ * Removes the partner assigned to a partner hierarchy node while keeping the node in the tree. **Required Permissions** \"partner-management.partners.update\"
867
+ * @summary Unassign a partner from a partner hierarchy node
868
+ * @param {string} code
869
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
870
+ * @param {*} [options] Override http request option.
871
+ * @throws {RequiredError}
872
+ */
873
+ unassignPartnerHierarchyNode: function (code, authorization, options) {
874
+ return __awaiter(this, void 0, void 0, function () {
875
+ var localVarAxiosArgs;
876
+ return __generator(this, function (_a) {
877
+ switch (_a.label) {
878
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.unassignPartnerHierarchyNode(code, authorization, options)];
879
+ case 1:
880
+ localVarAxiosArgs = _a.sent();
881
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
882
+ }
883
+ });
884
+ });
885
+ },
886
+ /**
887
+ * Updates a node role or changes the partner assigned to the node. It does not move the node in the tree. **Required Permissions** \"partner-management.partners.update\"
888
+ * @summary Update a partner hierarchy node
889
+ * @param {string} code
890
+ * @param {UpdatePartnerHierarchyNodeRequestDto} updatePartnerHierarchyNodeRequestDto
891
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
892
+ * @param {*} [options] Override http request option.
893
+ * @throws {RequiredError}
894
+ */
895
+ updatePartnerHierarchyNode: function (code, updatePartnerHierarchyNodeRequestDto, authorization, options) {
896
+ return __awaiter(this, void 0, void 0, function () {
897
+ var localVarAxiosArgs;
898
+ return __generator(this, function (_a) {
899
+ switch (_a.label) {
900
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updatePartnerHierarchyNode(code, updatePartnerHierarchyNodeRequestDto, authorization, options)];
901
+ case 1:
902
+ localVarAxiosArgs = _a.sent();
903
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
904
+ }
905
+ });
906
+ });
907
+ },
908
+ };
909
+ };
910
+ exports.PartnerHierarchyNodesApiFp = PartnerHierarchyNodesApiFp;
911
+ /**
912
+ * PartnerHierarchyNodesApi - factory interface
913
+ * @export
914
+ */
915
+ var PartnerHierarchyNodesApiFactory = function (configuration, basePath, axios) {
916
+ var localVarFp = (0, exports.PartnerHierarchyNodesApiFp)(configuration);
917
+ return {
918
+ /**
919
+ * Starts batch node creation from an uploaded file and returns the operation status. **Required Permissions** \"partner-management.partners.create\"
920
+ * @summary Batch create partner hierarchy nodes
921
+ * @param {BatchCreatePartnerHierarchyNodesRequestDto} batchCreatePartnerHierarchyNodesRequestDto
922
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
923
+ * @param {*} [options] Override http request option.
924
+ * @throws {RequiredError}
925
+ */
926
+ batchCreatePartnerHierarchyNodes: function (batchCreatePartnerHierarchyNodesRequestDto, authorization, options) {
927
+ return localVarFp.batchCreatePartnerHierarchyNodes(batchCreatePartnerHierarchyNodesRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
928
+ },
929
+ /**
930
+ * Creates a node in a partner hierarchy. The node can be placed at the top of the hierarchy or under another node, and it can be created with or without an assigned partner. **Required Permissions** \"partner-management.partners.create\"
931
+ * @summary Create a partner hierarchy node
932
+ * @param {CreatePartnerHierarchyNodeRequestDto} createPartnerHierarchyNodeRequestDto
933
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
934
+ * @param {*} [options] Override http request option.
935
+ * @throws {RequiredError}
936
+ */
937
+ createPartnerHierarchyNode: function (createPartnerHierarchyNodeRequestDto, authorization, options) {
938
+ return localVarFp.createPartnerHierarchyNode(createPartnerHierarchyNodeRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
939
+ },
940
+ /**
941
+ * Deletes a partner hierarchy node. The node must have no children before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
942
+ * @summary Delete a partner hierarchy node
943
+ * @param {string} code
944
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
945
+ * @param {*} [options] Override http request option.
946
+ * @throws {RequiredError}
947
+ */
948
+ deletePartnerHierarchyNode: function (code, authorization, options) {
949
+ return localVarFp.deletePartnerHierarchyNode(code, authorization, options).then(function (request) { return request(axios, basePath); });
950
+ },
951
+ /**
952
+ * Returns the details of one partner hierarchy node. Partner and parent node details can be included when needed. **Required Permissions** \"partner-management.partners.view\"
953
+ * @summary Get a partner hierarchy node
954
+ * @param {string} code
955
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
956
+ * @param {*} [options] Override http request option.
957
+ * @throws {RequiredError}
958
+ */
959
+ getPartnerHierarchyNode: function (code, authorization, options) {
960
+ return localVarFp.getPartnerHierarchyNode(code, authorization, options).then(function (request) { return request(axios, basePath); });
961
+ },
962
+ /**
963
+ * Returns a flat paginated list of descendant hierarchy nodes for the selected partner. The partner\'s own nodes are not included. **Required Permissions** \"partner-management.partners.view\"
964
+ * @summary List descendant partner hierarchy nodes
965
+ * @param {string} partnerCode Code of the partner used to find descendant hierarchy nodes.
966
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
967
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
968
+ * @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.
969
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
970
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
971
+ * @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, depth, createdAt, updatedAt&lt;/i&gt;
972
+ * @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; &lt;i&gt;Allowed values: partner, parentNode&lt;i&gt;
973
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
974
+ * @param {*} [options] Override http request option.
975
+ * @throws {RequiredError}
976
+ */
977
+ listDescendantPartnerHierarchyNodes: function (partnerCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
978
+ return localVarFp.listDescendantPartnerHierarchyNodes(partnerCode, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
979
+ },
980
+ /**
981
+ * Returns a paginated list of previous versions of partner hierarchy nodes for history review. **Required Permissions** \"partner-management.partners.view\"
982
+ * @summary List partner hierarchy node history
983
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
984
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
985
+ * @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.
986
+ * @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, partnerHierarchyCode, validFrom&lt;/i&gt;
987
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
988
+ * @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, validFrom, validTo, createdAt&lt;/i&gt;
989
+ * @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; &lt;i&gt;Allowed values: partner&lt;i&gt;
990
+ * @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, partnerHierarchyCode, validFrom&lt;/i&gt;
991
+ * @param {*} [options] Override http request option.
992
+ * @throws {RequiredError}
993
+ */
994
+ listPartnerHierarchyNodeHistory: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
995
+ return localVarFp.listPartnerHierarchyNodeHistory(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
996
+ },
997
+ /**
998
+ * Returns a paginated list of partner hierarchy nodes. **Required Permissions** \"partner-management.partners.view\"
999
+ * @summary List partner hierarchy nodes
1000
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1001
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1002
+ * @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.
1003
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
1004
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
1005
+ * @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, depth, createdAt, updatedAt&lt;/i&gt;
1006
+ * @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; &lt;i&gt;Allowed values: partner, parentNode&lt;i&gt;
1007
+ * @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, partnerHierarchyCode, partnerCode, parentNodeCode, roleCode, depth, createdAt, updatedAt&lt;/i&gt;
1008
+ * @param {*} [options] Override http request option.
1009
+ * @throws {RequiredError}
1010
+ */
1011
+ listPartnerHierarchyNodes: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
1012
+ return localVarFp.listPartnerHierarchyNodes(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
1013
+ },
1014
+ /**
1015
+ * Moves a node under another parent at the same level in the same hierarchy. Any nodes below it move with it. **Required Permissions** \"partner-management.partners.update\"
1016
+ * @summary Move a partner hierarchy node to a new parent
1017
+ * @param {string} code
1018
+ * @param {MovePartnerHierarchyNodeRequestDto} movePartnerHierarchyNodeRequestDto
1019
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1020
+ * @param {*} [options] Override http request option.
1021
+ * @throws {RequiredError}
1022
+ */
1023
+ movePartnerHierarchyNode: function (code, movePartnerHierarchyNodeRequestDto, authorization, options) {
1024
+ return localVarFp.movePartnerHierarchyNode(code, movePartnerHierarchyNodeRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1025
+ },
1026
+ /**
1027
+ * Removes the partner assigned to a partner hierarchy node while keeping the node in the tree. **Required Permissions** \"partner-management.partners.update\"
1028
+ * @summary Unassign a partner from a partner hierarchy node
1029
+ * @param {string} code
1030
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1031
+ * @param {*} [options] Override http request option.
1032
+ * @throws {RequiredError}
1033
+ */
1034
+ unassignPartnerHierarchyNode: function (code, authorization, options) {
1035
+ return localVarFp.unassignPartnerHierarchyNode(code, authorization, options).then(function (request) { return request(axios, basePath); });
1036
+ },
1037
+ /**
1038
+ * Updates a node role or changes the partner assigned to the node. It does not move the node in the tree. **Required Permissions** \"partner-management.partners.update\"
1039
+ * @summary Update a partner hierarchy node
1040
+ * @param {string} code
1041
+ * @param {UpdatePartnerHierarchyNodeRequestDto} updatePartnerHierarchyNodeRequestDto
1042
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1043
+ * @param {*} [options] Override http request option.
1044
+ * @throws {RequiredError}
1045
+ */
1046
+ updatePartnerHierarchyNode: function (code, updatePartnerHierarchyNodeRequestDto, authorization, options) {
1047
+ return localVarFp.updatePartnerHierarchyNode(code, updatePartnerHierarchyNodeRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1048
+ },
1049
+ };
1050
+ };
1051
+ exports.PartnerHierarchyNodesApiFactory = PartnerHierarchyNodesApiFactory;
1052
+ /**
1053
+ * PartnerHierarchyNodesApi - object-oriented interface
1054
+ * @export
1055
+ * @class PartnerHierarchyNodesApi
1056
+ * @extends {BaseAPI}
1057
+ */
1058
+ var PartnerHierarchyNodesApi = /** @class */ (function (_super) {
1059
+ __extends(PartnerHierarchyNodesApi, _super);
1060
+ function PartnerHierarchyNodesApi() {
1061
+ return _super !== null && _super.apply(this, arguments) || this;
1062
+ }
1063
+ /**
1064
+ * Starts batch node creation from an uploaded file and returns the operation status. **Required Permissions** \"partner-management.partners.create\"
1065
+ * @summary Batch create partner hierarchy nodes
1066
+ * @param {PartnerHierarchyNodesApiBatchCreatePartnerHierarchyNodesRequest} requestParameters Request parameters.
1067
+ * @param {*} [options] Override http request option.
1068
+ * @throws {RequiredError}
1069
+ * @memberof PartnerHierarchyNodesApi
1070
+ */
1071
+ PartnerHierarchyNodesApi.prototype.batchCreatePartnerHierarchyNodes = function (requestParameters, options) {
1072
+ var _this = this;
1073
+ return (0, exports.PartnerHierarchyNodesApiFp)(this.configuration).batchCreatePartnerHierarchyNodes(requestParameters.batchCreatePartnerHierarchyNodesRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1074
+ };
1075
+ /**
1076
+ * Creates a node in a partner hierarchy. The node can be placed at the top of the hierarchy or under another node, and it can be created with or without an assigned partner. **Required Permissions** \"partner-management.partners.create\"
1077
+ * @summary Create a partner hierarchy node
1078
+ * @param {PartnerHierarchyNodesApiCreatePartnerHierarchyNodeRequest} requestParameters Request parameters.
1079
+ * @param {*} [options] Override http request option.
1080
+ * @throws {RequiredError}
1081
+ * @memberof PartnerHierarchyNodesApi
1082
+ */
1083
+ PartnerHierarchyNodesApi.prototype.createPartnerHierarchyNode = function (requestParameters, options) {
1084
+ var _this = this;
1085
+ return (0, exports.PartnerHierarchyNodesApiFp)(this.configuration).createPartnerHierarchyNode(requestParameters.createPartnerHierarchyNodeRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1086
+ };
1087
+ /**
1088
+ * Deletes a partner hierarchy node. The node must have no children before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
1089
+ * @summary Delete a partner hierarchy node
1090
+ * @param {PartnerHierarchyNodesApiDeletePartnerHierarchyNodeRequest} requestParameters Request parameters.
1091
+ * @param {*} [options] Override http request option.
1092
+ * @throws {RequiredError}
1093
+ * @memberof PartnerHierarchyNodesApi
1094
+ */
1095
+ PartnerHierarchyNodesApi.prototype.deletePartnerHierarchyNode = function (requestParameters, options) {
1096
+ var _this = this;
1097
+ return (0, exports.PartnerHierarchyNodesApiFp)(this.configuration).deletePartnerHierarchyNode(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1098
+ };
1099
+ /**
1100
+ * Returns the details of one partner hierarchy node. Partner and parent node details can be included when needed. **Required Permissions** \"partner-management.partners.view\"
1101
+ * @summary Get a partner hierarchy node
1102
+ * @param {PartnerHierarchyNodesApiGetPartnerHierarchyNodeRequest} requestParameters Request parameters.
1103
+ * @param {*} [options] Override http request option.
1104
+ * @throws {RequiredError}
1105
+ * @memberof PartnerHierarchyNodesApi
1106
+ */
1107
+ PartnerHierarchyNodesApi.prototype.getPartnerHierarchyNode = function (requestParameters, options) {
1108
+ var _this = this;
1109
+ return (0, exports.PartnerHierarchyNodesApiFp)(this.configuration).getPartnerHierarchyNode(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1110
+ };
1111
+ /**
1112
+ * Returns a flat paginated list of descendant hierarchy nodes for the selected partner. The partner\'s own nodes are not included. **Required Permissions** \"partner-management.partners.view\"
1113
+ * @summary List descendant partner hierarchy nodes
1114
+ * @param {PartnerHierarchyNodesApiListDescendantPartnerHierarchyNodesRequest} requestParameters Request parameters.
1115
+ * @param {*} [options] Override http request option.
1116
+ * @throws {RequiredError}
1117
+ * @memberof PartnerHierarchyNodesApi
1118
+ */
1119
+ PartnerHierarchyNodesApi.prototype.listDescendantPartnerHierarchyNodes = function (requestParameters, options) {
1120
+ var _this = this;
1121
+ return (0, exports.PartnerHierarchyNodesApiFp)(this.configuration).listDescendantPartnerHierarchyNodes(requestParameters.partnerCode, 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); });
1122
+ };
1123
+ /**
1124
+ * Returns a paginated list of previous versions of partner hierarchy nodes for history review. **Required Permissions** \"partner-management.partners.view\"
1125
+ * @summary List partner hierarchy node history
1126
+ * @param {PartnerHierarchyNodesApiListPartnerHierarchyNodeHistoryRequest} requestParameters Request parameters.
1127
+ * @param {*} [options] Override http request option.
1128
+ * @throws {RequiredError}
1129
+ * @memberof PartnerHierarchyNodesApi
1130
+ */
1131
+ PartnerHierarchyNodesApi.prototype.listPartnerHierarchyNodeHistory = function (requestParameters, options) {
1132
+ var _this = this;
1133
+ if (requestParameters === void 0) { requestParameters = {}; }
1134
+ return (0, exports.PartnerHierarchyNodesApiFp)(this.configuration).listPartnerHierarchyNodeHistory(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); });
1135
+ };
1136
+ /**
1137
+ * Returns a paginated list of partner hierarchy nodes. **Required Permissions** \"partner-management.partners.view\"
1138
+ * @summary List partner hierarchy nodes
1139
+ * @param {PartnerHierarchyNodesApiListPartnerHierarchyNodesRequest} requestParameters Request parameters.
1140
+ * @param {*} [options] Override http request option.
1141
+ * @throws {RequiredError}
1142
+ * @memberof PartnerHierarchyNodesApi
1143
+ */
1144
+ PartnerHierarchyNodesApi.prototype.listPartnerHierarchyNodes = function (requestParameters, options) {
1145
+ var _this = this;
1146
+ if (requestParameters === void 0) { requestParameters = {}; }
1147
+ return (0, exports.PartnerHierarchyNodesApiFp)(this.configuration).listPartnerHierarchyNodes(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); });
1148
+ };
1149
+ /**
1150
+ * Moves a node under another parent at the same level in the same hierarchy. Any nodes below it move with it. **Required Permissions** \"partner-management.partners.update\"
1151
+ * @summary Move a partner hierarchy node to a new parent
1152
+ * @param {PartnerHierarchyNodesApiMovePartnerHierarchyNodeRequest} requestParameters Request parameters.
1153
+ * @param {*} [options] Override http request option.
1154
+ * @throws {RequiredError}
1155
+ * @memberof PartnerHierarchyNodesApi
1156
+ */
1157
+ PartnerHierarchyNodesApi.prototype.movePartnerHierarchyNode = function (requestParameters, options) {
1158
+ var _this = this;
1159
+ return (0, exports.PartnerHierarchyNodesApiFp)(this.configuration).movePartnerHierarchyNode(requestParameters.code, requestParameters.movePartnerHierarchyNodeRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1160
+ };
1161
+ /**
1162
+ * Removes the partner assigned to a partner hierarchy node while keeping the node in the tree. **Required Permissions** \"partner-management.partners.update\"
1163
+ * @summary Unassign a partner from a partner hierarchy node
1164
+ * @param {PartnerHierarchyNodesApiUnassignPartnerHierarchyNodeRequest} requestParameters Request parameters.
1165
+ * @param {*} [options] Override http request option.
1166
+ * @throws {RequiredError}
1167
+ * @memberof PartnerHierarchyNodesApi
1168
+ */
1169
+ PartnerHierarchyNodesApi.prototype.unassignPartnerHierarchyNode = function (requestParameters, options) {
1170
+ var _this = this;
1171
+ return (0, exports.PartnerHierarchyNodesApiFp)(this.configuration).unassignPartnerHierarchyNode(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1172
+ };
1173
+ /**
1174
+ * Updates a node role or changes the partner assigned to the node. It does not move the node in the tree. **Required Permissions** \"partner-management.partners.update\"
1175
+ * @summary Update a partner hierarchy node
1176
+ * @param {PartnerHierarchyNodesApiUpdatePartnerHierarchyNodeRequest} requestParameters Request parameters.
1177
+ * @param {*} [options] Override http request option.
1178
+ * @throws {RequiredError}
1179
+ * @memberof PartnerHierarchyNodesApi
1180
+ */
1181
+ PartnerHierarchyNodesApi.prototype.updatePartnerHierarchyNode = function (requestParameters, options) {
1182
+ var _this = this;
1183
+ return (0, exports.PartnerHierarchyNodesApiFp)(this.configuration).updatePartnerHierarchyNode(requestParameters.code, requestParameters.updatePartnerHierarchyNodeRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1184
+ };
1185
+ return PartnerHierarchyNodesApi;
1186
+ }(base_1.BaseAPI));
1187
+ exports.PartnerHierarchyNodesApi = PartnerHierarchyNodesApi;