@emilgroup/partner-sdk-node 1.23.1-beta.5 → 1.23.1-beta.7

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