better-supabase 0.32.0 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -10
- package/codemods/0.32.json +31 -0
- package/dist/{adapter-CPPN80mx.js → adapter-CWzyKepA.js} +45 -16
- package/dist/{agents-BEiBtYmh.d.ts → agents-DXiOPB3V.d.ts} +4 -4
- package/dist/{ai-cache-FMYzw7lW.d.ts → ai-cache-CLiAXCPH.d.ts} +4 -4
- package/dist/{ai-chat-B_P--Ie2.d.ts → ai-chat-DlcBdOhJ.d.ts} +4 -4
- package/dist/{ai-schedules-D_q1iclL.d.ts → ai-schedules-Drx2KRTn.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/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/mcp/index.d.ts +3 -3
- package/dist/ai-sdk/memory/index.d.ts +3 -3
- package/dist/ai-sdk/workflow/index.d.ts +3 -3
- package/dist/{api-keys-u2sXB-CZ.d.ts → api-keys-DbIbkGxx.d.ts} +4 -4
- package/dist/{api-CwzVbbw4.d.ts → api-myq2e9t5.d.ts} +5 -6
- package/dist/{app-tables-DomvYx5b.d.ts → app-tables-IrglDJCs.d.ts} +1 -1
- package/dist/{approvals-idpuhILk.d.ts → approvals-DZoGtNFv.d.ts} +5 -5
- package/dist/{assistant-CMKsaeJd.d.ts → assistant-BEbRPjhn.d.ts} +2 -2
- package/dist/astro/index.d.ts +7 -8
- package/dist/astro/index.js +5 -5
- package/dist/{auth-module-CVo86UKh.js → auth-module-CqXdm8qD.js} +1 -1
- package/dist/{authorization-CYu_UKX4.d.ts → authorization-BlmDNI2b.d.ts} +12 -1
- package/dist/{authorization-hooks-CldgvzBZ.d.ts → authorization-hooks-CxwsRnfV.d.ts} +2 -2
- package/dist/{authorizer-D6po_XZA.js → authorizer-BtIPDO-c.js} +33 -10
- package/dist/better-result/index.d.ts +3 -3
- package/dist/{bind-8LYVJE5W.d.ts → bind-DP-KLgYI.d.ts} +7 -7
- package/dist/{block-env-BsLgZL2l.d.ts → block-env-CJ38ZSTP.d.ts} +4 -4
- package/dist/{block-helpers-JxiD1iw4.d.ts → block-helpers-disoUWCp.d.ts} +1 -1
- package/dist/{block-hooks-CJP5kGEa.d.ts → block-hooks-DrA_d1dJ.d.ts} +2 -2
- package/dist/{block-subjects-SyJwfgrX.d.ts → block-subjects-Br2MQNFn.d.ts} +1 -1
- package/dist/block-tables-CQTU71zn.d.ts +34 -0
- package/dist/{block-transport-Bbf1ZZre.d.ts → block-transport-BEtC_Kis.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-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 +4 -108
- package/dist/blocks/approvals/index.d.ts +4 -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/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/bookings/index.d.ts +4 -4
- package/dist/blocks/bulk/index.d.ts +4 -4
- package/dist/blocks/calendar/index.d.ts +5 -5
- package/dist/blocks/catalog/index.d.ts +6 -6
- 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/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 +6 -6
- package/dist/blocks/entitlements/index.d.ts +6 -6
- package/dist/blocks/entitlements/index.js +2 -23
- package/dist/blocks/expenses/index.d.ts +5 -5
- package/dist/blocks/field-history/index.d.ts +4 -4
- package/dist/blocks/flags/index.d.ts +5 -5
- package/dist/blocks/flags/index.js +1 -1
- 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 +10 -10
- 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 +8 -8
- package/dist/blocks/knowledge/index.d.ts +3 -3
- 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 +5 -5
- 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/memberships/index.js +1 -1
- package/dist/blocks/memory/index.d.ts +4 -4
- 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/numbering/index.d.ts +4 -4
- package/dist/blocks/oauth-server/index.d.ts +5 -5
- 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/organizations/index.js +1 -1
- package/dist/blocks/outbox/index.d.ts +4 -4
- package/dist/blocks/passes/index.d.ts +8 -8
- package/dist/blocks/permissions/index.d.ts +12 -7
- package/dist/blocks/permissions/index.js +6 -6
- 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 +8 -8
- 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 +8 -8
- 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/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/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/signatures/index.d.ts +5 -5
- package/dist/blocks/signing-keys/index.d.ts +4 -4
- 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 +5 -5
- 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/versions/index.d.ts +6 -6
- package/dist/blocks/waitlist/index.d.ts +5 -5
- package/dist/blocks/webhooks/index.d.ts +13 -13
- package/dist/blocks/workflow-editor/index.d.ts +9 -9
- package/dist/blocks/workflow-editor/index.js +2 -1
- package/dist/blocks/workflows/index.d.ts +7 -7
- package/dist/{bookings-DG443336.d.ts → bookings-Br0VXzaf.d.ts} +3 -3
- package/dist/{bucket-Clq5xINQ.d.ts → bucket-DvG66r5G.d.ts} +1 -1
- package/dist/chat-sdk/index.d.ts +6 -6
- package/dist/claim-names-BKig1LOk.js +24 -0
- package/dist/claims/index.d.ts +8 -0
- package/dist/claims/index.js +8 -0
- package/dist/{claims-DRmafYVK.js → claims-CqTr_N1n.js} +13 -5
- package/dist/cli/{add-fzRPyIED.js → add-BDLLVLI8.js} +3 -2
- package/dist/cli/add-BaOCKKt6.js +1 -0
- package/dist/cli/{add-ChoHyBhz.js → add-D2pKTbPw.js} +11 -11
- package/dist/cli/{app-table-files-C0OtdUVu.js → app-table-files-CimWi_eh.js} +3 -3
- package/dist/cli/{providers-DpfoF3VC.js → authorization-DJkkOjjG.js} +25 -93
- package/dist/cli/{backfill-Dq2XMXf9.js → backfill-B1xAsdL4.js} +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-DVhJOzFj.js → blocks-DtZtn-R4.js} +1 -1
- package/dist/cli/{blocks-CCzp0eAH.js → blocks-rBeis04I.js} +1 -1
- package/dist/cli/{cache-CoC-1i1O.js → cache-CvBRwv02.js} +1 -1
- package/dist/cli/{codemod-pyf6HmS9.js → codemod-DYbVbJ-e.js} +5 -4
- package/dist/cli/{config-D0m2rQqk.js → config-CrwCec-B.js} +1 -1
- package/dist/cli/{config-Dyl3iX3u.js → config-DrrkMihk.js} +1 -0
- package/dist/cli/{content-mapper-ChSVT9Tq.js → content-mapper-DrhtDsAm.js} +2 -2
- package/dist/cli/{db-dFzhcozO.js → db-Diy1OebO.js} +2 -2
- package/dist/cli/{doctor-BKZsztFV.js → doctor-Dn4TzGmw.js} +59 -19
- package/dist/cli/{gen-BN_eh6rE.js → gen-BbeS0KgF.js} +14 -14
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-CaDDt8F6.js → init-C30xdMSs.js} +9 -9
- package/dist/cli/{live-KU41LMGE.js → live-Ctc8Qh9Y.js} +2 -2
- package/dist/cli/{mcp-C_m-TpLJ.js → mcp-5J0kUOtD.js} +2 -2
- package/dist/cli/{metadata-Bq4ra7zo.js → metadata-DxhUNctA.js} +3 -3
- package/dist/cli/{migrate-DHG2Qz_K.js → migrate-ockrh3UX.js} +1 -1
- package/dist/cli/{migration-safety-STVbiKhz.js → migration-safety-CLrqC0D-.js} +2 -2
- package/dist/cli/{migrations-O1QZoMiH.js → migrations-CZTg2UJM.js} +2 -2
- package/dist/cli/{module-migration-DB9ntWM-.js → module-migration-BptQzmj2.js} +2 -2
- package/dist/cli/powersync-CmsXOuui.js +1 -0
- package/dist/cli/{powersync-CN3QPF2K.js → powersync-DIvsipKr.js} +3 -3
- package/dist/cli/{print-DG7TRCi8.js → print-DdHt8xCc.js} +2 -2
- package/dist/cli/providers-k-1cEna6.js +99 -0
- package/dist/cli/{prune-workflows-DcNJUS1m.js → prune-workflows-Ddv-GfkO.js} +3 -3
- package/dist/cli/{remove-BpfYqP45.js → remove-DEEQDoc7.js} +5 -5
- package/dist/cli/{render-Q7jnLn_C.js → render-SjSVz8yK.js} +7 -4
- package/dist/cli/{run-D6K-qQIX.js → run-DdhIK7-K.js} +9 -8
- package/dist/cli/{run-9NfabanB.js → run-Ixt9mEb6.js} +29 -29
- package/dist/cli/{seed-B4H0Lco9.js → seed-BpaqqyO8.js} +2 -2
- package/dist/cli/seed-ByLneY1H.js +1 -0
- package/dist/cli/{shared-PrvYREVy.js → shared-p6sxli_5.js} +1 -1
- package/dist/cli/{snapshot-UfJsqfys.js → snapshot-Dd_8B9g-.js} +3 -3
- package/dist/cli/{source-F3YTVvFo.js → source-BYvVe_Es.js} +1 -1
- package/dist/cli/{source-args-DJMrW_jW.js → source-args-Bz5QQne2.js} +1 -1
- package/dist/cli/{spec-DsLQuJKp.js → spec-BxQgllJY.js} +2 -2
- package/dist/cli/{spec-HQOBVbEO.js → spec-liRzcZTa.js} +1 -1
- package/dist/cli/{sql-layout-CZ66pY8j.js → sql-layout-DHwiUOaD.js} +2 -2
- package/dist/cli/{sync-B12wbtFd.js → sync-CreQWj53.js} +4 -4
- package/dist/cli/{upgrade-AgUXFDo6.js → upgrade-3NQOUO1_.js} +5 -5
- package/dist/cli/{upgrade-C20z49De.js → upgrade-U7IKj45h.js} +2 -2
- package/dist/cli/{version-DEUWW8cv.js → version-mBwP-aMG.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 +1 -1
- package/dist/{client-BLor58Je.js → client-Bky2z09B.js} +1 -1
- package/dist/{cloud-event-bcaMqEbN.d.ts → cloud-event-DXWmXrus.d.ts} +1 -1
- package/dist/{compiler-CWishtY2.d.ts → compiler-qlXlokKn.d.ts} +2 -2
- package/dist/{composite-ClLWZIwX.d.ts → composite-CIxjVcL1.d.ts} +7 -7
- package/dist/{composite-BZMkWNOQ.js → composite-D2JnIiHt.js} +2 -2
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.js +2 -2
- package/dist/{config-BhExAhNK.js → config-Bu6pwqcO.js} +1 -1
- package/dist/{connectors-BImAu75R.d.ts → connectors-Cf2LeAuZ.d.ts} +4 -4
- package/dist/{context-DcxfrCml.d.ts → context-D7jICqdN.d.ts} +15 -3
- package/dist/contract/index.d.ts +16 -0
- package/dist/contract/index.js +0 -0
- package/dist/{controller-D_UJBaEU.d.ts → controller-DxtxeYdf.d.ts} +1 -1
- package/dist/{conversion-7U1WeLxK.d.ts → conversion-C9rndpEI.d.ts} +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +1 -1
- package/dist/create/lite/index.d.ts +4 -4
- package/dist/create/lite/index.js +1 -1
- package/dist/credentials/index.d.ts +4 -4
- package/dist/{data-engine-B-D6bdyx.d.ts → data-engine-CMENsp3d.d.ts} +1 -1
- package/dist/{define-3RbqoF1S.d.ts → define-ITQA71fw.d.ts} +5 -5
- package/dist/{define-block-B_i9VPcc.d.ts → define-block-COmMkx2x.d.ts} +12 -12
- package/dist/{delegation-BRHHXERz.js → delegation-C2rLpkHO.js} +2 -7
- package/dist/{documents-6ov2gWh3.d.ts → documents-DeZw83ue.d.ts} +3 -3
- package/dist/edge/index.d.ts +13 -13
- package/dist/edge/index.js +9 -9
- package/dist/elysia/index.d.ts +1 -1
- package/dist/elysia/index.js +1 -1
- package/dist/{embeddings-K0lH--nt.d.ts → embeddings-rVR2AKVz.d.ts} +1 -1
- package/dist/{ended-CCoE7XXY.d.ts → ended-NC_ZesY4.d.ts} +2 -2
- package/dist/entitlements-Dydkg-TV.js +47 -0
- package/dist/{entitlements-XwpuBbKN.d.ts → entitlements-w04ivvAy.d.ts} +21 -3
- package/dist/{envelope-DAtaFJue.js → envelope-CapD-JtH.js} +3 -2
- package/dist/eve/index.d.ts +9 -9
- package/dist/eve/index.js +2 -2
- package/dist/{eve-Cf-QRGij.d.ts → eve-DIKjuPp5.d.ts} +2 -2
- package/dist/events/index.d.ts +3 -3
- package/dist/{events-CfDdOwqg.d.ts → events-DVt3Z9hw.d.ts} +1 -1
- package/dist/{executor-ynEwaUZy.d.ts → executor-CFmee_nV.d.ts} +1 -1
- package/dist/{executor-CAhykadW.d.ts → executor-CHnoKOxk.d.ts} +4 -4
- package/dist/{executor-CbDX34I9.d.ts → executor-DqNRrFxx.d.ts} +1 -1
- package/dist/expo/index.d.ts +4 -4
- package/dist/expo/index.js +3 -3
- package/dist/{extension-LgaDPMJs.js → extension-Z8Pe7fXA.js} +1 -1
- package/dist/{field-errors-tQr-anYL.d.ts → field-errors-DKCaSlZw.d.ts} +10 -10
- package/dist/{fields-AKKMirg_.d.ts → fields-CAVk9dxX.d.ts} +1 -1
- package/dist/{filter-evaluate-Bhq99aEN.d.ts → filter-evaluate-Bz3Fzhz2.d.ts} +1 -1
- package/dist/{filter-query-B7A4l2xn.d.ts → filter-query-DV-x8fio.d.ts} +1 -1
- package/dist/{flags-D0npSE-5.js → flags-0EXDD3Iz.js} +1 -1
- package/dist/{flags-B5B4mkZV.d.ts → flags-6emyAXly.d.ts} +2 -2
- package/dist/flags-sdk/index.d.ts +2 -2
- package/dist/flags-sdk/index.js +1 -1
- package/dist/{framework-CyDn_SXR.d.ts → framework-BFlaPuvv.d.ts} +8 -7
- package/dist/{framework-B1h-uquj.js → framework-ChzJYkJW.js} +3 -2
- package/dist/{gateway-Cg_MgGen.d.ts → gateway-DaekJ_Me.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 +14 -13
- package/dist/hono/index.js +9 -8
- package/dist/{inbox-BmSA9K01.d.ts → inbox-DavCzW7b.d.ts} +5 -5
- package/dist/{index-D2BGCjIz.d.ts → index-BIAtapnD.d.ts} +5 -5
- package/dist/{index-B2871MHr.d.ts → index-BZCmy767.d.ts} +5 -5
- package/dist/{index-B5_J-MaK.d.ts → index-BdC2IqkU.d.ts} +5 -5
- package/dist/{index-xCpjvDVm.d.ts → index-BgkHbf9C.d.ts} +14 -14
- package/dist/{index-CRrBZtKm.d.ts → index-BvcMQYL-.d.ts} +1 -1
- package/dist/index-CbUXFzQV.d.ts +107 -0
- package/dist/index-CiE37wKX.d.ts +289 -0
- package/dist/{index-lazpPVr0.d.ts → index-D18su_r5.d.ts} +3 -3
- package/dist/{index-D66_dYVi.d.ts → index-DU0UwWvL.d.ts} +4 -4
- package/dist/{index-CTpEQvIv.d.ts → index-Dvpu22CJ.d.ts} +1 -1
- package/dist/index-IKfbX_39.d.ts +23 -0
- package/dist/{index-DzBFdI9I.d.ts → index-M1izbwbN.d.ts} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/{kit-CVZDd1X9.js → kit-9pZP5iLU.js} +42 -11
- package/dist/{kit-CJKo0soh.d.ts → kit-OgFOW9rX.d.ts} +4 -4
- package/dist/{knowledge-BUwbpS8I.d.ts → knowledge-BBC2sfAY.d.ts} +5 -5
- package/dist/lint/index.d.ts +1 -1
- package/dist/lint/index.js +1 -1
- package/dist/list/index.d.ts +3 -3
- package/dist/{list-query-CZ-K5aHX.d.ts → list-query-C7V8kUaD.d.ts} +3 -3
- package/dist/mapper/bin.js +6 -6
- package/dist/mcp/index.d.ts +4 -289
- package/dist/mcp/index.js +52 -18
- package/dist/mcp/sdk/index.d.ts +6 -6
- package/dist/mcp/sdk/index.js +2 -2
- package/dist/{messaging-DMhtGxVv.d.ts → messaging-D5z2TR37.d.ts} +4 -4
- 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 +28 -26
- package/dist/next/index.js +11 -10
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +1 -1
- package/dist/{operations-D51ONRvR.d.ts → operations-CsCwruKT.d.ts} +1 -1
- package/dist/orpc/index.d.ts +8 -8
- package/dist/orpc/index.js +8 -8
- package/dist/otel/index.d.ts +2 -2
- package/dist/otel/index.js +4 -4
- package/dist/{outbox-C44Aa94K.d.ts → outbox-7zgh-7nw.d.ts} +4 -4
- package/dist/{permissions-B9aZZ9LR.js → permissions-BDt27oYF.js} +19 -14
- package/dist/permissions-BP593xxk.d.ts +44 -0
- package/dist/{pool-Bji4lnQM.d.ts → pool-D-4HyhuW.d.ts} +3 -3
- package/dist/{ports-zFqRNXVJ.d.ts → ports-BVLhLUvR.d.ts} +1 -1
- package/dist/{ports-C-hdygkZ.js → ports-CmEXVqhg.js} +1 -1
- package/dist/postgres/index.d.ts +4 -4
- package/dist/{postgrest-2WjRrtmX.d.ts → postgrest-DZtM2nIS.d.ts} +1 -1
- package/dist/powersync/index.d.ts +6 -6
- package/dist/preset/index.d.ts +3 -3
- package/dist/{project-oNHntJ6T.js → project-D4ArwcS5.js} +2 -2
- package/dist/{provider-CH8McX3b.d.ts → provider-BI0KC4u5.d.ts} +1 -1
- package/dist/{push-token-a3Ev1U3L.d.ts → push-token-B0j171on.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/react/index.d.ts +8 -8
- 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 +8 -8
- package/dist/react/server.js +3 -3
- package/dist/react/session.d.ts +2 -2
- package/dist/{react-C40oomj7.js → react-COIov1yC.js} +1 -1
- package/dist/react-router/index.d.ts +6 -7
- package/dist/react-router/index.js +6 -6
- package/dist/realtime/index.d.ts +6 -6
- package/dist/realtime/index.js +1 -1
- package/dist/{record-form-DCIui2Ol.d.ts → record-form-DU2EoVsv.d.ts} +1 -1
- package/dist/{recordings-Dlpq8jUG.d.ts → recordings-D69Va7gP.d.ts} +1 -1
- package/dist/records/index.d.ts +9 -9
- package/dist/{refresh-BK9epzeC.d.ts → refresh-BtbC2rZe.d.ts} +1 -1
- package/dist/{refusal-DhX7Xpfp.js → refusal-5c6UMpUP.js} +3 -3
- package/dist/{refusal-DEuFVi4s.d.ts → refusal-CGi-0Q18.d.ts} +3 -3
- package/dist/{resolve-DVOtYTAc.d.ts → resolve--LfVoOMg.d.ts} +1 -1
- package/dist/{resource-Cn6Bn-_o.js → resource-BbWk4hoP.js} +59 -15
- package/dist/{resource-BfsTJnxZ.d.ts → resource-DWllVW8k.d.ts} +6 -1
- package/dist/{resource-execute-DQRS7PFt.d.ts → resource-execute-DUBYKTYU.d.ts} +2 -2
- package/dist/{resource-types-DF6KDAZM.d.ts → resource-types-RgaljPs0.d.ts} +4 -4
- package/dist/{resources-CeY53FiJ.d.ts → resources-Bki1J4jy.d.ts} +2 -2
- package/dist/{resources-B0Vy7_wv.js → resources-DYSx9NYM.js} +1 -1
- package/dist/{respond-CkwkvFdZ.d.ts → respond-BYOV7KZp.d.ts} +1 -1
- package/dist/{respond-C2qvP1wv.js → respond-DLH4tD2d.js} +1 -1
- package/dist/{sales-lines-Bde9cV5F.d.ts → sales-lines-DuNVoKHA.d.ts} +1 -1
- package/dist/{sandboxes-DDWuD9fh.d.ts → sandboxes-B2hBoBvJ.d.ts} +1 -1
- package/dist/{scores-Bql-ABl0.d.ts → scores-FAORS4qU.d.ts} +5 -5
- package/dist/server/index.d.ts +31 -28
- package/dist/server/index.js +15 -11
- package/dist/{server-types-C3p3jUqr.d.ts → server-types-C2hlvhP4.d.ts} +39 -101
- package/dist/{session-BOch2y2z.d.ts → session-B4VasaAA.d.ts} +6 -6
- package/dist/{session-status-DRBRnZHx.d.ts → session-status-D8CBxCqv.d.ts} +2 -2
- package/dist/{sign-in-BmigClRh.js → sign-in-BMm1xhKq.js} +1 -1
- package/dist/{sign-in-Dxyi4aKu.d.ts → sign-in-CX1a5i2P.d.ts} +3 -34
- package/dist/{sign-in-CXOg2Dwb.js → sign-in-CxdoTEp5.js} +2 -2
- package/dist/{signers-Cz5ZhTHH.d.ts → signers-6ih6i9aq.d.ts} +4 -4
- package/dist/{signing-keys-DS-rIVzz.d.ts → signing-keys-De09WNJ3.d.ts} +2 -2
- package/dist/snapshot-BGsJw9xn.d.ts +83 -0
- package/dist/{view-YnesSUEa.js → snapshot-CVMSyTHH.js} +3 -109
- package/dist/solid/index.d.ts +10 -10
- package/dist/solid/index.js +1 -1
- package/dist/solid-start/index.d.ts +6 -7
- package/dist/solid-start/index.js +5 -5
- package/dist/spec/index.d.ts +2 -2
- package/dist/sql/index.d.ts +6 -5
- package/dist/sql/index.js +2 -2
- package/dist/{sql-BPV51R3A.js → sql-DiUP7fKX.js} +162 -77
- package/dist/sqlite/index.d.ts +3 -3
- package/dist/{sso-BEvNf1oW.d.ts → sso-CuzAjsc8.d.ts} +3 -3
- package/dist/ssr/index.d.ts +5 -5
- package/dist/ssr/index.js +1 -1
- 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-DWkVSbFr.d.ts → subject-readers-BlD8tALG.d.ts} +2 -2
- package/dist/{subjects-vci6Wufh.d.ts → subjects-Bv2dPflD.d.ts} +3 -3
- package/dist/{support-rZbdU35s.d.ts → support-DxYI6sDM.d.ts} +4 -4
- package/dist/{support-view-WY4Y-A40.d.ts → support-view-DSmCett7.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 -8
- package/dist/sveltekit/index.js +5 -5
- package/dist/{tags-BVLELhOf.d.ts → tags--k2fbPfO.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +3 -3
- package/dist/tanstack-start/index.d.ts +6 -7
- package/dist/tanstack-start/index.js +5 -5
- package/dist/{tenant-RKvGBB-U.d.ts → tenant-B3IIq8Eq.d.ts} +4 -5
- package/dist/tenant-Beqd7TTq.js +48 -0
- package/dist/testing/index.d.ts +71 -32
- package/dist/testing/index.js +136 -16
- package/dist/{timeline-Ck8OFuAN.d.ts → timeline-Bq658xsi.d.ts} +5 -5
- package/dist/{topic-Dr8VYE4D.d.ts → topic-D2MyBeaI.d.ts} +5 -5
- package/dist/{topic-BBBCVLyS.js → topic-k17VvXRj.js} +1 -1
- package/dist/{types-Pv5WPfIC.d.ts → types-BBqP9H6w.d.ts} +4 -4
- package/dist/{types-CCmW3MqI.d.ts → types-BFEKRmEK.d.ts} +2 -2
- package/dist/{types-WZUVlTXs.d.ts → types-BkYEUWdz.d.ts} +189 -1
- package/dist/{types-D9FY9qSJ.d.ts → types-C8UyJOPJ.d.ts} +3 -3
- package/dist/{types-CvlJNzX4.d.ts → types-DCoqai8o.d.ts} +4 -4
- package/dist/{types-DWZubmwk.d.ts → types-Dh2OGEW5.d.ts} +10 -10
- package/dist/{types-BiedVwz_.d.ts → types-TH3zlMiM.d.ts} +1 -1
- package/dist/{types-CL-z0A4K.d.ts → types-d0JBRTAg.d.ts} +7 -7
- package/dist/{undo-BdoEJ6Ot.d.ts → undo-22ofP6Zp.d.ts} +2 -2
- package/dist/{usage-D27Uw426.d.ts → usage-CNCT6_3D.d.ts} +4 -4
- package/dist/{vault-Dx0LaNMX.d.ts → vault-yGQD5Rdl.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-DnL0Fgu0.d.ts → verify-BQu3eBNW.d.ts} +2 -2
- package/dist/view-BfEqjZJ_.js +117 -0
- package/dist/{view-DmEZA1fL.d.ts → view-Cy2XxYp1.d.ts} +14 -2
- package/dist/vue/index.d.ts +10 -10
- package/dist/vue/index.js +1 -1
- package/dist/{watch-topic-BB7T05sc.d.ts → watch-topic-q6krNw0T.d.ts} +1 -1
- package/dist/workflow-sdk/builder/index.d.ts +3 -3
- package/dist/workflow-sdk/builder/index.js +1 -1
- package/dist/workflow-sdk/index.d.ts +1 -1
- package/dist/workflow-sdk/index.js +1 -1
- package/dist/workflow-sdk/world/index.d.ts +1 -1
- package/dist/{workflow-sdk-D5zRSwxh.js → workflow-sdk-q2jnEaAJ.js} +2 -2
- package/dist/{workflow-sdk-DMpVSMB7.d.ts → workflow-sdk-yIkECybp.d.ts} +3 -3
- package/dist/{workflows-DKTw2PZo.d.ts → workflows-BljkWRxE.d.ts} +3 -3
- package/dist/yjs/index.d.ts +2 -2
- package/dist/yjs/index.js +1 -1
- package/package.json +12 -1
- package/schemas/config-v1.json +3 -0
- package/schemas/doctor-report-v1.json +1 -0
- package/dist/authorizer-AswD5q6g.d.ts +0 -116
- package/dist/cli/add-DlYL-1mF.js +0 -1
- package/dist/cli/powersync-DfeGl5N1.js +0 -1
- package/dist/cli/seed-BIB6-WPa.js +0 -1
- package/dist/tenant-BR7fvPj7.js +0 -26
|
@@ -1,5 +1,174 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, f as Result } from "./result-DTOQRyGY.js";
|
|
3
|
+
type JsonObject = Readonly<Record<string, unknown>>;
|
|
4
|
+
/** Who asks (AuthZEN Subject). Always built from the verified request context. */
|
|
5
|
+
interface AuthorizationSubject {
|
|
6
|
+
/**
|
|
7
|
+
* `user`, `service`, `anon`, or `agent` for a delegated token with an `act`
|
|
8
|
+
* chain.
|
|
9
|
+
*/
|
|
10
|
+
readonly type: string;
|
|
11
|
+
readonly id: string;
|
|
12
|
+
/**
|
|
13
|
+
* `role`, `email` and `impersonator` when set, and `claims`: the verified
|
|
14
|
+
* access-token claims (a frozen copy, including what a token hook wrote, such
|
|
15
|
+
* as `memberships`, `roles` and `act`). The client never supplies them.
|
|
16
|
+
* Anonymous subjects have no properties.
|
|
17
|
+
*/
|
|
18
|
+
readonly properties?: JsonObject;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Where `resource.properties` came from: `loaded` from the database through the
|
|
22
|
+
* caller's client, or `input` the caller sent, which an authorizer must not
|
|
23
|
+
* trust as stored state.
|
|
24
|
+
*/
|
|
25
|
+
type AuthorizationResourceSource = "loaded" | "input";
|
|
26
|
+
/**
|
|
27
|
+
* The write a request makes: the stored row, when there is one, and the new
|
|
28
|
+
* values.
|
|
29
|
+
*/
|
|
30
|
+
interface AuthorizationChange {
|
|
31
|
+
/** The row before the write; absent for a create. */
|
|
32
|
+
readonly current?: JsonObject;
|
|
33
|
+
/** The values the caller sends. Caller input, never trusted as stored state. */
|
|
34
|
+
readonly next: JsonObject;
|
|
35
|
+
}
|
|
36
|
+
/** What is acted on (AuthZEN Resource): a table, a topic or an action's target. */
|
|
37
|
+
interface AuthorizationResource {
|
|
38
|
+
readonly type: string;
|
|
39
|
+
readonly id?: string;
|
|
40
|
+
/** The row, for decisions that read it (`get`, `update`, `delete`). */
|
|
41
|
+
readonly properties?: JsonObject;
|
|
42
|
+
/** Where `properties` came from. */
|
|
43
|
+
readonly source?: AuthorizationResourceSource;
|
|
44
|
+
/** The write, for `create`, `upsert` and `update`. */
|
|
45
|
+
readonly change?: AuthorizationChange;
|
|
46
|
+
}
|
|
47
|
+
/** Whether a request reads or writes. */
|
|
48
|
+
type AuthorizationIntent = "read" | "write";
|
|
49
|
+
/**
|
|
50
|
+
* The kind of call that asks: a repository method, an action, a route or an MCP
|
|
51
|
+
* tool.
|
|
52
|
+
*/
|
|
53
|
+
type AuthorizationCallKind = "get" | "list" | "create" | "update" | "delete" | "action" | "route" | "tool";
|
|
54
|
+
/** The `intent` and `operation` a call site passes to `requestOf`. */
|
|
55
|
+
interface AuthorizationPurpose {
|
|
56
|
+
readonly intent?: AuthorizationIntent;
|
|
57
|
+
readonly operation?: AuthorizationCallKind;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The typed part of `AuthorizationRequest.context`. better-supabase builds it
|
|
61
|
+
* from the verified request context; every field is optional.
|
|
62
|
+
*/
|
|
63
|
+
interface AuthorizationContext extends AuthorizationPurpose {
|
|
64
|
+
readonly tenant?: string;
|
|
65
|
+
/** The token's assurance level (`aal1`, `aal2`). */
|
|
66
|
+
readonly aal?: string;
|
|
67
|
+
/** The token's OAuth scopes, split from `scope`. */
|
|
68
|
+
readonly scopes?: readonly string[];
|
|
69
|
+
/** `RequestContext.requestId`: the same for every check in one request scope. */
|
|
70
|
+
readonly requestId?: string;
|
|
71
|
+
/** The approval id the client resumes with (`ServerOptions.approval`). */
|
|
72
|
+
readonly approval?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* One access request, in the AuthZEN Authorization API 1.0 information model
|
|
76
|
+
* (`SPEC_PINS.authzen`): subject, action, resource and context. `action` is the
|
|
77
|
+
* permission reference the authorizer understands.
|
|
78
|
+
*/
|
|
79
|
+
interface AuthorizationRequest<Ref = string> {
|
|
80
|
+
readonly subject: AuthorizationSubject;
|
|
81
|
+
readonly action: Ref;
|
|
82
|
+
readonly resource: AuthorizationResource;
|
|
83
|
+
/** The tenant, assurance level, scopes, purpose and approval of the request. */
|
|
84
|
+
readonly context: AuthorizationContext & JsonObject;
|
|
85
|
+
}
|
|
86
|
+
type AuthorizationOutcome = {
|
|
87
|
+
readonly outcome: "granted";
|
|
88
|
+
readonly context?: JsonObject;
|
|
89
|
+
} | {
|
|
90
|
+
readonly outcome: "denied";
|
|
91
|
+
readonly reason?: string;
|
|
92
|
+
readonly context?: JsonObject;
|
|
93
|
+
} | {
|
|
94
|
+
readonly outcome: "approval-required";
|
|
95
|
+
readonly approval?: {
|
|
96
|
+
readonly id: string;
|
|
97
|
+
};
|
|
98
|
+
readonly context?: JsonObject;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* A runtime authorization decision point (API v1). Authorization libraries ship
|
|
102
|
+
* an adapter that implements it; better-supabase builds every request and fails
|
|
103
|
+
* closed on anything but `granted`.
|
|
104
|
+
*/
|
|
105
|
+
interface Authorizer<Ref = string, V extends AuthzVersionCache = AuthzVersionCache> {
|
|
106
|
+
readonly apiVersion: 1;
|
|
107
|
+
readonly name: string;
|
|
108
|
+
/** The stable key of a permission reference, for specs, SQL and messages. */
|
|
109
|
+
key(ref: Ref): string;
|
|
110
|
+
/**
|
|
111
|
+
* The default permission for a table operation; lets `permissions: true`
|
|
112
|
+
* work.
|
|
113
|
+
*/
|
|
114
|
+
forOperation?(table: string, operation: string): Ref | undefined;
|
|
115
|
+
evaluate(request: AuthorizationRequest<Ref>, runtime?: AuthorizerRuntime<V>): AuthorizationOutcome | Promise<AuthorizationOutcome>;
|
|
116
|
+
/**
|
|
117
|
+
* The batch form (AuthZEN Access Evaluations); results keep the request
|
|
118
|
+
* order.
|
|
119
|
+
*/
|
|
120
|
+
evaluations?(requests: readonly AuthorizationRequest<Ref>[], runtime?: AuthorizerRuntime<V>): Promise<readonly AuthorizationOutcome[]>;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* A process-wide cache of authorization versions per user, owned by the
|
|
124
|
+
* authorization library and typed structurally here. Create it once at module
|
|
125
|
+
* scope and pass it to `createServer({ versions })`; never per request or per
|
|
126
|
+
* cache scope.
|
|
127
|
+
*/
|
|
128
|
+
interface AuthzVersionCache {
|
|
129
|
+
/** Forgets a user's version, so the next decision reads it again. */
|
|
130
|
+
evict(userId: string): void | PromiseLike<void>;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Work shared within one request scope: the caller creates it and passes it in,
|
|
134
|
+
* so nothing request-specific lives in module state. Each `use cache` scope
|
|
135
|
+
* gets its own; sharing across scopes goes through `AuthzVersionCache`.
|
|
136
|
+
*/
|
|
137
|
+
interface RequestMemo {
|
|
138
|
+
/** `load()`'s promise, run once per key for this memo. */
|
|
139
|
+
once<T>(key: string, load: () => Promise<T>): Promise<T>;
|
|
140
|
+
}
|
|
141
|
+
/** A new memo for one request scope. */
|
|
142
|
+
declare function requestMemo(): RequestMemo;
|
|
143
|
+
/**
|
|
144
|
+
* What better-supabase hands an authorizer next to each request. Optional, so
|
|
145
|
+
* authorizers written for API v1 keep working.
|
|
146
|
+
*/
|
|
147
|
+
interface AuthorizerRuntime<V extends AuthzVersionCache = AuthzVersionCache> {
|
|
148
|
+
/**
|
|
149
|
+
* `ServerOptions.versions`, when the server has one, typed as the library's
|
|
150
|
+
* own cache.
|
|
151
|
+
*/
|
|
152
|
+
readonly versions?: V;
|
|
153
|
+
/** The scope's memo, for reads several checks in one scope share. */
|
|
154
|
+
readonly memo?: RequestMemo;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* `authorizer` with `runtime` merged under the runtime of every call, so a
|
|
158
|
+
* server's `versions` reaches each decision.
|
|
159
|
+
*/
|
|
160
|
+
declare function bindAuthorizer<A extends AnyAuthorizer<V> | undefined, V extends AuthzVersionCache = AuthzVersionCache>(authorizer: A, runtime: AuthorizerRuntime<V>): A;
|
|
161
|
+
/** An authorizer with any permission reference, for a version cache `V`. */
|
|
162
|
+
type AnyAuthorizer<V extends AuthzVersionCache = AuthzVersionCache> = Authorizer<any, V>;
|
|
163
|
+
/** The permission reference type of an authorizer, `string` without one. */
|
|
164
|
+
type PermissionRef<A> = A extends Authorizer<infer R> ? R : string;
|
|
165
|
+
/**
|
|
166
|
+
* Identity helper that fixes `apiVersion` and infers `Ref`, and `V` from a
|
|
167
|
+
* typed `runtime` parameter.
|
|
168
|
+
*/
|
|
169
|
+
declare function defineAuthorizer<Ref = string, V extends AuthzVersionCache = AuthzVersionCache>(authorizer: Omit<Authorizer<Ref, V>, "apiVersion"> & {
|
|
170
|
+
readonly apiVersion?: 1;
|
|
171
|
+
}): Authorizer<Ref, V>;
|
|
3
172
|
interface ExecuteContext {
|
|
4
173
|
/** Already includes the call's `timeout`, when it has one. */
|
|
5
174
|
readonly signal?: AbortSignal;
|
|
@@ -71,6 +240,19 @@ interface RequestContext {
|
|
|
71
240
|
readonly actor?: Actor;
|
|
72
241
|
readonly tenant?: string;
|
|
73
242
|
readonly claims?: Readonly<Record<string, unknown>>;
|
|
243
|
+
/**
|
|
244
|
+
* The server's request id (`ServerContext.requestId`): the `x-request-id`
|
|
245
|
+
* header or a generated one. A client can send it, so it is for logs and
|
|
246
|
+
* audit; share work within a request through `memo`.
|
|
247
|
+
*/
|
|
248
|
+
readonly requestId?: string;
|
|
249
|
+
/** The scope's memo, passed to the authorizer as `runtime.memo`. */
|
|
250
|
+
readonly memo?: RequestMemo;
|
|
251
|
+
/**
|
|
252
|
+
* The approval id the client resumes with, read from the header in
|
|
253
|
+
* `ServerOptions.approval`. Never part of the subject.
|
|
254
|
+
*/
|
|
255
|
+
readonly approval?: string;
|
|
74
256
|
readonly [key: string]: unknown;
|
|
75
257
|
}
|
|
76
258
|
/** Plugin-specific per-call options (`withDeleted`, `hard`, ...). */
|
|
@@ -488,6 +670,12 @@ interface ClaimsMeta {
|
|
|
488
670
|
* Defaults to `permissions`.
|
|
489
671
|
*/
|
|
490
672
|
readonly permissions: string;
|
|
673
|
+
/**
|
|
674
|
+
* Claim the hook sets to `true` when it left permission keys out, from the
|
|
675
|
+
* provider's `tokenHook.truncatedClaim`. Defaults to
|
|
676
|
+
* `<permissions>_truncated`.
|
|
677
|
+
*/
|
|
678
|
+
readonly permissionsTruncated?: string;
|
|
491
679
|
}
|
|
492
680
|
interface RealtimeTableMeta {
|
|
493
681
|
/** App column whose value scopes the broadcast topic. */
|
|
@@ -904,4 +1092,4 @@ declare const and: (...items: (Condition | undefined)[]) => Condition | undefine
|
|
|
904
1092
|
declare const or: (...items: Condition[]) => Condition;
|
|
905
1093
|
declare const not: (item: Condition) => Condition;
|
|
906
1094
|
declare const column: (name: string, op: ColumnOp, value: unknown) => Condition;
|
|
907
|
-
export { RecordRef as $, BucketMeta as A, NoExtension as At, FunctionMeta as B, Executor as Bt, not as C, ApplyExtension as Ct, AccessTopicPolicy as D, HasFlag as Dt, AccessPolicySql as E, ExtensionsOf as Et, Codec as F, RequestContext as Ft, GeneratedColumns as G, FunctionSignature as H, ColumnMeta as I, WithExtension as It, ModelTypes as J, Insert as K, DatabaseOf as L, definePlugin as Lt, Casing as M, Plugin as Mt, CheckConstraint as N, RepositoryApi as Nt, AnyFunctions as O, HookArgs as Ot, ClaimsMeta as P, RepositoryExtension as Pt, RealtimeTableMeta as Q, Flags as R, ExecuteContext as Rt, column as S, AnyPlugin as St, AccessBucketPolicy as T, ExtensionOf as Tt, FunctionTypes as U, FunctionResult as V, RpcContext as Vt, FunctionsOf as W, PrimaryKeyColumn as X, ModelsOf as Y, PrimaryKeyValue as Z, SelectColumn as _, BucketLifecycle as _t, CountMode as a, Schema as at, UpdateOp as b, VersioningStatus as bt, Include as c, SubjectTypeOf as ct, MutationIntent as d, TableMeta as dt, RelationMeta as et, MutationKind as f, UniqueConstraint as ft, Quantifier as g, WritableColumns as gt, OrderTerm as h, Update as ht, Condition as i, Row as it, BucketPolicyName as j, PLUGIN_API_VERSION as jt, AnyModels as k, MutationEvent as kt, InsertOp as l, TableFlags as lt, Operation as m, UniqueWhere as mt, Aggregation as n, Relations as nt, DeleteOp as o, SchemaMeta as ot, MutationOp as p, UniqueKeyName as pt, ModelFlags as q, ColumnOp as r, ResultColumn as rt, FunctionSource as s, Simplify as st, AggregateFn as t, RelationTypes as tt, Measure as u, TableKey as ut, SelectOp as v, BucketLifecycleRule as vt, or as w, CallOptions as wt, and as x, Actor as xt, Selection as y, ObjectVersion as yt, ForeignKeyConstraint as z, ExecuteResult as zt };
|
|
1095
|
+
export { RecordRef as $, Authorizer as $t, BucketMeta as A, NoExtension as At, FunctionMeta as B, Executor as Bt, not as C, ApplyExtension as Ct, AccessTopicPolicy as D, HasFlag as Dt, AccessPolicySql as E, ExtensionsOf as Et, Codec as F, RequestContext as Ft, GeneratedColumns as G, AuthorizationContext as Gt, FunctionSignature as H, AnyAuthorizer as Ht, ColumnMeta as I, WithExtension as It, ModelTypes as J, AuthorizationPurpose as Jt, Insert as K, AuthorizationIntent as Kt, DatabaseOf as L, definePlugin as Lt, Casing as M, Plugin as Mt, CheckConstraint as N, RepositoryApi as Nt, AnyFunctions as O, HookArgs as Ot, ClaimsMeta as P, RepositoryExtension as Pt, RealtimeTableMeta as Q, AuthorizationSubject as Qt, Flags as R, ExecuteContext as Rt, column as S, AnyPlugin as St, AccessBucketPolicy as T, ExtensionOf as Tt, FunctionTypes as U, AuthorizationCallKind as Ut, FunctionResult as V, RpcContext as Vt, FunctionsOf as W, AuthorizationChange as Wt, PrimaryKeyColumn as X, AuthorizationResource as Xt, ModelsOf as Y, AuthorizationRequest as Yt, PrimaryKeyValue as Z, AuthorizationResourceSource as Zt, SelectColumn as _, BucketLifecycle as _t, CountMode as a, defineAuthorizer as an, Schema as at, UpdateOp as b, VersioningStatus as bt, Include as c, SubjectTypeOf as ct, MutationIntent as d, TableMeta as dt, AuthorizerRuntime as en, RelationMeta as et, MutationKind as f, UniqueConstraint as ft, Quantifier as g, WritableColumns as gt, OrderTerm as h, Update as ht, Condition as i, bindAuthorizer as in, Row as it, BucketPolicyName as j, PLUGIN_API_VERSION as jt, AnyModels as k, MutationEvent as kt, InsertOp as l, TableFlags as lt, Operation as m, UniqueWhere as mt, Aggregation as n, PermissionRef as nn, Relations as nt, DeleteOp as o, requestMemo as on, SchemaMeta as ot, MutationOp as p, UniqueKeyName as pt, ModelFlags as q, AuthorizationOutcome as qt, ColumnOp as r, RequestMemo as rn, ResultColumn as rt, FunctionSource as s, Simplify as st, AggregateFn as t, AuthzVersionCache as tn, RelationTypes as tt, Measure as u, TableKey as ut, SelectOp as v, BucketLifecycleRule as vt, or as w, CallOptions as wt, and as x, Actor as xt, Selection as y, ObjectVersion as yt, ForeignKeyConstraint as z, ExecuteResult as zt };
|
|
@@ -3,9 +3,9 @@ import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "./standard-DRX6Ch1j.js";
|
|
4
4
|
import { r as FieldsOf } from "./block-fields-Puv5m5D3.js";
|
|
5
5
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
6
|
-
import { r as BlockTemporalOptions } from "./block-helpers-
|
|
7
|
-
import { t as BlockTransport } from "./block-transport-
|
|
8
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
6
|
+
import { r as BlockTemporalOptions } from "./block-helpers-disoUWCp.js";
|
|
7
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
8
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
9
9
|
import { i as AiMessage } from "./message-Cc4bkdNw.js";
|
|
10
10
|
/** The claim step of a Storage API, such as the one `supportStorage` returns. */
|
|
11
11
|
interface UploadClaimStorage {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
3
3
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
4
|
-
import { r as BlockTemporalOptions } from "./block-helpers-
|
|
5
|
-
import { t as BlockTransport } from "./block-transport-
|
|
6
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
7
|
-
import { n as Embedder } from "./knowledge-
|
|
4
|
+
import { r as BlockTemporalOptions } from "./block-helpers-disoUWCp.js";
|
|
5
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
6
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
7
|
+
import { n as Embedder } from "./knowledge-BBC2sfAY.js";
|
|
8
8
|
type MemoryScope = "user" | "agent" | "chat" | "project" | "organization";
|
|
9
9
|
type MemoryKind = "core" | "archival";
|
|
10
10
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, b as DbError, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
3
|
-
import { Ft as RequestContext, xt as Actor } from "./types-
|
|
3
|
+
import { Ft as RequestContext, xt as Actor } from "./types-BkYEUWdz.js";
|
|
4
4
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
5
|
-
import { i as CursorPageOptions, r as BlockTemporalOptions } from "./block-helpers-
|
|
6
|
-
import { n as SqlClient } from "./executor-
|
|
7
|
-
import { t as BlockTransport } from "./block-transport-
|
|
8
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
5
|
+
import { i as CursorPageOptions, r as BlockTemporalOptions } from "./block-helpers-disoUWCp.js";
|
|
6
|
+
import { n as SqlClient } from "./executor-CFmee_nV.js";
|
|
7
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
8
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
9
9
|
import { t as BlockProblemOptions } from "./problem-NGBjN-TO.js";
|
|
10
10
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
11
11
|
/** One RFC 9396 `authorization_details` entry. */
|
|
@@ -14,11 +14,11 @@ interface AuthorizationDetail {
|
|
|
14
14
|
readonly [field: string]: unknown;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* The
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* The permission cap in `claims`, from `bsb_permission_cap` or else its 0.14
|
|
18
|
+
* name: `undefined` without one, `false` for a cap that is not a list of
|
|
19
|
+
* strings.
|
|
20
20
|
*/
|
|
21
|
-
declare
|
|
21
|
+
declare function permissionCapOf(claims: Readonly<Record<string, unknown>>): readonly string[] | false | undefined;
|
|
22
22
|
/** The body of a queued message, on pgmq and the table backend alike. */
|
|
23
23
|
interface QueueMessageBody {
|
|
24
24
|
readonly payload?: unknown;
|
|
@@ -645,4 +645,4 @@ interface QueueOptions<Q extends QueueSchemas = QueueSchemas> extends BlockTempo
|
|
|
645
645
|
*/
|
|
646
646
|
readonly now?: () => Temporal.Instant;
|
|
647
647
|
}
|
|
648
|
-
export { ScheduleInfo as A, QueueStats as B, QueueSchemas as C, ScheduleDefinition as D, RunSchedulesOptions as E, QueueMessageBody as F,
|
|
648
|
+
export { ScheduleInfo as A, QueueStats as B, QueueSchemas as C, ScheduleDefinition as D, RunSchedulesOptions as E, QueueMessageBody as F, permissionCapOf as G, pgmqPublicBackend as H, QueueMessageRow as I, QueueProvider as L, WorkOptions as M, DeadJobRow as N, ScheduleDefinitions as O, DueSchedule as P, QueuePurgeArgs as R, QueueOptions as S, RunJobOptions as T, sqlQueueProvider as U, TransportQueueProviderOptions as V, transportQueueProvider as W, JobHandler as _, DrainResult as a, PurgeJobsOptions as b, EnqueueOnceOptions as c, EnsureSchedulesOptions as d, EnsureSchedulesResult as f, JobDelivery as g, JobContext as h, DrainOptions as i, ScheduleOptions as j, ScheduleFilter as k, EnqueueOnceResult as l, Job as m, DeadJob as n, DrainRouteOptions as o, FailOptions as p, DrainMonitor as r, DrainRouteResult as s, ClaimOptions as t, EnqueueOptions as u, ListDeadOptions as v, RetryDeadOptions as w, Queue as x, PayloadOut as y, QueueRpcClient as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { o as Message } from "./messaging-
|
|
2
|
+
import { o as Message } from "./messaging-D5z2TR37.js";
|
|
3
3
|
/** The channels an inbox can sit on. */
|
|
4
4
|
type InboxChannel = "in_app" | "email" | "slack" | "teams" | "discord" | "telegram" | "whatsapp" | "messenger" | "instagram" | "sms" | "github" | "linear" | "other";
|
|
5
5
|
/** `bot`: the bot answers; `human`: staff answer; `paused`: nobody answers. */
|
|
@@ -3,13 +3,13 @@ import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "./standard-DRX6Ch1j.js";
|
|
4
4
|
import { n as ExtraFields, r as FieldsOf } from "./block-fields-Puv5m5D3.js";
|
|
5
5
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
6
|
-
import { i as CredentialRef, o as CredentialToken, r as CredentialProvider } from "./provider-
|
|
7
|
-
import { r as BlockTemporalOptions } from "./block-helpers-
|
|
8
|
-
import { t as BlockTransport } from "./block-transport-
|
|
9
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
10
|
-
import { h as FilterQuery, l as FilterFieldType } from "./filter-query-
|
|
11
|
-
import { f as WorkflowStarter, g as Workflows, p as WorkflowSubject, r as WorkflowRunMode, s as WorkflowSchedule } from "./workflows-
|
|
12
|
-
import { i as AuthorizationHooks } from "./authorization-hooks-
|
|
6
|
+
import { i as CredentialRef, o as CredentialToken, r as CredentialProvider } from "./provider-BI0KC4u5.js";
|
|
7
|
+
import { r as BlockTemporalOptions } from "./block-helpers-disoUWCp.js";
|
|
8
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
9
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
10
|
+
import { h as FilterQuery, l as FilterFieldType } from "./filter-query-DV-x8fio.js";
|
|
11
|
+
import { f as WorkflowStarter, g as Workflows, p as WorkflowSubject, r as WorkflowRunMode, s as WorkflowSchedule } from "./workflows-BljkWRxE.js";
|
|
12
|
+
import { i as AuthorizationHooks } from "./authorization-hooks-CxwsRnfV.js";
|
|
13
13
|
type WorkflowNodeKind = "trigger" | "step" | "sleep" | "approval" | "condition";
|
|
14
14
|
type WorkflowConditionOperator = "equals" | "notEquals" | "exists" | "truthy" | "greaterThan" | "lessThan" | "contains";
|
|
15
15
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
2
2
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
3
|
-
import { t as BlockTransport } from "./block-transport-
|
|
4
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
3
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
4
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
5
5
|
/** One call that reverses part of a change. */
|
|
6
6
|
interface UndoCall {
|
|
7
7
|
readonly fn: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
3
3
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
4
|
-
import { i as CursorPageOptions, n as BlockOptions } from "./block-helpers-
|
|
5
|
-
import { t as BlockTransport } from "./block-transport-
|
|
6
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
7
|
-
import { _ as JobHandler } from "./types-
|
|
4
|
+
import { i as CursorPageOptions, n as BlockOptions } from "./block-helpers-disoUWCp.js";
|
|
5
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
6
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
7
|
+
import { _ as JobHandler } from "./types-Dh2OGEW5.js";
|
|
8
8
|
import { n as StripeSource } from "./stripe-Bl-sjnl6.js";
|
|
9
9
|
interface UsageOptions extends BlockOptions {
|
|
10
10
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
2
|
-
import { c as SetCredentialOptions, i as CredentialRef, r as CredentialProvider } from "./provider-
|
|
3
|
-
import { t as BlockTransport } from "./block-transport-
|
|
2
|
+
import { c as SetCredentialOptions, i as CredentialRef, r as CredentialProvider } from "./provider-BI0KC4u5.js";
|
|
3
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
4
4
|
/** How a request the third party sends is signed with the stored secret. */
|
|
5
5
|
type VaultInboundScheme = "standard-webhooks" | "hmac-sha256" | "shared-secret";
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as Result, t as AsyncResult } from "../result-DTOQRyGY.js";
|
|
2
|
-
import { a as CredentialSubject, i as CredentialRef, o as CredentialToken, r as CredentialProvider, s as GetTokenOptions } from "../provider-
|
|
2
|
+
import { a as CredentialSubject, i as CredentialRef, o as CredentialToken, r as CredentialProvider, s as GetTokenOptions } from "../provider-BI0KC4u5.js";
|
|
3
3
|
/** An RFC 9396 authorization detail; `type` names its kind. */
|
|
4
4
|
interface VercelConnectAuthorizationDetail {
|
|
5
5
|
type: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { b as DbError, t as AsyncResult } from "../result-DTOQRyGY.js";
|
|
3
|
-
import { a as CredentialSubject, i as CredentialRef, r as CredentialProvider } from "../provider-
|
|
4
|
-
import { i as AiSandboxes, t as AiSandbox } from "../sandboxes-
|
|
3
|
+
import { a as CredentialSubject, i as CredentialRef, r as CredentialProvider } from "../provider-BI0KC4u5.js";
|
|
4
|
+
import { i as AiSandboxes, t as AiSandbox } from "../sandboxes-B2hBoBvJ.js";
|
|
5
5
|
import { Experimental_SandboxSession } from "ai";
|
|
6
6
|
/** The `provider` an adapter's rows carry in `ai_sandboxes`. */
|
|
7
7
|
export declare const VERCEL_SANDBOX_PROVIDER = "vercel";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { f as Result } from "./result-DTOQRyGY.js";
|
|
3
|
-
import { O as AnyFunctions, it as Row, k as AnyModels, ut as TableKey } from "./types-
|
|
4
|
-
import { t as BetterSupabase } from "./define-
|
|
3
|
+
import { O as AnyFunctions, it as Row, k as AnyModels, ut as TableKey } from "./types-BkYEUWdz.js";
|
|
4
|
+
import { t as BetterSupabase } from "./define-ITQA71fw.js";
|
|
5
5
|
import { n as VerifyOptions, r as WebhookInput, t as VerifiedWebhook } from "./signatures-jPr9JXyw.js";
|
|
6
6
|
/** The `Stripe-Signature` header for `body`, for tests and local replays. */
|
|
7
7
|
declare function signStripeWebhook(secret: string, body: string, timestamp?: Temporal.Instant): Promise<string>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { n as dbError } from "./errors-B7tCfCvX.js";
|
|
2
|
+
import { a as invalidActorError, i as delegationOf, n as actorOf } from "./actor-B5b0i1Fs.js";
|
|
3
|
+
import { r as impersonatorOf } from "./impersonation-D-quM36V.js";
|
|
4
|
+
import { i as issuedAtOf, n as authzVersionOf } from "./snapshot-CVMSyTHH.js";
|
|
5
|
+
// src/auth/mfa.ts
|
|
6
|
+
/**
|
|
7
|
+
* The session's assurance level from its claims; anything but `aal2` reads as
|
|
8
|
+
* `aal1`.
|
|
9
|
+
*/
|
|
10
|
+
function aalOf(claims) {
|
|
11
|
+
return claims["aal"] === "aal2" ? "aal2" : "aal1";
|
|
12
|
+
}
|
|
13
|
+
/** The `amr` claim as typed entries, skipping malformed ones. */
|
|
14
|
+
function amrOf(claims) {
|
|
15
|
+
const amr = claims["amr"];
|
|
16
|
+
if (!Array.isArray(amr)) return [];
|
|
17
|
+
return amr.flatMap((entry) => {
|
|
18
|
+
if (typeof entry !== "object" || entry === null) return [];
|
|
19
|
+
const { method, timestamp, provider } = entry;
|
|
20
|
+
if (typeof method !== "string" || typeof timestamp !== "number") return [];
|
|
21
|
+
return [typeof provider === "string" ? {
|
|
22
|
+
method,
|
|
23
|
+
timestamp,
|
|
24
|
+
provider
|
|
25
|
+
} : {
|
|
26
|
+
method,
|
|
27
|
+
timestamp
|
|
28
|
+
}];
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* `undefined` when a user session meets `required`; otherwise a `forbidden`
|
|
33
|
+
* error with `required` and code `INSUFFICIENT_AAL`, for the client to start an
|
|
34
|
+
* MFA challenge. Non-user sessions pass: `allow` decides about them.
|
|
35
|
+
*/
|
|
36
|
+
function checkAal(auth, required) {
|
|
37
|
+
if (required === "aal1" || auth.kind !== "user" || !("claims" in auth)) return;
|
|
38
|
+
if (aalOf(auth.claims) === "aal2") return;
|
|
39
|
+
return dbError("forbidden", "Verify a second factor to continue", {
|
|
40
|
+
code: "INSUFFICIENT_AAL",
|
|
41
|
+
required
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
// src/auth/view.ts
|
|
45
|
+
/** Whether `session` is a signed-in user, with claims and a version. */
|
|
46
|
+
function isUserSession(session) {
|
|
47
|
+
return session.kind === "user";
|
|
48
|
+
}
|
|
49
|
+
/** Whether `session` is an API key caller, with its key id and scopes. */
|
|
50
|
+
function isApiKeySession(session) {
|
|
51
|
+
return session.kind === "apiKey";
|
|
52
|
+
}
|
|
53
|
+
/** Whether the token belongs to an anonymous user (`signInAnonymously()`). */
|
|
54
|
+
function isAnonymousUser(claims) {
|
|
55
|
+
return "is_anonymous" in claims && claims.is_anonymous === true;
|
|
56
|
+
}
|
|
57
|
+
/** Drops the token from an `AuthState`, leaving only serializable fields. */
|
|
58
|
+
function toSession(auth) {
|
|
59
|
+
switch (auth.kind) {
|
|
60
|
+
case "user": {
|
|
61
|
+
const outcome = actorOf(auth.claims);
|
|
62
|
+
if (!outcome.ok) return {
|
|
63
|
+
kind: "invalid",
|
|
64
|
+
reason: "actor",
|
|
65
|
+
error: invalidActorError()
|
|
66
|
+
};
|
|
67
|
+
const impersonator = impersonatorOf(auth.claims);
|
|
68
|
+
const actor = outcome.actor;
|
|
69
|
+
const client = actor?.kind === "oauth-client" || actor?.kind === "agent" && delegationOf(auth.claims) !== void 0 ? actor : void 0;
|
|
70
|
+
const scopes = client ? delegationOf(auth.claims)?.scopes : void 0;
|
|
71
|
+
const delegation = client && (scopes || client.chain) ? {
|
|
72
|
+
scopes: scopes ?? [],
|
|
73
|
+
...client.chain ? { chain: client.chain } : {}
|
|
74
|
+
} : void 0;
|
|
75
|
+
return {
|
|
76
|
+
kind: "user",
|
|
77
|
+
user: auth.user,
|
|
78
|
+
claims: auth.claims,
|
|
79
|
+
expiresAt: auth.expiresAt,
|
|
80
|
+
issuedAt: issuedAtOf(auth.claims),
|
|
81
|
+
authzVersion: authzVersionOf(auth.claims),
|
|
82
|
+
...auth.userMetadata === void 0 ? {} : { userMetadata: auth.userMetadata },
|
|
83
|
+
aal: aalOf(auth.claims),
|
|
84
|
+
anonymous: isAnonymousUser(auth.claims),
|
|
85
|
+
amr: amrOf(auth.claims),
|
|
86
|
+
...impersonator ? { impersonator } : {},
|
|
87
|
+
...actor ? { actor } : {},
|
|
88
|
+
...delegation ? { delegation } : {}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
case "secret": return {
|
|
92
|
+
kind: "secret",
|
|
93
|
+
keyName: auth.keyName
|
|
94
|
+
};
|
|
95
|
+
case "apiKey": return {
|
|
96
|
+
kind: "apiKey",
|
|
97
|
+
keyId: auth.keyId,
|
|
98
|
+
name: auth.name,
|
|
99
|
+
...auth.organizationId ? { organizationId: auth.organizationId } : {},
|
|
100
|
+
...auth.userId ? { userId: auth.userId } : {},
|
|
101
|
+
scopes: auth.scopes,
|
|
102
|
+
...auth.createdAt ? { createdAt: Math.floor(auth.createdAt.epochMilliseconds / 1e3) } : {},
|
|
103
|
+
...auth.createdBy ? { createdBy: auth.createdBy } : {}
|
|
104
|
+
};
|
|
105
|
+
case "none": return {
|
|
106
|
+
kind: "none",
|
|
107
|
+
reason: auth.reason
|
|
108
|
+
};
|
|
109
|
+
case "invalid": return {
|
|
110
|
+
kind: "invalid",
|
|
111
|
+
reason: auth.reason,
|
|
112
|
+
error: auth.error
|
|
113
|
+
};
|
|
114
|
+
default: return auth;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export { aalOf as a, toSession as i, isApiKeySession as n, amrOf as o, isUserSession as r, checkAal as s, isAnonymousUser as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as DbError } from "./result-DTOQRyGY.js";
|
|
2
|
-
import { i as InvalidReason, r as AuthState } from "./resolve
|
|
2
|
+
import { i as InvalidReason, r as AuthState } from "./resolve--LfVoOMg.js";
|
|
3
3
|
import { a as SessionActor, o as SessionDelegation } from "./actor-DseNR02I.js";
|
|
4
4
|
import { n as Impersonator } from "./impersonation-BOCJcsmS.js";
|
|
5
5
|
import { n as AmrEntry, t as Aal } from "./mfa-CM5r904M.js";
|
|
@@ -90,6 +90,18 @@ type AuthSession<C = unknown, P = unknown> = {
|
|
|
90
90
|
type AnonReason = Extract<AuthState, {
|
|
91
91
|
kind: "none";
|
|
92
92
|
}>["reason"];
|
|
93
|
+
/** The `AuthSession` of a signed-in user. */
|
|
94
|
+
type UserSession<C = unknown, P = unknown> = Extract<AuthSession<C, P>, {
|
|
95
|
+
readonly kind: "user";
|
|
96
|
+
}>;
|
|
97
|
+
/** The `AuthSession` of a caller that sent an API key. */
|
|
98
|
+
type ApiKeySession = Extract<AuthSession, {
|
|
99
|
+
readonly kind: "apiKey";
|
|
100
|
+
}>;
|
|
101
|
+
/** Whether `session` is a signed-in user, with claims and a version. */
|
|
102
|
+
declare function isUserSession<C, P>(session: AuthSession<C, P>): session is UserSession<C, P>;
|
|
103
|
+
/** Whether `session` is an API key caller, with its key id and scopes. */
|
|
104
|
+
declare function isApiKeySession<C, P>(session: AuthSession<C, P>): session is ApiKeySession & AuthSession<C, P>;
|
|
93
105
|
/** Drops the token from an `AuthState`, leaving only serializable fields. */
|
|
94
106
|
declare function toSession<C, P>(auth: AuthState<C, P>): AuthSession<C, P>;
|
|
95
|
-
export {
|
|
107
|
+
export { isUserSession as a, isApiKeySession as i, AuthSession as n, toSession as o, UserSession as r, ApiKeySession as t };
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { b as DbError } from "../result-DTOQRyGY.js";
|
|
2
|
-
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-
|
|
3
|
-
import { mt as QuerySpec } from "../define-
|
|
4
|
-
import { tt as TemplateValues } from "../bucket-
|
|
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-
|
|
7
|
-
import {
|
|
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-
|
|
2
|
+
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-DVt3Z9hw.js";
|
|
3
|
+
import { mt as QuerySpec } from "../define-ITQA71fw.js";
|
|
4
|
+
import { tt as TemplateValues } from "../bucket-DvG66r5G.js";
|
|
5
|
+
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-D2MyBeaI.js";
|
|
6
|
+
import { t as AuthSnapshot } from "../bind-DP-KLgYI.js";
|
|
7
|
+
import { n as AuthSession } from "../view-Cy2XxYp1.js";
|
|
8
|
+
import { n as Controller } from "../controller-DxtxeYdf.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-DKCaSlZw.js";
|
|
10
|
+
import { n as BlockOptions } from "../block-env-CJ38ZSTP.js";
|
|
11
11
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-QSaPsL2P.js";
|
|
12
|
-
import { t as SupportView } from "../support-view-
|
|
12
|
+
import { t as SupportView } from "../support-view-DSmCett7.js";
|
|
13
13
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
14
14
|
import { QueryClient } from "@tanstack/query-core";
|
|
15
15
|
import { App, ComputedRef, MaybeRefOrGetter, Ref, ShallowRef } from "vue";
|
package/dist/vue/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as clearOnUserChange } from "../user-change-Ngy8z1fZ.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-Bky2z09B.js";
|
|
3
3
|
import { t as supportOf } from "../support-view-CvDEgyGY.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-BToeAcQ_.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-D2MyBeaI.js";
|
|
2
2
|
interface TopicWatch {
|
|
3
3
|
readonly onMessage: (event: string, payload: unknown) => void;
|
|
4
4
|
readonly onRejoin: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as WorkflowGraph, i as BuilderStarter, l as NodeRunRecord } from "../../types-
|
|
2
|
-
import { a as GraphSubject, i as GraphStepCall, o as executeGraph, r as GraphRuntime, t as GraphApprovalCall } from "../../executor-
|
|
3
|
-
import { c as WorkflowFn } from "../../workflow-sdk-
|
|
1
|
+
import { L as WorkflowGraph, i as BuilderStarter, l as NodeRunRecord } from "../../types-d0JBRTAg.js";
|
|
2
|
+
import { a as GraphSubject, i as GraphStepCall, o as executeGraph, r as GraphRuntime, t as GraphApprovalCall } from "../../executor-DqNRrFxx.js";
|
|
3
|
+
import { c as WorkflowFn } from "../../workflow-sdk-yIkECybp.js";
|
|
4
4
|
import { World } from "@workflow/world";
|
|
5
5
|
/** The env flag the Workflow SDK reads before it starts or runs dynamic source. */
|
|
6
6
|
export declare const DYNAMIC_WORKFLOWS_ENV = "WORKFLOW_EXPERIMENTAL_DYNAMIC_WORKFLOWS";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as subjectAttribute, t as WORKFLOW_ATTRIBUTES } from "../../attributes-BZNkR2z2.js";
|
|
2
2
|
import { f as topologicalOrder, o as durationMs, p as validateGraph, r as startNodeOf, t as executeGraph, u as isGraphRecord } from "../../executor-BDMqPbVU.js";
|
|
3
|
-
import { o as runForKey, r as contextAttributes } from "../../workflow-sdk-
|
|
3
|
+
import { o as runForKey, r as contextAttributes } from "../../workflow-sdk-q2jnEaAJ.js";
|
|
4
4
|
import { start } from "workflow/api";
|
|
5
5
|
import { getStepMetadata, getWorkflowMetadata } from "workflow";
|
|
6
6
|
// src/workflow-sdk/builder/builder.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { n as VerifyOptions, r as WebhookInput } from "../signatures-jPr9JXyw.js";
|
|
3
|
-
import { _ as startOnEvent, a as StartOnEventOptions, b as workflowStarter, c as WorkflowFn, d as WorkflowStarterOptions, f as authorizeHook, g as startFor, h as protectWebHandler, i as StartForOptions, l as WorkflowRunAs, m as hookMetadata, n as HookForbiddenError, o as StartOnceOptions, p as contextAttributes, r as ProtectWebHandlerOptions, s as WorkflowContextOptions, t as AuthorizeHookOptions, u as WorkflowRunAsFor, v as startOnce, y as workflowContext } from "../workflow-sdk-
|
|
3
|
+
import { _ as startOnEvent, a as StartOnEventOptions, b as workflowStarter, c as WorkflowFn, d as WorkflowStarterOptions, f as authorizeHook, g as startFor, h as protectWebHandler, i as StartForOptions, l as WorkflowRunAs, m as hookMetadata, n as HookForbiddenError, o as StartOnceOptions, p as contextAttributes, r as ProtectWebHandlerOptions, s as WorkflowContextOptions, t as AuthorizeHookOptions, u as WorkflowRunAsFor, v as startOnce, y as workflowContext } from "../workflow-sdk-yIkECybp.js";
|
|
4
4
|
import { a as WorkflowMaintenance, i as RunKeyClaim, n as OpenWorkflowHook, o as WorkflowRunKeys, r as PurgeRunsOptions, s as WorkflowTerminalStatus, t as OpenHooksOptions } from "../run-keys-BnzqxtYc.js";
|
|
5
5
|
import { Run } from "workflow/api";
|
|
6
6
|
/** How `approvalWaiter.wait` ended. */
|
|
@@ -3,7 +3,7 @@ import { o as problemResponse } from "../problem-C0SVHhd3.js";
|
|
|
3
3
|
import { s as verifyWebhook } from "../signatures-CBn7w4VR.js";
|
|
4
4
|
import { s as verifyStripeWebhook } from "../verify-DY_j4GPZ.js";
|
|
5
5
|
import { t as WORKFLOW_ATTRIBUTES } from "../attributes-BZNkR2z2.js";
|
|
6
|
-
import { a as protectWebHandler, c as startOnEvent, d as workflowStarter, i as hookMetadata, l as startOnce, n as authorizeHook, r as contextAttributes, s as startFor, t as HookForbiddenError, u as workflowContext } from "../workflow-sdk-
|
|
6
|
+
import { a as protectWebHandler, c as startOnEvent, d as workflowStarter, i as hookMetadata, l as startOnce, n as authorizeHook, r as contextAttributes, s as startFor, t as HookForbiddenError, u as workflowContext } from "../workflow-sdk-q2jnEaAJ.js";
|
|
7
7
|
import { getRun, resumeHook } from "workflow/api";
|
|
8
8
|
import { HookNotFoundError } from "workflow/errors";
|
|
9
9
|
import { createHook, sleep } from "workflow";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as EventHub } from "../../events-
|
|
1
|
+
import { o as EventHub } from "../../events-DVt3Z9hw.js";
|
|
2
2
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
3
3
|
import { a as WorkflowMaintenance } from "../../run-keys-BnzqxtYc.js";
|
|
4
4
|
import { Pool } from "pg";
|