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

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