@finteqhub/sdk-js 0.4.1 → 0.5.1

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.
@@ -3,7 +3,7 @@ export declare type Card = {
3
3
  holder: string;
4
4
  expiryMonth: number;
5
5
  expiryYear: number;
6
- CVV: string;
6
+ cvv: string;
7
7
  tokenize: boolean;
8
8
  };
9
9
  export declare type Payer = {
@@ -48,6 +48,22 @@ export declare type CustomerAccount = {
48
48
  paymentMethod?: string;
49
49
  status?: string;
50
50
  metadata?: any;
51
+ } | {
52
+ id?: string;
53
+ integrationAccountId?: string;
54
+ paymentMethod?: "card-acquirer";
55
+ status?: string;
56
+ metadata?: {
57
+ iin: string;
58
+ brand: string;
59
+ type: string;
60
+ issuer: string;
61
+ issuer_country: string;
62
+ expiryMonth: number;
63
+ expiryYear: number;
64
+ maskedPAN: string;
65
+ tokenized?: boolean;
66
+ };
51
67
  };
52
68
  export declare type OperationSession = {
53
69
  amount: string;
@@ -59,21 +75,23 @@ export declare type OperationSession = {
59
75
  transactionId: string;
60
76
  transactionType: string;
61
77
  };
62
- export declare type PaymentMethods = {
63
- credentials: {
64
- [key: string]: {
65
- fields?: {
66
- [key: string]: FieldDetails;
67
- };
68
- required?: Array<string>;
69
- };
78
+ export declare type PaymentMethod = {
79
+ friendlyName?: string;
80
+ logo?: string;
81
+ $credentials?: string;
82
+ };
83
+ export declare type PaymentMethodCredentials = {
84
+ [key: string]: {
85
+ fields?: {
86
+ [key: string]: FieldDetails;
87
+ } | undefined;
88
+ required?: string[] | undefined;
70
89
  };
90
+ };
91
+ export declare type PaymentMethods = {
92
+ credentials: PaymentMethodCredentials;
71
93
  paymentMethods: {
72
- [key: string]: {
73
- friendlyName?: string;
74
- logo?: string;
75
- credentials?: string;
76
- };
94
+ [key: string]: PaymentMethod;
77
95
  };
78
96
  };
79
97
  export declare type Session = {
@@ -88,10 +106,25 @@ export declare type FieldDetails = {
88
106
  example?: string;
89
107
  };
90
108
  export declare type SubmitData = {
91
- type: string;
92
- card: Card;
93
- billingAddress: Address;
94
- payer: Payer;
109
+ customerAccountId: string;
110
+ credentials: {
111
+ billingAddress: Address;
112
+ card: {
113
+ cvv: string;
114
+ };
115
+ payer: Payer;
116
+ };
117
+ paymentMethodType: string;
118
+ } | {
119
+ credentials: {
120
+ billingAddress: Address;
121
+ card: Card;
122
+ payer: Payer;
123
+ };
124
+ paymentMethodType: string;
125
+ } | {
126
+ credentials: Record<string, string>;
127
+ paymentMethodType: string;
95
128
  };
96
129
  export declare type ProcessOperationRedirectResponse = {
97
130
  type: "redirect";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finteqhub/sdk-js",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "description": "SDK for interacting with FinteqHub processing API",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",