@soltech/fluid-common 0.1.4 → 0.1.6

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/lib/index.d.ts CHANGED
@@ -8,12 +8,12 @@ export declare enum TraitType {
8
8
  TEXT = "TEXT"
9
9
  }
10
10
  export declare enum PaymentType {
11
- BankTransfer = 0,
12
- CreditCard = 1,
13
- Crypto = 2,
14
- DigitalWallet = 3,
15
- PrepaidCard = 4,
16
- Voucher = 5
11
+ BANK_TRANSFER = "BankTransfer",
12
+ CREDIT_CARD = "CreditCard",
13
+ CRYPTO = "Crypto",
14
+ DIGITAL_WALLET = "DigitalWallet",
15
+ PREPAID_CARD = "PrepaidCard",
16
+ VOUCHER = "Voucher"
17
17
  }
18
18
  export interface WalletRequestBody {
19
19
  payload?: object | string;
@@ -51,11 +51,10 @@ export interface PaymentMethod {
51
51
  info: string;
52
52
  paymentType: PaymentType;
53
53
  }
54
- export interface RecentMethod {
54
+ export interface RecentMethod extends PaymentMethod {
55
55
  accountId: string;
56
56
  maskedAccount: string;
57
57
  lastSuccess: string;
58
- paymentMethod: PaymentMethod;
59
58
  }
60
59
  export interface TransactionParams {
61
60
  accountId?: string;
@@ -88,8 +87,10 @@ export interface TransactionOptions {
88
87
  userAgent?: string;
89
88
  }
90
89
  export interface TransactionResult {
90
+ error?: ProviderTransactionError;
91
91
  redirectOutput?: RedirectOutput;
92
- status: string;
92
+ state: string;
93
+ statusCode: string;
93
94
  transactionId: string;
94
95
  }
95
96
  export interface RedirectOutput {
package/lib/index.js CHANGED
@@ -11,12 +11,12 @@ export var TraitType;
11
11
  })(TraitType || (TraitType = {}));
12
12
  export var PaymentType;
13
13
  (function (PaymentType) {
14
- PaymentType[PaymentType["BankTransfer"] = 0] = "BankTransfer";
15
- PaymentType[PaymentType["CreditCard"] = 1] = "CreditCard";
16
- PaymentType[PaymentType["Crypto"] = 2] = "Crypto";
17
- PaymentType[PaymentType["DigitalWallet"] = 3] = "DigitalWallet";
18
- PaymentType[PaymentType["PrepaidCard"] = 4] = "PrepaidCard";
19
- PaymentType[PaymentType["Voucher"] = 5] = "Voucher";
14
+ PaymentType["BANK_TRANSFER"] = "BankTransfer";
15
+ PaymentType["CREDIT_CARD"] = "CreditCard";
16
+ PaymentType["CRYPTO"] = "Crypto";
17
+ PaymentType["DIGITAL_WALLET"] = "DigitalWallet";
18
+ PaymentType["PREPAID_CARD"] = "PrepaidCard";
19
+ PaymentType["VOUCHER"] = "Voucher";
20
20
  })(PaymentType || (PaymentType = {}));
21
21
  export var ErrorAction;
22
22
  (function (ErrorAction) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soltech/fluid-common",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "Fluid frontend and API commons",
6
6
  "main": "lib/index.js",
package/src/index.ts CHANGED
@@ -11,12 +11,12 @@ export enum TraitType {
11
11
  }
12
12
 
13
13
  export enum PaymentType {
14
- BankTransfer,
15
- CreditCard,
16
- Crypto,
17
- DigitalWallet,
18
- PrepaidCard,
19
- Voucher
14
+ BANK_TRANSFER = 'BankTransfer',
15
+ CREDIT_CARD = 'CreditCard',
16
+ CRYPTO = 'Crypto',
17
+ DIGITAL_WALLET = 'DigitalWallet',
18
+ PREPAID_CARD = 'PrepaidCard',
19
+ VOUCHER = 'Voucher'
20
20
  }
21
21
 
22
22
  export interface WalletRequestBody {
@@ -61,11 +61,10 @@ export interface PaymentMethod {
61
61
  paymentType: PaymentType;
62
62
  }
63
63
 
64
- export interface RecentMethod {
64
+ export interface RecentMethod extends PaymentMethod {
65
65
  accountId: string;
66
66
  maskedAccount: string;
67
67
  lastSuccess: string;
68
- paymentMethod: PaymentMethod; //TODO extend PaymentMethod instead
69
68
  }
70
69
 
71
70
  export interface TransactionParams {
@@ -104,8 +103,10 @@ export interface TransactionOptions {
104
103
  }
105
104
 
106
105
  export interface TransactionResult {
106
+ error?: ProviderTransactionError;
107
107
  redirectOutput?: RedirectOutput;
108
- status: string;
108
+ state: string;
109
+ statusCode: string;
109
110
  transactionId: string;
110
111
  }
111
112