@pngme/react-native-sms-pngme-android
Version:
Module for Pngme partners to build credit score from phone information
72 lines • 2.18 kB
TypeScript
export type GoParams = {
clientKey: string;
firstName?: string;
lastName?: string;
email?: string;
phoneNumber?: string;
externalId: string;
companyName: string;
};
export type PngmeDialogStyle = {
primaryColor?: string;
backgroundColor?: string;
textColor?: string;
buttonBackgroundColor?: string;
buttonTextColor?: string;
titleTextSize?: number;
bodyTextSize?: number;
buttonTextSize?: number;
customTitle?: string;
customSmsDescription?: string;
customPrivacyDescription?: string;
customButtonText?: string;
buttonCornerRadius?: number;
buttonElevation?: number;
privacyPolicyUrl?: string;
eulaUrl?: string;
};
export type PngmeError = {
code: string;
message: string;
};
/**
* Basic SDK integration - shows default Pngme dialog
*/
export declare function go(params: GoParams): Promise<string>;
/**
* Backward compatibility - maps to standard go() method
* @deprecated Use go() or goWithStyle() instead
*/
export declare function goWithCustomDialog(params: GoParams): Promise<string>;
/**
* SDK integration with custom dialog styling
*/
export declare function goWithStyle(params: GoParams, style: PngmeDialogStyle): Promise<string>;
/**
* Set a default style for all SDK dialogs
*/
export declare function setDefaultStyle(style: PngmeDialogStyle): void;
/**
* Clear the default style and revert to original Pngme styling
*/
export declare function clearDefaultStyle(): void;
/**
* Check if SMS permissions are granted
*/
export declare function isPermissionGranted(): Promise<boolean>;
/**
* Get the current user's UUID
*/
export declare function getUserUuid(): Promise<string | null>;
/**
* Enhanced SDK call with pre-flight checks
*/
export declare function goWithPreflightChecks(params: GoParams, style?: PngmeDialogStyle): Promise<string>;
export declare const PNGME_RESPONSES: {
readonly SUCCESS: "success";
readonly ERROR: "E_ON_SDK";
readonly IOS_INCOMPATIBLE: "E_IOS_IS_NOT_COMPATIBLE";
readonly INVALID_PARAMS: "E_INVALID_PARAMS";
readonly ACTIVITY_DOES_NOT_EXIST: "E_ACTIVITY_DOES_NOT_EXIST";
};
//# sourceMappingURL=index.d.ts.map