@flopay/shared 1.17.1 → 1.18.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.
- package/README.md +2 -1
- package/dist/constants.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types.d.ts +24 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1163,6 +1163,18 @@ export interface CardCaptureAdapter {
|
|
|
1163
1163
|
* unsupported.
|
|
1164
1164
|
*/
|
|
1165
1165
|
setSubmitLabel?(label: string | null): void;
|
|
1166
|
+
/**
|
|
1167
|
+
* Set the placeholder text of the hosted card number, expiry, CVV and name
|
|
1168
|
+
* fields (live, no remount); see {@link CardFieldPlaceholders}. Only the
|
|
1169
|
+
* fields given are sent and the rest keep the hosted form's wording; an empty
|
|
1170
|
+
* string shows no placeholder. A later call replaces the earlier one, and the
|
|
1171
|
+
* latest value is replayed every time the widget (re)becomes ready.
|
|
1172
|
+
* `undefined` sets nothing; after text was set it restores the hosted
|
|
1173
|
+
* wording. Like the submit label, the text is posted only to the vault
|
|
1174
|
+
* block's exact `expectedOrigin`, bound to the session and `messageToken`.
|
|
1175
|
+
* No-op if unsupported.
|
|
1176
|
+
*/
|
|
1177
|
+
setCardFieldPlaceholders?(placeholders: CardFieldPlaceholders | undefined): void;
|
|
1166
1178
|
/** Tear down the widget and release resources. */
|
|
1167
1179
|
unmount(): void;
|
|
1168
1180
|
}
|
|
@@ -1171,6 +1183,18 @@ export interface CardCaptureAdapter {
|
|
|
1171
1183
|
* expiry + CVV row. The submit button always stays last.
|
|
1172
1184
|
*/
|
|
1173
1185
|
export type VaultCardFieldKey = 'name' | 'number' | 'expiry';
|
|
1186
|
+
/**
|
|
1187
|
+
* Merchant placeholder text for the hosted card fields; every field is
|
|
1188
|
+
* optional. A field left out keeps the hosted form's own wording; `''` shows
|
|
1189
|
+
* no placeholder. The text is sent as given: the hosted form enforces its
|
|
1190
|
+
* limits and renders it literally.
|
|
1191
|
+
*/
|
|
1192
|
+
export interface CardFieldPlaceholders {
|
|
1193
|
+
number?: string;
|
|
1194
|
+
expiry?: string;
|
|
1195
|
+
cvv?: string;
|
|
1196
|
+
name?: string;
|
|
1197
|
+
}
|
|
1174
1198
|
/** Supported upstream gateway codes. */
|
|
1175
1199
|
export type BillingProvider = 'stripe' | 'paypal';
|
|
1176
1200
|
/** PayPal continuation object selected by the billing backend. */
|