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