@protobase/server 0.48.0 → 0.49.1

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.
Files changed (74) hide show
  1. package/dist/admin-options.d.ts +2 -2
  2. package/dist/app-identity.d.ts +2 -2
  3. package/dist/app-name.d.ts +2 -0
  4. package/dist/better-auth/auth-settings.d.ts +8773 -0
  5. package/dist/better-auth/auth-settings.js +43 -0
  6. package/dist/better-auth/authenticate-settings.d.ts +15 -0
  7. package/dist/better-auth/authenticate-settings.js +12 -0
  8. package/dist/better-auth/create-auth.d.ts +51 -11
  9. package/dist/better-auth/create-auth.js +33 -11
  10. package/dist/better-auth/mcp/mcp-auth-plugins.d.ts +2719 -0
  11. package/dist/better-auth/mcp/mcp-auth-plugins.js +68 -0
  12. package/dist/better-auth/mcp/mcp-plugins.d.ts +7 -2
  13. package/dist/better-auth/mcp/mcp-plugins.js +3 -68
  14. package/dist/better-auth/mcp/mcp-token-claims.js +1 -1
  15. package/dist/better-auth/organizations/store.d.ts +1 -0
  16. package/dist/better-auth/saml-plugin.d.ts +993 -0
  17. package/dist/better-auth/saml-plugin.js +36 -0
  18. package/dist/better-auth/saml-sign-in.d.ts +27 -1
  19. package/dist/better-auth/saml-sign-in.js +1 -33
  20. package/dist/better-auth/secret-versions.d.ts +7 -0
  21. package/dist/better-auth/secret-versions.js +21 -0
  22. package/dist/better-auth/signing-keys.js +86 -0
  23. package/dist/better-auth/tokens.js +1 -0
  24. package/dist/better-auth/user-table.js +1 -1
  25. package/dist/better-auth/users.d.ts +1 -1
  26. package/dist/create-admin.d.ts +5 -3
  27. package/dist/create-admin.js +3 -1
  28. package/dist/encryption/keyring.js +1 -1
  29. package/dist/files/options.d.ts +5 -8
  30. package/dist/files/provider-settings.d.ts +16 -0
  31. package/dist/files/provider-settings.js +17 -0
  32. package/dist/files/runtime.js +4 -4
  33. package/dist/forms/runtime.js +3 -3
  34. package/dist/gotrue/sessions-plugin.js +3 -9
  35. package/dist/index.d.ts +16 -15
  36. package/dist/index.js +8 -10
  37. package/dist/internal.d.ts +13 -0
  38. package/dist/internal.js +13 -0
  39. package/dist/jobs/declared-job.d.ts +24 -0
  40. package/dist/jobs/declared-job.js +26 -0
  41. package/dist/jobs/job-types.d.ts +1 -1
  42. package/dist/mcp/mcp-authenticator.js +3 -3
  43. package/dist/notifications/device-store-of.d.ts +1 -1
  44. package/dist/notifications/device-store-of.js +1 -1
  45. package/dist/notifications/device-store.d.ts +1 -1
  46. package/dist/notifications/device-store.js +1 -1
  47. package/dist/notifications/history-store-of.d.ts +1 -1
  48. package/dist/notifications/history-store-of.js +1 -1
  49. package/dist/notifications/history-store.d.ts +1 -1
  50. package/dist/notifications/history-store.js +1 -1
  51. package/dist/notifications/options.d.ts +3 -1
  52. package/dist/notifications/options.js +1 -1
  53. package/dist/notifications/schema.d.ts +2 -2
  54. package/dist/notifications/schema.js +7 -7
  55. package/dist/notifications/send-notification.js +1 -1
  56. package/dist/notifications/sender.d.ts +1 -1
  57. package/dist/notifications/sender.js +2 -2
  58. package/dist/notifications/senders-of.d.ts +1 -1
  59. package/dist/notifications/senders-of.js +1 -1
  60. package/dist/package.js +1 -1
  61. package/dist/webhooks/subscription.d.ts +1 -0
  62. package/dist/webhooks/table/options.d.ts +1 -1
  63. package/dist/webhooks/table/schema.d.ts +2 -2
  64. package/dist/webhooks/table/schema.js +2 -2
  65. package/dist/webhooks/table/webhook-table.js +2 -2
  66. package/dist/webhooks/table/webhooks-module.d.ts +108 -0
  67. package/dist/webhooks/table/webhooks-module.js +11 -0
  68. package/package.json +6 -5
  69. package/dist/notifications/plugin.d.ts +0 -13
  70. package/dist/notifications/plugin.js +0 -16
  71. package/dist/project-config.d.ts +0 -54
  72. package/dist/project-config.js +0 -182
  73. package/dist/webhooks/table/plugin.d.ts +0 -10
  74. package/dist/webhooks/table/plugin.js +0 -18
