@emilgroup/payment-sdk 1.4.1-beta.39 → 1.4.1-beta.40
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/README.md +2 -2
- package/base.ts +3 -3
- package/dist/base.d.ts +2 -2
- package/dist/base.js +1 -2
- package/dist/models/create-payment-request-dto.d.ts +2 -2
- package/models/create-payment-request-dto.ts +2 -2
- package/package.json +1 -1
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/payment-sdk@1.4.1-beta.
|
|
20
|
+
npm install @emilgroup/payment-sdk@1.4.1-beta.40 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/payment-sdk@1.4.1-beta.
|
|
24
|
+
yarn add @emilgroup/payment-sdk@1.4.1-beta.40
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PaymentsApi`.
|
package/base.ts
CHANGED
|
@@ -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,7 +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
|
|
80
|
+
private permissions?: string;
|
|
81
81
|
|
|
82
82
|
constructor(configuration?: Configuration,
|
|
83
83
|
protected basePath: string = BASE_PATH,
|
|
@@ -111,7 +111,7 @@ export class BaseAPI {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
getPermissions(): Array<string> {
|
|
114
|
-
return this.permissions;
|
|
114
|
+
return this.permissions.split(',');
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
async authorize(username: string, password: string): Promise<void> {
|
package/dist/base.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const COLLECTION_FORMATS: {
|
|
|
24
24
|
};
|
|
25
25
|
export interface LoginClass {
|
|
26
26
|
accessToken: string;
|
|
27
|
-
permissions:
|
|
27
|
+
permissions: string;
|
|
28
28
|
}
|
|
29
29
|
export declare enum Environment {
|
|
30
30
|
Production = "https://apiv2.emil.de",
|
|
@@ -52,7 +52,7 @@ export declare class BaseAPI {
|
|
|
52
52
|
protected axios: AxiosInstance;
|
|
53
53
|
protected configuration: Configuration | undefined;
|
|
54
54
|
private tokenData?;
|
|
55
|
-
private permissions
|
|
55
|
+
private permissions?;
|
|
56
56
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
57
57
|
selectEnvironment(env: Environment): void;
|
|
58
58
|
selectBasePath(path: string): void;
|
package/dist/base.js
CHANGED
|
@@ -121,7 +121,6 @@ var BaseAPI = /** @class */ (function () {
|
|
|
121
121
|
if (axios === void 0) { axios = axios_1.default; }
|
|
122
122
|
this.basePath = basePath;
|
|
123
123
|
this.axios = axios;
|
|
124
|
-
this.permissions = [];
|
|
125
124
|
this.loadTokenData();
|
|
126
125
|
if (configuration) {
|
|
127
126
|
this.configuration = configuration;
|
|
@@ -145,7 +144,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
145
144
|
this.configuration.basePath = path;
|
|
146
145
|
};
|
|
147
146
|
BaseAPI.prototype.getPermissions = function () {
|
|
148
|
-
return this.permissions;
|
|
147
|
+
return this.permissions.split(',');
|
|
149
148
|
};
|
|
150
149
|
BaseAPI.prototype.authorize = function (username, password) {
|
|
151
150
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -35,10 +35,10 @@ export interface CreatePaymentRequestDto {
|
|
|
35
35
|
'currency'?: string;
|
|
36
36
|
/**
|
|
37
37
|
* Invoices referenced in this payment. Usually, one payment has one invoice id but it is possible to pay multiple invoices at once with a single payment.
|
|
38
|
-
* @type {Array<
|
|
38
|
+
* @type {Array<number>}
|
|
39
39
|
* @memberof CreatePaymentRequestDto
|
|
40
40
|
*/
|
|
41
|
-
'invoiceIds': Array<
|
|
41
|
+
'invoiceIds': Array<number>;
|
|
42
42
|
/**
|
|
43
43
|
* Optional field contain extra information.
|
|
44
44
|
* @type {object}
|
|
@@ -40,10 +40,10 @@ export interface CreatePaymentRequestDto {
|
|
|
40
40
|
'currency'?: string;
|
|
41
41
|
/**
|
|
42
42
|
* Invoices referenced in this payment. Usually, one payment has one invoice id but it is possible to pay multiple invoices at once with a single payment.
|
|
43
|
-
* @type {Array<
|
|
43
|
+
* @type {Array<number>}
|
|
44
44
|
* @memberof CreatePaymentRequestDto
|
|
45
45
|
*/
|
|
46
|
-
'invoiceIds': Array<
|
|
46
|
+
'invoiceIds': Array<number>;
|
|
47
47
|
/**
|
|
48
48
|
* Optional field contain extra information.
|
|
49
49
|
* @type {object}
|