authhero 4.78.0 → 4.80.0
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/README.md +12 -6
- package/dist/authhero.cjs +87 -79
- package/dist/authhero.d.ts +26 -28
- package/dist/authhero.mjs +3722 -3631
- package/dist/stats.html +1 -1
- package/package.json +5 -5
package/dist/authhero.d.ts
CHANGED
|
@@ -48027,6 +48027,30 @@ export interface CustomTextAdapter {
|
|
|
48027
48027
|
language: string;
|
|
48028
48028
|
}>>;
|
|
48029
48029
|
}
|
|
48030
|
+
export interface EmailServiceSendParams {
|
|
48031
|
+
emailProvider: EmailProvider;
|
|
48032
|
+
to: string;
|
|
48033
|
+
from: string;
|
|
48034
|
+
subject: string;
|
|
48035
|
+
html?: string;
|
|
48036
|
+
text?: string;
|
|
48037
|
+
template: string;
|
|
48038
|
+
data: Record<string, string>;
|
|
48039
|
+
}
|
|
48040
|
+
export interface EmailServiceAdapter {
|
|
48041
|
+
send(params: EmailServiceSendParams): Promise<void>;
|
|
48042
|
+
}
|
|
48043
|
+
export interface SmsServiceSendParams {
|
|
48044
|
+
to: string;
|
|
48045
|
+
from?: string;
|
|
48046
|
+
text: string;
|
|
48047
|
+
template: string;
|
|
48048
|
+
options: Record<string, unknown>;
|
|
48049
|
+
data: Record<string, string>;
|
|
48050
|
+
}
|
|
48051
|
+
export interface SmsServiceAdapter {
|
|
48052
|
+
send(params: SmsServiceSendParams): Promise<void>;
|
|
48053
|
+
}
|
|
48030
48054
|
/**
|
|
48031
48055
|
* Parameters for cleaning up expired sessions
|
|
48032
48056
|
*/
|
|
@@ -48072,6 +48096,8 @@ export interface DataAdapters {
|
|
|
48072
48096
|
organizations: OrganizationsAdapter;
|
|
48073
48097
|
authenticationMethods: AuthenticationMethodsAdapter;
|
|
48074
48098
|
userOrganizations: UserOrganizationsAdapter;
|
|
48099
|
+
emailService?: EmailServiceAdapter;
|
|
48100
|
+
smsService?: SmsServiceAdapter;
|
|
48075
48101
|
/**
|
|
48076
48102
|
* Optional session cleanup function.
|
|
48077
48103
|
* Cleans up expired login_sessions, sessions, and refresh_tokens.
|
|
@@ -50819,18 +50845,6 @@ export interface AuthHeroConfig {
|
|
|
50819
50845
|
*/
|
|
50820
50846
|
adminIndexHtml?: string;
|
|
50821
50847
|
}
|
|
50822
|
-
export type SendEmailParams = {
|
|
50823
|
-
emailProvider: EmailProvider;
|
|
50824
|
-
to: string;
|
|
50825
|
-
from: string;
|
|
50826
|
-
subject: string;
|
|
50827
|
-
html?: string;
|
|
50828
|
-
text?: string;
|
|
50829
|
-
template: string;
|
|
50830
|
-
data: Record<string, string>;
|
|
50831
|
-
};
|
|
50832
|
-
export type SendEmailResponse = {};
|
|
50833
|
-
export type EmailService = (param: SendEmailParams) => Promise<SendEmailResponse>;
|
|
50834
50848
|
export type UserInfo = {
|
|
50835
50849
|
sub: string;
|
|
50836
50850
|
email?: string;
|
|
@@ -50855,16 +50869,6 @@ export type StrategyHandler = {
|
|
|
50855
50869
|
}>, connection: Connection, code: string, codeVerifier?: string) => Promise<UserInfo>;
|
|
50856
50870
|
disableEmbeddedBrowsers?: boolean;
|
|
50857
50871
|
};
|
|
50858
|
-
export type SendSMSParams = {
|
|
50859
|
-
to: string;
|
|
50860
|
-
from?: string;
|
|
50861
|
-
text: string;
|
|
50862
|
-
template: string;
|
|
50863
|
-
options: any;
|
|
50864
|
-
data: Record<string, string>;
|
|
50865
|
-
};
|
|
50866
|
-
export type SendSMSResponse = {};
|
|
50867
|
-
export type smsService = (param: SendSMSParams) => Promise<SendSMSResponse>;
|
|
50868
50872
|
export declare type Fetcher = {
|
|
50869
50873
|
fetch: typeof fetch;
|
|
50870
50874
|
};
|
|
@@ -50883,12 +50887,6 @@ export type Bindings = {
|
|
|
50883
50887
|
* Use these to implement cross-tenant sync, audit logging, webhooks, etc.
|
|
50884
50888
|
*/
|
|
50885
50889
|
entityHooks?: EntityHooksConfig;
|
|
50886
|
-
emailProviders?: {
|
|
50887
|
-
[key: string]: EmailService;
|
|
50888
|
-
};
|
|
50889
|
-
smsProviders?: {
|
|
50890
|
-
[key: string]: smsService;
|
|
50891
|
-
};
|
|
50892
50890
|
STRATEGIES?: {
|
|
50893
50891
|
[strategy: string]: StrategyHandler;
|
|
50894
50892
|
};
|