better-supabase 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agents-CMIB3802.d.ts → agents-CM_cCtcr.d.ts} +4 -4
- package/dist/{ai-cache-2LGgaT7F.d.ts → ai-cache-BTGqckta.d.ts} +4 -4
- package/dist/{ai-chat-BCaKsvLW.d.ts → ai-chat-B7_vQvxU.d.ts} +4 -4
- package/dist/{ai-schedules-yGZH-vQb.d.ts → ai-schedules-CZEfo-_M.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 +1 -1
- 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-B1OkIWdx.d.ts → api-59rv5hL6.d.ts} +5 -5
- package/dist/{api-keys-ClhKBDcc.d.ts → api-keys-JE-aykZE.d.ts} +4 -4
- package/dist/{app-tables-62GqZIhd.d.ts → app-tables-DekyKNQ8.d.ts} +1 -1
- package/dist/{approvals-C5fmPLsH.d.ts → approvals-BfEafAzt.d.ts} +5 -5
- package/dist/{assistant-ndGdOBax.d.ts → assistant-B49qATbj.d.ts} +2 -2
- package/dist/astro/index.d.ts +7 -7
- package/dist/{authorization-BCG1v0iC.d.ts → authorization-C7nuWMuB.d.ts} +3 -3
- package/dist/{authorization-hooks-DtzreCAq.d.ts → authorization-hooks-BWhkMZfH.d.ts} +2 -2
- package/dist/better-result/index.d.ts +3 -3
- package/dist/{bind-C54jD0r3.d.ts → bind-DmUGUsBd.d.ts} +7 -7
- package/dist/{block-env-CM-LFfj4.d.ts → block-env-DWtZsqhH.d.ts} +4 -4
- package/dist/{block-helpers-CRpAHrp_.d.ts → block-helpers-D5emQ2O6.d.ts} +1 -1
- package/dist/{block-hooks-DZN2w69m.d.ts → block-hooks-B8itxzEE.d.ts} +2 -2
- package/dist/{block-subjects-CphkQPxp.d.ts → block-subjects-C1_9DkSA.d.ts} +1 -1
- package/dist/{block-transport-DWZSJrwN.d.ts → block-transport-9EUA3q_I.d.ts} +2 -2
- package/dist/blocks/access-requests/index.d.ts +5 -5
- package/dist/blocks/activities/index.d.ts +10 -10
- package/dist/blocks/activities/index.js +1 -1
- 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 +7 -7
- 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 +6 -6
- 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 +12 -12
- package/dist/blocks/collections/index.js +1 -1
- 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 +7 -7
- package/dist/blocks/contacts/index.js +1 -1
- 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 +7 -7
- 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/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/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 +7 -7
- 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 +7 -7
- 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/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 +12 -12
- package/dist/blocks/notifications/index.js +1 -1
- package/dist/blocks/numbering/index.d.ts +4 -4
- package/dist/blocks/oauth-server/index.d.ts +5 -5
- package/dist/blocks/onboarding/index.d.ts +5 -5
- package/dist/blocks/orders/index.d.ts +7 -7
- package/dist/blocks/organizations/index.d.ts +8 -8
- package/dist/blocks/outbox/index.d.ts +4 -4
- package/dist/blocks/passes/index.d.ts +8 -8
- package/dist/blocks/permissions/index.d.ts +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 +6 -6
- package/dist/blocks/queue/index.d.ts +6 -6
- package/dist/blocks/quotes/index.d.ts +8 -8
- package/dist/blocks/rank/index.d.ts +5 -5
- 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/reminders/index.js +1 -1
- 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 +8 -8
- package/dist/blocks/security-events/index.d.ts +7 -7
- package/dist/blocks/segments/index.d.ts +8 -8
- 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 +14 -14
- package/dist/blocks/webhooks/index.js +1 -1
- package/dist/blocks/workflow-editor/index.d.ts +9 -9
- package/dist/blocks/workflows/index.d.ts +7 -7
- package/dist/{bookings-CVw5-Q0Z.d.ts → bookings-xsmM2TA_.d.ts} +3 -3
- package/dist/{bucket-vc-QRrva.d.ts → bucket-SvRQwYS4.d.ts} +1 -1
- package/dist/chat-sdk/index.d.ts +6 -6
- package/dist/cli/{add-BKcE_g9D.js → add-BKkV99g9.js} +2 -2
- package/dist/cli/{add-DUyg9qna.js → add-CrQ3jS7t.js} +27 -85
- package/dist/cli/add-CwhrRJz5.js +1 -0
- package/dist/cli/{migrate-sVs1QYTM.js → app-table-files-PnPOpuB4.js} +90 -50
- package/dist/cli/{backfill-r9RELEEh.js → backfill-DDDLhinm.js} +4 -4
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-DTOFdrxL.js → blocks-BCVcjvbm.js} +1 -1
- package/dist/cli/{blocks-k1OG8XDs.js → blocks-tRfYx_mh.js} +2 -2
- package/dist/cli/{cache-Czfw7Iow.js → cache-DQZ09YOg.js} +1 -1
- package/dist/cli/{codemod-ClmbiLuL.js → codemod-HKuwQmi_.js} +5 -5
- package/dist/cli/{command-CVzTJSLp.js → command-DIPmo0wh.js} +6 -1
- package/dist/cli/{completion-DxEXxFpz.js → completion-DxPxMtyP.js} +2 -2
- package/dist/cli/{completion-CNCqE-Gb.js → completion-DyLMSjOD.js} +1 -1
- package/dist/cli/{completion-Dpk6vh0p.js → completion-FUgqm2-N.js} +2 -2
- package/dist/cli/{config-EjNj3HfT.js → config-BfapErxs.js} +1 -1
- package/dist/cli/{config-KvV-sLZL.js → config-Cskysxp-.js} +38 -7
- package/dist/cli/{config-D2YUlzrl.js → config-Df5cXWNN.js} +1 -1
- package/dist/cli/{config-group-C8tjut39.js → config-group-CP-B9uRt.js} +2 -3
- package/dist/cli/{content-mapper-ez_mT0d4.js → content-mapper-B0ehR7K-.js} +2 -2
- package/dist/cli/{db-uYN6O5Eg.js → db-CWvH1_46.js} +3 -3
- package/dist/cli/{doctor-BD9oo4MG.js → doctor-CXJOhwLB.js} +22 -22
- package/dist/cli/{env-DEAtgGoj.js → env-BM242BCV.js} +1 -1
- package/dist/cli/env-uqfUbUzk.js +1 -0
- package/dist/cli/{gen-8Ya8n2sA.js → gen-B7rw4j19.js} +16 -16
- package/dist/cli/index.d.ts +9 -2
- package/dist/cli/index.js +8 -8
- package/dist/cli/{init-DgL3sDfQ.js → init-C1bXXB_P.js} +22 -10
- package/dist/cli/{keys-CsanNk-2.js → keys-V-HcO-21.js} +1 -1
- package/dist/cli/{live-CMMEct_F.js → live-PpAh9pAc.js} +2 -2
- package/dist/cli/{mcp-DEHtzAkq.js → mcp-BRNAchdH.js} +6 -14
- package/dist/cli/{metadata-BZh-cOzC.js → metadata-dAAKb_kR.js} +3 -3
- package/dist/cli/migrate-BWYXFnaW.js +46 -0
- package/dist/cli/{migration-safety-ClnYNMdq.js → migration-safety-DGQswWZy.js} +2 -2
- package/dist/cli/{migrations-DWh38tO9.js → migrations-Cqk-lJwu.js} +2 -2
- package/dist/cli/{module-migration-CXfRJIV4.js → module-migration-8-hMiZtW.js} +2 -2
- package/dist/cli/{moved-Cnb4fp49.js → moved-DNOtp9LA.js} +1 -1
- package/dist/cli/{parse-BWM6IGhF.js → parse-BPf3kGnc.js} +1 -1
- package/dist/cli/{powersync-Dnyr-Wy5.js → powersync-BWQ-8T3G.js} +4 -4
- package/dist/cli/powersync-CbYxLsjv.js +1 -0
- package/dist/cli/{print-DJrSr56b.js → print-DSTnq5xz.js} +2 -2
- package/dist/cli/{providers-CpaISitn.js → providers-Cjf5iOp5.js} +1 -1
- package/dist/cli/{remove-ChaieK3t.js → remove-CwG8cPv1.js} +7 -7
- package/dist/cli/{render-DUNJ4Pss.js → render-B18iAdsT.js} +5 -5
- package/dist/cli/{run-ChCQPYOh.js → run-C2Yg5MWt.js} +41 -41
- package/dist/cli/{run-CxFDjL1Q.js → run-CvPl8iQd.js} +2 -2
- package/dist/cli/{run-Cl9COGuy.js → run-Wx_2Acgv.js} +9 -9
- package/dist/cli/seed-BOun22-k.js +1 -0
- package/dist/cli/{seed-BzVLTdRl.js → seed-CDnL4Tnc.js} +3 -3
- package/dist/cli/{shared-5uqc1GBj.js → shared-BHbtUOvh.js} +1 -1
- package/dist/cli/{skills-0gz_qjVb.js → skills-DM3oeIxY.js} +1 -1
- package/dist/cli/{snapshot-DdAP7LWO.js → snapshot-CXgsUPGj.js} +3 -3
- package/dist/cli/{source-2irbWSck.js → source-B6aMAoEK.js} +1 -1
- package/dist/cli/{source-args-DAcQt-Mh.js → source-args-v8ljFDfc.js} +1 -1
- package/dist/cli/{spec-B7n4Rthp.js → spec-BcYic005.js} +3 -3
- package/dist/cli/{spec-_MS0ym5r.js → spec-EO0TP84d.js} +1 -1
- package/dist/cli/{sql-layout-DYKkQw1k.js → sql-layout-CkxDNVEH.js} +2 -2
- package/dist/cli/{stack-CteM33gC.js → stack-ClESAZYf.js} +1 -1
- package/dist/cli/{sync-DnSOrQuA.js → sync-pq6gmlhG.js} +4 -4
- package/dist/cli/{table-DeH8X0qz.js → table-dyKddjwo.js} +1 -1
- package/dist/cli/{upgrade-cMy5fKkg.js → upgrade-BoHb4h9P.js} +3 -3
- package/dist/cli/{upgrade-CWdrC-K3.js → upgrade-Dp9p7A69.js} +5 -5
- package/dist/cli/{version-C5RAWmrD.js → version-CQHFm-ak.js} +1 -1
- package/dist/client/index.d.ts +6 -6
- package/dist/client/native/index.d.ts +5 -5
- package/dist/{cloud-event-DcJwder2.d.ts → cloud-event-0pQ9vFNS.d.ts} +1 -1
- package/dist/{compiler-D3UmE7ao.d.ts → compiler-BEeVWXPS.d.ts} +2 -2
- package/dist/{composite-CWJvZgni.d.ts → composite-BJ9s-IJJ.d.ts} +7 -7
- package/dist/config/index.d.ts +4 -4
- package/dist/config/index.js +3 -3
- package/dist/{config-CvJHIy5q.js → config-bqKaPjst.js} +6 -27
- package/dist/{config-CTeR7XHK.js → config-r7njjNgh.js} +1 -1
- package/dist/{connectors-CHGiffYH.d.ts → connectors-uC5baoFV.d.ts} +4 -4
- package/dist/{context-BFEX0b7H.d.ts → context-B4TsE2gY.d.ts} +34 -51
- package/dist/{controller-Cl6HmMBk.d.ts → controller-CtwAsnVV.d.ts} +1 -1
- package/dist/{conversion-DlfStnln.d.ts → conversion-g8HzH9My.d.ts} +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +2 -2
- 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-BWoz9lED.d.ts → data-engine-rvbR2C4F.d.ts} +1 -1
- package/dist/{define-BLP6XtoL.d.ts → define-D8_9X5fZ.d.ts} +5 -5
- package/dist/{define-block-DibVN37N.d.ts → define-block-DWVZSZv1.d.ts} +12 -12
- package/dist/{documents-Cup1rpjF.d.ts → documents-BbwYyynk.d.ts} +3 -3
- package/dist/edge/index.d.ts +9 -9
- package/dist/elysia/index.d.ts +1 -1
- package/dist/{embeddings-D_RsS6ow.d.ts → embeddings-I3s5sTDt.d.ts} +1 -1
- package/dist/{ended-B8RyuUXF.d.ts → ended-EZzN9QTM.d.ts} +2 -2
- package/dist/{entitlements-Y-n4RGAd.d.ts → entitlements-Bw3eYGKJ.d.ts} +2 -2
- package/dist/eve/index.d.ts +5 -5
- package/dist/{eve-B7jxYPCw.d.ts → eve-BfhVFV33.d.ts} +2 -2
- package/dist/events/index.d.ts +3 -3
- package/dist/{events-Cc9DDQWH.d.ts → events-B2qbZps6.d.ts} +1 -1
- package/dist/{executor-DNPm13a9.d.ts → executor-BfirBzOr.d.ts} +4 -4
- package/dist/{executor-C-Ox9eKq.d.ts → executor-BlS0kCrN.d.ts} +1 -1
- package/dist/{executor-hGjrop3A.d.ts → executor-DXQIx4sW.d.ts} +1 -1
- package/dist/expo/index.d.ts +4 -4
- package/dist/{field-errors-Btn3czyz.d.ts → field-errors-DkzFduux.d.ts} +10 -10
- package/dist/{fields-C3q2ypnO.d.ts → fields-snbaZ14h.d.ts} +1 -1
- package/dist/{filter-evaluate-CPxeae5X.d.ts → filter-evaluate-BRpNiNPG.d.ts} +1 -1
- package/dist/{filter-query-BXLs72G9.d.ts → filter-query-DBt7OKuH.d.ts} +1 -1
- package/dist/{flags-C01PLMJ-.d.ts → flags-DDKTThrO.d.ts} +2 -2
- package/dist/flags-sdk/index.d.ts +1 -1
- package/dist/{framework-GlxXiotm.d.ts → framework-DVYTtQXA.d.ts} +7 -7
- package/dist/{gateway-DzI687yd.d.ts → gateway-Ve7cByEr.d.ts} +3 -3
- package/dist/h3/index.d.ts +1 -1
- package/dist/h3/v1/index.d.ts +1 -1
- package/dist/hono/index.d.ts +9 -9
- package/dist/{inbox-NDKwSk_H.d.ts → inbox-c8B86Trp.d.ts} +5 -5
- package/dist/{index-C_qlBJ3k.d.ts → index-B4wttiLh.d.ts} +4 -4
- package/dist/{index-BfYDY6eh.d.ts → index-BM6NmKSc.d.ts} +5 -5
- package/dist/{index-CAY7rIQs.d.ts → index-BNgpz_BV.d.ts} +5 -5
- package/dist/{index-k-SyCzcQ.d.ts → index-BxckmAFc.d.ts} +4 -4
- package/dist/{index-8wOL81rB.d.ts → index-CB66nl14.d.ts} +4 -3
- package/dist/{index-DPMVWm_Z.d.ts → index-CBQT_nXf.d.ts} +5 -5
- package/dist/{index-C0_cweyT.d.ts → index-Cw5gGSP8.d.ts} +14 -14
- package/dist/{index-CQhPHHDF.d.ts → index-Cxsnd-OL.d.ts} +1 -1
- package/dist/{index-D1ckLbUM.d.ts → index-pZn6S_iq.d.ts} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/{kit-Dxx3MT8m.d.ts → kit-B8yWCRN7.d.ts} +3 -3
- package/dist/{knowledge-F1IhRI4Q.d.ts → knowledge-CsLPACGJ.d.ts} +5 -5
- package/dist/lint/index.d.ts +1 -1
- package/dist/list/index.d.ts +3 -3
- package/dist/{list-query-XHoYDlRN.d.ts → list-query-BcU8NnNL.d.ts} +3 -3
- package/dist/mapper/bin.js +6 -6
- package/dist/mcp/index.d.ts +6 -6
- package/dist/mcp/sdk/index.d.ts +6 -6
- package/dist/{messaging-C_Pr9tGx.d.ts → messaging-DQP09JsY.d.ts} +4 -4
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/next/client/index.d.ts +1 -1
- package/dist/next/index.d.ts +22 -22
- package/dist/node/index.d.ts +2 -2
- package/dist/{operations-DE7SOBw-.d.ts → operations-CqmQrTKw.d.ts} +1 -1
- package/dist/orpc/index.d.ts +8 -8
- package/dist/otel/index.d.ts +2 -2
- package/dist/otel/index.js +4 -4
- package/dist/{outbox-DxZgoKwp.d.ts → outbox-BZ712Z3X.d.ts} +4 -4
- package/dist/{pool-wjbAMqc1.d.ts → pool-DDR1ndk7.d.ts} +3 -3
- package/dist/{ports-DP0bthUk.d.ts → ports-6LBgr1Aa.d.ts} +1 -1
- package/dist/postgres/index.d.ts +4 -4
- package/dist/{postgrest-z-T0l23T.d.ts → postgrest-AJc8hnJU.d.ts} +1 -1
- package/dist/powersync/index.d.ts +6 -6
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +2 -2
- package/dist/{preset-DwuWNBip.js → preset-DCdEnJj9.js} +8 -13
- package/dist/{project-Bo1vZqVs.js → project-C4NA_van.js} +4 -4
- package/dist/{provider-ClrIplXa.d.ts → provider-CWjzAIX9.d.ts} +1 -1
- package/dist/{push-token-v3xCcVU7.d.ts → push-token-BXsrJ7W9.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/react/index.d.ts +8 -8
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +8 -8
- package/dist/react/session.d.ts +2 -2
- package/dist/react-router/index.d.ts +6 -6
- package/dist/realtime/index.d.ts +6 -6
- package/dist/realtime/index.js +1 -1
- package/dist/{record-form-D2-F4IwS.d.ts → record-form-CubgBrtI.d.ts} +1 -1
- package/dist/{recordings-BBSJt_YV.d.ts → recordings-DeZYx-Kv.d.ts} +1 -1
- package/dist/records/index.d.ts +9 -9
- package/dist/{refresh-CCKB1Wa6.d.ts → refresh-D02Pbf5B.d.ts} +1 -1
- package/dist/{refusal-D_tklIEb.d.ts → refusal-B0VmlAxF.d.ts} +2 -2
- package/dist/{resolve-Bj1qD7Dy.d.ts → resolve-CtX6T0c0.d.ts} +1 -1
- package/dist/{resource-D8pzB5Qf.d.ts → resource-WxN0IsvB.d.ts} +1 -1
- package/dist/{resource-execute-BSTIfp1D.d.ts → resource-execute-BzqR8DdD.d.ts} +2 -2
- package/dist/{resource-types-D5WEvYtV.d.ts → resource-types-BVbHgTPg.d.ts} +4 -4
- package/dist/{resources-CsZ7RhZC.d.ts → resources-BSbRa0Ab.d.ts} +2 -2
- package/dist/{respond-BzRG-0qc.d.ts → respond-Dzu_-EPH.d.ts} +1 -1
- package/dist/{sales-lines-KxxStRzU.d.ts → sales-lines-BsmrNHe9.d.ts} +1 -1
- package/dist/{scores-B2BiNuVJ.d.ts → scores-Y8TvyJi1.d.ts} +5 -5
- package/dist/server/index.d.ts +24 -24
- package/dist/server/index.js +1 -1
- package/dist/{server-types-BlDiY-ya.d.ts → server-types-BkTIxW_H.d.ts} +11 -11
- package/dist/{session-BGP98Rgj.d.ts → session-BOzx2qHC.d.ts} +6 -6
- package/dist/{session-status-C4t7kbSn.d.ts → session-status-BP8eYVnA.d.ts} +2 -2
- package/dist/{sign-in-CAadgm33.d.ts → sign-in-CfwJAJJL.d.ts} +2 -2
- package/dist/{signers-BKgmVh6A.d.ts → signers-ZmxO1I05.d.ts} +4 -4
- package/dist/{signing-keys-BNDUxpQL.d.ts → signing-keys-udgP7Aod.d.ts} +2 -2
- package/dist/solid/index.d.ts +10 -10
- package/dist/solid-start/index.d.ts +6 -6
- package/dist/spec/index.d.ts +2 -2
- package/dist/sql/index.d.ts +4 -4
- package/dist/sql/index.js +1 -1
- package/dist/{sql-B7vBP9g0.js → sql-CoBySj2F.js} +42 -41
- package/dist/sqlite/index.d.ts +3 -3
- package/dist/{sso-B0Txid2-.d.ts → sso-CkU_4mtK.d.ts} +3 -3
- package/dist/ssr/index.d.ts +5 -5
- package/dist/storage/index.d.ts +3 -3
- package/dist/streams/index.d.ts +1 -1
- package/dist/{subject-readers-DJbzlm8a.d.ts → subject-readers-CB5Te02u.d.ts} +5 -5
- package/dist/{subject-readers-CeeJJOQ4.js → subject-readers-VHcrWhmq.js} +2 -2
- package/dist/{subjects-BpIEN1MS.d.ts → subjects-CiBNKy2y.d.ts} +4 -4
- package/dist/{support-D7CMbhRT.d.ts → support-BxyPOFk4.d.ts} +4 -4
- package/dist/{support-view-CIDXF3_H.d.ts → support-view-nqUWKHEs.d.ts} +1 -1
- package/dist/svelte/index.d.ts +9 -9
- package/dist/sveltekit/index.d.ts +7 -7
- package/dist/{tags-Dg4Ywmqp.d.ts → tags-Cm48BsOa.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +3 -3
- package/dist/tanstack-start/index.d.ts +6 -6
- package/dist/{tenant-CyLEXgot.d.ts → tenant-Ded341Qz.d.ts} +2 -2
- package/dist/testing/index.d.ts +25 -25
- package/dist/testing/index.js +1 -1
- package/dist/{timeline-Cjl-1hiA.d.ts → timeline-DvXtXq5q.d.ts} +5 -5
- package/dist/{topic-B_DGdAEs.d.ts → topic-XDdKzlrn.d.ts} +5 -5
- package/dist/{types-Dp3UCr1e.d.ts → types-B-D6fYx2.d.ts} +1 -1
- package/dist/{types-DF8JYEf5.d.ts → types-BFwB-E1j.d.ts} +2 -2
- package/dist/{types-Czq9Xtpa.d.ts → types-CK2X2wCB.d.ts} +5 -5
- package/dist/{types-DFdg_4yN.d.ts → types-CPl9uJ0G.d.ts} +2 -2
- package/dist/{types-DR1MHh7N.d.ts → types-CwQgFo8c.d.ts} +4 -4
- package/dist/{types-Dr9wZgNy.d.ts → types-DMihLukJ.d.ts} +3 -3
- package/dist/{types-A4yyKEsg.d.ts → types-iCyZ3lMx.d.ts} +4 -4
- package/dist/{types-BdaBfYIw.d.ts → types-nspa5I-a.d.ts} +7 -7
- package/dist/{undo-B1jwnVyN.d.ts → undo-0HkWXASn.d.ts} +2 -2
- package/dist/{usage-Dp45V42p.d.ts → usage-BkWAPkg2.d.ts} +4 -4
- package/dist/{vault-BghaujrZ.d.ts → vault-BkdPmL7f.d.ts} +2 -2
- package/dist/vercel-connect/index.d.ts +1 -1
- package/dist/{verify-CI8LgSpv.d.ts → verify-41mZmspj.d.ts} +2 -2
- package/dist/{view-BvNA7EOC.d.ts → view-C8_xvD-j.d.ts} +1 -1
- package/dist/vue/index.d.ts +10 -10
- package/dist/{watch-topic-1zIAtiNM.d.ts → watch-topic-DpN_GEoS.d.ts} +1 -1
- package/dist/workflow-sdk/builder/index.d.ts +3 -3
- package/dist/workflow-sdk/index.d.ts +1 -1
- package/dist/workflow-sdk/world/index.d.ts +1 -1
- package/dist/{workflow-sdk-BNsZrcVg.d.ts → workflow-sdk-rg3IbCZC.d.ts} +3 -3
- package/dist/{workflows-B0ZPAQu0.d.ts → workflows-xL6t0TXx.d.ts} +7 -4
- package/dist/yjs/index.d.ts +2 -2
- package/package.json +1 -2
- package/schemas/config-v1.json +3 -351
- package/skills/better-supabase/references/ui-recipes.md +5 -5
- package/dist/cli/add-pDOlqWUa.js +0 -1
- package/dist/cli/env-Cy2lWBRC.js +0 -1
- package/dist/cli/powersync-DURhWDVc.js +0 -1
- package/dist/cli/seed-BJ7c-ktX.js +0 -1
|
@@ -4943,12 +4943,12 @@ const ACCESS_REQUESTS = {
|
|
|
4943
4943
|
};
|
|
4944
4944
|
//#endregion
|
|
4945
4945
|
//#region src/core/subject-permission.ts
|
|
4946
|
-
/** A `config.
|
|
4946
|
+
/** A `config.subjects.<type>.permissions` entry as its parts. */
|
|
4947
4947
|
function subjectPermissionOf(value) {
|
|
4948
4948
|
return typeof value === "string" ? { key: value } : value;
|
|
4949
4949
|
}
|
|
4950
4950
|
/**
|
|
4951
|
-
* The tenant permission key of a `config.
|
|
4951
|
+
* The tenant permission key of a `config.subjects.<type>.permissions` entry, or
|
|
4952
4952
|
* `undefined` when the action is granted only per row or to an owner.
|
|
4953
4953
|
*/
|
|
4954
4954
|
function subjectPermissionKey(value) {
|
|
@@ -5022,7 +5022,7 @@ function checkPermission(where, action, value) {
|
|
|
5022
5022
|
if (key === void 0 && owner === void 0) throw new TypeError(`${where} needs a key or an owner column`);
|
|
5023
5023
|
}
|
|
5024
5024
|
/**
|
|
5025
|
-
* `config.
|
|
5025
|
+
* `config.subjects`, checked: every entry with its table split and quoted. A
|
|
5026
5026
|
* subject without `tenant` gets the tenant column `naming` names
|
|
5027
5027
|
* (`organization_id`, or `workspace_id` for
|
|
5028
5028
|
* `blocks.memberships.names.organization: workspace`).
|
|
@@ -5078,8 +5078,9 @@ function registeredSubjects(subjects, naming = tenantNames()) {
|
|
|
5078
5078
|
}
|
|
5079
5079
|
/**
|
|
5080
5080
|
* The tenant column of `table` (`schema.table`, or a table in `public`): the
|
|
5081
|
-
* `tenant` of the `config.
|
|
5082
|
-
* `naming` names. `undefined` when the entry says the table has no
|
|
5081
|
+
* `tenant` of the `config.subjects` entry for that table, else the tenant
|
|
5082
|
+
* column `naming` names. `undefined` when the entry says the table has no
|
|
5083
|
+
* tenant.
|
|
5083
5084
|
*/
|
|
5084
5085
|
function tenantColumnOf(table, subjects, naming = tenantNames()) {
|
|
5085
5086
|
const qualify = (name) => name.includes(".") ? name : `public.${name}`;
|
|
@@ -5138,9 +5139,9 @@ function urlExpression(template, alias = "s") {
|
|
|
5138
5139
|
//#region src/sql/subject-check-sql.ts
|
|
5139
5140
|
/**
|
|
5140
5141
|
* SQL that is true when `type`/`id` (text expressions) names a record in
|
|
5141
|
-
* `config.
|
|
5142
|
-
* through `can_subject`. Types without a tenant column never match. The
|
|
5143
|
-
* must require `subjects`.
|
|
5142
|
+
* `config.subjects` that belongs to tenant `tenant` and that the caller can
|
|
5143
|
+
* read through `can_subject`. Types without a tenant column never match. The
|
|
5144
|
+
* module must require `subjects`.
|
|
5144
5145
|
*/
|
|
5145
5146
|
function subjectInTenant(ctx, type, id, tenant) {
|
|
5146
5147
|
const subjects = registeredSubjects(ctx.subjects, ctx.naming).filter((subject) => subject.tenant !== void 0);
|
|
@@ -5152,7 +5153,7 @@ ${subjects.map((subject) => ` when ${sqlString(subject.type)} then exists (
|
|
|
5152
5153
|
end and ${canSubject}(${type}, ${id}, 'read'))`;
|
|
5153
5154
|
}
|
|
5154
5155
|
/**
|
|
5155
|
-
* SQL for the tenant (as text) of record `type`/`id` in `config.
|
|
5156
|
+
* SQL for the tenant (as text) of record `type`/`id` in `config.subjects`, or
|
|
5156
5157
|
* null for an unknown record or type. Reads the table directly, so use it in
|
|
5157
5158
|
* security definer code after checking the caller.
|
|
5158
5159
|
*/
|
|
@@ -5165,7 +5166,7 @@ ${subjects.map((subject) => ` when ${sqlString(subject.type)} then (select
|
|
|
5165
5166
|
end)`;
|
|
5166
5167
|
}
|
|
5167
5168
|
/**
|
|
5168
|
-
* SQL for the title (as text) of record `type`/`id` in `config.
|
|
5169
|
+
* SQL for the title (as text) of record `type`/`id` in `config.subjects`, from
|
|
5169
5170
|
* the entry's `title` column, or null for an unknown record or a type without
|
|
5170
5171
|
* one. Reads the table directly, so check the caller first.
|
|
5171
5172
|
*/
|
|
@@ -7763,13 +7764,13 @@ function rawSubjects(ctx, where, extraKeys, allow) {
|
|
|
7763
7764
|
return Object.fromEntries(Object.entries(registry).filter(([, entry]) => tenantless || entry.tenant !== false).map(([type, entry]) => [type, fromRegistry(entry, extraKeys)]));
|
|
7764
7765
|
}
|
|
7765
7766
|
if (Array.isArray(raw)) {
|
|
7766
|
-
if (raw.length === 0) throw new TypeError(`${where}: list at least one config.
|
|
7767
|
+
if (raw.length === 0) throw new TypeError(`${where}: list at least one config.subjects type, or pass an object of subject type to { table, ... }`);
|
|
7767
7768
|
return Object.fromEntries(raw.map((type) => {
|
|
7768
|
-
if (typeof type !== "string" || !Object.hasOwn(registry, type)) throw new TypeError(`${where}: "${String(type)}" is not a subject type in config.
|
|
7769
|
+
if (typeof type !== "string" || !Object.hasOwn(registry, type)) throw new TypeError(`${where}: "${String(type)}" is not a subject type in config.subjects. Types: ${Object.keys(registry).join(", ") || "none"}`);
|
|
7769
7770
|
return [type, fromRegistry(registry[type], extraKeys)];
|
|
7770
7771
|
}));
|
|
7771
7772
|
}
|
|
7772
|
-
if (!isRecord$1(raw)) throw new TypeError(`${where}: pass a list of config.
|
|
7773
|
+
if (!isRecord$1(raw)) throw new TypeError(`${where}: pass a list of config.subjects types, or an object of subject type to { table, id?, tenant?, permission?, cascade? }`);
|
|
7773
7774
|
return Object.fromEntries(Object.entries(raw).map(([type, entry]) => {
|
|
7774
7775
|
const registered = Object.hasOwn(registry, type) ? registry[type] : void 0;
|
|
7775
7776
|
return [type, registered && isRecord$1(entry) ? {
|
|
@@ -7801,7 +7802,7 @@ function registeredRead(entry, permission) {
|
|
|
7801
7802
|
/**
|
|
7802
7803
|
* `blocks.<instance>.on`: subject type to `{ table, id?, tenant?, permission?,
|
|
7803
7804
|
* cascade? }` plus the `extra` keys the module reads, falling back to the
|
|
7804
|
-
* app-wide `config.
|
|
7805
|
+
* app-wide `config.subjects` registry.
|
|
7805
7806
|
*/
|
|
7806
7807
|
function subjectsOption(ctx, extraKeys = [], allow = {}) {
|
|
7807
7808
|
const where = `blocks.${ctx.instance}.on`;
|
|
@@ -7840,8 +7841,8 @@ function subjectsOption(ctx, extraKeys = [], allow = {}) {
|
|
|
7840
7841
|
}
|
|
7841
7842
|
/**
|
|
7842
7843
|
* The record types `blocks.<instance>.on` allows, checked against
|
|
7843
|
-
* `config.
|
|
7844
|
-
* is allowed.
|
|
7844
|
+
* `config.subjects`, or `undefined` when `on` is unset and every registered
|
|
7845
|
+
* type is allowed.
|
|
7845
7846
|
*/
|
|
7846
7847
|
function allowedSubjectTypes(ctx) {
|
|
7847
7848
|
return ctx.on === void 0 ? void 0 : subjectsOption(ctx).map(([type]) => type);
|
|
@@ -7975,7 +7976,7 @@ function subjectReadable(ctx, subjects, args, options = {}) {
|
|
|
7975
7976
|
}
|
|
7976
7977
|
/**
|
|
7977
7978
|
* Whether the caller may take `action` on subject `type`/`id`, for each of
|
|
7978
|
-
* `subjects` whose `config.
|
|
7979
|
+
* `subjects` whose `config.subjects` entry declares it (the first of `actions`
|
|
7979
7980
|
* it declares): `can_subject(type, id, action)` as the caller, so a key, the
|
|
7980
7981
|
* provider's per-row grants and an owner column all count. Other types pass.
|
|
7981
7982
|
* `undefined` when no subject declares one of `actions` or the `subjects`
|
|
@@ -9640,7 +9641,7 @@ $$;
|
|
|
9640
9641
|
${userGrant(`${fn("subject_titles")}(jsonb)`)}
|
|
9641
9642
|
|
|
9642
9643
|
-- True when the caller can see the subject row and, for an action with a
|
|
9643
|
-
-- key in config.
|
|
9644
|
+
-- key in config.subjects.<type>.permissions, holds that key in the
|
|
9644
9645
|
-- subject's tenant (or on the record, through the subject's scope).
|
|
9645
9646
|
create or replace function ${fn("can_subject")}(subject_type text, subject_id text, action text)
|
|
9646
9647
|
returns boolean
|
|
@@ -9703,7 +9704,7 @@ ${userGrant(`${fn("record_summary")}(text, text, text[], timestamptz)`)}
|
|
|
9703
9704
|
|
|
9704
9705
|
-- can_subject for another user, for server code that decides who receives
|
|
9705
9706
|
-- an event. It reads the row past its policies and asks can_user for the
|
|
9706
|
-
-- action's key in config.
|
|
9707
|
+
-- action's key in config.subjects.<type>.permissions, so an action without
|
|
9707
9708
|
-- a key is false and a share-link grant never counts. A provider that
|
|
9708
9709
|
-- can't answer for others (no idsWithFor) gives false.
|
|
9709
9710
|
create or replace function ${fn("can_subject_for")}(member uuid, subject_type text, subject_id text, action text)
|
|
@@ -9864,7 +9865,7 @@ const SUBJECTS = {
|
|
|
9864
9865
|
name: "subjects",
|
|
9865
9866
|
scopes: ["tenant"],
|
|
9866
9867
|
title: "Subjects",
|
|
9867
|
-
description: "The app-wide subject registry from config.
|
|
9868
|
+
description: "The app-wide subject registry from config.subjects: subject_title, subject_url, subject_titles, can_subject, can_subject_for and record_summary for every registered type, my_work across the installed blocks, and Realtime presence on presence:<type>:<id> for readers of the subject.",
|
|
9868
9869
|
requires: ["permissions"],
|
|
9869
9870
|
target: "schema",
|
|
9870
9871
|
modes: ["managed", "custom"],
|
|
@@ -13294,7 +13295,7 @@ function blockSubjects(ctx) {
|
|
|
13294
13295
|
/**
|
|
13295
13296
|
* Whether the subject a new link names exists in the link's tenant and the
|
|
13296
13297
|
* caller may share it. Block-owned types come first; registered subjects
|
|
13297
|
-
* (`config.
|
|
13298
|
+
* (`config.subjects` or `on`) check the row's tenant and the subject's read
|
|
13298
13299
|
* permission. Any other type fails.
|
|
13299
13300
|
*/
|
|
13300
13301
|
function subjectCheck(ctx) {
|
|
@@ -37496,7 +37497,7 @@ begin
|
|
|
37496
37497
|
${fail$1("COLLECTION_INVALID", "scope must be user, team or tenant", "22023")}
|
|
37497
37498
|
end if;
|
|
37498
37499
|
if create_collection.subject_type is null or not (create_collection.subject_type = any (${names.subjectTypes})) then
|
|
37499
|
-
${fail$1("COLLECTION_SUBJECT_TYPE_UNKNOWN", "not a subject type in config.
|
|
37500
|
+
${fail$1("COLLECTION_SUBJECT_TYPE_UNKNOWN", "not a subject type in config.subjects", "22023")}
|
|
37500
37501
|
end if;
|
|
37501
37502
|
if v_name is null then
|
|
37502
37503
|
${fail$1("COLLECTION_NAME_REQUIRED", "a name is required", "23502")}
|
|
@@ -38406,7 +38407,7 @@ function build$91(ctx, layout) {
|
|
|
38406
38407
|
return `${schemaPreamble(ctx)}
|
|
38407
38408
|
-- Favorites (a member's starred records, ranked for a sidebar), lists (named,
|
|
38408
38409
|
-- static collections of one subject type) and saved items (a member's records
|
|
38409
|
-
-- to come back to, with a reminder) on config.
|
|
38410
|
+
-- to come back to, with a reminder) on config.subjects records.
|
|
38410
38411
|
${tables$29(ctx, names)}${ctx.manages ? policies(ctx, names) : ""}${collectionFunctions(ctx, names)}${starFunctions(ctx, names)}${savedItemFunctions(ctx, names)}${subjectCascades(ctx, cascading(ctx), `delete from ${ctx.table("entries")} where ${en("subjectType")} = v_type and ${en("subjectId")} = v_id;
|
|
38411
38412
|
delete from ${ctx.table("favorites")} where ${fa("subjectType")} = v_type and ${fa("subjectId")} = v_id;
|
|
38412
38413
|
delete from ${ctx.table("savedItems")} where ${sv("subjectType")} = v_type and ${sv("subjectId")} = v_id;`)}`;
|
|
@@ -58441,7 +58442,7 @@ function fromApplication(ctx, n) {
|
|
|
58441
58442
|
const jobType = asText$2(hiring, "jobs", hiring.label("jobs", "employmentType", `v_job.${j("employmentType")}`));
|
|
58442
58443
|
return `
|
|
58443
58444
|
-- The employee for a hired application, in preboarding: the name comes from
|
|
58444
|
-
-- the candidate's record in config.
|
|
58445
|
+
-- the candidate's record in config.subjects, and the job title, team and
|
|
58445
58446
|
-- employment type from the job. attrs overrides any of them. Calling it
|
|
58446
58447
|
-- again returns the same employee, and with the relations module the
|
|
58447
58448
|
-- employee is created_from the application.
|
|
@@ -62061,14 +62062,14 @@ const NAMES$72 = { tables: { changes: {
|
|
|
62061
62062
|
const COLUMN$5 = /^[a-z_][a-z0-9_]{0,62}$/u;
|
|
62062
62063
|
/**
|
|
62063
62064
|
* `blocks.field-history.on`, record type to `{ fields }`, checked against
|
|
62064
|
-
* `config.
|
|
62065
|
+
* `config.subjects`.
|
|
62065
62066
|
*/
|
|
62066
62067
|
function historyBindings(ctx) {
|
|
62067
62068
|
const registry = registeredSubjects(ctx.subjects, ctx.naming);
|
|
62068
62069
|
return Object.entries(onSettings(ctx)).map(([type, settings]) => {
|
|
62069
62070
|
const where = `blocks.field-history.on.${type}`;
|
|
62070
62071
|
const subject = registry.find((item) => item.type === type);
|
|
62071
|
-
if (subject?.tenant === void 0) throw new TypeError(`${where}: register "${type}" with a tenant column in config.
|
|
62072
|
+
if (subject?.tenant === void 0) throw new TypeError(`${where}: register "${type}" with a tenant column in config.subjects first`);
|
|
62072
62073
|
const fields = isRecord$1(settings) ? settings["fields"] : void 0;
|
|
62073
62074
|
if (!Array.isArray(fields) || fields.length === 0 || fields.some((field) => typeof field !== "string" || !COLUMN$5.test(field))) throw new TypeError(`${where}.fields must be a non-empty list of column names`);
|
|
62074
62075
|
return {
|
|
@@ -67822,7 +67823,7 @@ end;
|
|
|
67822
67823
|
$$;
|
|
67823
67824
|
${userGrant(`${fn("save_job")}(${ctx.idType}, uuid, jsonb)`)}
|
|
67824
67825
|
|
|
67825
|
-
-- An application of a candidate (a record in config.
|
|
67826
|
+
-- An application of a candidate (a record in config.subjects, a person by
|
|
67826
67827
|
-- default) to an open job. Applying again returns the same application.
|
|
67827
67828
|
create or replace function ${fn("apply_to_job")}(job uuid, candidate jsonb, source text, owner uuid)
|
|
67828
67829
|
returns jsonb
|
|
@@ -68150,7 +68151,7 @@ const HIRING = {
|
|
|
68150
68151
|
name: "hiring",
|
|
68151
68152
|
scopes: ["tenant"],
|
|
68152
68153
|
title: "Hiring",
|
|
68153
|
-
description: "Jobs and applications on a pipeline per job, candidates from config.
|
|
68154
|
+
description: "Jobs and applications on a pipeline per job, candidates from config.subjects, scorecards per stage, interviews, and hire, reject and withdraw events for the app to act on.",
|
|
68154
68155
|
requires: [
|
|
68155
68156
|
"memberships",
|
|
68156
68157
|
"permissions",
|
|
@@ -73820,7 +73821,7 @@ function purchaseOrderFunctions(ctx, names) {
|
|
|
73820
73821
|
return `
|
|
73821
73822
|
-- Creates a draft purchase order (purchase_order null) or replaces a draft's
|
|
73822
73823
|
-- fields and lines. lines: [{ "variantId": uuid, "quantity": n, "unitCost": "minor units" }].
|
|
73823
|
-
-- supplier_type and supplier_id name a config.
|
|
73824
|
+
-- supplier_type and supplier_id name a config.subjects record, or are both null.
|
|
73824
73825
|
create or replace function ${fn("save_purchase_order")}(tenant ${ctx.idType}, purchase_order uuid, location uuid, supplier_type text, supplier_id text, currency text, expected_at timestamptz, lines jsonb, note text)
|
|
73825
73826
|
returns jsonb
|
|
73826
73827
|
language plpgsql
|
|
@@ -98383,7 +98384,7 @@ function pipelineBindings(ctx) {
|
|
|
98383
98384
|
return Object.entries(raw).map(([type, entry]) => {
|
|
98384
98385
|
const where = `blocks.${ctx.instance}.on.${type}`;
|
|
98385
98386
|
const subject = registry.find((item) => item.type === type);
|
|
98386
|
-
if (subject === void 0) throw new TypeError(`${where}: register "${type}" in config.
|
|
98387
|
+
if (subject === void 0) throw new TypeError(`${where}: register "${type}" in config.subjects first`);
|
|
98387
98388
|
if (subject.tenant === void 0) throw new TypeError(`${where}: config.subjects.${type} needs a tenant column`);
|
|
98388
98389
|
if (!isRecord$1(entry)) throw new TypeError(`${where} must be an object`);
|
|
98389
98390
|
const categories = categoriesOf(where, entry["categories"]);
|
|
@@ -103667,7 +103668,7 @@ function build$33(ctx) {
|
|
|
103667
103668
|
if (ctx.mode === "custom") return "";
|
|
103668
103669
|
const subjects = ranked(ctx);
|
|
103669
103670
|
const fn = (name) => ctx.fn(name);
|
|
103670
|
-
const unknown = fail$1("RANK_SUBJECT_UNKNOWN", "this subject type has no rank column in config.
|
|
103671
|
+
const unknown = fail$1("RANK_SUBJECT_UNKNOWN", "this subject type has no rank column in config.subjects", "22023");
|
|
103671
103672
|
const invalid = (arg) => `if ${arg} is not null and ${arg} !~ '^[0-9A-Za-z]*[1-9A-Za-z]$' then
|
|
103672
103673
|
${fail$1("RANK_KEY_INVALID", "not a rank key", "22023")}
|
|
103673
103674
|
end if;`;
|
|
@@ -103834,7 +103835,7 @@ const RANK = {
|
|
|
103834
103835
|
name: "rank",
|
|
103835
103836
|
scopes: ["tenant"],
|
|
103836
103837
|
title: "Rank",
|
|
103837
|
-
description: "Fractional rank keys: rank_between, move() for every config.
|
|
103838
|
+
description: "Fractional rank keys: rank_between, move() for every config.subjects entry with a rank column (through the caller's policies and any state-machine trigger), and a rebalance job.",
|
|
103838
103839
|
requires: ["permissions", "subjects"],
|
|
103839
103840
|
integrates: ["queue"],
|
|
103840
103841
|
target: "schema",
|
|
@@ -109357,7 +109358,7 @@ begin
|
|
|
109357
109358
|
case search_refresh.subject_type
|
|
109358
109359
|
${cases}
|
|
109359
109360
|
else
|
|
109360
|
-
${fail$1("SEARCH_SUBJECT_UNKNOWN", "this subject type has no search entry in config.
|
|
109361
|
+
${fail$1("SEARCH_SUBJECT_UNKNOWN", "this subject type has no search entry in config.subjects", "22023")}
|
|
109361
109362
|
end case;
|
|
109362
109363
|
if not v_found then
|
|
109363
109364
|
delete from ${docs}
|
|
@@ -109513,7 +109514,7 @@ const SEARCH = {
|
|
|
109513
109514
|
name: "search",
|
|
109514
109515
|
scopes: ["tenant"],
|
|
109515
109516
|
title: "Search",
|
|
109516
|
-
description: "A search_documents index kept up by triggers from each config.
|
|
109517
|
+
description: "A search_documents index kept up by triggers from each config.subjects search entry, with search(q) as the caller (websearch, trigram prefixes, can_subject, hybrid with embeddings), and recents and favorites from the share-links user state.",
|
|
109517
109518
|
requires: [
|
|
109518
109519
|
"memberships",
|
|
109519
109520
|
"permissions",
|
|
@@ -110364,7 +110365,7 @@ function matchingIds(ctx, n) {
|
|
|
110364
110365
|
limit ${String(n.maxMembers + 1)}
|
|
110365
110366
|
) x;`;
|
|
110366
110367
|
};
|
|
110367
|
-
const unknown = fail$1("SEGMENT_SUBJECT_UNKNOWN", "The segment's subject type is not registered in config.
|
|
110368
|
+
const unknown = fail$1("SEGMENT_SUBJECT_UNKNOWN", "The segment's subject type is not registered in config.subjects", "22023");
|
|
110368
110369
|
if (n.subjects.length === 0) return unknown;
|
|
110369
110370
|
return `${n.subjects.map(branch).join("\n els")}
|
|
110370
110371
|
else
|
|
@@ -110441,7 +110442,7 @@ begin
|
|
|
110441
110442
|
end if;
|
|
110442
110443
|
v_type := coalesce(v_old.${s("subjectType")}, segment ->> 'subjectType');
|
|
110443
110444
|
if v_type is null or v_type not in ${knownList} then
|
|
110444
|
-
${fail$1("SEGMENT_SUBJECT_UNKNOWN", "subjectType must be a type in config.
|
|
110445
|
+
${fail$1("SEGMENT_SUBJECT_UNKNOWN", "subjectType must be a type in config.subjects", "22023")}
|
|
110445
110446
|
end if;
|
|
110446
110447
|
v_name := coalesce(nullif(trim(segment ->> 'name'), ''), v_old.${s("name")});
|
|
110447
110448
|
if v_name is null or length(v_name) > 200 then
|
|
@@ -116535,7 +116536,7 @@ function bindings(ctx) {
|
|
|
116535
116536
|
return Object.entries(onSettings(ctx)).map(([type, entry]) => {
|
|
116536
116537
|
const where = `blocks.${ctx.instance}.on.${type}`;
|
|
116537
116538
|
const subject = registry.find((item) => item.type === type);
|
|
116538
|
-
if (subject?.tenant === void 0) throw new TypeError(`${where}: register "${type}" with a tenant column in config.
|
|
116539
|
+
if (subject?.tenant === void 0) throw new TypeError(`${where}: register "${type}" with a tenant column in config.subjects first`);
|
|
116539
116540
|
if (!isRecord$1(entry)) throw new TypeError(`${where} must be an object`);
|
|
116540
116541
|
const status = entry["status"];
|
|
116541
116542
|
const priority = entry["priority"];
|
|
@@ -118643,7 +118644,7 @@ function machine(name, entry, registry, naming) {
|
|
|
118643
118644
|
const order = statusList(record["order"], `${where}.order`);
|
|
118644
118645
|
for (const status of order) if (!statuses.has(status)) throw new TypeError(`${where}.order: ${status} is not a status`);
|
|
118645
118646
|
const tenantColumn = typeof record["tenant"] === "string" ? record["tenant"] : tenantColumnOf(table, registry, naming);
|
|
118646
|
-
if (tenantColumn === void 0) throw new TypeError(`${where}: ${table} has no tenant column in config.
|
|
118647
|
+
if (tenantColumn === void 0) throw new TypeError(`${where}: ${table} has no tenant column in config.subjects, which a machine needs`);
|
|
118647
118648
|
const history = historyOf(record["history"], where, tenantColumn);
|
|
118648
118649
|
return {
|
|
118649
118650
|
name,
|
|
@@ -119397,7 +119398,7 @@ const STATE_MACHINE = {
|
|
|
119397
119398
|
name: "state-machine",
|
|
119398
119399
|
scopes: ["tenant"],
|
|
119399
119400
|
title: "State machine",
|
|
119400
|
-
description: "Allowed status transitions as the caller, a history row and a status.changed event. A machine can also write a stages timeline and keep a lifecycle row (pause, flags, pinned version). Each machine is a subject table named in options.machines, or a config.
|
|
119401
|
+
description: "Allowed status transitions as the caller, a history row and a status.changed event. A machine can also write a stages timeline and keep a lifecycle row (pause, flags, pinned version). Each machine is a subject table named in options.machines, or a config.subjects type.",
|
|
119401
119402
|
requires: ["memberships", "permissions"],
|
|
119402
119403
|
integrates: [
|
|
119403
119404
|
"outbox",
|
|
@@ -134929,7 +134930,7 @@ function columnAccessRefusals(table) {
|
|
|
134929
134930
|
*/
|
|
134930
134931
|
function constraintChecks(column, ident) {
|
|
134931
134932
|
const conditions = [];
|
|
134932
|
-
const format = column.format === void 0 ? void 0 : FIELD_FORMATS[column.format];
|
|
134933
|
+
const format = column.format === void 0 || column.domain !== void 0 ? void 0 : FIELD_FORMATS[column.format];
|
|
134933
134934
|
if (format?.pattern !== void 0) conditions.push(`${ident} ~* ${sqlString(format.pattern)}`);
|
|
134934
134935
|
if (column.options !== void 0) {
|
|
134935
134936
|
const list = column.options.map((option) => sqlString(option)).join(", ");
|
|
@@ -135521,7 +135522,7 @@ function referenceSql(where, reference, ctx) {
|
|
|
135521
135522
|
function columnSql(table, name, column) {
|
|
135522
135523
|
const notNull = column.nullable === false && (table.enrich === void 0 || column.default !== void 0 || column.identity === true);
|
|
135523
135524
|
return [
|
|
135524
|
-
`${sqlIdent(name)} ${column.encrypted === true ? "text" : column.type}`,
|
|
135525
|
+
`${sqlIdent(name)} ${column.encrypted === true ? "text" : column.domain ?? column.type}`,
|
|
135525
135526
|
column.identity === true ? " generated by default as identity" : "",
|
|
135526
135527
|
notNull ? " not null" : "",
|
|
135527
135528
|
column.default === void 0 ? "" : ` default ${column.default}`,
|
package/dist/sqlite/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Bt as Executor } from "../types-
|
|
2
|
-
import { c as LocalTablesOption, n as DataEngine, s as LiveEngineOptions } from "../data-engine-
|
|
3
|
-
import { i as fromSqliteError, n as SqliteDatabaseLike, o as CheckSqliteOptions, r as SqliteExecutorOptions, s as checkSqlite, t as SqliteContextLike } from "../executor-
|
|
1
|
+
import { Bt as Executor } from "../types-CPl9uJ0G.js";
|
|
2
|
+
import { c as LocalTablesOption, n as DataEngine, s as LiveEngineOptions } from "../data-engine-rvbR2C4F.js";
|
|
3
|
+
import { i as fromSqliteError, n as SqliteDatabaseLike, o as CheckSqliteOptions, r as SqliteExecutorOptions, s as checkSqlite, t as SqliteContextLike } from "../executor-BfirBzOr.js";
|
|
4
4
|
//#region src/sqlite/engine.d.ts
|
|
5
5
|
/** A SQLite database that may report which tables changed. */
|
|
6
6
|
interface ChangingSqliteDatabase extends SqliteDatabaseLike {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
3
3
|
import { n as Logger } from "./logger-DWVYUmwi.js";
|
|
4
|
-
import { r as BlockTemporalOptions } from "./block-helpers-
|
|
5
|
-
import { t as BlockTransport } from "./block-transport-
|
|
6
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
4
|
+
import { r as BlockTemporalOptions } from "./block-helpers-D5emQ2O6.js";
|
|
5
|
+
import { t as BlockTransport } from "./block-transport-9EUA3q_I.js";
|
|
6
|
+
import { n as BlockHooks } from "./block-hooks-B8itxzEE.js";
|
|
7
7
|
//#region src/blocks/sso/sso.d.ts
|
|
8
8
|
/** The DNS record that proves a domain belongs to the organization. */
|
|
9
9
|
interface DomainRecord {
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as readSession, D as writeSession, E as sessionEncoding, S as pruneSessionChunks, T as sessionCookieName, _ as StoredSession, a as ResolveAuthOptions, b as clearSessionAtScopes, d as CookieOptions, f as CookieRecord, g as SessionEncoding, h as DEFAULT_SESSION_ENCODING, l as resolveAuth, m as CookieWrite, n as AuthResolver, p as CookieScope, r as AuthState, t as AuthResolution, u as AUTH_CACHE_HEADERS, v as WriteSessionOptions, w as serializeCookie, x as parseCookies, y as applyCookieWrites } from "../resolve-
|
|
2
|
-
import { n as toSession, t as AuthSession } from "../view-
|
|
3
|
-
import { r as MembershipClaim } from "../entitlements-
|
|
4
|
-
import { n as RefreshOutcome, r as refreshSession, t as RefreshOptions } from "../refresh-
|
|
5
|
-
import { a as sessionStatus, i as clearSessionCookies, n as SessionStatus, o as authContext, r as SessionStatusOptions, t as ClearSessionCookiesOptions } from "../ended-
|
|
1
|
+
import { C as readSession, D as writeSession, E as sessionEncoding, S as pruneSessionChunks, T as sessionCookieName, _ as StoredSession, a as ResolveAuthOptions, b as clearSessionAtScopes, d as CookieOptions, f as CookieRecord, g as SessionEncoding, h as DEFAULT_SESSION_ENCODING, l as resolveAuth, m as CookieWrite, n as AuthResolver, p as CookieScope, r as AuthState, t as AuthResolution, u as AUTH_CACHE_HEADERS, v as WriteSessionOptions, w as serializeCookie, x as parseCookies, y as applyCookieWrites } from "../resolve-CtX6T0c0.js";
|
|
2
|
+
import { n as toSession, t as AuthSession } from "../view-C8_xvD-j.js";
|
|
3
|
+
import { r as MembershipClaim } from "../entitlements-Bw3eYGKJ.js";
|
|
4
|
+
import { n as RefreshOutcome, r as refreshSession, t as RefreshOptions } from "../refresh-D02Pbf5B.js";
|
|
5
|
+
import { a as sessionStatus, i as clearSessionCookies, n as SessionStatus, o as authContext, r as SessionStatusOptions, t as ClearSessionCookiesOptions } from "../ended-EZzN9QTM.js";
|
|
6
6
|
export { AUTH_CACHE_HEADERS, type AuthResolution, type AuthResolver, type AuthSession, type AuthState, type ClearSessionCookiesOptions, type CookieOptions, type CookieRecord, type CookieScope, type CookieWrite, DEFAULT_SESSION_ENCODING, type MembershipClaim, type RefreshOptions, type RefreshOutcome, type ResolveAuthOptions, type SessionEncoding, type SessionStatus, type SessionStatusOptions, type StoredSession, type WriteSessionOptions, applyCookieWrites, authContext, clearSessionAtScopes, clearSessionCookies, parseCookies, pruneSessionChunks, readSession, refreshSession, resolveAuth, serializeCookie, sessionCookieName, sessionEncoding, sessionStatus, toSession, writeSession };
|
package/dist/storage/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as AccessPolicySql, T as AccessBucketPolicy, _t as BucketLifecycle, bt as VersioningStatus, vt as BucketLifecycleRule, yt as ObjectVersion } from "../types-
|
|
2
|
-
import { $ as AppliedBucket, A as TtlPreset, B as StorageListV2Folder, C as TransformOptions, D as defineBucket, E as UrlOptions, F as StorageDownloadOptions, G as StorageResponse, H as StorageListV2Result, I as StorageFailure, J as StorageSignedUrlEntry, K as StorageSearchOptions, L as StorageFetchParameters, M as StorageBucketApi, N as StorageClient, O as parseSize, P as StorageDestinationOptions, Q as StoragePath, R as StorageFileOptions, S as TransferOptions, T as UploadOptions, U as StorageObjectInfo, V as StorageListV2Object, W as StorageRemoveEntry, X as StorageUrlOptions, Y as StorageTransform, Z as PathIn, _ as ResumableReservation, a as BucketConnectOptions, b as SweepOptions, c as DownloadOptions, d as PathValues, et as TemplateParams, f as PurgeCacheOptions, g as ReserveResumableOptions, h as Reservation, i as BucketConfig, j as StorageApi, k as TTL, l as ImageTransform, m as ReplaceResult, n as Bucket, o as BucketDrift, p as ReplaceOptions, q as StorageSearchV2Options, r as BucketClient, s as BucketPolicy, t as ActualBucket, tt as TemplateValues, u as ObjectTarget, v as StorageAdminClient, w as UploadBody, x as SweepResult, y as StoredObject, z as StorageListEntry } from "../bucket-
|
|
3
|
-
import { A as ConnectedRef, C as avatarBucket, D as BucketMap, E as BucketIdOf, F as StorageImageSize, I as storageImageSrcSet, L as storageImageUrl, M as StoredRef, N as defineBuckets, O as BucketWithId, P as StorageImageOptions, R as fromStorageError, S as OrganizationLogoBucketOptions, T as AnyBucket, _ as defineAnalyticsBucket, a as VectorBucketConfig, b as ImageBucketOptions, c as VectorIndexClient, d as VectorQueryOptions, f as VectorRecord, g as AnalyticsCatalog, h as AnalyticsBucketClient, i as VectorBucketClient, j as ResolvedRef, k as Buckets, l as VectorIndexConfig, m as AnalyticsBucket, n as resumableEndpoint, o as VectorDistance, p as defineVectorBucket, r as VectorBucket, s as VectorHit, t as ResumableEndpointOptions, u as VectorMetadata, v as AvatarBucketOptions, w as organizationLogoBucket, x as ImageVariant, y as IMAGE_TYPES } from "../index-
|
|
1
|
+
import { E as AccessPolicySql, T as AccessBucketPolicy, _t as BucketLifecycle, bt as VersioningStatus, vt as BucketLifecycleRule, yt as ObjectVersion } from "../types-CPl9uJ0G.js";
|
|
2
|
+
import { $ as AppliedBucket, A as TtlPreset, B as StorageListV2Folder, C as TransformOptions, D as defineBucket, E as UrlOptions, F as StorageDownloadOptions, G as StorageResponse, H as StorageListV2Result, I as StorageFailure, J as StorageSignedUrlEntry, K as StorageSearchOptions, L as StorageFetchParameters, M as StorageBucketApi, N as StorageClient, O as parseSize, P as StorageDestinationOptions, Q as StoragePath, R as StorageFileOptions, S as TransferOptions, T as UploadOptions, U as StorageObjectInfo, V as StorageListV2Object, W as StorageRemoveEntry, X as StorageUrlOptions, Y as StorageTransform, Z as PathIn, _ as ResumableReservation, a as BucketConnectOptions, b as SweepOptions, c as DownloadOptions, d as PathValues, et as TemplateParams, f as PurgeCacheOptions, g as ReserveResumableOptions, h as Reservation, i as BucketConfig, j as StorageApi, k as TTL, l as ImageTransform, m as ReplaceResult, n as Bucket, o as BucketDrift, p as ReplaceOptions, q as StorageSearchV2Options, r as BucketClient, s as BucketPolicy, t as ActualBucket, tt as TemplateValues, u as ObjectTarget, v as StorageAdminClient, w as UploadBody, x as SweepResult, y as StoredObject, z as StorageListEntry } from "../bucket-SvRQwYS4.js";
|
|
3
|
+
import { A as ConnectedRef, C as avatarBucket, D as BucketMap, E as BucketIdOf, F as StorageImageSize, I as storageImageSrcSet, L as storageImageUrl, M as StoredRef, N as defineBuckets, O as BucketWithId, P as StorageImageOptions, R as fromStorageError, S as OrganizationLogoBucketOptions, T as AnyBucket, _ as defineAnalyticsBucket, a as VectorBucketConfig, b as ImageBucketOptions, c as VectorIndexClient, d as VectorQueryOptions, f as VectorRecord, g as AnalyticsCatalog, h as AnalyticsBucketClient, i as VectorBucketClient, j as ResolvedRef, k as Buckets, l as VectorIndexConfig, m as AnalyticsBucket, n as resumableEndpoint, o as VectorDistance, p as defineVectorBucket, r as VectorBucket, s as VectorHit, t as ResumableEndpointOptions, u as VectorMetadata, v as AvatarBucketOptions, w as organizationLogoBucket, x as ImageVariant, y as IMAGE_TYPES } from "../index-Cxsnd-OL.js";
|
|
4
4
|
export { type AccessBucketPolicy, type AccessPolicySql, type ActualBucket, type AnalyticsBucket, type AnalyticsBucketClient, type AnalyticsCatalog, type AnyBucket, type AppliedBucket, type AvatarBucketOptions, type Bucket, type BucketClient, type BucketConfig, type BucketConnectOptions, type BucketDrift, type BucketIdOf, type BucketLifecycle, type BucketLifecycleRule, type BucketMap, type BucketPolicy, type BucketWithId, type Buckets, type ConnectedRef, type DownloadOptions, IMAGE_TYPES, type ImageBucketOptions, type ImageTransform, type ImageVariant, type ObjectTarget, type ObjectVersion, type OrganizationLogoBucketOptions, type PathIn, type PathValues, type PurgeCacheOptions, type ReplaceOptions, type ReplaceResult, type Reservation, type ReserveResumableOptions, type ResolvedRef, type ResumableEndpointOptions, type ResumableReservation, type StorageAdminClient, type StorageApi, type StorageBucketApi, type StorageClient, type StorageDestinationOptions, type StorageDownloadOptions, type StorageFailure, type StorageFetchParameters, type StorageFileOptions, type StorageImageOptions, type StorageImageSize, type StorageListEntry, type StorageListV2Folder, type StorageListV2Object, type StorageListV2Result, type StorageObjectInfo, type StoragePath, type StorageRemoveEntry, type StorageResponse, type StorageSearchOptions, type StorageSearchV2Options, type StorageSignedUrlEntry, type StorageTransform, type StorageUrlOptions, type StoredObject, type StoredRef, type SweepOptions, type SweepResult, TTL, type TemplateParams, type TemplateValues, type TransferOptions, type TransformOptions, type TtlPreset, type UploadBody, type UploadOptions, type UrlOptions, type VectorBucket, type VectorBucketClient, type VectorBucketConfig, type VectorDistance, type VectorHit, type VectorIndexClient, type VectorIndexConfig, type VectorMetadata, type VectorQueryOptions, type VectorRecord, type VersioningStatus, avatarBucket, defineAnalyticsBucket, defineBucket, defineBuckets, defineVectorBucket, fromStorageError, organizationLogoBucket, parseSize, resumableEndpoint, storageImageSrcSet, storageImageUrl };
|
package/dist/streams/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { T as ErrorMapper, t as AsyncResult } from "../result-DZeA5KS6.js";
|
|
2
|
-
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../block-transport-
|
|
2
|
+
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../block-transport-9EUA3q_I.js";
|
|
3
3
|
import { a as StreamStatus, i as StreamReadOptions, n as StreamOpenOptions, o as StreamStore, r as StreamPurgeOptions, t as StreamAppendResult } from "../store-CpheI-lN.js";
|
|
4
4
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
5
5
|
//#region src/streams/postgres.d.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { t as BlockTransport } from "./block-transport-
|
|
2
|
-
import { g as SubscriberPolicy } from "./authorization-hooks-
|
|
1
|
+
import { t as BlockTransport } from "./block-transport-9EUA3q_I.js";
|
|
2
|
+
import { g as SubscriberPolicy } from "./authorization-hooks-BWhkMZfH.js";
|
|
3
3
|
//#region src/core/subject-readers.d.ts
|
|
4
4
|
interface SubjectReadersOptions {
|
|
5
5
|
/** The schema of the `subjects` module. Default `better_supabase`. */
|
|
6
6
|
readonly schema?: string;
|
|
7
|
-
/** The `config.
|
|
7
|
+
/** The `config.subjects` action to check. Default `read`. */
|
|
8
8
|
readonly action?: string;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* The default subscriber policy under an authorization provider: a subscriber
|
|
12
|
-
* gets an event about a subject in `config.
|
|
13
|
-
* says it may `read` the subject (the key in
|
|
12
|
+
* gets an event about a subject in `config.subjects` only when
|
|
13
|
+
* `can_subject_for` says it may `read` the subject (the key in
|
|
14
14
|
* `config.subjects.<type>.permissions`, never a share-link grant). Events
|
|
15
15
|
* without a subject, or about a type the registry doesn't list, keep every
|
|
16
16
|
* subscriber, so the block's own tenant check decides them. `transport` must
|
|
@@ -17,8 +17,8 @@ function parseSubject(subject, types) {
|
|
|
17
17
|
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
18
18
|
/**
|
|
19
19
|
* The default subscriber policy under an authorization provider: a subscriber
|
|
20
|
-
* gets an event about a subject in `config.
|
|
21
|
-
* says it may `read` the subject (the key in
|
|
20
|
+
* gets an event about a subject in `config.subjects` only when
|
|
21
|
+
* `can_subject_for` says it may `read` the subject (the key in
|
|
22
22
|
* `config.subjects.<type>.permissions`, never a share-link grant). Events
|
|
23
23
|
* without a subject, or about a type the registry doesn't list, keep every
|
|
24
24
|
* subscriber, so the block's own tenant check decides them. `transport` must
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
3
|
-
import { $ as RecordRef } from "./types-
|
|
3
|
+
import { $ as RecordRef } from "./types-CPl9uJ0G.js";
|
|
4
4
|
import { n as Logger } from "./logger-DWVYUmwi.js";
|
|
5
|
-
import { n as BlockOptions } from "./block-helpers-
|
|
6
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
5
|
+
import { n as BlockOptions } from "./block-helpers-D5emQ2O6.js";
|
|
6
|
+
import { n as BlockHooks } from "./block-hooks-B8itxzEE.js";
|
|
7
7
|
//#region src/blocks/subjects/my-work-kinds.d.ts
|
|
8
8
|
/** What a `my_work` item waits on. */
|
|
9
9
|
type MyWorkKind = "assigned" | "approval" | "reminder" | "mention" | "sla";
|
|
@@ -19,7 +19,7 @@ interface SubjectsOptions extends BlockOptions {
|
|
|
19
19
|
/** Receives the errors `after` hooks throw. Default: `console`. */
|
|
20
20
|
readonly logger?: Logger;
|
|
21
21
|
}
|
|
22
|
-
/** A subject with its title and path, from `config.
|
|
22
|
+
/** A subject with its title and path, from `config.subjects`. */
|
|
23
23
|
interface ResolvedSubject extends RecordRef {
|
|
24
24
|
/** The `title` column's value, when the type names one. */
|
|
25
25
|
readonly title?: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { t as AsyncResult } from "./result-DZeA5KS6.js";
|
|
3
|
-
import { o as EventHub } from "./events-
|
|
4
|
-
import { r as AuthState } from "./resolve-
|
|
3
|
+
import { o as EventHub } from "./events-B2qbZps6.js";
|
|
4
|
+
import { r as AuthState } from "./resolve-CtX6T0c0.js";
|
|
5
5
|
import { a as ProblemFormat } from "./problem-DNwN8iGz.js";
|
|
6
|
-
import { _ as SupportAuthorize, i as AuthorizationHooks } from "./authorization-hooks-
|
|
7
|
-
import { t as BetterPostgres } from "./pool-
|
|
6
|
+
import { _ as SupportAuthorize, i as AuthorizationHooks } from "./authorization-hooks-BWhkMZfH.js";
|
|
7
|
+
import { t as BetterPostgres } from "./pool-DDR1ndk7.js";
|
|
8
8
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
9
9
|
//#region src/auth/support.d.ts
|
|
10
10
|
type SupportEndedBy = "admin" | "expired" | "revoked";
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { b as DbError } from "../result-DZeA5KS6.js";
|
|
2
|
-
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-
|
|
3
|
-
import { mt as QuerySpec } from "../define-
|
|
4
|
-
import { tt as TemplateValues } from "../bucket-
|
|
5
|
-
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-
|
|
6
|
-
import { t as AuthSnapshot } from "../bind-
|
|
7
|
-
import { t as AuthSession } from "../view-
|
|
8
|
-
import { n as Controller } from "../controller-
|
|
9
|
-
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-
|
|
10
|
-
import { n as BlockOptions } from "../block-env-
|
|
2
|
+
import { Ct as Events, D as BlockEventPattern, T as BlockEvent, bt as EventMap, k as BlockEventsMatching } from "../events-B2qbZps6.js";
|
|
3
|
+
import { mt as QuerySpec } from "../define-D8_9X5fZ.js";
|
|
4
|
+
import { tt as TemplateValues } from "../bucket-SvRQwYS4.js";
|
|
5
|
+
import { g as TopicHandlers, m as Topic, p as SubscriptionStatus, r as PresenceMember, t as EventSchemas } from "../topic-XDdKzlrn.js";
|
|
6
|
+
import { t as AuthSnapshot } from "../bind-DmUGUsBd.js";
|
|
7
|
+
import { t as AuthSession } from "../view-C8_xvD-j.js";
|
|
8
|
+
import { n as Controller } from "../controller-CtwAsnVV.js";
|
|
9
|
+
import { C as LiveCountSource, D as ProfileOf, E as PresenceTopic, O as UseActionOptions, S as LiveCountHookOptions, T as PresenceHookOptions, _ as ActionResultOf, a as DataRows, b as ClaimsOf, c as DataWrites, d as BlockMutationState, f as BlockQueryActions, g as ActionInputOf, h as BlockRefetchOn, i as DataRow, l as BlockEventSource, m as BlockQueryState, n as DataId, o as DataSource, p as BlockQueryOptions, r as DataListArgs, s as DataState, t as fieldErrorsOf, u as BlockMutationActions, v as ActionState, w as LiveQueryHookOptions, x as ClientLike, y as BroadcastOptions } from "../field-errors-DkzFduux.js";
|
|
10
|
+
import { n as BlockOptions } from "../block-env-DWtZsqhH.js";
|
|
11
11
|
import { n as BlockDataOf, r as BlockMethodName, t as BlockArgsOf } from "../block-method-CiVa2G-J.js";
|
|
12
12
|
import { SupabaseClient } from "@supabase/supabase-js";
|
|
13
13
|
import { QueryClient } from "@tanstack/query-core";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { O as AnyFunctions, k as AnyModels } from "../types-
|
|
1
|
+
import { O as AnyFunctions, k as AnyModels } from "../types-CPl9uJ0G.js";
|
|
2
2
|
import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
|
|
3
|
-
import { t as BetterSupabase } from "../define-
|
|
4
|
-
import { n as BetterServer } from "../server-types-
|
|
5
|
-
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-
|
|
6
|
-
import { t as RefusalRedirects } from "../refusal-
|
|
7
|
-
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-
|
|
3
|
+
import { t as BetterSupabase } from "../define-D8_9X5fZ.js";
|
|
4
|
+
import { n as BetterServer } from "../server-types-BkTIxW_H.js";
|
|
5
|
+
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-B8yWCRN7.js";
|
|
6
|
+
import { t as RefusalRedirects } from "../refusal-B0VmlAxF.js";
|
|
7
|
+
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-DVYTtQXA.js";
|
|
8
8
|
import { t as Validated } from "../shared-CRRfQAKG.js";
|
|
9
|
-
import { i as tagFor } from "../tags-
|
|
9
|
+
import { i as tagFor } from "../tags-Cm48BsOa.js";
|
|
10
10
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
11
11
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
12
12
|
//#region src/bridges/sveltekit.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as CacheTarget, Qt as CacheAdapter } from "./define-
|
|
1
|
+
import { $t as CacheTarget, Qt as CacheAdapter } from "./define-D8_9X5fZ.js";
|
|
2
2
|
//#region src/core/tags.d.ts
|
|
3
3
|
interface TagOptions {
|
|
4
4
|
/** The tenant the read is scoped to; `"*"` is every tenant's reads. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as AnyFunctions, k as AnyModels, ut as TableKey } from "../types-
|
|
2
|
-
import { t as BetterSupabase, y as Db } from "../define-
|
|
3
|
-
import { n as DataEngine } from "../data-engine-
|
|
1
|
+
import { O as AnyFunctions, k as AnyModels, ut as TableKey } from "../types-CPl9uJ0G.js";
|
|
2
|
+
import { t as BetterSupabase, y as Db } from "../define-D8_9X5fZ.js";
|
|
3
|
+
import { n as DataEngine } from "../data-engine-rvbR2C4F.js";
|
|
4
4
|
import { t as BetterQueryMeta } from "../invalidate-DMp4eqfF.js";
|
|
5
5
|
import { QueryClient, SkipToken } from "@tanstack/query-core";
|
|
6
6
|
//#region src/tanstack-db/collection.d.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { O as AnyFunctions, k as AnyModels } from "../types-
|
|
1
|
+
import { O as AnyFunctions, k as AnyModels } from "../types-CPl9uJ0G.js";
|
|
2
2
|
import { l as PermissionRef, t as AnyAuthorizer } from "../authorizer-B6X09otb.js";
|
|
3
|
-
import { t as BetterSupabase } from "../define-
|
|
4
|
-
import { n as BetterServer } from "../server-types-
|
|
5
|
-
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-
|
|
6
|
-
import { t as RefusalRedirects } from "../refusal-
|
|
7
|
-
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-
|
|
3
|
+
import { t as BetterSupabase } from "../define-D8_9X5fZ.js";
|
|
4
|
+
import { n as BetterServer } from "../server-types-BkTIxW_H.js";
|
|
5
|
+
import { a as AuthorizedContext, c as ResourceLoaderContext, i as AuthorizeOptions, l as Unwrapped, n as ActionParsed, o as BlockActionOptions, r as ActionResult, s as BlockRequireOptions } from "../kit-B8yWCRN7.js";
|
|
6
|
+
import { t as RefusalRedirects } from "../refusal-B0VmlAxF.js";
|
|
7
|
+
import { n as FrameworkOptions, r as LocalsResource, t as FrameworkLocals } from "../framework-DVYTtQXA.js";
|
|
8
8
|
import { t as Validated } from "../shared-CRRfQAKG.js";
|
|
9
9
|
import { AnyEntry, Contributions } from "@supabase/middleware";
|
|
10
10
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as AuthSnapshot } from "./bind-
|
|
2
|
-
import { t as AuthSession } from "./view-
|
|
1
|
+
import { t as AuthSnapshot } from "./bind-DmUGUsBd.js";
|
|
2
|
+
import { t as AuthSession } from "./view-C8_xvD-j.js";
|
|
3
3
|
//#region src/auth/tenant.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* The active tenant of a user session: the `claim` claim (`tenant_id` by
|