better-supabase 0.15.1 → 0.17.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/{ai-schedules-D_Hz-ik5.d.ts → ai-schedules-Dk9H3kAp.d.ts} +1 -1
- package/dist/ai-sdk/agents/index.d.ts +2 -2
- package/dist/{api-DxAPqMrE.d.ts → api-CpL3hm87.d.ts} +1 -1
- package/dist/{app-tables-D29Rahtg.js → app-tables-Q0TYfeih.js} +1 -0
- package/dist/{app-tables-CbCFSXLG.d.ts → app-tables-dS02piE7.d.ts} +1 -1
- package/dist/astro/index.d.ts +4 -4
- package/dist/{auth-module-BEFESDC4.js → auth-module-BbmX-N4L.js} +12 -4
- package/dist/{authorization-HZdJCaVm.d.ts → authorization-CNsvnwle.d.ts} +19 -3
- package/dist/better-result/index.d.ts +2 -2
- package/dist/{bind-h5jre2K0.d.ts → bind-C801IaK-.d.ts} +4 -4
- package/dist/{block-env-BrfRvPrj.d.ts → block-env-BeG4DiiO.d.ts} +4 -4
- package/dist/blocks/access-requests/index.d.ts +1 -1
- package/dist/blocks/activities/index.d.ts +1 -1
- package/dist/blocks/agents/index.d.ts +1 -1
- package/dist/blocks/ai-cache/index.d.ts +1 -1
- package/dist/blocks/ai-chat/index.d.ts +4 -4
- package/dist/blocks/ai-files/index.d.ts +1 -1
- package/dist/blocks/ai-keys/index.d.ts +1 -1
- package/dist/blocks/ai-schedules/index.d.ts +2 -2
- package/dist/blocks/announcements/index.d.ts +4 -4
- package/dist/blocks/api-keys/index.d.ts +2 -2
- package/dist/blocks/approvals/index.d.ts +1 -1
- package/dist/blocks/assets/index.d.ts +1 -1
- package/dist/blocks/assignment/index.d.ts +1 -1
- package/dist/blocks/attachments/index.d.ts +2 -2
- package/dist/blocks/audit/index.d.ts +5 -5
- package/dist/blocks/automations/index.d.ts +3 -3
- package/dist/blocks/billable-time/index.d.ts +1 -1
- package/dist/blocks/billing/index.d.ts +3 -3
- package/dist/blocks/bookings/index.d.ts +2 -2
- package/dist/blocks/bulk/index.d.ts +1 -1
- package/dist/blocks/calendar/index.d.ts +2 -2
- package/dist/blocks/catalog/index.d.ts +1 -1
- package/dist/blocks/channels/index.d.ts +1 -1
- package/dist/blocks/collections/index.d.ts +1 -1
- package/dist/blocks/comments/index.d.ts +5 -5
- package/dist/blocks/compliance/index.d.ts +1 -1
- package/dist/blocks/connectors/index.d.ts +1 -1
- package/dist/blocks/contacts/index.d.ts +1 -1
- package/dist/blocks/content/index.d.ts +1 -1
- package/dist/blocks/contracts/index.d.ts +1 -1
- package/dist/blocks/courses/index.d.ts +1 -1
- package/dist/blocks/created-by/index.d.ts +4 -3
- package/dist/blocks/created-by/index.js +2 -2
- package/dist/blocks/custom-fields/index.d.ts +1 -1
- package/dist/blocks/data-lifecycle/index.d.ts +1 -1
- package/dist/blocks/deals/index.d.ts +1 -1
- package/dist/blocks/dispatch/index.d.ts +1 -1
- package/dist/blocks/documents/index.d.ts +1 -1
- package/dist/blocks/domains/index.d.ts +1 -1
- package/dist/blocks/donations/index.d.ts +1 -1
- package/dist/blocks/drive/index.d.ts +1 -1
- package/dist/blocks/employees/index.d.ts +2 -2
- package/dist/blocks/enrichment/index.d.ts +1 -1
- package/dist/blocks/enrollments/index.d.ts +1 -1
- package/dist/blocks/entitlements/index.d.ts +3 -3
- package/dist/blocks/expenses/index.d.ts +1 -1
- package/dist/blocks/field-history/index.d.ts +1 -1
- package/dist/blocks/flags/index.d.ts +1 -1
- package/dist/blocks/forecasts/index.d.ts +1 -1
- package/dist/blocks/forms/index.d.ts +2 -2
- package/dist/blocks/goals/index.d.ts +1 -1
- package/dist/blocks/guests/index.d.ts +1 -1
- package/dist/blocks/hiring/index.d.ts +1 -1
- package/dist/blocks/identities/index.d.ts +1 -1
- package/dist/blocks/imports/index.d.ts +1 -1
- package/dist/blocks/inbox/index.d.ts +5 -5
- package/dist/blocks/incidents/index.d.ts +1 -1
- package/dist/blocks/index.d.ts +2 -2
- package/dist/blocks/inventory/index.d.ts +1 -1
- package/dist/blocks/invoices/index.d.ts +1 -1
- package/dist/blocks/knowledge/index.d.ts +1 -1
- package/dist/blocks/lead-scoring/index.d.ts +1 -1
- package/dist/blocks/leases/index.d.ts +1 -1
- package/dist/blocks/leave/index.d.ts +1 -1
- package/dist/blocks/ledger/index.d.ts +1 -1
- package/dist/blocks/mail-sync/index.d.ts +1 -1
- package/dist/blocks/memberships/index.d.ts +1 -1
- package/dist/blocks/memory/index.d.ts +1 -1
- package/dist/blocks/messaging/index.d.ts +5 -5
- package/dist/blocks/metrics/index.d.ts +1 -1
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +1 -1
- package/dist/blocks/notifications/index.d.ts +4 -4
- package/dist/blocks/numbering/index.d.ts +1 -1
- package/dist/blocks/oauth-server/index.d.ts +1 -1
- package/dist/blocks/onboarding/index.d.ts +2 -2
- package/dist/blocks/orders/index.d.ts +2 -2
- package/dist/blocks/organizations/index.d.ts +2 -2
- package/dist/blocks/outbox/index.d.ts +1 -1
- package/dist/blocks/passes/index.d.ts +1 -1
- package/dist/blocks/permissions/index.d.ts +3 -3
- package/dist/blocks/pipelines/index.d.ts +1 -1
- package/dist/blocks/posts/index.d.ts +1 -1
- package/dist/blocks/profiles/index.d.ts +1 -1
- package/dist/blocks/promotions/index.d.ts +1 -1
- package/dist/blocks/push/index.d.ts +2 -2
- package/dist/blocks/queue/index.d.ts +29 -2
- package/dist/blocks/queue/index.js +1 -1
- package/dist/blocks/quotes/index.d.ts +1 -1
- package/dist/blocks/rank/index.d.ts +1 -1
- package/dist/blocks/reactions/index.d.ts +4 -4
- package/dist/blocks/relations/index.d.ts +1 -1
- package/dist/blocks/reminders/index.d.ts +1 -1
- package/dist/blocks/reviews/index.d.ts +1 -1
- package/dist/blocks/saved-views/index.d.ts +3 -3
- package/dist/blocks/scores/index.d.ts +1 -1
- package/dist/blocks/search/index.d.ts +3 -3
- package/dist/blocks/security-events/index.d.ts +1 -1
- package/dist/blocks/segments/index.d.ts +1 -1
- package/dist/blocks/sequences/index.d.ts +1 -1
- package/dist/blocks/service-accounts/index.d.ts +1 -1
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/settings/index.d.ts +2 -2
- package/dist/blocks/share-links/index.d.ts +1 -1
- package/dist/blocks/shipments/index.d.ts +1 -1
- package/dist/blocks/signatures/index.d.ts +1 -1
- package/dist/blocks/signing-keys/index.d.ts +1 -1
- package/dist/blocks/sla/index.d.ts +1 -1
- package/dist/blocks/sso/index.d.ts +1 -1
- package/dist/blocks/state-machine/index.d.ts +1 -1
- package/dist/blocks/subjects/index.d.ts +2 -2
- package/dist/blocks/tags/index.d.ts +2 -2
- package/dist/blocks/tasks/index.d.ts +2 -2
- package/dist/blocks/teams/index.d.ts +1 -1
- package/dist/blocks/templates/index.d.ts +1 -1
- package/dist/blocks/time-tracking/index.d.ts +1 -1
- package/dist/blocks/timeline/index.d.ts +3 -3
- package/dist/blocks/trash/index.d.ts +1 -1
- package/dist/blocks/undo/index.d.ts +2 -2
- package/dist/blocks/updated-at/index.d.ts +7 -4
- package/dist/blocks/updated-at/index.js +2 -2
- package/dist/blocks/usage/index.d.ts +2 -2
- package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
- package/dist/blocks/versions/index.d.ts +1 -1
- package/dist/blocks/waitlist/index.d.ts +1 -1
- package/dist/blocks/webhooks/index.d.ts +2 -2
- package/dist/blocks/webhooks/index.js +1 -1
- package/dist/blocks/workflow-editor/index.d.ts +4 -4
- package/dist/blocks/workflows/index.d.ts +4 -4
- package/dist/{bucket-CiNi8sIw.d.ts → bucket-vc-QRrva.d.ts} +40 -1
- package/dist/cli/{add-C04vkBk9.js → add-BinNYhFD.js} +2 -2
- package/dist/cli/{add-DNOL9PDu.js → add-DMcrsWjC.js} +13 -11
- package/dist/cli/add-z-3pXI6C.js +1 -0
- package/dist/cli/{backfill-VFzf-TJP.js → backfill-DxBB62Zr.js} +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-Cb7mILFU.js → blocks-DSgTifw0.js} +1 -1
- package/dist/cli/{blocks-Bn7WUca5.js → blocks-rxOS-Mzz.js} +1 -1
- package/dist/cli/{cache-DkplpIGe.js → cache-oU0yHKf0.js} +1 -1
- package/dist/cli/{codemod-BbaE5dL_.js → codemod-Dsrv_3gQ.js} +1 -1
- package/dist/cli/{config-9t5ec_N7.js → config-2rwFHbwj.js} +3 -1
- package/dist/cli/{config-CBqkQjjN.js → config-C6XylzKz.js} +1 -1
- package/dist/cli/{content-mapper-Cdx6arxu.js → content-mapper-DLbXilBz.js} +2 -2
- package/dist/cli/{db-DrBI_HNv.js → db-Bwrr3GHM.js} +2 -2
- package/dist/cli/{doctor-C-VO-QQ2.js → doctor-CKt5Yyl4.js} +184 -142
- package/dist/cli/{gen-yRHOHW1b.js → gen-CeG6lbka.js} +13 -13
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-BOw0SX65.js → init-DrQlf9RL.js} +6 -6
- package/dist/cli/{live-Lmg-hYyO.js → live-BvWGM4c3.js} +2 -2
- package/dist/cli/{mcp-DQ1zR2eA.js → mcp-BrOnGB15.js} +2 -2
- package/dist/cli/{metadata-CZaxkv21.js → metadata-BNSdPuKp.js} +3 -3
- package/dist/cli/{migration-safety-BbhLu2fo.js → migration-safety-NtB3dsRU.js} +2 -2
- package/dist/cli/{module-migration-DOn6EmNz.js → module-migration-mKhX88V_.js} +1 -1
- package/dist/cli/{print-D_xf8PPj.js → print-Dh8iuPK3.js} +1 -1
- package/dist/cli/{remove-BY_TOTRj.js → remove-DfFXVBRr.js} +5 -5
- package/dist/cli/{render-lJmHr0y9.js → render-ChIwdIOJ.js} +10 -4
- package/dist/cli/{run-BJ6IMs_H.js → run-CLSHSVYo.js} +7 -7
- package/dist/cli/{run-DkB0fhc9.js → run-D48ZEU58.js} +24 -24
- package/dist/cli/{seed-Cz8PcXeT.js → seed-CG-pA-5N.js} +2 -2
- package/dist/cli/seed-CUxW5Dks.js +1 -0
- package/dist/cli/{shared-Bh-6IqJS.js → shared-D0XBFSlz.js} +1 -1
- package/dist/cli/{snapshot-Bzcigm7T.js → snapshot-C6vh_n3t.js} +3 -3
- package/dist/cli/{source-WoLdcQzN.js → source-BZbEK5if.js} +1 -1
- package/dist/cli/{source-args-IpJRJO5t.js → source-args-MTLYpifA.js} +1 -1
- package/dist/cli/{spec-CZMiLhv_.js → spec-B4LhpI6t.js} +2 -2
- package/dist/cli/{spec-BF_dpwzW.js → spec-C-dhdKwa.js} +1 -1
- package/dist/cli/{sql-layout-rFP0oq1N.js → sql-layout-26LSoifK.js} +2 -2
- package/dist/cli/{sync-mANmYYoL.js → sync-CHGMZCJ5.js} +2 -2
- package/dist/cli/{upgrade-B0Q9wMs-.js → upgrade-C0dVsqNX.js} +3 -3
- package/dist/cli/{upgrade-BrNLt92u.js → upgrade-GB9rqUGT.js} +2 -2
- package/dist/cli/{version-CyavsyGA.js → version-T507a49w.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/index.js +1 -1
- package/dist/client/native/index.d.ts +5 -5
- package/dist/client/native/index.js +1 -1
- package/dist/{client-BAEbEA7t.js → client-C_mlji5R.js} +6 -5
- package/dist/{composite-BZYXlVBN.d.ts → composite-B7f1MMgr.d.ts} +4 -3
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.js +4 -4
- package/dist/{config-DWGgUQCh.js → config-BVNNJwGC.js} +7 -6
- package/dist/{config-CcehOvbz.js → config-CIBc79_8.js} +1 -1
- package/dist/{context-TGX2eDS5.d.ts → context-CKCgjEDF.d.ts} +9 -2
- package/dist/{controller-DyPPMFSw.d.ts → controller-CJUXhshv.d.ts} +1 -1
- package/dist/{conversion-O-kyhXcC.d.ts → conversion-DgHdDlTK.d.ts} +1 -1
- package/dist/create/index.d.ts +2 -2
- package/dist/create/index.js +5 -5
- package/dist/{define-DFBnQyYg.d.ts → define-Cgru0_kF.d.ts} +2 -2
- package/dist/{define-block-DvvcM54N.d.ts → define-block-Xxw8Hroe.d.ts} +2 -2
- package/dist/edge/index.d.ts +5 -5
- package/dist/{entitlements-BnhDBxLW.d.ts → entitlements-B0jmjNLD.d.ts} +1 -1
- package/dist/{executor-CVIn6JHa.d.ts → executor-BWFfz0ik.d.ts} +2 -2
- package/dist/expo/index.d.ts +2 -2
- package/dist/{extension-B-lajjex.js → extension-DTaHjwdc.js} +3 -2
- package/dist/{extension-B0EjCYhO.js → extension-mGylYROs.js} +2 -10
- package/dist/{field-errors-DYtg1mwv.d.ts → field-errors-DqlebtTE.d.ts} +12 -12
- package/dist/{framework-h5lP_5yj.d.ts → framework-CF6zFU7a.d.ts} +3 -3
- package/dist/hono/index.d.ts +4 -4
- package/dist/{index-BfkltrGJ.d.ts → index-B8YjrfVl.d.ts} +2 -2
- package/dist/{index-BAHGLvGD.d.ts → index-BCeTYhFk.d.ts} +1 -1
- package/dist/{index-Do2ChN_y.d.ts → index-CQhPHHDF.d.ts} +20 -2
- package/dist/{index-Ab4UeEn_.d.ts → index-ClMN0f98.d.ts} +44 -12
- package/dist/{index-B4gcStOz.d.ts → index-DUxXdQN_.d.ts} +3 -3
- package/dist/{index-BfK6olKm.d.ts → index-Dbb7BQdi.d.ts} +9 -4
- package/dist/{index-DN9mfmhA.d.ts → index-lB-8iPmY.d.ts} +51 -3
- package/dist/index.d.ts +2 -2
- package/dist/{instances-BHjCZoF8.js → instances-QOzIz9-q.js} +1 -1
- package/dist/list/index.d.ts +1 -1
- package/dist/{list-query-BDVutLFr.d.ts → list-query-DxjuIHEL.d.ts} +1 -1
- package/dist/mapper/bin.js +6 -6
- package/dist/mcp/index.d.ts +4 -4
- package/dist/mcp/sdk/index.d.ts +2 -2
- package/dist/next/client/index.d.ts +81 -1
- package/dist/next/client/index.js +178 -2
- package/dist/next/index.d.ts +15 -14
- package/dist/{operations-CSc_IsHO.d.ts → operations-Dc07aV_H.d.ts} +1 -1
- package/dist/{options-DChZoVfs.d.ts → options-B_NrjVDt.d.ts} +1 -0
- package/dist/{options-B2swWnJW.js → options-CCUaRLgd.js} +2 -1
- package/dist/{options-CM6-18FQ.d.ts → options-CDSCkYxu.d.ts} +1 -0
- package/dist/{options-C-dQHH5-.js → options-tSsUF0-7.js} +2 -1
- package/dist/orpc/index.d.ts +4 -4
- package/dist/otel/index.js +4 -4
- package/dist/{ports-DOhtuw3c.js → ports-CaVRXjxq.js} +1 -1
- package/dist/{ports-CpdiQv1D.d.ts → ports-DnpAuTvB.d.ts} +1 -1
- package/dist/powersync/index.d.ts +2 -2
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +3 -3
- package/dist/{preset-CsHnIBJF.js → preset-BIANzB5p.js} +2 -2
- package/dist/{push-token-B3m3pWAv.d.ts → push-token-C_mFkYfq.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/{rate-limit-o44SYkVY.js → rate-limit-Dt9vAY4E.js} +53 -0
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +3 -3
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/native/index.js +1 -1
- package/dist/react/server.d.ts +12 -7
- package/dist/react/server.js +8 -3
- package/dist/react/session.d.ts +5 -0
- package/dist/react/session.js +9 -1
- package/dist/{react-BuDYI62C.js → react-CZUZYn9E.js} +41 -4
- package/dist/react-router/index.d.ts +3 -3
- package/dist/realtime/index.d.ts +5 -5
- package/dist/realtime/index.js +2 -1
- package/dist/{record-form-DB_5Ue_B.d.ts → record-form-xWvVcb86.d.ts} +1 -1
- package/dist/records/index.d.ts +7 -7
- package/dist/relay-gKvKJ3xf.js +208 -0
- package/dist/{resource-execute-CzHuDsil.d.ts → resource-execute-DqWfEc56.d.ts} +1 -1
- package/dist/{resource-types-DnKiH4G2.d.ts → resource-types-BIoz_ElD.d.ts} +1 -1
- package/dist/{resources-B9cQxhjw.d.ts → resources-Bt2PDKE7.d.ts} +1 -1
- package/dist/server/index.d.ts +147 -9
- package/dist/server/index.js +396 -1
- package/dist/{server-types-7QPzW2bF.d.ts → server-types-gR4Q1aM0.d.ts} +5 -354
- package/dist/{session-CfBCJGgc.d.ts → session-C1OuXbtN.d.ts} +2 -1
- package/dist/session-status-qQLm7jzh.d.ts +82 -0
- package/dist/{sign-in-BsIaNx2C.js → sign-in-CmPK1AgM.js} +20 -10
- package/dist/solid/index.d.ts +7 -7
- package/dist/solid/index.js +1 -1
- package/dist/solid-start/index.d.ts +3 -3
- package/dist/spec/index.d.ts +1 -1
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +3 -3
- package/dist/{sql-OLVW4t08.js → sql-ClTmzHs8.js} +199 -31
- package/dist/sqlite/index.d.ts +1 -1
- package/dist/ssr/index.d.ts +1 -1
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +54 -1
- package/dist/support-B4ZBVxt3.d.ts +357 -0
- package/dist/svelte/index.d.ts +7 -7
- package/dist/svelte/index.js +1 -1
- package/dist/sveltekit/index.d.ts +4 -4
- package/dist/{tags-BjHflcHF.d.ts → tags-sM-CH9Mn.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +1 -1
- package/dist/tanstack-start/index.d.ts +3 -3
- package/dist/{tenant-DzFsg0Pc.d.ts → tenant-DVvjw9H-.d.ts} +1 -1
- package/dist/testing/index.d.ts +9 -8
- package/dist/testing/index.js +3 -3
- package/dist/{timeline-WrFMgd3U.d.ts → timeline-BBfKuMVL.d.ts} +3 -3
- package/dist/{topic-DNFEFGKI.d.ts → topic-BtLz-qTI.d.ts} +3 -3
- package/dist/{verify-CMou8dWZ.d.ts → verify-DEqY__0N.d.ts} +1 -1
- package/dist/vue/index.d.ts +7 -7
- package/dist/vue/index.js +1 -1
- package/dist/{watch-topic-Bo9S2R4P.d.ts → watch-topic-tnfOTa3-.d.ts} +1 -1
- package/dist/yjs/index.d.ts +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +22 -0
- package/schemas/doctor-report-v1.json +1 -0
- package/skills/better-supabase-api/SKILL.md +3 -1
- package/skills/better-supabase-auth/SKILL.md +7 -0
- package/dist/cli/add-CUH0rORo.js +0 -1
- package/dist/cli/seed-D6XijwbR.js +0 -1
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
/// <reference lib="esnext.temporal" />
|
|
2
|
+
import { t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
3
|
+
import { o as EventHub } from "./events-vcqenSYU.js";
|
|
4
|
+
import { r as AuthState } from "./resolve-CXX6DHv3.js";
|
|
5
|
+
import { a as ProblemFormat } from "./problem-DNwN8iGz.js";
|
|
6
|
+
import { _ as SupportAuthorize, i as AuthorizationHooks } from "./authorization-hooks-D_pwXlBs.js";
|
|
7
|
+
import { t as BetterPostgres } from "./pool-CrtT4dg-.js";
|
|
8
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
9
|
+
//#region src/auth/support.d.ts
|
|
10
|
+
type SupportEndedBy = "admin" | "expired" | "revoked";
|
|
11
|
+
/** A support session: a platform admin viewing the app as `targetUserId`. */
|
|
12
|
+
interface SupportSession {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly adminId: string;
|
|
15
|
+
readonly targetUserId: string;
|
|
16
|
+
readonly reason: string;
|
|
17
|
+
/** Writes fail while it is true (`begin read only`). */
|
|
18
|
+
readonly readOnly: boolean;
|
|
19
|
+
readonly tenant?: string;
|
|
20
|
+
readonly startedAt: Temporal.Instant;
|
|
21
|
+
readonly expiresAt: Temporal.Instant;
|
|
22
|
+
readonly endedAt?: Temporal.Instant;
|
|
23
|
+
readonly endedBy?: SupportEndedBy;
|
|
24
|
+
/** App data, such as a ticket id. */
|
|
25
|
+
readonly metadata: Readonly<Record<string, unknown>>;
|
|
26
|
+
}
|
|
27
|
+
interface SupportStartInput {
|
|
28
|
+
readonly adminId: string;
|
|
29
|
+
/**
|
|
30
|
+
* The admin's verified claims. The SQL store runs `start_support_session`
|
|
31
|
+
* with them, so `is_platform()` checks the admin in the database too.
|
|
32
|
+
*/
|
|
33
|
+
readonly adminClaims: Readonly<Record<string, unknown>>;
|
|
34
|
+
readonly targetUserId: string;
|
|
35
|
+
readonly reason: string;
|
|
36
|
+
readonly ttlSeconds: number;
|
|
37
|
+
readonly readOnly: boolean;
|
|
38
|
+
readonly tenant?: string;
|
|
39
|
+
readonly metadata: Readonly<Record<string, unknown>>;
|
|
40
|
+
/** The approved request this start uses, when the server found one. */
|
|
41
|
+
readonly requestId?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A request for a support session that waits for a second admin. A start uses
|
|
45
|
+
* an approved request once; `approvedBy` is never `adminId`.
|
|
46
|
+
*/
|
|
47
|
+
interface SupportRequest {
|
|
48
|
+
readonly id: string;
|
|
49
|
+
readonly adminId: string;
|
|
50
|
+
readonly targetUserId: string;
|
|
51
|
+
readonly reason: string;
|
|
52
|
+
readonly readOnly: boolean;
|
|
53
|
+
readonly tenant?: string;
|
|
54
|
+
readonly metadata: Readonly<Record<string, unknown>>;
|
|
55
|
+
readonly requestedAt: Temporal.Instant;
|
|
56
|
+
/** An unapproved or unused request is closed after this. */
|
|
57
|
+
readonly expiresAt: Temporal.Instant;
|
|
58
|
+
readonly approvedBy?: string;
|
|
59
|
+
readonly approvedAt?: Temporal.Instant;
|
|
60
|
+
/** The session the approval started. */
|
|
61
|
+
readonly sessionId?: string;
|
|
62
|
+
}
|
|
63
|
+
interface SupportRequestInput {
|
|
64
|
+
readonly adminId: string;
|
|
65
|
+
/** The admin's verified claims; the SQL store asks as the admin with them. */
|
|
66
|
+
readonly adminClaims: Readonly<Record<string, unknown>>;
|
|
67
|
+
readonly targetUserId: string;
|
|
68
|
+
readonly reason: string;
|
|
69
|
+
readonly readOnly: boolean;
|
|
70
|
+
readonly tenant?: string;
|
|
71
|
+
readonly metadata: Readonly<Record<string, unknown>>;
|
|
72
|
+
/**
|
|
73
|
+
* An approver the server's authorization hook already decided, never the
|
|
74
|
+
* admin. The SQL store then records the request approved, over the admin
|
|
75
|
+
* connection.
|
|
76
|
+
*/
|
|
77
|
+
readonly approvedBy?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Who approves a request: with `claims` the store runs as them and decides
|
|
81
|
+
* eligibility itself.
|
|
82
|
+
*/
|
|
83
|
+
interface SupportApprover {
|
|
84
|
+
readonly id: string;
|
|
85
|
+
readonly claims?: SupportCallerClaims;
|
|
86
|
+
}
|
|
87
|
+
/** What `approvedRequest` looks up. */
|
|
88
|
+
interface SupportApprovalQuery {
|
|
89
|
+
readonly adminId: string;
|
|
90
|
+
readonly targetUserId: string;
|
|
91
|
+
readonly tenant?: string;
|
|
92
|
+
readonly readOnly: boolean;
|
|
93
|
+
}
|
|
94
|
+
/** A caller's verified claims, which the store runs a call with. */
|
|
95
|
+
type SupportCallerClaims = Readonly<Record<string, unknown>>;
|
|
96
|
+
interface SupportListFilter {
|
|
97
|
+
readonly adminId?: string;
|
|
98
|
+
readonly targetUserId?: string;
|
|
99
|
+
/** `true`: running sessions only; `false`: ended or expired ones only. */
|
|
100
|
+
readonly active?: boolean;
|
|
101
|
+
/** Defaults to 50. */
|
|
102
|
+
readonly limit?: number;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Where support sessions live. `sqlSupportStore` uses the `impersonation` SQL
|
|
106
|
+
* module; implement this for another store and check it with
|
|
107
|
+
* `testSupportSessionStore` from `better-supabase/testing`.
|
|
108
|
+
*/
|
|
109
|
+
interface SupportSessionStore {
|
|
110
|
+
readonly apiVersion: 1;
|
|
111
|
+
readonly name: string;
|
|
112
|
+
/**
|
|
113
|
+
* Starts a session and ends the admin's previous one. Rejects when the store
|
|
114
|
+
* refuses.
|
|
115
|
+
*/
|
|
116
|
+
start(input: SupportStartInput): Promise<SupportSession>;
|
|
117
|
+
/**
|
|
118
|
+
* The admin's session while it is running; `undefined` once ended or expired.
|
|
119
|
+
* With the admin's `claims`, the store also checks that the admin may still
|
|
120
|
+
* start sessions.
|
|
121
|
+
*/
|
|
122
|
+
get(sessionId: string, adminId: string, claims?: SupportCallerClaims): Promise<SupportSession | undefined>;
|
|
123
|
+
/**
|
|
124
|
+
* `false` when it was not running. With `claims`, it runs as that caller: the
|
|
125
|
+
* session's admin, or staff with the revoke permission.
|
|
126
|
+
*/
|
|
127
|
+
end(sessionId: string, endedBy: SupportEndedBy, claims?: SupportCallerClaims): Promise<boolean>;
|
|
128
|
+
/** With `claims`, only what that caller may view. */
|
|
129
|
+
list(filter?: SupportListFilter, claims?: SupportCallerClaims): Promise<readonly SupportSession[]>;
|
|
130
|
+
/** The claims `targetUserId` would get, when the store can build them. */
|
|
131
|
+
claims?(targetUserId: string): Promise<Readonly<Record<string, unknown>>>;
|
|
132
|
+
/**
|
|
133
|
+
* Ends every running session past its expiry with `endedBy: "expired"` and
|
|
134
|
+
* returns them. Optional; `support.expire()` fails without it.
|
|
135
|
+
*/
|
|
136
|
+
expire?(): Promise<readonly SupportSession[]>;
|
|
137
|
+
/**
|
|
138
|
+
* The store with `namespace` for its time values, unless it was given one
|
|
139
|
+
* itself. Optional; `createServer` calls it with the definition's
|
|
140
|
+
* `temporal`.
|
|
141
|
+
*/
|
|
142
|
+
withTemporal?(namespace: typeof Temporal): SupportSessionStore;
|
|
143
|
+
/**
|
|
144
|
+
* Records a request for a session that waits for a second admin. Optional;
|
|
145
|
+
* without it and the two methods below, starts that need an approval are
|
|
146
|
+
* refused.
|
|
147
|
+
*/
|
|
148
|
+
request?(input: SupportRequestInput): Promise<SupportRequest>;
|
|
149
|
+
/** A request by id, or `undefined`. */
|
|
150
|
+
getRequest?(requestId: string): Promise<SupportRequest | undefined>;
|
|
151
|
+
/** Approves a request. Rejects when the approver is the requester. */
|
|
152
|
+
approve?(requestId: string, approver: SupportApprover): Promise<SupportRequest>;
|
|
153
|
+
/** The approved, unused, unexpired request a start would use, or `undefined`. */
|
|
154
|
+
approvedRequest?(query: SupportApprovalQuery): Promise<SupportRequest | undefined>;
|
|
155
|
+
}
|
|
156
|
+
interface SqlSupportStoreOptions {
|
|
157
|
+
/** `blocks.impersonation.schema`. Defaults to `better_supabase`. */
|
|
158
|
+
readonly schema?: string;
|
|
159
|
+
/**
|
|
160
|
+
* The Temporal namespace for the sessions' time values, for runtimes without
|
|
161
|
+
* a global one. Defaults to the one `createServer` passes from the
|
|
162
|
+
* definition, then the provided or global Temporal.
|
|
163
|
+
*/
|
|
164
|
+
readonly temporal?: typeof Temporal;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Support sessions in the `impersonation` SQL module. `start` runs as the
|
|
168
|
+
* admin, so the module's `is_platform()` gate applies; the reads run on the
|
|
169
|
+
* admin connection.
|
|
170
|
+
*/
|
|
171
|
+
declare function sqlSupportStore(postgres: Pick<BetterPostgres, "admin" | "asUser">, options?: SqlSupportStoreOptions): SupportSessionStore;
|
|
172
|
+
/**
|
|
173
|
+
* The claims a support session runs with: the target's, plus `act` naming the
|
|
174
|
+
* admin, the reason and the session (the audit module records all three),
|
|
175
|
+
* marked `kind: "support"` so `actorOf` never reads it as an OAuth client.
|
|
176
|
+
* `role` falls back to `authenticated`; the admin's claims never leak in.
|
|
177
|
+
*/
|
|
178
|
+
declare function supportClaims(session: Pick<SupportSession, "id" | "adminId" | "targetUserId" | "reason" | "readOnly">, target: Readonly<Record<string, unknown>>): Record<string, unknown>;
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/auth/support-cookie.d.ts
|
|
181
|
+
/** The cookie that carries the support session id. */
|
|
182
|
+
declare const SUPPORT_COOKIE = "bsb-support";
|
|
183
|
+
interface SupportCookieOptions {
|
|
184
|
+
/** Defaults to `bsb-support`. */
|
|
185
|
+
readonly name?: string;
|
|
186
|
+
/** Defaults to `/`. */
|
|
187
|
+
readonly path?: string;
|
|
188
|
+
/** Defaults to true; set false for plain-HTTP local development. */
|
|
189
|
+
readonly secure?: boolean;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* `Set-Cookie` for a session: HttpOnly, SameSite=Lax, gone when the session
|
|
193
|
+
* expires.
|
|
194
|
+
*/
|
|
195
|
+
declare function supportCookie(session: Pick<SupportSession, "id" | "expiresAt">, options?: SupportCookieOptions, now?: number): string;
|
|
196
|
+
/** `Set-Cookie` that removes the support cookie. */
|
|
197
|
+
declare function clearSupportCookie(options?: SupportCookieOptions): string;
|
|
198
|
+
/** The support session id in a `Cookie` header, or `undefined`. */
|
|
199
|
+
declare function supportCookieValue(cookieHeader: string | null, name?: string): string | undefined;
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/server/support.d.ts
|
|
202
|
+
interface SupportPolicy {
|
|
203
|
+
/** Seconds a session lasts. Defaults to 1800 (30 minutes). */
|
|
204
|
+
readonly ttl?: number;
|
|
205
|
+
/** The longest `ttl` a start may ask for. Defaults to 14400 (4 hours). */
|
|
206
|
+
readonly maxTtl?: number;
|
|
207
|
+
/** Defaults to true. */
|
|
208
|
+
readonly requireReason?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* `always` (the default): every session is read-only. `default`: read-only
|
|
211
|
+
* unless the start passes `readOnly: false`.
|
|
212
|
+
*/
|
|
213
|
+
readonly readOnly?: "always" | "default";
|
|
214
|
+
/**
|
|
215
|
+
* `distinct` (the default): a start needs a request that another admin
|
|
216
|
+
* approved (`support.request`, then `support.approve`), or an `authorize`
|
|
217
|
+
* decision of `{ approvedBy }` naming someone else. `none`: no second admin.
|
|
218
|
+
* Set `blocks.impersonation.options.approval` to the same value, because the
|
|
219
|
+
* SQL store checks it again.
|
|
220
|
+
*/
|
|
221
|
+
readonly approval?: "distinct" | "none";
|
|
222
|
+
}
|
|
223
|
+
interface SupportOptions {
|
|
224
|
+
readonly store: SupportSessionStore;
|
|
225
|
+
/**
|
|
226
|
+
* Whether `admin` may view the app as the target. Without it, the
|
|
227
|
+
* authorization hooks' `support.authorize` decides, and without those every
|
|
228
|
+
* start is refused (`SUPPORT_FORBIDDEN`). A throw or rejection counts as a
|
|
229
|
+
* deny. `true` still needs a second admin under `policy.approval:
|
|
230
|
+
* 'distinct'`; `{ approvedBy }` names that admin.
|
|
231
|
+
*
|
|
232
|
+
* `'store'` hands the decision to the store alone: the SQL store checks
|
|
233
|
+
* `is_platform(blocks['impersonation'].permissions.start)` and nothing else,
|
|
234
|
+
* so use it only when that permission is the whole rule.
|
|
235
|
+
*/
|
|
236
|
+
readonly authorize?: SupportAuthorize | "store";
|
|
237
|
+
/**
|
|
238
|
+
* The claims the target gets. Defaults to `store.claims` (the SQL store runs
|
|
239
|
+
* your custom access token hook), then `{ role: 'authenticated' }`.
|
|
240
|
+
*/
|
|
241
|
+
readonly claims?: (targetUserId: string) => Readonly<Record<string, unknown>> | Promise<Readonly<Record<string, unknown>>>;
|
|
242
|
+
readonly policy?: SupportPolicy;
|
|
243
|
+
readonly cookie?: SupportCookieOptions;
|
|
244
|
+
/**
|
|
245
|
+
* Where a request names its support session, for apps that keep it in a
|
|
246
|
+
* header or their own request store instead of the `bsb-support` cookie.
|
|
247
|
+
* Defaults to reading the cookie.
|
|
248
|
+
*/
|
|
249
|
+
readonly sessionId?: (request: Request) => string | undefined;
|
|
250
|
+
}
|
|
251
|
+
interface SupportStartRequest {
|
|
252
|
+
readonly targetUserId: string;
|
|
253
|
+
readonly reason?: string;
|
|
254
|
+
/** Seconds; defaults to `policy.ttl`. */
|
|
255
|
+
readonly ttl?: number;
|
|
256
|
+
/** Honoured only with `policy.readOnly: 'default'`. */
|
|
257
|
+
readonly readOnly?: boolean;
|
|
258
|
+
readonly tenant?: string;
|
|
259
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
260
|
+
}
|
|
261
|
+
/** Options for `support.expireRoute`. */
|
|
262
|
+
interface SupportExpireRouteOptions {
|
|
263
|
+
/** The bearer token the cron caller sends, such as `process.env.CRON_SECRET`. */
|
|
264
|
+
readonly secret: string | undefined;
|
|
265
|
+
/** Rewrites the Problem Details bodies of the route's errors. */
|
|
266
|
+
readonly problem?: ProblemFormat;
|
|
267
|
+
}
|
|
268
|
+
/** A running support session, as the request that carries its cookie sees it. */
|
|
269
|
+
interface ActiveSupport {
|
|
270
|
+
readonly session: SupportSession;
|
|
271
|
+
/** The admin behind the session, from their own verified token. */
|
|
272
|
+
readonly admin: {
|
|
273
|
+
readonly id: string;
|
|
274
|
+
readonly email?: string;
|
|
275
|
+
};
|
|
276
|
+
/** The target's claims plus `act`, which repositories run with. */
|
|
277
|
+
readonly claims: Readonly<Record<string, unknown>>;
|
|
278
|
+
}
|
|
279
|
+
/** `bsb.support`: start, stop and inspect support sessions. */
|
|
280
|
+
interface SupportApi {
|
|
281
|
+
/**
|
|
282
|
+
* Starts a session for a signed-in admin and returns it with the `Set-Cookie`
|
|
283
|
+
* value that switches the admin's next requests to the target.
|
|
284
|
+
*/
|
|
285
|
+
start(admin: AuthState, request: SupportStartRequest): AsyncResult<{
|
|
286
|
+
readonly session: SupportSession;
|
|
287
|
+
readonly cookie: string;
|
|
288
|
+
}>;
|
|
289
|
+
/**
|
|
290
|
+
* Asks for a session that a second admin approves with `approve`; the policy
|
|
291
|
+
* checks of `start` apply. `ttl` is not stored: `start` passes it.
|
|
292
|
+
*/
|
|
293
|
+
request(admin: AuthState, request: SupportStartRequest): AsyncResult<SupportRequest>;
|
|
294
|
+
/**
|
|
295
|
+
* Approves a request as `approver`, who is never the admin who asked. With
|
|
296
|
+
* the hooks' `approverOf`, it decides who may approve; otherwise the store
|
|
297
|
+
* does (the SQL store: the provider's `isApprover`, else the start
|
|
298
|
+
* permission).
|
|
299
|
+
*/
|
|
300
|
+
approve(approver: AuthState, requestId: string): AsyncResult<SupportRequest>;
|
|
301
|
+
/**
|
|
302
|
+
* Ends the admin's own session and returns the `Set-Cookie` that clears the
|
|
303
|
+
* cookie.
|
|
304
|
+
*/
|
|
305
|
+
stop(admin: AuthState, sessionId: string): AsyncResult<{
|
|
306
|
+
readonly ended: boolean;
|
|
307
|
+
readonly cookie: string;
|
|
308
|
+
}>;
|
|
309
|
+
/**
|
|
310
|
+
* Ends a session as `caller`: the SQL store allows the session's admin and
|
|
311
|
+
* staff with the revoke permission.
|
|
312
|
+
*/
|
|
313
|
+
revoke(caller: AuthState, sessionId: string): AsyncResult<boolean>;
|
|
314
|
+
/** The running session the request names (`sessionIdOf`) for `auth`, if any. */
|
|
315
|
+
current(request: Request, auth: AuthState): Promise<ActiveSupport | undefined>;
|
|
316
|
+
/**
|
|
317
|
+
* The running session `sessionId` for the admin in `auth`, if any. Use it
|
|
318
|
+
* when the app keeps the session id in its own request context; pass the
|
|
319
|
+
* result to `contextFor(auth, { support })` or `dbFor(auth, context, {
|
|
320
|
+
* support })`.
|
|
321
|
+
*/
|
|
322
|
+
resolve(sessionId: string, auth: AuthState): Promise<ActiveSupport | undefined>;
|
|
323
|
+
/** The sessions `caller` may view (the SQL store checks the view permission). */
|
|
324
|
+
list(caller: AuthState, filter?: SupportListFilter): AsyncResult<readonly SupportSession[]>;
|
|
325
|
+
/**
|
|
326
|
+
* Ends every session past its expiry through the store and emits
|
|
327
|
+
* `support.ended` with `endedBy: "expired"` for each; the SQL store runs over
|
|
328
|
+
* `postgres.admin`. Returns the sessions it ended.
|
|
329
|
+
*/
|
|
330
|
+
expire(): AsyncResult<readonly SupportSession[]>;
|
|
331
|
+
/**
|
|
332
|
+
* A `GET` or `POST` handler for a cron caller that runs `expire()` and
|
|
333
|
+
* answers `{ expired }`, the number of sessions it ended.
|
|
334
|
+
*/
|
|
335
|
+
expireRoute(options: SupportExpireRouteOptions): (request: Request) => Promise<Response>;
|
|
336
|
+
/** The support session id a request names: `options.sessionId`, or the cookie. */
|
|
337
|
+
sessionIdOf(request: Request): string | undefined;
|
|
338
|
+
/** `Set-Cookie` that clears the support cookie. */
|
|
339
|
+
clearCookie(): string;
|
|
340
|
+
}
|
|
341
|
+
/** `ServerOptions.support`, from `supportSessions(options)`. */
|
|
342
|
+
interface SupportSessions {
|
|
343
|
+
readonly options: SupportOptions;
|
|
344
|
+
/**
|
|
345
|
+
* Builds `bsb.support`; `createServer` calls it once, with the definition's
|
|
346
|
+
* `temporal`, which goes on to the store's `withTemporal`, and the server's
|
|
347
|
+
* authorization hooks.
|
|
348
|
+
*/
|
|
349
|
+
readonly create: (events: EventHub, claimsSchema: StandardSchemaV1 | undefined, temporal?: typeof Temporal, authorization?: AuthorizationHooks) => SupportApi;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Support sessions for `createServer(betterSupabase, { support })`. Apps that
|
|
353
|
+
* never import it don't bundle the support code.
|
|
354
|
+
*/
|
|
355
|
+
declare function supportSessions(options: SupportOptions): SupportSessions;
|
|
356
|
+
//#endregion
|
|
357
|
+
export { SupportSessionStore as C, supportClaims as E, SupportSession as S, sqlSupportStore as T, SupportCallerClaims as _, SupportPolicy as a, SupportRequest as b, supportSessions as c, clearSupportCookie as d, supportCookie as f, SupportApprover as g, SupportApprovalQuery as h, SupportOptions as i, SUPPORT_COOKIE as l, SqlSupportStoreOptions as m, SupportApi as n, SupportSessions as o, supportCookieValue as p, SupportExpireRouteOptions as r, SupportStartRequest as s, ActiveSupport as t, SupportCookieOptions as u, SupportEndedBy as v, SupportStartInput as w, SupportRequestInput as x, SupportListFilter as y };
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { b as DbError } from "../result-DZeA5KS6.js";
|
|
2
2
|
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-vcqenSYU.js";
|
|
3
|
-
import { pt as QuerySpec } from "../define-
|
|
4
|
-
import {
|
|
5
|
-
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-
|
|
6
|
-
import { t as AuthSnapshot } from "../bind-
|
|
3
|
+
import { pt as QuerySpec } from "../define-Cgru0_kF.js";
|
|
4
|
+
import { tt as TemplateValues } from "../bucket-vc-QRrva.js";
|
|
5
|
+
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-BtLz-qTI.js";
|
|
6
|
+
import { t as AuthSnapshot } from "../bind-C801IaK-.js";
|
|
7
7
|
import { t as AuthSession } from "../view-DyFdMCqg.js";
|
|
8
|
-
import { n as Controller } from "../controller-
|
|
9
|
-
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-
|
|
10
|
-
import { n as BlockOptions } from "../block-env-
|
|
8
|
+
import { n as Controller } from "../controller-CJUXhshv.js";
|
|
9
|
+
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DqlebtTE.js";
|
|
10
|
+
import { n as BlockOptions } from "../block-env-BeG4DiiO.js";
|
|
11
11
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-CiVa2G-J.js";
|
|
12
12
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
13
13
|
import { QueryClient } from "@tanstack/query-core";
|
package/dist/svelte/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as clearOnUserChange } from "../user-change-DgWC6RRC.js";
|
|
2
|
-
import { a as createActionRunner, c as liveKey, d as shownCount, f as startBroadcast, i as countSource, l as notJoined, m as startLiveQuery, n as assertInvalidateClient, o as joinPresence, p as startLiveCount, r as callerOf, s as keyed, t as NO_COUNT, u as plainCaller } from "../client-
|
|
2
|
+
import { a as createActionRunner, c as liveKey, d as shownCount, f as startBroadcast, i as countSource, l as notJoined, m as startLiveQuery, n as assertInvalidateClient, o as joinPresence, p as startLiveCount, r as callerOf, s as keyed, t as NO_COUNT, u as plainCaller } from "../client-C_mlji5R.js";
|
|
3
3
|
import { c as listenToBlockEvents, d as fieldErrorsOf, i as dataTarget, l as blockEnv, n as createDataOne, o as createBlockMutation, s as createBlockQuery, t as createDataList, u as withEnv } from "../data-hooks-tgF1Ct0F.js";
|
|
4
4
|
import { getContext, onDestroy, onMount, setContext } from "svelte";
|
|
5
5
|
import { createSubscriber } from "svelte/reactivity";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
|
|
2
2
|
import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
|
|
3
|
-
import { t as BetterSupabase } from "../define-
|
|
4
|
-
import { n as BetterServer } from "../server-types-
|
|
3
|
+
import { t as BetterSupabase } from "../define-Cgru0_kF.js";
|
|
4
|
+
import { n as BetterServer } from "../server-types-gR4Q1aM0.js";
|
|
5
5
|
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-DOwKpSkA.js";
|
|
6
6
|
import { t as RefusalRedirects } from "../refusal-CSntB_x8.js";
|
|
7
|
-
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-
|
|
7
|
+
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-CF6zFU7a.js";
|
|
8
8
|
import { t as Validated } from "../shared-CRRfQAKG.js";
|
|
9
|
-
import { i as tagFor } from "../tags-
|
|
9
|
+
import { i as tagFor } from "../tags-sM-CH9Mn.js";
|
|
10
10
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
11
11
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
12
12
|
//#region src/bridges/sveltekit.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Qt as CacheTarget, Zt as CacheAdapter } from "./define-
|
|
1
|
+
import { Qt as CacheTarget, Zt as CacheAdapter } from "./define-Cgru0_kF.js";
|
|
2
2
|
//#region src/core/tags.d.ts
|
|
3
3
|
interface TagOptions {
|
|
4
4
|
/** The tenant the read is scoped to; `"*"` is every tenant's reads. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as AnyFunctions, k as AnyModels, ut as TableKey } from "../types-DFdg_4yN.js";
|
|
2
|
-
import { t as BetterSupabase, v as Db } from "../define-
|
|
2
|
+
import { t as BetterSupabase, v as Db } from "../define-Cgru0_kF.js";
|
|
3
3
|
import { n as DataEngine } from "../data-engine-BWoz9lED.js";
|
|
4
4
|
import { t as BetterQueryMeta } from "../invalidate-DMp4eqfF.js";
|
|
5
5
|
import { QueryClient, SkipToken } from "@tanstack/query-core";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { O as AnyFunctions, k as AnyModels } from "../types-DFdg_4yN.js";
|
|
2
2
|
import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
|
|
3
|
-
import { t as BetterSupabase } from "../define-
|
|
4
|
-
import { n as BetterServer } from "../server-types-
|
|
3
|
+
import { t as BetterSupabase } from "../define-Cgru0_kF.js";
|
|
4
|
+
import { n as BetterServer } from "../server-types-gR4Q1aM0.js";
|
|
5
5
|
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-DOwKpSkA.js";
|
|
6
6
|
import { t as RefusalRedirects } from "../refusal-CSntB_x8.js";
|
|
7
|
-
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-
|
|
7
|
+
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-CF6zFU7a.js";
|
|
8
8
|
import { t as Validated } from "../shared-CRRfQAKG.js";
|
|
9
9
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
10
10
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -9,23 +9,24 @@ import { a as BlockTransportMiddleware } from "../block-hooks-DZN2w69m.js";
|
|
|
9
9
|
import { a as SessionActor, o as SessionDelegation } from "../actor-CoveJgya.js";
|
|
10
10
|
import { P as QueueProvider } from "../types-Czq9Xtpa.js";
|
|
11
11
|
import { n as Embedder } from "../knowledge-F1IhRI4Q.js";
|
|
12
|
-
import { a as AuthorizationProvider } from "../authorization-
|
|
12
|
+
import { a as AuthorizationProvider } from "../authorization-CNsvnwle.js";
|
|
13
13
|
import { o as StreamStore } from "../store-CpheI-lN.js";
|
|
14
14
|
import { o as Authorizer } from "../authorizer-B6X09otb.js";
|
|
15
|
-
import { J as DbStats, Zt as CacheAdapter, t as BetterSupabase, v as Db } from "../define-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
15
|
+
import { J as DbStats, Zt as CacheAdapter, t as BetterSupabase, v as Db } from "../define-Cgru0_kF.js";
|
|
16
|
+
import { Q as StoragePath } from "../bucket-vc-QRrva.js";
|
|
17
|
+
import { a as ServerContext, c as ServerOptions } from "../server-types-gR4Q1aM0.js";
|
|
18
18
|
import { n as Impersonator } from "../impersonation-YTa9dZUv.js";
|
|
19
|
-
import { tn as AnyRecordBinding } from "../define-block-
|
|
19
|
+
import { tn as AnyRecordBinding } from "../define-block-Xxw8Hroe.js";
|
|
20
20
|
import { n as Money } from "../money-BNRdJQzA.js";
|
|
21
21
|
import { i as EventSink, t as CloudEvent } from "../cloud-event-CzZTJkXv.js";
|
|
22
22
|
import { i as AuthorizationHooks } from "../authorization-hooks-D_pwXlBs.js";
|
|
23
23
|
import { s as SqlClaims, t as BetterPostgres } from "../pool-CrtT4dg-.js";
|
|
24
|
+
import { C as SupportSessionStore } from "../support-B4ZBVxt3.js";
|
|
24
25
|
import { r as GuardOptions } from "../respond-Dn1_YhC1.js";
|
|
25
26
|
import { l as Transcriber, s as NoteTaker, u as TranscriberInput } from "../recordings-BBSJt_YV.js";
|
|
26
|
-
import { n as Controller } from "../controller-
|
|
27
|
-
import { c as AiTaskRunner, o as AiTaskRun, r as AiTask } from "../ai-schedules-
|
|
28
|
-
import { Ht as GeneratorModel, Qt as ResolvedConfig, jt as Generator, zt as GeneratorInput } from "../context-
|
|
27
|
+
import { n as Controller } from "../controller-CJUXhshv.js";
|
|
28
|
+
import { c as AiTaskRunner, o as AiTaskRun, r as AiTask } from "../ai-schedules-Dk9H3kAp.js";
|
|
29
|
+
import { Ht as GeneratorModel, Qt as ResolvedConfig, jt as Generator, zt as GeneratorInput } from "../context-CKCgjEDF.js";
|
|
29
30
|
import { r as WebhookInput } from "../signatures-Dkx9OE8j.js";
|
|
30
31
|
import { n as Payment, o as PaymentProvider } from "../payments-BYcN34Fp.js";
|
|
31
32
|
import { t as NotificationChannel } from "../channel-BjvGO39m.js";
|
package/dist/testing/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { t as temporal } from "../temporal-required-Dy0GGD8E.js";
|
|
|
6
6
|
import { a as ok } from "../result-ntFBW2p2.js";
|
|
7
7
|
import { t as BetterSupabase } from "../define-DlUeKHce.js";
|
|
8
8
|
import { a as toBase64Url, r as fromBase64, t as base64ToText } from "../base64-B9Wlsdj7.js";
|
|
9
|
-
import { c as resolveConfig } from "../config-
|
|
9
|
+
import { c as resolveConfig } from "../config-BVNNJwGC.js";
|
|
10
10
|
import { a as isScopeName, c as templateFunctions, l as templatePlaceholders, n as TEMPLATE_PLACEHOLDERS, s as scopeProblems, u as templateProblems } from "../access-sql-B-MkVARa.js";
|
|
11
11
|
import { r as TRACKING_STATUSES, t as LABEL_FORMATS } from "../statuses-zRcc2TeZ.js";
|
|
12
12
|
import { i as seedLite, n as loadLite, r as migrateLite, t as LITE_INSTALL } from "../runtime-CoKxZibd.js";
|
|
@@ -27,8 +27,8 @@ import { c as isMoney, d as money, l as isRate } from "../money-BZl985O-.js";
|
|
|
27
27
|
import { t as SHIPPING_LINE } from "../tax-BkCNWWMc.js";
|
|
28
28
|
import { t as trashExtension } from "../extension-DzCc0IOd.js";
|
|
29
29
|
import { t as membershipsExtension } from "../extension-DeAd_MqI.js";
|
|
30
|
-
import { t as createdByExtension } from "../extension-
|
|
31
|
-
import { t as updatedAtExtension } from "../extension-
|
|
30
|
+
import { t as createdByExtension } from "../extension-DTaHjwdc.js";
|
|
31
|
+
import { t as updatedAtExtension } from "../extension-mGylYROs.js";
|
|
32
32
|
import { t as buildApiModel } from "../build-QitPVzzO.js";
|
|
33
33
|
import { createClient } from "@supabase/supabase-js";
|
|
34
34
|
import { existsSync } from "node:fs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { D as ValidationIssue, t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
2
2
|
import { $ as RecordRef } from "./types-DFdg_4yN.js";
|
|
3
3
|
import { o as FilterField } from "./filter-query-BXLs72G9.js";
|
|
4
|
-
import { cn as RecordBindingResult, hn as TimelineItem, in as RecordBindingData } from "./define-block-
|
|
5
|
-
import { A as BindingBlocks, F as LoadBindingsOptions, M as BindingName, N as BindingOf, P as BindingSource, V as PermissionSet, _ as RecordTypeBlocks, g as RecordType, h as RecordCan } from "./index-
|
|
6
|
-
import { c as ListParseOptions, m as ListSearchParams } from "./list-query-
|
|
4
|
+
import { cn as RecordBindingResult, hn as TimelineItem, in as RecordBindingData } from "./define-block-Xxw8Hroe.js";
|
|
5
|
+
import { A as BindingBlocks, F as LoadBindingsOptions, M as BindingName, N as BindingOf, P as BindingSource, V as PermissionSet, _ as RecordTypeBlocks, g as RecordType, h as RecordCan } from "./index-B8YjrfVl.js";
|
|
6
|
+
import { c as ListParseOptions, m as ListSearchParams } from "./list-query-DxjuIHEL.js";
|
|
7
7
|
//#region src/records/list.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* How a binding fills a list column: `count` is how many rows it has (the
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { D as ValidationIssue, b as DbError, t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
2
2
|
import { D as AccessTopicPolicy, O as AnyFunctions, it as Row, k as AnyModels, ut as TableKey } from "./types-DFdg_4yN.js";
|
|
3
|
-
import { t as AuthorizationFunctions } from "./authorization-
|
|
4
|
-
import { t as BetterSupabase } from "./define-
|
|
5
|
-
import {
|
|
3
|
+
import { t as AuthorizationFunctions } from "./authorization-CNsvnwle.js";
|
|
4
|
+
import { t as BetterSupabase } from "./define-Cgru0_kF.js";
|
|
5
|
+
import { et as TemplateParams, tt as TemplateValues } from "./bucket-vc-QRrva.js";
|
|
6
6
|
import { g as SubscriberPolicy, h as SubscriberEvent, i as AuthorizationHooks, m as Subscriber } from "./authorization-hooks-D_pwXlBs.js";
|
|
7
7
|
import { t as RealtimeStatus } from "./realtime-status-BhNkb-Ow.js";
|
|
8
8
|
import { RealtimeChannel, SupabaseClient } from "@supabase/supabase-js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { f as Result } from "./result-DZeA5KS6.js";
|
|
3
3
|
import { O as AnyFunctions, it as Row, k as AnyModels, ut as TableKey } from "./types-DFdg_4yN.js";
|
|
4
|
-
import { t as BetterSupabase } from "./define-
|
|
4
|
+
import { t as BetterSupabase } from "./define-Cgru0_kF.js";
|
|
5
5
|
import { n as VerifyOptions, r as WebhookInput, t as VerifiedWebhook } from "./signatures-Dkx9OE8j.js";
|
|
6
6
|
//#region src/blocks/webhooks/verify.d.ts
|
|
7
7
|
/** The `Stripe-Signature` header for `body`, for tests and local replays. */
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { b as DbError } from "../result-DZeA5KS6.js";
|
|
2
2
|
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-vcqenSYU.js";
|
|
3
|
-
import { pt as QuerySpec } from "../define-
|
|
4
|
-
import {
|
|
5
|
-
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-
|
|
6
|
-
import { t as AuthSnapshot } from "../bind-
|
|
3
|
+
import { pt as QuerySpec } from "../define-Cgru0_kF.js";
|
|
4
|
+
import { tt as TemplateValues } from "../bucket-vc-QRrva.js";
|
|
5
|
+
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-BtLz-qTI.js";
|
|
6
|
+
import { t as AuthSnapshot } from "../bind-C801IaK-.js";
|
|
7
7
|
import { t as AuthSession } from "../view-DyFdMCqg.js";
|
|
8
|
-
import { n as Controller } from "../controller-
|
|
9
|
-
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-
|
|
10
|
-
import { n as BlockOptions } from "../block-env-
|
|
8
|
+
import { n as Controller } from "../controller-CJUXhshv.js";
|
|
9
|
+
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DqlebtTE.js";
|
|
10
|
+
import { n as BlockOptions } from "../block-env-BeG4DiiO.js";
|
|
11
11
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-CiVa2G-J.js";
|
|
12
12
|
import { t as SupportView } from "../support-view-BYOgwXsJ.js";
|
|
13
13
|
import { SupabaseClient } from "@supabase/supabase-js";
|
package/dist/vue/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as clearOnUserChange } from "../user-change-DgWC6RRC.js";
|
|
2
|
-
import { a as createActionRunner, c as liveKey, d as shownCount, f as startBroadcast, i as countSource, l as notJoined, m as startLiveQuery, n as assertInvalidateClient, o as joinPresence, p as startLiveCount, r as callerOf, s as keyed, t as NO_COUNT, u as plainCaller } from "../client-
|
|
2
|
+
import { a as createActionRunner, c as liveKey, d as shownCount, f as startBroadcast, i as countSource, l as notJoined, m as startLiveQuery, n as assertInvalidateClient, o as joinPresence, p as startLiveCount, r as callerOf, s as keyed, t as NO_COUNT, u as plainCaller } from "../client-C_mlji5R.js";
|
|
3
3
|
import { t as supportOf } from "../support-view-g4YLBeqX.js";
|
|
4
4
|
import { c as listenToBlockEvents, d as fieldErrorsOf, i as dataTarget, l as blockEnv, n as createDataOne, o as createBlockMutation, s as createBlockQuery, t as createDataList, u as withEnv } from "../data-hooks-tgF1Ct0F.js";
|
|
5
5
|
import { computed, getCurrentInstance, getCurrentScope, inject, onMounted, onScopeDispose, provide, readonly, shallowRef, toValue, watch } from "vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as RealtimeClient, p as SubscriptionStatus } from "./topic-
|
|
1
|
+
import { c as RealtimeClient, p as SubscriptionStatus } from "./topic-BtLz-qTI.js";
|
|
2
2
|
//#region src/realtime/watch-topic.d.ts
|
|
3
3
|
interface TopicWatch {
|
|
4
4
|
readonly onMessage: (event: string, payload: unknown) => void;
|
package/dist/yjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as AsyncResult } from "../result-DZeA5KS6.js";
|
|
2
|
-
import { c as RealtimeClient, r as PresenceMember } from "../topic-
|
|
2
|
+
import { c as RealtimeClient, r as PresenceMember } from "../topic-BtLz-qTI.js";
|
|
3
3
|
import { a as DocumentSuggestion, d as OpenedDocument, l as Documents, r as DocumentRef, t as DecidedSuggestion } from "../documents-Cup1rpjF.js";
|
|
4
4
|
//#region src/yjs/yjs.d.ts
|
|
5
5
|
type PresenceState = Readonly<Record<string, unknown>>;
|
package/package.json
CHANGED