@authhero/adapter-interfaces 0.123.0 → 0.125.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/dist/adapter-interfaces.d.ts +21 -0
- package/package.json +1 -1
|
@@ -37758,9 +37758,15 @@ export interface KeysAdapter {
|
|
|
37758
37758
|
list: (params?: ListParams) => Promise<ListKeysResponse>;
|
|
37759
37759
|
update: (kid: string, key: Partial<Omit<SigningKey, "kid">>) => Promise<boolean>;
|
|
37760
37760
|
}
|
|
37761
|
+
export interface UniversalLoginTemplate {
|
|
37762
|
+
body: string;
|
|
37763
|
+
}
|
|
37761
37764
|
export interface BrandingAdapter {
|
|
37762
37765
|
set: (tenant_id: string, authCode: Branding) => Promise<void>;
|
|
37763
37766
|
get: (tenant_id: string) => Promise<Branding | null>;
|
|
37767
|
+
setUniversalLoginTemplate: (tenant_id: string, template: UniversalLoginTemplate) => Promise<void>;
|
|
37768
|
+
getUniversalLoginTemplate: (tenant_id: string) => Promise<UniversalLoginTemplate | null>;
|
|
37769
|
+
deleteUniversalLoginTemplate: (tenant_id: string) => Promise<void>;
|
|
37764
37770
|
}
|
|
37765
37771
|
export interface ListHooksResponse extends Totals {
|
|
37766
37772
|
hooks: Hook[];
|
|
@@ -37930,6 +37936,15 @@ export interface StatsAdapter {
|
|
|
37930
37936
|
*/
|
|
37931
37937
|
getActiveUsers(tenantId: string): Promise<number>;
|
|
37932
37938
|
}
|
|
37939
|
+
/**
|
|
37940
|
+
* Parameters for cleaning up expired sessions
|
|
37941
|
+
*/
|
|
37942
|
+
export interface SessionCleanupParams {
|
|
37943
|
+
/** Optional tenant ID to scope cleanup to a specific tenant */
|
|
37944
|
+
tenant_id?: string;
|
|
37945
|
+
/** Optional user ID to scope cleanup to a specific user */
|
|
37946
|
+
user_id?: string;
|
|
37947
|
+
}
|
|
37933
37948
|
export interface DataAdapters {
|
|
37934
37949
|
branding: BrandingAdapter;
|
|
37935
37950
|
cache?: CacheAdapter;
|
|
@@ -37964,6 +37979,12 @@ export interface DataAdapters {
|
|
|
37964
37979
|
userRoles: UserRolesAdapter;
|
|
37965
37980
|
organizations: OrganizationsAdapter;
|
|
37966
37981
|
userOrganizations: UserOrganizationsAdapter;
|
|
37982
|
+
/**
|
|
37983
|
+
* Optional session cleanup function.
|
|
37984
|
+
* Cleans up expired login_sessions, sessions, and refresh_tokens.
|
|
37985
|
+
* Can be scoped to a specific tenant and/or user.
|
|
37986
|
+
*/
|
|
37987
|
+
sessionCleanup?: (params?: SessionCleanupParams) => Promise<void>;
|
|
37967
37988
|
/**
|
|
37968
37989
|
* Multi-tenancy configuration set by withRuntimeFallback.
|
|
37969
37990
|
* Used by the tenants route for access control.
|