@emilgroup/partner-sdk-node 1.22.1-beta.2 → 1.22.1-beta.21

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