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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/README.md +2 -2
  3. package/api/partner-hierarchies-api.ts +0 -201
  4. package/api/partner-hierarchy-operations-api.ts +367 -0
  5. package/api/partners-api.ts +4 -4
  6. package/api.ts +2 -0
  7. package/dist/api/partner-hierarchies-api.d.ts +0 -119
  8. package/dist/api/partner-hierarchies-api.js +0 -134
  9. package/dist/api/partner-hierarchy-operations-api.d.ts +215 -0
  10. package/dist/api/partner-hierarchy-operations-api.js +362 -0
  11. package/dist/api/partners-api.d.ts +4 -4
  12. package/dist/api/partners-api.js +4 -4
  13. package/dist/api.d.ts +1 -0
  14. package/dist/api.js +1 -0
  15. package/dist/models/get-partner-hierarchy-operation-response-class.d.ts +25 -0
  16. package/dist/models/get-partner-hierarchy-operation-response-class.js +15 -0
  17. package/dist/models/get-partner-hierarchy-tree-file-response-class.d.ts +22 -4
  18. package/dist/models/index.d.ts +1 -0
  19. package/dist/models/index.js +1 -0
  20. package/dist/models/partner-hierarchy-class.d.ts +0 -6
  21. package/dist/models/partner-hierarchy-operation-class.d.ts +29 -9
  22. package/dist/models/partner-hierarchy-operation-class.js +12 -0
  23. package/dist/models/validate-partner-request-dto.d.ts +21 -3
  24. package/dist/models/validate-partner-response-class.d.ts +1 -1
  25. package/models/get-partner-hierarchy-operation-response-class.ts +31 -0
  26. package/models/get-partner-hierarchy-tree-file-response-class.ts +22 -4
  27. package/models/index.ts +1 -0
  28. package/models/partner-hierarchy-class.ts +0 -6
  29. package/models/partner-hierarchy-operation-class.ts +33 -9
  30. package/models/validate-partner-request-dto.ts +21 -3
  31. package/models/validate-partner-response-class.ts +1 -1
  32. package/package.json +2 -2
@@ -8,6 +8,7 @@ api/blacklist-reasons-api.ts
8
8
  api/health-api.ts
9
9
  api/partner-hierarchies-api.ts
10
10
  api/partner-hierarchy-nodes-api.ts
11
+ api/partner-hierarchy-operations-api.ts
11
12
  api/partner-hierarchy-types-api.ts
12
13
  api/partner-invitations-api.ts
13
14
  api/partner-relations-api.ts
@@ -49,6 +50,7 @@ models/generate-upload-url-response-class.ts
49
50
  models/get-blacklist-item-response-class.ts
50
51
  models/get-blacklist-reason-response-class.ts
51
52
  models/get-partner-hierarchy-node-response-class.ts
53
+ models/get-partner-hierarchy-operation-response-class.ts
52
54
  models/get-partner-hierarchy-response-class.ts
53
55
  models/get-partner-hierarchy-tree-file-response-class.ts
54
56
  models/get-partner-hierarchy-tree-response-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/partner-sdk-node@1.23.1-beta.0 --save
