@emilgroup/partner-sdk 1.22.1-beta.14 → 1.22.1-beta.15

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