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

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