@emilgroup/partner-sdk-node 1.22.1-beta.22 → 1.22.1-beta.23

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 (163) hide show
  1. package/.openapi-generator/FILES +42 -1
  2. package/README.md +2 -2
  3. package/api/blacklist-api.ts +3 -3
  4. package/api/blacklist-reasons-api.ts +3 -3
  5. package/api/{default-api.ts → health-api.ts} +13 -13
  6. package/api/partner-hierarchies-api.ts +1371 -0
  7. package/api/partner-hierarchy-nodes-api.ts +1400 -0
  8. package/api/partner-hierarchy-types-api.ts +683 -0
  9. package/api/partners-api.ts +119 -12
  10. package/api.ts +8 -2
  11. package/base.ts +1 -0
  12. package/dist/api/blacklist-api.d.ts +4 -4
  13. package/dist/api/blacklist-reasons-api.d.ts +4 -4
  14. package/dist/api/{default-api.d.ts → health-api.d.ts} +10 -10
  15. package/dist/api/{default-api.js → health-api.js} +22 -22
  16. package/dist/api/partner-hierarchies-api.d.ts +774 -0
  17. package/dist/api/partner-hierarchies-api.js +1175 -0
  18. package/dist/api/partner-hierarchy-nodes-api.d.ts +792 -0
  19. package/dist/api/partner-hierarchy-nodes-api.js +1187 -0
  20. package/dist/api/partner-hierarchy-types-api.d.ts +385 -0
  21. package/dist/api/partner-hierarchy-types-api.js +640 -0
  22. package/dist/api/partners-api.d.ts +69 -12
  23. package/dist/api/partners-api.js +102 -9
  24. package/dist/api.d.ts +4 -1
  25. package/dist/api.js +4 -1
  26. package/dist/base.d.ts +2 -1
  27. package/dist/base.js +1 -0
  28. package/dist/models/batch-create-partner-hierarchy-nodes-request-dto.d.ts +30 -0
  29. package/dist/models/batch-create-partner-hierarchy-nodes-request-dto.js +15 -0
  30. package/dist/models/create-partner-hierarchy-node-request-dto.d.ts +42 -0
  31. package/dist/models/create-partner-hierarchy-node-request-dto.js +15 -0
  32. package/dist/models/create-partner-hierarchy-node-response-class.d.ts +25 -0
  33. package/dist/models/create-partner-hierarchy-node-response-class.js +15 -0
  34. package/dist/models/create-partner-hierarchy-request-dto.d.ts +30 -0
  35. package/dist/models/create-partner-hierarchy-request-dto.js +15 -0
  36. package/dist/models/create-partner-hierarchy-response-class.d.ts +25 -0
  37. package/dist/models/create-partner-hierarchy-response-class.js +15 -0
  38. package/dist/models/create-partner-hierarchy-type-request-dto.d.ts +30 -0
  39. package/dist/models/create-partner-hierarchy-type-request-dto.js +15 -0
  40. package/dist/models/create-partner-hierarchy-type-response-class.d.ts +25 -0
  41. package/dist/models/create-partner-hierarchy-type-response-class.js +15 -0
  42. package/dist/models/delete-by-code-response-class.d.ts +24 -0
  43. package/dist/models/delete-by-code-response-class.js +15 -0
  44. package/dist/models/generate-upload-url-response-class.d.ts +36 -0
  45. package/dist/models/generate-upload-url-response-class.js +15 -0
  46. package/dist/models/get-partner-hierarchy-node-response-class.d.ts +25 -0
  47. package/dist/models/get-partner-hierarchy-node-response-class.js +15 -0
  48. package/dist/models/get-partner-hierarchy-response-class.d.ts +25 -0
  49. package/dist/models/get-partner-hierarchy-response-class.js +15 -0
  50. package/dist/models/get-partner-hierarchy-tree-file-response-class.d.ts +42 -0
  51. package/dist/models/get-partner-hierarchy-tree-file-response-class.js +15 -0
  52. package/dist/models/get-partner-hierarchy-tree-response-class.d.ts +25 -0
  53. package/dist/models/get-partner-hierarchy-tree-response-class.js +15 -0
  54. package/dist/models/get-partner-hierarchy-type-response-class.d.ts +25 -0
  55. package/dist/models/get-partner-hierarchy-type-response-class.js +15 -0
  56. package/dist/models/index.d.ts +38 -0
  57. package/dist/models/index.js +38 -0
  58. package/dist/models/list-blacklist-items-response-class.d.ts +12 -0
  59. package/dist/models/list-partner-hierarchies-response-class.d.ts +43 -0
  60. package/dist/models/list-partner-hierarchies-response-class.js +15 -0
  61. package/dist/models/list-partner-hierarchy-node-history-response-class.d.ts +43 -0
  62. package/dist/models/list-partner-hierarchy-node-history-response-class.js +15 -0
  63. package/dist/models/list-partner-hierarchy-nodes-response-class.d.ts +43 -0
  64. package/dist/models/list-partner-hierarchy-nodes-response-class.js +15 -0
  65. package/dist/models/list-partner-hierarchy-operations-response-class.d.ts +43 -0
  66. package/dist/models/list-partner-hierarchy-operations-response-class.js +15 -0
  67. package/dist/models/list-partner-hierarchy-types-response-class.d.ts +43 -0
  68. package/dist/models/list-partner-hierarchy-types-response-class.js +15 -0
  69. package/dist/models/list-partner-relation-class.d.ts +18 -6
  70. package/dist/models/list-partner-relation-types-class.d.ts +18 -6
  71. package/dist/models/list-partner-types-response-class.d.ts +18 -6
  72. package/dist/models/list-partner-versions-response-class.d.ts +18 -6
  73. package/dist/models/list-partners-response-class.d.ts +18 -6
  74. package/dist/models/list-related-partners-response-class.d.ts +18 -6
  75. package/dist/models/list-tags-response-class.d.ts +18 -6
  76. package/dist/models/move-partner-hierarchy-node-request-dto.d.ts +30 -0
  77. package/dist/models/move-partner-hierarchy-node-request-dto.js +15 -0
  78. package/dist/models/move-partner-hierarchy-node-response-class.d.ts +25 -0
  79. package/dist/models/move-partner-hierarchy-node-response-class.js +15 -0
  80. package/dist/models/partner-hierarchy-async-operation-response-class.d.ts +30 -0
  81. package/dist/models/partner-hierarchy-async-operation-response-class.js +15 -0
  82. package/dist/models/partner-hierarchy-class.d.ts +78 -0
  83. package/dist/models/partner-hierarchy-class.js +15 -0
  84. package/dist/models/partner-hierarchy-node-class.d.ts +109 -0
  85. package/dist/models/partner-hierarchy-node-class.js +15 -0
  86. package/dist/models/partner-hierarchy-node-history-class.d.ts +97 -0
  87. package/dist/models/partner-hierarchy-node-history-class.js +15 -0
  88. package/dist/models/partner-hierarchy-node-tree-class.d.ts +96 -0
  89. package/dist/models/partner-hierarchy-node-tree-class.js +15 -0
  90. package/dist/models/partner-hierarchy-operation-class.d.ts +90 -0
  91. package/dist/models/partner-hierarchy-operation-class.js +15 -0
  92. package/dist/models/partner-hierarchy-type-class.d.ts +66 -0
  93. package/dist/models/partner-hierarchy-type-class.js +15 -0
  94. package/dist/models/unassign-partner-hierarchy-node-response-class.d.ts +25 -0
  95. package/dist/models/unassign-partner-hierarchy-node-response-class.js +15 -0
  96. package/dist/models/update-blacklist-reason-status-request-dto.d.ts +1 -1
  97. package/dist/models/update-partner-hierarchy-node-request-dto.d.ts +30 -0
  98. package/dist/models/update-partner-hierarchy-node-request-dto.js +15 -0
  99. package/dist/models/update-partner-hierarchy-node-response-class.d.ts +25 -0
  100. package/dist/models/update-partner-hierarchy-node-response-class.js +15 -0
  101. package/dist/models/update-partner-hierarchy-request-dto.d.ts +24 -0
  102. package/dist/models/update-partner-hierarchy-request-dto.js +15 -0
  103. package/dist/models/update-partner-hierarchy-response-class.d.ts +25 -0
  104. package/dist/models/update-partner-hierarchy-response-class.js +15 -0
  105. package/dist/models/update-partner-hierarchy-tree-request-body-dto.d.ts +24 -0
  106. package/dist/models/update-partner-hierarchy-tree-request-body-dto.js +15 -0
  107. package/dist/models/update-partner-hierarchy-type-request-dto.d.ts +30 -0
  108. package/dist/models/update-partner-hierarchy-type-request-dto.js +15 -0
  109. package/dist/models/update-partner-hierarchy-type-response-class.d.ts +25 -0
  110. package/dist/models/update-partner-hierarchy-type-response-class.js +15 -0
  111. package/dist/models/validate-partner-request-dto.d.ts +30 -0
  112. package/dist/models/validate-partner-request-dto.js +15 -0
  113. package/dist/models/validate-partner-response-class.d.ts +30 -0
  114. package/dist/models/validate-partner-response-class.js +15 -0
  115. package/models/batch-create-partner-hierarchy-nodes-request-dto.ts +36 -0
  116. package/models/create-partner-hierarchy-node-request-dto.ts +48 -0
  117. package/models/create-partner-hierarchy-node-response-class.ts +31 -0
  118. package/models/create-partner-hierarchy-request-dto.ts +36 -0
  119. package/models/create-partner-hierarchy-response-class.ts +31 -0
  120. package/models/create-partner-hierarchy-type-request-dto.ts +36 -0
  121. package/models/create-partner-hierarchy-type-response-class.ts +31 -0
  122. package/models/delete-by-code-response-class.ts +30 -0
  123. package/models/generate-upload-url-response-class.ts +42 -0
  124. package/models/get-partner-hierarchy-node-response-class.ts +31 -0
  125. package/models/get-partner-hierarchy-response-class.ts +31 -0
  126. package/models/get-partner-hierarchy-tree-file-response-class.ts +48 -0
  127. package/models/get-partner-hierarchy-tree-response-class.ts +31 -0
  128. package/models/get-partner-hierarchy-type-response-class.ts +31 -0
  129. package/models/index.ts +38 -0
  130. package/models/list-blacklist-items-response-class.ts +12 -0
  131. package/models/list-partner-hierarchies-response-class.ts +49 -0
  132. package/models/list-partner-hierarchy-node-history-response-class.ts +49 -0
  133. package/models/list-partner-hierarchy-nodes-response-class.ts +49 -0
  134. package/models/list-partner-hierarchy-operations-response-class.ts +49 -0
  135. package/models/list-partner-hierarchy-types-response-class.ts +49 -0
  136. package/models/list-partner-relation-class.ts +18 -6
  137. package/models/list-partner-relation-types-class.ts +18 -6
  138. package/models/list-partner-types-response-class.ts +18 -6
  139. package/models/list-partner-versions-response-class.ts +18 -6
  140. package/models/list-partners-response-class.ts +18 -6
  141. package/models/list-related-partners-response-class.ts +18 -6
  142. package/models/list-tags-response-class.ts +18 -6
  143. package/models/move-partner-hierarchy-node-request-dto.ts +36 -0
  144. package/models/move-partner-hierarchy-node-response-class.ts +31 -0
  145. package/models/partner-hierarchy-async-operation-response-class.ts +36 -0
  146. package/models/partner-hierarchy-class.ts +84 -0
  147. package/models/partner-hierarchy-node-class.ts +115 -0
  148. package/models/partner-hierarchy-node-history-class.ts +103 -0
  149. package/models/partner-hierarchy-node-tree-class.ts +102 -0
  150. package/models/partner-hierarchy-operation-class.ts +96 -0
  151. package/models/partner-hierarchy-type-class.ts +72 -0
  152. package/models/unassign-partner-hierarchy-node-response-class.ts +31 -0
  153. package/models/update-blacklist-reason-status-request-dto.ts +1 -1
  154. package/models/update-partner-hierarchy-node-request-dto.ts +36 -0
  155. package/models/update-partner-hierarchy-node-response-class.ts +31 -0
  156. package/models/update-partner-hierarchy-request-dto.ts +30 -0
  157. package/models/update-partner-hierarchy-response-class.ts +31 -0
  158. package/models/update-partner-hierarchy-tree-request-body-dto.ts +30 -0
  159. package/models/update-partner-hierarchy-type-request-dto.ts +36 -0
  160. package/models/update-partner-hierarchy-type-response-class.ts +31 -0
  161. package/models/validate-partner-request-dto.ts +36 -0
  162. package/models/validate-partner-response-class.ts +36 -0
  163. package/package.json +1 -1
