usebecky 0.0.0-stage → 0.2.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 +701 -2
- package/dist/analytics/client.d.ts +219 -0
- package/dist/analytics/client.js +923 -0
- package/dist/analytics/cmp.d.ts +20 -0
- package/dist/analytics/cmp.js +166 -0
- package/dist/analytics/context.d.ts +29 -0
- package/dist/analytics/context.js +97 -0
- package/dist/auth/client.d.ts +401 -0
- package/dist/auth/client.js +1081 -0
- package/dist/auth/webauthn.d.ts +18 -0
- package/dist/auth/webauthn.js +138 -0
- package/dist/cli/ai.d.ts +54 -0
- package/dist/cli/ai.js +202 -0
- package/dist/cli/analytics.d.ts +53 -0
- package/dist/cli/analytics.js +357 -0
- package/dist/cli/config.d.ts +75 -0
- package/dist/cli/config.js +718 -0
- package/dist/cli/db.d.ts +48 -0
- package/dist/cli/db.js +215 -0
- package/dist/cli/deploy-api.d.ts +168 -0
- package/dist/cli/deploy-api.js +177 -0
- package/dist/cli/deploy-ci.d.ts +15 -0
- package/dist/cli/deploy-ci.js +54 -0
- package/dist/cli/deploy-detect.d.ts +64 -0
- package/dist/cli/deploy-detect.js +249 -0
- package/dist/cli/deploy-files.d.ts +112 -0
- package/dist/cli/deploy-files.js +778 -0
- package/dist/cli/deploy.d.ts +10 -0
- package/dist/cli/deploy.js +430 -0
- package/dist/cli/emails.d.ts +29 -0
- package/dist/cli/emails.js +122 -0
- package/dist/cli/framework.d.ts +135 -0
- package/dist/cli/framework.js +459 -0
- package/dist/cli/functions.d.ts +59 -0
- package/dist/cli/functions.js +426 -0
- package/dist/cli/hosting.d.ts +4 -0
- package/dist/cli/hosting.js +532 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +9 -0
- package/dist/cli/payments.d.ts +35 -0
- package/dist/cli/payments.js +176 -0
- package/dist/cli/push.d.ts +36 -0
- package/dist/cli/push.js +172 -0
- package/dist/cli/run.d.ts +65 -0
- package/dist/cli/run.js +850 -0
- package/dist/cli/social.d.ts +52 -0
- package/dist/cli/social.js +532 -0
- package/dist/cli/tokens.d.ts +28 -0
- package/dist/cli/tokens.js +114 -0
- package/dist/cli/ui.d.ts +38 -0
- package/dist/cli/ui.js +140 -0
- package/dist/client.d.ts +94 -0
- package/dist/client.js +156 -0
- package/dist/db/query.d.ts +162 -0
- package/dist/db/query.js +336 -0
- package/dist/db/types.d.ts +93 -0
- package/dist/db/types.js +4 -0
- package/dist/forms/client.d.ts +65 -0
- package/dist/forms/client.js +106 -0
- package/dist/functions/client.d.ts +37 -0
- package/dist/functions/client.js +76 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +16 -0
- package/dist/lib/dashboard-paths.d.ts +4 -0
- package/dist/lib/dashboard-paths.js +8 -0
- package/dist/lib/env.d.ts +9 -0
- package/dist/lib/env.js +55 -0
- package/dist/lib/errors.d.ts +22 -0
- package/dist/lib/errors.js +90 -0
- package/dist/lib/hosted.d.ts +2 -0
- package/dist/lib/hosted.js +7 -0
- package/dist/lib/http.d.ts +59 -0
- package/dist/lib/http.js +172 -0
- package/dist/lib/jwt.d.ts +1 -0
- package/dist/lib/jwt.js +31 -0
- package/dist/lib/locale.d.ts +12 -0
- package/dist/lib/locale.js +51 -0
- package/dist/lib/pkce.d.ts +20 -0
- package/dist/lib/pkce.js +124 -0
- package/dist/lib/storage-adapter.d.ts +15 -0
- package/dist/lib/storage-adapter.js +91 -0
- package/dist/lib/types.d.ts +339 -0
- package/dist/lib/types.js +1 -0
- package/dist/newsletter/client.d.ts +140 -0
- package/dist/newsletter/client.js +85 -0
- package/dist/payments/client.d.ts +352 -0
- package/dist/payments/client.js +323 -0
- package/dist/push/client.d.ts +110 -0
- package/dist/push/client.js +179 -0
- package/dist/realtime/client.d.ts +131 -0
- package/dist/realtime/client.js +513 -0
- package/dist/server/analytics.d.ts +176 -0
- package/dist/server/analytics.js +49 -0
- package/dist/server/cache.d.ts +74 -0
- package/dist/server/cache.js +154 -0
- package/dist/server/emails.d.ts +142 -0
- package/dist/server/emails.js +123 -0
- package/dist/server/events.d.ts +357 -0
- package/dist/server/events.js +219 -0
- package/dist/server/functions.d.ts +40 -0
- package/dist/server/functions.js +1 -0
- package/dist/server/http-utils.d.ts +10 -0
- package/dist/server/http-utils.js +115 -0
- package/dist/server/index.d.ts +195 -0
- package/dist/server/index.js +314 -0
- package/dist/server/payments.d.ts +218 -0
- package/dist/server/payments.js +150 -0
- package/dist/server/push.d.ts +85 -0
- package/dist/server/push.js +37 -0
- package/dist/server/usage.d.ts +43 -0
- package/dist/server/usage.js +8 -0
- package/dist/storage/client.d.ts +143 -0
- package/dist/storage/client.js +224 -0
- package/package.json +52 -4
- package/skill/usebecky/SKILL.md +339 -0
- package/skill/usebecky/references/access-rules.md +307 -0
- package/skill/usebecky/references/addons.md +68 -0
- package/skill/usebecky/references/analytics.md +166 -0
- package/skill/usebecky/references/android.md +434 -0
- package/skill/usebecky/references/auth.md +379 -0
- package/skill/usebecky/references/cache.md +51 -0
- package/skill/usebecky/references/components.md +127 -0
- package/skill/usebecky/references/emails.md +105 -0
- package/skill/usebecky/references/expo.md +147 -0
- package/skill/usebecky/references/functions.md +99 -0
- package/skill/usebecky/references/hosting.md +119 -0
- package/skill/usebecky/references/http-api.md +233 -0
- package/skill/usebecky/references/ios.md +355 -0
- package/skill/usebecky/references/payments.md +493 -0
- package/skill/usebecky/references/realtime.md +143 -0
- package/skill/usebecky/references/scheduled-jobs.md +82 -0
- package/skill/usebecky/references/sdk.md +838 -0
- package/skill/usebecky/references/storage.md +210 -0
- package/skill/usebecky/references/templates.md +191 -0
- package/skill/usebecky/references/wordpress.md +87 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Realtime
|
|
2
|
+
|
|
3
|
+
One WebSocket per client carries everything: table changes, broadcast and presence. It opens on first use, closes about 1 s after the last subscription stops, reconnects with backoff, resubscribes after reconnecting and switches identity when the user signs in, refreshes or signs out.
|
|
4
|
+
|
|
5
|
+
## 1. Table changes
|
|
6
|
+
|
|
7
|
+
### Enable realtime for the table first
|
|
8
|
+
|
|
9
|
+
Add the table to `usebecky/config.json` and run `npx usebecky config push` yourself (`{"realtime": {"tables": ["messages"]}}`; `config pull` writes the file first). Or Dashboard → Realtime → toggle the table. The table needs a primary key. Migrations cannot enable it. Until enabled, subscriptions fail with `realtime_not_enabled`.
|
|
10
|
+
|
|
11
|
+
### Subscribe
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { baas } from './lib/usebecky'
|
|
15
|
+
|
|
16
|
+
const roomId = 42
|
|
17
|
+
const messages: { id: string; room_id: number; body: string }[] = []
|
|
18
|
+
|
|
19
|
+
const unsubscribe = baas.realtime.subscribe('messages', {
|
|
20
|
+
event: 'INSERT', // 'INSERT' | 'UPDATE' | 'DELETE' | '*' (default)
|
|
21
|
+
filter: `room_id=eq.${roomId}`, // optional, one condition
|
|
22
|
+
onSubscribed: () => console.log('live'),
|
|
23
|
+
onError: (error) => console.error(error.code, error.message, error.hint),
|
|
24
|
+
}, (change) => {
|
|
25
|
+
if (change.event === 'INSERT' && change.new) messages.push(change.new)
|
|
26
|
+
})
|
|
27
|
+
unsubscribe() // when you're done listening
|
|
28
|
+
// Short form: baas.realtime.subscribe('messages', (change) => {})
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Filters: `column=op.value` with `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, or `column=in.(a,b,c)` (1 to 100 values, quote values with commas: `in.("a,b",c)`). One filter per subscription; subscribe twice or filter in the callback for more.
|
|
32
|
+
|
|
33
|
+
### What `change` looks like
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
// INSERT
|
|
37
|
+
{ "event": "INSERT", "table": "messages", "new": { "id": "9c1d...", "room_id": 42, "user_id": "0b6f...", "body": "hi", "created_at": "2026-11-12T10:00:00.120Z" }, "old": null, "commit_timestamp": "2026-11-12T10:00:00.121Z" }
|
|
38
|
+
// UPDATE: old holds only the primary key
|
|
39
|
+
{ "event": "UPDATE", "table": "messages", "new": { "id": "9c1d...", "room_id": 42, "user_id": "0b6f...", "body": "hi (edited)", "created_at": "2026-11-12T10:00:00.120Z" }, "old": { "id": "9c1d..." }, "commit_timestamp": "2026-11-12T10:00:05.003Z" }
|
|
40
|
+
// DELETE: new is null, old holds only the primary key
|
|
41
|
+
{ "event": "DELETE", "table": "messages", "new": null, "old": { "id": "9c1d..." }, "commit_timestamp": "2026-11-12T10:01:00.500Z" }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- `new` is the row re-read with the subscriber's own permissions at delivery time; two quick updates may both show the latest state.
|
|
45
|
+
- Delivery follows RLS: subscribers only receive rows their SELECT policies allow. Signed-out subscribers receive what `anon` may see. DELETE is checked against the old row when it fits in a notification (about 8 KB); for larger rows, any SELECT policy that applies to the subscriber's role lets the primary key through.
|
|
46
|
+
- Do not use `old` for previous column values; it only identifies the row.
|
|
47
|
+
|
|
48
|
+
### Patterns
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
// src/live.ts: two React hooks
|
|
52
|
+
import { useEffect, useState } from 'react'
|
|
53
|
+
import { baas } from './lib/usebecky'
|
|
54
|
+
|
|
55
|
+
type Todo = { id: string; title: string; done: boolean }
|
|
56
|
+
type Message = { id: string; room_id: number; body: string }
|
|
57
|
+
|
|
58
|
+
// Simplest and always correct: refetch on any change
|
|
59
|
+
export function useLiveTodos() {
|
|
60
|
+
const [todos, setTodos] = useState<Todo[]>([])
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
const load = () => baas.from('todos').select('id, title, done').order('created_at').then(({ data, error }) => { if (!error) setTodos(data) })
|
|
63
|
+
load()
|
|
64
|
+
return baas.realtime.subscribe('todos', load) // the unsubscribe function is the effect's cleanup
|
|
65
|
+
}, [])
|
|
66
|
+
return todos
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Patch local state by primary key (load the initial rows with a normal query, then apply changes)
|
|
70
|
+
export function useLiveMessages(roomId: number, initial: Message[]) {
|
|
71
|
+
const [messages, setMessages] = useState<Message[]>(initial)
|
|
72
|
+
useEffect(() => baas.realtime.subscribe('messages', { filter: `room_id=eq.${roomId}` }, (c) => {
|
|
73
|
+
setMessages((list) => {
|
|
74
|
+
if (c.event === 'INSERT') return [...list, c.new!]
|
|
75
|
+
if (c.event === 'UPDATE') return list.map((m) => (m.id === c.new!.id ? c.new! : m))
|
|
76
|
+
return list.filter((m) => m.id !== c.old!.id)
|
|
77
|
+
})
|
|
78
|
+
}), [roomId])
|
|
79
|
+
return messages
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Load the initial rows with a normal query, then apply changes. Always return or call the unsubscribe function on cleanup. Typed clients (`createClient<Database>`) type `change.new` from the table.
|
|
84
|
+
|
|
85
|
+
## 2. Broadcast and presence (channels)
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
import { baas } from './lib/usebecky'
|
|
89
|
+
|
|
90
|
+
const roomId = 42
|
|
91
|
+
const room = baas.realtime.channel(`room:${roomId}`) // joins; same object for the same name
|
|
92
|
+
const offTyping = room.on<{ name: string }>('typing', (payload, event) => console.log(`${payload.name}: ${event}`)) // '*' for every event; returns a stop function
|
|
93
|
+
room.send('typing', { name: 'Ada' }) // others only: the sender does not receive it
|
|
94
|
+
room.track({ name: 'Ada', status: 'online' }) // your presence; re-sent after reconnects
|
|
95
|
+
room.onPresence<{ name: string; status: string }>((state) => console.log('online:', Object.values(state).map((p) => p.name)))
|
|
96
|
+
// state: { "c3f1...": { "name": "Ada", "status": "online" }, "9a2e...": { "name": "Grace", "status": "away" } }
|
|
97
|
+
console.log(room.presenceKey, room.joined) // your key in state (null until joined), true once joined
|
|
98
|
+
room.onError((error) => console.warn(error.code, error.message))
|
|
99
|
+
room.untrack()
|
|
100
|
+
offTyping()
|
|
101
|
+
room.leave() // stops all listeners; create the channel again to rejoin
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Security: channels are not protected by RLS. Anyone with the publishable key can join any channel name and read or send messages. Never broadcast private data; broadcast ids or "something changed" signals and let clients load the data with a query (RLS applies there). For private live data use table changes.
|
|
105
|
+
|
|
106
|
+
Messages sent before the join completes are queued and sent once joined.
|
|
107
|
+
|
|
108
|
+
## 3. Limits
|
|
109
|
+
|
|
110
|
+
| Limit | Value | Error code |
|
|
111
|
+
|---|---|---|
|
|
112
|
+
| Subscriptions per connection | 100 | `too_many_subscriptions` |
|
|
113
|
+
| Channels per connection | 100 | `too_many_channels` |
|
|
114
|
+
| Broadcast payload | about 7.5 KB | `payload_too_large` |
|
|
115
|
+
| Presence state per client | 2 KB | `presence_too_large` |
|
|
116
|
+
| Messages sent per connection | 100 per second (extra are dropped) | `rate_limited` |
|
|
117
|
+
| Broadcast event name | 1 to 100 characters | `invalid_event` |
|
|
118
|
+
|
|
119
|
+
Throttle typing indicators and cursor updates to a few per second.
|
|
120
|
+
|
|
121
|
+
## 4. Status, Node and cleanup
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
import { baas } from './lib/usebecky'
|
|
125
|
+
|
|
126
|
+
console.log(baas.realtime.status) // 'idle' | 'connecting' | 'open' | 'reconnecting'
|
|
127
|
+
baas.realtime.disconnect() // drop every subscription and channel
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Runtimes without a global `WebSocket` (Node before 22) need one: `createClient(url, key, { realtime: { WebSocket } })` with `import WebSocket from 'ws'`. Server code (`usebecky/server`) has no realtime; use a browser-style client in scripts if needed.
|
|
131
|
+
|
|
132
|
+
## 5. Errors
|
|
133
|
+
|
|
134
|
+
Subscription errors go to `onError` (or a console warning `Realtime subscription to "x" failed: ...`):
|
|
135
|
+
|
|
136
|
+
| Code | Cause |
|
|
137
|
+
|---|---|
|
|
138
|
+
| `realtime_not_enabled` | Enable realtime for the table |
|
|
139
|
+
| `table_not_found` | Table name typo or not in `public` |
|
|
140
|
+
| `column_not_found` | Filter column does not exist |
|
|
141
|
+
| `invalid_filter` | Filter syntax; use `col=eq.value` |
|
|
142
|
+
| `invalid_event` | Event must be `*`, `INSERT`, `UPDATE` or `DELETE` |
|
|
143
|
+
| `realtime_unavailable` | Temporary; subscribe again later |
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Scheduled jobs and database webhooks
|
|
2
|
+
|
|
3
|
+
Dashboard features with no SDK calls in the app: set them up in the dashboard (Scheduled jobs; Settings → Webhooks → Database changes); there is no customer API or CLI for them. To run your own code, use a Function (`references/functions.md`): a job can "Run a function" and a database webhook can send changes to a function instead of a URL. Guides: https://usebecky.com/docs/guides/scheduled-jobs and https://usebecky.com/docs/guides/webhooks.
|
|
4
|
+
|
|
5
|
+
## Scheduled jobs (cron)
|
|
6
|
+
|
|
7
|
+
A job = a schedule + a timezone (IANA name, default `UTC`) + one action:
|
|
8
|
+
|
|
9
|
+
- **Database function**: a function in `public` callable without arguments, run as the project owner (RLS doesn't apply) with a timeout (1-60 s, default 30). Its return value (first 1 KB) shows in the run history. No retries. Revoke it from app roles so visitors can't call it through RPC.
|
|
10
|
+
- **URL**: a signed `POST` to your server (https; timeout 1-60 s, default 10; 5xx, 408, 429, timeouts and network errors retried 0-5 times, default 2, after 5 s, 15 s, 45 s, ...). Success = any 2xx. Verify it with the job's own secret (`whsec_...`, shown on the job).
|
|
11
|
+
|
|
12
|
+
Schedules: every 1/2/3/5/10/15/20/30 minutes, hourly at :MM, daily / weekly / monthly at HH:MM, or a 5-field cron (`0 3 * * *` = every day at 03:00; `@daily`, `@hourly`, ... work too). A job never overlaps itself; runs missed while usebecky was down run once.
|
|
13
|
+
|
|
14
|
+
```sql
|
|
15
|
+
-- usebecky/migrations/<version>_delete_old_rows.sql, applied with npx usebecky db push.
|
|
16
|
+
-- Then Scheduled jobs → New job → Database function → delete_old_rows.
|
|
17
|
+
create or replace function public.delete_old_rows() returns integer language plpgsql as $$
|
|
18
|
+
declare deleted integer;
|
|
19
|
+
begin
|
|
20
|
+
delete from public.logs where created_at < now() - interval '30 days';
|
|
21
|
+
get diagnostics deleted = row_count;
|
|
22
|
+
return deleted;
|
|
23
|
+
end $$;
|
|
24
|
+
revoke execute on function public.delete_old_rows() from public, anon, authenticated;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// app/api/jobs/daily-digest/route.ts: a Next.js route called by a URL job (server only).
|
|
29
|
+
// Body: { id: 'evt_run_...', type: 'job.run', created_at, project,
|
|
30
|
+
// data: { job: { id, name }, run: { id, trigger: 'schedule' | 'manual', scheduled_for, attempt }, payload } }
|
|
31
|
+
// Headers: usebecky-signature (t=<unix>,v1=<hex>), usebecky-event-type: job.run, usebecky-job-id, usebecky-run-id
|
|
32
|
+
import { verifyEvent } from 'usebecky/server'
|
|
33
|
+
|
|
34
|
+
async function sendDailyDigest(payload: unknown) {
|
|
35
|
+
console.log('daily digest', payload) // your work: query data, send emails, ...
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export async function POST(request: Request) {
|
|
39
|
+
const rawBody = await request.text() // verify the raw body before parsing it
|
|
40
|
+
const event = verifyEvent(rawBody, request.headers.get('usebecky-signature'), process.env.USEBECKY_JOB_SECRET) // throws if not from usebecky
|
|
41
|
+
await sendDailyDigest(event.data.payload)
|
|
42
|
+
return Response.json({ ok: true }) // answer 2xx within the timeout, or the run fails (and is retried)
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Other languages verify the same way as webhooks (HMAC-SHA256 over `"<t>.<raw body>"` with the job's secret; Python example in `http-api.md`). A Swift or Kotlin app never receives these calls: they go to a server.
|
|
47
|
+
|
|
48
|
+
## Database webhooks
|
|
49
|
+
|
|
50
|
+
A webhook = a `public` table + changes (insert, update, delete; default all) + a URL, with an optional filter (one condition in realtime syntax like `status=eq.paid`, checked on the new row, the old row for deletes) and a column list. Each change is stored in the project database in the same transaction (durable while usebecky is down; rolled-back changes are never sent), then delivered with the webhook signing and retries (10 s, 1 m, 5 m, 30 m, 2 h). Verify with the webhook's own secret:
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
// app/api/db-webhooks/route.ts: a Next.js route that receives database webhooks (server only)
|
|
54
|
+
import { verifyEvent } from 'usebecky/server'
|
|
55
|
+
|
|
56
|
+
export async function POST(request: Request) {
|
|
57
|
+
const rawBody = await request.text()
|
|
58
|
+
const event = verifyEvent(rawBody, request.headers.get('usebecky-signature'), process.env.USEBECKY_DB_WEBHOOK_SECRET) // throws if not from usebecky
|
|
59
|
+
// event.type: 'db.row.inserted' | 'db.row.updated' | 'db.row.deleted'
|
|
60
|
+
// event.data: { table: 'orders', record: { id: 42, status: 'paid' } | null, old_record: { id: 42, status: 'new' } | null }
|
|
61
|
+
if (event.type === 'db.row.updated' && event.data.record?.status === 'paid') console.log('order paid', event.data.record.id)
|
|
62
|
+
return Response.json({ ok: true })
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- Deduplicate by `event.id` (same on every retry); one event per changed row; `TRUNCATE` sends nothing.
|
|
67
|
+
- Use them to react to data changes on your server (send an email with `baas.emails.send`, a push with `baas.push.send`). For live updates inside an app use realtime instead (`realtime.md`).
|
|
68
|
+
|
|
69
|
+
## Set them up in the dashboard
|
|
70
|
+
|
|
71
|
+
Write the database function (as a migration: `npx usebecky db new <name>`, then `npx usebecky db push`) or the server route, then tell the user the exact dashboard steps:
|
|
72
|
+
|
|
73
|
+
- **Scheduled job:** Scheduled jobs → New job → name, schedule (every N minutes, hourly at :MM, daily / weekly / monthly at a time, or a cron expression; timezone), and what it runs: **Database function** (pick it; functions with required arguments are refused) or **Call a URL** (your server route; copy the job's **Signing secret** into the server's env as the secret `Events` checks). Optional payload, timeout, retries. **Run now** tests it; the run history keeps the last 50 runs.
|
|
74
|
+
- **Database webhook:** Settings → Webhooks → Database changes → Add → table, events (insert, update, delete), your URL, optional filter (realtime syntax like `status=eq.paid`) and columns. Copy its signing secret to the server; **Send test** posts a sample `db.row.inserted`.
|
|
75
|
+
|
|
76
|
+
Errors the dashboard shows: `invalid_schedule`, `schedule_never_runs`, `invalid_timezone`, `function_not_found` (lists close matches), `function_needs_arguments`, `invalid_url`, `table_not_found`, `invalid_filter`.
|
|
77
|
+
|
|
78
|
+
## Plan limits and events
|
|
79
|
+
|
|
80
|
+
- Jobs per project: Free 1, Pro 5, Business 50 (`402 quota_exceeded`); Free jobs run at most hourly, Pro and Business every minute (`402 plan_required` names the plan needed).
|
|
81
|
+
- Database webhooks per project: Free 1, Pro 5, Business 50 (`402 quota_exceeded`).
|
|
82
|
+
- `job.failed` (developer webhook event): `{ job: { id, name, type }, run: { id, status, error, output, http_status, attempts, ... } }` after the last retry fails.
|