@emilgroup/partner-sdk 1.24.1-beta.0 → 1.24.1-beta.2

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 (168) hide show
  1. package/.openapi-generator/FILES +1 -42
  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/{health-api.ts → default-api.ts} +13 -13
  6. package/api/partners-api.ts +12 -211
  7. package/api.ts +2 -10
  8. package/dist/api/blacklist-api.d.ts +4 -4
  9. package/dist/api/blacklist-reasons-api.d.ts +4 -4
  10. package/dist/api/{health-api.d.ts → default-api.d.ts} +10 -10
  11. package/dist/api/{health-api.js → default-api.js} +22 -22
  12. package/dist/api/partners-api.d.ts +12 -130
  13. package/dist/api/partners-api.js +9 -143
  14. package/dist/api.d.ts +1 -5
  15. package/dist/api.js +1 -5
  16. package/dist/models/create-partner-request-dto.d.ts +2 -4
  17. package/dist/models/index.d.ts +0 -37
  18. package/dist/models/index.js +0 -37
  19. package/dist/models/list-blacklist-items-response-class.d.ts +0 -12
  20. package/dist/models/list-partner-relation-class.d.ts +6 -18
  21. package/dist/models/list-partner-relation-types-class.d.ts +6 -18
  22. package/dist/models/list-partner-types-response-class.d.ts +6 -18
  23. package/dist/models/list-partner-versions-response-class.d.ts +6 -18
  24. package/dist/models/list-partners-response-class.d.ts +0 -12
  25. package/dist/models/list-related-partners-response-class.d.ts +6 -18
  26. package/dist/models/list-tags-response-class.d.ts +6 -18
  27. package/dist/models/merge-partners-request-dto.d.ts +2 -4
  28. package/dist/models/partner-class.d.ts +0 -6
  29. package/dist/models/update-blacklist-reason-status-request-dto.d.ts +1 -1
  30. package/dist/models/update-partner-request-dto.d.ts +2 -4
  31. package/models/create-partner-request-dto.ts +2 -2
  32. package/models/index.ts +0 -37
  33. package/models/list-blacklist-items-response-class.ts +0 -12
  34. package/models/list-partner-relation-class.ts +6 -18
  35. package/models/list-partner-relation-types-class.ts +6 -18
  36. package/models/list-partner-types-response-class.ts +6 -18
  37. package/models/list-partner-versions-response-class.ts +6 -18
  38. package/models/list-partners-response-class.ts +0 -12
  39. package/models/list-related-partners-response-class.ts +6 -18
  40. package/models/list-tags-response-class.ts +6 -18
  41. package/models/merge-partners-request-dto.ts +2 -2
  42. package/models/partner-class.ts +0 -6
  43. package/models/update-blacklist-reason-status-request-dto.ts +1 -1
  44. package/models/update-partner-request-dto.ts +2 -2
  45. package/package.json +1 -1
  46. package/api/partner-hierarchies-api.ts +0 -1166
  47. package/api/partner-hierarchy-nodes-api.ts +0 -1197
  48. package/api/partner-hierarchy-operations-api.ts +0 -363
  49. package/api/partner-hierarchy-types-api.ts +0 -679
  50. package/dist/api/partner-hierarchies-api.d.ts +0 -655
  51. package/dist/api/partner-hierarchies-api.js +0 -1037
  52. package/dist/api/partner-hierarchy-nodes-api.d.ts +0 -674
  53. package/dist/api/partner-hierarchy-nodes-api.js +0 -1049
  54. package/dist/api/partner-hierarchy-operations-api.d.ts +0 -215
  55. package/dist/api/partner-hierarchy-operations-api.js +0 -358
  56. package/dist/api/partner-hierarchy-types-api.d.ts +0 -385
  57. package/dist/api/partner-hierarchy-types-api.js +0 -636
  58. package/dist/models/batch-create-partner-hierarchy-nodes-request-dto.d.ts +0 -30
  59. package/dist/models/batch-create-partner-hierarchy-nodes-request-dto.js +0 -15
  60. package/dist/models/create-partner-hierarchy-node-request-dto.d.ts +0 -42
  61. package/dist/models/create-partner-hierarchy-node-request-dto.js +0 -15
  62. package/dist/models/create-partner-hierarchy-node-response-class.d.ts +0 -25
  63. package/dist/models/create-partner-hierarchy-node-response-class.js +0 -15
  64. package/dist/models/create-partner-hierarchy-request-dto.d.ts +0 -30
  65. package/dist/models/create-partner-hierarchy-request-dto.js +0 -15
  66. package/dist/models/create-partner-hierarchy-response-class.d.ts +0 -25
  67. package/dist/models/create-partner-hierarchy-response-class.js +0 -15
  68. package/dist/models/create-partner-hierarchy-type-request-dto.d.ts +0 -30
  69. package/dist/models/create-partner-hierarchy-type-request-dto.js +0 -15
  70. package/dist/models/create-partner-hierarchy-type-response-class.d.ts +0 -25
  71. package/dist/models/create-partner-hierarchy-type-response-class.js +0 -15
  72. package/dist/models/delete-by-code-response-class.d.ts +0 -24
  73. package/dist/models/delete-by-code-response-class.js +0 -15
  74. package/dist/models/generate-upload-url-response-class.d.ts +0 -36
  75. package/dist/models/generate-upload-url-response-class.js +0 -15
  76. package/dist/models/get-partner-hierarchy-node-response-class.d.ts +0 -25
  77. package/dist/models/get-partner-hierarchy-node-response-class.js +0 -15
  78. package/dist/models/get-partner-hierarchy-operation-response-class.d.ts +0 -25
  79. package/dist/models/get-partner-hierarchy-operation-response-class.js +0 -15
  80. package/dist/models/get-partner-hierarchy-response-class.d.ts +0 -25
  81. package/dist/models/get-partner-hierarchy-response-class.js +0 -15
  82. package/dist/models/get-partner-hierarchy-tree-file-response-class.d.ts +0 -60
  83. package/dist/models/get-partner-hierarchy-tree-file-response-class.js +0 -15
  84. package/dist/models/get-partner-hierarchy-tree-response-class.d.ts +0 -25
  85. package/dist/models/get-partner-hierarchy-tree-response-class.js +0 -15
  86. package/dist/models/get-partner-hierarchy-type-response-class.d.ts +0 -25
  87. package/dist/models/get-partner-hierarchy-type-response-class.js +0 -15
  88. package/dist/models/list-partner-hierarchies-response-class.d.ts +0 -43
  89. package/dist/models/list-partner-hierarchies-response-class.js +0 -15
  90. package/dist/models/list-partner-hierarchy-node-history-response-class.d.ts +0 -43
  91. package/dist/models/list-partner-hierarchy-node-history-response-class.js +0 -15
  92. package/dist/models/list-partner-hierarchy-nodes-response-class.d.ts +0 -43
  93. package/dist/models/list-partner-hierarchy-nodes-response-class.js +0 -15
  94. package/dist/models/list-partner-hierarchy-operations-response-class.d.ts +0 -43
  95. package/dist/models/list-partner-hierarchy-operations-response-class.js +0 -15
  96. package/dist/models/list-partner-hierarchy-types-response-class.d.ts +0 -43
  97. package/dist/models/list-partner-hierarchy-types-response-class.js +0 -15
  98. package/dist/models/move-partner-hierarchy-node-request-dto.d.ts +0 -30
  99. package/dist/models/move-partner-hierarchy-node-request-dto.js +0 -15
  100. package/dist/models/move-partner-hierarchy-node-response-class.d.ts +0 -25
  101. package/dist/models/move-partner-hierarchy-node-response-class.js +0 -15
  102. package/dist/models/partner-hierarchy-async-operation-response-class.d.ts +0 -30
  103. package/dist/models/partner-hierarchy-async-operation-response-class.js +0 -15
  104. package/dist/models/partner-hierarchy-class.d.ts +0 -72
  105. package/dist/models/partner-hierarchy-class.js +0 -15
  106. package/dist/models/partner-hierarchy-node-class.d.ts +0 -109
  107. package/dist/models/partner-hierarchy-node-class.js +0 -15
  108. package/dist/models/partner-hierarchy-node-history-class.d.ts +0 -97
  109. package/dist/models/partner-hierarchy-node-history-class.js +0 -15
  110. package/dist/models/partner-hierarchy-node-tree-class.d.ts +0 -96
  111. package/dist/models/partner-hierarchy-node-tree-class.js +0 -15
  112. package/dist/models/partner-hierarchy-operation-class.d.ts +0 -110
  113. package/dist/models/partner-hierarchy-operation-class.js +0 -27
  114. package/dist/models/partner-hierarchy-type-class.d.ts +0 -66
  115. package/dist/models/partner-hierarchy-type-class.js +0 -15
  116. package/dist/models/unassign-partner-hierarchy-node-response-class.d.ts +0 -25
  117. package/dist/models/unassign-partner-hierarchy-node-response-class.js +0 -15
  118. package/dist/models/update-partner-hierarchy-node-request-dto.d.ts +0 -30
  119. package/dist/models/update-partner-hierarchy-node-request-dto.js +0 -15
  120. package/dist/models/update-partner-hierarchy-node-response-class.d.ts +0 -25
  121. package/dist/models/update-partner-hierarchy-node-response-class.js +0 -15
  122. package/dist/models/update-partner-hierarchy-request-dto.d.ts +0 -24
  123. package/dist/models/update-partner-hierarchy-request-dto.js +0 -15
  124. package/dist/models/update-partner-hierarchy-response-class.d.ts +0 -25
  125. package/dist/models/update-partner-hierarchy-response-class.js +0 -15
  126. package/dist/models/update-partner-hierarchy-tree-request-body-dto.d.ts +0 -24
  127. package/dist/models/update-partner-hierarchy-tree-request-body-dto.js +0 -15
  128. package/dist/models/update-partner-hierarchy-type-request-dto.d.ts +0 -30
  129. package/dist/models/update-partner-hierarchy-type-request-dto.js +0 -15
  130. package/dist/models/update-partner-hierarchy-type-response-class.d.ts +0 -25
  131. package/dist/models/update-partner-hierarchy-type-response-class.js +0 -15
  132. package/models/batch-create-partner-hierarchy-nodes-request-dto.ts +0 -36
  133. package/models/create-partner-hierarchy-node-request-dto.ts +0 -48
  134. package/models/create-partner-hierarchy-node-response-class.ts +0 -31
  135. package/models/create-partner-hierarchy-request-dto.ts +0 -36
  136. package/models/create-partner-hierarchy-response-class.ts +0 -31
  137. package/models/create-partner-hierarchy-type-request-dto.ts +0 -36
  138. package/models/create-partner-hierarchy-type-response-class.ts +0 -31
  139. package/models/delete-by-code-response-class.ts +0 -30
  140. package/models/generate-upload-url-response-class.ts +0 -42
  141. package/models/get-partner-hierarchy-node-response-class.ts +0 -31
  142. package/models/get-partner-hierarchy-operation-response-class.ts +0 -31
  143. package/models/get-partner-hierarchy-response-class.ts +0 -31
  144. package/models/get-partner-hierarchy-tree-file-response-class.ts +0 -66
  145. package/models/get-partner-hierarchy-tree-response-class.ts +0 -31
  146. package/models/get-partner-hierarchy-type-response-class.ts +0 -31
  147. package/models/list-partner-hierarchies-response-class.ts +0 -49
  148. package/models/list-partner-hierarchy-node-history-response-class.ts +0 -49
  149. package/models/list-partner-hierarchy-nodes-response-class.ts +0 -49
  150. package/models/list-partner-hierarchy-operations-response-class.ts +0 -49
  151. package/models/list-partner-hierarchy-types-response-class.ts +0 -49
  152. package/models/move-partner-hierarchy-node-request-dto.ts +0 -36
  153. package/models/move-partner-hierarchy-node-response-class.ts +0 -31
  154. package/models/partner-hierarchy-async-operation-response-class.ts +0 -36
  155. package/models/partner-hierarchy-class.ts +0 -78
  156. package/models/partner-hierarchy-node-class.ts +0 -115
  157. package/models/partner-hierarchy-node-history-class.ts +0 -103
  158. package/models/partner-hierarchy-node-tree-class.ts +0 -102
  159. package/models/partner-hierarchy-operation-class.ts +0 -120
  160. package/models/partner-hierarchy-type-class.ts +0 -72
  161. package/models/unassign-partner-hierarchy-node-response-class.ts +0 -31
  162. package/models/update-partner-hierarchy-node-request-dto.ts +0 -36
  163. package/models/update-partner-hierarchy-node-response-class.ts +0 -31
  164. package/models/update-partner-hierarchy-request-dto.ts +0 -30
  165. package/models/update-partner-hierarchy-response-class.ts +0 -31
  166. package/models/update-partner-hierarchy-tree-request-body-dto.ts +0 -30
  167. package/models/update-partner-hierarchy-type-request-dto.ts +0 -36
  168. package/models/update-partner-hierarchy-type-response-class.ts +0 -31