@@ -0,0 +1,683 @@
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 { CreatePartnerHierarchyTypeRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreatePartnerHierarchyTypeResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { DeleteByCodeResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { GetPartnerHierarchyTypeResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { ListPartnerHierarchyTypesResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { UpdatePartnerHierarchyTypeRequestDto } from '../models';
35
+ // @ts-ignore
36
+ import { UpdatePartnerHierarchyTypeResponseClass } from '../models';
37
+ // URLSearchParams not necessarily used
38
+ // @ts-ignore
39
+ import { URL, URLSearchParams } from 'url';
40
+ const FormData = require('form-data');
41
+ /**
42
+ * PartnerHierarchyTypesApi - axios parameter creator
43
+ * @export
44
+ */
45
+ export const PartnerHierarchyTypesApiAxiosParamCreator = function (configuration?: Configuration) {
46
+ return {
47
+ /**
48
+ * Creates a new partner hierarchy type. The schema defines the level structure and valid role codes for all hierarchies of this type. **Required Permissions** \"partner-management.partners.create\"
49
+ * @summary Create a partner hierarchy type
50
+ * @param {CreatePartnerHierarchyTypeRequestDto} createPartnerHierarchyTypeRequestDto
51
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
52
+ * @param {*} [options] Override http request option.
53
+ * @throws {RequiredError}
54
+ */
55
+ createPartnerHierarchyType: async (createPartnerHierarchyTypeRequestDto: CreatePartnerHierarchyTypeRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
56
+ // verify required parameter 'createPartnerHierarchyTypeRequestDto' is not null or undefined
57
+ assertParamExists('createPartnerHierarchyType', 'createPartnerHierarchyTypeRequestDto', createPartnerHierarchyTypeRequestDto)
58
+ const localVarPath = `/partnerservice/v1/partner-hierarchy-types`;
59
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
60
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
61
+ let baseOptions;
62
+ let baseAccessToken;
63
+ if (configuration) {
64
+ baseOptions = configuration.baseOptions;
65
+ baseAccessToken = configuration.accessToken;
66
+ }
67
+
68
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
69
+ const localVarHeaderParameter = {} as any;
70
+ const localVarQueryParameter = {} as any;
71
+
72
+ // authentication bearer required
73
+ // http bearer authentication required
74
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
75
+
76
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
77
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
78
+ }
79
+
80
+
81
+
82
+ localVarHeaderParameter['Content-Type'] = 'application/json';
83
+
84
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
85
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
86
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
87
+ localVarRequestOptions.data = serializeDataIfNeeded(createPartnerHierarchyTypeRequestDto, localVarRequestOptions, configuration)
88
+
89
+ return {
90
+ url: toPathString(localVarUrlObj),
91
+ options: localVarRequestOptions,
92
+ };
93
+ },
94
+ /**
95
+ * Soft-deletes a partner hierarchy type. Blocked if any partner hierarchy instances reference this type. **Required Permissions** \"partner-management.partners.delete\"
96
+ * @summary Delete a partner hierarchy type
97
+ * @param {string} code Unique identifier for the object.
98
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
99
+ * @param {*} [options] Override http request option.
100
+ * @throws {RequiredError}
101
+ */
102
+ deletePartnerHierarchyType: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
103
+ // verify required parameter 'code' is not null or undefined
104
+ assertParamExists('deletePartnerHierarchyType', 'code', code)
105
+ const localVarPath = `/partnerservice/v1/partner-hierarchy-types/{code}`
106
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
107
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
108
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
109
+ let baseOptions;
110
+ let baseAccessToken;
111
+ if (configuration) {
112
+ baseOptions = configuration.baseOptions;
113
+ baseAccessToken = configuration.accessToken;
114
+ }
115
+
116
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
117
+ const localVarHeaderParameter = {} as any;
118
+ const localVarQueryParameter = {} as any;
119
+
120
+ // authentication bearer required
121
+ // http bearer authentication required
122
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
123
+
124
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
126
+ }
127
+
128
+
129
+
130
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
131
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
132
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
133
+
134
+ return {
135
+ url: toPathString(localVarUrlObj),
136
+ options: localVarRequestOptions,
137
+ };
138
+ },
139
+ /**
140
+ * Returns a partner hierarchy type by its code, including the full schema. **Required Permissions** \"partner-management.partners.view\"
141
+ * @summary Get a partner hierarchy type
142
+ * @param {string} code Unique identifier for the object.
143
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ getPartnerHierarchyType: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
148
+ // verify required parameter 'code' is not null or undefined
149
+ assertParamExists('getPartnerHierarchyType', 'code', code)
150
+ const localVarPath = `/partnerservice/v1/partner-hierarchy-types/{code}`
151
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
152
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
153
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
154
+ let baseOptions;
155
+ let baseAccessToken;
156
+ if (configuration) {
157
+ baseOptions = configuration.baseOptions;
158
+ baseAccessToken = configuration.accessToken;
159
+ }
160
+
161
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
162
+ const localVarHeaderParameter = {} as any;
163
+ const localVarQueryParameter = {} as any;
164
+
165
+ // authentication bearer required
166
+ // http bearer authentication required
167
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
168
+
169
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
170
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
171
+ }
172
+
173
+
174
+
175
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
176
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
177
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
178
+
179
+ return {
180
+ url: toPathString(localVarUrlObj),
181
+ options: localVarRequestOptions,
182
+ };
183
+ },
184
+ /**
185
+ * Returns a paginated list of partner hierarchy types. **Required Permissions** \"partner-management.partners.view\"
186
+ * @summary List partner hierarchy types
187
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
188
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
189
+ * @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.
190
+ * @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, createdAt, updatedAt&lt;/i&gt;
191
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
192
+ * @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;
193
+ * @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;
194
+ * @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, createdAt, updatedAt&lt;/i&gt;
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ listPartnerHierarchyTypes: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
199
+ const localVarPath = `/partnerservice/v1/partner-hierarchy-types`;
200
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
201
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
202
+ let baseOptions;
203
+ let baseAccessToken;
204
+ if (configuration) {
205
+ baseOptions = configuration.baseOptions;
206
+ baseAccessToken = configuration.accessToken;
207
+ }
208
+
209
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
210
+ const localVarHeaderParameter = {} as any;
211
+ const localVarQueryParameter = {} as any;
212
+
213
+ // authentication bearer required
214
+ // http bearer authentication required
215
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
216
+
217
+ if (pageSize !== undefined) {
218
+ localVarQueryParameter['pageSize'] = pageSize;
219
+ }
220
+
221
+ if (pageToken !== undefined) {
222
+ localVarQueryParameter['pageToken'] = pageToken;
223
+ }
224
+
225
+ if (filter !== undefined) {
226
+ localVarQueryParameter['filter'] = filter;
227
+ }
228
+
229
+ if (search !== undefined) {
230
+ localVarQueryParameter['search'] = search;
231
+ }
232
+
233
+ if (order !== undefined) {
234
+ localVarQueryParameter['order'] = order;
235
+ }
236
+
237
+ if (expand !== undefined) {
238
+ localVarQueryParameter['expand'] = expand;
239
+ }
240
+
241
+ if (filters !== undefined) {
242
+ localVarQueryParameter['filters'] = filters;
243
+ }
244
+
245
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
246
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
247
+ }
248
+
249
+
250
+
251
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
252
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
253
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
254
+
255
+ return {
256
+ url: toPathString(localVarUrlObj),
257
+ options: localVarRequestOptions,
258
+ };
259
+ },
260
+ /**
261
+ * Updates name or schema of a partner hierarchy type. Removing a depth level is blocked if any partner hierarchy nodes exist at that depth. Removing a role code is blocked if any partner hierarchy nodes use that role. **Required Permissions** \"partner-management.partners.update\"
262
+ * @summary Update a partner hierarchy type
263
+ * @param {string} code Unique identifier for the object.
264
+ * @param {UpdatePartnerHierarchyTypeRequestDto} updatePartnerHierarchyTypeRequestDto
265
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
266
+ * @param {*} [options] Override http request option.
267
+ * @throws {RequiredError}
268
+ */
269
+ updatePartnerHierarchyType: async (code: string, updatePartnerHierarchyTypeRequestDto: UpdatePartnerHierarchyTypeRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
270
+ // verify required parameter 'code' is not null or undefined
271
+ assertParamExists('updatePartnerHierarchyType', 'code', code)
272
+ // verify required parameter 'updatePartnerHierarchyTypeRequestDto' is not null or undefined
273
+ assertParamExists('updatePartnerHierarchyType', 'updatePartnerHierarchyTypeRequestDto', updatePartnerHierarchyTypeRequestDto)
274
+ const localVarPath = `/partnerservice/v1/partner-hierarchy-types/{code}`
275
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
276
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
277
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
278
+ let baseOptions;
279
+ let baseAccessToken;
280
+ if (configuration) {
281
+ baseOptions = configuration.baseOptions;
282
+ baseAccessToken = configuration.accessToken;
283
+ }
284
+
285
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
286
+ const localVarHeaderParameter = {} as any;
287
+ const localVarQueryParameter = {} as any;
288
+
289
+ // authentication bearer required
290
+ // http bearer authentication required
291
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
292
+
293
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
294
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
295
+ }
296
+
297
+
298
+
299
+ localVarHeaderParameter['Content-Type'] = 'application/json';
300
+
301
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
302
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
303
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
304
+ localVarRequestOptions.data = serializeDataIfNeeded(updatePartnerHierarchyTypeRequestDto, localVarRequestOptions, configuration)
305
+
306
+ return {
307
+ url: toPathString(localVarUrlObj),
308
+ options: localVarRequestOptions,
309
+ };
310
+ },
311
+ }
312
+ };
313
+
314
+ /**
315
+ * PartnerHierarchyTypesApi - functional programming interface
316
+ * @export
317
+ */
318
+ export const PartnerHierarchyTypesApiFp = function(configuration?: Configuration) {
319
+ const localVarAxiosParamCreator = PartnerHierarchyTypesApiAxiosParamCreator(configuration)
320
+ return {
321
+ /**
322
+ * Creates a new partner hierarchy type. The schema defines the level structure and valid role codes for all hierarchies of this type. **Required Permissions** \"partner-management.partners.create\"
323
+ * @summary Create a partner hierarchy type
324
+ * @param {CreatePartnerHierarchyTypeRequestDto} createPartnerHierarchyTypeRequestDto
325
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ async createPartnerHierarchyType(createPartnerHierarchyTypeRequestDto: CreatePartnerHierarchyTypeRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePartnerHierarchyTypeResponseClass>> {
330
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPartnerHierarchyType(createPartnerHierarchyTypeRequestDto, authorization, options);
331
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
332
+ },
333
+ /**
334
+ * Soft-deletes a partner hierarchy type. Blocked if any partner hierarchy instances reference this type. **Required Permissions** \"partner-management.partners.delete\"
335
+ * @summary Delete a partner hierarchy type
336
+ * @param {string} code Unique identifier for the object.
337
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
338
+ * @param {*} [options] Override http request option.
339
+ * @throws {RequiredError}
340
+ */
341
+ async deletePartnerHierarchyType(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteByCodeResponseClass>> {
342
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deletePartnerHierarchyType(code, authorization, options);
343
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
344
+ },
345
+ /**
346
+ * Returns a partner hierarchy type by its code, including the full schema. **Required Permissions** \"partner-management.partners.view\"
347
+ * @summary Get a partner hierarchy type
348
+ * @param {string} code Unique identifier for the object.
349
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ async getPartnerHierarchyType(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPartnerHierarchyTypeResponseClass>> {
354
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPartnerHierarchyType(code, authorization, options);
355
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
356
+ },
357
+ /**
358
+ * Returns a paginated list of partner hierarchy types. **Required Permissions** \"partner-management.partners.view\"
359
+ * @summary List partner hierarchy types
360
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
361
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
362
+ * @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.
363
+ * @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, createdAt, updatedAt&lt;/i&gt;
364
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
365
+ * @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;
366
+ * @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;
367
+ * @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, createdAt, updatedAt&lt;/i&gt;
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ */
371
+ async listPartnerHierarchyTypes(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPartnerHierarchyTypesResponseClass>> {
372
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPartnerHierarchyTypes(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
373
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
374
+ },
375
+ /**
376
+ * Updates name or schema of a partner hierarchy type. Removing a depth level is blocked if any partner hierarchy nodes exist at that depth. Removing a role code is blocked if any partner hierarchy nodes use that role. **Required Permissions** \"partner-management.partners.update\"
377
+ * @summary Update a partner hierarchy type
378
+ * @param {string} code Unique identifier for the object.
379
+ * @param {UpdatePartnerHierarchyTypeRequestDto} updatePartnerHierarchyTypeRequestDto
380
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
381
+ * @param {*} [options] Override http request option.
382
+ * @throws {RequiredError}
383
+ */
384
+ async updatePartnerHierarchyType(code: string, updatePartnerHierarchyTypeRequestDto: UpdatePartnerHierarchyTypeRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdatePartnerHierarchyTypeResponseClass>> {
385
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePartnerHierarchyType(code, updatePartnerHierarchyTypeRequestDto, authorization, options);
386
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
387
+ },
388
+ }
389
+ };
390
+
391
+ /**
392
+ * PartnerHierarchyTypesApi - factory interface
393
+ * @export
394
+ */
395
+ export const PartnerHierarchyTypesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
396
+ const localVarFp = PartnerHierarchyTypesApiFp(configuration)
397
+ return {
398
+ /**
399
+ * Creates a new partner hierarchy type. The schema defines the level structure and valid role codes for all hierarchies of this type. **Required Permissions** \"partner-management.partners.create\"
400
+ * @summary Create a partner hierarchy type
401
+ * @param {CreatePartnerHierarchyTypeRequestDto} createPartnerHierarchyTypeRequestDto
402
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
403
+ * @param {*} [options] Override http request option.
404
+ * @throws {RequiredError}
405
+ */
406
+ createPartnerHierarchyType(createPartnerHierarchyTypeRequestDto: CreatePartnerHierarchyTypeRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePartnerHierarchyTypeResponseClass> {
407
+ return localVarFp.createPartnerHierarchyType(createPartnerHierarchyTypeRequestDto, authorization, options).then((request) => request(axios, basePath));
408
+ },
409
+ /**
410
+ * Soft-deletes a partner hierarchy type. Blocked if any partner hierarchy instances reference this type. **Required Permissions** \"partner-management.partners.delete\"
411
+ * @summary Delete a partner hierarchy type
412
+ * @param {string} code Unique identifier for the object.
413
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ */
417
+ deletePartnerHierarchyType(code: string, authorization?: string, options?: any): AxiosPromise<DeleteByCodeResponseClass> {
418
+ return localVarFp.deletePartnerHierarchyType(code, authorization, options).then((request) => request(axios, basePath));
419
+ },
420
+ /**
421
+ * Returns a partner hierarchy type by its code, including the full schema. **Required Permissions** \"partner-management.partners.view\"
422
+ * @summary Get a partner hierarchy type
423
+ * @param {string} code Unique identifier for the object.
424
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
425
+ * @param {*} [options] Override http request option.
426
+ * @throws {RequiredError}
427
+ */
428
+ getPartnerHierarchyType(code: string, authorization?: string, options?: any): AxiosPromise<GetPartnerHierarchyTypeResponseClass> {
429
+ return localVarFp.getPartnerHierarchyType(code, authorization, options).then((request) => request(axios, basePath));
430
+ },
431
+ /**
432
+ * Returns a paginated list of partner hierarchy types. **Required Permissions** \"partner-management.partners.view\"
433
+ * @summary List partner hierarchy types
434
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
435
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
436
+ * @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.
437
+ * @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, createdAt, updatedAt&lt;/i&gt;
438
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
439
+ * @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;
440
+ * @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;
441
+ * @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, createdAt, updatedAt&lt;/i&gt;
442
+ * @param {*} [options] Override http request option.
443
+ * @throws {RequiredError}
444
+ */
445
+ listPartnerHierarchyTypes(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPartnerHierarchyTypesResponseClass> {
446
+ return localVarFp.listPartnerHierarchyTypes(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
447
+ },
448
+ /**
449
+ * Updates name or schema of a partner hierarchy type. Removing a depth level is blocked if any partner hierarchy nodes exist at that depth. Removing a role code is blocked if any partner hierarchy nodes use that role. **Required Permissions** \"partner-management.partners.update\"
450
+ * @summary Update a partner hierarchy type
451
+ * @param {string} code Unique identifier for the object.
452
+ * @param {UpdatePartnerHierarchyTypeRequestDto} updatePartnerHierarchyTypeRequestDto
453
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
454
+ * @param {*} [options] Override http request option.
455
+ * @throws {RequiredError}
456
+ */
457
+ updatePartnerHierarchyType(code: string, updatePartnerHierarchyTypeRequestDto: UpdatePartnerHierarchyTypeRequestDto, authorization?: string, options?: any): AxiosPromise<UpdatePartnerHierarchyTypeResponseClass> {
458
+ return localVarFp.updatePartnerHierarchyType(code, updatePartnerHierarchyTypeRequestDto, authorization, options).then((request) => request(axios, basePath));
459
+ },
460
+ };
461
+ };
462
+
463
+ /**
464
+ * Request parameters for createPartnerHierarchyType operation in PartnerHierarchyTypesApi.
465
+ * @export
466
+ * @interface PartnerHierarchyTypesApiCreatePartnerHierarchyTypeRequest
467
+ */
468
+ export interface PartnerHierarchyTypesApiCreatePartnerHierarchyTypeRequest {
469
+ /**
470
+ *
471
+ * @type {CreatePartnerHierarchyTypeRequestDto}
472
+ * @memberof PartnerHierarchyTypesApiCreatePartnerHierarchyType
473
+ */
474
+ readonly createPartnerHierarchyTypeRequestDto: CreatePartnerHierarchyTypeRequestDto
475
+
476
+ /**
477
+ * Bearer Token: provided by the login endpoint under the name accessToken.
478
+ * @type {string}
479
+ * @memberof PartnerHierarchyTypesApiCreatePartnerHierarchyType
480
+ */
481
+ readonly authorization?: string
482
+ }
483
+
484
+ /**
485
+ * Request parameters for deletePartnerHierarchyType operation in PartnerHierarchyTypesApi.
486
+ * @export
487
+ * @interface PartnerHierarchyTypesApiDeletePartnerHierarchyTypeRequest
488
+ */
489
+ export interface PartnerHierarchyTypesApiDeletePartnerHierarchyTypeRequest {
490
+ /**
491
+ * Unique identifier for the object.
492
+ * @type {string}
493
+ * @memberof PartnerHierarchyTypesApiDeletePartnerHierarchyType
494
+ */
495
+ readonly code: string
496
+
497
+ /**
498
+ * Bearer Token: provided by the login endpoint under the name accessToken.
499
+ * @type {string}
500
+ * @memberof PartnerHierarchyTypesApiDeletePartnerHierarchyType
501
+ */
502
+ readonly authorization?: string
503
+ }
504
+
505
+ /**
506
+ * Request parameters for getPartnerHierarchyType operation in PartnerHierarchyTypesApi.
507
+ * @export
508
+ * @interface PartnerHierarchyTypesApiGetPartnerHierarchyTypeRequest
509
+ */
510
+ export interface PartnerHierarchyTypesApiGetPartnerHierarchyTypeRequest {
511
+ /**
512
+ * Unique identifier for the object.
513
+ * @type {string}
514
+ * @memberof PartnerHierarchyTypesApiGetPartnerHierarchyType
515
+ */
516
+ readonly code: string
517
+
518
+ /**
519
+ * Bearer Token: provided by the login endpoint under the name accessToken.
520
+ * @type {string}
521
+ * @memberof PartnerHierarchyTypesApiGetPartnerHierarchyType
522
+ */
523
+ readonly authorization?: string
524
+ }
525
+
526
+ /**
527
+ * Request parameters for listPartnerHierarchyTypes operation in PartnerHierarchyTypesApi.
528
+ * @export
529
+ * @interface PartnerHierarchyTypesApiListPartnerHierarchyTypesRequest
530
+ */
531
+ export interface PartnerHierarchyTypesApiListPartnerHierarchyTypesRequest {
532
+ /**
533
+ * Bearer Token: provided by the login endpoint under the name accessToken.
534
+ * @type {string}
535
+ * @memberof PartnerHierarchyTypesApiListPartnerHierarchyTypes
536
+ */
537
+ readonly authorization?: string
538
+
539
+ /**
540
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
541
+ * @type {number}
542
+ * @memberof PartnerHierarchyTypesApiListPartnerHierarchyTypes
543
+ */
544
+ readonly pageSize?: number
545
+
546
+ /**
547
+ * 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.
548
+ * @type {string}
549
+ * @memberof PartnerHierarchyTypesApiListPartnerHierarchyTypes
550
+ */
551
+ readonly pageToken?: string
552
+
553
+ /**
554
+ * 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, createdAt, updatedAt&lt;/i&gt;
555
+ * @type {string}
556
+ * @memberof PartnerHierarchyTypesApiListPartnerHierarchyTypes
557
+ */
558
+ readonly filter?: string
559
+
560
+ /**
561
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
562
+ * @type {string}
563
+ * @memberof PartnerHierarchyTypesApiListPartnerHierarchyTypes
564
+ */
565
+ readonly search?: string
566
+
567
+ /**
568
+ * 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;
569
+ * @type {string}
570
+ * @memberof PartnerHierarchyTypesApiListPartnerHierarchyTypes
571
+ */
572
+ readonly order?: string
573
+
574
+ /**
575
+ * 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;
576
+ * @type {string}
577
+ * @memberof PartnerHierarchyTypesApiListPartnerHierarchyTypes
578
+ */
579
+ readonly expand?: string
580
+
581
+ /**
582
+ * 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, createdAt, updatedAt&lt;/i&gt;
583
+ * @type {string}
584
+ * @memberof PartnerHierarchyTypesApiListPartnerHierarchyTypes
585
+ */
586
+ readonly filters?: string
587
+ }
588
+
589
+ /**
590
+ * Request parameters for updatePartnerHierarchyType operation in PartnerHierarchyTypesApi.
591
+ * @export
592
+ * @interface PartnerHierarchyTypesApiUpdatePartnerHierarchyTypeRequest
593
+ */
594
+ export interface PartnerHierarchyTypesApiUpdatePartnerHierarchyTypeRequest {
595
+ /**
596
+ * Unique identifier for the object.
597
+ * @type {string}
598
+ * @memberof PartnerHierarchyTypesApiUpdatePartnerHierarchyType
599
+ */
600
+ readonly code: string
601
+
602
+ /**
603
+ *
604
+ * @type {UpdatePartnerHierarchyTypeRequestDto}
605
+ * @memberof PartnerHierarchyTypesApiUpdatePartnerHierarchyType
606
+ */
607
+ readonly updatePartnerHierarchyTypeRequestDto: UpdatePartnerHierarchyTypeRequestDto
608
+
609
+ /**
610
+ * Bearer Token: provided by the login endpoint under the name accessToken.
611
+ * @type {string}
612
+ * @memberof PartnerHierarchyTypesApiUpdatePartnerHierarchyType
613
+ */
614
+ readonly authorization?: string
615
+ }
616
+
617
+ /**
618
+ * PartnerHierarchyTypesApi - object-oriented interface
619
+ * @export
620
+ * @class PartnerHierarchyTypesApi
621
+ * @extends {BaseAPI}
622
+ */
623
+ export class PartnerHierarchyTypesApi extends BaseAPI {
624
+ /**
625
+ * Creates a new partner hierarchy type. The schema defines the level structure and valid role codes for all hierarchies of this type. **Required Permissions** \"partner-management.partners.create\"
626
+ * @summary Create a partner hierarchy type
627
+ * @param {PartnerHierarchyTypesApiCreatePartnerHierarchyTypeRequest} requestParameters Request parameters.
628
+ * @param {*} [options] Override http request option.
629
+ * @throws {RequiredError}
630
+ * @memberof PartnerHierarchyTypesApi
631
+ */
632
+ public createPartnerHierarchyType(requestParameters: PartnerHierarchyTypesApiCreatePartnerHierarchyTypeRequest, options?: AxiosRequestConfig) {
633
+ return PartnerHierarchyTypesApiFp(this.configuration).createPartnerHierarchyType(requestParameters.createPartnerHierarchyTypeRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
634
+ }
635
+
636
+ /**
637
+ * Soft-deletes a partner hierarchy type. Blocked if any partner hierarchy instances reference this type. **Required Permissions** \"partner-management.partners.delete\"
638
+ * @summary Delete a partner hierarchy type
639
+ * @param {PartnerHierarchyTypesApiDeletePartnerHierarchyTypeRequest} requestParameters Request parameters.
640
+ * @param {*} [options] Override http request option.
641
+ * @throws {RequiredError}
642
+ * @memberof PartnerHierarchyTypesApi
643
+ */
644
+ public deletePartnerHierarchyType(requestParameters: PartnerHierarchyTypesApiDeletePartnerHierarchyTypeRequest, options?: AxiosRequestConfig) {
645
+ return PartnerHierarchyTypesApiFp(this.configuration).deletePartnerHierarchyType(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
646
+ }
647
+
648
+ /**
649
+ * Returns a partner hierarchy type by its code, including the full schema. **Required Permissions** \"partner-management.partners.view\"
650
+ * @summary Get a partner hierarchy type
651
+ * @param {PartnerHierarchyTypesApiGetPartnerHierarchyTypeRequest} requestParameters Request parameters.
652
+ * @param {*} [options] Override http request option.
653
+ * @throws {RequiredError}
654
+ * @memberof PartnerHierarchyTypesApi
655
+ */
656
+ public getPartnerHierarchyType(requestParameters: PartnerHierarchyTypesApiGetPartnerHierarchyTypeRequest, options?: AxiosRequestConfig) {
657
+ return PartnerHierarchyTypesApiFp(this.configuration).getPartnerHierarchyType(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
658
+ }
659
+
660
+ /**
661
+ * Returns a paginated list of partner hierarchy types. **Required Permissions** \"partner-management.partners.view\"
662
+ * @summary List partner hierarchy types
663
+ * @param {PartnerHierarchyTypesApiListPartnerHierarchyTypesRequest} requestParameters Request parameters.
664
+ * @param {*} [options] Override http request option.
665
+ * @throws {RequiredError}
666
+ * @memberof PartnerHierarchyTypesApi
667
+ */
668
+ public listPartnerHierarchyTypes(requestParameters: PartnerHierarchyTypesApiListPartnerHierarchyTypesRequest = {}, options?: AxiosRequestConfig) {
669
+ return PartnerHierarchyTypesApiFp(this.configuration).listPartnerHierarchyTypes(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
670
+ }
671
+
672
+ /**
673
+ * Updates name or schema of a partner hierarchy type. Removing a depth level is blocked if any partner hierarchy nodes exist at that depth. Removing a role code is blocked if any partner hierarchy nodes use that role. **Required Permissions** \"partner-management.partners.update\"
674
+ * @summary Update a partner hierarchy type
675
+ * @param {PartnerHierarchyTypesApiUpdatePartnerHierarchyTypeRequest} requestParameters Request parameters.
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ * @memberof PartnerHierarchyTypesApi
679
+ */
680
+ public updatePartnerHierarchyType(requestParameters: PartnerHierarchyTypesApiUpdatePartnerHierarchyTypeRequest, options?: AxiosRequestConfig) {
681
+ return PartnerHierarchyTypesApiFp(this.configuration).updatePartnerHierarchyType(requestParameters.code, requestParameters.updatePartnerHierarchyTypeRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
682
+ }
683
+ }