better-supabase 0.3.0 → 0.5.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 +9 -6
- package/bin/better-supabase.js +4 -0
- package/dist/{base64-CQeB1eSf.js → base64-D2gsioCY.js} +2 -2
- package/dist/channel-FQW-CnGR.d.ts +70 -0
- package/dist/claims-BAf6c7is.js +48 -0
- package/dist/cli/_format-Cax5EsM9.js +101 -0
- package/dist/cli/bin.d.ts +1 -0
- package/dist/cli/bin.js +48 -0
- package/dist/cli/codemod-DqV7612m.js +388 -0
- package/dist/cli/command-CK14fP91.js +502 -0
- package/dist/cli/compare-BmIWVEui.js +9 -0
- package/dist/cli/config-CPVpXP5I.js +1965 -0
- package/dist/cli/config-dtoekM0v.js +2 -0
- package/dist/cli/db-DOBPt660.js +52 -0
- package/dist/cli/diff-SjkO5rNr.js +752 -0
- package/dist/cli/dist-DBPdlPYK.js +1112 -0
- package/dist/cli/dist-DreZ24Sz.js +129 -0
- package/dist/cli/dist-xn4wlboc.js +732 -0
- package/dist/cli/doctor-L7Z8mYTx.js +2863 -0
- package/dist/cli/env-DmKv_G4A.js +108 -0
- package/dist/cli/env-jIFUADLY.js +511 -0
- package/dist/cli/errors-4v4DTtda.js +56 -0
- package/dist/cli/fastest-levenshtein-CFN-lNDv.js +120 -0
- package/dist/cli/gen-BJc9vdyu.js +2 -0
- package/dist/cli/gen-C2osRcr5.js +2204 -0
- package/dist/cli/index.d.ts +493 -0
- package/dist/cli/index.js +184 -0
- package/dist/cli/init-Saf5-R9T.js +550 -0
- package/dist/cli/introspect--H7oGmcd.js +81 -0
- package/dist/cli/io-k41_z-jT.js +24 -0
- package/dist/cli/json5-ChRycquj.js +787 -0
- package/dist/cli/jsonc-BUniUpOk.js +2 -0
- package/dist/cli/jsonc-D5Fu67jw.js +45 -0
- package/dist/cli/keys-ByKHnvP9.js +83 -0
- package/dist/cli/ohash-D7bG_EOb.js +277 -0
- package/dist/cli/openapi-Cp5Fyta-.js +66 -0
- package/dist/cli/project-B_GeXyHh.js +70 -0
- package/dist/cli/prompts-BNcNfAve.js +1142 -0
- package/dist/cli/prompts-BTYQGunc.js +2 -0
- package/dist/cli/read-sets-BfMQcKy8.js +289 -0
- package/dist/cli/rolldown-runtime-BPOCksWG.js +24 -0
- package/dist/cli/run-BKR2W_79.js +351 -0
- package/dist/cli/seed-CUlqWh-8.js +98 -0
- package/dist/cli/skills-LJJIhLFR.js +137 -0
- package/dist/cli/sql-DzPbfngx.js +348 -0
- package/dist/cli/style-C0NFdJRL.js +29 -0
- package/dist/cli/toml-DB-MNnFs.js +424 -0
- package/dist/cli/version-BDJuO0UR.js +4 -0
- package/dist/cli/yaml-CYCbJ6et.js +2252 -0
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +15 -22
- package/dist/clone-BfgmLU90.js +21 -0
- package/dist/{compiler-2zqGzxVZ.d.ts → compiler-BXH_aZ7N.d.ts} +2 -2
- package/dist/config/index.d.ts +4 -4
- package/dist/config/index.js +5 -5
- package/dist/{config-DOsGYSiT.js → config-DreERlKo.js} +1 -1
- package/dist/{config-C1CYcm6o.d.ts → config-T_ejwyd3.d.ts} +176 -11
- package/dist/{define-DUbydmJa.d.ts → define-Bp_BZa5h.d.ts} +37 -29
- package/dist/{define-DF341GDj.js → define-cNKzqwL_.js} +356 -89
- package/dist/edge/index.d.ts +20 -13
- package/dist/edge/index.js +55 -26
- package/dist/{entitlements-DvJXoI02.d.ts → entitlements-DUxU4oHe.d.ts} +2 -2
- package/dist/env/index.d.ts +2 -2
- package/dist/env/index.js +34 -1
- package/dist/{errors-Bl3rkOzo.js → errors-DtwXa6b8.js} +2 -1
- package/dist/events/index.d.ts +3 -2
- package/dist/events/index.js +69 -16
- package/dist/events-aIO7vsIk.d.ts +230 -0
- package/dist/executor-BunPOO-k.d.ts +402 -0
- package/dist/{executor-B26lgbHD.d.ts → executor-Cghdstwu.d.ts} +1 -2
- package/dist/{executor-C57jx2pn.js → executor-XycESQPH.js} +3 -3
- package/dist/hono/index.d.ts +27 -23
- package/dist/hono/index.js +46 -11
- package/dist/impersonation-VfaGc4Q_.js +41 -0
- package/dist/{index-BNsABq7P.d.ts → index-BGdgBPdf.d.ts} +66 -25
- package/dist/{index-qriRM9cZ.d.ts → index-C7f8cOBM.d.ts} +4 -4
- package/dist/{index-Dy6kuF0P.d.ts → index-CLg87OBW.d.ts} +6 -1
- package/dist/{index-GV77NpRP.d.ts → index-DOESKG27.d.ts} +34 -9
- package/dist/{index-CriFFJ_p.d.ts → index-DgILJRXj.d.ts} +43 -17
- package/dist/{index-UJ-LUxtI.d.ts → index-DmXSxbLi.d.ts} +14 -14
- package/dist/{index-Cf-D2jk1.d.ts → index-Dxn2a5cw.d.ts} +2 -2
- package/dist/{index-CTTMS6_1.d.ts → index-SaTsEfGP.d.ts} +86 -9
- package/dist/{index-CADlNHK-.d.ts → index-fag8VJZ2.d.ts} +5 -6
- package/dist/index.d.ts +34 -17
- package/dist/index.js +15 -14
- package/dist/jobs/index.d.ts +147 -95
- package/dist/jobs/index.js +773 -250
- package/dist/{json-schema--aOXAGfU.js → json-schema-m1fiwKgN.js} +23 -2
- package/dist/kit-events-CTFDfSwb.js +60 -0
- package/dist/kit-transport-B82k1djG.d.ts +33 -0
- package/dist/kit-transport-DJlHQUBU.js +55 -0
- package/dist/{config-Be4GwsqI.js → kits-CGLLrNPd.js} +38 -10
- package/dist/list/index.d.ts +1 -1
- package/dist/list/index.js +3 -3
- package/dist/{live-D8rV1Ldw.js → live-CdJBOc4f.js} +13 -9
- package/dist/{live-QE3UPbGm.d.ts → live-D9W2M5aO.d.ts} +16 -15
- package/dist/lookup-BaP5bI27.js +18 -0
- package/dist/mcp/index.d.ts +39 -22
- package/dist/mcp/index.js +39 -25
- package/dist/{mfa-x3V3vGh-.d.ts → mfa-CusDgPaD.d.ts} +5 -1
- package/dist/next/image/index.js +6 -3
- package/dist/next/index.d.ts +60 -36
- package/dist/next/index.js +167 -50
- package/dist/notifications/index.d.ts +162 -0
- package/dist/notifications/index.js +264 -0
- package/dist/openapi/index.d.ts +1 -1
- package/dist/openapi/index.js +6 -6
- package/dist/orgs/index.d.ts +132 -0
- package/dist/orgs/index.js +245 -0
- package/dist/orpc/index.d.ts +37 -20
- package/dist/orpc/index.js +24 -11
- package/dist/otel/index.d.ts +24 -5
- package/dist/otel/index.js +124 -64
- package/dist/permdock-sql-C2Inc6Xc.d.ts +29 -0
- package/dist/permdock-sql-DgOfeixi.js +51 -0
- package/dist/plugin-DwARMuQp.js +59 -0
- package/dist/{plugin-DVRB8qNE.d.ts → plugin-o144f322.d.ts} +17 -5
- package/dist/plugins/actor/index.d.ts +5 -2
- package/dist/plugins/actor/index.js +22 -8
- package/dist/plugins/rules/index.d.ts +2 -2
- package/dist/plugins/rules/index.js +52 -17
- package/dist/plugins/soft-delete/index.d.ts +3 -3
- package/dist/plugins/soft-delete/index.js +14 -5
- package/dist/plugins/tenant/index.d.ts +3 -3
- package/dist/plugins/tenant/index.js +45 -21
- package/dist/plugins/timestamps/index.d.ts +1 -1
- package/dist/plugins/timestamps/index.js +4 -3
- package/dist/plugins/validation/index.d.ts +2 -2
- package/dist/plugins/validation/index.js +26 -6
- package/dist/{pool-B9qsLyFR.d.ts → pool-C9voM4Kw.d.ts} +24 -6
- package/dist/postgres/index.d.ts +5 -5
- package/dist/postgres/index.js +20 -10
- package/dist/{postgrest-DmBlevh-.d.ts → postgrest-CruYKAvV.d.ts} +1 -1
- package/dist/{problem-CGt1ADix.js → problem-BW1KhzSG.js} +2 -1
- package/dist/{problem-Z2RTQjZD.d.ts → problem-Blxe8S31.d.ts} +1 -1
- package/dist/query/index.d.ts +2 -2
- package/dist/query/index.js +3 -3
- package/dist/{query-BdKLTPlj.js → query-CCbo44lG.js} +18 -18
- package/dist/queue-BYUCjr59.d.ts +252 -0
- package/dist/react/index.d.ts +8 -7
- package/dist/react/index.js +4 -3
- package/dist/react/server.d.ts +16 -5
- package/dist/react/server.js +12 -4
- package/dist/react/session.d.ts +10 -4
- package/dist/react/session.js +11 -3
- package/dist/{react-DNBYNazu.js → react-C_s7kiNz.js} +138 -46
- package/dist/{read-set-D0qBcboM.js → read-set-DQFt1N_Y.js} +71 -15
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +14 -12
- package/dist/{index-kpgopLNv.d.ts → refresh-BTrQ_ZTp.d.ts} +6 -3
- package/dist/{resolve-BRciX2jK.d.ts → resolve-C15TJq77.d.ts} +22 -11
- package/dist/{resource-D30rp0GN.js → resource-CRxxwkQq.js} +24 -9
- package/dist/{resource-CwVgiI5q.d.ts → resource-D8iqWMr-.d.ts} +6 -6
- package/dist/respond-D2OQl62-.d.ts +371 -0
- package/dist/{result-DWXatkd6.js → result-BKiliPY7.js} +2 -2
- package/dist/server/index.d.ts +17 -15
- package/dist/server/index.js +16 -22
- package/dist/server-Csx2sRjg.js +655 -0
- package/dist/{shared-_6-uPL7E.js → shared-D1dRUrAg.js} +19 -4
- package/dist/signers-Cc6r98SW.d.ts +162 -0
- package/dist/{simplify-LakqK1vH.js → simplify-_0oUKqCd.js} +27 -95
- package/dist/sql/index.d.ts +247 -10
- package/dist/sql/index.js +8591 -780
- package/dist/{sql-BIgk12ew.js → sql-Coh6n4cC.js} +11 -3
- package/dist/ssr/index.d.ts +4 -4
- package/dist/ssr/index.js +1 -2
- package/dist/{standard-FUi3Z3-7.js → standard-D7r6dMUu.js} +6 -3
- package/dist/{standard-eudBiRk1.d.ts → standard-J4YgMOLm.d.ts} +1 -1
- package/dist/{stats-D78UQ8Yu.js → stats-Bqob3WqT.js} +34 -9
- package/dist/storage/index.d.ts +4 -4
- package/dist/storage/index.js +174 -27
- package/dist/support-DT-OhSxD.d.ts +88 -0
- package/dist/support-Dk6vdmEw.js +291 -0
- package/dist/support-view-Da5peKFg.d.ts +17 -0
- package/dist/support-view-g4YLBeqX.js +18 -0
- package/dist/{tables-Dhha3BXM.js → tables-Cb-3_VWc.js} +14 -0
- package/dist/{permdock-sql-Bta_G0v-.js → template-TxrGI5jR.js} +2 -31
- package/dist/{temporal-BwshQk0W.js → temporal-CVlIV2DZ.js} +17 -4
- package/dist/{temporal-required-CMxeSVPo.js → temporal-required-CAt4Dc9Z.js} +2 -2
- package/dist/testing/index.d.ts +113 -24
- package/dist/testing/index.js +375 -47
- package/dist/{types-DONv9SHN.d.ts → types-Dnf_wRDz.d.ts} +26 -3
- package/dist/user-change-CHFEUro1.js +49 -0
- package/dist/{webhooks-CAIFQSTM.js → verify-Ce49ETPz.js} +38 -19
- package/dist/{version-BfpG2gks.js → version-DM_Roffb.js} +1 -1
- package/dist/{view-3Po_PVlr.d.ts → view-BEf0diC5.d.ts} +10 -5
- package/dist/{mfa-BxoR1RkN.js → view-Bq64ki8-.js} +210 -64
- package/dist/webhooks/index.d.ts +136 -5
- package/dist/webhooks/index.js +588 -2
- package/dist/wire-D2dT86vi.js +35 -0
- package/package.json +50 -10
- package/schemas/config-v1.json +131 -1
- package/schemas/doctor-report-v1.json +10 -0
- package/skills/better-supabase/SKILL.md +60 -10
- package/skills/better-supabase/references/plugins.md +13 -14
- package/skills/better-supabase/references/troubleshooting.md +25 -4
- package/skills/better-supabase-api/SKILL.md +74 -19
- package/skills/better-supabase-api/references/adapters.md +48 -27
- package/skills/better-supabase-auth/SKILL.md +149 -0
- package/skills/better-supabase-auth/references/permdock.md +100 -0
- package/skills/better-supabase-testing/SKILL.md +58 -4
- package/dist/claims-CoTobNC-.js +0 -25
- package/dist/events-Do8jXh4D.d.ts +0 -84
- package/dist/executor-DynmIWhq.d.ts +0 -195
- package/dist/invalidate-DbxuL2jL.js +0 -18
- package/dist/permdock-sql-DImJULY-.d.ts +0 -17
- package/dist/plugin-BqR6wKMB.js +0 -23
- package/dist/respond-C44EZAJo.js +0 -399
- package/dist/respond-DAkPIdTH.d.ts +0 -175
- package/dist/result-c2OYgCV2.d.ts +0 -203
- package/dist/view-wZ-9qIUz.js +0 -45
package/dist/webhooks/index.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { P as TableKey, k as Row, n as AnyFunctions, r as AnyModels } from "../types-Dnf_wRDz.js";
|
|
3
|
+
import { S as ErrorMapper, a as AsyncResult, u as Result } from "../executor-BunPOO-k.js";
|
|
4
|
+
import { a as EventHub } from "../events-aIO7vsIk.js";
|
|
5
|
+
import { t as BetterSupabase } from "../define-Bp_BZa5h.js";
|
|
6
|
+
import { g as RequestContext } from "../plugin-o144f322.js";
|
|
7
|
+
import { r as EventSink } from "../index-DOESKG27.js";
|
|
8
|
+
import { i as sqlTransport, n as RpcClient, r as rpcTransport, t as KitTransport } from "../kit-transport-B82k1djG.js";
|
|
9
|
+
import { _ as PublicUrlOptions, a as hmacSigner, b as publicUrl, c as WebhookSecretStore, d as WebhookPolicyError, f as WebhookRequest, g as AllowUrl, h as fetchTransport, i as WebhookSigner, l as sqlSecretStore, m as WebhookTransport, n as StandardWebhooksOptions, o as standardWebhooks, p as WebhookResponse, r as WebhookSignInput, s as RotateSecretOptions, t as HmacSignerOptions, u as FetchTransportOptions, v as ResolveHost, y as isPublicAddress } from "../signers-Cc6r98SW.js";
|
|
5
10
|
//#region src/webhooks/verify.d.ts
|
|
6
11
|
interface VerifiedWebhook<T = unknown> {
|
|
7
12
|
readonly id: string;
|
|
@@ -73,6 +78,8 @@ interface AuthHooks {
|
|
|
73
78
|
readonly site_url: string;
|
|
74
79
|
readonly token_new: string;
|
|
75
80
|
readonly token_hash_new: string;
|
|
81
|
+
/** Auth adds fields over time (`old_email`, `factor_type`, ...). */
|
|
82
|
+
readonly [key: string]: unknown;
|
|
76
83
|
};
|
|
77
84
|
};
|
|
78
85
|
output: Record<never, never>;
|
|
@@ -149,6 +156,130 @@ export declare function isDatabaseWebhook(value: unknown): value is DatabaseWebh
|
|
|
149
156
|
* Reads a database webhook payload for `table` as an app-cased change.
|
|
150
157
|
* Returns `null` for other tables or payloads that aren't database webhooks.
|
|
151
158
|
*/
|
|
152
|
-
export declare function databaseChange<M extends AnyModels, D, F extends AnyFunctions, E, T extends TableKey<M>>(
|
|
159
|
+
export declare function databaseChange<M extends AnyModels, D, F extends AnyFunctions, E, T extends TableKey<M>>(betterSupabase: BetterSupabase<M, D, F, E>, table: T, payload: unknown): DatabaseChange<Row<M, T>> | null;
|
|
153
160
|
//#endregion
|
|
154
|
-
|
|
161
|
+
//#region src/webhooks/outgoing.d.ts
|
|
162
|
+
/** One claimed delivery, as `shouldDeliver`, `transform` and `headers` see it. */
|
|
163
|
+
interface WebhookDelivery {
|
|
164
|
+
readonly id: string;
|
|
165
|
+
readonly endpointId: string;
|
|
166
|
+
readonly url: string;
|
|
167
|
+
readonly type: string;
|
|
168
|
+
readonly payload: unknown;
|
|
169
|
+
/** 1 on the first try. Counted when the delivery is claimed. */
|
|
170
|
+
readonly attempt: number;
|
|
171
|
+
readonly tenant: string | null;
|
|
172
|
+
readonly eventId: string | null;
|
|
173
|
+
readonly runId: string | null;
|
|
174
|
+
readonly createdAt: Temporal.Instant;
|
|
175
|
+
}
|
|
176
|
+
interface RetryPolicy {
|
|
177
|
+
/** Attempts before a delivery is dead-lettered. Defaults to 8. */
|
|
178
|
+
readonly maxAttempts?: number;
|
|
179
|
+
/**
|
|
180
|
+
* Seconds before the next attempt. Defaults to 5 seconds, 5 minutes, 30
|
|
181
|
+
* minutes, 2 hours, 5 hours, then 10 hours, each with full jitter. A
|
|
182
|
+
* receiver's `Retry-After` wins when it asks for longer, up to a day.
|
|
183
|
+
*/
|
|
184
|
+
readonly backoff?: (attempt: number) => number;
|
|
185
|
+
/** Statuses worth retrying. Defaults to 408, 429 and 5xx; network errors always retry. */
|
|
186
|
+
readonly retryable?: (status: number) => boolean;
|
|
187
|
+
}
|
|
188
|
+
interface WebhooksOptions {
|
|
189
|
+
/** `sqlTransport(postgres.admin)` for the worker, or the user's connection to manage. */
|
|
190
|
+
readonly transport: KitTransport;
|
|
191
|
+
/** `kits.webhooks-out.schema`. Defaults to `better_supabase`. */
|
|
192
|
+
readonly schema?: string;
|
|
193
|
+
/** Defaults to `fetchTransport({ allowUrl })`. */
|
|
194
|
+
readonly http?: WebhookTransport;
|
|
195
|
+
/** Used by the default `http`. Defaults to `publicUrl()`. */
|
|
196
|
+
readonly allowUrl?: AllowUrl;
|
|
197
|
+
/** Defaults to `standardWebhooks()`. */
|
|
198
|
+
readonly signer?: WebhookSigner;
|
|
199
|
+
/** Defaults to `sqlSecretStore(transport)`. */
|
|
200
|
+
readonly secrets?: WebhookSecretStore;
|
|
201
|
+
readonly retry?: RetryPolicy;
|
|
202
|
+
/** Return `false` (or throw) to cancel a delivery instead of sending it. */
|
|
203
|
+
readonly shouldDeliver?: (delivery: WebhookDelivery) => boolean | Promise<boolean>;
|
|
204
|
+
/**
|
|
205
|
+
* The JSON body. Defaults to the Standard Webhooks envelope,
|
|
206
|
+
* `{ type, timestamp, data }`.
|
|
207
|
+
*/
|
|
208
|
+
readonly transform?: (delivery: WebhookDelivery) => unknown;
|
|
209
|
+
/** Extra headers, e.g. an `idempotency-key`. */
|
|
210
|
+
readonly headers?: (delivery: WebhookDelivery) => Readonly<Record<string, string>>;
|
|
211
|
+
/** Characters of the response body kept in the log. Defaults to 2000. */
|
|
212
|
+
readonly responseBodyLimit?: number;
|
|
213
|
+
/** `betterSupabase.events`, for `webhook.*` kit events. */
|
|
214
|
+
readonly events?: EventHub;
|
|
215
|
+
readonly context?: RequestContext;
|
|
216
|
+
readonly errorMappers?: readonly ErrorMapper[];
|
|
217
|
+
}
|
|
218
|
+
interface PublishInput {
|
|
219
|
+
readonly type: string;
|
|
220
|
+
readonly data: unknown;
|
|
221
|
+
readonly tenant?: string;
|
|
222
|
+
/** With an id, publishing it again never queues a second delivery. */
|
|
223
|
+
readonly id?: string;
|
|
224
|
+
}
|
|
225
|
+
interface DispatchInput {
|
|
226
|
+
readonly endpointId: string;
|
|
227
|
+
readonly type: string;
|
|
228
|
+
readonly data: unknown;
|
|
229
|
+
/** An external run id stored with the delivery, e.g. a workflow run. */
|
|
230
|
+
readonly runId?: string;
|
|
231
|
+
readonly eventId?: string;
|
|
232
|
+
}
|
|
233
|
+
interface DeliverWebhooksOptions {
|
|
234
|
+
/** Deliveries per claim. Defaults to 25. */
|
|
235
|
+
readonly batch?: number;
|
|
236
|
+
/**
|
|
237
|
+
* Requests in flight at once. Defaults to 10, so a batch of 25 at the
|
|
238
|
+
* 10-second timeout finishes well inside the lease.
|
|
239
|
+
*/
|
|
240
|
+
readonly concurrency?: number;
|
|
241
|
+
/** How long a claim holds a delivery. Defaults to `'2 minutes'`. */
|
|
242
|
+
readonly lease?: string;
|
|
243
|
+
readonly budgetMs?: number;
|
|
244
|
+
}
|
|
245
|
+
interface DeliverWebhooksResult {
|
|
246
|
+
readonly succeeded: number;
|
|
247
|
+
/** Failed attempts that will retry. */
|
|
248
|
+
readonly retrying: number;
|
|
249
|
+
/** Deliveries that ran out of attempts or can't succeed. */
|
|
250
|
+
readonly dead: number;
|
|
251
|
+
readonly canceled: number;
|
|
252
|
+
/** Endpoints disabled after failing for `disableAfter`. */
|
|
253
|
+
readonly disabled: number;
|
|
254
|
+
}
|
|
255
|
+
interface WebhooksRouteOptions extends DeliverWebhooksOptions {
|
|
256
|
+
readonly secret: string | undefined;
|
|
257
|
+
readonly onError?: (error: unknown) => void;
|
|
258
|
+
}
|
|
259
|
+
interface Webhooks {
|
|
260
|
+
/** Queues the event for each subscribed endpoint; returns how many. */
|
|
261
|
+
publish(event: PublishInput): AsyncResult<number>;
|
|
262
|
+
/** Sends to one endpoint outside its subscriptions; returns the delivery id. */
|
|
263
|
+
dispatch(input: DispatchInput): AsyncResult<string>;
|
|
264
|
+
/** Queues a finished delivery again. */
|
|
265
|
+
redeliver(deliveryId: string): AsyncResult<string>;
|
|
266
|
+
/** A new signing secret, returned once. */
|
|
267
|
+
rotateSecret(endpointId: string, options?: RotateSecretOptions): AsyncResult<string>;
|
|
268
|
+
/** Sends due deliveries. Run it from a cron route or a job. */
|
|
269
|
+
deliver(options?: DeliverWebhooksOptions): Promise<DeliverWebhooksResult>;
|
|
270
|
+
/** A `GET`/`POST` handler for Vercel Cron that runs `deliver` behind a bearer secret. */
|
|
271
|
+
deliverRoute(options: WebhooksRouteOptions): (request: Request) => Promise<Response>;
|
|
272
|
+
/**
|
|
273
|
+
* An `EventSink` that publishes CloudEvents, e.g. from the outbox relay.
|
|
274
|
+
* Endpoints subscribe to unprefixed types, so it removes `typePrefix`
|
|
275
|
+
* (`dev.better-supabase` by default, the relay's default) and the dot.
|
|
276
|
+
*/
|
|
277
|
+
sink(options?: WebhookSinkOptions): EventSink;
|
|
278
|
+
}
|
|
279
|
+
interface WebhookSinkOptions {
|
|
280
|
+
/** The relay's `typePrefix`. */
|
|
281
|
+
readonly typePrefix?: string;
|
|
282
|
+
}
|
|
283
|
+
export declare function createWebhooks(options: WebhooksOptions): Webhooks;
|
|
284
|
+
//#endregion
|
|
285
|
+
export { type AllowUrl, type AuthHookError, type AuthHookKind, type AuthHooks, type DatabaseChange, type DatabaseWebhookPayload, type DeliverWebhooksOptions, type DeliverWebhooksResult, type DispatchInput, type FetchTransportOptions, type HmacSignerOptions, type KitTransport, type PublicUrlOptions, type PublishInput, type ResolveHost, type RetryPolicy, type RotateSecretOptions, type RpcClient, type StandardWebhooksOptions, type VerifiedWebhook, type VerifyOptions, type WebhookDelivery, type WebhookInput, WebhookPolicyError, type WebhookRequest, type WebhookResponse, type WebhookSecretStore, type WebhookSignInput, type WebhookSigner, type WebhookSinkOptions, type WebhookTransport, type Webhooks, type WebhooksOptions, type WebhooksRouteOptions, fetchTransport, hmacSigner, isPublicAddress, publicUrl, rpcTransport, sqlSecretStore, sqlTransport, standardWebhooks };
|