@@ -67,7 +67,7 @@ export type AdminOptions = {
67
67
  /** The assistant in the admin app's dock: a backend elsewhere or the built-in one (see `AssistantOptions`); `false` turns it off. */
68
68
  assistant?: AssistantOptions | false;
69
69
  /**
70
- * The MCP endpoint, on with `createAuth({ mcp })`. `sql: true` also offers admins and the `ai` role
70
+ * The MCP endpoint, on with `auth.mcp`. `sql: true` also offers admins and the `ai` role
71
71
  * `run_read_only_query`, which reads the whole database as the app's database role, outside the access rules.
72
72
  * `writes: true` offers `create_record` and `update_record`, through the REST API's access rules, `validate` and write
73
73
  * hooks; the person approves each write in their client, and a client that cannot ask is refused.
@@ -84,7 +84,7 @@ export type AdminOptions = {
84
84
  } | false;
85
85
  /**
86
86
  * The websites whose browser code may call the API (`/api/*` but `/api/auth/*`) besides the app's own origins (see
87
- * `createAuth`'s `origins`): a list of origins, or `*` for any. Defaults to the one the platform passes in
87
+ * `auth.origins`): a list of origins, or `*` for any. Defaults to the one the platform passes in
88
88
  * `PROTOBASE_CORS_ORIGINS` (`*` or comma separated), when set. A `mobile` section adds the app's Capacitor origins
89
89
  * (`capacitor://localhost`, `https://localhost`). With none of these nor other origins, the API sends no CORS headers.
90
90
  */
@@ -1,7 +1,7 @@
1
1
  //#region src/app-identity.d.ts
2
2
  /**
3
- * The `app` section of `protobase.config.ts`: the colours the installed app shows, beside its name (`createAuth`'s
4
- * `appName`) and its icons (`protobase.favicon.svg` and the PNGs beside it). Any CSS colour, such as `#0d9488`.
3
+ * The `app` section of `protobase.config.ts`: the colours the installed app shows, beside its name (`auth.appName`)
4
+ * and its icons (`protobase.favicon.svg` and the PNGs beside it). Any CSS colour, such as `#0d9488`.
5
5
  */
6
6
  export type AppIdentity = {
7
7
  /** The colour of the installed app's title bar and of the browser's toolbar around it. */
@@ -1,6 +1,8 @@
1
1
  //#region src/app-name.d.ts
2
2
  /** The app's name when neither the app nor the platform names it. */
3
3
  export declare const defaultAppName = "Protobase";
4
+ /** The name the app goes by: the platform's `PROTOBASE_APP_NAME`, which deployments rename it with, over its own `own`. */
5
+ export declare const appNameOver: (env: Record<string, string | undefined>, own: string | undefined) => string | undefined;
4
6
  /** The name the app shows, in its upper left and its tabs, and mails as: its auth's, else the platform's, else the default. */
5
7
  export declare const shownAppName: (auth: {
6
8
  appName?: string;