@soltech/fluid-common 1.9.2-sc23265.2 → 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 +14 -3
- package/package.json +1 -1
- package/src/index.ts +19 -5
package/lib/index.d.ts
CHANGED
|
@@ -162,10 +162,20 @@ export interface EncryptionSettings {
|
|
|
162
162
|
expiryDateEncryptionMode: ExpiryDateEncryptionMode;
|
|
163
163
|
encryptCardholderName: boolean;
|
|
164
164
|
}
|
|
165
|
-
export
|
|
165
|
+
export type HostedFieldsSettings = EncryptedFieldsSettings | CardTokenSettings;
|
|
166
|
+
interface HostedFieldsBase {
|
|
166
167
|
url: string;
|
|
167
|
-
|
|
168
|
-
|
|
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;
|
|
169
179
|
}
|
|
170
180
|
export declare enum HostedFieldsProtocol {
|
|
171
181
|
ENCRYPTED_FIELDS = "EncryptedFields",
|
|
@@ -395,3 +405,4 @@ export interface Campaign {
|
|
|
395
405
|
enableSuccessAnimation: boolean;
|
|
396
406
|
customChatIcons?: CampaignChatIcons;
|
|
397
407
|
}
|
|
408
|
+
export {};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -183,13 +183,27 @@ export interface EncryptionSettings {
|
|
|
183
183
|
encryptCardholderName: boolean;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
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.
|
|
187
190
|
url: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface EncryptedFieldsSettings extends HostedFieldsBase {
|
|
188
194
|
// Absent means EncryptedFields, so responses composed before this field existed keep working.
|
|
189
|
-
protocol?: HostedFieldsProtocol;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
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;
|
|
193
207
|
}
|
|
194
208
|
|
|
195
209
|
// Which message contract the client must speak to the hosted fields, not which gateway
|