@emilgroup/partner-sdk-node 1.22.1-beta.14 → 1.22.1-beta.16

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