20
+ npm install @emilgroup/partner-sdk-node@1.23.1-beta.2 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/partner-sdk-node@1.23.1-beta.0
24
+ yarn add @emilgroup/partner-sdk-node@1.23.1-beta.2
25
25
  ```
26
26
 
27
27
  And then you can import `PartnersApi`.
@@ -37,8 +37,6 @@ import { GetPartnerHierarchyTreeResponseClass } from '../models';
37
37
  // @ts-ignore
38
38
  import { ListPartnerHierarchiesResponseClass } from '../models';
39
39
  // @ts-ignore
40
- import { ListPartnerHierarchyOperationsResponseClass } from '../models';
41
- // @ts-ignore
42
40
  import { PartnerHierarchyAsyncOperationResponseClass } from '../models';
43
41
  // @ts-ignore
44
42
  import { UpdatePartnerHierarchyRequestDto } from '../models';
@@ -417,86 +415,6 @@ export const PartnerHierarchiesApiAxiosParamCreator = function (configuration?:
417
415
 
418
416
 
419
417
 
420
- setSearchParams(localVarUrlObj, localVarQueryParameter);
421
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
422
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
423
-
424
- return {
425
- url: toPathString(localVarUrlObj),
426
- options: localVarRequestOptions,
427
- };
428
- },
429
- /**
430
- * Returns long-running file operations for this partner hierarchy, such as tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.view\"
431
- * @summary List partner hierarchy file operations
432
- * @param {any} code Unique identifier for the object.
433
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
434
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
435
- * @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=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
436
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt</i>
437
- * @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
438
- * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, name, createdAt, updatedAt</i>
439
- * @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.<br/> <br/>
440
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt</i>
441
- * @param {*} [options] Override http request option.
442
- * @throws {RequiredError}
443
- */
444
- listPartnerHierarchyOperations: async (code: any, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
445
- // verify required parameter 'code' is not null or undefined
446
- assertParamExists('listPartnerHierarchyOperations', 'code', code)
447
- const localVarPath = `/partnerservice/v1/partner-hierarchies/{code}/operations`
448
- .replace(`{${"code"}}`, encodeURIComponent(String(code)));
449
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
450
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
451
- let baseOptions;
452
- let baseAccessToken;
453
- if (configuration) {
454
- baseOptions = configuration.baseOptions;
455
- baseAccessToken = configuration.accessToken;
456
- }
457
-
458
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
459
- const localVarHeaderParameter = {} as any;
460
- const localVarQueryParameter = {} as any;
461
-
462
- // authentication bearer required
463
- // http bearer authentication required
464
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
465
-
466
- if (pageSize !== undefined) {
467
- localVarQueryParameter['pageSize'] = pageSize;
468
- }
469
-
470
- if (pageToken !== undefined) {
471
- localVarQueryParameter['pageToken'] = pageToken;
472
- }
473
-
474
- if (filter !== undefined) {
475
- localVarQueryParameter['filter'] = filter;
476
- }
477
-
478
- if (search !== undefined) {
479
- localVarQueryParameter['search'] = search;
480
- }
481
-
482
- if (order !== undefined) {
483
- localVarQueryParameter['order'] = order;
484
- }
485
-
486
- if (expand !== undefined) {
487
- localVarQueryParameter['expand'] = expand;
488
- }
489
-
490
- if (filters !== undefined) {
491
- localVarQueryParameter['filters'] = filters;
492
- }
493
-
494
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
495
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
496
- }
497
-
498
-
499
-
500
418
  setSearchParams(localVarUrlObj, localVarQueryParameter);
501
419
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
502
420
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -712,25 +630,6 @@ export const PartnerHierarchiesApiFp = function(configuration?: Configuration) {
712
630
  const localVarAxiosArgs = await localVarAxiosParamCreator.listPartnerHierarchies(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
713
631
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
714
632
  },
715
- /**
716
- * Returns long-running file operations for this partner hierarchy, such as tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.view\"
717
- * @summary List partner hierarchy file operations
718
- * @param {any} code Unique identifier for the object.
719
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
720
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
721
- * @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.
722
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
723
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
724
- * @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;
725
- * @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;
726
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
727
- * @param {*} [options] Override http request option.
728
- * @throws {RequiredError}
729
- */
730
- async listPartnerHierarchyOperations(code: any, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPartnerHierarchyOperationsResponseClass>> {
731
- const localVarAxiosArgs = await localVarAxiosParamCreator.listPartnerHierarchyOperations(code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
732
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
733
- },
734
633
  /**
735
634
  * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
736
635
  * @summary Update a partner hierarchy
@@ -854,24 +753,6 @@ export const PartnerHierarchiesApiFactory = function (configuration?: Configurat
854
753
  listPartnerHierarchies(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPartnerHierarchiesResponseClass> {
855
754
  return localVarFp.listPartnerHierarchies(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
856
755
  },
857
- /**
858
- * Returns long-running file operations for this partner hierarchy, such as tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.view\"
859
- * @summary List partner hierarchy file operations
860
- * @param {any} code Unique identifier for the object.
861
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
862
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
863
- * @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.
864
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
865
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
866
- * @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;
867
- * @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;
868
- * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
869
- * @param {*} [options] Override http request option.
870
- * @throws {RequiredError}
871
- */
872
- listPartnerHierarchyOperations(code: any, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPartnerHierarchyOperationsResponseClass> {
873
- return localVarFp.listPartnerHierarchyOperations(code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
874
- },
875
756
  /**
876
757
  * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
877
758
  * @summary Update a partner hierarchy
@@ -1116,76 +997,6 @@ export interface PartnerHierarchiesApiListPartnerHierarchiesRequest {
1116
997
  readonly filters?: string
1117
998
  }
1118
999
 
1119
- /**
1120
- * Request parameters for listPartnerHierarchyOperations operation in PartnerHierarchiesApi.
1121
- * @export
1122
- * @interface PartnerHierarchiesApiListPartnerHierarchyOperationsRequest
1123
- */
1124
- export interface PartnerHierarchiesApiListPartnerHierarchyOperationsRequest {
1125
- /**
1126
- * Unique identifier for the object.
1127
- * @type {any}
1128
- * @memberof PartnerHierarchiesApiListPartnerHierarchyOperations
1129
- */
1130
- readonly code: any
1131
-
1132
- /**
1133
- * Bearer Token: provided by the login endpoint under the name accessToken.
1134
- * @type {string}
1135
- * @memberof PartnerHierarchiesApiListPartnerHierarchyOperations
1136
- */
1137
- readonly authorization?: string
1138
-
1139
- /**
1140
- * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
1141
- * @type {number}
1142
- * @memberof PartnerHierarchiesApiListPartnerHierarchyOperations
1143
- */
1144
- readonly pageSize?: number
1145
-
1146
- /**
1147
- * 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.
1148
- * @type {string}
1149
- * @memberof PartnerHierarchiesApiListPartnerHierarchyOperations
1150
- */
1151
- readonly pageToken?: string
1152
-
1153
- /**
1154
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
1155
- * @type {string}
1156
- * @memberof PartnerHierarchiesApiListPartnerHierarchyOperations
1157
- */
1158
- readonly filter?: string
1159
-
1160
- /**
1161
- * To search the list by any field, pass search&#x3D;xxx to fetch the result.
1162
- * @type {string}
1163
- * @memberof PartnerHierarchiesApiListPartnerHierarchyOperations
1164
- */
1165
- readonly search?: string
1166
-
1167
- /**
1168
- * 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;
1169
- * @type {string}
1170
- * @memberof PartnerHierarchiesApiListPartnerHierarchyOperations
1171
- */
1172
- readonly order?: string
1173
-
1174
- /**
1175
- * 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;
1176
- * @type {string}
1177
- * @memberof PartnerHierarchiesApiListPartnerHierarchyOperations
1178
- */
1179
- readonly expand?: string
1180
-
1181
- /**
1182
- * Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, name, partnerHierarchyTypeCode, createdAt, updatedAt&lt;/i&gt;
1183
- * @type {string}
1184
- * @memberof PartnerHierarchiesApiListPartnerHierarchyOperations
1185
- */
1186
- readonly filters?: string
1187
- }
1188
-
1189
1000
  /**
1190
1001
  * Request parameters for updatePartnerHierarchy operation in PartnerHierarchiesApi.
1191
1002
  * @export
@@ -1333,18 +1144,6 @@ export class PartnerHierarchiesApi extends BaseAPI {
1333
1144
  return PartnerHierarchiesApiFp(this.configuration).listPartnerHierarchies(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
1334
1145
  }
1335
1146
 
1336
- /**
1337
- * Returns long-running file operations for this partner hierarchy, such as tree replacement or batch node creation. **Required Permissions** \"partner-management.partners.view\"
1338
- * @summary List partner hierarchy file operations
1339
- * @param {PartnerHierarchiesApiListPartnerHierarchyOperationsRequest} requestParameters Request parameters.
1340
- * @param {*} [options] Override http request option.
1341
- * @throws {RequiredError}
1342
- * @memberof PartnerHierarchiesApi
1343
- */
1344
- public listPartnerHierarchyOperations(requestParameters: PartnerHierarchiesApiListPartnerHierarchyOperationsRequest, options?: AxiosRequestConfig) {
1345
- return PartnerHierarchiesApiFp(this.configuration).listPartnerHierarchyOperations(requestParameters.code, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
1346
- }
1347
-
1348
1147
  /**
1349
1148
  * Updates the partner hierarchy details without changing any nodes in the tree. **Required Permissions** \"partner-management.partners.update\"
1350
1149
  * @summary Update a partner hierarchy
@@ -0,0 +1,367 @@
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 { GetPartnerHierarchyOperationResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { ListPartnerHierarchyOperationsResponseClass } from '../models';
27
+ // URLSearchParams not necessarily used
28
+ // @ts-ignore
29
+ import { URL, URLSearchParams } from 'url';
30
+ const FormData = require('form-data');
31
+ /**
32
+ * PartnerHierarchyOperationsApi - axios parameter creator
33
+ * @export
34
+ */
35
+ export const PartnerHierarchyOperationsApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ * Returns one partner hierarchy background operation by code. Use expand=partnerHierarchy to include the hierarchy. **Required Permissions** \"partner-management.partners.view\"
39
+ * @summary Get a partner hierarchy operation
40
+ * @param {string} code
41
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
42
+ * @param {string} [expand]
43
+ * @param {*} [options] Override http request option.
44
+ * @throws {RequiredError}
45
+ */
46
+ getPartnerHierarchyOperation: async (code: string, authorization?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
47
+ // verify required parameter 'code' is not null or undefined
48
+ assertParamExists('getPartnerHierarchyOperation', 'code', code)
49
+ const localVarPath = `/partnerservice/v1/partner-hierarchy-operations/{code}`
50
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
51
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
52
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
53
+ let baseOptions;
54
+ let baseAccessToken;
55
+ if (configuration) {
56
+ baseOptions = configuration.baseOptions;
57
+ baseAccessToken = configuration.accessToken;
58
+ }
59
+
60
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
61
+ const localVarHeaderParameter = {} as any;
62
+ const localVarQueryParameter = {} as any;
63
+
64
+ // authentication bearer required
65
+ // http bearer authentication required
66
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
67
+
68
+ if (expand !== undefined) {
69
+ localVarQueryParameter['expand'] = expand;
70
+ }
71
+
72
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
73
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
74
+ }
75
+
76
+
77
+
78
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
79
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
80
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
81
+
82
+ return {
83
+ url: toPathString(localVarUrlObj),
84
+ options: localVarRequestOptions,
85
+ };
86
+ },
87
+ /**
88
+ * Returns a paginated list of partner hierarchy background operations. Filter by partnerHierarchyCode, type, or status, and use expand=partnerHierarchy to include the hierarchy. **Required Permissions** \"partner-management.partners.view\"
89
+ * @summary List partner hierarchy operations
90
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
91
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
92
+ * @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.
93
+ * @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: code, partnerHierarchyCode, type, status, createdAt&lt;/i&gt;
94
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
95
+ * @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, type, status, createdAt, updatedAt&lt;/i&gt;
96
+ * @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;
97
+ * @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: code, partnerHierarchyCode, type, status, createdAt&lt;/i&gt;
98
+ * @param {*} [options] Override http request option.
99
+ * @throws {RequiredError}
100
+ */
101
+ listPartnerHierarchyOperations: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
102
+ const localVarPath = `/partnerservice/v1/partner-hierarchy-operations`;
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: 'GET', ...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 (pageSize !== undefined) {
121
+ localVarQueryParameter['pageSize'] = pageSize;
122
+ }
123
+
124
+ if (pageToken !== undefined) {
125
+ localVarQueryParameter['pageToken'] = pageToken;
126
+ }
127
+
128
+ if (filter !== undefined) {
129
+ localVarQueryParameter['filter'] = filter;
130
+ }
131
+
132
+ if (search !== undefined) {
133
+ localVarQueryParameter['search'] = search;
134
+ }
135
+
136
+ if (order !== undefined) {
137
+ localVarQueryParameter['order'] = order;
138
+ }
139
+
140
+ if (expand !== undefined) {
141
+ localVarQueryParameter['expand'] = expand;
142
+ }
143
+
144
+ if (filters !== undefined) {
145
+ localVarQueryParameter['filters'] = filters;
146
+ }
147
+
148
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
149
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
150
+ }
151
+
152
+
153
+
154
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
155
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
156
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
157
+
158
+ return {
159
+ url: toPathString(localVarUrlObj),
160
+ options: localVarRequestOptions,
161
+ };
162
+ },
163
+ }
164
+ };
165
+
166
+ /**
167
+ * PartnerHierarchyOperationsApi - functional programming interface
168
+ * @export
169
+ */
170
+ export const PartnerHierarchyOperationsApiFp = function(configuration?: Configuration) {
171
+ const localVarAxiosParamCreator = PartnerHierarchyOperationsApiAxiosParamCreator(configuration)
172
+ return {
173
+ /**
174
+ * Returns one partner hierarchy background operation by code. Use expand=partnerHierarchy to include the hierarchy. **Required Permissions** \"partner-management.partners.view\"
175
+ * @summary Get a partner hierarchy operation
176
+ * @param {string} code
177
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
178
+ * @param {string} [expand]
179
+ * @param {*} [options] Override http request option.
180
+ * @throws {RequiredError}
181
+ */
182
+ async getPartnerHierarchyOperation(code: string, authorization?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPartnerHierarchyOperationResponseClass>> {
183
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPartnerHierarchyOperation(code, authorization, expand, options);
184
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
185
+ },
186
+ /**
187
+ * Returns a paginated list of partner hierarchy background operations. Filter by partnerHierarchyCode, type, or status, and use expand=partnerHierarchy to include the hierarchy. **Required Permissions** \"partner-management.partners.view\"
188
+ * @summary List partner hierarchy operations
189
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
190
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
191
+ * @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.
192
+ * @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: code, partnerHierarchyCode, type, status, createdAt&lt;/i&gt;
193
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
194
+ * @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, type, status, createdAt, updatedAt&lt;/i&gt;
195
+ * @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;
196
+ * @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: code, partnerHierarchyCode, type, status, createdAt&lt;/i&gt;
197
+ * @param {*} [options] Override http request option.
198
+ * @throws {RequiredError}
199
+ */
200
+ async listPartnerHierarchyOperations(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPartnerHierarchyOperationsResponseClass>> {
201
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPartnerHierarchyOperations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
202
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
203
+ },
204
+ }
205
+ };
206
+
207
+ /**
208
+ * PartnerHierarchyOperationsApi - factory interface
209
+ * @export
210
+ */
211
+ export const PartnerHierarchyOperationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
212
+ const localVarFp = PartnerHierarchyOperationsApiFp(configuration)
213
+ return {
214
+ /**
215
+ * Returns one partner hierarchy background operation by code. Use expand=partnerHierarchy to include the hierarchy. **Required Permissions** \"partner-management.partners.view\"
216
+ * @summary Get a partner hierarchy operation
217
+ * @param {string} code
218
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
219
+ * @param {string} [expand]
220
+ * @param {*} [options] Override http request option.
221
+ * @throws {RequiredError}
222
+ */
223
+ getPartnerHierarchyOperation(code: string, authorization?: string, expand?: string, options?: any): AxiosPromise<GetPartnerHierarchyOperationResponseClass> {
224
+ return localVarFp.getPartnerHierarchyOperation(code, authorization, expand, options).then((request) => request(axios, basePath));
225
+ },
226
+ /**
227
+ * Returns a paginated list of partner hierarchy background operations. Filter by partnerHierarchyCode, type, or status, and use expand=partnerHierarchy to include the hierarchy. **Required Permissions** \"partner-management.partners.view\"
228
+ * @summary List partner hierarchy operations
229
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
230
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
231
+ * @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.
232
+ * @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: code, partnerHierarchyCode, type, status, createdAt&lt;/i&gt;
233
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
234
+ * @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, type, status, createdAt, updatedAt&lt;/i&gt;
235
+ * @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;
236
+ * @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: code, partnerHierarchyCode, type, status, createdAt&lt;/i&gt;
237
+ * @param {*} [options] Override http request option.
238
+ * @throws {RequiredError}
239
+ */
240
+ listPartnerHierarchyOperations(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPartnerHierarchyOperationsResponseClass> {
241
+ return localVarFp.listPartnerHierarchyOperations(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
242
+ },
243
+ };
244
+ };
245
+
246
+ /**
247
+ * Request parameters for getPartnerHierarchyOperation operation in PartnerHierarchyOperationsApi.
248
+ * @export
249
+ * @interface PartnerHierarchyOperationsApiGetPartnerHierarchyOperationRequest
250
+ */
251
+ export interface PartnerHierarchyOperationsApiGetPartnerHierarchyOperationRequest {
252
+ /**
253
+ *
254
+ * @type {string}
255
+ * @memberof PartnerHierarchyOperationsApiGetPartnerHierarchyOperation
256
+ */
257
+ readonly code: string
258
+
259
+ /**
260
+ * Bearer Token: provided by the login endpoint under the name accessToken.
261
+ * @type {string}
262
+ * @memberof PartnerHierarchyOperationsApiGetPartnerHierarchyOperation
263
+ */
264
+ readonly authorization?: string
265
+
266
+ /**
267
+ *
268
+ * @type {string}
269
+ * @memberof PartnerHierarchyOperationsApiGetPartnerHierarchyOperation
270
+ */
271
+ readonly expand?: string
272
+ }
273
+
274
+ /**
275
+ * Request parameters for listPartnerHierarchyOperations operation in PartnerHierarchyOperationsApi.
276
+ * @export
277
+ * @interface PartnerHierarchyOperationsApiListPartnerHierarchyOperationsRequest
278
+ */
279
+ export interface PartnerHierarchyOperationsApiListPartnerHierarchyOperationsRequest {
280
+ /**
281
+ * Bearer Token: provided by the login endpoint under the name accessToken.
282
+ * @type {string}
283
+ * @memberof PartnerHierarchyOperationsApiListPartnerHierarchyOperations
284
+ */
285
+ readonly authorization?: string
286
+
287
+ /**
288
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
289
+ * @type {number}
290
+ * @memberof PartnerHierarchyOperationsApiListPartnerHierarchyOperations
291
+ */
292
+ readonly pageSize?: number
293
+
294
+ /**
295
+ * 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.
296
+ * @type {string}
297
+ * @memberof PartnerHierarchyOperationsApiListPartnerHierarchyOperations
298
+ */
299
+ readonly pageToken?: string
300
+
301
+ /**
302
+ * 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: code, partnerHierarchyCode, type, status, createdAt&lt;/i&gt;
303
+ * @type {string}
304
+ * @memberof PartnerHierarchyOperationsApiListPartnerHierarchyOperations
305
+ */
306
+ readonly filter?: string
307
+
308
+ /**
309
+ * To search the list by any field, pass search&#x3D;xxx to fetch the result.
310
+ * @type {string}
311
+ * @memberof PartnerHierarchyOperationsApiListPartnerHierarchyOperations
312
+ */
313
+ readonly search?: string
314
+
315
+ /**
316
+ * 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, type, status, createdAt, updatedAt&lt;/i&gt;
317
+ * @type {string}
318
+ * @memberof PartnerHierarchyOperationsApiListPartnerHierarchyOperations
319
+ */
320
+ readonly order?: string
321
+
322
+ /**
323
+ * 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;
324
+ * @type {string}
325
+ * @memberof PartnerHierarchyOperationsApiListPartnerHierarchyOperations
326
+ */
327
+ readonly expand?: string
328
+
329
+ /**
330
+ * 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: code, partnerHierarchyCode, type, status, createdAt&lt;/i&gt;
331
+ * @type {string}
332
+ * @memberof PartnerHierarchyOperationsApiListPartnerHierarchyOperations
333
+ */
334
+ readonly filters?: string
335
+ }
336
+
337
+ /**
338
+ * PartnerHierarchyOperationsApi - object-oriented interface
339
+ * @export
340
+ * @class PartnerHierarchyOperationsApi
341
+ * @extends {BaseAPI}
342
+ */
343
+ export class PartnerHierarchyOperationsApi extends BaseAPI {
344
+ /**
345
+ * Returns one partner hierarchy background operation by code. Use expand=partnerHierarchy to include the hierarchy. **Required Permissions** \"partner-management.partners.view\"
346
+ * @summary Get a partner hierarchy operation
347
+ * @param {PartnerHierarchyOperationsApiGetPartnerHierarchyOperationRequest} requestParameters Request parameters.
348
+ * @param {*} [options] Override http request option.
349
+ * @throws {RequiredError}
350
+ * @memberof PartnerHierarchyOperationsApi
351
+ */
352
+ public getPartnerHierarchyOperation(requestParameters: PartnerHierarchyOperationsApiGetPartnerHierarchyOperationRequest, options?: AxiosRequestConfig) {
353
+ return PartnerHierarchyOperationsApiFp(this.configuration).getPartnerHierarchyOperation(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
354
+ }
355
+
356
+ /**
357
+ * Returns a paginated list of partner hierarchy background operations. Filter by partnerHierarchyCode, type, or status, and use expand=partnerHierarchy to include the hierarchy. **Required Permissions** \"partner-management.partners.view\"
358
+ * @summary List partner hierarchy operations
359
+ * @param {PartnerHierarchyOperationsApiListPartnerHierarchyOperationsRequest} requestParameters Request parameters.
360
+ * @param {*} [options] Override http request option.
361
+ * @throws {RequiredError}
362
+ * @memberof PartnerHierarchyOperationsApi
363
+ */
364
+ public listPartnerHierarchyOperations(requestParameters: PartnerHierarchyOperationsApiListPartnerHierarchyOperationsRequest = {}, options?: AxiosRequestConfig) {
365
+ return PartnerHierarchyOperationsApiFp(this.configuration).listPartnerHierarchyOperations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
366
+ }
367
+ }