Skip to content

Commit

Permalink
Fully export SecuredField callback data types
Browse files Browse the repository at this point in the history
  • Loading branch information
sponglord committed Jan 9, 2025
1 parent 0e14409 commit 377dac6
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 42 deletions.
84 changes: 42 additions & 42 deletions packages/lib/src/components/internal/SecuredFields/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,11 @@ export interface CardObject {
expiryDatePolicy?: DatePolicyType;
}

export interface CardBrandData {
export interface CardAdditionalSFData {
additionalIframeConfigured?: boolean;
additionalIframeRemoved?: boolean;
fieldType: string;
type: string;
rootNode: HTMLElement;
brand: string;
cvcPolicy: CVCPolicyType;
expiryDatePolicy?: DatePolicyType;
cvcText: string;
showSocialSecurityNumber?: boolean;
brandImageUrl?: string; // Added by SFP
// maxLength: number;
}

export interface CardAllValidData {
Expand All @@ -123,33 +118,13 @@ export interface CardAllValidData {
rootNode: HTMLElement;
}

export interface CardFieldValidData {
fieldType: string;
encryptedFieldName: string;
uid: string;
valid: boolean;
type: string;
rootNode: HTMLElement;
blob?: string;
endDigits?: string;
expiryDate?: string;
issuerBin?: number;
}

export interface CardAutoCompleteData {
fieldType: string;
name: string;
value: string;
action: string;
}

export interface CardBinValueData {
type: string;
binValue: string;
uuid?: string;
encryptedBin?: string;
}

export interface CardBinLookupData {
type?: string;
detectedBrands?: string[];
Expand All @@ -162,6 +137,31 @@ export interface CardBinLookupData {
isReset?: boolean; // Used internally - not propagated to merchant callback
}

export interface CardBinValueData {
type: string;
binValue: string;
uuid?: string;
encryptedBin?: string;
}

export interface CardBrandData {
type: string;
rootNode: HTMLElement;
brand: string;
cvcPolicy: CVCPolicyType;
expiryDatePolicy?: DatePolicyType;
cvcText: string;
showSocialSecurityNumber?: boolean;
brandImageUrl?: string; // Added by SFP
// maxLength: number;
}

export interface CardConfigSuccessData {
iframesConfigured: boolean;
type: string;
rootNode: HTMLElement;
}

export interface CardErrorData {
fieldType: string;
error: string;
Expand All @@ -172,6 +172,19 @@ export interface CardErrorData {
errorText?: string;
}

export interface CardFieldValidData {
fieldType: string;
encryptedFieldName: string;
uid: string;
valid: boolean;
type: string;
rootNode: HTMLElement;
blob?: string;
endDigits?: string;
expiryDate?: string;
issuerBin?: number;
}

export interface CardFocusData {
action: string;
focus: boolean;
Expand All @@ -186,19 +199,6 @@ export interface CardLoadData {
iframesLoaded: boolean;
}

export interface CardConfigSuccessData {
iframesConfigured: boolean;
type: string;
rootNode: HTMLElement;
}

export interface CardAdditionalSFData {
additionalIframeConfigured?: boolean;
additionalIframeRemoved?: boolean;
fieldType: string;
type: string;
}

export interface SFFeedbackObj {
action: string;
fieldType: SFFieldType;
Expand Down
12 changes: 12 additions & 0 deletions packages/lib/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ export { CustomTranslations } from './language/types';

export { default as AdyenCheckoutError } from './core/Errors/AdyenCheckoutError';
export { default as UIElement } from './components/internal/UIElement';
export {
CardAllValidData,
CardAutoCompleteData,
CardBinLookupData,
CardBinValueData,
CardBrandData,
CardConfigSuccessData,
CardErrorData,
CardFieldValidData,
CardFocusData,
CardLoadData
} from './components/internal/SecuredFields/lib/types';

0 comments on commit 377dac6

Please sign in to comment.