@@ -1,1037 +0,0 @@
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
- * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
476
- * @summary Update a partner hierarchy
477
- * @param {string} code Unique identifier for the object.
478
- * @param {UpdatePartnerHierarchyRequestDto} updatePartnerHierarchyRequestDto
479
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
480
- * @param {*} [options] Override http request option.
481
- * @throws {RequiredError}
482
- */
483
- updatePartnerHierarchy: function (code, updatePartnerHierarchyRequestDto, authorization, options) {
484
- if (options === void 0) { options = {}; }
485
- return __awaiter(_this, void 0, void 0, function () {
486
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
487
- return __generator(this, function (_a) {
488
- switch (_a.label) {
489
- case 0:
490
- // verify required parameter 'code' is not null or undefined
491
- (0, common_1.assertParamExists)('updatePartnerHierarchy', 'code', code);
492
- // verify required parameter 'updatePartnerHierarchyRequestDto' is not null or undefined
493
- (0, common_1.assertParamExists)('updatePartnerHierarchy', 'updatePartnerHierarchyRequestDto', updatePartnerHierarchyRequestDto);
494
- localVarPath = "/partnerservice/v1/partner-hierarchies/{code}"
495
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
496
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
497
- if (configuration) {
498
- baseOptions = configuration.baseOptions;
499
- baseAccessToken = configuration.accessToken;
500
- }
501
- localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
502
- localVarHeaderParameter = {};
503
- localVarQueryParameter = {};
504
- // authentication bearer required
505
- // http bearer authentication required
506
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
507
- case 1:
508
- // authentication bearer required
509
- // http bearer authentication required
510
- _a.sent();
511
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
512
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
513
- }
514
- localVarHeaderParameter['Content-Type'] = 'application/json';
515
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
516
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
517
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
518
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updatePartnerHierarchyRequestDto, localVarRequestOptions, configuration);
519
- return [2 /*return*/, {
520
- url: (0, common_1.toPathString)(localVarUrlObj),
521
- options: localVarRequestOptions,
522
- }];
523
- }
524
- });
525
- });
526
- },
527
- /**
528
- * Replaces the current partner hierarchy tree using the contents of an uploaded file. **Required Permissions** \"partner-management.partners.update\"
529
- * @summary Replace the partner hierarchy tree from an uploaded file
530
- * @param {string} code Unique identifier for the object.
531
- * @param {UpdatePartnerHierarchyTreeRequestBodyDto} updatePartnerHierarchyTreeRequestBodyDto
532
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
533
- * @param {*} [options] Override http request option.
534
- * @throws {RequiredError}
535
- */
536
- updatePartnerHierarchyTree: function (code, updatePartnerHierarchyTreeRequestBodyDto, authorization, options) {
537
- if (options === void 0) { options = {}; }
538
- return __awaiter(_this, void 0, void 0, function () {
539
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
540
- return __generator(this, function (_a) {
541
- switch (_a.label) {
542
- case 0:
543
- // verify required parameter 'code' is not null or undefined
544
- (0, common_1.assertParamExists)('updatePartnerHierarchyTree', 'code', code);
545
- // verify required parameter 'updatePartnerHierarchyTreeRequestBodyDto' is not null or undefined
546
- (0, common_1.assertParamExists)('updatePartnerHierarchyTree', 'updatePartnerHierarchyTreeRequestBodyDto', updatePartnerHierarchyTreeRequestBodyDto);
547
- localVarPath = "/partnerservice/v1/partner-hierarchies/{code}/tree"
548
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
549
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
550
- if (configuration) {
551
- baseOptions = configuration.baseOptions;
552
- baseAccessToken = configuration.accessToken;
553
- }
554
- localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
555
- localVarHeaderParameter = {};
556
- localVarQueryParameter = {};
557
- // authentication bearer required
558
- // http bearer authentication required
559
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
560
- case 1:
561
- // authentication bearer required
562
- // http bearer authentication required
563
- _a.sent();
564
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
565
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
566
- }
567
- localVarHeaderParameter['Content-Type'] = 'application/json';
568
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
569
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
570
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
571
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updatePartnerHierarchyTreeRequestBodyDto, localVarRequestOptions, configuration);
572
- return [2 /*return*/, {
573
- url: (0, common_1.toPathString)(localVarUrlObj),
574
- options: localVarRequestOptions,
575
- }];
576
- }
577
- });
578
- });
579
- },
580
- };
581
- };
582
- exports.PartnerHierarchiesApiAxiosParamCreator = PartnerHierarchiesApiAxiosParamCreator;
583
- /**
584
- * PartnerHierarchiesApi - functional programming interface
585
- * @export
586
- */
587
- var PartnerHierarchiesApiFp = function (configuration) {
588
- var localVarAxiosParamCreator = (0, exports.PartnerHierarchiesApiAxiosParamCreator)(configuration);
589
- return {
590
- /**
591
- * 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\"
592
- * @summary Create a partner hierarchy
593
- * @param {CreatePartnerHierarchyRequestDto} createPartnerHierarchyRequestDto
594
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
595
- * @param {*} [options] Override http request option.
596
- * @throws {RequiredError}
597
- */
598
- createPartnerHierarchy: function (createPartnerHierarchyRequestDto, authorization, options) {
599
- return __awaiter(this, void 0, void 0, function () {
600
- var localVarAxiosArgs;
601
- return __generator(this, function (_a) {
602
- switch (_a.label) {
603
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPartnerHierarchy(createPartnerHierarchyRequestDto, authorization, options)];
604
- case 1:
605
- localVarAxiosArgs = _a.sent();
606
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
607
- }
608
- });
609
- });
610
- },
611
- /**
612
- * Deletes a partner hierarchy. The hierarchy must have no nodes before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
613
- * @summary Delete a partner hierarchy
614
- * @param {string} code Unique identifier for the object.
615
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
616
- * @param {*} [options] Override http request option.
617
- * @throws {RequiredError}
618
- */
619
- deletePartnerHierarchy: function (code, authorization, options) {
620
- return __awaiter(this, void 0, void 0, function () {
621
- var localVarAxiosArgs;
622
- return __generator(this, function (_a) {
623
- switch (_a.label) {
624
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.deletePartnerHierarchy(code, authorization, options)];
625
- case 1:
626
- localVarAxiosArgs = _a.sent();
627
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
628
- }
629
- });
630
- });
631
- },
632
- /**
633
- * 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\"
634
- * @summary Generate a pre-signed upload URL for a partner hierarchy tree file
635
- * @param {string} code Unique identifier for the object.
636
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
637
- * @param {*} [options] Override http request option.
638
- * @throws {RequiredError}
639
- */
640
- generateUploadUrl: function (code, authorization, options) {
641
- return __awaiter(this, void 0, void 0, function () {
642
- var localVarAxiosArgs;
643
- return __generator(this, function (_a) {
644
- switch (_a.label) {
645
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.generateUploadUrl(code, authorization, options)];
646
- case 1:
647
- localVarAxiosArgs = _a.sent();
648
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
649
- }
650
- });
651
- });
652
- },
653
- /**
654
- * Returns the details of one partner hierarchy, including its name and hierarchy type. **Required Permissions** \"partner-management.partners.view\"
655
- * @summary Get a partner hierarchy
656
- * @param {string} code Unique identifier for the object.
657
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
658
- * @param {*} [options] Override http request option.
659
- * @throws {RequiredError}
660
- */
661
- getPartnerHierarchy: function (code, authorization, options) {
662
- return __awaiter(this, void 0, void 0, function () {
663
- var localVarAxiosArgs;
664
- return __generator(this, function (_a) {
665
- switch (_a.label) {
666
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPartnerHierarchy(code, authorization, options)];
667
- case 1:
668
- localVarAxiosArgs = _a.sent();
669
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
670
- }
671
- });
672
- });
673
- },
674
- /**
675
- * 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\"
676
- * @summary Get part of a partner hierarchy tree
677
- * @param {string} code Unique identifier for the object.
678
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
679
- * @param {string} [nodeCode] Node to start from. Omit this to start from the top of the hierarchy.
680
- * @param {number} [pageSize] Maximum number of direct children to return for the selected node. Default is 30 and the maximum is 50.
681
- * @param {string} [pageToken] Value returned by the previous response when more children are available.
682
- * @param {string} [asOf] Shows the hierarchy as it was at this time. Omit this to show the current hierarchy.
683
- * @param {*} [options] Override http request option.
684
- * @throws {RequiredError}
685
- */
686
- getPartnerHierarchyTree: function (code, authorization, nodeCode, pageSize, pageToken, asOf, options) {
687
- return __awaiter(this, void 0, void 0, function () {
688
- var localVarAxiosArgs;
689
- return __generator(this, function (_a) {
690
- switch (_a.label) {
691
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPartnerHierarchyTree(code, authorization, nodeCode, pageSize, pageToken, asOf, options)];
692
- case 1:
693
- localVarAxiosArgs = _a.sent();
694
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
695
- }
696
- });
697
- });
698
- },
699
- /**
700
- * 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\"
701
- * @summary Get a partner hierarchy tree file
702
- * @param {string} code Unique identifier for the object.
703
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
704
- * @param {*} [options] Override http request option.
705
- * @throws {RequiredError}
706
- */
707
- getPartnerHierarchyTreeFile: function (code, authorization, options) {
708
- return __awaiter(this, void 0, void 0, function () {
709
- var localVarAxiosArgs;
710
- return __generator(this, function (_a) {
711
- switch (_a.label) {
712
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPartnerHierarchyTreeFile(code, authorization, options)];
713
- case 1:
714
- localVarAxiosArgs = _a.sent();
715
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
716
- }
717
- });
718
- });
719
- },
720
- /**
721
- * Returns a paginated list of partner hierarchies. **Required Permissions** \"partner-management.partners.view\"
722
- * @summary List partner hierarchies
723
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
724
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
725
- * @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.
726
- * @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;
727
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
728
- * @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;
729
- * @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;
730
- * @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;
731
- * @param {*} [options] Override http request option.
732
- * @throws {RequiredError}
733
- */
734
- listPartnerHierarchies: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
735
- return __awaiter(this, void 0, void 0, function () {
736
- var localVarAxiosArgs;
737
- return __generator(this, function (_a) {
738
- switch (_a.label) {
739
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPartnerHierarchies(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
740
- case 1:
741
- localVarAxiosArgs = _a.sent();
742
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
743
- }
744
- });
745
- });
746
- },
747
- /**
748
- * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
749
- * @summary Update a partner hierarchy
750
- * @param {string} code Unique identifier for the object.
751
- * @param {UpdatePartnerHierarchyRequestDto} updatePartnerHierarchyRequestDto
752
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
753
- * @param {*} [options] Override http request option.
754
- * @throws {RequiredError}
755
- */
756
- updatePartnerHierarchy: function (code, updatePartnerHierarchyRequestDto, authorization, options) {
757
- return __awaiter(this, void 0, void 0, function () {
758
- var localVarAxiosArgs;
759
- return __generator(this, function (_a) {
760
- switch (_a.label) {
761
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updatePartnerHierarchy(code, updatePartnerHierarchyRequestDto, authorization, options)];
762
- case 1:
763
- localVarAxiosArgs = _a.sent();
764
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
765
- }
766
- });
767
- });
768
- },
769
- /**
770
- * Replaces the current partner hierarchy tree using the contents of an uploaded file. **Required Permissions** \"partner-management.partners.update\"
771
- * @summary Replace the partner hierarchy tree from an uploaded file
772
- * @param {string} code Unique identifier for the object.
773
- * @param {UpdatePartnerHierarchyTreeRequestBodyDto} updatePartnerHierarchyTreeRequestBodyDto
774
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
775
- * @param {*} [options] Override http request option.
776
- * @throws {RequiredError}
777
- */
778
- updatePartnerHierarchyTree: function (code, updatePartnerHierarchyTreeRequestBodyDto, authorization, options) {
779
- return __awaiter(this, void 0, void 0, function () {
780
- var localVarAxiosArgs;
781
- return __generator(this, function (_a) {
782
- switch (_a.label) {
783
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updatePartnerHierarchyTree(code, updatePartnerHierarchyTreeRequestBodyDto, authorization, options)];
784
- case 1:
785
- localVarAxiosArgs = _a.sent();
786
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
787
- }
788
- });
789
- });
790
- },
791
- };
792
- };
793
- exports.PartnerHierarchiesApiFp = PartnerHierarchiesApiFp;
794
- /**
795
- * PartnerHierarchiesApi - factory interface
796
- * @export
797
- */
798
- var PartnerHierarchiesApiFactory = function (configuration, basePath, axios) {
799
- var localVarFp = (0, exports.PartnerHierarchiesApiFp)(configuration);
800
- return {
801
- /**
802
- * 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\"
803
- * @summary Create a partner hierarchy
804
- * @param {CreatePartnerHierarchyRequestDto} createPartnerHierarchyRequestDto
805
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
806
- * @param {*} [options] Override http request option.
807
- * @throws {RequiredError}
808
- */
809
- createPartnerHierarchy: function (createPartnerHierarchyRequestDto, authorization, options) {
810
- return localVarFp.createPartnerHierarchy(createPartnerHierarchyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
811
- },
812
- /**
813
- * Deletes a partner hierarchy. The hierarchy must have no nodes before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
814
- * @summary Delete a partner hierarchy
815
- * @param {string} code Unique identifier for the object.
816
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
817
- * @param {*} [options] Override http request option.
818
- * @throws {RequiredError}
819
- */
820
- deletePartnerHierarchy: function (code, authorization, options) {
821
- return localVarFp.deletePartnerHierarchy(code, authorization, options).then(function (request) { return request(axios, basePath); });
822
- },
823
- /**
824
- * 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\"
825
- * @summary Generate a pre-signed upload URL for a partner hierarchy tree file
826
- * @param {string} code Unique identifier for the object.
827
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
828
- * @param {*} [options] Override http request option.
829
- * @throws {RequiredError}
830
- */
831
- generateUploadUrl: function (code, authorization, options) {
832
- return localVarFp.generateUploadUrl(code, authorization, options).then(function (request) { return request(axios, basePath); });
833
- },
834
- /**
835
- * Returns the details of one partner hierarchy, including its name and hierarchy type. **Required Permissions** \"partner-management.partners.view\"
836
- * @summary Get a partner hierarchy
837
- * @param {string} code Unique identifier for the object.
838
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
839
- * @param {*} [options] Override http request option.
840
- * @throws {RequiredError}
841
- */
842
- getPartnerHierarchy: function (code, authorization, options) {
843
- return localVarFp.getPartnerHierarchy(code, authorization, options).then(function (request) { return request(axios, basePath); });
844
- },
845
- /**
846
- * 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\"
847
- * @summary Get part of a partner hierarchy tree
848
- * @param {string} code Unique identifier for the object.
849
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
850
- * @param {string} [nodeCode] Node to start from. Omit this to start from the top of the hierarchy.
851
- * @param {number} [pageSize] Maximum number of direct children to return for the selected node. Default is 30 and the maximum is 50.
852
- * @param {string} [pageToken] Value returned by the previous response when more children are available.
853
- * @param {string} [asOf] Shows the hierarchy as it was at this time. Omit this to show the current hierarchy.
854
- * @param {*} [options] Override http request option.
855
- * @throws {RequiredError}
856
- */
857
- getPartnerHierarchyTree: function (code, authorization, nodeCode, pageSize, pageToken, asOf, options) {
858
- return localVarFp.getPartnerHierarchyTree(code, authorization, nodeCode, pageSize, pageToken, asOf, options).then(function (request) { return request(axios, basePath); });
859
- },
860
- /**
861
- * 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\"
862
- * @summary Get a partner hierarchy tree file
863
- * @param {string} code Unique identifier for the object.
864
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
865
- * @param {*} [options] Override http request option.
866
- * @throws {RequiredError}
867
- */
868
- getPartnerHierarchyTreeFile: function (code, authorization, options) {
869
- return localVarFp.getPartnerHierarchyTreeFile(code, authorization, options).then(function (request) { return request(axios, basePath); });
870
- },
871
- /**
872
- * Returns a paginated list of partner hierarchies. **Required Permissions** \"partner-management.partners.view\"
873
- * @summary List partner hierarchies
874
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
875
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
876
- * @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.
877
- * @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;
878
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
879
- * @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;
880
- * @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;
881
- * @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;
882
- * @param {*} [options] Override http request option.
883
- * @throws {RequiredError}
884
- */
885
- listPartnerHierarchies: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
886
- return localVarFp.listPartnerHierarchies(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
887
- },
888
- /**
889
- * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
890
- * @summary Update a partner hierarchy
891
- * @param {string} code Unique identifier for the object.
892
- * @param {UpdatePartnerHierarchyRequestDto} updatePartnerHierarchyRequestDto
893
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
894
- * @param {*} [options] Override http request option.
895
- * @throws {RequiredError}
896
- */
897
- updatePartnerHierarchy: function (code, updatePartnerHierarchyRequestDto, authorization, options) {
898
- return localVarFp.updatePartnerHierarchy(code, updatePartnerHierarchyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
899
- },
900
- /**
901
- * Replaces the current partner hierarchy tree using the contents of an uploaded file. **Required Permissions** \"partner-management.partners.update\"
902
- * @summary Replace the partner hierarchy tree from an uploaded file
903
- * @param {string} code Unique identifier for the object.
904
- * @param {UpdatePartnerHierarchyTreeRequestBodyDto} updatePartnerHierarchyTreeRequestBodyDto
905
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
906
- * @param {*} [options] Override http request option.
907
- * @throws {RequiredError}
908
- */
909
- updatePartnerHierarchyTree: function (code, updatePartnerHierarchyTreeRequestBodyDto, authorization, options) {
910
- return localVarFp.updatePartnerHierarchyTree(code, updatePartnerHierarchyTreeRequestBodyDto, authorization, options).then(function (request) { return request(axios, basePath); });
911
- },
912
- };
913
- };
914
- exports.PartnerHierarchiesApiFactory = PartnerHierarchiesApiFactory;
915
- /**
916
- * PartnerHierarchiesApi - object-oriented interface
917
- * @export
918
- * @class PartnerHierarchiesApi
919
- * @extends {BaseAPI}
920
- */
921
- var PartnerHierarchiesApi = /** @class */ (function (_super) {
922
- __extends(PartnerHierarchiesApi, _super);
923
- function PartnerHierarchiesApi() {
924
- return _super !== null && _super.apply(this, arguments) || this;
925
- }
926
- /**
927
- * 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\"
928
- * @summary Create a partner hierarchy
929
- * @param {PartnerHierarchiesApiCreatePartnerHierarchyRequest} requestParameters Request parameters.
930
- * @param {*} [options] Override http request option.
931
- * @throws {RequiredError}
932
- * @memberof PartnerHierarchiesApi
933
- */
934
- PartnerHierarchiesApi.prototype.createPartnerHierarchy = function (requestParameters, options) {
935
- var _this = this;
936
- return (0, exports.PartnerHierarchiesApiFp)(this.configuration).createPartnerHierarchy(requestParameters.createPartnerHierarchyRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
937
- };
938
- /**
939
- * Deletes a partner hierarchy. The hierarchy must have no nodes before it can be deleted. **Required Permissions** \"partner-management.partners.delete\"
940
- * @summary Delete a partner hierarchy
941
- * @param {PartnerHierarchiesApiDeletePartnerHierarchyRequest} requestParameters Request parameters.
942
- * @param {*} [options] Override http request option.
943
- * @throws {RequiredError}
944
- * @memberof PartnerHierarchiesApi
945
- */
946
- PartnerHierarchiesApi.prototype.deletePartnerHierarchy = function (requestParameters, options) {
947
- var _this = this;
948
- return (0, exports.PartnerHierarchiesApiFp)(this.configuration).deletePartnerHierarchy(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
949
- };
950
- /**
951
- * 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\"
952
- * @summary Generate a pre-signed upload URL for a partner hierarchy tree file
953
- * @param {PartnerHierarchiesApiGenerateUploadUrlRequest} requestParameters Request parameters.
954
- * @param {*} [options] Override http request option.
955
- * @throws {RequiredError}
956
- * @memberof PartnerHierarchiesApi
957
- */
958
- PartnerHierarchiesApi.prototype.generateUploadUrl = function (requestParameters, options) {
959
- var _this = this;
960
- return (0, exports.PartnerHierarchiesApiFp)(this.configuration).generateUploadUrl(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
961
- };
962
- /**
963
- * Returns the details of one partner hierarchy, including its name and hierarchy type. **Required Permissions** \"partner-management.partners.view\"
964
- * @summary Get a partner hierarchy
965
- * @param {PartnerHierarchiesApiGetPartnerHierarchyRequest} requestParameters Request parameters.
966
- * @param {*} [options] Override http request option.
967
- * @throws {RequiredError}
968
- * @memberof PartnerHierarchiesApi
969
- */
970
- PartnerHierarchiesApi.prototype.getPartnerHierarchy = function (requestParameters, options) {
971
- var _this = this;
972
- return (0, exports.PartnerHierarchiesApiFp)(this.configuration).getPartnerHierarchy(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
973
- };
974
- /**
975
- * 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\"
976
- * @summary Get part of a partner hierarchy tree
977
- * @param {PartnerHierarchiesApiGetPartnerHierarchyTreeRequest} requestParameters Request parameters.
978
- * @param {*} [options] Override http request option.
979
- * @throws {RequiredError}
980
- * @memberof PartnerHierarchiesApi
981
- */
982
- PartnerHierarchiesApi.prototype.getPartnerHierarchyTree = function (requestParameters, options) {
983
- var _this = this;
984
- 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); });
985
- };
986
- /**
987
- * 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\"
988
- * @summary Get a partner hierarchy tree file
989
- * @param {PartnerHierarchiesApiGetPartnerHierarchyTreeFileRequest} requestParameters Request parameters.
990
- * @param {*} [options] Override http request option.
991
- * @throws {RequiredError}
992
- * @memberof PartnerHierarchiesApi
993
- */
994
- PartnerHierarchiesApi.prototype.getPartnerHierarchyTreeFile = function (requestParameters, options) {
995
- var _this = this;
996
- return (0, exports.PartnerHierarchiesApiFp)(this.configuration).getPartnerHierarchyTreeFile(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
997
- };
998
- /**
999
- * Returns a paginated list of partner hierarchies. **Required Permissions** \"partner-management.partners.view\"
1000
- * @summary List partner hierarchies
1001
- * @param {PartnerHierarchiesApiListPartnerHierarchiesRequest} requestParameters Request parameters.
1002
- * @param {*} [options] Override http request option.
1003
- * @throws {RequiredError}
1004
- * @memberof PartnerHierarchiesApi
1005
- */
1006
- PartnerHierarchiesApi.prototype.listPartnerHierarchies = function (requestParameters, options) {
1007
- var _this = this;
1008
- if (requestParameters === void 0) { requestParameters = {}; }
1009
- 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); });
1010
- };
1011
- /**
1012
- * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
1013
- * @summary Update a partner hierarchy
1014
- * @param {PartnerHierarchiesApiUpdatePartnerHierarchyRequest} requestParameters Request parameters.
1015
- * @param {*} [options] Override http request option.
1016
- * @throws {RequiredError}
1017
- * @memberof PartnerHierarchiesApi
1018
- */
1019
- PartnerHierarchiesApi.prototype.updatePartnerHierarchy = function (requestParameters, options) {
1020
- var _this = this;
1021
- return (0, exports.PartnerHierarchiesApiFp)(this.configuration).updatePartnerHierarchy(requestParameters.code, requestParameters.updatePartnerHierarchyRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1022
- };
1023
- /**
1024
- * Replaces the current partner hierarchy tree using the contents of an uploaded file. **Required Permissions** \"partner-management.partners.update\"
1025
- * @summary Replace the partner hierarchy tree from an uploaded file
1026
- * @param {PartnerHierarchiesApiUpdatePartnerHierarchyTreeRequest} requestParameters Request parameters.
1027
- * @param {*} [options] Override http request option.
1028
- * @throws {RequiredError}
1029
- * @memberof PartnerHierarchiesApi
1030
- */
1031
- PartnerHierarchiesApi.prototype.updatePartnerHierarchyTree = function (requestParameters, options) {
1032
- var _this = this;
1033
- return (0, exports.PartnerHierarchiesApiFp)(this.configuration).updatePartnerHierarchyTree(requestParameters.code, requestParameters.updatePartnerHierarchyTreeRequestBodyDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1034
- };
1035
- return PartnerHierarchiesApi;
1036
- }(base_1.BaseAPI));
1037
- exports.PartnerHierarchiesApi = PartnerHierarchiesApi;