@emilgroup/partner-sdk 1.16.0 → 1.16.1-beta.0
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.
- package/.openapi-generator/FILES +2 -0
- package/README.md +2 -2
- package/api/partners-api.ts +120 -0
- package/base.ts +6 -1
- package/dist/api/partners-api.d.ts +66 -0
- package/dist/api/partners-api.js +99 -0
- package/dist/base.js +5 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/merge-partners-request-dto.d.ts +36 -0
- package/dist/models/merge-partners-request-dto.js +15 -0
- package/dist/models/merge-partners-response-class.d.ts +25 -0
- package/dist/models/merge-partners-response-class.js +15 -0
- package/models/index.ts +2 -0
- package/models/merge-partners-request-dto.ts +42 -0
- package/models/merge-partners-response-class.ts +31 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -48,6 +48,8 @@ models/list-related-partners-response-class.ts
|
|
|
48
48
|
models/list-tags-response-class.ts
|
|
49
49
|
models/map-partner-to-account-response-class.ts
|
|
50
50
|
models/mapped-account-from-partner-class.ts
|
|
51
|
+
models/merge-partners-request-dto.ts
|
|
52
|
+
models/merge-partners-response-class.ts
|
|
51
53
|
models/partner-class.ts
|
|
52
54
|
models/partner-relation-class.ts
|
|
53
55
|
models/partner-relation-type-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@1.16.0 --save
|
|
20
|
+
npm install @emilgroup/partner-sdk@1.16.1-beta.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/partner-sdk@1.16.0
|
|
24
|
+
yarn add @emilgroup/partner-sdk@1.16.1-beta.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PartnersApi`.
|
package/api/partners-api.ts
CHANGED
|
@@ -39,6 +39,10 @@ import { ListRelatedPartnersResponseClass } from '../models';
|
|
|
39
39
|
// @ts-ignore
|
|
40
40
|
import { MapPartnerToAccountResponseClass } from '../models';
|
|
41
41
|
// @ts-ignore
|
|
42
|
+
import { MergePartnersRequestDto } from '../models';
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
import { MergePartnersResponseClass } from '../models';
|
|
45
|
+
// @ts-ignore
|
|
42
46
|
import { TagPartnerRequestDtoRest } from '../models';
|
|
43
47
|
// @ts-ignore
|
|
44
48
|
import { UpdatePartnerRequestDto } from '../models';
|
|
@@ -440,6 +444,57 @@ export const PartnersApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
440
444
|
options: localVarRequestOptions,
|
|
441
445
|
};
|
|
442
446
|
},
|
|
447
|
+
/**
|
|
448
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
449
|
+
* @summary Update the partner
|
|
450
|
+
* @param {string} code Unique identifier for the object.
|
|
451
|
+
* @param {MergePartnersRequestDto} mergePartnersRequestDto
|
|
452
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
453
|
+
* @param {*} [options] Override http request option.
|
|
454
|
+
* @throws {RequiredError}
|
|
455
|
+
*/
|
|
456
|
+
mergePartners: async (code: string, mergePartnersRequestDto: MergePartnersRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
457
|
+
// verify required parameter 'code' is not null or undefined
|
|
458
|
+
assertParamExists('mergePartners', 'code', code)
|
|
459
|
+
// verify required parameter 'mergePartnersRequestDto' is not null or undefined
|
|
460
|
+
assertParamExists('mergePartners', 'mergePartnersRequestDto', mergePartnersRequestDto)
|
|
461
|
+
const localVarPath = `/partnerservice/v1/partners/merger/{code}`
|
|
462
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
463
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
464
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
465
|
+
let baseOptions;
|
|
466
|
+
let baseAccessToken;
|
|
467
|
+
if (configuration) {
|
|
468
|
+
baseOptions = configuration.baseOptions;
|
|
469
|
+
baseAccessToken = configuration.accessToken;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
473
|
+
const localVarHeaderParameter = {} as any;
|
|
474
|
+
const localVarQueryParameter = {} as any;
|
|
475
|
+
|
|
476
|
+
// authentication bearer required
|
|
477
|
+
// http bearer authentication required
|
|
478
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
479
|
+
|
|
480
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
481
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
487
|
+
|
|
488
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
489
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
490
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
491
|
+
localVarRequestOptions.data = serializeDataIfNeeded(mergePartnersRequestDto, localVarRequestOptions, configuration)
|
|
492
|
+
|
|
493
|
+
return {
|
|
494
|
+
url: toPathString(localVarUrlObj),
|
|
495
|
+
options: localVarRequestOptions,
|
|
496
|
+
};
|
|
497
|
+
},
|
|
443
498
|
/**
|
|
444
499
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
445
500
|
* @summary Update the partner
|
|
@@ -650,6 +705,19 @@ export const PartnersApiFp = function(configuration?: Configuration) {
|
|
|
650
705
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listRelationsForPartner(code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
651
706
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
652
707
|
},
|
|
708
|
+
/**
|
|
709
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
710
|
+
* @summary Update the partner
|
|
711
|
+
* @param {string} code Unique identifier for the object.
|
|
712
|
+
* @param {MergePartnersRequestDto} mergePartnersRequestDto
|
|
713
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
714
|
+
* @param {*} [options] Override http request option.
|
|
715
|
+
* @throws {RequiredError}
|
|
716
|
+
*/
|
|
717
|
+
async mergePartners(code: string, mergePartnersRequestDto: MergePartnersRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MergePartnersResponseClass>> {
|
|
718
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.mergePartners(code, mergePartnersRequestDto, authorization, options);
|
|
719
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
720
|
+
},
|
|
653
721
|
/**
|
|
654
722
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
655
723
|
* @summary Update the partner
|
|
@@ -777,6 +845,18 @@ export const PartnersApiFactory = function (configuration?: Configuration, baseP
|
|
|
777
845
|
listRelationsForPartner(code: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListRelatedPartnersResponseClass> {
|
|
778
846
|
return localVarFp.listRelationsForPartner(code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
779
847
|
},
|
|
848
|
+
/**
|
|
849
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
850
|
+
* @summary Update the partner
|
|
851
|
+
* @param {string} code Unique identifier for the object.
|
|
852
|
+
* @param {MergePartnersRequestDto} mergePartnersRequestDto
|
|
853
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
854
|
+
* @param {*} [options] Override http request option.
|
|
855
|
+
* @throws {RequiredError}
|
|
856
|
+
*/
|
|
857
|
+
mergePartners(code: string, mergePartnersRequestDto: MergePartnersRequestDto, authorization?: string, options?: any): AxiosPromise<MergePartnersResponseClass> {
|
|
858
|
+
return localVarFp.mergePartners(code, mergePartnersRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
859
|
+
},
|
|
780
860
|
/**
|
|
781
861
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
782
862
|
* @summary Update the partner
|
|
@@ -1049,6 +1129,34 @@ export interface PartnersApiListRelationsForPartnerRequest {
|
|
|
1049
1129
|
readonly filters?: string
|
|
1050
1130
|
}
|
|
1051
1131
|
|
|
1132
|
+
/**
|
|
1133
|
+
* Request parameters for mergePartners operation in PartnersApi.
|
|
1134
|
+
* @export
|
|
1135
|
+
* @interface PartnersApiMergePartnersRequest
|
|
1136
|
+
*/
|
|
1137
|
+
export interface PartnersApiMergePartnersRequest {
|
|
1138
|
+
/**
|
|
1139
|
+
* Unique identifier for the object.
|
|
1140
|
+
* @type {string}
|
|
1141
|
+
* @memberof PartnersApiMergePartners
|
|
1142
|
+
*/
|
|
1143
|
+
readonly code: string
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
*
|
|
1147
|
+
* @type {MergePartnersRequestDto}
|
|
1148
|
+
* @memberof PartnersApiMergePartners
|
|
1149
|
+
*/
|
|
1150
|
+
readonly mergePartnersRequestDto: MergePartnersRequestDto
|
|
1151
|
+
|
|
1152
|
+
/**
|
|
1153
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1154
|
+
* @type {string}
|
|
1155
|
+
* @memberof PartnersApiMergePartners
|
|
1156
|
+
*/
|
|
1157
|
+
readonly authorization?: string
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1052
1160
|
/**
|
|
1053
1161
|
* Request parameters for tagPartner operation in PartnersApi.
|
|
1054
1162
|
* @export
|
|
@@ -1196,6 +1304,18 @@ export class PartnersApi extends BaseAPI {
|
|
|
1196
1304
|
return PartnersApiFp(this.configuration).listRelationsForPartner(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));
|
|
1197
1305
|
}
|
|
1198
1306
|
|
|
1307
|
+
/**
|
|
1308
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
1309
|
+
* @summary Update the partner
|
|
1310
|
+
* @param {PartnersApiMergePartnersRequest} requestParameters Request parameters.
|
|
1311
|
+
* @param {*} [options] Override http request option.
|
|
1312
|
+
* @throws {RequiredError}
|
|
1313
|
+
* @memberof PartnersApi
|
|
1314
|
+
*/
|
|
1315
|
+
public mergePartners(requestParameters: PartnersApiMergePartnersRequest, options?: AxiosRequestConfig) {
|
|
1316
|
+
return PartnersApiFp(this.configuration).mergePartners(requestParameters.code, requestParameters.mergePartnersRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1199
1319
|
/**
|
|
1200
1320
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
1201
1321
|
* @summary Update the partner
|
package/base.ts
CHANGED
|
@@ -97,9 +97,14 @@ export class BaseAPI {
|
|
|
97
97
|
this.loadTokenData();
|
|
98
98
|
|
|
99
99
|
if (configuration) {
|
|
100
|
+
const { accessToken } = this.tokenData;
|
|
100
101
|
this.configuration = configuration;
|
|
101
102
|
this.basePath = configuration.basePath || this.basePath;
|
|
102
|
-
|
|
103
|
+
|
|
104
|
+
// Use config token if provided, otherwise use tokenData token
|
|
105
|
+
const configToken = this.configuration.accessToken;
|
|
106
|
+
const storedToken = accessToken ? `Bearer ${accessToken}` : '';
|
|
107
|
+
this.configuration.accessToken = configToken || storedToken;
|
|
103
108
|
} else {
|
|
104
109
|
const { accessToken, username } = this.tokenData;
|
|
105
110
|
|
|
@@ -21,6 +21,8 @@ import { GetPartnerResponseClass } from '../models';
|
|
|
21
21
|
import { ListPartnersResponseClass } from '../models';
|
|
22
22
|
import { ListRelatedPartnersResponseClass } from '../models';
|
|
23
23
|
import { MapPartnerToAccountResponseClass } from '../models';
|
|
24
|
+
import { MergePartnersRequestDto } from '../models';
|
|
25
|
+
import { MergePartnersResponseClass } from '../models';
|
|
24
26
|
import { TagPartnerRequestDtoRest } from '../models';
|
|
25
27
|
import { UpdatePartnerRequestDto } from '../models';
|
|
26
28
|
import { UpdatePartnerResponseClass } from '../models';
|
|
@@ -106,6 +108,16 @@ export declare const PartnersApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
106
108
|
* @throws {RequiredError}
|
|
107
109
|
*/
|
|
108
110
|
listRelationsForPartner: (code: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
111
|
+
/**
|
|
112
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
113
|
+
* @summary Update the partner
|
|
114
|
+
* @param {string} code Unique identifier for the object.
|
|
115
|
+
* @param {MergePartnersRequestDto} mergePartnersRequestDto
|
|
116
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
117
|
+
* @param {*} [options] Override http request option.
|
|
118
|
+
* @throws {RequiredError}
|
|
119
|
+
*/
|
|
120
|
+
mergePartners: (code: string, mergePartnersRequestDto: MergePartnersRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
109
121
|
/**
|
|
110
122
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
111
123
|
* @summary Update the partner
|
|
@@ -209,6 +221,16 @@ export declare const PartnersApiFp: (configuration?: Configuration) => {
|
|
|
209
221
|
* @throws {RequiredError}
|
|
210
222
|
*/
|
|
211
223
|
listRelationsForPartner(code: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListRelatedPartnersResponseClass>>;
|
|
224
|
+
/**
|
|
225
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
226
|
+
* @summary Update the partner
|
|
227
|
+
* @param {string} code Unique identifier for the object.
|
|
228
|
+
* @param {MergePartnersRequestDto} mergePartnersRequestDto
|
|
229
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
230
|
+
* @param {*} [options] Override http request option.
|
|
231
|
+
* @throws {RequiredError}
|
|
232
|
+
*/
|
|
233
|
+
mergePartners(code: string, mergePartnersRequestDto: MergePartnersRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MergePartnersResponseClass>>;
|
|
212
234
|
/**
|
|
213
235
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
214
236
|
* @summary Update the partner
|
|
@@ -312,6 +334,16 @@ export declare const PartnersApiFactory: (configuration?: Configuration, basePat
|
|
|
312
334
|
* @throws {RequiredError}
|
|
313
335
|
*/
|
|
314
336
|
listRelationsForPartner(code: string, authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListRelatedPartnersResponseClass>;
|
|
337
|
+
/**
|
|
338
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
339
|
+
* @summary Update the partner
|
|
340
|
+
* @param {string} code Unique identifier for the object.
|
|
341
|
+
* @param {MergePartnersRequestDto} mergePartnersRequestDto
|
|
342
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
343
|
+
* @param {*} [options] Override http request option.
|
|
344
|
+
* @throws {RequiredError}
|
|
345
|
+
*/
|
|
346
|
+
mergePartners(code: string, mergePartnersRequestDto: MergePartnersRequestDto, authorization?: string, options?: any): AxiosPromise<MergePartnersResponseClass>;
|
|
315
347
|
/**
|
|
316
348
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
317
349
|
* @summary Update the partner
|
|
@@ -550,6 +582,31 @@ export interface PartnersApiListRelationsForPartnerRequest {
|
|
|
550
582
|
*/
|
|
551
583
|
readonly filters?: string;
|
|
552
584
|
}
|
|
585
|
+
/**
|
|
586
|
+
* Request parameters for mergePartners operation in PartnersApi.
|
|
587
|
+
* @export
|
|
588
|
+
* @interface PartnersApiMergePartnersRequest
|
|
589
|
+
*/
|
|
590
|
+
export interface PartnersApiMergePartnersRequest {
|
|
591
|
+
/**
|
|
592
|
+
* Unique identifier for the object.
|
|
593
|
+
* @type {string}
|
|
594
|
+
* @memberof PartnersApiMergePartners
|
|
595
|
+
*/
|
|
596
|
+
readonly code: string;
|
|
597
|
+
/**
|
|
598
|
+
*
|
|
599
|
+
* @type {MergePartnersRequestDto}
|
|
600
|
+
* @memberof PartnersApiMergePartners
|
|
601
|
+
*/
|
|
602
|
+
readonly mergePartnersRequestDto: MergePartnersRequestDto;
|
|
603
|
+
/**
|
|
604
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
605
|
+
* @type {string}
|
|
606
|
+
* @memberof PartnersApiMergePartners
|
|
607
|
+
*/
|
|
608
|
+
readonly authorization?: string;
|
|
609
|
+
}
|
|
553
610
|
/**
|
|
554
611
|
* Request parameters for tagPartner operation in PartnersApi.
|
|
555
612
|
* @export
|
|
@@ -670,6 +727,15 @@ export declare class PartnersApi extends BaseAPI {
|
|
|
670
727
|
* @memberof PartnersApi
|
|
671
728
|
*/
|
|
672
729
|
listRelationsForPartner(requestParameters: PartnersApiListRelationsForPartnerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListRelatedPartnersResponseClass, any>>;
|
|
730
|
+
/**
|
|
731
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
732
|
+
* @summary Update the partner
|
|
733
|
+
* @param {PartnersApiMergePartnersRequest} requestParameters Request parameters.
|
|
734
|
+
* @param {*} [options] Override http request option.
|
|
735
|
+
* @throws {RequiredError}
|
|
736
|
+
* @memberof PartnersApi
|
|
737
|
+
*/
|
|
738
|
+
mergePartners(requestParameters: PartnersApiMergePartnersRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<MergePartnersResponseClass, any>>;
|
|
673
739
|
/**
|
|
674
740
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
675
741
|
* @summary Update the partner
|
package/dist/api/partners-api.js
CHANGED
|
@@ -486,6 +486,59 @@ var PartnersApiAxiosParamCreator = function (configuration) {
|
|
|
486
486
|
});
|
|
487
487
|
});
|
|
488
488
|
},
|
|
489
|
+
/**
|
|
490
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
491
|
+
* @summary Update the partner
|
|
492
|
+
* @param {string} code Unique identifier for the object.
|
|
493
|
+
* @param {MergePartnersRequestDto} mergePartnersRequestDto
|
|
494
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
495
|
+
* @param {*} [options] Override http request option.
|
|
496
|
+
* @throws {RequiredError}
|
|
497
|
+
*/
|
|
498
|
+
mergePartners: function (code, mergePartnersRequestDto, authorization, options) {
|
|
499
|
+
if (options === void 0) { options = {}; }
|
|
500
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
501
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
502
|
+
return __generator(this, function (_a) {
|
|
503
|
+
switch (_a.label) {
|
|
504
|
+
case 0:
|
|
505
|
+
// verify required parameter 'code' is not null or undefined
|
|
506
|
+
(0, common_1.assertParamExists)('mergePartners', 'code', code);
|
|
507
|
+
// verify required parameter 'mergePartnersRequestDto' is not null or undefined
|
|
508
|
+
(0, common_1.assertParamExists)('mergePartners', 'mergePartnersRequestDto', mergePartnersRequestDto);
|
|
509
|
+
localVarPath = "/partnerservice/v1/partners/merger/{code}"
|
|
510
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
511
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
512
|
+
if (configuration) {
|
|
513
|
+
baseOptions = configuration.baseOptions;
|
|
514
|
+
baseAccessToken = configuration.accessToken;
|
|
515
|
+
}
|
|
516
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
517
|
+
localVarHeaderParameter = {};
|
|
518
|
+
localVarQueryParameter = {};
|
|
519
|
+
// authentication bearer required
|
|
520
|
+
// http bearer authentication required
|
|
521
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
522
|
+
case 1:
|
|
523
|
+
// authentication bearer required
|
|
524
|
+
// http bearer authentication required
|
|
525
|
+
_a.sent();
|
|
526
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
527
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
528
|
+
}
|
|
529
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
530
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
531
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
532
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
533
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(mergePartnersRequestDto, localVarRequestOptions, configuration);
|
|
534
|
+
return [2 /*return*/, {
|
|
535
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
536
|
+
options: localVarRequestOptions,
|
|
537
|
+
}];
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
});
|
|
541
|
+
},
|
|
489
542
|
/**
|
|
490
543
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
491
544
|
* @summary Update the partner
|
|
@@ -763,6 +816,28 @@ var PartnersApiFp = function (configuration) {
|
|
|
763
816
|
});
|
|
764
817
|
});
|
|
765
818
|
},
|
|
819
|
+
/**
|
|
820
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
821
|
+
* @summary Update the partner
|
|
822
|
+
* @param {string} code Unique identifier for the object.
|
|
823
|
+
* @param {MergePartnersRequestDto} mergePartnersRequestDto
|
|
824
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
825
|
+
* @param {*} [options] Override http request option.
|
|
826
|
+
* @throws {RequiredError}
|
|
827
|
+
*/
|
|
828
|
+
mergePartners: function (code, mergePartnersRequestDto, authorization, options) {
|
|
829
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
830
|
+
var localVarAxiosArgs;
|
|
831
|
+
return __generator(this, function (_a) {
|
|
832
|
+
switch (_a.label) {
|
|
833
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.mergePartners(code, mergePartnersRequestDto, authorization, options)];
|
|
834
|
+
case 1:
|
|
835
|
+
localVarAxiosArgs = _a.sent();
|
|
836
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
});
|
|
840
|
+
},
|
|
766
841
|
/**
|
|
767
842
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
768
843
|
* @summary Update the partner
|
|
@@ -908,6 +983,18 @@ var PartnersApiFactory = function (configuration, basePath, axios) {
|
|
|
908
983
|
listRelationsForPartner: function (code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
909
984
|
return localVarFp.listRelationsForPartner(code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
910
985
|
},
|
|
986
|
+
/**
|
|
987
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
988
|
+
* @summary Update the partner
|
|
989
|
+
* @param {string} code Unique identifier for the object.
|
|
990
|
+
* @param {MergePartnersRequestDto} mergePartnersRequestDto
|
|
991
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
992
|
+
* @param {*} [options] Override http request option.
|
|
993
|
+
* @throws {RequiredError}
|
|
994
|
+
*/
|
|
995
|
+
mergePartners: function (code, mergePartnersRequestDto, authorization, options) {
|
|
996
|
+
return localVarFp.mergePartners(code, mergePartnersRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
997
|
+
},
|
|
911
998
|
/**
|
|
912
999
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
913
1000
|
* @summary Update the partner
|
|
@@ -1031,6 +1118,18 @@ var PartnersApi = /** @class */ (function (_super) {
|
|
|
1031
1118
|
var _this = this;
|
|
1032
1119
|
return (0, exports.PartnersApiFp)(this.configuration).listRelationsForPartner(requestParameters.code, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1033
1120
|
};
|
|
1121
|
+
/**
|
|
1122
|
+
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\", \"partner-management.partners.delete\"
|
|
1123
|
+
* @summary Update the partner
|
|
1124
|
+
* @param {PartnersApiMergePartnersRequest} requestParameters Request parameters.
|
|
1125
|
+
* @param {*} [options] Override http request option.
|
|
1126
|
+
* @throws {RequiredError}
|
|
1127
|
+
* @memberof PartnersApi
|
|
1128
|
+
*/
|
|
1129
|
+
PartnersApi.prototype.mergePartners = function (requestParameters, options) {
|
|
1130
|
+
var _this = this;
|
|
1131
|
+
return (0, exports.PartnersApiFp)(this.configuration).mergePartners(requestParameters.code, requestParameters.mergePartnersRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1132
|
+
};
|
|
1034
1133
|
/**
|
|
1035
1134
|
* Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
1036
1135
|
* @summary Update the partner
|
package/dist/base.js
CHANGED
|
@@ -124,9 +124,13 @@ var BaseAPI = /** @class */ (function () {
|
|
|
124
124
|
this.axios = axios;
|
|
125
125
|
this.loadTokenData();
|
|
126
126
|
if (configuration) {
|
|
127
|
+
var accessToken = this.tokenData.accessToken;
|
|
127
128
|
this.configuration = configuration;
|
|
128
129
|
this.basePath = configuration.basePath || this.basePath;
|
|
129
|
-
|
|
130
|
+
// Use config token if provided, otherwise use tokenData token
|
|
131
|
+
var configToken = this.configuration.accessToken;
|
|
132
|
+
var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
|
|
133
|
+
this.configuration.accessToken = configToken || storedToken;
|
|
130
134
|
}
|
|
131
135
|
else {
|
|
132
136
|
var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export * from './list-related-partners-response-class';
|
|
|
30
30
|
export * from './list-tags-response-class';
|
|
31
31
|
export * from './map-partner-to-account-response-class';
|
|
32
32
|
export * from './mapped-account-from-partner-class';
|
|
33
|
+
export * from './merge-partners-request-dto';
|
|
34
|
+
export * from './merge-partners-response-class';
|
|
33
35
|
export * from './partner-class';
|
|
34
36
|
export * from './partner-relation-class';
|
|
35
37
|
export * from './partner-relation-type-class';
|
package/dist/models/index.js
CHANGED
|
@@ -46,6 +46,8 @@ __exportStar(require("./list-related-partners-response-class"), exports);
|
|
|
46
46
|
__exportStar(require("./list-tags-response-class"), exports);
|
|
47
47
|
__exportStar(require("./map-partner-to-account-response-class"), exports);
|
|
48
48
|
__exportStar(require("./mapped-account-from-partner-class"), exports);
|
|
49
|
+
__exportStar(require("./merge-partners-request-dto"), exports);
|
|
50
|
+
__exportStar(require("./merge-partners-response-class"), exports);
|
|
49
51
|
__exportStar(require("./partner-class"), exports);
|
|
50
52
|
__exportStar(require("./partner-relation-class"), exports);
|
|
51
53
|
__exportStar(require("./partner-relation-type-class"), exports);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL PartnerService
|
|
3
|
+
* The EMIL PartnerService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface MergePartnersRequestDto
|
|
16
|
+
*/
|
|
17
|
+
export interface MergePartnersRequestDto {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier for the object.
|
|
20
|
+
* @type {Array<string>}
|
|
21
|
+
* @memberof MergePartnersRequestDto
|
|
22
|
+
*/
|
|
23
|
+
'partnerToDeleteCodes': Array<string>;
|
|
24
|
+
/**
|
|
25
|
+
* The custom fields object, based on partner schema.
|
|
26
|
+
* @type {object}
|
|
27
|
+
* @memberof MergePartnersRequestDto
|
|
28
|
+
*/
|
|
29
|
+
'customFields': object;
|
|
30
|
+
/**
|
|
31
|
+
* User selected list of partner relations identifiers
|
|
32
|
+
* @type {Array<number>}
|
|
33
|
+
* @memberof MergePartnersRequestDto
|
|
34
|
+
*/
|
|
35
|
+
'relationsIds': Array<number>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL PartnerService
|
|
6
|
+
* The EMIL PartnerService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL PartnerService
|
|
3
|
+
* The EMIL PartnerService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { PartnerClass } from './partner-class';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface MergePartnersResponseClass
|
|
17
|
+
*/
|
|
18
|
+
export interface MergePartnersResponseClass {
|
|
19
|
+
/**
|
|
20
|
+
* The partner response.
|
|
21
|
+
* @type {PartnerClass}
|
|
22
|
+
* @memberof MergePartnersResponseClass
|
|
23
|
+
*/
|
|
24
|
+
'partner': PartnerClass;
|
|
25
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL PartnerService
|
|
6
|
+
* The EMIL PartnerService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/models/index.ts
CHANGED
|
@@ -30,6 +30,8 @@ export * from './list-related-partners-response-class';
|
|
|
30
30
|
export * from './list-tags-response-class';
|
|
31
31
|
export * from './map-partner-to-account-response-class';
|
|
32
32
|
export * from './mapped-account-from-partner-class';
|
|
33
|
+
export * from './merge-partners-request-dto';
|
|
34
|
+
export * from './merge-partners-response-class';
|
|
33
35
|
export * from './partner-class';
|
|
34
36
|
export * from './partner-relation-class';
|
|
35
37
|
export * from './partner-relation-type-class';
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface MergePartnersRequestDto
|
|
21
|
+
*/
|
|
22
|
+
export interface MergePartnersRequestDto {
|
|
23
|
+
/**
|
|
24
|
+
* Unique identifier for the object.
|
|
25
|
+
* @type {Array<string>}
|
|
26
|
+
* @memberof MergePartnersRequestDto
|
|
27
|
+
*/
|
|
28
|
+
'partnerToDeleteCodes': Array<string>;
|
|
29
|
+
/**
|
|
30
|
+
* The custom fields object, based on partner schema.
|
|
31
|
+
* @type {object}
|
|
32
|
+
* @memberof MergePartnersRequestDto
|
|
33
|
+
*/
|
|
34
|
+
'customFields': object;
|
|
35
|
+
/**
|
|
36
|
+
* User selected list of partner relations identifiers
|
|
37
|
+
* @type {Array<number>}
|
|
38
|
+
* @memberof MergePartnersRequestDto
|
|
39
|
+
*/
|
|
40
|
+
'relationsIds': Array<number>;
|
|
41
|
+
}
|
|
42
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { PartnerClass } from './partner-class';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @interface MergePartnersResponseClass
|
|
22
|
+
*/
|
|
23
|
+
export interface MergePartnersResponseClass {
|
|
24
|
+
/**
|
|
25
|
+
* The partner response.
|
|
26
|
+
* @type {PartnerClass}
|
|
27
|
+
* @memberof MergePartnersResponseClass
|
|
28
|
+
*/
|
|
29
|
+
'partner': PartnerClass;
|
|
30
|
+
}
|
|
31
|
+
|