@emilgroup/partner-sdk 1.22.1-beta.24 → 1.22.1-beta.25

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