0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-13 21:30:30 -05:00

refactor(connector): refactor passwordless connector

This commit is contained in:
Darcy Ye 2022-07-12 16:02:14 +08:00
parent 0439ce9dc8
commit 16fde21778
No known key found for this signature in database
GPG key ID: B46F4C07EDEFC610

View file

@ -66,19 +66,19 @@ export type EmailMessageTypes = {
export type SmsMessageTypes = EmailMessageTypes;
export type EmailSendMessageFunction<T = Record<string, unknown>, U = unknown> = (
export type EmailSendMessageFunction<T = unknown> = (
address: string,
type: keyof EmailMessageTypes,
payload: EmailMessageTypes[typeof type],
config?: T
) => Promise<U>;
config?: Record<string, unknown>
) => Promise<T>;
export type SmsSendMessageFunction<T = Record<string, unknown>, U = unknown> = (
export type SmsSendMessageFunction<T = unknown> = (
phone: string,
type: keyof SmsMessageTypes,
payload: SmsMessageTypes[typeof type],
config?: T
) => Promise<U>;
config?: Record<string, unknown>
) => Promise<T>;
export interface BaseConnector {
metadata: ConnectorMetadata;