authhero 4.74.0 → 4.75.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/authhero.cjs +80 -70
- package/dist/authhero.d.ts +36 -0
- package/dist/authhero.mjs +9610 -9720
- package/dist/stats.html +1 -1
- package/package.json +2 -2
package/dist/authhero.d.ts
CHANGED
|
@@ -50719,6 +50719,38 @@ export interface AuthHeroConfig {
|
|
|
50719
50719
|
* a JSON body and a Bearer token generated by the built-in service token creator.
|
|
50720
50720
|
*/
|
|
50721
50721
|
webhookInvoker?: WebhookInvoker;
|
|
50722
|
+
/**
|
|
50723
|
+
* Handler for serving admin UI static files (JS, CSS, images) at /admin/*.
|
|
50724
|
+
*
|
|
50725
|
+
* This must be a platform-specific static file handler, similar to widgetHandler.
|
|
50726
|
+
* The handler serves the built assets from @authhero/react-admin/dist.
|
|
50727
|
+
*
|
|
50728
|
+
* @example Node.js with @hono/node-server:
|
|
50729
|
+
* ```typescript
|
|
50730
|
+
* import { serveStatic } from "@hono/node-server/serve-static";
|
|
50731
|
+
*
|
|
50732
|
+
* const adminDistPath = path.resolve(__dirname, "../node_modules/@authhero/react-admin/dist");
|
|
50733
|
+
*
|
|
50734
|
+
* const { app } = init({
|
|
50735
|
+
* dataAdapter,
|
|
50736
|
+
* adminHandler: serveStatic({
|
|
50737
|
+
* root: adminDistPath,
|
|
50738
|
+
* rewriteRequestPath: (p) => p.replace("/admin", ""),
|
|
50739
|
+
* }),
|
|
50740
|
+
* });
|
|
50741
|
+
* ```
|
|
50742
|
+
*/
|
|
50743
|
+
adminHandler?: Handler<any>;
|
|
50744
|
+
/**
|
|
50745
|
+
* Pre-configured index.html string for the admin UI SPA fallback.
|
|
50746
|
+
*
|
|
50747
|
+
* Read from @authhero/react-admin/dist/index.html with runtime config
|
|
50748
|
+
* injected via a `<script>window.__AUTHHERO_ADMIN_CONFIG__=...</script>` tag.
|
|
50749
|
+
*
|
|
50750
|
+
* When provided, all non-asset requests to /admin/* will return this HTML,
|
|
50751
|
+
* enabling client-side routing in the admin SPA.
|
|
50752
|
+
*/
|
|
50753
|
+
adminIndexHtml?: string;
|
|
50722
50754
|
}
|
|
50723
50755
|
export type SendEmailParams = {
|
|
50724
50756
|
emailProvider: EmailProvider;
|
|
@@ -51188,6 +51220,10 @@ export interface SeedOptions {
|
|
|
51188
51220
|
* The admin user's username
|
|
51189
51221
|
*/
|
|
51190
51222
|
adminUsername: string;
|
|
51223
|
+
/**
|
|
51224
|
+
* The admin user's email address (optional)
|
|
51225
|
+
*/
|
|
51226
|
+
adminEmail?: string;
|
|
51191
51227
|
/**
|
|
51192
51228
|
* The admin user's password (will be hashed with bcrypt)
|
|
51193
51229
|
*/
|