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
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { a as tenantClaimPaths, n as claimAt } from "./claims-CqTr_N1n.js";
|
|
2
|
+
// src/auth/claims-source.ts
|
|
3
|
+
const SESSION_KINDS = /* @__PURE__ */ new Set([
|
|
4
|
+
"user",
|
|
5
|
+
"secret",
|
|
6
|
+
"apiKey",
|
|
7
|
+
"none",
|
|
8
|
+
"invalid"
|
|
9
|
+
]);
|
|
10
|
+
const SNAPSHOT_STATUSES = /* @__PURE__ */ new Set([
|
|
11
|
+
"loading",
|
|
12
|
+
"signed-out",
|
|
13
|
+
"signed-in"
|
|
14
|
+
]);
|
|
15
|
+
function isSessionLike(source) {
|
|
16
|
+
if ("kind" in source && typeof source.kind === "string") return SESSION_KINDS.has(source.kind);
|
|
17
|
+
return "status" in source && typeof source.status === "string" && SNAPSHOT_STATUSES.has(source.status) && "claims" in source;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The claims of a user session or a signed-in snapshot, or `source` itself when
|
|
21
|
+
* it is a claims record. `undefined` for every other caller.
|
|
22
|
+
*/
|
|
23
|
+
function claimsFrom(source) {
|
|
24
|
+
if (!isSessionLike(source)) return source;
|
|
25
|
+
if ("kind" in source) return source.kind === "user" ? source.claims : void 0;
|
|
26
|
+
return source.status === "signed-in" ? source.claims : void 0;
|
|
27
|
+
}
|
|
28
|
+
// src/auth/tenant.ts
|
|
29
|
+
/**
|
|
30
|
+
* The active tenant of a user session: the `claim` claim (`tenant_id` by
|
|
31
|
+
* default, as `config.claims.tenant`) at the top level of the token, then in
|
|
32
|
+
* `app_metadata`. `undefined` for every other session. Takes a server session,
|
|
33
|
+
* the client's `useAuth()` snapshot or verified claims.
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* const organizationId = tenantOf(await bsb.claims());
|
|
37
|
+
* const organizationId = tenantOf(useAuth());
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
function tenantOf(session, claim) {
|
|
41
|
+
const claims = claimsFrom(session);
|
|
42
|
+
if (claims === void 0) return;
|
|
43
|
+
for (const path of tenantClaimPaths(claim)) {
|
|
44
|
+
const value = claimAt(claims, path);
|
|
45
|
+
if (value !== void 0) return value;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export { claimsFrom as n, tenantOf as t };
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { $ as RecordRef, Bt as Executor, Ft as RequestContext, K as Insert, O as AnyFunctions, St as AnyPlugin, ht as Update, it as Row, k as AnyModels, ot as SchemaMeta, ut as TableKey } from "../types-
|
|
3
|
-
import { o as EventHub } from "../events-
|
|
2
|
+
import { $ as RecordRef, $t as Authorizer, Bt as Executor, Ft as RequestContext, Jt as AuthorizationPurpose, K as Insert, O as AnyFunctions, St as AnyPlugin, Xt as AuthorizationResource, Yt as AuthorizationRequest, ht as Update, it as Row, k as AnyModels, ot as SchemaMeta, ut as TableKey, xt as Actor } from "../types-BkYEUWdz.js";
|
|
3
|
+
import { o as EventHub } from "../events-DVt3Z9hw.js";
|
|
4
4
|
import { c as InlineJwks, t as BetterSupabaseEnv } from "../index-8w4OB5En.js";
|
|
5
|
-
import { n as AuthResolver } from "../resolve
|
|
6
|
-
import { a as CredentialSubject, i as CredentialRef, r as CredentialProvider } from "../provider-
|
|
7
|
-
import { n as SqlClient } from "../executor-
|
|
8
|
-
import { a as BlockTransportMiddleware } from "../block-hooks-
|
|
5
|
+
import { n as AuthResolver } from "../resolve--LfVoOMg.js";
|
|
6
|
+
import { a as CredentialSubject, i as CredentialRef, r as CredentialProvider } from "../provider-BI0KC4u5.js";
|
|
7
|
+
import { n as SqlClient } from "../executor-CFmee_nV.js";
|
|
8
|
+
import { a as BlockTransportMiddleware } from "../block-hooks-DrA_d1dJ.js";
|
|
9
9
|
import { a as SessionActor, o as SessionDelegation } from "../actor-DseNR02I.js";
|
|
10
|
-
import { L as QueueProvider } from "../types-
|
|
11
|
-
import { n as Embedder } from "../knowledge-
|
|
12
|
-
import { a as AuthorizationProvider } from "../authorization-
|
|
10
|
+
import { L as QueueProvider } from "../types-Dh2OGEW5.js";
|
|
11
|
+
import { n as Embedder } from "../knowledge-BBC2sfAY.js";
|
|
12
|
+
import { a as AuthorizationProvider } from "../authorization-BlmDNI2b.js";
|
|
13
13
|
import { o as StreamStore } from "../store-c7QxUHX-.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { a as ServerContext, c as ServerOptions } from "../server-types-C3p3jUqr.js";
|
|
14
|
+
import { Qt as CacheAdapter, Y as DbStats, t as BetterSupabase, y as Db } from "../define-ITQA71fw.js";
|
|
15
|
+
import { Q as StoragePath } from "../bucket-DvG66r5G.js";
|
|
16
|
+
import { i as SessionSnapshot } from "../snapshot-BGsJw9xn.js";
|
|
18
17
|
import { n as Impersonator } from "../impersonation-BOCJcsmS.js";
|
|
19
|
-
import { tn as AnyRecordBinding } from "../define-block-
|
|
18
|
+
import { tn as AnyRecordBinding } from "../define-block-COmMkx2x.js";
|
|
20
19
|
import { n as Money } from "../money-BgpAd7d3.js";
|
|
21
|
-
import { i as EventSink, t as CloudEvent } from "../cloud-event-
|
|
22
|
-
import { i as AuthorizationHooks } from "../authorization-hooks-
|
|
23
|
-
import { s as SqlClaims, t as BetterPostgres } from "../pool-
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
20
|
+
import { i as EventSink, t as CloudEvent } from "../cloud-event-DXWmXrus.js";
|
|
21
|
+
import { i as AuthorizationHooks } from "../authorization-hooks-CxwsRnfV.js";
|
|
22
|
+
import { s as SqlClaims, t as BetterPostgres } from "../pool-D-4HyhuW.js";
|
|
23
|
+
import { l as ServerOptions, o as ServerContext } from "../server-types-C2hlvhP4.js";
|
|
24
|
+
import { C as SupportSessionStore } from "../support-DxYI6sDM.js";
|
|
25
|
+
import { r as GuardOptions } from "../respond-BYOV7KZp.js";
|
|
26
|
+
import { l as Transcriber, s as NoteTaker, u as TranscriberInput } from "../recordings-D69Va7gP.js";
|
|
27
|
+
import { n as Controller } from "../controller-DxtxeYdf.js";
|
|
28
|
+
import { c as AiTaskRunner, o as AiTaskRun, r as AiTask } from "../ai-schedules-Drx2KRTn.js";
|
|
29
|
+
import { Qt as GeneratorModel, Vt as Generator, Yt as GeneratorInput, cn as ResolvedConfig } from "../context-D7jICqdN.js";
|
|
30
30
|
import { r as WebhookInput } from "../signatures-jPr9JXyw.js";
|
|
31
31
|
import { n as Payment, o as PaymentProvider } from "../payments-BBGSGRQ7.js";
|
|
32
|
-
import { y as FlagValue } from "../flags-
|
|
32
|
+
import { y as FlagValue } from "../flags-6emyAXly.js";
|
|
33
33
|
import { t as NotificationChannel } from "../channel-B_kufDZy.js";
|
|
34
34
|
import { a as DeliveryTransport } from "../delivery-CWcbh87x.js";
|
|
35
35
|
import { l as TaxProvider, r as TaxAddress } from "../tax-BD9dN1rx.js";
|
|
36
36
|
import { p as ShippingProvider, s as ShipmentAddress } from "../carrier-D2b_028L.js";
|
|
37
|
-
import { L as WorkflowGraph, c as GraphCompiler, i as BuilderStarter, r as BuilderStartCall } from "../types-
|
|
38
|
-
import { O as IncomingDestination, f as WebhookSecretStore, o as WebhookSigner, v as WebhookTransport } from "../signers-
|
|
37
|
+
import { L as WorkflowGraph, c as GraphCompiler, i as BuilderStarter, r as BuilderStartCall } from "../types-d0JBRTAg.js";
|
|
38
|
+
import { O as IncomingDestination, f as WebhookSecretStore, o as WebhookSigner, v as WebhookTransport } from "../signers-6ih6i9aq.js";
|
|
39
39
|
import { t as ApiModel } from "../model-Lxa_mOzB.js";
|
|
40
40
|
import { l as VersionOf, t as AnyDocumentFormat } from "../format-BT0Z3V54.js";
|
|
41
|
-
import { t as EveDocumentBackend } from "../eve-
|
|
41
|
+
import { t as EveDocumentBackend } from "../eve-DIKjuPp5.js";
|
|
42
42
|
import { t as FLAG_OVERRIDES_COOKIE } from "../cookie-DDkqvqe4.js";
|
|
43
43
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
44
44
|
import { Adapter, Message, StateAdapter } from "chat";
|
|
@@ -1056,9 +1056,47 @@ export declare function testBlockTransportMiddleware(middleware: BlockTransportM
|
|
|
1056
1056
|
* scopes with a tenant scope that has an id type, writes templates that are
|
|
1057
1057
|
* safe to inline and use the placeholders they need, lists every function its
|
|
1058
1058
|
* templates call in `requires`, and keeps its token hook, suspension rows, role
|
|
1059
|
-
* sources and deciding columns well formed.
|
|
1059
|
+
* sources and deciding columns well formed. A hook that writes `permissions`
|
|
1060
|
+
* (owned or registered) needs a key marked `sqlComplete`, and one truncated
|
|
1061
|
+
* marker when its budget can cut the claim.
|
|
1060
1062
|
*/
|
|
1061
1063
|
export declare function testAuthorizationProvider(provider: AuthorizationProvider): Promise<ConformanceReport>;
|
|
1064
|
+
type JsonObject = Readonly<Record<string, unknown>>;
|
|
1065
|
+
/** What `authorizationRequest` builds a request from. */
|
|
1066
|
+
interface AuthorizationRequestInput<Ref> {
|
|
1067
|
+
readonly action: Ref;
|
|
1068
|
+
/**
|
|
1069
|
+
* The verified claims. `sub` is the subject id and `role` its Postgres role;
|
|
1070
|
+
* leave both `claims` and `subject` out for an anonymous request.
|
|
1071
|
+
*/
|
|
1072
|
+
readonly claims?: JsonObject;
|
|
1073
|
+
/** The actor, when it isn't the user in `claims.sub`. */
|
|
1074
|
+
readonly subject?: Actor;
|
|
1075
|
+
/** Defaults to `{ type: "test" }`. */
|
|
1076
|
+
readonly resource?: AuthorizationResource;
|
|
1077
|
+
readonly context?: AuthorizationPurpose & {
|
|
1078
|
+
readonly tenant?: string;
|
|
1079
|
+
readonly requestId?: string;
|
|
1080
|
+
readonly approval?: string;
|
|
1081
|
+
};
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* The `AuthorizationRequest` better-supabase sends an authorizer for this
|
|
1085
|
+
* input, built through the same `requestOf` the server and repositories use, so
|
|
1086
|
+
* tests see the subject, claims and context fields an authorizer gets.
|
|
1087
|
+
*/
|
|
1088
|
+
export declare function authorizationRequest<Ref>(input: AuthorizationRequestInput<Ref>): AuthorizationRequest<Ref>;
|
|
1089
|
+
/** What `sessionSnapshot` builds a snapshot from. */
|
|
1090
|
+
interface SessionSnapshotInput {
|
|
1091
|
+
/** The token's claims; `sub` is required. */
|
|
1092
|
+
readonly claims: JsonObject;
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* A `SessionSnapshot` for `claims`, built through the same `snapshotOf` the
|
|
1096
|
+
* server uses. The access token is an unsigned JWT that carries the claims;
|
|
1097
|
+
* nothing verifies it.
|
|
1098
|
+
*/
|
|
1099
|
+
export declare function sessionSnapshot(input: SessionSnapshotInput): SessionSnapshot<JsonObject>;
|
|
1062
1100
|
/**
|
|
1063
1101
|
* Proves `AuthorizationHooks` target API v1 and fail closed for strangers:
|
|
1064
1102
|
* fan-out returns only subscribers it was given, an identity nobody linked and
|
|
@@ -1109,9 +1147,10 @@ interface TestAuthorizerOptions<Ref> {
|
|
|
1109
1147
|
* string each time (and after a JSON round trip, so references are plain JSON),
|
|
1110
1148
|
* answers every request with a known outcome without mutating it, keeps the
|
|
1111
1149
|
* request order in `evaluations`, decides from the subject rather than the
|
|
1112
|
-
* input (forged roles, claims and memberships in the resource properties
|
|
1113
|
-
*
|
|
1114
|
-
*
|
|
1150
|
+
* input (forged roles, claims and memberships in the resource properties, a
|
|
1151
|
+
* `source: "input"` resource, its `change` or the context never turn a denial
|
|
1152
|
+
* into a grant), never grants an unknown permission, and grants
|
|
1153
|
+
* `options.granted` through `checkPermission`.
|
|
1115
1154
|
*/
|
|
1116
1155
|
export declare function testAuthorizer<Ref>(authorizer: Authorizer<Ref>, options: TestAuthorizerOptions<Ref>): Promise<ConformanceReport>;
|
|
1117
1156
|
interface StaticAuthorizerOptions<Ref extends string> {
|
|
@@ -1432,4 +1471,4 @@ interface FlagOverrideCookie {
|
|
|
1432
1471
|
* Playwright or as a request's `cookie` header.
|
|
1433
1472
|
*/
|
|
1434
1473
|
export declare function flagOverrideCookie(values: Readonly<Record<string, FlagValue>>, options?: FlagOverrideCookieOptions): Promise<FlagOverrideCookie>;
|
|
1435
|
-
export type { ActCase, ActCases, AdapterRun, BudgetPage, BudgetRequest, BudgetResponse, ConformanceCheck, ConformanceReport, ControllerBindingHarness, DbBudgetExpectation, ExactSeed, Factory, FactoryInput, FactoryRef, FactoryTarget, FlagOverrideCookie, FlagOverrideCookieOptions, InstantBrowserContext, InstantExpectation, InstantLocator, InstantPage, IsolationTable, IsolationTables, IsolationTenant, LiteStack, LiteStackOptions, LocalStack, MeasuredRender, MountedBinding, ProbeActions, ProbeController, ProbeSnapshot, ReceivedDelivery, ResponseBudgetExpectation, ResponseDbStats, Scope, ScopedRows, ScopedSeed, ScopedSeedOptions, ScopedTenant, Seed, SeedFixtures, SeedTenantOnCreateOptions, SigningJwk, StaticAuthorizerOptions, SupabaseClaimFixture, SupabaseClaimFixtureName, SupabaseInvalidClaimFixture, SupabaseInvalidClaimFixtureName, TenantIsolationOptions, TenantSeed, TenantSeedTarget, TestAdapterOptions, TestAiTaskRunnerOptions, TestAuthResolverOptions, TestAuthorizerOptions, TestBuilderStarterOptions, TestChatAdapterOptions, TestChatStateOptions, TestCredentialProviderOptions, TestDeliveryTransportOptions, TestDocumentFormatOptions, TestEmbedderOptions, TestEveDocumentBackendOptions, TestEventSinkOptions, TestExecutorOptions, TestGeneratorOptions, TestGraphCompilerOptions, TestIncomingDestinationOptions, TestJwtClaims, TestNoteTakerOptions, TestNotificationChannelOptions, TestPaymentProviderOptions, TestPluginOptions, TestQueueProviderOptions, TestRecordBindingOptions, TestShippingProviderOptions, TestSigner, TestStreamStoreOptions, TestSupportSessionStoreOptions, TestTaxProviderOptions, TestTranscriberOptions, TestUser, TestWebhookSecretStoreOptions, TestWebhookSignerOptions, TestWebhookTransportOptions };
|
|
1474
|
+
export type { ActCase, ActCases, AdapterRun, AuthorizationRequestInput, BudgetPage, BudgetRequest, BudgetResponse, ConformanceCheck, ConformanceReport, ControllerBindingHarness, DbBudgetExpectation, ExactSeed, Factory, FactoryInput, FactoryRef, FactoryTarget, FlagOverrideCookie, FlagOverrideCookieOptions, InstantBrowserContext, InstantExpectation, InstantLocator, InstantPage, IsolationTable, IsolationTables, IsolationTenant, LiteStack, LiteStackOptions, LocalStack, MeasuredRender, MountedBinding, ProbeActions, ProbeController, ProbeSnapshot, ReceivedDelivery, ResponseBudgetExpectation, ResponseDbStats, Scope, ScopedRows, ScopedSeed, ScopedSeedOptions, ScopedTenant, Seed, SeedFixtures, SeedTenantOnCreateOptions, SessionSnapshotInput, SigningJwk, StaticAuthorizerOptions, SupabaseClaimFixture, SupabaseClaimFixtureName, SupabaseInvalidClaimFixture, SupabaseInvalidClaimFixtureName, TenantIsolationOptions, TenantSeed, TenantSeedTarget, TestAdapterOptions, TestAiTaskRunnerOptions, TestAuthResolverOptions, TestAuthorizerOptions, TestBuilderStarterOptions, TestChatAdapterOptions, TestChatStateOptions, TestCredentialProviderOptions, TestDeliveryTransportOptions, TestDocumentFormatOptions, TestEmbedderOptions, TestEveDocumentBackendOptions, TestEventSinkOptions, TestExecutorOptions, TestGeneratorOptions, TestGraphCompilerOptions, TestIncomingDestinationOptions, TestJwtClaims, TestNoteTakerOptions, TestNotificationChannelOptions, TestPaymentProviderOptions, TestPluginOptions, TestQueueProviderOptions, TestRecordBindingOptions, TestShippingProviderOptions, TestSigner, TestStreamStoreOptions, TestSupportSessionStoreOptions, TestTaxProviderOptions, TestTranscriberOptions, TestUser, TestWebhookSecretStoreOptions, TestWebhookSignerOptions, TestWebhookTransportOptions };
|
package/dist/testing/index.js
CHANGED
|
@@ -6,7 +6,8 @@ import { t as temporal } from "../temporal-required-w_2u4EDp.js";
|
|
|
6
6
|
import { a as ok } from "../result-8xza7w5W.js";
|
|
7
7
|
import { t as BetterSupabase } from "../define-B6D55cO0.js";
|
|
8
8
|
import { a as toBase64Url, r as fromBase64, t as base64ToText } from "../base64-CVyKHBBw.js";
|
|
9
|
-
import
|
|
9
|
+
import "../claim-names-BKig1LOk.js";
|
|
10
|
+
import { c as resolveConfig } from "../config-Bu6pwqcO.js";
|
|
10
11
|
import { a as isScopeName, c as templateFunctions, l as templatePlaceholders, n as TEMPLATE_PLACEHOLDERS, s as scopeProblems, u as templateProblems } from "../access-sql-Dao1C0fz.js";
|
|
11
12
|
import { r as TRACKING_STATUSES, t as LABEL_FORMATS } from "../statuses-BTrQ5H4S.js";
|
|
12
13
|
import { t as importOptionalPeer } from "../optional-peer-5SOYr3lL.js";
|
|
@@ -17,8 +18,9 @@ import { toCloudEvents } from "../events/index.js";
|
|
|
17
18
|
import { ENV_VARIABLES } from "../env/index.js";
|
|
18
19
|
import { t as defineController } from "../controller-BJmh7gFm.js";
|
|
19
20
|
import { H as rawError } from "../block-helpers-I7UzjNEf.js";
|
|
21
|
+
import { s as snapshotOf } from "../snapshot-CVMSyTHH.js";
|
|
20
22
|
import { t as isPrefetch } from "../refresh-B8t_KE3s.js";
|
|
21
|
-
import {
|
|
23
|
+
import { c as requestOf, i as defineAuthorizer, r as checkPermission } from "../authorizer-BtIPDO-c.js";
|
|
22
24
|
import { a as tenantCredentialRef } from "../provider-B6qpleR9.js";
|
|
23
25
|
import { t as postgresExecutor } from "../executor-Dc4Pl44u.js";
|
|
24
26
|
import { n as parseDbStats } from "../timing-B6yHayKA.js";
|
|
@@ -28,7 +30,7 @@ import { t as mailHeaders } from "../delivery-SmPHu2_H.js";
|
|
|
28
30
|
import { c as isMoney, d as money, l as isRate } from "../money-DH--bbYr.js";
|
|
29
31
|
import { t as SHIPPING_LINE } from "../tax-BwckP5dv.js";
|
|
30
32
|
import { t as trashExtension } from "../extension-WdHd5uqI.js";
|
|
31
|
-
import { t as membershipsExtension } from "../extension-
|
|
33
|
+
import { t as membershipsExtension } from "../extension-Z8Pe7fXA.js";
|
|
32
34
|
import { t as createdByExtension } from "../extension-DQ9-oOVC.js";
|
|
33
35
|
import { t as updatedAtExtension } from "../extension-rdpYvpyN.js";
|
|
34
36
|
import { t as FLAG_OVERRIDES_COOKIE } from "../cookie-DJI6xXJ9.js";
|
|
@@ -2632,7 +2634,9 @@ function expectRow(where, row) {
|
|
|
2632
2634
|
* scopes with a tenant scope that has an id type, writes templates that are
|
|
2633
2635
|
* safe to inline and use the placeholders they need, lists every function its
|
|
2634
2636
|
* templates call in `requires`, and keeps its token hook, suspension rows, role
|
|
2635
|
-
* sources and deciding columns well formed.
|
|
2637
|
+
* sources and deciding columns well formed. A hook that writes `permissions`
|
|
2638
|
+
* (owned or registered) needs a key marked `sqlComplete`, and one truncated
|
|
2639
|
+
* marker when its budget can cut the claim.
|
|
2636
2640
|
*/
|
|
2637
2641
|
function testAuthorizationProvider(provider) {
|
|
2638
2642
|
const scopes = new Set(provider.scopes.map((scope) => scope.name));
|
|
@@ -2731,9 +2735,96 @@ function testAuthorizationProvider(provider) {
|
|
|
2731
2735
|
expect(Number.isInteger(hook.budget.bytes) && hook.budget.bytes > 0, "tokenHook.budget.bytes must be a positive integer");
|
|
2732
2736
|
for (const claim of hook.budget.claims) expect(written.has(claim), `tokenHook.budget counts "${claim}", which neither ownedClaims nor registeredClaims lists`);
|
|
2733
2737
|
}
|
|
2738
|
+
}],
|
|
2739
|
+
provider.tokenHook && ["names one truncated marker, apart from the claims it marks", () => {
|
|
2740
|
+
const hook = provider.tokenHook;
|
|
2741
|
+
const markers = [hook.truncatedClaim, hook.budget?.truncatedClaim].filter((marker) => marker !== void 0);
|
|
2742
|
+
for (const marker of markers) {
|
|
2743
|
+
expect(IDENTIFIER.test(marker), `truncated marker "${marker}" is not a claim name`);
|
|
2744
|
+
expect(marker !== "permissions" && !(hook.budget?.claims ?? []).includes(marker), `truncated marker "${marker}" is also a claim it marks`);
|
|
2745
|
+
}
|
|
2746
|
+
expect(new Set(markers).size <= 1, `tokenHook.truncatedClaim "${hook.truncatedClaim}" and budget.truncatedClaim "${hook.budget?.truncatedClaim}" disagree: readers and doctor would look at different markers`);
|
|
2747
|
+
expect(!((hook.budget?.claims ?? []).includes("permissions") && (hook.ownedClaims.includes("permissions") || (hook.registeredClaims ?? []).some((claim) => claim.name === "permissions"))) || markers.length > 0, `tokenHook.budget can drop "permissions" entries, so it needs truncatedClaim: readers would take a cut claim as complete`);
|
|
2748
|
+
}],
|
|
2749
|
+
provider.tokenHook && [`writes "permissions" only with keys complete in SQL`, () => {
|
|
2750
|
+
const hook = provider.tokenHook;
|
|
2751
|
+
const owned = hook.ownedClaims.includes("permissions");
|
|
2752
|
+
const registered = (hook.registeredClaims ?? []).some((claim) => claim.name === "permissions");
|
|
2753
|
+
if (!owned && !registered) return;
|
|
2754
|
+
expect((provider.permissions ?? []).some((entry) => entry.sqlComplete), `tokenHook writes "permissions", but permissions marks no key sqlComplete: the claim only carries those keys, so it would always be empty`);
|
|
2734
2755
|
}]
|
|
2735
2756
|
]);
|
|
2736
2757
|
}
|
|
2758
|
+
// src/testing/authorization.ts
|
|
2759
|
+
function actorFrom(claims) {
|
|
2760
|
+
const sub = claims?.["sub"];
|
|
2761
|
+
if (typeof sub !== "string" || sub === "") return;
|
|
2762
|
+
const role = claims?.["role"];
|
|
2763
|
+
return {
|
|
2764
|
+
id: sub,
|
|
2765
|
+
kind: "user",
|
|
2766
|
+
role: typeof role === "string" ? role : "authenticated"
|
|
2767
|
+
};
|
|
2768
|
+
}
|
|
2769
|
+
/**
|
|
2770
|
+
* The `AuthorizationRequest` better-supabase sends an authorizer for this
|
|
2771
|
+
* input, built through the same `requestOf` the server and repositories use, so
|
|
2772
|
+
* tests see the subject, claims and context fields an authorizer gets.
|
|
2773
|
+
*/
|
|
2774
|
+
function authorizationRequest(input) {
|
|
2775
|
+
const { intent, operation, tenant, requestId, approval } = input.context ?? {};
|
|
2776
|
+
const actor = input.subject ?? actorFrom(input.claims);
|
|
2777
|
+
const context = {
|
|
2778
|
+
...actor ? { actor } : {},
|
|
2779
|
+
...input.claims ? { claims: input.claims } : {},
|
|
2780
|
+
...tenant === void 0 ? {} : { tenant },
|
|
2781
|
+
...requestId === void 0 ? {} : { requestId },
|
|
2782
|
+
...approval === void 0 ? {} : { approval }
|
|
2783
|
+
};
|
|
2784
|
+
const built = requestOf(context, {
|
|
2785
|
+
...intent === void 0 ? {} : { intent },
|
|
2786
|
+
...operation === void 0 ? {} : { operation }
|
|
2787
|
+
});
|
|
2788
|
+
return {
|
|
2789
|
+
subject: built.subject,
|
|
2790
|
+
action: input.action,
|
|
2791
|
+
resource: input.resource ?? { type: "test" },
|
|
2792
|
+
context: built.context
|
|
2793
|
+
};
|
|
2794
|
+
}
|
|
2795
|
+
/**
|
|
2796
|
+
* A `SessionSnapshot` for `claims`, built through the same `snapshotOf` the
|
|
2797
|
+
* server uses. The access token is an unsigned JWT that carries the claims;
|
|
2798
|
+
* nothing verifies it.
|
|
2799
|
+
*/
|
|
2800
|
+
function sessionSnapshot(input) {
|
|
2801
|
+
const { claims } = input;
|
|
2802
|
+
const sub = claims["sub"];
|
|
2803
|
+
if (typeof sub !== "string" || sub === "") throw new TypeError("sessionSnapshot needs claims.sub");
|
|
2804
|
+
const exp = claims["exp"];
|
|
2805
|
+
const role = claims["role"];
|
|
2806
|
+
const token = [
|
|
2807
|
+
toBase64Url(JSON.stringify({
|
|
2808
|
+
alg: "none",
|
|
2809
|
+
typ: "JWT"
|
|
2810
|
+
})),
|
|
2811
|
+
toBase64Url(JSON.stringify(claims)),
|
|
2812
|
+
""
|
|
2813
|
+
].join(".");
|
|
2814
|
+
const snapshot = snapshotOf({
|
|
2815
|
+
kind: "user",
|
|
2816
|
+
token,
|
|
2817
|
+
claims,
|
|
2818
|
+
user: {
|
|
2819
|
+
id: sub,
|
|
2820
|
+
role: typeof role === "string" ? role : "authenticated"
|
|
2821
|
+
},
|
|
2822
|
+
source: "bearer",
|
|
2823
|
+
expiresAt: typeof exp === "number" ? exp : null
|
|
2824
|
+
});
|
|
2825
|
+
if (!snapshot) throw new TypeError("sessionSnapshot built no snapshot");
|
|
2826
|
+
return snapshot;
|
|
2827
|
+
}
|
|
2737
2828
|
// src/testing/authorization-hooks.ts
|
|
2738
2829
|
/**
|
|
2739
2830
|
* Proves `AuthorizationHooks` target API v1 and fail closed for strangers:
|
|
@@ -2950,21 +3041,44 @@ const FORGED = {
|
|
|
2950
3041
|
* string each time (and after a JSON round trip, so references are plain JSON),
|
|
2951
3042
|
* answers every request with a known outcome without mutating it, keeps the
|
|
2952
3043
|
* request order in `evaluations`, decides from the subject rather than the
|
|
2953
|
-
* input (forged roles, claims and memberships in the resource properties
|
|
2954
|
-
*
|
|
2955
|
-
*
|
|
3044
|
+
* input (forged roles, claims and memberships in the resource properties, a
|
|
3045
|
+
* `source: "input"` resource, its `change` or the context never turn a denial
|
|
3046
|
+
* into a grant), never grants an unknown permission, and grants
|
|
3047
|
+
* `options.granted` through `checkPermission`.
|
|
2956
3048
|
*/
|
|
2957
3049
|
function testAuthorizer(authorizer, options) {
|
|
2958
|
-
const
|
|
2959
|
-
const requestFor = (action, id, properties) => ({
|
|
2960
|
-
subject,
|
|
3050
|
+
const requestFor = (action, id, properties) => authorizationRequest({
|
|
2961
3051
|
action,
|
|
2962
3052
|
resource: {
|
|
2963
3053
|
type: "conformance",
|
|
2964
3054
|
id,
|
|
3055
|
+
source: "loaded",
|
|
2965
3056
|
...properties ? { properties } : {}
|
|
2966
3057
|
},
|
|
2967
|
-
context
|
|
3058
|
+
context: {
|
|
3059
|
+
intent: "read",
|
|
3060
|
+
operation: "get",
|
|
3061
|
+
requestId: "conformance"
|
|
3062
|
+
}
|
|
3063
|
+
});
|
|
3064
|
+
const writeFor = (action) => authorizationRequest({
|
|
3065
|
+
action,
|
|
3066
|
+
resource: {
|
|
3067
|
+
type: "conformance",
|
|
3068
|
+
id: "a",
|
|
3069
|
+
source: "input",
|
|
3070
|
+
properties: FORGED,
|
|
3071
|
+
change: {
|
|
3072
|
+
current: { id: "a" },
|
|
3073
|
+
next: FORGED
|
|
3074
|
+
}
|
|
3075
|
+
},
|
|
3076
|
+
context: {
|
|
3077
|
+
intent: "write",
|
|
3078
|
+
operation: "update",
|
|
3079
|
+
requestId: "conformance",
|
|
3080
|
+
approval: "conformance"
|
|
3081
|
+
}
|
|
2968
3082
|
});
|
|
2969
3083
|
const requests = options.permissions.flatMap((permission) => [
|
|
2970
3084
|
"a",
|
|
@@ -2988,7 +3102,7 @@ function testAuthorizer(authorizer, options) {
|
|
|
2988
3102
|
}
|
|
2989
3103
|
}],
|
|
2990
3104
|
["answers every request with a known outcome, without mutating it", async () => {
|
|
2991
|
-
for (const request of requests) {
|
|
3105
|
+
for (const request of [...requests, ...options.permissions.map(writeFor)]) {
|
|
2992
3106
|
const outcome = await authorizer.evaluate(frozenCopy(request));
|
|
2993
3107
|
expect(isOutcome(outcome), `evaluate() gave no known outcome for ${authorizer.key(request.action)}`);
|
|
2994
3108
|
}
|
|
@@ -3006,14 +3120,20 @@ function testAuthorizer(authorizer, options) {
|
|
|
3006
3120
|
for (const permission of options.permissions) {
|
|
3007
3121
|
const plain = await authorizer.evaluate(requestFor(permission, "a"));
|
|
3008
3122
|
const forgedResource = await authorizer.evaluate(requestFor(permission, "a", FORGED));
|
|
3123
|
+
const plainRequest = requestFor(permission, "a");
|
|
3009
3124
|
const forgedContext = await authorizer.evaluate({
|
|
3010
|
-
...
|
|
3125
|
+
...plainRequest,
|
|
3011
3126
|
context: {
|
|
3012
|
-
...context,
|
|
3127
|
+
...plainRequest.context,
|
|
3013
3128
|
...FORGED
|
|
3014
3129
|
}
|
|
3015
3130
|
});
|
|
3016
|
-
|
|
3131
|
+
const forgedInput = await authorizer.evaluate(writeFor(permission));
|
|
3132
|
+
for (const forged of [
|
|
3133
|
+
forgedResource,
|
|
3134
|
+
forgedContext,
|
|
3135
|
+
forgedInput
|
|
3136
|
+
]) expect(forged.outcome !== "granted" || plain.outcome === "granted", `input claiming a service caller was granted ${authorizer.key(permission)}`);
|
|
3017
3137
|
}
|
|
3018
3138
|
}],
|
|
3019
3139
|
options.unknown !== void 0 && ["never grants an unknown permission", async () => {
|
|
@@ -4564,4 +4684,4 @@ async function flagOverrideCookie(values, options = {}) {
|
|
|
4564
4684
|
header: `${FLAG_OVERRIDES_COOKIE}=${value}`
|
|
4565
4685
|
};
|
|
4566
4686
|
}
|
|
4567
|
-
export { ConformanceError, LOCAL_JWT_SECRET, PROBE_INITIAL, actCases, asUser, createTestSigner, defineFactory, defineSeed, defineTenantSeed, expectDbBudget, expectInstant, expectTenantIsolation, factoryPath, factoryTime, flagOverrideCookie, isSeed, isTenantSeed, liteStack, localAuth, localSigningKey, scopedSeed, seedTenantOnCreate, signLocalJwt, signTestJwt, signTestJwtWithKey, staticAuthorizer, supabaseClaimFixtures, supabaseInvalidClaimFixtures, testAdapter, testAiTaskRunner, testAuthResolver, testAuthorizationHooks, testAuthorizationProvider, testAuthorizer, testBlockTransportMiddleware, testBuilderStarter, testCacheAdapter, testChatAdapter, testChatState, testControllerBinding, testCredentialProvider, testDeliveryTransport, testDocumentFormat, testEmbedder, testEveDocumentBackend, testEventSink, testExecutor, testGenerator, testGraphCompiler, testIncomingDestination, testNoteTaker, testNotificationChannel, testPaymentProvider, testPlugin, testQueueProvider, testRecordBinding, testShippingProvider, testStreamStore, testSupportSessionStore, testTaxProvider, testTranscriber, testWebhookSecretStore, testWebhookSigner, testWebhookTransport, withClaims, withRollback };
|
|
4687
|
+
export { ConformanceError, LOCAL_JWT_SECRET, PROBE_INITIAL, actCases, asUser, authorizationRequest, createTestSigner, defineFactory, defineSeed, defineTenantSeed, expectDbBudget, expectInstant, expectTenantIsolation, factoryPath, factoryTime, flagOverrideCookie, isSeed, isTenantSeed, liteStack, localAuth, localSigningKey, scopedSeed, seedTenantOnCreate, sessionSnapshot, signLocalJwt, signTestJwt, signTestJwtWithKey, staticAuthorizer, supabaseClaimFixtures, supabaseInvalidClaimFixtures, testAdapter, testAiTaskRunner, testAuthResolver, testAuthorizationHooks, testAuthorizationProvider, testAuthorizer, testBlockTransportMiddleware, testBuilderStarter, testCacheAdapter, testChatAdapter, testChatState, testControllerBinding, testCredentialProvider, testDeliveryTransport, testDocumentFormat, testEmbedder, testEveDocumentBackend, testEventSink, testExecutor, testGenerator, testGraphCompiler, testIncomingDestination, testNoteTaker, testNotificationChannel, testPaymentProvider, testPlugin, testQueueProvider, testRecordBinding, testShippingProvider, testStreamStore, testSupportSessionStore, testTaxProvider, testTranscriber, testWebhookSecretStore, testWebhookSigner, testWebhookTransport, withClaims, withRollback };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { D as ValidationIssue, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
2
|
-
import { $ as RecordRef } from "./types-
|
|
3
|
-
import { o as FilterField } from "./filter-query-
|
|
4
|
-
import { cn as RecordBindingResult, hn as TimelineItem, in as RecordBindingData } from "./define-block-
|
|
5
|
-
import { A as BindingBlocks, F as LoadBindingsOptions, M as BindingName, N as BindingOf, P as BindingSource, V as PermissionSet, _ as RecordTypeBlocks, g as RecordType, h as RecordCan } from "./index-
|
|
6
|
-
import { c as ListParseOptions, m as ListSearchParams } from "./list-query-
|
|
2
|
+
import { $ as RecordRef } from "./types-BkYEUWdz.js";
|
|
3
|
+
import { o as FilterField } from "./filter-query-DV-x8fio.js";
|
|
4
|
+
import { cn as RecordBindingResult, hn as TimelineItem, in as RecordBindingData } from "./define-block-COmMkx2x.js";
|
|
5
|
+
import { A as BindingBlocks, F as LoadBindingsOptions, M as BindingName, N as BindingOf, P as BindingSource, V as PermissionSet, _ as RecordTypeBlocks, g as RecordType, h as RecordCan } from "./index-BIAtapnD.js";
|
|
6
|
+
import { c as ListParseOptions, m as ListSearchParams } from "./list-query-C7V8kUaD.js";
|
|
7
7
|
/**
|
|
8
8
|
* How a binding fills a list column: `count` is how many rows it has (the
|
|
9
9
|
* binding's `count`, one query for the page), `data` its rows (its `column`, or
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { D as ValidationIssue, b as DbError, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
2
|
-
import { D as AccessTopicPolicy, O as AnyFunctions, it as Row, k as AnyModels, ut as TableKey } from "./types-
|
|
3
|
-
import { t as AuthorizationFunctions } from "./authorization-
|
|
4
|
-
import { t as BetterSupabase } from "./define-
|
|
5
|
-
import { et as TemplateParams, tt as TemplateValues } from "./bucket-
|
|
6
|
-
import { g as SubscriberPolicy, h as SubscriberEvent, i as AuthorizationHooks, m as Subscriber } from "./authorization-hooks-
|
|
2
|
+
import { D as AccessTopicPolicy, O as AnyFunctions, it as Row, k as AnyModels, ut as TableKey } from "./types-BkYEUWdz.js";
|
|
3
|
+
import { t as AuthorizationFunctions } from "./authorization-BlmDNI2b.js";
|
|
4
|
+
import { t as BetterSupabase } from "./define-ITQA71fw.js";
|
|
5
|
+
import { et as TemplateParams, tt as TemplateValues } from "./bucket-DvG66r5G.js";
|
|
6
|
+
import { g as SubscriberPolicy, h as SubscriberEvent, i as AuthorizationHooks, m as Subscriber } from "./authorization-hooks-CxwsRnfV.js";
|
|
7
7
|
import { t as RealtimeStatus } from "./realtime-status-D3oUx3o4.js";
|
|
8
8
|
import { RealtimeChannel, SupabaseClient } from "@supabase/supabase-js";
|
|
9
9
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as dbError } from "./errors-B7tCfCvX.js";
|
|
2
2
|
import { a as ok, r as err, t as AsyncResult } from "./result-8xza7w5W.js";
|
|
3
3
|
import { t as toApp } from "./casing-DQzG9ANZ.js";
|
|
4
|
-
import { a as tenantClaimPaths } from "./claims-
|
|
4
|
+
import { a as tenantClaimPaths } from "./claims-CqTr_N1n.js";
|
|
5
5
|
import { a as sqlString, i as sqlIdent, n as parseTemplate, r as slug, t as claimSql } from "./template-CNq9xcfx.js";
|
|
6
6
|
import { a as isScopeName, i as fillTemplate, o as resolveProviderSql, r as accessCheck } from "./access-sql-Dao1C0fz.js";
|
|
7
7
|
import { t as topicStatus } from "./realtime-status-CocmAOPv.js";
|
|
@@ -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 { i as CredentialRef, r as CredentialProvider } from "./provider-
|
|
5
|
-
import { i as CursorPageOptions, r as BlockTemporalOptions } from "./block-helpers-
|
|
6
|
-
import { t as BlockTransport } from "./block-transport-
|
|
7
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
4
|
+
import { i as CredentialRef, r as CredentialProvider } from "./provider-BI0KC4u5.js";
|
|
5
|
+
import { i as CursorPageOptions, r as BlockTemporalOptions } from "./block-helpers-disoUWCp.js";
|
|
6
|
+
import { t as BlockTransport } from "./block-transport-BEtC_Kis.js";
|
|
7
|
+
import { n as BlockHooks } from "./block-hooks-DrA_d1dJ.js";
|
|
8
8
|
/**
|
|
9
9
|
* A tenant's own key for a provider. The key itself stays in the credential
|
|
10
10
|
* provider.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _r as AppColumnFormat, br as AppOnDeleteAction, hr as AppColumnAccess, kr as AppTableVersions, vr as AppColumnType, xi as Preset } from "./context-
|
|
2
|
-
import { k as DesignErrorCode } from "./index-
|
|
1
|
+
import { _r as AppColumnFormat, br as AppOnDeleteAction, hr as AppColumnAccess, kr as AppTableVersions, vr as AppColumnType, xi as Preset } from "./context-D7jICqdN.js";
|
|
2
|
+
import { k as DesignErrorCode } from "./index-BvcMQYL-.js";
|
|
3
3
|
/** Where in the project pipeline an issue came from. */
|
|
4
4
|
type IssueSource = "design" | "rules" | "sql" | "verifier" | "plan";
|
|
5
5
|
type IssueSeverity = "error" | "warning" | "info";
|