@flopay/shared 1.20.11 → 1.20.13
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/dist/constants.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/telemetry.d.ts +7 -1
- package/dist/types.d.ts +9 -0
- package/package.json +1 -1
package/dist/telemetry.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export type TelemetryErrorReason = (typeof TELEMETRY_ERROR_REASONS)[number];
|
|
|
40
40
|
/** Closed catalog of SDK-authored lifecycle and operational log names. */
|
|
41
41
|
export declare const TELEMETRY_LOG_NAMES: readonly ['sdk.initialize.started', 'sdk.initialize.ready', 'sdk.cache.hit', 'sdk.cache.miss', 'checkout.mount', 'session.create.started', 'session.shell.ready', 'session.claim.started', 'session.claim.completed', 'session.read.started', 'session.request.first_byte', 'session.request.completed', 'checkout.data.ready', 'checkout.rendered', 'checkout.recovery.started', 'checkout.recovery.completed', 'checkout.unmount', 'provider.load.started', 'provider.eligibility.checked', 'provider.availability.checked', 'provider.ready', 'provider.handoff.requested', 'provider.popup.opened', 'provider.overlay.opened', 'provider.overlay.returned', 'provider.callback.ignored', 'provider.redirect.started', 'provider.redirect.resumed', 'vault.capture.requested', 'vault.widget.mounted', 'vault.widget.ready', 'vault.submission.started', 'vault.action.required', 'vault.three_ds.handoff', 'vault.three_ds.returned', 'vault.terminal', 'payment.method.selected', 'payment.intent.started', 'payment.intent.completed', 'payment.provider_confirmation.started', 'payment.provider_confirmation.returned', 'payment.tokenization.started', 'payment.tokenization.completed', 'payment.processing.started', 'payment.processing.completed', 'payment.three_ds.handoff', 'payment.three_ds.returned', 'operation.retry', 'operation.deduplicated', 'operation.fallback', 'operation.cache.hit', 'operation.cache.miss', 'operation.recovery.started', 'operation.recovery.completed', 'operation.state_transition',
|
|
42
42
|
/** One closed 3DS challenge lifecycle record (`ThreeDsChallengeRecord` fields). */
|
|
43
|
-
'three_ds.challenge', 'vault.fields.ready', 'vault.fields.failed'];
|
|
43
|
+
'three_ds.challenge', 'vault.fields.ready', 'vault.fields.failed', 'card_form.remint'];
|
|
44
44
|
export type TelemetryLogName = (typeof TELEMETRY_LOG_NAMES)[number];
|
|
45
45
|
/**
|
|
46
46
|
* Closed reasons a provider callback was ignored instead of reaching checkout
|
|
@@ -128,6 +128,10 @@ export interface BuildTelemetryErrorEventInput extends BuildTelemetryCommonInput
|
|
|
128
128
|
}
|
|
129
129
|
export interface TelemetryLogEvent extends TelemetryCommonFields {
|
|
130
130
|
class: 'lifecycle';
|
|
131
|
+
/** Only on `card_form.remint`: what triggered the re-mint. */
|
|
132
|
+
trigger?: 'form_unavailable' | 'expiring' | 'page_restore';
|
|
133
|
+
/** Only on `card_form.remint`: how the attempt settled. */
|
|
134
|
+
outcome?: 'succeeded' | 'failed' | 'capped';
|
|
131
135
|
name: TelemetryLogName;
|
|
132
136
|
/**
|
|
133
137
|
* Only on `provider.callback.ignored`, from the closed ignored-callback set, or on
|
|
@@ -149,6 +153,8 @@ export interface TelemetryLogEvent extends TelemetryCommonFields {
|
|
|
149
153
|
}
|
|
150
154
|
export interface BuildTelemetryLogEventInput extends BuildTelemetryCommonInput {
|
|
151
155
|
name: TelemetryLogName;
|
|
156
|
+
trigger?: string;
|
|
157
|
+
outcome?: string;
|
|
152
158
|
reason?: TelemetryCallbackIgnoredReason | ThreeDsChallengeReason;
|
|
153
159
|
attemptId?: string;
|
|
154
160
|
phase?: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -727,6 +727,11 @@ export type CardCaptureProviderId = 'pcivault';
|
|
|
727
727
|
* surface (logs / telemetry / client inspection).
|
|
728
728
|
*/
|
|
729
729
|
export interface VaultCaptureBlock {
|
|
730
|
+
/**
|
|
731
|
+
* When the capture generation behind this block stops being usable (ISO time), already
|
|
732
|
+
* reduced by the backend reuse margin. Absent or null on an older backend.
|
|
733
|
+
*/
|
|
734
|
+
expiresAt?: string | null;
|
|
730
735
|
/** Self-contained hosted-form widget HTML the SDK injects into the card slot. */
|
|
731
736
|
html?: string;
|
|
732
737
|
/** PCIVault submit URL the hosted form POSTs the captured card to. */
|
|
@@ -865,6 +870,8 @@ export interface CardCaptureOutcomeEvent {
|
|
|
865
870
|
*/
|
|
866
871
|
export interface VaultCaptureResultMessage {
|
|
867
872
|
source: 'flopay-vault';
|
|
873
|
+
/** Machine-readable reason on an `error`; `form_unavailable` means the form was refused or expired. */
|
|
874
|
+
code?: string;
|
|
868
875
|
type: 'ready' | 'submitting' | 'complete' | 'decline' | 'error' | 'action_required';
|
|
869
876
|
/**
|
|
870
877
|
* Owning checkout session id. Always present for terminal outcomes
|
|
@@ -916,6 +923,8 @@ export interface VaultCaptureResultMessage {
|
|
|
916
923
|
}
|
|
917
924
|
/** Options for mounting the hosted vault widget into a container element. */
|
|
918
925
|
export interface CardCaptureMountOptions {
|
|
926
|
+
/** The vault block expiry, so the adapter can refresh a stale form ahead of time. */
|
|
927
|
+
expiresAt?: string | null;
|
|
919
928
|
/**
|
|
920
929
|
* Server-rendered hosted-form widget HTML (the vault capture block's `html`).
|
|
921
930
|
* The adapter injects this and lets the bundled `<script>` bootstrap the
|