@emilgroup/payment-sdk 1.4.1-beta.9 → 1.5.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 +11 -11
- package/README.md +2 -2
- package/api/bank-accounts-api.ts +500 -88
- package/api/bank-transaction-api.ts +93 -123
- package/api/{default-api.ts → health-check-api.ts} +22 -18
- package/api/payment-methods-api.ts +61 -242
- package/api/payment-reminders-api.ts +57 -99
- package/api/payment-setup-api.ts +17 -9
- package/api/payments-api.ts +72 -135
- package/api/refunds-api.ts +80 -120
- package/api/tenant-bank-account-api.ts +96 -118
- package/api/webhooks-api.ts +38 -21
- package/api.ts +3 -3
- package/base.ts +22 -10
- package/common.ts +2 -2
- package/configuration.ts +1 -1
- package/dist/api/bank-accounts-api.d.ts +292 -69
- package/dist/api/bank-accounts-api.js +432 -62
- package/dist/api/bank-transaction-api.d.ts +84 -104
- package/dist/api/bank-transaction-api.js +63 -74
- package/dist/api/health-check-api.d.ts +70 -0
- package/dist/api/{default-api.js → health-check-api.js} +31 -27
- package/dist/api/payment-methods-api.d.ts +51 -151
- package/dist/api/payment-methods-api.js +48 -178
- package/dist/api/payment-reminders-api.d.ts +52 -79
- package/dist/api/payment-reminders-api.js +44 -62
- package/dist/api/payment-setup-api.d.ts +17 -9
- package/dist/api/payment-setup-api.js +17 -9
- package/dist/api/payments-api.d.ts +62 -98
- package/dist/api/payments-api.js +55 -85
- package/dist/api/refunds-api.d.ts +73 -91
- package/dist/api/refunds-api.js +58 -68
- package/dist/api/tenant-bank-account-api.d.ts +90 -105
- package/dist/api/tenant-bank-account-api.js +63 -75
- package/dist/api/webhooks-api.d.ts +29 -16
- package/dist/api/webhooks-api.js +29 -19
- package/dist/api.d.ts +2 -2
- package/dist/api.js +2 -2
- package/dist/base.d.ts +6 -3
- package/dist/base.js +31 -22
- package/dist/common.d.ts +2 -2
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/models/{bank-transaction-response-class.d.ts → bank-transaction-class-without-expand-properties.d.ts} +31 -33
- package/dist/models/{bank-transaction-response-class.js → bank-transaction-class-without-expand-properties.js} +1 -1
- package/dist/models/create-bank-account-request-dto.d.ts +42 -0
- package/dist/models/{get-refund-response-class.js → create-bank-account-request-dto.js} +1 -1
- package/dist/models/create-payment-reminder-request-dto.d.ts +1 -1
- package/dist/models/create-payment-reminder-request-dto.js +1 -1
- package/dist/models/create-payment-request-dto.d.ts +3 -3
- package/dist/models/create-payment-request-dto.js +1 -1
- package/dist/models/create-refund-request-dto.d.ts +1 -1
- package/dist/models/create-refund-request-dto.js +1 -1
- package/dist/models/create-tenant-bank-account-request-dto.d.ts +1 -1
- package/dist/models/create-tenant-bank-account-request-dto.js +1 -1
- package/dist/models/create-tenant-bank-account-response-class.d.ts +25 -0
- package/dist/models/{create-refund-response-class.js → create-tenant-bank-account-response-class.js} +1 -1
- package/dist/models/deactivate-payment-reminder-request-dto.d.ts +1 -1
- package/dist/models/deactivate-payment-reminder-request-dto.js +1 -1
- package/dist/models/get-tenant-bank-account-response-class.d.ts +5 -5
- package/dist/models/get-tenant-bank-account-response-class.js +1 -1
- package/dist/models/index.d.ts +10 -10
- package/dist/models/index.js +10 -10
- package/dist/models/inline-response200.d.ts +1 -1
- package/dist/models/inline-response200.js +1 -1
- package/dist/models/inline-response503.d.ts +1 -1
- package/dist/models/inline-response503.js +1 -1
- package/dist/models/link-bank-transaction-request-dto-rest.d.ts +1 -1
- package/dist/models/link-bank-transaction-request-dto-rest.js +1 -1
- package/dist/models/list-tenant-bank-account-response-class.d.ts +31 -0
- package/dist/models/{get-bank-transactions-response-class.js → list-tenant-bank-account-response-class.js} +1 -1
- package/dist/models/set-primary-bank-account-request-dto-rest.d.ts +24 -0
- package/dist/models/set-primary-bank-account-request-dto-rest.js +15 -0
- package/dist/models/{tenant-bank-account-response-class.d.ts → tenant-bank-account-class-without-expand-properties.d.ts} +23 -11
- package/dist/models/tenant-bank-account-class-without-expand-properties.js +15 -0
- package/dist/models/tenant-bank-account-class.d.ts +85 -0
- package/dist/models/tenant-bank-account-class.js +15 -0
- package/dist/models/unlink-bank-transaction-request-dto-rest.d.ts +2 -2
- package/dist/models/unlink-bank-transaction-request-dto-rest.js +1 -1
- package/dist/models/update-bank-account-request-dto-rest.d.ts +30 -0
- package/dist/models/update-bank-account-request-dto-rest.js +15 -0
- package/dist/models/update-bank-account-request-dto.d.ts +36 -0
- package/dist/models/update-bank-account-request-dto.js +15 -0
- package/dist/models/update-tenant-bank-account-response-class.d.ts +25 -0
- package/dist/models/update-tenant-bank-account-response-class.js +15 -0
- package/dist/models/update-tenant-bank-account-rest-request-dto.d.ts +1 -1
- package/dist/models/update-tenant-bank-account-rest-request-dto.js +1 -1
- package/dist/models/validate-pspconfig-request-dto.d.ts +1 -1
- package/dist/models/validate-pspconfig-request-dto.js +1 -1
- package/index.ts +1 -1
- package/models/{bank-transaction-response-class.ts → bank-transaction-class-without-expand-properties.ts} +31 -33
- package/models/create-bank-account-request-dto.ts +48 -0
- package/models/create-payment-reminder-request-dto.ts +1 -1
- package/models/create-payment-request-dto.ts +3 -3
- package/models/create-refund-request-dto.ts +1 -1
- package/models/create-tenant-bank-account-request-dto.ts +1 -1
- package/models/create-tenant-bank-account-response-class.ts +31 -0
- package/models/deactivate-payment-reminder-request-dto.ts +1 -1
- package/models/get-tenant-bank-account-response-class.ts +5 -5
- package/models/index.ts +10 -10
- package/models/inline-response200.ts +1 -1
- package/models/inline-response503.ts +1 -1
- package/models/link-bank-transaction-request-dto-rest.ts +1 -1
- package/models/list-tenant-bank-account-response-class.ts +37 -0
- package/models/set-primary-bank-account-request-dto-rest.ts +30 -0
- package/models/{tenant-bank-account-response-class.ts → tenant-bank-account-class-without-expand-properties.ts} +23 -11
- package/models/tenant-bank-account-class.ts +91 -0
- package/models/unlink-bank-transaction-request-dto-rest.ts +2 -2
- package/models/update-bank-account-request-dto-rest.ts +36 -0
- package/models/update-bank-account-request-dto.ts +42 -0
- package/models/update-tenant-bank-account-response-class.ts +31 -0
- package/models/update-tenant-bank-account-rest-request-dto.ts +1 -1
- package/models/validate-pspconfig-request-dto.ts +1 -1
- package/package.json +1 -1
- package/dist/api/default-api.d.ts +0 -66
- package/dist/models/create-refund-response-class.d.ts +0 -25
- package/dist/models/get-bank-transactions-response-class.d.ts +0 -25
- package/dist/models/get-refund-response-class.d.ts +0 -25
- package/dist/models/get-request-dto.d.ts +0 -30
- package/dist/models/get-request-dto.js +0 -15
- package/dist/models/list-bank-transactions-response-class.d.ts +0 -31
- package/dist/models/list-bank-transactions-response-class.js +0 -15
- package/dist/models/list-refunds-response-class.d.ts +0 -31
- package/dist/models/list-refunds-response-class.js +0 -15
- package/dist/models/refund-class.d.ts +0 -104
- package/dist/models/refund-class.js +0 -28
- package/dist/models/tenant-bank-account-response-class.js +0 -15
- package/dist/models/transaction-class.d.ts +0 -54
- package/dist/models/transaction-class.js +0 -15
- package/models/create-refund-response-class.ts +0 -31
- package/models/get-bank-transactions-response-class.ts +0 -31
- package/models/get-refund-response-class.ts +0 -31
- package/models/get-request-dto.ts +0 -36
- package/models/list-bank-transactions-response-class.ts +0 -37
- package/models/list-refunds-response-class.ts +0 -37
- package/models/refund-class.ts +0 -114
- package/models/transaction-class.ts +0 -60
package/api/webhooks-api.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Emil Payment Service
|
|
5
|
-
* This service directly communicates with the various Payment Service Providers (PSPs)
|
|
5
|
+
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
8
|
* Contact: kontakt@emil.de
|
|
@@ -27,20 +27,25 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
|
|
27
27
|
export const WebhooksApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
28
28
|
return {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @
|
|
32
|
-
* @param {string}
|
|
30
|
+
* This will processes the webhook from external payment service provider.
|
|
31
|
+
* @summary Handle the webhook from PSP
|
|
32
|
+
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis</i>
|
|
33
|
+
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
34
|
+
* @param {string} productSlug
|
|
33
35
|
* @param {*} [options] Override http request option.
|
|
34
36
|
* @throws {RequiredError}
|
|
35
37
|
*/
|
|
36
|
-
postWebhook: async (pspType: string, tenantSlug: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
38
|
+
postWebhook: async (pspType: string, tenantSlug: string, productSlug: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
37
39
|
// verify required parameter 'pspType' is not null or undefined
|
|
38
40
|
assertParamExists('postWebhook', 'pspType', pspType)
|
|
39
41
|
// verify required parameter 'tenantSlug' is not null or undefined
|
|
40
42
|
assertParamExists('postWebhook', 'tenantSlug', tenantSlug)
|
|
41
|
-
|
|
43
|
+
// verify required parameter 'productSlug' is not null or undefined
|
|
44
|
+
assertParamExists('postWebhook', 'productSlug', productSlug)
|
|
45
|
+
const localVarPath = `/paymentservice/v1/webhooks/{pspType}/{tenantSlug}/{productSlug}`
|
|
42
46
|
.replace(`{${"pspType"}}`, encodeURIComponent(String(pspType)))
|
|
43
|
-
.replace(`{${"tenantSlug"}}`, encodeURIComponent(String(tenantSlug)))
|
|
47
|
+
.replace(`{${"tenantSlug"}}`, encodeURIComponent(String(tenantSlug)))
|
|
48
|
+
.replace(`{${"productSlug"}}`, encodeURIComponent(String(productSlug)));
|
|
44
49
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
45
50
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
46
51
|
let baseOptions;
|
|
@@ -76,14 +81,16 @@ export const WebhooksApiFp = function(configuration?: Configuration) {
|
|
|
76
81
|
const localVarAxiosParamCreator = WebhooksApiAxiosParamCreator(configuration)
|
|
77
82
|
return {
|
|
78
83
|
/**
|
|
79
|
-
*
|
|
80
|
-
* @
|
|
81
|
-
* @param {string}
|
|
84
|
+
* This will processes the webhook from external payment service provider.
|
|
85
|
+
* @summary Handle the webhook from PSP
|
|
86
|
+
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis</i>
|
|
87
|
+
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
88
|
+
* @param {string} productSlug
|
|
82
89
|
* @param {*} [options] Override http request option.
|
|
83
90
|
* @throws {RequiredError}
|
|
84
91
|
*/
|
|
85
|
-
async postWebhook(pspType: string, tenantSlug: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
86
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.postWebhook(pspType, tenantSlug, options);
|
|
92
|
+
async postWebhook(pspType: string, tenantSlug: string, productSlug: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
93
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.postWebhook(pspType, tenantSlug, productSlug, options);
|
|
87
94
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
88
95
|
},
|
|
89
96
|
}
|
|
@@ -97,14 +104,16 @@ export const WebhooksApiFactory = function (configuration?: Configuration, baseP
|
|
|
97
104
|
const localVarFp = WebhooksApiFp(configuration)
|
|
98
105
|
return {
|
|
99
106
|
/**
|
|
100
|
-
*
|
|
101
|
-
* @
|
|
102
|
-
* @param {string}
|
|
107
|
+
* This will processes the webhook from external payment service provider.
|
|
108
|
+
* @summary Handle the webhook from PSP
|
|
109
|
+
* @param {string} pspType The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis</i>
|
|
110
|
+
* @param {string} tenantSlug Unique slug identifier representing a tenant.
|
|
111
|
+
* @param {string} productSlug
|
|
103
112
|
* @param {*} [options] Override http request option.
|
|
104
113
|
* @throws {RequiredError}
|
|
105
114
|
*/
|
|
106
|
-
postWebhook(pspType: string, tenantSlug: string, options?: any): AxiosPromise<void> {
|
|
107
|
-
return localVarFp.postWebhook(pspType, tenantSlug, options).then((request) => request(axios, basePath));
|
|
115
|
+
postWebhook(pspType: string, tenantSlug: string, productSlug: string, options?: any): AxiosPromise<void> {
|
|
116
|
+
return localVarFp.postWebhook(pspType, tenantSlug, productSlug, options).then((request) => request(axios, basePath));
|
|
108
117
|
},
|
|
109
118
|
};
|
|
110
119
|
};
|
|
@@ -116,18 +125,25 @@ export const WebhooksApiFactory = function (configuration?: Configuration, baseP
|
|
|
116
125
|
*/
|
|
117
126
|
export interface WebhooksApiPostWebhookRequest {
|
|
118
127
|
/**
|
|
119
|
-
*
|
|
128
|
+
* The type of the payment service provider (PSP).<br/> <br/> <i>Supported PSP: braintree, stripe, b4u, eis</i>
|
|
120
129
|
* @type {string}
|
|
121
130
|
* @memberof WebhooksApiPostWebhook
|
|
122
131
|
*/
|
|
123
132
|
readonly pspType: string
|
|
124
133
|
|
|
125
134
|
/**
|
|
126
|
-
*
|
|
135
|
+
* Unique slug identifier representing a tenant.
|
|
127
136
|
* @type {string}
|
|
128
137
|
* @memberof WebhooksApiPostWebhook
|
|
129
138
|
*/
|
|
130
139
|
readonly tenantSlug: string
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
*
|
|
143
|
+
* @type {string}
|
|
144
|
+
* @memberof WebhooksApiPostWebhook
|
|
145
|
+
*/
|
|
146
|
+
readonly productSlug: string
|
|
131
147
|
}
|
|
132
148
|
|
|
133
149
|
/**
|
|
@@ -138,13 +154,14 @@ export interface WebhooksApiPostWebhookRequest {
|
|
|
138
154
|
*/
|
|
139
155
|
export class WebhooksApi extends BaseAPI {
|
|
140
156
|
/**
|
|
141
|
-
*
|
|
157
|
+
* This will processes the webhook from external payment service provider.
|
|
158
|
+
* @summary Handle the webhook from PSP
|
|
142
159
|
* @param {WebhooksApiPostWebhookRequest} requestParameters Request parameters.
|
|
143
160
|
* @param {*} [options] Override http request option.
|
|
144
161
|
* @throws {RequiredError}
|
|
145
162
|
* @memberof WebhooksApi
|
|
146
163
|
*/
|
|
147
164
|
public postWebhook(requestParameters: WebhooksApiPostWebhookRequest, options?: AxiosRequestConfig) {
|
|
148
|
-
return WebhooksApiFp(this.configuration).postWebhook(requestParameters.pspType, requestParameters.tenantSlug, options).then((request) => request(this.axios, this.basePath));
|
|
165
|
+
return WebhooksApiFp(this.configuration).postWebhook(requestParameters.pspType, requestParameters.tenantSlug, requestParameters.productSlug, options).then((request) => request(this.axios, this.basePath));
|
|
149
166
|
}
|
|
150
167
|
}
|
package/api.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Emil Payment Service
|
|
5
|
-
* This service directly communicates with the various Payment Service Providers (PSPs)
|
|
5
|
+
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
8
|
* Contact: kontakt@emil.de
|
|
@@ -22,7 +22,7 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
|
|
23
23
|
import { BankAccountsApi } from './api';
|
|
24
24
|
import { BankTransactionApi } from './api';
|
|
25
|
-
import {
|
|
25
|
+
import { HealthCheckApi } from './api';
|
|
26
26
|
import { PaymentMethodsApi } from './api';
|
|
27
27
|
import { PaymentRemindersApi } from './api';
|
|
28
28
|
import { PaymentSetupApi } from './api';
|
|
@@ -34,7 +34,7 @@ import { WebhooksApi } from './api';
|
|
|
34
34
|
|
|
35
35
|
export * from './api/bank-accounts-api';
|
|
36
36
|
export * from './api/bank-transaction-api';
|
|
37
|
-
export * from './api/
|
|
37
|
+
export * from './api/health-check-api';
|
|
38
38
|
export * from './api/payment-methods-api';
|
|
39
39
|
export * from './api/payment-reminders-api';
|
|
40
40
|
export * from './api/payment-setup-api';
|
package/base.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Emil Payment Service
|
|
5
|
-
* This service directly communicates with the various Payment Service Providers (PSPs)
|
|
5
|
+
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
8
|
* Contact: kontakt@emil.de
|
|
@@ -34,7 +34,7 @@ export const COLLECTION_FORMATS = {
|
|
|
34
34
|
|
|
35
35
|
export interface LoginClass {
|
|
36
36
|
accessToken: string;
|
|
37
|
-
permissions:
|
|
37
|
+
permissions: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export enum Environment {
|
|
@@ -77,6 +77,7 @@ const TOKEN_DATA = 'APP_TOKEN';
|
|
|
77
77
|
export class BaseAPI {
|
|
78
78
|
protected configuration: Configuration | undefined;
|
|
79
79
|
private tokenData?: TokenData;
|
|
80
|
+
private permissions?: string;
|
|
80
81
|
|
|
81
82
|
constructor(configuration?: Configuration,
|
|
82
83
|
protected basePath: string = BASE_PATH,
|
|
@@ -102,7 +103,15 @@ export class BaseAPI {
|
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
selectEnvironment(env: Environment) {
|
|
105
|
-
this.
|
|
106
|
+
this.selectBasePath(env);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
selectBasePath(path: string) {
|
|
110
|
+
this.configuration.basePath = path;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
getPermissions(): Array<string> {
|
|
114
|
+
return this.permissions.split(',');
|
|
106
115
|
}
|
|
107
116
|
|
|
108
117
|
async authorize(username: string, password: string): Promise<void> {
|
|
@@ -119,23 +128,24 @@ export class BaseAPI {
|
|
|
119
128
|
|
|
120
129
|
const response = await globalAxios.request<LoginClass>(options);
|
|
121
130
|
|
|
122
|
-
const { data: { accessToken } } = response;
|
|
131
|
+
const { data: { accessToken, permissions } } = response;
|
|
123
132
|
|
|
124
133
|
this.configuration.username = username;
|
|
125
134
|
this.configuration.accessToken = `Bearer ${accessToken}`;
|
|
126
135
|
this.tokenData.username = username;
|
|
127
136
|
this.tokenData.accessToken = accessToken;
|
|
137
|
+
this.permissions = permissions;
|
|
128
138
|
|
|
129
139
|
this.storeTokenData({
|
|
130
140
|
...this.tokenData
|
|
131
141
|
});
|
|
132
142
|
}
|
|
133
143
|
|
|
134
|
-
async refreshTokenInternal(): Promise<
|
|
144
|
+
async refreshTokenInternal(): Promise<LoginClass> {
|
|
135
145
|
const { username } = this.configuration;
|
|
136
146
|
|
|
137
147
|
if (!username) {
|
|
138
|
-
|
|
148
|
+
throw new Error('Failed to refresh token.');
|
|
139
149
|
}
|
|
140
150
|
|
|
141
151
|
const options: AxiosRequestConfig = {
|
|
@@ -148,9 +158,9 @@ export class BaseAPI {
|
|
|
148
158
|
withCredentials: true,
|
|
149
159
|
};
|
|
150
160
|
|
|
151
|
-
const
|
|
161
|
+
const response = await globalAxios.request<LoginClass>(options);
|
|
152
162
|
|
|
153
|
-
return
|
|
163
|
+
return response.data;
|
|
154
164
|
}
|
|
155
165
|
|
|
156
166
|
private storeTokenData(tokenData?: TokenData) {
|
|
@@ -184,8 +194,9 @@ export class BaseAPI {
|
|
|
184
194
|
&& !originalConfig._retry) {
|
|
185
195
|
originalConfig._retry = true;
|
|
186
196
|
try {
|
|
187
|
-
|
|
197
|
+
const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
|
|
188
198
|
const accessToken = `Bearer ${tokenString}`;
|
|
199
|
+
this.permissions = permissions;
|
|
189
200
|
|
|
190
201
|
delete originalConfig.headers['Authorization']
|
|
191
202
|
|
|
@@ -210,8 +221,9 @@ export class BaseAPI {
|
|
|
210
221
|
) {
|
|
211
222
|
_retry_count++;
|
|
212
223
|
try {
|
|
213
|
-
|
|
224
|
+
const { accessToken: tokenString, permissions } = await this.refreshTokenInternal();
|
|
214
225
|
const accessToken = `Bearer ${tokenString}`;
|
|
226
|
+
this.permissions = permissions;
|
|
215
227
|
|
|
216
228
|
_retry = true;
|
|
217
229
|
originalConfig.headers['Authorization'] = accessToken;
|
package/common.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Emil Payment Service
|
|
5
|
-
* This service directly communicates with the various Payment Service Providers (PSPs)
|
|
5
|
+
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
8
|
* Contact: kontakt@emil.de
|
|
@@ -140,7 +140,7 @@ export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxi
|
|
|
140
140
|
/* eslint-disable */
|
|
141
141
|
/**
|
|
142
142
|
* Emil Payment Service
|
|
143
|
-
* This service directly communicates with the various Payment Service Providers (PSPs)
|
|
143
|
+
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
144
144
|
*
|
|
145
145
|
* The version of the OpenAPI document: 1.0
|
|
146
146
|
* Contact: kontakt@emil.de
|
package/configuration.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Emil Payment Service
|
|
5
|
-
* This service directly communicates with the various Payment Service Providers (PSPs)
|
|
5
|
+
* This service directly communicates with the various Payment Service Providers (PSPs) in order to charge or refund customers. This service will automatically connect to the PSP linked in your admin configuration; meaning if you configured Stripe, it will automatically create a payment on Stripe when you create it in Emil.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0
|
|
8
8
|
* Contact: kontakt@emil.de
|