better-supabase 0.35.0 → 0.36.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/{adapter-CWzyKepA.js → adapter-ddQ9Hzka.js} +126 -91
- package/dist/{agents-DXiOPB3V.d.ts → agents-BwUHtvD6.d.ts} +4 -4
- package/dist/{ai-cache-CLiAXCPH.d.ts → ai-cache-CPOP2PYz.d.ts} +4 -4
- package/dist/{ai-chat-DlcBdOhJ.d.ts → ai-chat-BZhfCHHr.d.ts} +106 -25
- package/dist/{ai-schedules-Drx2KRTn.d.ts → ai-schedules-BZPmySUa.d.ts} +5 -5
- package/dist/ai-sdk/agents/index.d.ts +6 -6
- package/dist/ai-sdk/batches/index.d.ts +3 -3
- package/dist/ai-sdk/cache/index.d.ts +1 -1
- package/dist/ai-sdk/chat/index.d.ts +2 -2
- package/dist/ai-sdk/chat/index.js +3 -272
- package/dist/ai-sdk/embeddings/index.d.ts +2 -2
- package/dist/ai-sdk/files/index.d.ts +1 -1
- package/dist/ai-sdk/index.d.ts +5 -5
- package/dist/ai-sdk/index.js +2 -3
- package/dist/ai-sdk/mcp/index.d.ts +3 -3
- package/dist/ai-sdk/memory/index.d.ts +3 -3
- package/dist/ai-sdk/workflow/index.d.ts +6 -5
- package/dist/ai-sdk/workflow/index.js +9 -9
- package/dist/{api-myq2e9t5.d.ts → api-XEaCJbgv.d.ts} +5 -5
- package/dist/{api-keys-DbIbkGxx.d.ts → api-keys-C82fMru4.d.ts} +4 -4
- package/dist/{app-tables-X3yzJljM.d.ts → app-tables-C0XVpQEJ.d.ts} +1 -1
- package/dist/{approvals-Da4uAANx.js → approvals-D8gR1R8R.js} +95 -11
- package/dist/{approvals-DZoGtNFv.d.ts → approvals-DqCv7f-G.d.ts} +101 -7
- package/dist/{assistant-BEbRPjhn.d.ts → assistant-5heV2GeR.d.ts} +7 -3
- package/dist/assistant-BHZ6fqBR.js +300 -0
- package/dist/astro/index.d.ts +7 -7
- package/dist/astro/index.js +5 -5
- package/dist/{auth-module-CqXdm8qD.js → auth-module-DkqapRZJ.js} +1 -1
- package/dist/{authorization-D1P3VBOd.d.ts → authorization-2Rv1AJQJ.d.ts} +114 -39
- package/dist/{authorization-hooks-CxwsRnfV.d.ts → authorization-hooks-C0GfMvFm.d.ts} +8 -2
- package/dist/authz-topic-D7fPUY4P.js +13 -0
- package/dist/{availability-CebEOfMN.d.ts → availability-CZlcrkqD.d.ts} +49 -8
- package/dist/{base64-CVyKHBBw.js → base64-CEBz6-Jj.js} +9 -2
- package/dist/better-result/index.d.ts +3 -3
- package/dist/{bind-Bvv-Zrdh.d.ts → bind-C2XvMlfg.d.ts} +7 -7
- package/dist/{block-env-h_uPl2f_.d.ts → block-env-BQrtLPyc.d.ts} +4 -4
- package/dist/{block-helpers-disoUWCp.d.ts → block-helpers-BNtM1tqy.d.ts} +1 -1
- package/dist/{block-hooks-DrA_d1dJ.d.ts → block-hooks-CtMsgLQr.d.ts} +2 -2
- package/dist/{block-subjects-Br2MQNFn.d.ts → block-subjects-Bkieh2Xk.d.ts} +1 -1
- package/dist/{block-tables-pj3eHfoP.d.ts → block-tables-DPOgnT3y.d.ts} +1 -1
- package/dist/{block-transport-BEtC_Kis.d.ts → block-transport-CDmOUuLZ.d.ts} +2 -2
- package/dist/blocks/access-requests/index.d.ts +5 -5
- package/dist/blocks/activities/index.d.ts +9 -9
- package/dist/blocks/agents/index.d.ts +4 -4
- package/dist/blocks/ai-cache/index.d.ts +3 -3
- package/dist/blocks/ai-chat/index.d.ts +8 -8
- package/dist/blocks/ai-chat/index.js +80 -20
- package/dist/blocks/ai-files/index.d.ts +3 -3
- package/dist/blocks/ai-keys/index.d.ts +4 -4
- package/dist/blocks/ai-schedules/index.d.ts +3 -3
- package/dist/blocks/announcements/index.d.ts +8 -8
- package/dist/blocks/api-keys/index.d.ts +3 -3
- package/dist/blocks/approvals/index.d.ts +16 -5
- package/dist/blocks/approvals/index.js +7 -4
- package/dist/blocks/assets/index.d.ts +6 -6
- package/dist/blocks/assignment/index.d.ts +7 -7
- package/dist/blocks/attachments/index.d.ts +4 -4
- package/dist/blocks/audit/index.d.ts +13 -13
- package/dist/blocks/audit/index.js +1 -1
- package/dist/blocks/automations/index.d.ts +12 -12
- package/dist/blocks/billable-time/index.d.ts +6 -6
- package/dist/blocks/billing/index.d.ts +9 -9
- package/dist/blocks/billing/index.js +1 -1
- package/dist/blocks/bookings/index.d.ts +6 -6
- package/dist/blocks/bulk/index.d.ts +4 -4
- package/dist/blocks/calendar/index.d.ts +46 -8
- package/dist/blocks/calendar/index.js +306 -47
- package/dist/blocks/catalog/index.d.ts +39 -17
- package/dist/blocks/catalog/index.js +35 -15
- package/dist/blocks/channels/index.d.ts +7 -7
- package/dist/blocks/collections/index.d.ts +6 -6
- package/dist/blocks/comments/index.d.ts +10 -10
- package/dist/blocks/compliance/index.d.ts +5 -5
- package/dist/blocks/connectors/index.d.ts +4 -4
- package/dist/blocks/contacts/index.d.ts +6 -6
- package/dist/blocks/content/index.d.ts +5 -5
- package/dist/blocks/contracts/index.d.ts +6 -6
- package/dist/blocks/courses/index.d.ts +5 -5
- package/dist/blocks/created-by/index.d.ts +2 -2
- package/dist/blocks/custom-fields/index.d.ts +6 -6
- package/dist/blocks/data-lifecycle/index.d.ts +8 -8
- package/dist/blocks/deals/index.d.ts +6 -6
- package/dist/blocks/dispatch/index.d.ts +6 -6
- package/dist/blocks/documents/index.d.ts +4 -4
- package/dist/blocks/documents/index.js +1 -1
- package/dist/blocks/domains/index.d.ts +6 -6
- package/dist/blocks/donations/index.d.ts +6 -6
- package/dist/blocks/drive/index.d.ts +6 -6
- package/dist/blocks/employees/index.d.ts +8 -8
- package/dist/blocks/enrichment/index.d.ts +6 -6
- package/dist/blocks/enrollments/index.d.ts +74 -9
- package/dist/blocks/enrollments/index.js +67 -3
- package/dist/blocks/entitlements/index.d.ts +6 -6
- package/dist/blocks/expenses/index.d.ts +93 -6
- package/dist/blocks/expenses/index.js +95 -4
- package/dist/blocks/field-history/index.d.ts +4 -4
- package/dist/blocks/flags/index.d.ts +5 -5
- package/dist/blocks/forecasts/index.d.ts +6 -6
- package/dist/blocks/forms/index.d.ts +6 -6
- package/dist/blocks/goals/index.d.ts +4 -4
- package/dist/blocks/guests/index.d.ts +6 -6
- package/dist/blocks/hiring/index.d.ts +6 -6
- package/dist/blocks/identities/index.d.ts +5 -5
- package/dist/blocks/imports/index.d.ts +5 -5
- package/dist/blocks/inbox/index.d.ts +11 -11
- package/dist/blocks/inbox/index.js +56 -1
- package/dist/blocks/incidents/index.d.ts +5 -5
- package/dist/blocks/index.d.ts +9 -9
- package/dist/blocks/inventory/index.d.ts +6 -6
- package/dist/blocks/invoices/index.d.ts +26 -10
- package/dist/blocks/invoices/index.js +23 -7
- package/dist/blocks/knowledge/index.d.ts +4 -4
- package/dist/blocks/knowledge/index.js +1 -1
- package/dist/blocks/lead-scoring/index.d.ts +7 -7
- package/dist/blocks/leases/index.d.ts +6 -6
- package/dist/blocks/leave/index.d.ts +88 -15
- package/dist/blocks/leave/index.js +65 -14
- package/dist/blocks/ledger/index.d.ts +6 -6
- package/dist/blocks/mail-sync/index.d.ts +5 -5
- package/dist/blocks/memberships/index.d.ts +2 -2
- package/dist/blocks/memory/index.d.ts +5 -5
- package/dist/blocks/memory/index.js +30 -5
- package/dist/blocks/messaging/index.d.ts +11 -11
- package/dist/blocks/metrics/index.d.ts +6 -6
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +6 -6
- package/dist/blocks/notifications/index.d.ts +11 -11
- package/dist/blocks/notifications/index.js +1 -1
- package/dist/blocks/numbering/index.d.ts +4 -4
- package/dist/blocks/oauth-server/index.d.ts +5 -5
- package/dist/blocks/oauth-server/index.js +1 -1
- package/dist/blocks/onboarding/index.d.ts +5 -5
- package/dist/blocks/orders/index.d.ts +7 -7
- package/dist/blocks/organizations/index.d.ts +8 -8
- package/dist/blocks/outbox/index.d.ts +4 -4
- package/dist/blocks/outbox/index.js +1 -1
- package/dist/blocks/passes/index.d.ts +8 -8
- package/dist/blocks/passes/index.js +2 -2
- package/dist/blocks/permissions/index.d.ts +7 -7
- package/dist/blocks/pipelines/index.d.ts +6 -6
- package/dist/blocks/posts/index.d.ts +5 -5
- package/dist/blocks/profiles/index.d.ts +4 -4
- package/dist/blocks/promotions/index.d.ts +5 -5
- package/dist/blocks/push/index.d.ts +7 -7
- package/dist/blocks/queue/index.d.ts +6 -6
- package/dist/blocks/queue/index.js +2 -2
- package/dist/blocks/quotes/index.d.ts +119 -27
- package/dist/blocks/quotes/index.js +111 -17
- package/dist/blocks/rank/index.d.ts +4 -4
- package/dist/blocks/reactions/index.d.ts +9 -9
- package/dist/blocks/relations/index.d.ts +7 -7
- package/dist/blocks/reminders/index.d.ts +78 -11
- package/dist/blocks/reminders/index.js +118 -6
- package/dist/blocks/reviews/index.d.ts +5 -5
- package/dist/blocks/saved-views/index.d.ts +6 -6
- package/dist/blocks/scores/index.d.ts +5 -5
- package/dist/blocks/search/index.d.ts +7 -7
- package/dist/blocks/security-events/index.d.ts +7 -7
- package/dist/blocks/security-events/index.js +1 -1
- package/dist/blocks/segments/index.d.ts +7 -7
- package/dist/blocks/sequences/index.d.ts +6 -6
- package/dist/blocks/service-accounts/index.d.ts +5 -5
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/sessions/index.js +1 -1
- package/dist/blocks/settings/index.d.ts +6 -6
- package/dist/blocks/share-links/index.d.ts +5 -5
- package/dist/blocks/shipments/index.d.ts +6 -6
- package/dist/blocks/shipments/index.js +1 -1
- package/dist/blocks/signatures/index.d.ts +5 -5
- package/dist/blocks/signing-keys/index.d.ts +4 -4
- package/dist/blocks/signing-keys/index.js +2 -2
- package/dist/blocks/sla/index.d.ts +7 -7
- package/dist/blocks/sso/index.d.ts +6 -6
- package/dist/blocks/state-machine/index.d.ts +27 -7
- package/dist/blocks/state-machine/index.js +7 -2
- package/dist/blocks/subjects/index.d.ts +6 -6
- package/dist/blocks/tags/index.d.ts +6 -6
- package/dist/blocks/tasks/index.d.ts +9 -9
- package/dist/blocks/teams/index.d.ts +4 -4
- package/dist/blocks/templates/index.d.ts +7 -7
- package/dist/blocks/time-tracking/index.d.ts +7 -7
- package/dist/blocks/timeline/index.d.ts +8 -8
- package/dist/blocks/trash/index.d.ts +6 -6
- package/dist/blocks/undo/index.d.ts +4 -4
- package/dist/blocks/updated-at/index.d.ts +2 -2
- package/dist/blocks/usage/index.d.ts +4 -4
- package/dist/blocks/vercel-marketplace/index.d.ts +5 -5
- package/dist/blocks/vercel-marketplace/index.js +3 -3
- package/dist/blocks/versions/index.d.ts +6 -6
- package/dist/blocks/waitlist/index.d.ts +5 -5
- package/dist/blocks/waitlist/index.js +1 -1
- package/dist/blocks/webhooks/index.d.ts +13 -13
- package/dist/blocks/webhooks/index.js +5 -5
- package/dist/blocks/workflow-editor/index.d.ts +10 -10
- package/dist/blocks/workflow-editor/index.js +65 -2
- package/dist/blocks/workflows/index.d.ts +7 -7
- package/dist/{bookings-Br0VXzaf.d.ts → bookings-Dj5cvXKv.d.ts} +4 -4
- package/dist/{bucket-DvG66r5G.d.ts → bucket-CrsJNHzi.d.ts} +1 -1
- package/dist/chat-sdk/index.d.ts +6 -6
- package/dist/claims/index.d.ts +6 -6
- package/dist/claims/index.js +2 -2
- package/dist/cli/{add-DzgsOE8V.js → add-D2CH8t_B.js} +2 -2
- package/dist/cli/add-De73Ghlh.js +1 -0
- package/dist/cli/{add-CYreXA68.js → add-Duf1-19E.js} +16 -14
- package/dist/cli/{agent-59XWXsRi.js → agent-Tqq3MAqx.js} +26 -1
- package/dist/cli/{app-table-files-BnISa3uY.js → app-table-files-ha8X0rRE.js} +2 -2
- package/dist/cli/app-tables-BIyQcsHH.js +42 -0
- package/dist/cli/{backfill-BLLTSDSa.js → backfill-CLgA6-ll.js} +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-uzh1g_0v.js → blocks-9AeouX4h.js} +2 -2
- package/dist/cli/{blocks-CpRvI7x8.js → blocks-BVB1fMMj.js} +1 -1
- package/dist/cli/{cache-BPWC7tGD.js → cache-aMk9vF1_.js} +1 -1
- package/dist/cli/{codemod-CbJVS_kG.js → codemod-B5wrcnF2.js} +113 -4
- package/dist/cli/{command-BpZ4AuhR.js → command-DM_x_yzZ.js} +6 -0
- package/dist/cli/{completion-DHTT6rjI.js → completion-CusuUJNn.js} +1 -1
- package/dist/cli/{completion-B08Q0xB3.js → completion-Cx2UYd-y.js} +2 -2
- package/dist/cli/{completion-CwL7e93t.js → completion-DbYb3N8e.js} +2 -2
- package/dist/cli/{config-D-Upz3jV.js → config-BeuImpav.js} +1 -1
- package/dist/cli/{content-mapper-Cjkm2Sg3.js → content-mapper-CEtdbshU.js} +2 -2
- package/dist/cli/{db-Diy1OebO.js → db-CeiQzhPq.js} +2 -2
- package/dist/cli/{doctor-D94FEJZs.js → doctor-DaOUWfRN.js} +386 -49
- package/dist/cli/env-BfWbheiC.js +1 -0
- package/dist/cli/{env-BAJn6wCA.js → env-DVV10l_r.js} +1 -1
- package/dist/cli/{gen-Cd0VNDjE.js → gen-BO-2NF-G.js} +14 -14
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-Co1N9ZoA.js → init-Xit9Hnbb.js} +9 -9
- package/dist/cli/{keys-CxajkV_7.js → keys-DJTN2Avl.js} +1 -1
- package/dist/cli/{live-NFNeZsP7.js → live-CuMpyRjF.js} +2 -2
- package/dist/cli/{mcp-WZ8t7NMz.js → mcp-C7d4j5cq.js} +4 -4
- package/dist/cli/{metadata-BzMkmrZR.js → metadata-D2YvkY2D.js} +3 -3
- package/dist/cli/{migrate-C9gyDAV7.js → migrate-BCXxyTKt.js} +2 -2
- package/dist/cli/{migration-safety-BNi8PIiM.js → migration-safety-DfwTOBQ4.js} +1 -1
- package/dist/cli/{migrations-Ds0J_TmZ.js → migrations-nomh4TBo.js} +2 -2
- package/dist/cli/{module-migration-hFrlzQZ5.js → module-migration--9T_T-zt.js} +2 -2
- package/dist/cli/{moved-BAFPdJz_.js → moved-CT6i1csY.js} +1 -1
- package/dist/cli/{parse-BueItuNJ.js → parse-qgJylE_A.js} +1 -1
- package/dist/cli/{powersync-oFiwgsBi.js → powersync-DB9WZsIv.js} +4 -4
- package/dist/cli/powersync-IBM_v_eJ.js +1 -0
- package/dist/cli/{print-BtreoJSm.js → print-S6IF5rZm.js} +2 -2
- package/dist/cli/{providers-Be2dgyuR.js → providers-BDTcal71.js} +1 -1
- package/dist/cli/{prune-workflows-BPxgRrqY.js → prune-workflows-Zr2DjByi.js} +3 -3
- package/dist/cli/{remove-B4ad996E.js → remove-CPX5Tg5s.js} +6 -6
- package/dist/cli/{render-C-Mfq-o3.js → render-Bp7a7XQ9.js} +18 -4
- package/dist/cli/{run-D2nuyyPo.js → run-BclCFEyP.js} +12 -48
- package/dist/cli/{run-dY9uOC3W.js → run-BlVaLnt_.js} +2 -2
- package/dist/cli/{run-cLdnJHH0.js → run-kgG50x_Z.js} +44 -43
- package/dist/cli/{seed-BpaqqyO8.js → seed-Cn2R91cd.js} +2 -2
- package/dist/cli/seed-DGGjReq4.js +1 -0
- package/dist/cli/{shared-DCHxLAEL.js → shared-D60W9NS-.js} +1 -1
- package/dist/cli/{skills-jZThjL3B.js → skills-DH-yPDny.js} +1 -1
- package/dist/cli/{snapshot-CloKPNxv.js → snapshot-C3_eQUgY.js} +2 -2
- package/dist/cli/{source-Bwyp18Rj.js → source-Bk6XwIAK.js} +1 -1
- package/dist/cli/{spec-DsVq4_qV.js → spec-BDTpcBns.js} +1 -1
- package/dist/cli/{spec-DAUF4ybu.js → spec-C8ydQwZC.js} +3 -3
- package/dist/cli/{sql-layout-CHpEL0oq.js → sql-layout-DVQ20UMi.js} +2 -2
- package/dist/cli/{stack-147NqctC.js → stack-CmhSfY5V.js} +3 -2
- package/dist/cli/{sync-DZu1r34s.js → sync-D-WO4Yvl.js} +4 -4
- package/dist/cli/{table-D9FbJS8h.js → table-k5OABwy3.js} +1 -1
- package/dist/cli/{upgrade-Bpvi70zm.js → upgrade-DGe5Pv6v.js} +5 -5
- package/dist/cli/{upgrade-A-BALvp3.js → upgrade-XdhMuHAu.js} +3 -3
- package/dist/cli/{version-B59mZJoy.js → version-DKfeme2I.js} +1 -1
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +1 -1
- package/dist/client/native/index.d.ts +5 -5
- package/dist/client/native/index.js +2 -2
- package/dist/{client-Bky2z09B.js → client-DrejIxsu.js} +1 -1
- package/dist/{cloud-event-DXWmXrus.d.ts → cloud-event-BEmAUdl1.d.ts} +1 -1
- package/dist/commerce/index.js +1 -1
- package/dist/{compiler-qlXlokKn.d.ts → compiler-BOW4yPcW.d.ts} +2 -2
- package/dist/{composite-CIxjVcL1.d.ts → composite-B-oAH16L.d.ts} +7 -7
- package/dist/{composite-D2JnIiHt.js → composite-BidYZWZY.js} +3 -3
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.js +4 -4
- package/dist/{config-BZWSFxkG.js → config-BKxjItQ-.js} +3 -3
- package/dist/{config-DQP0IvDX.js → config-BrRlSxhx.js} +1 -1
- package/dist/{connectors-Cf2LeAuZ.d.ts → connectors-CrLRW4Ol.d.ts} +4 -4
- package/dist/{context-CderJRZf.d.ts → context-yfOlyAqb.d.ts} +3 -3
- package/dist/contract/index.d.ts +9 -9
- package/dist/{controller-DaWA9eWS.d.ts → controller-CAcLEndc.d.ts} +1 -1
- package/dist/{conversion-C9rndpEI.d.ts → conversion-s1NtB6S-.d.ts} +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +3 -3
- package/dist/create/lite/index.d.ts +4 -4
- package/dist/create/lite/index.js +2 -2
- package/dist/credentials/index.d.ts +4 -4
- package/dist/credentials/index.js +1 -1
- package/dist/{cron-route-DSITg1yC.js → cron-route-uTsC2BD0.js} +1 -1
- package/dist/{data-engine-CMENsp3d.d.ts → data-engine-CX1oYDZl.d.ts} +1 -1
- package/dist/{define-ITQA71fw.d.ts → define-BvkaC3Oh.d.ts} +5 -5
- package/dist/{define-B6D55cO0.js → define-Duh2mMYk.js} +1 -1
- package/dist/{define-block-COmMkx2x.d.ts → define-block-Ds3aLZwz.d.ts} +12 -12
- package/dist/{documents-DeZw83ue.d.ts → documents-Btk0MhC0.d.ts} +3 -3
- package/dist/edge/index.d.ts +9 -9
- package/dist/edge/index.js +7 -7
- package/dist/elysia/index.d.ts +1 -1
- package/dist/elysia/index.js +1 -1
- package/dist/{embeddings-rVR2AKVz.d.ts → embeddings-CI6P_mtD.d.ts} +1 -1
- package/dist/{ended-NC_ZesY4.d.ts → ended-iq2wp8fc.d.ts} +8 -3
- package/dist/{entitlements-BefkpQIz.d.ts → entitlements-Dhu-4vlH.d.ts} +2 -2
- package/dist/env/index.d.ts +1 -1
- package/dist/{messages-CRk1g6oe.js → errors-0Qid9fGz.js} +107 -3
- package/dist/eve/index.d.ts +9 -9
- package/dist/eve/index.js +3 -3
- package/dist/{eve-DIKjuPp5.d.ts → eve-DleYrhwj.d.ts} +2 -2
- package/dist/{event-calendar-DUtFyRrv.d.ts → event-calendar-DPMcqy7Q.d.ts} +1 -1
- package/dist/events/index.d.ts +3 -3
- package/dist/{events-DVt3Z9hw.d.ts → events-DCw3c6pj.d.ts} +1 -1
- package/dist/{executor-DqNRrFxx.d.ts → executor-B-o7QMPp.d.ts} +16 -2
- package/dist/{executor-CFmee_nV.d.ts → executor-DoSNec_H.d.ts} +1 -1
- package/dist/{executor-CHnoKOxk.d.ts → executor-H8ZLkeHj.d.ts} +4 -4
- package/dist/{executor-BDMqPbVU.js → executor-RYiR4z47.js} +71 -37
- package/dist/expo/index.d.ts +4 -4
- package/dist/expo/index.js +7 -7
- package/dist/{field-errors-D1meOs_H.d.ts → field-errors-DXZk9Qjt.d.ts} +10 -10
- package/dist/{fields-CAVk9dxX.d.ts → fields-CP46SPNE.d.ts} +1 -1
- package/dist/{filter-evaluate-Bz3Fzhz2.d.ts → filter-evaluate-Bkbb0nuQ.d.ts} +1 -1
- package/dist/{filter-query-DV-x8fio.d.ts → filter-query-Xj40B5KT.d.ts} +1 -1
- package/dist/{flags-6emyAXly.d.ts → flags-Cuew4tGx.d.ts} +2 -2
- package/dist/flags-sdk/index.d.ts +2 -2
- package/dist/{framework-BFlaPuvv.d.ts → framework-Byr_j8G-.d.ts} +8 -8
- package/dist/{framework-ChzJYkJW.js → framework-z3KTPRjk.js} +4 -4
- package/dist/{gateway-DaekJ_Me.d.ts → gateway-B9k89AC4.d.ts} +3 -3
- package/dist/h3/index.d.ts +1 -1
- package/dist/h3/index.js +1 -1
- package/dist/h3/v1/index.d.ts +1 -1
- package/dist/h3/v1/index.js +1 -1
- package/dist/hono/index.d.ts +9 -10
- package/dist/hono/index.js +8 -8
- package/dist/{inbox-DavCzW7b.d.ts → inbox-yGfUVQr2.d.ts} +61 -6
- package/dist/{index-Dvpu22CJ.d.ts → index-1uV69AZq.d.ts} +1 -1
- package/dist/{index-BbDiBiKt.d.ts → index-6H-8Ib1w.d.ts} +4 -4
- package/dist/{index-M1izbwbN.d.ts → index-Ag-T51Jl.d.ts} +1 -1
- package/dist/{index-ZQZMQF4l.d.ts → index-BUluRi0b.d.ts} +6 -6
- package/dist/{index-BQlLxOj5.d.ts → index-C78VPlXW.d.ts} +1 -1
- package/dist/{index-D18su_r5.d.ts → index-CY612vAg.d.ts} +10 -5
- package/dist/{index-DXUiRyEk.d.ts → index-CnzGRpeH.d.ts} +5 -5
- package/dist/{index-BIAtapnD.d.ts → index-Dbd1E5Au.d.ts} +5 -5
- package/dist/{index-ChLuLxy-.d.ts → index-Dv6lfL5p.d.ts} +14 -14
- package/dist/{index-8w4OB5En.d.ts → index-F6lsRlsr.d.ts} +1 -1
- package/dist/{index-D9aV0Fvx.d.ts → index-kkZwp5M1.d.ts} +6 -6
- package/dist/{index-C13UgV67.d.ts → index-lMApFSAd.d.ts} +5 -5
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/{instances-D9YrkoAy.js → instances-xQ2lupVE.js} +218 -11
- package/dist/jwks-cache-CBKtICNV.js +114 -0
- package/dist/{jws-B8p0ppgh.js → jws-De9qjIPV.js} +1 -1
- package/dist/{kit-9pZP5iLU.js → kit-D5rRAKWJ.js} +2 -2
- package/dist/{kit-OgFOW9rX.d.ts → kit-DCuO1ZhB.d.ts} +4 -4
- package/dist/{knowledge-DdZzUTQ-.js → knowledge-CJnZOaix.js} +67 -7
- package/dist/{knowledge-BBC2sfAY.d.ts → knowledge-DWXAxvkN.d.ts} +82 -11
- package/dist/lint/index.d.ts +1 -1
- package/dist/list/index.d.ts +3 -3
- package/dist/{list-query-C7V8kUaD.d.ts → list-query-D1h3Dmnk.d.ts} +3 -3
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/index.js +5 -5
- package/dist/mcp/sdk/index.d.ts +6 -6
- package/dist/mcp/sdk/index.js +2 -2
- package/dist/{messaging-D5z2TR37.d.ts → messaging-Bfe4p9Pm.d.ts} +4 -4
- package/dist/{model-messages-BcrkjsPE.js → model-messages-CIHqP7Z3.js} +1 -1
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/nestjs/index.js +1 -1
- package/dist/next/client/index.d.ts +1 -1
- package/dist/next/index.d.ts +331 -79
- package/dist/next/index.js +520 -105
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +1 -1
- package/dist/{operations-t_hlXkS4.d.ts → operations-SWpzGC_K.d.ts} +1 -1
- package/dist/{options-D4dxMGHF.js → options-Bgnm4pTD.js} +1 -0
- package/dist/{options-C13-dVMH.js → options-D-jiqb0l.js} +2 -0
- package/dist/{options-C9bp3SEA.js → options-DqmTs2nv.js} +2 -1
- package/dist/{options-CuPWezcV.js → options-RYbyaVhv.js} +3 -1
- package/dist/options-SOjQVgfS.js +37 -0
- package/dist/{options-JnPEVbBJ.js → options-ScQ6Hnxo.js} +2 -1
- package/dist/{options-CuaWhsQS.js → options-X61tvckX.js} +2 -1
- package/dist/orpc/index.d.ts +8 -8
- package/dist/orpc/index.js +6 -6
- package/dist/otel/index.d.ts +2 -2
- package/dist/otel/index.js +4 -4
- package/dist/{outbox-7zgh-7nw.d.ts → outbox-BFZS6Kvz.d.ts} +4 -4
- package/dist/{permissions-C8p6RlIZ.d.ts → permissions-2UlVQDzY.d.ts} +1 -1
- package/dist/{pool-D-4HyhuW.d.ts → pool-yO-LzZAd.d.ts} +3 -3
- package/dist/{ports-CmEXVqhg.js → ports-CkygVOeE.js} +2 -2
- package/dist/{ports-C-8uduFM.d.ts → ports-prqYrReN.d.ts} +1 -1
- package/dist/postgres/index.d.ts +4 -4
- package/dist/{postgrest-DZtM2nIS.d.ts → postgrest-Bjain6nf.d.ts} +1 -1
- package/dist/powersync/index.d.ts +6 -6
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +3 -3
- package/dist/{preset-B_sSI9vg.js → preset-BvHNleCo.js} +2 -2
- package/dist/{project-DVlXQGEp.js → project-CBvowdKY.js} +5 -5
- package/dist/{provider-BI0KC4u5.d.ts → provider-bIAzxVMB.d.ts} +1 -1
- package/dist/{push-token-D41lOoE8.d.ts → push-token-DtqJeg8w.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/{rate-limit-CRhlLFhP.js → rate-limit-BJ4EMdAy.js} +1 -1
- package/dist/react/index.d.ts +9 -9
- 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 +9 -9
- package/dist/react/server.js +2 -2
- package/dist/react/session.d.ts +2 -32
- package/dist/react/session.js +1 -37
- package/dist/{react-COIov1yC.js → react-DZ7AW2yf.js} +2 -2
- package/dist/react-router/index.d.ts +6 -6
- package/dist/react-router/index.js +5 -5
- package/dist/realtime/index.d.ts +6 -6
- package/dist/{record-form-DU2EoVsv.d.ts → record-form-BQA-lawE.d.ts} +1 -1
- package/dist/{recordings-D69Va7gP.d.ts → recordings-Bw5LoocX.d.ts} +1 -1
- package/dist/records/index.d.ts +9 -9
- package/dist/{refusal-CGi-0Q18.d.ts → refusal-BX1EvmpJ.d.ts} +3 -3
- package/dist/{refusal-5c6UMpUP.js → refusal-rnbr6RZD.js} +2 -2
- package/dist/{refresh-B8t_KE3s.js → request-kind-tNDM5Z_o.js} +15 -31
- package/dist/{resolve--LfVoOMg.d.ts → resolve-BIpQRhvF.d.ts} +97 -36
- package/dist/{resolve-FW8oeXvh.js → resolve-CZV31iCm.js} +402 -392
- package/dist/{resolved-names-h-3UbKcw.js → resolved-names-b6P2--jK.js} +1 -1
- package/dist/{resource-BbWk4hoP.js → resource-COaS9_i8.js} +1 -1
- package/dist/{resource-DWllVW8k.d.ts → resource-CaYpB07K.d.ts} +1 -1
- package/dist/{resource-execute-DUBYKTYU.d.ts → resource-execute-A1NbR-sd.d.ts} +2 -2
- package/dist/{resource-types-RgaljPs0.d.ts → resource-types-CTcc37WL.d.ts} +4 -4
- package/dist/{resources-Bki1J4jy.d.ts → resources-13ZFX1G6.d.ts} +2 -2
- package/dist/{resources-DYSx9NYM.js → resources-DhiK3yLO.js} +1 -1
- package/dist/{respond-DLH4tD2d.js → respond-8A3EOo61.js} +1 -1
- package/dist/{respond-BYOV7KZp.d.ts → respond-CAxhkwAi.d.ts} +15 -19
- package/dist/{sales-lines-DuNVoKHA.d.ts → sales-lines-wQHuL-pa.d.ts} +1 -1
- package/dist/{sandboxes-B2hBoBvJ.d.ts → sandboxes-BF9RxxCU.d.ts} +1 -1
- package/dist/{scores-FAORS4qU.d.ts → scores-Ce8MxQX9.d.ts} +5 -5
- package/dist/server/index.d.ts +58 -36
- package/dist/server/index.js +35 -41
- package/dist/{server-types-C2hlvhP4.d.ts → server-types-DEjva0MW.d.ts} +19 -17
- package/dist/{session-B4VasaAA.d.ts → session-BA0YDmjt.d.ts} +11 -12
- package/dist/session-BjPYE4dT.js +180 -0
- package/dist/session-CeYL3EPm.d.ts +77 -0
- package/dist/{session-status-D8CBxCqv.d.ts → session-status-Df6tuKY9.d.ts} +4 -3
- package/dist/{sign-in-CX1a5i2P.d.ts → sign-in-4u4vLtXG.d.ts} +16 -4
- package/dist/{sign-in-CxdoTEp5.js → sign-in-djgvab1X.js} +3 -3
- package/dist/{sign-in-BMm1xhKq.js → sign-in-k2lXELeC.js} +2 -2
- package/dist/{signatures-CBn7w4VR.js → signatures-DK01D2S7.js} +1 -1
- package/dist/{signers-6ih6i9aq.d.ts → signers-Dw9DBZjJ.d.ts} +4 -4
- package/dist/{signing-keys-De09WNJ3.d.ts → signing-keys-FglIQ6iL.d.ts} +2 -2
- package/dist/{signing-keys-BC5_hJN5.js → signing-keys-sGaXklwD.js} +1 -1
- package/dist/{snapshot-CVMSyTHH.js → snapshot-BOA7lkRg.js} +9 -17
- package/dist/solid/index.d.ts +10 -10
- package/dist/solid/index.js +1 -1
- package/dist/solid-start/index.d.ts +6 -6
- package/dist/solid-start/index.js +5 -5
- package/dist/spec/index.d.ts +2 -2
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +3 -3
- package/dist/{sql-C9nO-Mat.js → sql-BChN3Hxv.js} +7382 -2219
- package/dist/sqlite/index.d.ts +3 -3
- package/dist/{sso-CuzAjsc8.d.ts → sso-B7w7h8RJ.d.ts} +3 -3
- package/dist/ssr/index.d.ts +5 -6
- package/dist/ssr/index.js +3 -3
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.js +1 -1
- package/dist/streams/index.d.ts +1 -1
- package/dist/{subject-readers-BlD8tALG.d.ts → subject-readers-YL8H9G8X.d.ts} +2 -2
- package/dist/{subjects-Bv2dPflD.d.ts → subjects-CVjAE7nz.d.ts} +3 -3
- package/dist/{support-DxYI6sDM.d.ts → support-BwtMgjVg.d.ts} +4 -4
- package/dist/{support-view-DSmCett7.d.ts → support-view-GykHOIQ2.d.ts} +1 -1
- package/dist/svelte/index.d.ts +9 -9
- package/dist/svelte/index.js +1 -1
- package/dist/sveltekit/index.d.ts +7 -7
- package/dist/sveltekit/index.js +5 -5
- package/dist/{tags--k2fbPfO.d.ts → tags-CAfvzA1U.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +3 -3
- package/dist/tanstack-start/index.d.ts +6 -6
- package/dist/tanstack-start/index.js +5 -5
- package/dist/{tenant-gezshhcs.d.ts → tenant-lBgoqg9T.d.ts} +1 -1
- package/dist/testing/index.d.ts +27 -28
- package/dist/testing/index.js +5 -5
- package/dist/{timeline-Bq658xsi.d.ts → timeline-CrO48Qa6.d.ts} +5 -5
- package/dist/{topic-BVq5RdsI.d.ts → topic-x-mrN_Ff.d.ts} +5 -5
- package/dist/{types-C8UyJOPJ.d.ts → types-6PMaLIyw.d.ts} +3 -3
- package/dist/{types-Dh2OGEW5.d.ts → types-BdhE7I8Z.d.ts} +5 -5
- package/dist/{types-BkYEUWdz.d.ts → types-BzIYSSWK.d.ts} +16 -1
- package/dist/{types-DCoqai8o.d.ts → types-C7K8mu9B.d.ts} +45 -15
- package/dist/{types-d0JBRTAg.d.ts → types-C9XfFGmA.d.ts} +128 -13
- package/dist/{types-hTj5OuFo.d.ts → types-CJqNGQKb.d.ts} +2 -2
- package/dist/{types-TH3zlMiM.d.ts → types-D5uf0l4_.d.ts} +1 -1
- package/dist/{types-BBqP9H6w.d.ts → types-auvHrNWC.d.ts} +4 -4
- package/dist/{undo-22ofP6Zp.d.ts → undo-CdKp5_2X.d.ts} +2 -2
- package/dist/{usage-CNCT6_3D.d.ts → usage-DZ8j5Tm_.d.ts} +4 -4
- package/dist/{vault-yGQD5Rdl.d.ts → vault-DjbG4XQS.d.ts} +2 -2
- package/dist/vercel-connect/index.d.ts +1 -1
- package/dist/vercel-sandbox/index.d.ts +2 -2
- package/dist/{verify-DY_j4GPZ.js → verify-96j8d5ps.js} +1 -1
- package/dist/{verify-BQu3eBNW.d.ts → verify-HOiu3lRR.d.ts} +2 -2
- package/dist/{view-BfEqjZJ_.js → view-Ch0Qtr36.js} +1 -1
- package/dist/{view-Cy2XxYp1.d.ts → view-DdDY88SC.d.ts} +1 -1
- package/dist/vue/index.d.ts +10 -10
- package/dist/vue/index.js +1 -1
- package/dist/{watch-topic-BOclyLFd.d.ts → watch-topic-D6bcqOrJ.d.ts} +1 -1
- package/dist/workflow-sdk/builder/index.d.ts +29 -5
- package/dist/workflow-sdk/builder/index.js +39 -12
- package/dist/workflow-sdk/index.d.ts +1 -1
- package/dist/workflow-sdk/index.js +2 -2
- package/dist/workflow-sdk/world/index.d.ts +1 -1
- package/dist/workflow-sdk/world/index.js +1 -1
- package/dist/{workflow-sdk-BL3wzkdp.js → workflow-sdk-CBS8L2Ku.js} +5 -0
- package/dist/{workflow-sdk-yIkECybp.d.ts → workflow-sdk-D3H10W5h.d.ts} +3 -3
- package/dist/{workflows-BljkWRxE.d.ts → workflows-BI4yKqFh.d.ts} +3 -3
- package/dist/yjs/index.d.ts +2 -2
- package/dist/yjs/index.js +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +126 -0
- package/schemas/doctor-report-v1.json +4 -0
- package/skills/better-supabase-auth/SKILL.md +45 -11
- package/dist/cli/add-BaB3y1lv.js +0 -1
- package/dist/cli/env-UN6PJFX6.js +0 -1
- package/dist/cli/powersync-J2Kms2NT.js +0 -1
- package/dist/cli/seed-ByLneY1H.js +0 -1
- package/dist/errors-D3-4c-XF.js +0 -102
- package/dist/http-BDC1IvBX.js +0 -27
- package/dist/jwks-cache-IZaiICAV.js +0 -48
- package/dist/options-Itq7QYoW.js +0 -20
- package/dist/refresh-BtbC2rZe.d.ts +0 -52
- package/dist/snapshot-BGsJw9xn.d.ts +0 -83
package/dist/react/session.js
CHANGED
|
@@ -1,38 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { createContext, createElement, use, useContext } from "react";
|
|
4
|
-
// src/react/session.ts
|
|
5
|
-
const SessionContext = createContext(null);
|
|
6
|
-
/** Shares the server-verified session with Client Components. */
|
|
7
|
-
function SessionProvider(props) {
|
|
8
|
-
return createElement(SessionContext.Provider, { value: props.sessionPromise }, props.children);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The session from the nearest `<SessionProvider>`. Suspends until the promise
|
|
12
|
-
* resolves, so render it inside `<Suspense>`. `C` types the claims (the output
|
|
13
|
-
* of `betterSupabase.claims(schema)`) and `P` the profile (the output of
|
|
14
|
-
* `betterSupabase.userMetadata(schema)`); `createHooks().useSession` infers
|
|
15
|
-
* both.
|
|
16
|
-
*/
|
|
17
|
-
function useSession() {
|
|
18
|
-
const promise = useContext(SessionContext);
|
|
19
|
-
if (!promise) throw new Error("better-supabase: useSession() needs <SessionProvider sessionPromise={...}>");
|
|
20
|
-
return use(promise);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The support session the page renders in, for a "Viewing as" banner, or
|
|
24
|
-
* `undefined` for a normal session. Needs `<SessionProvider>` like
|
|
25
|
-
* `useSession`.
|
|
26
|
-
*/
|
|
27
|
-
function useSupportSession() {
|
|
28
|
-
return supportOf(useSession());
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* `useSupportSession()` that answers `undefined` outside a `<SessionProvider>`
|
|
32
|
-
* instead of throwing.
|
|
33
|
-
*/
|
|
34
|
-
function useOptionalSupportSession() {
|
|
35
|
-
const promise = useContext(SessionContext);
|
|
36
|
-
return promise ? supportOf(use(promise)) : void 0;
|
|
37
|
-
}
|
|
38
|
-
export { SessionProvider, useOptionalSupportSession, useSession, useSupportSession };
|
|
2
|
+
export { t as SessionProvider, n as useOptionalSupportSession, r as useSession, i as useSupportSession } from "../session-BjPYE4dT.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as dbError } from "./errors-B7tCfCvX.js";
|
|
2
2
|
import { t as escapeLike } from "./escape-like-gxNXs145.js";
|
|
3
3
|
import { a as ok, r as err, s as toDbError } from "./result-8xza7w5W.js";
|
|
4
|
-
import { c as useBroadcastAuth, f as ClientContext } from "./sign-in-
|
|
5
|
-
import { useOptionalSupportSession } from "./
|
|
4
|
+
import { c as useBroadcastAuth, f as ClientContext } from "./sign-in-djgvab1X.js";
|
|
5
|
+
import { n as useOptionalSupportSession } from "./session-BjPYE4dT.js";
|
|
6
6
|
import { a as blockArgsKey, c as listenToBlockEvents, d as fieldErrorsOf, i as dataTarget, l as blockEnv, n as createDataOne, o as createBlockMutation, r as dataArgsKey, s as createBlockQuery, t as createDataList } from "./data-hooks-BToeAcQ_.js";
|
|
7
7
|
import { U as rpcTransport } from "./block-helpers-I7UzjNEf.js";
|
|
8
8
|
import { r as createBlocks } from "./create-blocks-D7q1boXV.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as BetterSupabase } from "../define-
|
|
3
|
-
import { r as BetterServer } from "../server-types-
|
|
4
|
-
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-
|
|
5
|
-
import { t as RefusalRedirects } from "../refusal-
|
|
6
|
-
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-
|
|
1
|
+
import { O as AnyFunctions, Ut as AnyAuthorizer, k as AnyModels, rn as PermissionRef } from "../types-BzIYSSWK.js";
|
|
2
|
+
import { t as BetterSupabase } from "../define-BvkaC3Oh.js";
|
|
3
|
+
import { r as BetterServer } from "../server-types-DEjva0MW.js";
|
|
4
|
+
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-DCuO1ZhB.js";
|
|
5
|
+
import { t as RefusalRedirects } from "../refusal-BX1EvmpJ.js";
|
|
6
|
+
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-Byr_j8G-.js";
|
|
7
7
|
import { t as Validated } from "../shared-DsBcvj6q.js";
|
|
8
8
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
9
9
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as problemResponse } from "../problem-C0SVHhd3.js";
|
|
2
|
-
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-
|
|
3
|
-
import { n as defaultExpose, s as settle } from "../respond-
|
|
4
|
-
import { i as requireCaller, o as runAction } from "../kit-
|
|
2
|
+
import { c as extendServer, o as withFlush, s as createServer } from "../adapter-ddQ9Hzka.js";
|
|
3
|
+
import { n as defaultExpose, s as settle } from "../respond-8A3EOo61.js";
|
|
4
|
+
import { i as requireCaller, o as runAction } from "../kit-D5rRAKWJ.js";
|
|
5
5
|
import { n as bufferInPlace, t as around } from "../shared-Ci1g9nl4.js";
|
|
6
|
-
import { i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-
|
|
7
|
-
import { r as refusalResponse } from "../refusal-
|
|
6
|
+
import { i as localsOf, n as actionInput, r as frameworkEntry } from "../framework-z3KTPRjk.js";
|
|
7
|
+
import { r as refusalResponse } from "../refusal-rnbr6RZD.js";
|
|
8
8
|
// src/bridges/react-router.ts
|
|
9
9
|
/**
|
|
10
10
|
* Runs an entry array as React Router server middleware. The contributions are
|
package/dist/realtime/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as AccessTopicPolicy, E as AccessPolicySql } from "../types-
|
|
2
|
-
import { et as TemplateParams, tt as TemplateValues } from "../bucket-
|
|
1
|
+
import { D as AccessTopicPolicy, E as AccessPolicySql } from "../types-BzIYSSWK.js";
|
|
2
|
+
import { et as TemplateParams, tt as TemplateValues } from "../bucket-CrsJNHzi.js";
|
|
3
3
|
import { t as RealtimeStatus } from "../realtime-status-D3oUx3o4.js";
|
|
4
|
-
import { A as TriggerTopic, C as TopicSubscription, D as TriggerLookup, E as TopicTriggerValue, F as FanOutResult, I as TopicFanOutOptions, M as defineTopic, N as rowChange, O as TriggerOptions, P as rowKeys, S as TopicSubscribeOptions, T as TopicTriggerOptions, _ as TopicMessage, a as PresenceOutput, b as TopicPermission, c as RealtimeClient, d as SubscribeOptions, f as Subscription, g as TopicHandlers, h as TopicEvent, i as PresenceOptions, j as TriggerValue, k as TriggerPayloadMode, l as RowChange, m as Topic, n as PresenceInput, o as PresenceSchema, p as SubscriptionStatus, r as PresenceMember, s as PresenceSubscription, t as EventSchemas, u as RowKeys, v as TopicOptions, w as TopicTriggerLookup, x as TopicSqlOptions, y as TopicPayload } from "../topic-
|
|
5
|
-
import { a as watchTopic, i as topicPort, n as TopicPort, r as TopicWatch, t as TopicHandle } from "../watch-topic-
|
|
6
|
-
import { S as relayTopicPort, _ as subjectPresenceValues, a as LiveSource, b as RelayEventSourceConstructor, c as liveCount, d as realtimeChanges, f as SUBJECT_PRESENCE_TEMPLATE, g as subjectPresenceTopic, h as subjectPresence, i as LiveQueryOptions, l as liveQuery, m as SubjectPresenceValues, n as LiveCountOptions, o as LiveSubscription, p as SubjectPresenceTopic, r as LiveCountSeed, s as RealtimeChangesOptions, t as CountRunner, u as liveTopic, v as RelayClientOptions, x as relayRealtimeClient, y as RelayEventSource } from "../index-
|
|
7
|
-
import { n as subjectReaders, t as SubjectReadersOptions } from "../subject-readers-
|
|
4
|
+
import { A as TriggerTopic, C as TopicSubscription, D as TriggerLookup, E as TopicTriggerValue, F as FanOutResult, I as TopicFanOutOptions, M as defineTopic, N as rowChange, O as TriggerOptions, P as rowKeys, S as TopicSubscribeOptions, T as TopicTriggerOptions, _ as TopicMessage, a as PresenceOutput, b as TopicPermission, c as RealtimeClient, d as SubscribeOptions, f as Subscription, g as TopicHandlers, h as TopicEvent, i as PresenceOptions, j as TriggerValue, k as TriggerPayloadMode, l as RowChange, m as Topic, n as PresenceInput, o as PresenceSchema, p as SubscriptionStatus, r as PresenceMember, s as PresenceSubscription, t as EventSchemas, u as RowKeys, v as TopicOptions, w as TopicTriggerLookup, x as TopicSqlOptions, y as TopicPayload } from "../topic-x-mrN_Ff.js";
|
|
5
|
+
import { a as watchTopic, i as topicPort, n as TopicPort, r as TopicWatch, t as TopicHandle } from "../watch-topic-D6bcqOrJ.js";
|
|
6
|
+
import { S as relayTopicPort, _ as subjectPresenceValues, a as LiveSource, b as RelayEventSourceConstructor, c as liveCount, d as realtimeChanges, f as SUBJECT_PRESENCE_TEMPLATE, g as subjectPresenceTopic, h as subjectPresence, i as LiveQueryOptions, l as liveQuery, m as SubjectPresenceValues, n as LiveCountOptions, o as LiveSubscription, p as SubjectPresenceTopic, r as LiveCountSeed, s as RealtimeChangesOptions, t as CountRunner, u as liveTopic, v as RelayClientOptions, x as relayRealtimeClient, y as RelayEventSource } from "../index-lMApFSAd.js";
|
|
7
|
+
import { n as subjectReaders, t as SubjectReadersOptions } from "../subject-readers-YL8H9G8X.js";
|
|
8
8
|
export { type AccessPolicySql, type AccessTopicPolicy, type CountRunner, type EventSchemas, type FanOutResult, type LiveCountOptions, type LiveCountSeed, type LiveQueryOptions, type LiveSource, type LiveSubscription, type PresenceInput, type PresenceMember, type PresenceOptions, type PresenceOutput, type PresenceSchema, type PresenceSubscription, type RealtimeChangesOptions, type RealtimeClient, type RealtimeStatus, type RelayClientOptions, type RelayEventSource, type RelayEventSourceConstructor, type RowChange, type RowKeys, SUBJECT_PRESENCE_TEMPLATE, type SubjectPresenceTopic, type SubjectPresenceValues, type SubjectReadersOptions, type SubscribeOptions, type Subscription, type SubscriptionStatus, type TemplateParams, type TemplateValues, type Topic, type TopicEvent, type TopicFanOutOptions, type TopicHandle, type TopicHandlers, type TopicMessage, type TopicOptions, type TopicPayload, type TopicPermission, type TopicPort, type TopicSqlOptions, type TopicSubscribeOptions, type TopicSubscription, type TopicTriggerLookup, type TopicTriggerOptions, type TopicTriggerValue, type TopicWatch, type TriggerLookup, type TriggerOptions, type TriggerPayloadMode, type TriggerTopic, type TriggerValue, defineTopic, liveCount, liveQuery, liveTopic, realtimeChanges, relayRealtimeClient, relayTopicPort, rowChange, rowKeys, subjectPresence, subjectPresenceTopic, subjectPresenceValues, subjectReaders, topicPort, watchTopic };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Sn as EntitySchema } from "./define-block-
|
|
1
|
+
import { Sn as EntitySchema } from "./define-block-Ds3aLZwz.js";
|
|
2
2
|
import { s as FormFieldType } from "./form-definition-BN8shngm.js";
|
|
3
3
|
/** The input a field renders: a forms block field type, or a date and time. */
|
|
4
4
|
type RecordFormInput = FormFieldType | "datetime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { o as AiFile } from "./types-
|
|
2
|
+
import { o as AiFile } from "./types-6PMaLIyw.js";
|
|
3
3
|
/** The queue a recording's transcription job goes on, with the jobs block. */
|
|
4
4
|
declare const ENGAGEMENT_TRANSCRIBE_QUEUE = "engagements.transcribe";
|
|
5
5
|
/** `pending` until a transcript is saved; `failed` when the transcriber gave up. */
|
package/dist/records/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { b as DbError, t as AsyncResult } from "../result-DTOQRyGY.js";
|
|
2
|
-
import {
|
|
3
|
-
import { _n as recordBindingWrite, an as RecordBindingDefinition, cn as RecordBindingResult, dn as RecordBindingWriteName, fn as RecordBindingWriteOutput, gn as defineRecordBinding, hn as TimelineItem, in as RecordBindingData, ln as RecordBindingWrite, mn as RecordRowInput, nn as AnyRecordBindingWrite, on as RecordBindingOptions, pn as RecordBindingWrites, rn as RecordBinding, sn as RecordBindingPermissions, tn as AnyRecordBinding, un as RecordBindingWriteInput, vn as recordEventMatches, yn as recordRowInput } from "../define-block-
|
|
4
|
-
import { A as BindingBlocks, B as PermissionFlags, C as defineRecordType, D as recordPermissionKeys, E as recordCan, F as LoadBindingsOptions, H as can, I as LoadedBindings, L as bindingCan, M as BindingName, N as BindingOf, O as recordSubject, P as BindingSource, R as countBinding, S as RecordWriteInput, T as plainData, U as permissionFlags, V as PermissionSet, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, j as BindingCheck, k as recordWriteInput, m as PlainBindings, p as PlainBinding, v as RecordTypePermissions, w as findBindingWrite, x as RecordTypeWriteOutput, y as RecordTypeSpec, z as loadBindings } from "../index-
|
|
5
|
-
import { p as SubscriptionStatus } from "../topic-
|
|
6
|
-
import { n as TopicPort } from "../watch-topic-
|
|
7
|
-
import { n as Controller, t as AuthPort } from "../controller-
|
|
8
|
-
import { a as RecordSummaryOptions, c as Subjects, f as MyWorkKind, i as RecordSummary, n as MyWorkItem, r as MyWorkOptions } from "../subjects-
|
|
9
|
-
import { a as timelineBindings, c as RecordListCells, d as RecordListQuery, f as RecordListRow, h as defineRecordList, i as loadTimeline, l as RecordListColumn, m as RecordListSpec, n as Timeline, o as RecordList, p as RecordListSource, r as TimelineEntry, s as RecordListCell, t as LoadTimelineOptions, u as RecordListPage } from "../timeline-
|
|
10
|
-
import { a as RecordFormOptions, c as recordForm, i as RecordFormInput, n as RecordFormCustomField, o as RecordFormResult, r as RecordFormField, s as RecordFormValues, t as RecordForm } from "../record-form-
|
|
2
|
+
import { et as RecordRef } from "../types-BzIYSSWK.js";
|
|
3
|
+
import { _n as recordBindingWrite, an as RecordBindingDefinition, cn as RecordBindingResult, dn as RecordBindingWriteName, fn as RecordBindingWriteOutput, gn as defineRecordBinding, hn as TimelineItem, in as RecordBindingData, ln as RecordBindingWrite, mn as RecordRowInput, nn as AnyRecordBindingWrite, on as RecordBindingOptions, pn as RecordBindingWrites, rn as RecordBinding, sn as RecordBindingPermissions, tn as AnyRecordBinding, un as RecordBindingWriteInput, vn as recordEventMatches, yn as recordRowInput } from "../define-block-Ds3aLZwz.js";
|
|
4
|
+
import { A as BindingBlocks, B as PermissionFlags, C as defineRecordType, D as recordPermissionKeys, E as recordCan, F as LoadBindingsOptions, H as can, I as LoadedBindings, L as bindingCan, M as BindingName, N as BindingOf, O as recordSubject, P as BindingSource, R as countBinding, S as RecordWriteInput, T as plainData, U as permissionFlags, V as PermissionSet, _ as RecordTypeBlocks, b as RecordTypeWriteInput, d as BindingWritesOf, f as Plain, g as RecordType, h as RecordCan, j as BindingCheck, k as recordWriteInput, m as PlainBindings, p as PlainBinding, v as RecordTypePermissions, w as findBindingWrite, x as RecordTypeWriteOutput, y as RecordTypeSpec, z as loadBindings } from "../index-Dbd1E5Au.js";
|
|
5
|
+
import { p as SubscriptionStatus } from "../topic-x-mrN_Ff.js";
|
|
6
|
+
import { n as TopicPort } from "../watch-topic-D6bcqOrJ.js";
|
|
7
|
+
import { n as Controller, t as AuthPort } from "../controller-CAcLEndc.js";
|
|
8
|
+
import { a as RecordSummaryOptions, c as Subjects, f as MyWorkKind, i as RecordSummary, n as MyWorkItem, r as MyWorkOptions } from "../subjects-CVjAE7nz.js";
|
|
9
|
+
import { a as timelineBindings, c as RecordListCells, d as RecordListQuery, f as RecordListRow, h as defineRecordList, i as loadTimeline, l as RecordListColumn, m as RecordListSpec, n as Timeline, o as RecordList, p as RecordListSource, r as TimelineEntry, s as RecordListCell, t as LoadTimelineOptions, u as RecordListPage } from "../timeline-CrO48Qa6.js";
|
|
10
|
+
import { a as RecordFormOptions, c as recordForm, i as RecordFormInput, n as RecordFormCustomField, o as RecordFormResult, r as RecordFormField, s as RecordFormValues, t as RecordForm } from "../record-form-BQA-lawE.js";
|
|
11
11
|
interface RecordControllerOptions<B extends BindingBlocks, N extends BindingName<B>> extends LoadBindingsOptions<B, N> {
|
|
12
12
|
readonly source: BindingSource<B>;
|
|
13
13
|
readonly auth: AuthPort;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as AuthState } from "./resolve
|
|
3
|
-
import { c as ResourceLoaderContext, s as BlockRequireOptions } from "./kit-
|
|
1
|
+
import { Ut as AnyAuthorizer } from "./types-BzIYSSWK.js";
|
|
2
|
+
import { r as AuthState } from "./resolve-BIpQRhvF.js";
|
|
3
|
+
import { c as ResourceLoaderContext, s as BlockRequireOptions } from "./kit-DCuO1ZhB.js";
|
|
4
4
|
/** Where refused callers go instead of a Problem Details response. */
|
|
5
5
|
interface RefusalRedirects {
|
|
6
6
|
/** Sign-in page for callers without a session; gets `?next=<path>`. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as dbErrorOf } from "./errors-B7tCfCvX.js";
|
|
2
2
|
import { o as problemResponse } from "./problem-C0SVHhd3.js";
|
|
3
|
-
import { n as defaultExpose } from "./respond-
|
|
4
|
-
import { i as requireCaller } from "./kit-
|
|
3
|
+
import { n as defaultExpose } from "./respond-8A3EOo61.js";
|
|
4
|
+
import { i as requireCaller } from "./kit-D5rRAKWJ.js";
|
|
5
5
|
// src/server/refusal.ts
|
|
6
6
|
function isAalRefusal(error) {
|
|
7
7
|
return error.kind === "forbidden" && "required" in error && error.required === "aal2";
|
|
@@ -90,53 +90,37 @@ function routedExecutor(primary, replica, state) {
|
|
|
90
90
|
...batch ? { batch: (ops, context) => !state.pinned && replicaBatch ? replicaBatch(ops, context) : batch(ops, context) } : {}
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
// src/server/
|
|
93
|
+
// src/server/request-kind.ts
|
|
94
94
|
/**
|
|
95
95
|
* A router or browser prefetch, by its request headers: Next.js route and
|
|
96
96
|
* segment prefetches (`next-router-prefetch`, `next-router-segment-prefetch`),
|
|
97
97
|
* Next's middleware prefetch (`x-middleware-prefetch`), and browser and
|
|
98
98
|
* speculation-rules prefetches (`purpose`, `sec-purpose`, `x-moz`).
|
|
99
|
+
*
|
|
100
|
+
* Next.js strips its router headers before `proxy.ts` runs, so there it only
|
|
101
|
+
* sees the browser's; Playwright and server code that reads the original
|
|
102
|
+
* request see them all.
|
|
99
103
|
*/
|
|
100
104
|
function isPrefetch(request) {
|
|
101
105
|
const h = request.headers;
|
|
102
106
|
return h.has("next-router-prefetch") || h.has("next-router-segment-prefetch") || h.get("x-middleware-prefetch") === "1" || h.get("purpose") === "prefetch" || h.get("x-moz") === "prefetch" || (h.get("sec-purpose")?.includes("prefetch") ?? false);
|
|
103
107
|
}
|
|
104
|
-
const FORM_TYPES = ["application/x-www-form-urlencoded", "multipart/form-data"];
|
|
105
108
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* session as it is, so a burst of parallel requests never races on the
|
|
110
|
-
* single-use refresh token.
|
|
109
|
+
* A top-level page load: a `GET` the browser sends with `sec-fetch-dest:
|
|
110
|
+
* document`, else one that accepts HTML and is not an RSC request. Never a
|
|
111
|
+
* prefetch, a client navigation, a `fetch` call or a mutation.
|
|
111
112
|
*/
|
|
112
|
-
function
|
|
113
|
-
|
|
114
|
-
if (request.method !== "GET" && request.method !== "HEAD") {
|
|
115
|
-
if (h.has("next-action") || h.has("x-sveltekit-action")) return true;
|
|
116
|
-
if (h.get("sec-fetch-dest") === "document") return true;
|
|
117
|
-
const type = h.get("content-type") ?? "";
|
|
118
|
-
return FORM_TYPES.some((form) => type.startsWith(form));
|
|
119
|
-
}
|
|
113
|
+
function isDocumentLoad(request) {
|
|
114
|
+
if (request.method !== "GET" && request.method !== "HEAD") return false;
|
|
120
115
|
if (isPrefetch(request)) return false;
|
|
121
|
-
|
|
116
|
+
const h = request.headers;
|
|
122
117
|
const dest = h.get("sec-fetch-dest");
|
|
123
118
|
if (dest) return dest === "document";
|
|
119
|
+
if (h.get("rsc") === "1") return false;
|
|
124
120
|
return h.get("accept")?.includes("text/html") ?? false;
|
|
125
121
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Whether a request should ask the Auth server if the session still exists
|
|
128
|
-
* (`verifySession`): full page loads, and `paths` you list for client
|
|
129
|
-
* navigations. Never prefetches or mutations.
|
|
130
|
-
*/
|
|
131
|
-
function shouldCheckSession(request, paths) {
|
|
132
|
-
if (request.method !== "GET" && request.method !== "HEAD") return false;
|
|
133
|
-
if (isPrefetch(request)) return false;
|
|
134
|
-
if (request.headers.get("sec-fetch-dest") === "document") return true;
|
|
135
|
-
return paths?.includes(new URL(request.url).pathname) ?? false;
|
|
136
|
-
}
|
|
137
|
-
/** `policy` for one request. */
|
|
122
|
+
/** `policy` for one request; `undefined` when no policy is set. */
|
|
138
123
|
function refreshFor(policy, request) {
|
|
139
|
-
|
|
140
|
-
return policy === "navigation" ? shouldRefresh(request) : policy(request);
|
|
124
|
+
return typeof policy === "function" ? policy(request) : policy;
|
|
141
125
|
}
|
|
142
|
-
export {
|
|
126
|
+
export { PRIMARY_COOKIE as a, replicaState as c, DEFAULT_PIN_MS as i, routedExecutor as l, isPrefetch as n, pinnedUntil as o, refreshFor as r, primaryCookieWrite as s, isDocumentLoad as t, withPrimaryPin as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { b as DbError } from "./result-DTOQRyGY.js";
|
|
3
3
|
import { t as StandardSchemaV1 } from "./standard-DRX6Ch1j.js";
|
|
4
|
-
import { n as AuthOutageEvent, u as RefreshEvent } from "./events-
|
|
4
|
+
import { n as AuthOutageEvent, u as RefreshEvent } from "./events-DCw3c6pj.js";
|
|
5
5
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
6
|
-
import { t as BetterSupabaseEnv } from "./index-
|
|
6
|
+
import { t as BetterSupabaseEnv } from "./index-F6lsRlsr.js";
|
|
7
7
|
import { CookieOptions } from "@supabase/ssr";
|
|
8
8
|
import { JWTClaims, SupabaseEnv, UserClaims } from "@supabase/server";
|
|
9
9
|
/**
|
|
@@ -25,11 +25,6 @@ interface StoredSession {
|
|
|
25
25
|
* server and the browser client must use the same value.
|
|
26
26
|
*/
|
|
27
27
|
type SessionEncoding = "user-and-tokens" | "tokens-only";
|
|
28
|
-
declare const DEFAULT_SESSION_ENCODING: SessionEncoding;
|
|
29
|
-
interface WriteSessionOptions {
|
|
30
|
-
/** Defaults to `user-and-tokens`, the `@supabase/ssr` default. */
|
|
31
|
-
readonly encode?: SessionEncoding;
|
|
32
|
-
}
|
|
33
28
|
/** A cookie scope an earlier deploy wrote the session at. */
|
|
34
29
|
interface CookieScope {
|
|
35
30
|
readonly domain?: string;
|
|
@@ -44,8 +39,6 @@ interface CookieWrite {
|
|
|
44
39
|
readonly value: string;
|
|
45
40
|
readonly options: CookieOptions;
|
|
46
41
|
}
|
|
47
|
-
/** Headers that keep responses carrying session cookies out of shared caches. */
|
|
48
|
-
declare const AUTH_CACHE_HEADERS: Readonly<Record<string, string>>;
|
|
49
42
|
/** `sb-<first label of the hostname>-auth-token`, the supabase-js default. */
|
|
50
43
|
declare function sessionCookieName(url: string): string;
|
|
51
44
|
declare function parseCookies(header: string | null | undefined): CookieRecord[];
|
|
@@ -57,33 +50,88 @@ declare function serializeCookie(write: CookieWrite): string;
|
|
|
57
50
|
* no session.
|
|
58
51
|
*/
|
|
59
52
|
declare function readSession(cookies: readonly CookieRecord[], name: string): StoredSession | null;
|
|
53
|
+
/** Applies cookie writes to a cookie list, as the next request would see it. */
|
|
54
|
+
declare function applyCookieWrites(cookies: readonly CookieRecord[], writes: readonly CookieWrite[]): CookieRecord[];
|
|
60
55
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
56
|
+
* A verified user session, frozen and serializable. Times are epoch seconds,
|
|
57
|
+
* like `AuthSession.expiresAt`, because the snapshot crosses `use cache`
|
|
58
|
+
* serialization (ADR 0095).
|
|
64
59
|
*/
|
|
65
|
-
|
|
60
|
+
interface SessionSnapshot<C = unknown> {
|
|
61
|
+
readonly accessToken: string;
|
|
62
|
+
readonly claims: Readonly<JWTClaims & C>;
|
|
63
|
+
/** The Auth session id (`session_id`), or `null` for tokens without one. */
|
|
64
|
+
readonly sessionId: string | null;
|
|
65
|
+
readonly userId: string;
|
|
66
|
+
/** Seconds since epoch, from `exp`. */
|
|
67
|
+
readonly expiresAt: number | null;
|
|
68
|
+
/** Seconds since epoch, from `iat`. */
|
|
69
|
+
readonly issuedAt: number | null;
|
|
70
|
+
/** The `authz_ver` claim, or `null` when the token has none. */
|
|
71
|
+
readonly authzVersion: number | null;
|
|
72
|
+
}
|
|
73
|
+
/** Verified JWT claims, read by name. */
|
|
74
|
+
type Claims = Readonly<Record<string, unknown>>;
|
|
75
|
+
/** The `iat` claim in epoch seconds, or `null`. */
|
|
76
|
+
declare function issuedAtOf(claims: Claims): number | null;
|
|
77
|
+
/** The `authz_ver` claim as a number, or `null` when absent or malformed. */
|
|
78
|
+
declare function authzVersionOf(claims: Claims): number | null;
|
|
66
79
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
80
|
+
* Whether `value` is a snapshot this process built from a verified token. A
|
|
81
|
+
* snapshot that crossed serialization, or was built by hand, is not.
|
|
69
82
|
*/
|
|
70
|
-
declare function
|
|
83
|
+
declare function isSessionSnapshot(value: unknown): value is SessionSnapshot;
|
|
84
|
+
/** The snapshot of a verified user, or `null` for any other caller. */
|
|
85
|
+
declare function snapshotOf<C, P>(auth: AuthState<C, P>): SessionSnapshot<C> | null;
|
|
71
86
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
87
|
+
* A stable cache key for a session: user, Auth session and authorization
|
|
88
|
+
* version. It never contains the token, which rotates hourly and would churn
|
|
89
|
+
* every key.
|
|
75
90
|
*/
|
|
76
|
-
declare function
|
|
91
|
+
declare function sessionCacheKey(snapshot: Pick<SessionSnapshot, "userId" | "sessionId" | "authzVersion">): string;
|
|
92
|
+
interface SessionMemoOptions {
|
|
93
|
+
/** The most sessions kept; the least recently used goes first. Default: 1000. */
|
|
94
|
+
readonly max?: number;
|
|
95
|
+
/**
|
|
96
|
+
* Milliseconds an entry lives at most. It never outlives the token's `exp`.
|
|
97
|
+
* Default: 300000 (5 minutes).
|
|
98
|
+
*/
|
|
99
|
+
readonly ttlMs?: number;
|
|
100
|
+
/** Epoch milliseconds. */
|
|
101
|
+
readonly now?: () => number;
|
|
102
|
+
}
|
|
103
|
+
interface SessionMemoStats {
|
|
104
|
+
/** Lookups answered by a stored or in-flight verification. */
|
|
105
|
+
readonly hits: number;
|
|
106
|
+
/** Lookups that ran a verification. */
|
|
107
|
+
readonly misses: number;
|
|
108
|
+
readonly size: number;
|
|
109
|
+
}
|
|
77
110
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* ignore writes for scopes the host doesn't own, but a scope equal to the
|
|
82
|
-
* current one clears the live session.
|
|
111
|
+
* Verified sessions by their access token. Every `use cache` scope of a request
|
|
112
|
+
* resolves the same token; the first one verifies it and the others await the
|
|
113
|
+
* same promise.
|
|
83
114
|
*/
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
|
|
115
|
+
interface SessionMemo<T> {
|
|
116
|
+
/**
|
|
117
|
+
* The stored value for `token`, else `load()`'s. A `null` result is not
|
|
118
|
+
* stored. Read the clock (call this) only after the request's dynamic APIs
|
|
119
|
+
* (`cookies()`) have been awaited.
|
|
120
|
+
*/
|
|
121
|
+
get(token: string, load: () => Promise<T | null>): Promise<T | null>;
|
|
122
|
+
/** Stores a value verified elsewhere (a refresh, a sign-in). */
|
|
123
|
+
seed(token: string, value: T): Promise<void>;
|
|
124
|
+
/** Drops every entry `match` returns true for (a user's sessions). */
|
|
125
|
+
evict(match: (value: T) => boolean): void;
|
|
126
|
+
clear(): void;
|
|
127
|
+
stats(): SessionMemoStats;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* A bounded LRU of verified sessions. Keys derive only from the token, never
|
|
131
|
+
* from a user id or a header, so one instance can serve many users at once
|
|
132
|
+
* (Fluid compute). Create it once at module scope; `createServer` owns one.
|
|
133
|
+
*/
|
|
134
|
+
declare function sessionMemo<T>(expiresAt: (value: T) => number | null, options?: SessionMemoOptions): SessionMemo<T>;
|
|
87
135
|
/**
|
|
88
136
|
* Who is calling. `C` is the claims type from `betterSupabase.claims(schema)`;
|
|
89
137
|
* the verified payload keeps every JWT claim and adds the schema's output. `P`
|
|
@@ -181,7 +229,14 @@ interface ResolveAuthOptions {
|
|
|
181
229
|
*/
|
|
182
230
|
readonly secret?: boolean | readonly string[];
|
|
183
231
|
readonly audience?: string | string[];
|
|
184
|
-
|
|
232
|
+
/**
|
|
233
|
+
* The `iss` a token must carry. By default a token whose `iss` is not the
|
|
234
|
+
* project's Auth URL (`<url>/auth/v1`) is rejected, so a token another
|
|
235
|
+
* project signed with a shared key never verifies here; a token without `iss`
|
|
236
|
+
* (only a holder of the keys can sign one) still does. Set it to require the
|
|
237
|
+
* claim, or `false` to skip the check.
|
|
238
|
+
*/
|
|
239
|
+
readonly issuer?: string | string[] | false;
|
|
185
240
|
readonly cookie?: {
|
|
186
241
|
readonly name?: string;
|
|
187
242
|
readonly options?: CookieOptions;
|
|
@@ -240,16 +295,22 @@ interface ResolveAuthOptions {
|
|
|
240
295
|
* Auth whether the session ended (`ended`). For `Server-Timing`.
|
|
241
296
|
*/
|
|
242
297
|
readonly onTiming?: (phase: ResolvePhase, ms: number) => void;
|
|
243
|
-
/**
|
|
244
|
-
* With `refresh`, expire session chunks the readable session doesn't use (a
|
|
245
|
-
* leftover `.2` after a shorter rewrite) on every request, not only when the
|
|
246
|
-
* session is rewritten. Defaults to true.
|
|
247
|
-
*/
|
|
248
|
-
readonly pruneChunks?: boolean;
|
|
298
|
+
/** The `fetch` for Auth calls and the JWKS. Defaults to the global one. */
|
|
249
299
|
readonly fetch?: typeof fetch;
|
|
250
300
|
/** Epoch milliseconds, the unit JWT `exp` and `iat` math needs. */
|
|
251
301
|
readonly now?: () => number;
|
|
302
|
+
/**
|
|
303
|
+
* The verified-token memo (ADR 0095): a token it holds skips the signature
|
|
304
|
+
* and schema checks. A hit skips the audience, issuer and schema checks too,
|
|
305
|
+
* so one memo serves one verifier configuration; `createServer` owns one per
|
|
306
|
+
* server. Without it every call verifies.
|
|
307
|
+
*/
|
|
308
|
+
readonly memo?: SessionMemo<VerifiedUser>;
|
|
252
309
|
}
|
|
310
|
+
/** A verified user, as the verified-token memo stores it. */
|
|
311
|
+
type VerifiedUser<C = unknown, P = unknown> = Extract<AuthState<C, P>, {
|
|
312
|
+
readonly kind: "user";
|
|
313
|
+
}>;
|
|
253
314
|
type ResolvePhase = "parse" | "verify" | "refresh" | "ended";
|
|
254
315
|
/** Why Auth rejected a session `verifySession` checked. */
|
|
255
316
|
type SessionRejection = "session_not_found" | "user_banned";
|
|
@@ -284,4 +345,4 @@ interface AuthResolution<C = unknown, P = unknown> {
|
|
|
284
345
|
*/
|
|
285
346
|
declare function clientIp(request: Request): string | undefined;
|
|
286
347
|
declare function resolveAuth(request: Request, options: ResolveAuthOptions): Promise<AuthResolution>;
|
|
287
|
-
export {
|
|
348
|
+
export { serializeCookie as A, CookieScope as C, applyCookieWrites as D, StoredSession as E, parseCookies as O, CookieRecord as S, SessionEncoding as T, issuedAtOf as _, ResolveAuthOptions as a, snapshotOf as b, SessionRejection as c, SessionMemo as d, SessionMemoOptions as f, isSessionSnapshot as g, authzVersionOf as h, InvalidReason as i, sessionCookieName as j, readSession as k, clientIp as l, SessionSnapshot as m, AuthResolver as n, ResolvePhase as o, SessionMemoStats as p, AuthState as r, ResolvedState as s, AuthResolution as t, resolveAuth as u, sessionCacheKey as v, CookieWrite as w, CookieOptions as x, sessionMemo as y };
|