@finteqhub/sdk-js 0.5.0 → 0.5.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.
@@ -24,6 +24,7 @@ export class FinteqHubProcessing {
24
24
  headers: {
25
25
  "Content-Type": "application/json;charset=UTF-8",
26
26
  "x-merchant-id": this.merchantId,
27
+ "x-request-id": uuid(),
27
28
  },
28
29
  });
29
30
  const result = yield response.json();
@@ -75,21 +75,23 @@ export declare type OperationSession = {
75
75
  transactionId: string;
76
76
  transactionType: string;
77
77
  };
78
- export declare type PaymentMethods = {
79
- credentials: {
80
- [key: string]: {
81
- fields?: {
82
- [key: string]: FieldDetails;
83
- };
84
- required?: Array<string>;
85
- };
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;
86
89
  };
90
+ };
91
+ export declare type PaymentMethods = {
92
+ credentials: PaymentMethodCredentials;
87
93
  paymentMethods: {
88
- [key: string]: {
89
- friendlyName?: string;
90
- logo?: string;
91
- credentials?: string;
92
- };
94
+ [key: string]: PaymentMethod;
93
95
  };
94
96
  };
95
97
  export declare type Session = {
@@ -106,18 +108,23 @@ export declare type FieldDetails = {
106
108
  export declare type SubmitData = {
107
109
  customerAccountId: string;
108
110
  credentials: {
111
+ billingAddress: Address;
109
112
  card: {
110
113
  cvv: string;
111
114
  };
112
- billingAddress: Address;
113
115
  payer: Payer;
114
116
  };
117
+ paymentMethodType: string;
115
118
  } | {
116
119
  credentials: {
117
- card: Card;
118
120
  billingAddress: Address;
121
+ card: Card;
119
122
  payer: Payer;
120
123
  };
124
+ paymentMethodType: string;
125
+ } | {
126
+ credentials: Record<string, string>;
127
+ paymentMethodType: string;
121
128
  };
122
129
  export declare type ProcessOperationRedirectResponse = {
123
130
  type: "redirect";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finteqhub/sdk-js",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "SDK for interacting with FinteqHub processing API",
5
5
  "main": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",