@soltech/fluid-common 1.9.2-sc23265.1 → 1.9.2-sc23265.3
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 +17 -3
- package/package.json +1 -1
- package/src/index.ts +23 -5
package/lib/index.d.ts
CHANGED
|
@@ -114,9 +114,12 @@ export interface DepositAmountsSettings {
|
|
|
114
114
|
defaultDepositAmount: number;
|
|
115
115
|
suggestedDepositAmounts: number[];
|
|
116
116
|
}
|
|
117
|
+
export type TransactionStatusSource = 'gateway' | 'fluid';
|
|
117
118
|
export interface TransactionStatusCheck {
|
|
118
119
|
url: string;
|
|
119
120
|
intervalSeconds: number;
|
|
121
|
+
/** Who answers the poll. Absent on wallets served by an API that predates this field. */
|
|
122
|
+
source?: TransactionStatusSource;
|
|
120
123
|
}
|
|
121
124
|
export interface AllPaymentMethods {
|
|
122
125
|
recentPaymentMethods: RecentMethod[];
|
|
@@ -159,10 +162,20 @@ export interface EncryptionSettings {
|
|
|
159
162
|
expiryDateEncryptionMode: ExpiryDateEncryptionMode;
|
|
160
163
|
encryptCardholderName: boolean;
|
|
161
164
|
}
|
|
162
|
-
export
|
|
165
|
+
export type HostedFieldsSettings = EncryptedFieldsSettings | CardTokenSettings;
|
|
166
|
+
interface HostedFieldsBase {
|
|
163
167
|
url: string;
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
}
|
|
169
|
+
export interface EncryptedFieldsSettings extends HostedFieldsBase {
|
|
170
|
+
protocol?: HostedFieldsProtocol.ENCRYPTED_FIELDS;
|
|
171
|
+
}
|
|
172
|
+
export interface CardTokenSettings extends HostedFieldsBase {
|
|
173
|
+
protocol: HostedFieldsProtocol.CARD_TOKEN;
|
|
174
|
+
params: CardTokenParams;
|
|
175
|
+
}
|
|
176
|
+
export interface CardTokenParams {
|
|
177
|
+
merchantId: string;
|
|
178
|
+
env: string;
|
|
166
179
|
}
|
|
167
180
|
export declare enum HostedFieldsProtocol {
|
|
168
181
|
ENCRYPTED_FIELDS = "EncryptedFields",
|
|
@@ -392,3 +405,4 @@ export interface Campaign {
|
|
|
392
405
|
enableSuccessAnimation: boolean;
|
|
393
406
|
customChatIcons?: CampaignChatIcons;
|
|
394
407
|
}
|
|
408
|
+
export {};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -129,9 +129,13 @@ export interface DepositAmountsSettings {
|
|
|
129
129
|
suggestedDepositAmounts: number[];
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
export type TransactionStatusSource = 'gateway' | 'fluid';
|
|
133
|
+
|
|
132
134
|
export interface TransactionStatusCheck {
|
|
133
135
|
url: string;
|
|
134
136
|
intervalSeconds: number;
|
|
137
|
+
/** Who answers the poll. Absent on wallets served by an API that predates this field. */
|
|
138
|
+
source?: TransactionStatusSource;
|
|
135
139
|
}
|
|
136
140
|
|
|
137
141
|
export interface AllPaymentMethods {
|
|
@@ -179,13 +183,27 @@ export interface EncryptionSettings {
|
|
|
179
183
|
encryptCardholderName: boolean;
|
|
180
184
|
}
|
|
181
185
|
|
|
182
|
-
export
|
|
186
|
+
export type HostedFieldsSettings = EncryptedFieldsSettings | CardTokenSettings;
|
|
187
|
+
|
|
188
|
+
interface HostedFieldsBase {
|
|
189
|
+
// Its presence is also how the client decides a method uses hosted fields at all.
|
|
183
190
|
url: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface EncryptedFieldsSettings extends HostedFieldsBase {
|
|
184
194
|
// Absent means EncryptedFields, so responses composed before this field existed keep working.
|
|
185
|
-
protocol?: HostedFieldsProtocol;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
195
|
+
protocol?: HostedFieldsProtocol.ENCRYPTED_FIELDS;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface CardTokenSettings extends HostedFieldsBase {
|
|
199
|
+
protocol: HostedFieldsProtocol.CARD_TOKEN;
|
|
200
|
+
// Handed straight to the gateway's own component, uninterpreted.
|
|
201
|
+
params: CardTokenParams;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface CardTokenParams {
|
|
205
|
+
merchantId: string;
|
|
206
|
+
env: string;
|
|
189
207
|
}
|
|
190
208
|
|
|
191
209
|
// Which message contract the client must speak to the hosted fields, not which gateway
|