@emilgroup/partner-sdk-node 1.14.1-beta.1 → 1.14.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.
@@ -15,6 +15,8 @@ common.ts
15
15
  configuration.ts
16
16
  git_push.sh
17
17
  index.ts
18
+ models/create-or-update-partner-from-account-request-dto.ts
19
+ models/create-or-update-partner-from-account-response-class.ts
18
20
  models/create-partner-relation-request-dto-rest.ts
19
21
  models/create-partner-relation-response-class.ts
20
22
  models/create-partner-request-dto.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.14.1-beta.1 --save
20
+ npm install @emilgroup/partner-sdk-node@1.14.1-beta.2 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/partner-sdk-node@1.14.1-beta.1
24
+ yarn add @emilgroup/partner-sdk-node@1.14.1-beta.2
25
25
  ```
26
26
 
27
27
  And then you can import `PartnersApi`.
@@ -21,6 +21,8 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
23
  // @ts-ignore
24
+ import { CreateOrUpdatePartnerFromAccountRequestDto } from '../models';
25
+ // @ts-ignore
24
26
  import { CreatePartnerRequestDto } from '../models';
25
27
  // @ts-ignore
26
28
  import { CreatePartnerResponseClass } from '../models';
@@ -29,6 +31,8 @@ import { DeleteResponseClass } from '../models';
29
31
  // @ts-ignore
30
32
  import { GetPartnerResponseClass } from '../models';
31
33
  // @ts-ignore
34
+ import { GetPartnerVersionResponseClass } from '../models';
35
+ // @ts-ignore
32
36
  import { ListPartnersResponseClass } from '../models';
33
37
  // @ts-ignore
34
38
  import { ListRelatedPartnersResponseClass } from '../models';
@@ -48,6 +52,57 @@ const FormData = require('form-data');
48
52
  */
49
53
  export const PartnersApiAxiosParamCreator = function (configuration?: Configuration) {
50
54
  return {
55
+ /**
56
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
57
+ * @summary Retrieve the create or update partner from account
58
+ * @param {any} code Unique identifier for the object.
59
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
60
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
61
+ * @param {*} [options] Override http request option.
62
+ * @throws {RequiredError}
63
+ */
64
+ createOrUpdatePartnerFromAccount: async (code: any, createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
65
+ // verify required parameter 'code' is not null or undefined
66
+ assertParamExists('createOrUpdatePartnerFromAccount', 'code', code)
67
+ // verify required parameter 'createOrUpdatePartnerFromAccountRequestDto' is not null or undefined
68
+ assertParamExists('createOrUpdatePartnerFromAccount', 'createOrUpdatePartnerFromAccountRequestDto', createOrUpdatePartnerFromAccountRequestDto)
69
+ const localVarPath = `/partnerservice/v1/partners/create-or-update-partner-from-account`
70
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
71
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
72
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
73
+ let baseOptions;
74
+ let baseAccessToken;
75
+ if (configuration) {
76
+ baseOptions = configuration.baseOptions;
77
+ baseAccessToken = configuration.accessToken;
78
+ }
79
+
80
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
81
+ const localVarHeaderParameter = {} as any;
82
+ const localVarQueryParameter = {} as any;
83
+
84
+ // authentication bearer required
85
+ // http bearer authentication required
86
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
87
+
88
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
89
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
90
+ }
91
+
92
+
93
+
94
+ localVarHeaderParameter['Content-Type'] = 'application/json';
95
+
96
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
97
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
98
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
99
+ localVarRequestOptions.data = serializeDataIfNeeded(createOrUpdatePartnerFromAccountRequestDto, localVarRequestOptions, configuration)
100
+
101
+ return {
102
+ url: toPathString(localVarUrlObj),
103
+ options: localVarRequestOptions,
104
+ };
105
+ },
51
106
  /**
52
107
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
53
108
  * @summary Create the partner
@@ -458,6 +513,19 @@ export const PartnersApiAxiosParamCreator = function (configuration?: Configurat
458
513
  export const PartnersApiFp = function(configuration?: Configuration) {
459
514
  const localVarAxiosParamCreator = PartnersApiAxiosParamCreator(configuration)
460
515
  return {
516
+ /**
517
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
518
+ * @summary Retrieve the create or update partner from account
519
+ * @param {any} code Unique identifier for the object.
520
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
521
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ */
525
+ async createOrUpdatePartnerFromAccount(code: any, createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPartnerVersionResponseClass>> {
526
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdatePartnerFromAccount(code, createOrUpdatePartnerFromAccountRequestDto, authorization, options);
527
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
528
+ },
461
529
  /**
462
530
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
463
531
  * @summary Create the partner
@@ -568,6 +636,18 @@ export const PartnersApiFp = function(configuration?: Configuration) {
568
636
  export const PartnersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
569
637
  const localVarFp = PartnersApiFp(configuration)
570
638
  return {
639
+ /**
640
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
641
+ * @summary Retrieve the create or update partner from account
642
+ * @param {any} code Unique identifier for the object.
643
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
644
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
645
+ * @param {*} [options] Override http request option.
646
+ * @throws {RequiredError}
647
+ */
648
+ createOrUpdatePartnerFromAccount(code: any, createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto, authorization?: string, options?: any): AxiosPromise<GetPartnerVersionResponseClass> {
649
+ return localVarFp.createOrUpdatePartnerFromAccount(code, createOrUpdatePartnerFromAccountRequestDto, authorization, options).then((request) => request(axios, basePath));
650
+ },
571
651
  /**
572
652
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
573
653
  * @summary Create the partner
@@ -664,6 +744,34 @@ export const PartnersApiFactory = function (configuration?: Configuration, baseP
664
744
  };
665
745
  };
666
746
 
747
+ /**
748
+ * Request parameters for createOrUpdatePartnerFromAccount operation in PartnersApi.
749
+ * @export
750
+ * @interface PartnersApiCreateOrUpdatePartnerFromAccountRequest
751
+ */
752
+ export interface PartnersApiCreateOrUpdatePartnerFromAccountRequest {
753
+ /**
754
+ * Unique identifier for the object.
755
+ * @type {any}
756
+ * @memberof PartnersApiCreateOrUpdatePartnerFromAccount
757
+ */
758
+ readonly code: any
759
+
760
+ /**
761
+ *
762
+ * @type {CreateOrUpdatePartnerFromAccountRequestDto}
763
+ * @memberof PartnersApiCreateOrUpdatePartnerFromAccount
764
+ */
765
+ readonly createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto
766
+
767
+ /**
768
+ * Bearer Token: provided by the login endpoint under the name accessToken.
769
+ * @type {string}
770
+ * @memberof PartnersApiCreateOrUpdatePartnerFromAccount
771
+ */
772
+ readonly authorization?: string
773
+ }
774
+
667
775
  /**
668
776
  * Request parameters for createPartner operation in PartnersApi.
669
777
  * @export
@@ -930,6 +1038,18 @@ export interface PartnersApiUpdatePartnerRequest {
930
1038
  * @extends {BaseAPI}
931
1039
  */
932
1040
  export class PartnersApi extends BaseAPI {
1041
+ /**
1042
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
1043
+ * @summary Retrieve the create or update partner from account
1044
+ * @param {PartnersApiCreateOrUpdatePartnerFromAccountRequest} requestParameters Request parameters.
1045
+ * @param {*} [options] Override http request option.
1046
+ * @throws {RequiredError}
1047
+ * @memberof PartnersApi
1048
+ */
1049
+ public createOrUpdatePartnerFromAccount(requestParameters: PartnersApiCreateOrUpdatePartnerFromAccountRequest, options?: AxiosRequestConfig) {
1050
+ return PartnersApiFp(this.configuration).createOrUpdatePartnerFromAccount(requestParameters.code, requestParameters.createOrUpdatePartnerFromAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1051
+ }
1052
+
933
1053
  /**
934
1054
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
935
1055
  * @summary Create the partner
@@ -12,10 +12,12 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
+ import { CreateOrUpdatePartnerFromAccountRequestDto } from '../models';
15
16
  import { CreatePartnerRequestDto } from '../models';
16
17
  import { CreatePartnerResponseClass } from '../models';
17
18
  import { DeleteResponseClass } from '../models';
18
19
  import { GetPartnerResponseClass } from '../models';
20
+ import { GetPartnerVersionResponseClass } from '../models';
19
21
  import { ListPartnersResponseClass } from '../models';
20
22
  import { ListRelatedPartnersResponseClass } from '../models';
21
23
  import { TagPartnerRequestDtoRest } from '../models';
@@ -26,6 +28,16 @@ import { UpdatePartnerResponseClass } from '../models';
26
28
  * @export
27
29
  */
28
30
  export declare const PartnersApiAxiosParamCreator: (configuration?: Configuration) => {
31
+ /**
32
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
33
+ * @summary Retrieve the create or update partner from account
34
+ * @param {any} code Unique identifier for the object.
35
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
36
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ createOrUpdatePartnerFromAccount: (code: any, createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
29
41
  /**
30
42
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
31
43
  * @summary Create the partner
@@ -111,6 +123,16 @@ export declare const PartnersApiAxiosParamCreator: (configuration?: Configuratio
111
123
  * @export
112
124
  */
113
125
  export declare const PartnersApiFp: (configuration?: Configuration) => {
126
+ /**
127
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
128
+ * @summary Retrieve the create or update partner from account
129
+ * @param {any} code Unique identifier for the object.
130
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
131
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
132
+ * @param {*} [options] Override http request option.
133
+ * @throws {RequiredError}
134
+ */
135
+ createOrUpdatePartnerFromAccount(code: any, createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPartnerVersionResponseClass>>;
114
136
  /**
115
137
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
116
138
  * @summary Create the partner
@@ -196,6 +218,16 @@ export declare const PartnersApiFp: (configuration?: Configuration) => {
196
218
  * @export
197
219
  */
198
220
  export declare const PartnersApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
221
+ /**
222
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
223
+ * @summary Retrieve the create or update partner from account
224
+ * @param {any} code Unique identifier for the object.
225
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
226
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ */
230
+ createOrUpdatePartnerFromAccount(code: any, createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto, authorization?: string, options?: any): AxiosPromise<GetPartnerVersionResponseClass>;
199
231
  /**
200
232
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
201
233
  * @summary Create the partner
@@ -276,6 +308,31 @@ export declare const PartnersApiFactory: (configuration?: Configuration, basePat
276
308
  */
277
309
  updatePartner(code: string, updatePartnerRequestDto: UpdatePartnerRequestDto, authorization?: string, options?: any): AxiosPromise<UpdatePartnerResponseClass>;
278
310
  };
311
+ /**
312
+ * Request parameters for createOrUpdatePartnerFromAccount operation in PartnersApi.
313
+ * @export
314
+ * @interface PartnersApiCreateOrUpdatePartnerFromAccountRequest
315
+ */
316
+ export interface PartnersApiCreateOrUpdatePartnerFromAccountRequest {
317
+ /**
318
+ * Unique identifier for the object.
319
+ * @type {any}
320
+ * @memberof PartnersApiCreateOrUpdatePartnerFromAccount
321
+ */
322
+ readonly code: any;
323
+ /**
324
+ *
325
+ * @type {CreateOrUpdatePartnerFromAccountRequestDto}
326
+ * @memberof PartnersApiCreateOrUpdatePartnerFromAccount
327
+ */
328
+ readonly createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto;
329
+ /**
330
+ * Bearer Token: provided by the login endpoint under the name accessToken.
331
+ * @type {string}
332
+ * @memberof PartnersApiCreateOrUpdatePartnerFromAccount
333
+ */
334
+ readonly authorization?: string;
335
+ }
279
336
  /**
280
337
  * Request parameters for createPartner operation in PartnersApi.
281
338
  * @export
@@ -512,6 +569,15 @@ export interface PartnersApiUpdatePartnerRequest {
512
569
  * @extends {BaseAPI}
513
570
  */
514
571
  export declare class PartnersApi extends BaseAPI {
572
+ /**
573
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
574
+ * @summary Retrieve the create or update partner from account
575
+ * @param {PartnersApiCreateOrUpdatePartnerFromAccountRequest} requestParameters Request parameters.
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ * @memberof PartnersApi
579
+ */
580
+ createOrUpdatePartnerFromAccount(requestParameters: PartnersApiCreateOrUpdatePartnerFromAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetPartnerVersionResponseClass, any>>;
515
581
  /**
516
582
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
517
583
  * @summary Create the partner
@@ -105,6 +105,63 @@ var FormData = require('form-data');
105
105
  var PartnersApiAxiosParamCreator = function (configuration) {
106
106
  var _this = this;
107
107
  return {
108
+ /**
109
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
110
+ * @summary Retrieve the create or update partner from account
111
+ * @param {any} code Unique identifier for the object.
112
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
113
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
114
+ * @param {*} [options] Override http request option.
115
+ * @throws {RequiredError}
116
+ */
117
+ createOrUpdatePartnerFromAccount: function (code_1, createOrUpdatePartnerFromAccountRequestDto_1, authorization_1) {
118
+ var args_1 = [];
119
+ for (var _i = 3; _i < arguments.length; _i++) {
120
+ args_1[_i - 3] = arguments[_i];
121
+ }
122
+ return __awaiter(_this, __spreadArray([code_1, createOrUpdatePartnerFromAccountRequestDto_1, authorization_1], args_1, true), void 0, function (code, createOrUpdatePartnerFromAccountRequestDto, authorization, options) {
123
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
124
+ if (options === void 0) { options = {}; }
125
+ return __generator(this, function (_a) {
126
+ switch (_a.label) {
127
+ case 0:
128
+ // verify required parameter 'code' is not null or undefined
129
+ (0, common_1.assertParamExists)('createOrUpdatePartnerFromAccount', 'code', code);
130
+ // verify required parameter 'createOrUpdatePartnerFromAccountRequestDto' is not null or undefined
131
+ (0, common_1.assertParamExists)('createOrUpdatePartnerFromAccount', 'createOrUpdatePartnerFromAccountRequestDto', createOrUpdatePartnerFromAccountRequestDto);
132
+ localVarPath = "/partnerservice/v1/partners/create-or-update-partner-from-account"
133
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
134
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
135
+ if (configuration) {
136
+ baseOptions = configuration.baseOptions;
137
+ baseAccessToken = configuration.accessToken;
138
+ }
139
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
140
+ localVarHeaderParameter = {};
141
+ localVarQueryParameter = {};
142
+ // authentication bearer required
143
+ // http bearer authentication required
144
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
145
+ case 1:
146
+ // authentication bearer required
147
+ // http bearer authentication required
148
+ _a.sent();
149
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
150
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
151
+ }
152
+ localVarHeaderParameter['Content-Type'] = 'application/json';
153
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
154
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
155
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
156
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrUpdatePartnerFromAccountRequestDto, localVarRequestOptions, configuration);
157
+ return [2 /*return*/, {
158
+ url: (0, common_1.toPathString)(localVarUrlObj),
159
+ options: localVarRequestOptions,
160
+ }];
161
+ }
162
+ });
163
+ });
164
+ },
108
165
  /**
109
166
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
110
167
  * @summary Create the partner
@@ -546,6 +603,28 @@ exports.PartnersApiAxiosParamCreator = PartnersApiAxiosParamCreator;
546
603
  var PartnersApiFp = function (configuration) {
547
604
  var localVarAxiosParamCreator = (0, exports.PartnersApiAxiosParamCreator)(configuration);
548
605
  return {
606
+ /**
607
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
608
+ * @summary Retrieve the create or update partner from account
609
+ * @param {any} code Unique identifier for the object.
610
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
611
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
612
+ * @param {*} [options] Override http request option.
613
+ * @throws {RequiredError}
614
+ */
615
+ createOrUpdatePartnerFromAccount: function (code, createOrUpdatePartnerFromAccountRequestDto, authorization, options) {
616
+ return __awaiter(this, void 0, void 0, function () {
617
+ var localVarAxiosArgs;
618
+ return __generator(this, function (_a) {
619
+ switch (_a.label) {
620
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createOrUpdatePartnerFromAccount(code, createOrUpdatePartnerFromAccountRequestDto, authorization, options)];
621
+ case 1:
622
+ localVarAxiosArgs = _a.sent();
623
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
624
+ }
625
+ });
626
+ });
627
+ },
549
628
  /**
550
629
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
551
630
  * @summary Create the partner
@@ -719,6 +798,18 @@ exports.PartnersApiFp = PartnersApiFp;
719
798
  var PartnersApiFactory = function (configuration, basePath, axios) {
720
799
  var localVarFp = (0, exports.PartnersApiFp)(configuration);
721
800
  return {
801
+ /**
802
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
803
+ * @summary Retrieve the create or update partner from account
804
+ * @param {any} code Unique identifier for the object.
805
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
806
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
807
+ * @param {*} [options] Override http request option.
808
+ * @throws {RequiredError}
809
+ */
810
+ createOrUpdatePartnerFromAccount: function (code, createOrUpdatePartnerFromAccountRequestDto, authorization, options) {
811
+ return localVarFp.createOrUpdatePartnerFromAccount(code, createOrUpdatePartnerFromAccountRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
812
+ },
722
813
  /**
723
814
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
724
815
  * @summary Create the partner
@@ -826,6 +917,18 @@ var PartnersApi = /** @class */ (function (_super) {
826
917
  function PartnersApi() {
827
918
  return _super !== null && _super.apply(this, arguments) || this;
828
919
  }
920
+ /**
921
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
922
+ * @summary Retrieve the create or update partner from account
923
+ * @param {PartnersApiCreateOrUpdatePartnerFromAccountRequest} requestParameters Request parameters.
924
+ * @param {*} [options] Override http request option.
925
+ * @throws {RequiredError}
926
+ * @memberof PartnersApi
927
+ */
928
+ PartnersApi.prototype.createOrUpdatePartnerFromAccount = function (requestParameters, options) {
929
+ var _this = this;
930
+ return (0, exports.PartnersApiFp)(this.configuration).createOrUpdatePartnerFromAccount(requestParameters.code, requestParameters.createOrUpdatePartnerFromAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
931
+ };
829
932
  /**
830
933
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
831
934
  * @summary Create the partner
@@ -0,0 +1,30 @@
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 CreateOrUpdatePartnerFromAccountRequestDto
16
+ */
17
+ export interface CreateOrUpdatePartnerFromAccountRequestDto {
18
+ /**
19
+ * Unique identifier of the account that this object belongs to.
20
+ * @type {string}
21
+ * @memberof CreateOrUpdatePartnerFromAccountRequestDto
22
+ */
23
+ 'accountCode'?: string;
24
+ /**
25
+ * Unique identifier of the partner that this object belongs to.
26
+ * @type {string}
27
+ * @memberof CreateOrUpdatePartnerFromAccountRequestDto
28
+ */
29
+ 'partnerCode'?: string;
30
+ }
@@ -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 CreateOrUpdatePartnerFromAccountResponseClass
17
+ */
18
+ export interface CreateOrUpdatePartnerFromAccountResponseClass {
19
+ /**
20
+ * The partner response.
21
+ * @type {PartnerClass}
22
+ * @memberof CreateOrUpdatePartnerFromAccountResponseClass
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 });
@@ -1,3 +1,5 @@
1
+ export * from './create-or-update-partner-from-account-request-dto';
2
+ export * from './create-or-update-partner-from-account-response-class';
1
3
  export * from './create-partner-relation-request-dto-rest';
2
4
  export * from './create-partner-relation-response-class';
3
5
  export * from './create-partner-request-dto';
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./create-or-update-partner-from-account-request-dto"), exports);
18
+ __exportStar(require("./create-or-update-partner-from-account-response-class"), exports);
17
19
  __exportStar(require("./create-partner-relation-request-dto-rest"), exports);
18
20
  __exportStar(require("./create-partner-relation-response-class"), exports);
19
21
  __exportStar(require("./create-partner-request-dto"), exports);
@@ -0,0 +1,36 @@
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 CreateOrUpdatePartnerFromAccountRequestDto
21
+ */
22
+ export interface CreateOrUpdatePartnerFromAccountRequestDto {
23
+ /**
24
+ * Unique identifier of the account that this object belongs to.
25
+ * @type {string}
26
+ * @memberof CreateOrUpdatePartnerFromAccountRequestDto
27
+ */
28
+ 'accountCode'?: string;
29
+ /**
30
+ * Unique identifier of the partner that this object belongs to.
31
+ * @type {string}
32
+ * @memberof CreateOrUpdatePartnerFromAccountRequestDto
33
+ */
34
+ 'partnerCode'?: string;
35
+ }
36
+
@@ -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 CreateOrUpdatePartnerFromAccountResponseClass
22
+ */
23
+ export interface CreateOrUpdatePartnerFromAccountResponseClass {
24
+ /**
25
+ * The partner response.
26
+ * @type {PartnerClass}
27
+ * @memberof CreateOrUpdatePartnerFromAccountResponseClass
28
+ */
29
+ 'partner': PartnerClass;
30
+ }
31
+
package/models/index.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export * from './create-or-update-partner-from-account-request-dto';
2
+ export * from './create-or-update-partner-from-account-response-class';
1
3
  export * from './create-partner-relation-request-dto-rest';
2
4
  export * from './create-partner-relation-response-class';
3
5
  export * from './create-partner-request-dto';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/partner-sdk-node",
3
- "version": "1.14.1-beta.1",
3
+ "version": "1.14.1-beta.2",
4
4
  "description": "OpenAPI client for @emilgroup/partner-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [