@protobase/server 0.45.13 → 0.45.15
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/better-auth/auth-mail/auth-emails.d.ts +1 -0
- package/dist/better-auth/auth-mail/auth-emails.js +2 -1
- package/dist/better-auth/auth-mail/no-account-email.d.ts +1 -0
- package/dist/better-auth/auth-mail/no-account-email.js +32 -0
- package/dist/better-auth/authenticator.js +13 -7
- package/dist/better-auth/create-auth.d.ts +30 -1
- package/dist/better-auth/create-auth.js +15 -2
- package/dist/better-auth/no-account-mail.js +24 -0
- package/dist/better-auth/token-standing.js +21 -12
- package/dist/better-auth/user-deletion.d.ts +4 -0
- package/dist/better-auth/user-deletion.js +50 -0
- package/dist/better-auth/users.d.ts +1 -1
- package/dist/better-auth/users.js +3 -1
- package/dist/create-admin.d.ts +4 -1
- package/dist/create-admin.js +9 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +7 -1
- package/dist/notifications/caller.js +16 -0
- package/dist/notifications/device-input.js +80 -0
- package/dist/notifications/device-store-of.d.ts +13 -0
- package/dist/notifications/device-store-of.js +13 -0
- package/dist/notifications/device-store.d.ts +25 -0
- package/dist/notifications/device-store.js +22 -0
- package/dist/notifications/device.d.ts +30 -0
- package/dist/notifications/device.js +5 -0
- package/dist/notifications/options.d.ts +20 -0
- package/dist/notifications/options.js +43 -0
- package/dist/notifications/paths.d.ts +6 -0
- package/dist/notifications/paths.js +7 -0
- package/dist/notifications/plugin.d.ts +10 -0
- package/dist/notifications/plugin.js +13 -0
- package/dist/notifications/postgres-store.d.ts +15 -0
- package/dist/notifications/postgres-store.js +110 -0
- package/dist/notifications/push-hosts.js +18 -0
- package/dist/notifications/routes.d.ts +6 -0
- package/dist/notifications/routes.js +57 -0
- package/dist/notifications/schema-sql.js +40 -0
- package/dist/notifications/schema.d.ts +17 -0
- package/dist/notifications/schema.js +59 -0
- package/dist/package.js +1 -1
- package/dist/project-config.d.ts +3 -0
- package/dist/project-config.js +3 -1
- package/dist/types.d.ts +9 -0
- package/package.json +4 -4
package/dist/project-config.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { EventsOptions } from "./changes/events-options.js";
|
|
|
5
5
|
import { Authenticator } from "./types.js";
|
|
6
6
|
import { HistoryOptions } from "./history/options.js";
|
|
7
7
|
import { WebhooksOptions } from "./webhooks/table/options.js";
|
|
8
|
+
import { NotificationsOptions } from "./notifications/options.js";
|
|
8
9
|
import { FilesOptions } from "./files/options.js";
|
|
9
10
|
import { FunctionSource } from "./functions/define-function.js";
|
|
10
11
|
import { AdminOptions } from "./admin-options.js";
|
|
@@ -32,6 +33,8 @@ export type ProjectConfig = {
|
|
|
32
33
|
history?: HistoryOptions;
|
|
33
34
|
/** Webhook subscriptions made in the admin app; set by `extends: [webhooks()]` (see `WebhooksOptions`). */
|
|
34
35
|
webhooks?: WebhooksOptions;
|
|
36
|
+
/** Notifications and each user's devices; set by `extends: [notifications()]` (see `NotificationsOptions`). */
|
|
37
|
+
notifications?: NotificationsOptions;
|
|
35
38
|
/** The module of the app's jobs, e.g. `import * as jobs from './config/jobs'`: every `defineJob` it exports. */
|
|
36
39
|
jobs?: Record<string, unknown>;
|
|
37
40
|
/** The app's iOS and Android build (see `MobileConfig`): `protobase mobile` needs it, and the API answers the app's origins. */
|
package/dist/project-config.js
CHANGED
|
@@ -143,13 +143,14 @@ const mergedOptions = (named) => {
|
|
|
143
143
|
*/
|
|
144
144
|
const mergeConfig = (...configs) => {
|
|
145
145
|
const named = configs.flatMap((config, index) => flatten(config, config.name ?? `config ${index + 1}`));
|
|
146
|
-
const { db, authenticate, auth, events, history, webhooks, mobile, app } = lastSet(named.map(({ config }) => ({
|
|
146
|
+
const { db, authenticate, auth, events, history, webhooks, notifications, mobile, app } = lastSet(named.map(({ config }) => ({
|
|
147
147
|
db: config.db,
|
|
148
148
|
authenticate: config.authenticate,
|
|
149
149
|
auth: config.auth,
|
|
150
150
|
events: config.events,
|
|
151
151
|
history: config.history,
|
|
152
152
|
webhooks: config.webhooks,
|
|
153
|
+
notifications: config.notifications,
|
|
153
154
|
mobile: config.mobile,
|
|
154
155
|
app: config.app
|
|
155
156
|
})));
|
|
@@ -170,6 +171,7 @@ const mergeConfig = (...configs) => {
|
|
|
170
171
|
...events && { events },
|
|
171
172
|
...history && { history },
|
|
172
173
|
...webhooks && { webhooks },
|
|
174
|
+
...notifications && { notifications },
|
|
173
175
|
...jobs && { jobs },
|
|
174
176
|
...mobile && { mobile },
|
|
175
177
|
...app && { app },
|
package/dist/types.d.ts
CHANGED
|
@@ -24,6 +24,15 @@ export type Session = {
|
|
|
24
24
|
id: string;
|
|
25
25
|
scopes: string[];
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* The user's own sign-in this request comes with: its session id, when it has one, and whether staff started it as
|
|
29
|
+
* the user. An authenticator sets it only when it knows; without it, what only the user may do, such as registering
|
|
30
|
+
* their devices for notifications, is refused.
|
|
31
|
+
*/
|
|
32
|
+
signIn?: {
|
|
33
|
+
session?: string;
|
|
34
|
+
staff: boolean;
|
|
35
|
+
};
|
|
27
36
|
};
|
|
28
37
|
/**
|
|
29
38
|
* Resolves the caller of a request, or throws a 401 problem (see `unauthorized`). `userIdType` declares the type of
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/server",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.15",
|
|
4
4
|
"description": "The Protobase REST API as a Hono app, with Better Auth sign-in.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"@better-auth/passkey": "^1.7.12",
|
|
37
37
|
"@better-auth/sso": "^1.7.12",
|
|
38
38
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
39
|
-
"@protobase/layout": "0.45.
|
|
40
|
-
"@protobase/query": "0.45.
|
|
41
|
-
"@protobase/schema": "0.45.
|
|
39
|
+
"@protobase/layout": "0.45.15",
|
|
40
|
+
"@protobase/query": "0.45.15",
|
|
41
|
+
"@protobase/schema": "0.45.15",
|
|
42
42
|
"@react-email/render": "^2.1.0",
|
|
43
43
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
44
44
|
"@sentry/core": "^11.7.0",
|