@emilgroup/partner-sdk 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@1.14.1-beta.1 --save
20
+ npm install @emilgroup/partner-sdk@1.14.1-beta.2 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/partner-sdk@1.14.1-beta.1
24
+ yarn add @emilgroup/partner-sdk@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';
@@ -44,6 +48,57 @@ import { UpdatePartnerResponseClass } from '../models';
44
48
  */
45
49
  export const PartnersApiAxiosParamCreator = function (configuration?: Configuration) {
46
50
  return {
51
+ /**
52
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
53
+ * @summary Retrieve the create or update partner from account
54
+ * @param {any} code Unique identifier for the object.
55
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
56
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
57
+ * @param {*} [options] Override http request option.
58
+ * @throws {RequiredError}
59
+ */
60
+ createOrUpdatePartnerFromAccount: async (code: any, createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
61
+ // verify required parameter 'code' is not null or undefined
62
+ assertParamExists('createOrUpdatePartnerFromAccount', 'code', code)
63
+ // verify required parameter 'createOrUpdatePartnerFromAccountRequestDto' is not null or undefined
64
+ assertParamExists('createOrUpdatePartnerFromAccount', 'createOrUpdatePartnerFromAccountRequestDto', createOrUpdatePartnerFromAccountRequestDto)
65
+ const localVarPath = `/partnerservice/v1/partners/create-or-update-partner-from-account`
66
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
67
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
68
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
69
+ let baseOptions;
70
+ let baseAccessToken;
71
+ if (configuration) {
72
+ baseOptions = configuration.baseOptions;
73
+ baseAccessToken = configuration.accessToken;
74
+ }
75
+
76
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
77
+ const localVarHeaderParameter = {} as any;
78
+ const localVarQueryParameter = {} as any;
79
+
80
+ // authentication bearer required
81
+ // http bearer authentication required
82
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
83
+
84
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
85
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
86
+ }
87
+
88
+
89
+
90
+ localVarHeaderParameter['Content-Type'] = 'application/json';
91
+
92
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
93
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
94
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
95
+ localVarRequestOptions.data = serializeDataIfNeeded(createOrUpdatePartnerFromAccountRequestDto, localVarRequestOptions, configuration)
96
+
97
+ return {
98
+ url: toPathString(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ },
47
102
  /**
48
103
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
49
104
  * @summary Create the partner
@@ -454,6 +509,19 @@ export const PartnersApiAxiosParamCreator = function (configuration?: Configurat
454
509
  export const PartnersApiFp = function(configuration?: Configuration) {
455
510
  const localVarAxiosParamCreator = PartnersApiAxiosParamCreator(configuration)
456
511
  return {
512
+ /**
513
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
514
+ * @summary Retrieve the create or update partner from account
515
+ * @param {any} code Unique identifier for the object.
516
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
517
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ async createOrUpdatePartnerFromAccount(code: any, createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPartnerVersionResponseClass>> {
522
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createOrUpdatePartnerFromAccount(code, createOrUpdatePartnerFromAccountRequestDto, authorization, options);
523
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
524
+ },
457
525
  /**
458
526
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
459
527
  * @summary Create the partner
@@ -564,6 +632,18 @@ export const PartnersApiFp = function(configuration?: Configuration) {
564
632
  export const PartnersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
565
633
  const localVarFp = PartnersApiFp(configuration)
566
634
  return {
635
+ /**
636
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
637
+ * @summary Retrieve the create or update partner from account
638
+ * @param {any} code Unique identifier for the object.
639
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
640
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
641
+ * @param {*} [options] Override http request option.
642
+ * @throws {RequiredError}
643
+ */
644
+ createOrUpdatePartnerFromAccount(code: any, createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto, authorization?: string, options?: any): AxiosPromise<GetPartnerVersionResponseClass> {
645
+ return localVarFp.createOrUpdatePartnerFromAccount(code, createOrUpdatePartnerFromAccountRequestDto, authorization, options).then((request) => request(axios, basePath));
646
+ },
567
647
  /**
568
648
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
569
649
  * @summary Create the partner
@@ -660,6 +740,34 @@ export const PartnersApiFactory = function (configuration?: Configuration, baseP
660
740
  };
661
741
  };
662
742
 
743
+ /**
744
+ * Request parameters for createOrUpdatePartnerFromAccount operation in PartnersApi.
745
+ * @export
746
+ * @interface PartnersApiCreateOrUpdatePartnerFromAccountRequest
747
+ */
748
+ export interface PartnersApiCreateOrUpdatePartnerFromAccountRequest {
749
+ /**
750
+ * Unique identifier for the object.
751
+ * @type {any}
752
+ * @memberof PartnersApiCreateOrUpdatePartnerFromAccount
753
+ */
754
+ readonly code: any
755
+
756
+ /**
757
+ *
758
+ * @type {CreateOrUpdatePartnerFromAccountRequestDto}
759
+ * @memberof PartnersApiCreateOrUpdatePartnerFromAccount
760
+ */
761
+ readonly createOrUpdatePartnerFromAccountRequestDto: CreateOrUpdatePartnerFromAccountRequestDto
762
+
763
+ /**
764
+ * Bearer Token: provided by the login endpoint under the name accessToken.
765
+ * @type {string}
766
+ * @memberof PartnersApiCreateOrUpdatePartnerFromAccount
767
+ */
768
+ readonly authorization?: string
769
+ }
770
+
663
771
  /**
664
772
  * Request parameters for createPartner operation in PartnersApi.
665
773
  * @export
@@ -926,6 +1034,18 @@ export interface PartnersApiUpdatePartnerRequest {
926
1034
  * @extends {BaseAPI}
927
1035
  */
928
1036
  export class PartnersApi extends BaseAPI {
1037
+ /**
1038
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
1039
+ * @summary Retrieve the create or update partner from account
1040
+ * @param {PartnersApiCreateOrUpdatePartnerFromAccountRequest} requestParameters Request parameters.
1041
+ * @param {*} [options] Override http request option.
1042
+ * @throws {RequiredError}
1043
+ * @memberof PartnersApi
1044
+ */
1045
+ public createOrUpdatePartnerFromAccount(requestParameters: PartnersApiCreateOrUpdatePartnerFromAccountRequest, options?: AxiosRequestConfig) {
1046
+ return PartnersApiFp(this.configuration).createOrUpdatePartnerFromAccount(requestParameters.code, requestParameters.createOrUpdatePartnerFromAccountRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1047
+ }
1048
+
929
1049
  /**
930
1050
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
931
1051
  * @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
@@ -101,6 +101,63 @@ var base_1 = require("../base");
101
101
  var PartnersApiAxiosParamCreator = function (configuration) {
102
102
  var _this = this;
103
103
  return {
104
+ /**
105
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
106
+ * @summary Retrieve the create or update partner from account
107
+ * @param {any} code Unique identifier for the object.
108
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
109
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
110
+ * @param {*} [options] Override http request option.
111
+ * @throws {RequiredError}
112
+ */
113
+ createOrUpdatePartnerFromAccount: function (code_1, createOrUpdatePartnerFromAccountRequestDto_1, authorization_1) {
114
+ var args_1 = [];
115
+ for (var _i = 3; _i < arguments.length; _i++) {
116
+ args_1[_i - 3] = arguments[_i];
117
+ }
118
+ return __awaiter(_this, __spreadArray([code_1, createOrUpdatePartnerFromAccountRequestDto_1, authorization_1], args_1, true), void 0, function (code, createOrUpdatePartnerFromAccountRequestDto, authorization, options) {
119
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
120
+ if (options === void 0) { options = {}; }
121
+ return __generator(this, function (_a) {
122
+ switch (_a.label) {
123
+ case 0:
124
+ // verify required parameter 'code' is not null or undefined
125
+ (0, common_1.assertParamExists)('createOrUpdatePartnerFromAccount', 'code', code);
126
+ // verify required parameter 'createOrUpdatePartnerFromAccountRequestDto' is not null or undefined
127
+ (0, common_1.assertParamExists)('createOrUpdatePartnerFromAccount', 'createOrUpdatePartnerFromAccountRequestDto', createOrUpdatePartnerFromAccountRequestDto);
128
+ localVarPath = "/partnerservice/v1/partners/create-or-update-partner-from-account"
129
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
130
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
131
+ if (configuration) {
132
+ baseOptions = configuration.baseOptions;
133
+ baseAccessToken = configuration.accessToken;
134
+ }
135
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
136
+ localVarHeaderParameter = {};
137
+ localVarQueryParameter = {};
138
+ // authentication bearer required
139
+ // http bearer authentication required
140
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
141
+ case 1:
142
+ // authentication bearer required
143
+ // http bearer authentication required
144
+ _a.sent();
145
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
146
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
147
+ }
148
+ localVarHeaderParameter['Content-Type'] = 'application/json';
149
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
150
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
151
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
152
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createOrUpdatePartnerFromAccountRequestDto, localVarRequestOptions, configuration);
153
+ return [2 /*return*/, {
154
+ url: (0, common_1.toPathString)(localVarUrlObj),
155
+ options: localVarRequestOptions,
156
+ }];
157
+ }
158
+ });
159
+ });
160
+ },
104
161
  /**
105
162
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
106
163
  * @summary Create the partner
@@ -542,6 +599,28 @@ exports.PartnersApiAxiosParamCreator = PartnersApiAxiosParamCreator;
542
599
  var PartnersApiFp = function (configuration) {
543
600
  var localVarAxiosParamCreator = (0, exports.PartnersApiAxiosParamCreator)(configuration);
544
601
  return {
602
+ /**
603
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
604
+ * @summary Retrieve the create or update partner from account
605
+ * @param {any} code Unique identifier for the object.
606
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
607
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
608
+ * @param {*} [options] Override http request option.
609
+ * @throws {RequiredError}
610
+ */
611
+ createOrUpdatePartnerFromAccount: function (code, createOrUpdatePartnerFromAccountRequestDto, authorization, options) {
612
+ return __awaiter(this, void 0, void 0, function () {
613
+ var localVarAxiosArgs;
614
+ return __generator(this, function (_a) {
615
+ switch (_a.label) {
616
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createOrUpdatePartnerFromAccount(code, createOrUpdatePartnerFromAccountRequestDto, authorization, options)];
617
+ case 1:
618
+ localVarAxiosArgs = _a.sent();
619
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
620
+ }
621
+ });
622
+ });
623
+ },
545
624
  /**
546
625
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
547
626
  * @summary Create the partner
@@ -715,6 +794,18 @@ exports.PartnersApiFp = PartnersApiFp;
715
794
  var PartnersApiFactory = function (configuration, basePath, axios) {
716
795
  var localVarFp = (0, exports.PartnersApiFp)(configuration);
717
796
  return {
797
+ /**
798
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
799
+ * @summary Retrieve the create or update partner from account
800
+ * @param {any} code Unique identifier for the object.
801
+ * @param {CreateOrUpdatePartnerFromAccountRequestDto} createOrUpdatePartnerFromAccountRequestDto
802
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
803
+ * @param {*} [options] Override http request option.
804
+ * @throws {RequiredError}
805
+ */
806
+ createOrUpdatePartnerFromAccount: function (code, createOrUpdatePartnerFromAccountRequestDto, authorization, options) {
807
+ return localVarFp.createOrUpdatePartnerFromAccount(code, createOrUpdatePartnerFromAccountRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
808
+ },
718
809
  /**
719
810
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
720
811
  * @summary Create the partner
@@ -822,6 +913,18 @@ var PartnersApi = /** @class */ (function (_super) {
822
913
  function PartnersApi() {
823
914
  return _super !== null && _super.apply(this, arguments) || this;
824
915
  }
916
+ /**
917
+ * Creates or updates a partner from an account. Resolves the account by partner code if not provided. **Required Permissions** \"partner-management.partners.create\"
918
+ * @summary Retrieve the create or update partner from account
919
+ * @param {PartnersApiCreateOrUpdatePartnerFromAccountRequest} requestParameters Request parameters.
920
+ * @param {*} [options] Override http request option.
921
+ * @throws {RequiredError}
922
+ * @memberof PartnersApi
923
+ */
924
+ PartnersApi.prototype.createOrUpdatePartnerFromAccount = function (requestParameters, options) {
925
+ var _this = this;
926
+ return (0, exports.PartnersApiFp)(this.configuration).createOrUpdatePartnerFromAccount(requestParameters.code, requestParameters.createOrUpdatePartnerFromAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
927
+ };
825
928
  /**
826
929
  * This will create a partner. **Required Permissions** \"partner-management.partners.create\"
827
930
  * @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",
3
- "version": "1.14.1-beta.1",
3
+ "version": "1.14.1-beta.2",
4
4
  "description": "OpenAPI client for @emilgroup/partner-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [