fayda-auth
Version:
A library for interacting with the Fayda authentication service.
52 lines (46 loc) • 1.08 kB
text/typescript
export interface FaydaAuthOptions {
apiKey: string;
baseUrl?: string;
}
export interface InitiateOTPResponse {
success: boolean;
transactionId: string;
maskedMobile: string;
status: string;
message: string;
statusCode: number;
}
export interface FaydaUser {
uin: string;
fullName: { language: string; value: string }[];
dateOfBirth: string;
gender: { language: string; value: string }[];
phone: string;
region: { language: string; value: string }[];
zone: { language: string; value: string }[];
woreda: { language: string; value: string }[];
}
export interface VerifyOTPResponse {
success: boolean;
transactionId: string;
user: FaydaUser;
photo: {
format: string;
data: string;
};
qrCode: {
format: string;
data: string;
};
}
export interface ErrorDetails {
[key: string]: any;
}
export interface ApiError {
success: false;
error: string;
message: string;
statusCode: number;
details?: ErrorDetails;
timestamp: string;
}