better-supabase 0.32.0 → 0.34.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-Don-aNOB.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-DpVtxuKM.d.ts} +28 -2
- 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-BA05aoY9.d.ts} +7 -7
- package/dist/{block-env-BsLgZL2l.d.ts → block-env-UX42PHLP.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-Bre1zjau.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/drive/index.js +1 -1
- 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-C13ZqJ_N.js +1 -0
- package/dist/cli/{add-fzRPyIED.js → add-DoEtJhZG.js} +3 -2
- package/dist/cli/{add-ChoHyBhz.js → add-THXE7juv.js} +11 -11
- package/dist/cli/{app-table-files-C0OtdUVu.js → app-table-files-BqLd5TuX.js} +3 -3
- package/dist/cli/{providers-DpfoF3VC.js → authorization-DJkkOjjG.js} +25 -93
- package/dist/cli/{backfill-Dq2XMXf9.js → backfill-D-2W0fNT.js} +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-CCzp0eAH.js → blocks-BVU_FoLo.js} +1 -1
- package/dist/cli/{blocks-DVhJOzFj.js → blocks-XwUHeyUH.js} +1 -1
- package/dist/cli/{cache-CoC-1i1O.js → cache-D4nwCBXc.js} +1 -1
- package/dist/cli/{codemod-pyf6HmS9.js → codemod-Dh4lf_k4.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-CwFH_PEn.js} +2 -2
- package/dist/cli/{db-dFzhcozO.js → db-Diy1OebO.js} +2 -2
- package/dist/cli/{doctor-BKZsztFV.js → doctor-CyAMbZ_s.js} +59 -19
- package/dist/cli/{gen-BN_eh6rE.js → gen-EAUNnUY7.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-BRmmmGHJ.js} +9 -9
- package/dist/cli/{live-KU41LMGE.js → live-CV9mn-xC.js} +2 -2
- package/dist/cli/{mcp-C_m-TpLJ.js → mcp-CnaxcLWa.js} +2 -2
- package/dist/cli/{metadata-Bq4ra7zo.js → metadata-CFQGBR5E.js} +3 -3
- package/dist/cli/{migrate-DHG2Qz_K.js → migrate-z5oHDGNs.js} +1 -1
- package/dist/cli/{migration-safety-STVbiKhz.js → migration-safety-BtAPMEZa.js} +2 -2
- package/dist/cli/{migrations-O1QZoMiH.js → migrations-CNa62JSi.js} +2 -2
- package/dist/cli/{module-migration-DB9ntWM-.js → module-migration-CKJ8kRm1.js} +2 -2
- package/dist/cli/{powersync-CN3QPF2K.js → powersync-BgoAWeRT.js} +3 -3
- package/dist/cli/powersync-DoCruiOt.js +1 -0
- package/dist/cli/{print-DG7TRCi8.js → print-CoqKHoy0.js} +2 -2
- package/dist/cli/providers-CfbFxUOQ.js +99 -0
- package/dist/cli/{prune-workflows-DcNJUS1m.js → prune-workflows-BigCoXLw.js} +3 -3
- package/dist/cli/{remove-BpfYqP45.js → remove-C9zwn-Kk.js} +5 -5
- package/dist/cli/{render-Q7jnLn_C.js → render-DQCU_kBW.js} +7 -4
- package/dist/cli/{run-9NfabanB.js → run-CVaBuT18.js} +29 -29
- package/dist/cli/{run-D6K-qQIX.js → run-DOD00FFl.js} +9 -8
- 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-COtj7l3r.js} +1 -1
- package/dist/cli/{snapshot-UfJsqfys.js → snapshot-BvlEmTB0.js} +3 -3
- package/dist/cli/{source-F3YTVvFo.js → source-BhZRCitG.js} +1 -1
- package/dist/cli/{source-args-DJMrW_jW.js → source-args-Bz5QQne2.js} +1 -1
- package/dist/cli/{spec-HQOBVbEO.js → spec-Bo2wIViH.js} +1 -1
- package/dist/cli/{spec-DsLQuJKp.js → spec-DsMWuJLv.js} +2 -2
- package/dist/cli/{sql-layout-CZ66pY8j.js → sql-layout-CA7xgRjR.js} +2 -2
- package/dist/cli/{sync-B12wbtFd.js → sync-D9xSGdzO.js} +4 -4
- package/dist/cli/{upgrade-C20z49De.js → upgrade-XK_CQKVJ.js} +2 -2
- package/dist/cli/{upgrade-AgUXFDo6.js → upgrade-Ykf0LLEB.js} +5 -5
- package/dist/cli/{version-DEUWW8cv.js → version-Dfdz7KSh.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-BGC0J3t9.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-CQrkLoRX.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-XwpuBbKN.d.ts → entitlements-BOWTZaRf.d.ts} +21 -3
- package/dist/entitlements-Dydkg-TV.js +47 -0
- 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-DxPZYw2m.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-BfU0KR0X.d.ts +107 -0
- package/dist/{index-xCpjvDVm.d.ts → index-Bhkag9ZE.d.ts} +14 -14
- package/dist/{index-B2871MHr.d.ts → index-Bz0WLuh_.d.ts} +5 -5
- package/dist/{index-D66_dYVi.d.ts → index-CJB50jzQ.d.ts} +4 -4
- package/dist/{index-B5_J-MaK.d.ts → index-CeUwyJ3Z.d.ts} +5 -5
- package/dist/{index-lazpPVr0.d.ts → index-D18su_r5.d.ts} +3 -3
- package/dist/index-DNAkWDXc.d.ts +289 -0
- 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-CRrBZtKm.d.ts → index-QTZIopQj.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-BG6prEnh.d.ts} +1 -1
- package/dist/{options-B56njigZ.js → options-CjocPkX1.js} +2 -0
- 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-CoHsUtZS.d.ts +44 -0
- package/dist/{pool-Bji4lnQM.d.ts → pool-D-4HyhuW.d.ts} +3 -3
- package/dist/{ports-C-hdygkZ.js → ports-CmEXVqhg.js} +1 -1
- package/dist/{ports-zFqRNXVJ.d.ts → ports-XvgCe7ey.d.ts} +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-B7nqCzn5.js} +2 -2
- package/dist/{provider-CH8McX3b.d.ts → provider-BI0KC4u5.d.ts} +1 -1
- package/dist/{push-token-a3Ev1U3L.d.ts → push-token-kcc04ZaS.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-DdtukoIm.js} +405 -187
- 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-Beqd7TTq.js +48 -0
- package/dist/{tenant-RKvGBB-U.d.ts → tenant-DkKbvK5T.d.ts} +4 -5
- 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-B6zuexk7.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-WZUVlTXs.d.ts → types-BkYEUWdz.d.ts} +189 -1
- package/dist/{types-CCmW3MqI.d.ts → types-BvHw2cCS.d.ts} +2 -2
- 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-YYSVJGDY.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 +8 -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,5 @@
|
|
|
1
|
-
import { Ft as RequestContext } from "./types-
|
|
2
|
-
import { r as AuthState } from "./resolve
|
|
1
|
+
import { Ft as RequestContext } from "./types-BkYEUWdz.js";
|
|
2
|
+
import { r as AuthState } from "./resolve--LfVoOMg.js";
|
|
3
3
|
/**
|
|
4
4
|
* An email address or chat user, as a bot or a mail webhook sees it. The value
|
|
5
5
|
* is what the platform reports; it names no one until an identity link maps it
|
|
@@ -49,7 +49,10 @@ function bindAuthorizer(authorizer, runtime) {
|
|
|
49
49
|
...evaluations ? { evaluations: (requests, call) => evaluations(requests, merged(call)) } : {}
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Identity helper that fixes `apiVersion` and infers `Ref`, and `V` from a
|
|
54
|
+
* typed `runtime` parameter.
|
|
55
|
+
*/
|
|
53
56
|
function defineAuthorizer(authorizer) {
|
|
54
57
|
return {
|
|
55
58
|
...authorizer,
|
|
@@ -70,7 +73,7 @@ function claimsProperty(claims) {
|
|
|
70
73
|
return { claims: deepFreeze(cloneValue(claims)) };
|
|
71
74
|
}
|
|
72
75
|
/** The subject and context of a request, from the verified context only. */
|
|
73
|
-
function requestOf(context) {
|
|
76
|
+
function requestOf(context, purpose = {}) {
|
|
74
77
|
const actor = context?.actor;
|
|
75
78
|
const claims = context?.claims;
|
|
76
79
|
const act = claims?.["act"];
|
|
@@ -90,7 +93,11 @@ function requestOf(context) {
|
|
|
90
93
|
context: {
|
|
91
94
|
...context?.tenant === void 0 ? {} : { tenant: context.tenant },
|
|
92
95
|
...typeof aal === "string" ? { aal } : {},
|
|
93
|
-
scopes: scopesOf(claims)
|
|
96
|
+
scopes: scopesOf(claims),
|
|
97
|
+
...purpose.intent === void 0 ? {} : { intent: purpose.intent },
|
|
98
|
+
...purpose.operation === void 0 ? {} : { operation: purpose.operation },
|
|
99
|
+
...typeof context?.requestId === "string" ? { requestId: context.requestId } : {},
|
|
100
|
+
...typeof context?.approval === "string" ? { approval: context.approval } : {}
|
|
94
101
|
}
|
|
95
102
|
};
|
|
96
103
|
}
|
|
@@ -119,6 +126,12 @@ function outcomeError(outcome, permission) {
|
|
|
119
126
|
default: return outcome;
|
|
120
127
|
}
|
|
121
128
|
}
|
|
129
|
+
function purposeOf(options) {
|
|
130
|
+
return {
|
|
131
|
+
...options.intent === void 0 ? {} : { intent: options.intent },
|
|
132
|
+
...options.operation === void 0 ? {} : { operation: options.operation }
|
|
133
|
+
};
|
|
134
|
+
}
|
|
122
135
|
/**
|
|
123
136
|
* Checks one permission and fails closed: a missing authorizer, a throw or an
|
|
124
137
|
* unknown outcome all deny. Never throws (invariant 4).
|
|
@@ -132,7 +145,7 @@ async function checkPermission(options) {
|
|
|
132
145
|
} catch {
|
|
133
146
|
return err(dbError("forbidden", "Unknown permission", { code: "PERMISSION_DENIED" }));
|
|
134
147
|
}
|
|
135
|
-
const { subject, context } = requestOf(options.context);
|
|
148
|
+
const { subject, context } = requestOf(options.context, purposeOf(options));
|
|
136
149
|
try {
|
|
137
150
|
const error = outcomeError(await evaluateWith(authorizer, {
|
|
138
151
|
subject,
|
|
@@ -152,9 +165,16 @@ async function checkPermission(options) {
|
|
|
152
165
|
* Checks one permission per resource, with `evaluations` when the authorizer
|
|
153
166
|
* has it. Returns whether each one is granted, in order; any failure denies.
|
|
154
167
|
*/
|
|
155
|
-
async function checkEach(authorizer, permission, resources, context, runtime) {
|
|
156
|
-
|
|
157
|
-
|
|
168
|
+
async function checkEach(authorizer, permission, resources, context, runtime, purpose = {}) {
|
|
169
|
+
return (await outcomesOf(authorizer, permission, resources, context, runtime, purpose)).map((outcome) => outcome === "granted");
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Like `checkEach`, but returns each decision's outcome name, or `undefined`
|
|
173
|
+
* when the authorizer gave none or failed.
|
|
174
|
+
*/
|
|
175
|
+
async function outcomesOf(authorizer, permission, resources, context, runtime, purpose = {}) {
|
|
176
|
+
if (!authorizer || resources.length === 0) return resources.map(() => void 0);
|
|
177
|
+
const { subject, context: requestContext } = requestOf(context, purposeOf(purpose));
|
|
158
178
|
const requests = resources.map((resource) => ({
|
|
159
179
|
subject,
|
|
160
180
|
action: permission,
|
|
@@ -163,9 +183,12 @@ async function checkEach(authorizer, permission, resources, context, runtime) {
|
|
|
163
183
|
}));
|
|
164
184
|
try {
|
|
165
185
|
const outcomes = authorizer.evaluations ? await (runtime ? authorizer.evaluations(requests, runtime) : authorizer.evaluations(requests)) : await Promise.all(requests.map((request) => evaluateWith(authorizer, request, runtime)));
|
|
166
|
-
return requests.map((_, index) =>
|
|
186
|
+
return requests.map((_, index) => {
|
|
187
|
+
const outcome = outcomes[index];
|
|
188
|
+
return isOutcome(outcome) ? outcome.outcome : void 0;
|
|
189
|
+
});
|
|
167
190
|
} catch {
|
|
168
|
-
return resources.map(() =>
|
|
191
|
+
return resources.map(() => void 0);
|
|
169
192
|
}
|
|
170
193
|
}
|
|
171
|
-
export { isRequestMemo as a, defineAuthorizer as i, checkEach as n,
|
|
194
|
+
export { isRequestMemo as a, requestOf as c, defineAuthorizer as i, checkEach as n, outcomesOf as o, checkPermission as r, requestMemo as s, bindAuthorizer as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as DbError, n as BetterResultApi, t as AsyncResult } from "../result-DTOQRyGY.js";
|
|
2
|
-
import { Ct as ApplyExtension, K as Insert, O as AnyFunctions, Z as PrimaryKeyValue, dt as TableMeta, ht as Update, k as AnyModels, ut as TableKey } from "../types-
|
|
3
|
-
import { $ as SearchArgs, A as OffsetPageArgs, At as GetArgs, B as Returned, C as FindExt, Ct as AggregateResult, D as ManyWriteArgs, E as ManyResult, F as PageOf, G as UpsertArgs, H as RpcArgs, I as PlainName, J as WriteManyArgs, K as UpsertManyArgs, L as RawRpcOptions, M as OverloadArgs, N as OverloadReturns, O as NoArgName, Ot as CountArgs, P as OverloadedName, Pt as ListArgs, S as DeleteExt, T as ManyOutcome, U as RpcOptions, V as RowFilter, Vt as Payload, W as UpdateArgs, bt as AggregateArgs, et as SearchScore, j as OffsetRangeArgs, lt as ReadSetResult, mt as QuerySpec, nt as ReadSet, pt as InferResult, q as WriteArgs, tt as InferReadSetParams, v as CursorPageArgs, w as GetKey, x as DeleteArgs, y as Db } from "../define-
|
|
4
|
-
import { a as ListExtra, d as ListQuery, i as ListDefinition, o as ListPage, s as ListPagination } from "../list-query-
|
|
2
|
+
import { Ct as ApplyExtension, K as Insert, O as AnyFunctions, Z as PrimaryKeyValue, dt as TableMeta, ht as Update, k as AnyModels, ut as TableKey } from "../types-BkYEUWdz.js";
|
|
3
|
+
import { $ as SearchArgs, A as OffsetPageArgs, At as GetArgs, B as Returned, C as FindExt, Ct as AggregateResult, D as ManyWriteArgs, E as ManyResult, F as PageOf, G as UpsertArgs, H as RpcArgs, I as PlainName, J as WriteManyArgs, K as UpsertManyArgs, L as RawRpcOptions, M as OverloadArgs, N as OverloadReturns, O as NoArgName, Ot as CountArgs, P as OverloadedName, Pt as ListArgs, S as DeleteExt, T as ManyOutcome, U as RpcOptions, V as RowFilter, Vt as Payload, W as UpdateArgs, bt as AggregateArgs, et as SearchScore, j as OffsetRangeArgs, lt as ReadSetResult, mt as QuerySpec, nt as ReadSet, pt as InferResult, q as WriteArgs, tt as InferReadSetParams, v as CursorPageArgs, w as GetKey, x as DeleteArgs, y as Db } from "../define-ITQA71fw.js";
|
|
4
|
+
import { a as ListExtra, d as ListQuery, i as ListDefinition, o as ListPage, s as ListPagination } from "../list-query-C7V8kUaD.js";
|
|
5
5
|
import { Result } from "better-result";
|
|
6
6
|
/**
|
|
7
7
|
* Better-result's `Result` namespace with the function each `DbError` goes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { O as AnyFunctions, k as AnyModels } from "./types-
|
|
2
|
-
import { o as BlockTenant } from "./block-helpers-
|
|
3
|
-
import { t as BetterSupabase, y as Db } from "./define-
|
|
4
|
-
import { n as DataEngine } from "./data-engine-
|
|
5
|
-
import { Dn as GeneratedBlocks } from "./define-block-
|
|
6
|
-
import { rt as BetterQueries } from "./index-
|
|
7
|
-
import { t as ClientPorts } from "./ports-
|
|
1
|
+
import { O as AnyFunctions, k as AnyModels } from "./types-BkYEUWdz.js";
|
|
2
|
+
import { o as BlockTenant } from "./block-helpers-disoUWCp.js";
|
|
3
|
+
import { t as BetterSupabase, y as Db } from "./define-ITQA71fw.js";
|
|
4
|
+
import { n as DataEngine } from "./data-engine-CMENsp3d.js";
|
|
5
|
+
import { Dn as GeneratedBlocks } from "./define-block-COmMkx2x.js";
|
|
6
|
+
import { rt as BetterQueries } from "./index-BIAtapnD.js";
|
|
7
|
+
import { t as ClientPorts } from "./ports-XvgCe7ey.js";
|
|
8
8
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
9
9
|
interface AuthUser {
|
|
10
10
|
readonly id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Dn as GeneratedBlocks } from "./define-block-
|
|
2
|
-
import { n as TopicPort } from "./watch-topic-
|
|
3
|
-
import { t as ClientPorts } from "./ports-
|
|
4
|
-
import { t as AuthPort } from "./controller-
|
|
1
|
+
import { Dn as GeneratedBlocks } from "./define-block-COmMkx2x.js";
|
|
2
|
+
import { n as TopicPort } from "./watch-topic-YYSVJGDY.js";
|
|
3
|
+
import { t as ClientPorts } from "./ports-XvgCe7ey.js";
|
|
4
|
+
import { t as AuthPort } from "./controller-CQrkLoRX.js";
|
|
5
5
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
6
6
|
/**
|
|
7
7
|
* What the block bindings hand their controllers: the provider's client,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
2
|
-
import { t as BlockTransport } from "./block-transport-
|
|
2
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
3
3
|
/**
|
|
4
4
|
* Where a block reads the active tenant: an organization id, or a function that
|
|
5
5
|
* returns the current one, such as `() => db.$context.tenant` on the server or
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { T as ErrorMapper, b as DbError, f as Result, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
2
2
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
3
|
-
import { t as BlockCall } from "./block-helpers-
|
|
4
|
-
import { t as BlockTransport } from "./block-transport-
|
|
3
|
+
import { t as BlockCall } from "./block-helpers-disoUWCp.js";
|
|
4
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
5
5
|
/** A block method: anything that returns an `AsyncResult`. */
|
|
6
6
|
type BlockMethod = (...args: never[]) => AsyncResult<unknown>;
|
|
7
7
|
/** The names of a block client's methods that return an `AsyncResult`. */
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cn as ResolvedConfig } from "./context-BGC0J3t9.js";
|
|
2
|
+
/**
|
|
3
|
+
* One block table as the config names it: unquoted schema and table, and each
|
|
4
|
+
* logical column's written name, or `null` when an adopted table lacks it.
|
|
5
|
+
*/
|
|
6
|
+
interface BlockTable<Column extends string = string> {
|
|
7
|
+
readonly schema: string;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
/** `schema.name`, unquoted. */
|
|
10
|
+
readonly table: string;
|
|
11
|
+
readonly columns: { readonly [K in Column]: string | null; };
|
|
12
|
+
}
|
|
13
|
+
/** The membership and tenant tables an authorization library reads. */
|
|
14
|
+
interface BlockTables {
|
|
15
|
+
/** `blocks.memberships`: one row per member of a tenant. */
|
|
16
|
+
readonly memberships?: BlockTable<"tenant" | "user" | "role" | "disabledAt">;
|
|
17
|
+
/** `membership_roles`, with `blocks.memberships.options.roles.many`. */
|
|
18
|
+
readonly membershipRoles?: BlockTable<"tenant" | "user" | "role">;
|
|
19
|
+
/** `blocks.organizations`: the tenants. */
|
|
20
|
+
readonly organizations?: BlockTable<"id" | "name" | "slug" | "disabledAt" | "deletedAt">;
|
|
21
|
+
/**
|
|
22
|
+
* Every installed block instance, by instance name, then logical table. A
|
|
23
|
+
* table the config maps to `null` is left out.
|
|
24
|
+
*/
|
|
25
|
+
readonly byBlock: Readonly<Record<string, Readonly<Record<string, BlockTable>>>>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The block tables `config` installs, with `blocks.<name>.tables` and
|
|
29
|
+
* `blocks.<name>.columns` renames resolved the way the rendered SQL resolves
|
|
30
|
+
* them (`ctx.table` and `ctx.col`). An authorization library reads its
|
|
31
|
+
* membership and tenant tables from here instead of hard-coding the defaults.
|
|
32
|
+
*/
|
|
33
|
+
declare function blockTables(config: ResolvedConfig): BlockTables;
|
|
34
|
+
export { BlockTables as n, blockTables as r, BlockTable as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bt as Executor } from "./types-
|
|
2
|
-
import { n as SqlClient } from "./executor-
|
|
1
|
+
import { Bt as Executor } from "./types-BkYEUWdz.js";
|
|
2
|
+
import { n as SqlClient } from "./executor-CFmee_nV.js";
|
|
3
3
|
/**
|
|
4
4
|
* Calls a block function as the current user and resolves with its result.
|
|
5
5
|
* Rejects with the raw database error (a `pg` error or a PostgREST error
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
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
|
-
import { Ct as Events, f as AccessRequestEventData } from "../../events-
|
|
5
|
+
import { Ct as Events, f as AccessRequestEventData } from "../../events-DVt3Z9hw.js";
|
|
6
6
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
7
|
-
import { r as BlockTemporalOptions } from "../../block-helpers-
|
|
8
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
9
|
-
import { n as BlockHooks } from "../../block-hooks-
|
|
10
|
-
import { c as BlockOf } from "../../define-block-
|
|
7
|
+
import { r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
|
|
8
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
9
|
+
import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
|
|
10
|
+
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
11
11
|
interface AccessRequestsOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions {
|
|
12
12
|
readonly transport: BlockTransport;
|
|
13
13
|
/**
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
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
|
-
import { Ct as Events } from "../../events-
|
|
6
|
-
import { b as EngagementEventData, x as EngagementRecordingEventData } from "../../index-
|
|
5
|
+
import { Ct as Events } from "../../events-DVt3Z9hw.js";
|
|
6
|
+
import { b as EngagementEventData, x as EngagementRecordingEventData } from "../../index-D18su_r5.js";
|
|
7
7
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
8
|
-
import { r as BlockTemporalOptions } from "../../block-helpers-
|
|
9
|
-
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
10
|
-
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-
|
|
11
|
-
import { f as AiFiles } from "../../types-
|
|
12
|
-
import { _ as JobHandler } from "../../types-
|
|
13
|
-
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-
|
|
14
|
-
import { a as EngagementRecording, c as NoteTakerInput, d as Transcript, f as TranscriptSegment, i as EngagementNotesInput, l as Transcriber, n as EngagementActionItem, o as EngagementRecordingStatus, p as TranscriptSegmentInput, r as EngagementNotes, s as NoteTaker, t as ENGAGEMENT_TRANSCRIBE_QUEUE, u as TranscriberInput } from "../../recordings-
|
|
8
|
+
import { r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
|
|
9
|
+
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
10
|
+
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DrA_d1dJ.js";
|
|
11
|
+
import { f as AiFiles } from "../../types-C8UyJOPJ.js";
|
|
12
|
+
import { _ as JobHandler } from "../../types-Dh2OGEW5.js";
|
|
13
|
+
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
14
|
+
import { a as EngagementRecording, c as NoteTakerInput, d as Transcript, f as TranscriptSegment, i as EngagementNotesInput, l as Transcriber, n as EngagementActionItem, o as EngagementRecordingStatus, p as TranscriptSegmentInput, r as EngagementNotes, s as NoteTaker, t as ENGAGEMENT_TRANSCRIBE_QUEUE, u as TranscriberInput } from "../../recordings-D69Va7gP.js";
|
|
15
15
|
/** A record an engagement is on. */
|
|
16
16
|
interface EngagementSubject {
|
|
17
17
|
readonly type: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ct as Events, p as AgentEventData } from "../../events-
|
|
2
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
3
|
-
import { a as AgentSkill, c as AgentsOptions, i as AgentKnowledgeScope, l as NewAgent, n as AgentFields, o as AgentVisibility, r as AgentFilter, s as Agents, t as Agent, u as createAgents } from "../../agents-
|
|
4
|
-
import { c as BlockOf } from "../../define-block-
|
|
1
|
+
import { Ct as Events, p as AgentEventData } from "../../events-DVt3Z9hw.js";
|
|
2
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
3
|
+
import { a as AgentSkill, c as AgentsOptions, i as AgentKnowledgeScope, l as NewAgent, n as AgentFields, o as AgentVisibility, r as AgentFilter, s as Agents, t as Agent, u as createAgents } from "../../agents-DXiOPB3V.js";
|
|
4
|
+
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
5
5
|
/** The events of the `agents` block: type to data. */
|
|
6
6
|
type AgentsEvents = {
|
|
7
7
|
readonly "agent.saved": AgentEventData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
2
|
-
import { a as AiCacheSetOptions, i as AiCacheOptions, n as AiCacheEntry, o as cacheKey, r as AiCacheKind, s as createAiCache, t as AiCache } from "../../ai-cache-
|
|
3
|
-
import { c as BlockOf } from "../../define-block-
|
|
1
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
2
|
+
import { a as AiCacheSetOptions, i as AiCacheOptions, n as AiCacheEntry, o as cacheKey, r as AiCacheKind, s as createAiCache, t as AiCache } from "../../ai-cache-CLiAXCPH.js";
|
|
3
|
+
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
4
4
|
/** The `ai-cache` block's manifest (ADR 0029). */
|
|
5
5
|
export declare const aiCacheBlock: BlockOf<"ai-cache", typeof createAiCache>;
|
|
6
6
|
export { type AiCache, type AiCacheEntry, type AiCacheKind, type AiCacheOptions, type AiCacheSetOptions, type BlockTransport, cacheKey, createAiCache, dbTransport, rpcTransport, sqlTransport };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { b as DbError } from "../../result-DTOQRyGY.js";
|
|
2
|
-
import { Ct as Events, g as AiToolEventData, m as AiChatEventData } from "../../events-
|
|
3
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
2
|
+
import { Ct as Events, g as AiToolEventData, m as AiChatEventData } from "../../events-DVt3Z9hw.js";
|
|
3
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
4
4
|
import { a as AiMessagePart, c as AiReasoningPart, d as AiTextPart, f as AiToolApprovalPart, g as isAiMessage, h as aiMessageSchema, i as AiMessage, l as AiSourcePart, m as AiToolResultPart, n as AiDataPart, o as AiMessagePartType, p as AiToolCallPart, r as AiFilePart, s as AiMessageRole, t as AI_MESSAGE_SCHEMA_ID, u as AiStepPart } from "../../message-Cc4bkdNw.js";
|
|
5
|
-
import { A as AiStoredMessageStatus, B as AiHarnessSession, C as AiProject, D as AiSaveResult, E as AiRunStatus, F as AiUserMessageTrigger, G as AiRun, H as AiHarnessSessions, I as SharedAiChat, J as AiRunStep, K as AiRunQuery, L as aiChatListTopic, M as AiToolApproval, N as AiToolApprovalRequest, O as AiShareLink, P as AiToolPolicy, Q as createHarnessSessions, R as aiChatTopic, S as AiPendingInputRequest, T as AiRunRelease, U as AiHarnessStatus, V as AiHarnessSessionPatch, W as AiPendingApproval, X as AiRunStepStatus, Y as AiRunStepInput, Z as AiRuns, _ as AiModerationAction, a as AiChatInput, b as AiModerationStage, c as AiChatPatch, d as AiChatShare, f as AiChatVisibility, g as AiModelInput, h as AiModel, i as AiChat, j as AiStreamClaim, k as AiStoredMessage, l as AiChatQuery, m as AiMessageSibling, n as AiApprovalDecision, o as AiChatOptions, p as AiFeedback, q as AiRunState, r as AiAssistantMessageOptions, s as AiChatPage, t as AiAppendResult, u as AiChatRecord, v as AiModerationEvent, w as AiProjectInput, x as AiPendingInput, y as AiModerationInput, z as createAiChat } from "../../ai-chat-
|
|
6
|
-
import { a as NewAiSandbox, i as AiSandboxes, n as AiSandboxStatus, r as AiSandboxStopper, t as AiSandbox } from "../../sandboxes-
|
|
7
|
-
import { c as BlockOf } from "../../define-block-
|
|
8
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
9
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
10
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
5
|
+
import { A as AiStoredMessageStatus, B as AiHarnessSession, C as AiProject, D as AiSaveResult, E as AiRunStatus, F as AiUserMessageTrigger, G as AiRun, H as AiHarnessSessions, I as SharedAiChat, J as AiRunStep, K as AiRunQuery, L as aiChatListTopic, M as AiToolApproval, N as AiToolApprovalRequest, O as AiShareLink, P as AiToolPolicy, Q as createHarnessSessions, R as aiChatTopic, S as AiPendingInputRequest, T as AiRunRelease, U as AiHarnessStatus, V as AiHarnessSessionPatch, W as AiPendingApproval, X as AiRunStepStatus, Y as AiRunStepInput, Z as AiRuns, _ as AiModerationAction, a as AiChatInput, b as AiModerationStage, c as AiChatPatch, d as AiChatShare, f as AiChatVisibility, g as AiModelInput, h as AiModel, i as AiChat, j as AiStreamClaim, k as AiStoredMessage, l as AiChatQuery, m as AiMessageSibling, n as AiApprovalDecision, o as AiChatOptions, p as AiFeedback, q as AiRunState, r as AiAssistantMessageOptions, s as AiChatPage, t as AiAppendResult, u as AiChatRecord, v as AiModerationEvent, w as AiProjectInput, x as AiPendingInput, y as AiModerationInput, z as createAiChat } from "../../ai-chat-DlcBdOhJ.js";
|
|
6
|
+
import { a as NewAiSandbox, i as AiSandboxes, n as AiSandboxStatus, r as AiSandboxStopper, t as AiSandbox } from "../../sandboxes-B2hBoBvJ.js";
|
|
7
|
+
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
8
|
+
import { p as SubscriptionStatus } from "../../topic-B6zuexk7.js";
|
|
9
|
+
import { n as TopicPort } from "../../watch-topic-YYSVJGDY.js";
|
|
10
|
+
import { n as Controller, t as AuthPort } from "../../controller-CQrkLoRX.js";
|
|
11
11
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
12
12
|
/**
|
|
13
13
|
* The `type` of each part in the canonical AI message (version 1); the SQL
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
|
|
2
2
|
import { r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
|
|
3
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
4
|
-
import { _ as NewAiFile, a as AiDocumentWithContent, c as AiFileSource, d as AiFileUpload, f as AiFiles, g as NewAiDocument, h as AiSuggestion, i as AiDocumentVersion, l as AiFileStatus, m as AiProviderFile, n as AiDocumentEdit, o as AiFile, p as AiFilesOptions, r as AiDocumentKind, s as AiFileBucket, t as AiDocument, u as AiFileStorage, v as StoredAiFile } from "../../types-
|
|
5
|
-
import { c as BlockOf } from "../../define-block-
|
|
3
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
4
|
+
import { _ as NewAiFile, a as AiDocumentWithContent, c as AiFileSource, d as AiFileUpload, f as AiFiles, g as NewAiDocument, h as AiSuggestion, i as AiDocumentVersion, l as AiFileStatus, m as AiProviderFile, n as AiDocumentEdit, o as AiFile, p as AiFilesOptions, r as AiDocumentKind, s as AiFileBucket, t as AiDocument, u as AiFileStorage, v as StoredAiFile } from "../../types-C8UyJOPJ.js";
|
|
5
|
+
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
6
6
|
/** The URL a message stores for a file: `supabase-storage://{bucket}/{path}`. */
|
|
7
7
|
export declare function aiFileUrl(file: Pick<AiFile, "bucket" | "path">): string;
|
|
8
8
|
/** The bucket and path of a `supabase-storage://` URL, or `undefined`. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ct as Events, h as AiProviderKeyEventData } from "../../events-
|
|
2
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
3
|
-
import { a as AiBatchItemStatus, c as AiKeys, d as AiProviderKeyInput, f as NewAiBatch, i as AiBatchItemInput, l as AiKeysOptions, n as AiBatchCounts, o as AiBatchPatch, p as ResolvedProviderKey, r as AiBatchItem, s as AiBatchStatus, t as AiBatch, u as AiProviderKey } from "../../types-
|
|
4
|
-
import { c as BlockOf } from "../../define-block-
|
|
1
|
+
import { Ct as Events, h as AiProviderKeyEventData } from "../../events-DVt3Z9hw.js";
|
|
2
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
3
|
+
import { a as AiBatchItemStatus, c as AiKeys, d as AiProviderKeyInput, f as NewAiBatch, i as AiBatchItemInput, l as AiKeysOptions, n as AiBatchCounts, o as AiBatchPatch, p as ResolvedProviderKey, r as AiBatchItem, s as AiBatchStatus, t as AiBatch, u as AiProviderKey } from "../../types-BBqP9H6w.js";
|
|
4
|
+
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
5
5
|
/** Per-tenant provider keys and provider batch jobs. */
|
|
6
6
|
export declare function createAiKeys(options: AiKeysOptions): AiKeys;
|
|
7
7
|
/** The events of the `ai-keys` block: type to data. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
2
|
-
import { c as BlockOf } from "../../define-block-
|
|
3
|
-
import { a as AiTaskOutcome, c as AiTaskRunner, i as AiTaskFields, l as NewAiTask, n as AiSchedulesOptions, o as AiTaskRun, r as AiTask, s as AiTaskRunStatus, t as AiSchedules, u as createAiSchedules } from "../../ai-schedules-
|
|
1
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
2
|
+
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
3
|
+
import { a as AiTaskOutcome, c as AiTaskRunner, i as AiTaskFields, l as NewAiTask, n as AiSchedulesOptions, o as AiTaskRun, r as AiTask, s as AiTaskRunStatus, t as AiSchedules, u as createAiSchedules } from "../../ai-schedules-Drx2KRTn.js";
|
|
4
4
|
/** The `ai-schedules` block's manifest (ADR 0029). */
|
|
5
5
|
export declare const aiSchedulesBlock: BlockOf<"ai-schedules", typeof createAiSchedules, Record<never, never>, {
|
|
6
6
|
readonly notifier: "optional";
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { T as ErrorMapper, b as DbError, 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
|
-
import { Ct as Events, _ as AnnouncementEventData } from "../../events-
|
|
5
|
+
import { Ct as Events, _ as AnnouncementEventData } from "../../events-DVt3Z9hw.js";
|
|
6
6
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
7
|
-
import { r as BlockTemporalOptions } from "../../block-helpers-
|
|
8
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
9
|
-
import { n as BlockHooks } from "../../block-hooks-
|
|
10
|
-
import { c as BlockOf } from "../../define-block-
|
|
11
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
12
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
13
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
7
|
+
import { r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
|
|
8
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
9
|
+
import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
|
|
10
|
+
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
11
|
+
import { p as SubscriptionStatus } from "../../topic-B6zuexk7.js";
|
|
12
|
+
import { n as TopicPort } from "../../watch-topic-YYSVJGDY.js";
|
|
13
|
+
import { n as Controller, t as AuthPort } from "../../controller-CQrkLoRX.js";
|
|
14
14
|
type AnnouncementSeverity = "info" | "success" | "warning" | "critical";
|
|
15
15
|
/**
|
|
16
16
|
* Who sees it: everyone, members of some tenants, members with some roles, or
|
|
@@ -1,108 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
4
|
-
|
|
5
|
-
import { t as BlockProblemOptions } from "../../problem-NGBjN-TO.js";
|
|
6
|
-
import { c as BlockOf } from "../../define-block-B_i9VPcc.js";
|
|
7
|
-
import { n as Controller, t as AuthPort } from "../../controller-D_UJBaEU.js";
|
|
8
|
-
import { _ as createApiKeys, a as ApiKeyExtraClaims, c as ApiKeyState, d as CreateApiKeyInput, f as CreatedApiKey, g as apiKeyResolver, h as apiKeyClaims, i as ApiKeyExtraClaim, l as ApiKeys, m as apiKeyChecksum, n as ApiKeyCheck, o as ApiKeyReservedClaim, p as ParsedApiKey, r as ApiKeyClaimsOptions, s as ApiKeyResolverOptions, t as ApiKey, u as ApiKeysOptions, v as parseApiKey } from "../../api-keys-u2sXB-CZ.js";
|
|
9
|
-
import { Entry } from "@supabase/middleware";
|
|
10
|
-
import { AuthMode, JWTClaims, UserClaims } from "@supabase/server";
|
|
11
|
-
interface WithApiKeyOptions<F extends object = Record<never, never>> extends ApiKeyResolverOptions<F>, BlockProblemOptions {}
|
|
12
|
-
/** The API key a request verified with, as `withApiKey` puts it on `ctx.auth`. */
|
|
13
|
-
type ApiKeyAuth = Extract<AuthState, {
|
|
14
|
-
readonly kind: "apiKey";
|
|
15
|
-
}>;
|
|
16
|
-
/** The keys `withApiKey` puts on `ctx`. */
|
|
17
|
-
interface ApiKeyContributions {
|
|
18
|
-
readonly auth: ApiKeyAuth;
|
|
19
|
-
/**
|
|
20
|
-
* The key's claims (`sub`, `role: authenticated`, `api_key`), for
|
|
21
|
-
* `withPostgresClient`.
|
|
22
|
-
*/
|
|
23
|
-
readonly jwtClaims: JWTClaims | null;
|
|
24
|
-
readonly userClaims: UserClaims | null;
|
|
25
|
-
readonly authMode: AuthMode;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* A `@supabase/server` pipeline entry for routes that take API keys
|
|
29
|
-
* (`x-api-key`, or `Authorization: Bearer` with a key): it verifies the key
|
|
30
|
-
* with `keys.verify`, answers a missing, invalid or rate-limited key with
|
|
31
|
-
* Problem Details, and contributes `ctx.auth` and the `withSupabase` keys
|
|
32
|
-
* (`jwtClaims`, `userClaims`, `authMode`) from the key's claims, so
|
|
33
|
-
* `withPostgresClient` and `withBetterPostgres` run queries as the key.
|
|
34
|
-
*
|
|
35
|
-
* ```ts
|
|
36
|
-
* pipeline([withApiKey({ keys }), withPostgresClient(), withBetterPostgres(betterSupabase)()], (req, ctx) => ...)
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare function withApiKey<F extends object = Record<never, never>>(options: WithApiKeyOptions<F>): Entry<ApiKeyContributions>;
|
|
40
|
-
/** What `create` takes: the organization comes from the controller. */
|
|
41
|
-
type ApiKeyDraft = Omit<CreateApiKeyInput, "organizationId">;
|
|
42
|
-
/** A key change that committed, for `onChanged`. */
|
|
43
|
-
type ApiKeyChange = {
|
|
44
|
-
readonly kind: "created";
|
|
45
|
-
readonly key: ApiKey;
|
|
46
|
-
} | {
|
|
47
|
-
readonly kind: "revoked";
|
|
48
|
-
readonly id: string;
|
|
49
|
-
};
|
|
50
|
-
interface ApiKeysControllerOptions {
|
|
51
|
-
readonly client: Pick<ApiKeys, "list" | "create" | "revoke">;
|
|
52
|
-
readonly auth: AuthPort;
|
|
53
|
-
/**
|
|
54
|
-
* The organization whose keys to list and create: all of them for its
|
|
55
|
-
* managers, the caller's own for everyone else. `null` lists the caller's
|
|
56
|
-
* personal keys.
|
|
57
|
-
*/
|
|
58
|
-
readonly organizationId: string | null;
|
|
59
|
-
/**
|
|
60
|
-
* Runs after a key was created or revoked, such as a server action that
|
|
61
|
-
* completes an onboarding step. A throw is kept in `error`.
|
|
62
|
-
*/
|
|
63
|
-
readonly onChanged?: (change: ApiKeyChange) => void | Promise<void>;
|
|
64
|
-
}
|
|
65
|
-
interface ApiKeysSnapshot {
|
|
66
|
-
/** Newest first; `undefined` until the first load. */
|
|
67
|
-
readonly keys: readonly ApiKey[] | undefined;
|
|
68
|
-
/** Whether a key is being created. */
|
|
69
|
-
readonly creating: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* The key `create` made, with its token, which is shown once; until
|
|
72
|
-
* `dismiss`.
|
|
73
|
-
*/
|
|
74
|
-
readonly created: CreatedApiKey | undefined;
|
|
75
|
-
/** The key ids with a revoke in flight. */
|
|
76
|
-
readonly revoking: readonly string[];
|
|
77
|
-
readonly error: DbError | undefined;
|
|
78
|
-
}
|
|
79
|
-
interface ApiKeysActions {
|
|
80
|
-
/**
|
|
81
|
-
* Creates a key and keeps its token in `created`; a failure is also kept in
|
|
82
|
-
* `error`.
|
|
83
|
-
*/
|
|
84
|
-
readonly create: (draft: ApiKeyDraft) => Promise<Result<CreatedApiKey>>;
|
|
85
|
-
/** Revokes a key at once, then loads the list again. */
|
|
86
|
-
readonly revoke: (id: string) => Promise<Result<boolean>>;
|
|
87
|
-
/** Forgets `created` and `error`, such as when the token dialog closes. */
|
|
88
|
-
readonly dismiss: () => void;
|
|
89
|
-
readonly refresh: () => Promise<void>;
|
|
90
|
-
}
|
|
91
|
-
type ApiKeysController = Controller<ApiKeysSnapshot, ApiKeysActions>;
|
|
92
|
-
/**
|
|
93
|
-
* The API keys of an organization (or the caller's personal keys) for an API
|
|
94
|
-
* keys table: `create` returns the token once, `revoke` revokes a key, and both
|
|
95
|
-
* load the list again.
|
|
96
|
-
*/
|
|
97
|
-
export declare function createApiKeysController(options: ApiKeysControllerOptions): ApiKeysController;
|
|
98
|
-
/** The events of the `api-keys` block: type to data. */
|
|
99
|
-
type ApiKeysEvents = {
|
|
100
|
-
readonly "api_key.created": ApiKeyEventData;
|
|
101
|
-
readonly "api_key.revoked": ApiKeyEventData;
|
|
102
|
-
readonly "api_key.rotated": ApiKeyEventData;
|
|
103
|
-
};
|
|
104
|
-
/** The `api-keys` block's event types, for its manifest and `onBlockEvent`. */
|
|
105
|
-
export declare const apiKeysEvents: Events<ApiKeysEvents>;
|
|
106
|
-
/** The `api-keys` block's manifest (ADR 0029). */
|
|
107
|
-
export declare const apiKeysBlock: BlockOf<"api-keys", typeof createApiKeys, ApiKeysEvents>;
|
|
108
|
-
export { type ApiKey, type ApiKeyAuth, type ApiKeyChange, type ApiKeyCheck, type ApiKeyClaimsOptions, type ApiKeyContributions, type ApiKeyDraft, type ApiKeyExtraClaim, type ApiKeyExtraClaims, type ApiKeyReservedClaim, type ApiKeyResolverOptions, type ApiKeyState, type ApiKeys, type ApiKeysActions, type ApiKeysController, type ApiKeysControllerOptions, type ApiKeysEvents, type ApiKeysOptions, type ApiKeysSnapshot, type BlockTransport, type CreateApiKeyInput, type CreatedApiKey, type ParsedApiKey, type WithApiKeyOptions, apiKeyChecksum, apiKeyClaims, apiKeyResolver, createApiKeys, dbTransport, parseApiKey, rpcTransport, sqlTransport };
|
|
1
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
2
|
+
import { _ as createApiKeys, a as ApiKeyExtraClaims, c as ApiKeyState, d as CreateApiKeyInput, f as CreatedApiKey, g as apiKeyResolver, h as apiKeyClaims, i as ApiKeyExtraClaim, l as ApiKeys, m as apiKeyChecksum, n as ApiKeyCheck, o as ApiKeyReservedClaim, p as ParsedApiKey, r as ApiKeyClaimsOptions, s as ApiKeyResolverOptions, t as ApiKey, u as ApiKeysOptions, v as parseApiKey } from "../../api-keys-DbIbkGxx.js";
|
|
3
|
+
import { a as ApiKeyDraft, c as ApiKeysControllerOptions, d as ApiKeyAuth, f as ApiKeyContributions, i as ApiKeyChange, l as ApiKeysSnapshot, m as withApiKey, n as ApiKeysEvents, o as ApiKeysActions, p as WithApiKeyOptions, r as apiKeysEvents, s as ApiKeysController, t as apiKeysBlock, u as createApiKeysController } from "../../index-BfU0KR0X.js";
|
|
4
|
+
export { type ApiKey, type ApiKeyAuth, type ApiKeyChange, type ApiKeyCheck, type ApiKeyClaimsOptions, type ApiKeyContributions, type ApiKeyDraft, type ApiKeyExtraClaim, type ApiKeyExtraClaims, type ApiKeyReservedClaim, type ApiKeyResolverOptions, type ApiKeyState, type ApiKeys, type ApiKeysActions, type ApiKeysController, type ApiKeysControllerOptions, type ApiKeysEvents, type ApiKeysOptions, type ApiKeysSnapshot, type BlockTransport, type CreateApiKeyInput, type CreatedApiKey, type ParsedApiKey, type WithApiKeyOptions, apiKeyChecksum, apiKeyClaims, apiKeyResolver, apiKeysBlock, apiKeysEvents, createApiKeys, createApiKeysController, dbTransport, parseApiKey, rpcTransport, sqlTransport, withApiKey };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as CollaborationEventData, Ct as Events } from "../../events-
|
|
2
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
3
|
-
import { c as BlockOf } from "../../define-block-
|
|
4
|
-
import { a as ApprovalRequestDetail, c as ApprovalStep, d as createApprovals, i as ApprovalRequest, l as Approvals, n as ApprovalDecision, o as ApprovalRequestInput, r as ApprovalListOptions, s as ApprovalStatus, t as ApprovalApprovers, u as ApprovalsOptions } from "../../approvals-
|
|
1
|
+
import { A as CollaborationEventData, Ct as Events } from "../../events-DVt3Z9hw.js";
|
|
2
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
3
|
+
import { c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
4
|
+
import { a as ApprovalRequestDetail, c as ApprovalStep, d as createApprovals, i as ApprovalRequest, l as Approvals, n as ApprovalDecision, o as ApprovalRequestInput, r as ApprovalListOptions, s as ApprovalStatus, t as ApprovalApprovers, u as ApprovalsOptions } from "../../approvals-DZoGtNFv.js";
|
|
5
5
|
/** The events of the `approvals` block: type to data. */
|
|
6
6
|
type ApprovalsEvents = {
|
|
7
7
|
readonly "approval.requested": CollaborationEventData;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
3
|
-
import { $ as RecordRef } from "../../types-
|
|
4
|
-
import { Ct as Events } from "../../events-
|
|
3
|
+
import { $ as RecordRef } from "../../types-BkYEUWdz.js";
|
|
4
|
+
import { Ct as Events } from "../../events-DVt3Z9hw.js";
|
|
5
5
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
6
|
-
import { a as BlockTenantOptions, r as BlockTemporalOptions } from "../../block-helpers-
|
|
7
|
-
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
8
|
-
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-
|
|
6
|
+
import { a as BlockTenantOptions, r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
|
|
7
|
+
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
8
|
+
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DrA_d1dJ.js";
|
|
9
9
|
import { t as AssetsSqlOptions } from "../../options-Bwrwb8do.js";
|
|
10
|
-
import { c as BlockOf, rn as RecordBinding } from "../../define-block-
|
|
10
|
+
import { c as BlockOf, rn as RecordBinding } from "../../define-block-COmMkx2x.js";
|
|
11
11
|
interface AssetsOptions extends BlockTemporalOptions, BlockTenantOptions {
|
|
12
12
|
readonly transport: BlockTransport;
|
|
13
13
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
3
|
-
import { Ct as Events } from "../../events-
|
|
4
|
-
import { p as AssignmentEventData } from "../../index-
|
|
3
|
+
import { Ct as Events } from "../../events-DVt3Z9hw.js";
|
|
4
|
+
import { p as AssignmentEventData } from "../../index-D18su_r5.js";
|
|
5
5
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
6
|
-
import { r as BlockTemporalOptions } from "../../block-helpers-
|
|
7
|
-
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
8
|
-
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-
|
|
9
|
-
import { h as FilterQuery } from "../../filter-query-
|
|
10
|
-
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-
|
|
6
|
+
import { r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
|
|
7
|
+
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
8
|
+
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DrA_d1dJ.js";
|
|
9
|
+
import { h as FilterQuery } from "../../filter-query-DV-x8fio.js";
|
|
10
|
+
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-COmMkx2x.js";
|
|
11
11
|
/** How a queue picks the next owner. */
|
|
12
12
|
type AssignmentStrategy = "round_robin" | "weighted";
|
|
13
13
|
/** A member in a queue's rotation. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { b as DbError, f as Result, t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
2
|
-
import { Ct as Events, ot as StorageObjectEventData, y as AttachmentEventData } from "../../events-
|
|
3
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-
|
|
2
|
+
import { Ct as Events, ot as StorageObjectEventData, y as AttachmentEventData } from "../../events-DVt3Z9hw.js";
|
|
3
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
|
|
4
4
|
import { t as Author } from "../../block-authors-C5z3tGVu.js";
|
|
5
|
-
import { At as NewAttachment, Ct as AttachmentScannerOptions, Dt as AttachmentVersion, Et as AttachmentUpload, Ft as ScannedObject, It as attachmentVersionOf, Lt as createAttachmentScanner, Mt as ObjectScanner, Nt as ObjectScannerOptions, Ot as Attachments, Pt as ScanVerdict, Rt as createAttachments, Sn as EntitySchema, St as AttachmentScanner, Tt as AttachmentStorage, _t as AttachmentDownload, bt as AttachmentReplacement, c as BlockOf, gt as AttachmentBucket, ht as Attachment, jt as ObjectScanJob, kt as AttachmentsOptions, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding, vt as AttachmentImageUrlOptions, wt as AttachmentStatus, xt as AttachmentScanJob, yt as AttachmentImages, zt as createObjectScanner } from "../../define-block-
|
|
6
|
-
import { n as Controller } from "../../controller-
|
|
5
|
+
import { At as NewAttachment, Ct as AttachmentScannerOptions, Dt as AttachmentVersion, Et as AttachmentUpload, Ft as ScannedObject, It as attachmentVersionOf, Lt as createAttachmentScanner, Mt as ObjectScanner, Nt as ObjectScannerOptions, Ot as Attachments, Pt as ScanVerdict, Rt as createAttachments, Sn as EntitySchema, St as AttachmentScanner, Tt as AttachmentStorage, _t as AttachmentDownload, bt as AttachmentReplacement, c as BlockOf, gt as AttachmentBucket, ht as Attachment, jt as ObjectScanJob, kt as AttachmentsOptions, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding, vt as AttachmentImageUrlOptions, wt as AttachmentStatus, xt as AttachmentScanJob, yt as AttachmentImages, zt as createObjectScanner } from "../../define-block-COmMkx2x.js";
|
|
6
|
+
import { n as Controller } from "../../controller-CQrkLoRX.js";
|
|
7
7
|
/** A pending write to a record's files, for `useOptimistic`. */
|
|
8
8
|
type AttachmentsOptimisticAction = {
|
|
9
9
|
readonly type: "add";
|