better-supabase 0.40.0 → 0.42.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-BwUHtvD6.d.ts → agents-BAiLeoR-.d.ts} +3 -3
- package/dist/{ai-cache-CPOP2PYz.d.ts → ai-cache-B94R1da7.d.ts} +3 -3
- package/dist/{ai-chat-BZhfCHHr.d.ts → ai-chat-rQ7Ftq9W.d.ts} +3 -3
- package/dist/{ai-schedules-ChJkI2jo.d.ts → ai-schedules-DIiPmFgn.d.ts} +4 -4
- 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 +1 -1
- package/dist/ai-sdk/memory/index.d.ts +3 -3
- package/dist/ai-sdk/workflow/index.d.ts +3 -3
- package/dist/{api-keys-BncNDlWG.d.ts → api-keys-U3JQ8IlM.d.ts} +2 -2
- package/dist/{app-tables-jaQmdgAM.d.ts → app-tables-DGgCgRwq.d.ts} +1 -1
- package/dist/{approvals-CXW3yFWZ.d.ts → approvals-CYbTzQ7v.d.ts} +112 -13
- package/dist/{approvals-D8gR1R8R.js → approvals-cyL5CmU7.js} +49 -19
- package/dist/{assistant-5heV2GeR.d.ts → assistant-B1p5mYaM.d.ts} +2 -2
- package/dist/{authorization-Ul_ApMYW.d.ts → authorization-CcvJbvr1.d.ts} +62 -8
- package/dist/{automations-D4QTP8nI.js → automations-CJhRmPmq.js} +3 -1
- package/dist/{bind-B2GlypM6.d.ts → bind-B71jMEGG.d.ts} +4 -4
- package/dist/{block-env-Bcr-jEA1.d.ts → block-env-DzYTC9d1.d.ts} +4 -4
- package/dist/{block-helpers-BNtM1tqy.d.ts → block-helpers-Sj-efEhC.d.ts} +15 -1
- package/dist/{block-hooks-CtMsgLQr.d.ts → block-hooks-VW4knarE.d.ts} +1 -1
- package/dist/{block-subjects-BumEsEYb.js → block-subjects-a_ECM9o0.js} +1 -1
- package/dist/{block-tables-nkIjJ1ly.d.ts → block-tables-B92SBFqM.d.ts} +1 -1
- package/dist/blocks/access-requests/index.d.ts +3 -3
- package/dist/blocks/activities/index.d.ts +6 -6
- package/dist/blocks/agents/index.d.ts +2 -2
- package/dist/blocks/ai-cache/index.d.ts +2 -2
- package/dist/blocks/ai-chat/index.d.ts +6 -6
- package/dist/blocks/ai-files/index.d.ts +2 -2
- package/dist/blocks/ai-keys/index.d.ts +2 -2
- package/dist/blocks/ai-schedules/index.d.ts +2 -2
- package/dist/blocks/announcements/index.d.ts +6 -6
- package/dist/blocks/api-keys/index.d.ts +2 -2
- package/dist/blocks/approvals/index.d.ts +4 -3
- package/dist/blocks/approvals/index.js +3 -2
- package/dist/blocks/assets/index.d.ts +3 -3
- package/dist/blocks/assignment/index.d.ts +3 -3
- package/dist/blocks/attachments/index.d.ts +2 -2
- package/dist/blocks/audit/index.d.ts +6 -6
- package/dist/blocks/automations/index.d.ts +6 -6
- package/dist/blocks/billable-time/index.d.ts +3 -3
- package/dist/blocks/billing/index.d.ts +4 -4
- package/dist/blocks/bookings/index.d.ts +3 -3
- package/dist/blocks/bulk/index.d.ts +2 -2
- package/dist/blocks/calendar/index.d.ts +3 -3
- package/dist/blocks/catalog/index.d.ts +3 -3
- package/dist/blocks/channels/index.d.ts +3 -3
- package/dist/blocks/collections/index.d.ts +3 -3
- package/dist/blocks/comments/index.d.ts +8 -8
- package/dist/blocks/compliance/index.d.ts +3 -3
- package/dist/blocks/connectors/index.d.ts +2 -2
- package/dist/blocks/contacts/index.d.ts +3 -3
- package/dist/blocks/content/index.d.ts +3 -3
- package/dist/blocks/contracts/index.d.ts +3 -3
- package/dist/blocks/courses/index.d.ts +3 -3
- package/dist/blocks/created-by/index.d.ts +1 -1
- package/dist/blocks/custom-fields/index.d.ts +3 -3
- package/dist/blocks/data-lifecycle/index.d.ts +4 -4
- package/dist/blocks/deals/index.d.ts +3 -3
- package/dist/blocks/dispatch/index.d.ts +3 -3
- package/dist/blocks/documents/index.d.ts +2 -2
- package/dist/blocks/domains/index.d.ts +4 -4
- package/dist/blocks/donations/index.d.ts +3 -3
- package/dist/blocks/drive/index.d.ts +4 -4
- package/dist/blocks/employees/index.d.ts +4 -4
- package/dist/blocks/enrichment/index.d.ts +3 -3
- package/dist/blocks/enrollments/index.d.ts +3 -3
- package/dist/blocks/entitlements/index.d.ts +4 -4
- package/dist/blocks/expenses/index.d.ts +7 -3
- package/dist/blocks/expenses/index.js +5 -3
- package/dist/blocks/field-history/index.d.ts +3 -3
- package/dist/blocks/flags/index.d.ts +3 -3
- package/dist/blocks/forecasts/index.d.ts +3 -3
- package/dist/blocks/forms/index.d.ts +4 -4
- package/dist/blocks/goals/index.d.ts +3 -3
- package/dist/blocks/guests/index.d.ts +3 -3
- package/dist/blocks/hiring/index.d.ts +3 -3
- package/dist/blocks/identities/index.d.ts +3 -3
- package/dist/blocks/imports/index.d.ts +2 -2
- package/dist/blocks/inbox/index.d.ts +8 -8
- package/dist/blocks/incidents/index.d.ts +3 -3
- package/dist/blocks/index.d.ts +4 -4
- package/dist/blocks/inventory/index.d.ts +4 -4
- package/dist/blocks/invoices/index.d.ts +21 -8
- package/dist/blocks/invoices/index.js +20 -10
- package/dist/blocks/knowledge/index.d.ts +2 -2
- package/dist/blocks/lead-scoring/index.d.ts +4 -4
- package/dist/blocks/leases/index.d.ts +3 -3
- package/dist/blocks/leave/index.d.ts +5 -3
- package/dist/blocks/leave/index.js +3 -2
- package/dist/blocks/ledger/index.d.ts +3 -3
- package/dist/blocks/mail-sync/index.d.ts +2 -2
- package/dist/blocks/memberships/index.d.ts +1 -1
- package/dist/blocks/memory/index.d.ts +3 -3
- package/dist/blocks/messaging/index.d.ts +7 -7
- package/dist/blocks/metrics/index.d.ts +4 -4
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +3 -3
- package/dist/blocks/notifications/index.d.ts +6 -6
- package/dist/blocks/numbering/index.d.ts +2 -2
- package/dist/blocks/oauth-server/index.d.ts +3 -3
- package/dist/blocks/onboarding/index.d.ts +4 -4
- package/dist/blocks/orders/index.d.ts +5 -5
- package/dist/blocks/organizations/index.d.ts +5 -5
- package/dist/blocks/outbox/index.d.ts +2 -2
- package/dist/blocks/passes/index.d.ts +5 -5
- package/dist/blocks/permissions/index.d.ts +5 -5
- package/dist/blocks/pipelines/index.d.ts +3 -3
- package/dist/blocks/posts/index.d.ts +3 -3
- package/dist/blocks/profiles/index.d.ts +3 -3
- package/dist/blocks/promotions/index.d.ts +3 -3
- package/dist/blocks/push/index.d.ts +4 -4
- package/dist/blocks/queue/index.d.ts +4 -4
- package/dist/blocks/quotes/index.d.ts +57 -12
- package/dist/blocks/quotes/index.js +35 -7
- package/dist/blocks/rank/index.d.ts +4 -4
- package/dist/blocks/reactions/index.d.ts +6 -6
- package/dist/blocks/relations/index.d.ts +4 -4
- package/dist/blocks/reminders/index.d.ts +4 -4
- package/dist/blocks/reviews/index.d.ts +3 -3
- package/dist/blocks/saved-views/index.d.ts +3 -3
- package/dist/blocks/scores/index.d.ts +3 -3
- package/dist/blocks/search/index.d.ts +5 -5
- package/dist/blocks/security-events/index.d.ts +4 -4
- package/dist/blocks/segments/index.d.ts +3 -3
- package/dist/blocks/sequences/index.d.ts +3 -3
- package/dist/blocks/service-accounts/index.d.ts +3 -3
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/settings/index.d.ts +4 -4
- package/dist/blocks/share-links/index.d.ts +3 -3
- package/dist/blocks/shipments/index.d.ts +3 -3
- package/dist/blocks/signatures/index.d.ts +3 -3
- package/dist/blocks/signing-keys/index.d.ts +2 -2
- package/dist/blocks/sla/index.d.ts +3 -3
- package/dist/blocks/sso/index.d.ts +4 -4
- package/dist/blocks/state-machine/index.d.ts +3 -14
- package/dist/blocks/subjects/index.d.ts +3 -3
- package/dist/blocks/tags/index.d.ts +4 -4
- package/dist/blocks/tasks/index.d.ts +5 -5
- package/dist/blocks/teams/index.d.ts +3 -3
- package/dist/blocks/templates/index.d.ts +6 -6
- package/dist/blocks/time-tracking/index.d.ts +3 -3
- package/dist/blocks/timeline/index.d.ts +3 -3
- package/dist/blocks/trash/index.d.ts +3 -3
- package/dist/blocks/undo/index.d.ts +3 -3
- package/dist/blocks/updated-at/index.d.ts +1 -1
- package/dist/blocks/usage/index.d.ts +3 -3
- package/dist/blocks/vercel-marketplace/index.d.ts +3 -3
- package/dist/blocks/versions/index.d.ts +3 -3
- package/dist/blocks/waitlist/index.d.ts +3 -3
- package/dist/blocks/webhooks/index.d.ts +5 -5
- package/dist/blocks/workflow-editor/index.d.ts +7 -7
- package/dist/blocks/workflows/index.d.ts +5 -5
- package/dist/{bookings-Dj5cvXKv.d.ts → bookings-CHUzFwOI.d.ts} +3 -3
- package/dist/chat-sdk/index.d.ts +3 -3
- package/dist/claims/index.d.ts +4 -4
- package/dist/cli/add-BbhRYaFe.js +1 -0
- package/dist/cli/{add-BVs8Ym-K.js → add-NosuEQn1.js} +10 -10
- package/dist/cli/{add-DP1ct-7e.js → add-U0pyhIyx.js} +2 -2
- package/dist/cli/{app-table-files-gjMyFqH4.js → app-table-files-DUi898lB.js} +2 -2
- package/dist/cli/{app-tables-B26PHK75.js → app-tables-BINtREbx.js} +2 -2
- package/dist/cli/{backfill-CP_LpTK2.js → backfill-VfqI5GqN.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-Ewp49Kbm.js → blocks-Bo2Lw2UO.js} +1 -1
- package/dist/cli/{blocks-CpBLp57s.js → blocks-DsEaPf6J.js} +1 -1
- package/dist/cli/{cache-BxxtUXVN.js → cache-CNJD8OdR.js} +1 -1
- package/dist/cli/{codemod-CGCxMEyD.js → codemod-BWa3Bte6.js} +1 -1
- package/dist/cli/{content-mapper-DngBJv4r.js → content-mapper-Dl50Ny6a.js} +2 -2
- package/dist/cli/{doctor-3dcMraMn.js → doctor-B9GtOGSa.js} +15 -15
- package/dist/cli/{gen-DrXxFwUU.js → gen-CIUD1sgB.js} +11 -11
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{init-bVKQ4Onb.js → init-wl5jk5vX.js} +8 -8
- package/dist/cli/{live-CHTbAqdS.js → live-B0f_X3rI.js} +2 -2
- package/dist/cli/{mcp-BbmhntrR.js → mcp-CZWaBkXY.js} +2 -2
- package/dist/cli/{metadata-BS56R_eb.js → metadata-Bi5eQP4w.js} +3 -3
- package/dist/cli/{migrate-DV6a9-jI.js → migrate-DMITLPEu.js} +1 -1
- package/dist/cli/{migration-safety-Ce9IQwmJ.js → migration-safety-2n8e8njJ.js} +1 -1
- package/dist/cli/{migrations-CCCnMhmM.js → migrations-C5k9hNOo.js} +2 -2
- package/dist/cli/{module-migration-C0cAzpNa.js → module-migration-BFchEhAJ.js} +2 -2
- package/dist/cli/{powersync-OIIpG-y_.js → powersync-DViexv6m.js} +3 -3
- package/dist/cli/powersync-i7KJcTtM.js +1 -0
- package/dist/cli/{print-BGF3d6O2.js → print-ChX1vQhO.js} +2 -2
- package/dist/cli/{providers-fEzlYSLs.js → providers-lwK2lplZ.js} +1 -1
- package/dist/cli/{prune-workflows-Bx7J5T3a.js → prune-workflows-DO3nRZFF.js} +1 -1
- package/dist/cli/{remove-Ds4N6WvD.js → remove-WB9dFyNn.js} +5 -5
- package/dist/cli/{render-BeZToAp-.js → render-B0MMWWZE.js} +3 -3
- package/dist/cli/{run-iUmtksq5.js → run-CMvwtBX9.js} +27 -27
- package/dist/cli/{run-DR0sTyNQ.js → run-CmJbNG2-.js} +9 -9
- package/dist/cli/{shared-BCWYvKeR.js → shared-BL5kcRdz.js} +1 -1
- package/dist/cli/{snapshot-CfgRxTQq.js → snapshot-CVB9Ri2a.js} +2 -2
- package/dist/cli/{source-Ct3ZCy6p.js → source-COGgsYiV.js} +1 -1
- package/dist/cli/{spec-1eEq2P4T.js → spec-002zD_9Z.js} +1 -1
- package/dist/cli/{spec-9vb-or-k.js → spec-CH6Qd2LE.js} +2 -2
- package/dist/cli/{sql-layout-cYsnyjRf.js → sql-layout-jZOzCj-S.js} +2 -2
- package/dist/cli/{sync-XpcpINnx.js → sync-I4x-1aVx.js} +4 -4
- package/dist/cli/{upgrade-A18FY5Iy.js → upgrade-BRp5AxAY.js} +2 -2
- package/dist/cli/{upgrade-DXhyb2jV.js → upgrade-C60BZggI.js} +5 -5
- package/dist/cli/{version-PcwPOm4G.js → version-CRCAxS2s.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/native/index.d.ts +4 -4
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +4 -4
- package/dist/{config-qqAfS_1_.js → config-2SwAe0Im.js} +3 -3
- package/dist/{config-BRGMUEE2.js → config-BND2PFGs.js} +1 -1
- package/dist/{connectors-DDsdz-cn.d.ts → connectors-OMJkoAP6.d.ts} +2 -2
- package/dist/{context-dHluCmud.d.ts → context-DXWyPNzr.d.ts} +4 -2
- package/dist/contract/index.d.ts +4 -4
- package/dist/{controller-BQXgMwWN.d.ts → controller-D3MPVovD.d.ts} +1 -1
- package/dist/{conversion-CLBBITW5.d.ts → conversion-BShzA-u-.d.ts} +1 -1
- package/dist/create/index.d.ts +3 -3
- package/dist/create/index.js +3 -3
- package/dist/create/lite/index.d.ts +3 -3
- package/dist/create/lite/index.js +2 -2
- package/dist/{define-block-CDw9YGVh.d.ts → define-block-DBD7yhQg.d.ts} +5 -5
- package/dist/{documents-Btk0MhC0.d.ts → documents-CNVPrE_0.d.ts} +2 -2
- package/dist/{embeddings-CI6P_mtD.d.ts → embeddings-C2PBJ2Lx.d.ts} +1 -1
- package/dist/{entitlements-Jh_w-PgX.d.ts → entitlements-CljrSoWD.d.ts} +1 -1
- package/dist/eve/index.d.ts +5 -5
- package/dist/eve/index.js +1 -1
- package/dist/{eve-DleYrhwj.d.ts → eve-CtQd4iaO.d.ts} +2 -2
- package/dist/{executor-uNDJBzT8.d.ts → executor-DL7cZ-3T.d.ts} +1 -1
- package/dist/{field-errors-DIDkgzFA.d.ts → field-errors-C4NOUBpu.d.ts} +6 -6
- package/dist/{flags-Cuew4tGx.d.ts → flags-BrXfCmGB.d.ts} +1 -1
- package/dist/flags-sdk/index.d.ts +1 -1
- package/dist/{gateway-B9k89AC4.d.ts → gateway-DJX-XUWl.d.ts} +3 -3
- package/dist/{inbox-yGfUVQr2.d.ts → inbox-DiQ8KhG8.d.ts} +4 -4
- package/dist/{index-DAS_5OfK.d.ts → index-1_-lg9Gc.d.ts} +1 -1
- package/dist/{index-DhcLJAtX.d.ts → index-Bjj-GNhd.d.ts} +1 -1
- package/dist/{index-y70eTezB.d.ts → index-BrGOE0c2.d.ts} +2 -2
- package/dist/{index-g_eFnFqo.d.ts → index-CUxdZYSi.d.ts} +2 -2
- package/dist/{index-xmb6YGTg.d.ts → index-D5qW2cRD.d.ts} +2 -2
- package/dist/{index-CpZ4WDDJ.d.ts → index-DWVDKVYA.d.ts} +1 -1
- package/dist/{index-IrJQqPeQ.d.ts → index-DhHtsi-q.d.ts} +3 -3
- package/dist/{index-BKz-E3Mv.d.ts → index-DmSDAFkF.d.ts} +8 -8
- package/dist/{instances-DqEZrffE.js → instances-DwrdFwKq.js} +10 -1
- package/dist/{knowledge-DWXAxvkN.d.ts → knowledge-DtECa_QW.d.ts} +4 -4
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +1 -1
- package/dist/{messaging-Bfe4p9Pm.d.ts → messaging-CpQIhkFi.d.ts} +2 -2
- package/dist/next/index.d.ts +7 -7
- package/dist/{operations-Sza7UQKP.d.ts → operations-DFmuxaxW.d.ts} +1 -1
- package/dist/{options-zsLpIqBA.js → options-B1oSaIZ4.js} +2 -1
- package/dist/{options-CYZH9uxU.js → options-BXiUftgG.js} +3 -1
- package/dist/{options-Bgnm4pTD.js → options-DLJTiX29.js} +6 -1
- package/dist/otel/index.js +4 -4
- package/dist/{outbox-DikdzUKf.d.ts → outbox-Cpxpzcue.d.ts} +2 -2
- package/dist/{permissions-COamTJYz.d.ts → permissions-Bsd4mEEZ.d.ts} +1 -1
- package/dist/{ports-1M1E_r2n.d.ts → ports-BKdt_9Oe.d.ts} +1 -1
- package/dist/powersync/index.d.ts +2 -2
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +3 -3
- package/dist/{preset-Byz43PrL.js → preset-CenE7f1G.js} +2 -2
- package/dist/{project-Y2wW_nr_.js → project-Ceh2yTSv.js} +5 -5
- package/dist/{push-token-DKImhAca.d.ts → push-token-DRcEl9Ce.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/react/index.d.ts +5 -5
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +5 -5
- package/dist/realtime/index.d.ts +3 -3
- package/dist/{record-form-C-gIxGXe.d.ts → record-form-C-1TPtMG.d.ts} +1 -1
- package/dist/{recordings-Bw5LoocX.d.ts → recordings-BVuri85k.d.ts} +1 -1
- package/dist/records/index.d.ts +8 -8
- package/dist/{sandboxes-BF9RxxCU.d.ts → sandboxes-DKgJZYUZ.d.ts} +1 -1
- package/dist/{scores-Ce8MxQX9.d.ts → scores-BXuSVczw.d.ts} +2 -2
- package/dist/server/index.d.ts +4 -4
- package/dist/{signers-Dw9DBZjJ.d.ts → signers-UANxMfH-.d.ts} +2 -2
- package/dist/{signing-keys-FglIQ6iL.d.ts → signing-keys-DhBSWFy_.d.ts} +2 -2
- package/dist/solid/index.d.ts +5 -5
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +3 -3
- package/dist/{sql-B1FA8jTx.js → sql-BIniB45X.js} +1558 -502
- package/dist/{sso-B7w7h8RJ.d.ts → sso-Frh3sbJ1.d.ts} +2 -2
- package/dist/ssr/index.d.ts +1 -1
- package/dist/{subjects-CVjAE7nz.d.ts → subjects-DNFE2rMl.d.ts} +2 -2
- package/dist/svelte/index.d.ts +5 -5
- package/dist/{tenant-DflHpV32.d.ts → tenant--Hm8mlPy.d.ts} +1 -1
- package/dist/testing/index.d.ts +13 -13
- package/dist/testing/index.js +1 -1
- package/dist/{timeline-c6I3uxya.d.ts → timeline-BB9fKT_r.d.ts} +2 -2
- package/dist/{topic-CekU96q7.d.ts → topic-BYF-GTW9.d.ts} +1 -1
- package/dist/{types-B42S7qfO.d.ts → types-B8h0reJ4.d.ts} +2 -2
- package/dist/{types-DtiDatvu.d.ts → types-D--4dv5K.d.ts} +3 -3
- package/dist/{types-BXLiM6VM.d.ts → types-DCzgSAlU.d.ts} +2 -2
- package/dist/{types-6PMaLIyw.d.ts → types-DU_nNO7U.d.ts} +2 -2
- package/dist/{types-BdhE7I8Z.d.ts → types-LLCyr-xs.d.ts} +2 -2
- package/dist/{types-D5uf0l4_.d.ts → types-kq8S5HVE.d.ts} +1 -1
- package/dist/{types-C7K8mu9B.d.ts → types-z31g0-5T.d.ts} +3 -3
- package/dist/{undo-CdKp5_2X.d.ts → undo-BCQMqIQN.d.ts} +1 -1
- package/dist/{usage-DZ8j5Tm_.d.ts → usage-CJDj5j15.d.ts} +3 -3
- package/dist/vercel-sandbox/index.d.ts +1 -1
- package/dist/vue/index.d.ts +5 -5
- package/dist/{watch-topic-DBw411Mq.d.ts → watch-topic-tfTxgEGc.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.js +1 -1
- package/dist/{workflow-sdk-6psRpDIo.js → workflow-sdk-Bps7tpOv.js} +26 -1
- package/dist/{workflow-sdk-CUt0E4v6.d.ts → workflow-sdk-DzKQo265.d.ts} +2 -2
- package/dist/{workflows-BI4yKqFh.d.ts → workflows-D7HvWeNu.d.ts} +2 -2
- package/dist/yjs/index.d.ts +2 -2
- package/package.json +1 -1
- package/schemas/config-v1.json +42 -1
- package/dist/cli/add-DrwQvDYD.js +0 -1
- package/dist/cli/powersync-Cxd3a_v_.js +0 -1
|
@@ -3,10 +3,10 @@ import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "./standard-DRX6Ch1j.js";
|
|
4
4
|
import { r as FieldsOf } from "./block-fields-Puv5m5D3.js";
|
|
5
5
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
6
|
-
import { r as BlockTemporalOptions } from "./block-helpers-
|
|
6
|
+
import { r as BlockTemporalOptions } from "./block-helpers-Sj-efEhC.js";
|
|
7
7
|
import { t as BlockTransport } from "./block-transport-CDmOUuLZ.js";
|
|
8
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
9
|
-
import { u as KnowledgeScope } from "./knowledge-
|
|
8
|
+
import { n as BlockHooks } from "./block-hooks-VW4knarE.js";
|
|
9
|
+
import { u as KnowledgeScope } from "./knowledge-DtECa_QW.js";
|
|
10
10
|
type AgentVisibility = "private" | "organization" | "public";
|
|
11
11
|
/** A knowledge scope an agent searches: its own (`agent`) or another one. */
|
|
12
12
|
interface AgentKnowledgeScope {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
3
3
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
4
|
-
import { r as BlockTemporalOptions } from "./block-helpers-
|
|
4
|
+
import { r as BlockTemporalOptions } from "./block-helpers-Sj-efEhC.js";
|
|
5
5
|
import { t as BlockTransport } from "./block-transport-CDmOUuLZ.js";
|
|
6
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
7
|
-
import { _ as JobHandler } from "./types-
|
|
6
|
+
import { n as BlockHooks } from "./block-hooks-VW4knarE.js";
|
|
7
|
+
import { _ as JobHandler } from "./types-LLCyr-xs.js";
|
|
8
8
|
/**
|
|
9
9
|
* What an entry caches: a whole generation, a replayable stream, embeddings, or
|
|
10
10
|
* anything else.
|
|
@@ -3,12 +3,12 @@ import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "./standard-DRX6Ch1j.js";
|
|
4
4
|
import { r as FieldsOf } from "./block-fields-Puv5m5D3.js";
|
|
5
5
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
6
|
-
import { r as BlockTemporalOptions } from "./block-helpers-
|
|
6
|
+
import { r as BlockTemporalOptions } from "./block-helpers-Sj-efEhC.js";
|
|
7
7
|
import { t as BlockTransport } from "./block-transport-CDmOUuLZ.js";
|
|
8
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
8
|
+
import { n as BlockHooks } from "./block-hooks-VW4knarE.js";
|
|
9
9
|
import { i as AiMessage, s as AiMessageRole } from "./message-Cc4bkdNw.js";
|
|
10
10
|
import { n as FinalRunState, r as RunState } from "./run-state-D0Tbl-nM.js";
|
|
11
|
-
import { i as AiSandboxes } from "./sandboxes-
|
|
11
|
+
import { i as AiSandboxes } from "./sandboxes-DKgJZYUZ.js";
|
|
12
12
|
/** Where a run is: written by `runs.claim`, `release` and `stop`. */
|
|
13
13
|
type AiRunState = Exclude<RunState, "waiting">;
|
|
14
14
|
/** One generation of a chat, as `ai_runs` stores it. */
|
|
@@ -3,12 +3,12 @@ import { T as ErrorMapper, t as AsyncResult } from "./result-DTOQRyGY.js";
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "./standard-DRX6Ch1j.js";
|
|
4
4
|
import { r as FieldsOf } from "./block-fields-Puv5m5D3.js";
|
|
5
5
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
6
|
-
import { r as BlockTemporalOptions } from "./block-helpers-
|
|
6
|
+
import { r as BlockTemporalOptions } from "./block-helpers-Sj-efEhC.js";
|
|
7
7
|
import { t as BlockTransport } from "./block-transport-CDmOUuLZ.js";
|
|
8
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
9
|
-
import { _ as JobHandler } from "./types-
|
|
8
|
+
import { n as BlockHooks } from "./block-hooks-VW4knarE.js";
|
|
9
|
+
import { _ as JobHandler } from "./types-LLCyr-xs.js";
|
|
10
10
|
import { r as RunState } from "./run-state-D0Tbl-nM.js";
|
|
11
|
-
import { I as Notifier } from "./define-block-
|
|
11
|
+
import { I as Notifier } from "./define-block-DBD7yhQg.js";
|
|
12
12
|
/** A task run's state, in the words ai-chat and workflow runs share. */
|
|
13
13
|
type AiTaskRunStatus = Extract<RunState, "queued" | "running" | "completed" | "failed">;
|
|
14
14
|
interface AiTaskRun {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as SessionActor, c as agentClaims, r as AgentActOptions } from "../../actor-DseNR02I.js";
|
|
2
|
-
import { d as KnowledgeSearchOptions, o as KnowledgeHit, r as Knowledge } from "../../knowledge-
|
|
3
|
-
import { t as Agent } from "../../agents-
|
|
4
|
-
import { R as AiToolPolicy, t as AiChat, w as AiModerationStage, x as AiModerationAction } from "../../ai-chat-
|
|
5
|
-
import { r as AuthorizationOperation } from "../../authorization-
|
|
6
|
-
import { t as OperationTable } from "../../operations-
|
|
7
|
-
import { i as SearchToolOptions, r as ResultsFilter } from "../../embeddings-
|
|
2
|
+
import { d as KnowledgeSearchOptions, o as KnowledgeHit, r as Knowledge } from "../../knowledge-DtECa_QW.js";
|
|
3
|
+
import { t as Agent } from "../../agents-BAiLeoR-.js";
|
|
4
|
+
import { R as AiToolPolicy, t as AiChat, w as AiModerationStage, x as AiModerationAction } from "../../ai-chat-rQ7Ftq9W.js";
|
|
5
|
+
import { r as AuthorizationOperation } from "../../authorization-CcvJbvr1.js";
|
|
6
|
+
import { t as OperationTable } from "../../operations-DFmuxaxW.js";
|
|
7
|
+
import { i as SearchToolOptions, r as ResultsFilter } from "../../embeddings-C2PBJ2Lx.js";
|
|
8
8
|
import { n as GatewayOptions } from "../../gateway-options-Mut8jih_.js";
|
|
9
9
|
import { LanguageModel, LanguageModelMiddleware, StopCondition, ToolLoopAgent, ToolLoopAgentSettings, ToolSet } from "ai";
|
|
10
10
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
2
|
-
import { i as CursorPageOptions } from "../../block-helpers-
|
|
3
|
-
import { _ as JobHandler } from "../../types-
|
|
4
|
-
import { c as AiKeys, i as AiBatchItemInput, r as AiBatchItem, t as AiBatch } from "../../types-
|
|
2
|
+
import { i as CursorPageOptions } from "../../block-helpers-Sj-efEhC.js";
|
|
3
|
+
import { _ as JobHandler } from "../../types-LLCyr-xs.js";
|
|
4
|
+
import { c as AiKeys, i as AiBatchItemInput, r as AiBatchItem, t as AiBatch } from "../../types-DCzgSAlU.js";
|
|
5
5
|
import { Experimental_BatchItemResult, Experimental_BatchProvider, Experimental_BatchReference, Experimental_BatchStatus, Experimental_ListBatchesOptions, Experimental_ListBatchesResult, Experimental_StartBatchOptions, Experimental_StartBatchResult } from "ai";
|
|
6
6
|
/** The AI SDK batch calls, replaceable in tests. */
|
|
7
7
|
interface BatchApi {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as DbError } from "../../result-DTOQRyGY.js";
|
|
2
|
-
import { t as AiCache } from "../../ai-cache-
|
|
2
|
+
import { t as AiCache } from "../../ai-cache-B94R1da7.js";
|
|
3
3
|
import { LanguageModelMiddleware } from "ai";
|
|
4
4
|
type WrapGenerate = NonNullable<LanguageModelMiddleware["wrapGenerate"]>;
|
|
5
5
|
/** The call `cacheMiddleware` derives a key from. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { b as DbError } from "../../result-DTOQRyGY.js";
|
|
2
2
|
import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
|
|
3
3
|
import { n as GatewayOptions } from "../../gateway-options-Mut8jih_.js";
|
|
4
|
-
import { t as AiUsage } from "../../gateway-
|
|
5
|
-
import { a as AssistantModeration, c as AssistantRunArgs, d as AssistantTurn, f as AssistantValidation, i as AssistantMessageMetadata, l as AssistantRunResult, m as createAssistant, n as AssistantContext, o as AssistantOptions, p as assistantMetadata, r as AssistantFinish, s as AssistantRequestBody, t as Assistant, u as AssistantStreamOptions } from "../../assistant-
|
|
4
|
+
import { t as AiUsage } from "../../gateway-DJX-XUWl.js";
|
|
5
|
+
import { a as AssistantModeration, c as AssistantRunArgs, d as AssistantTurn, f as AssistantValidation, i as AssistantMessageMetadata, l as AssistantRunResult, m as createAssistant, n as AssistantContext, o as AssistantOptions, p as assistantMetadata, r as AssistantFinish, s as AssistantRequestBody, t as Assistant, u as AssistantStreamOptions } from "../../assistant-B1p5mYaM.js";
|
|
6
6
|
import { LanguageModelUsage } from "ai";
|
|
7
7
|
/** Who asks, for one generation request. */
|
|
8
8
|
interface GenerationContext {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as Embedder, o as KnowledgeHit } from "../../knowledge-
|
|
2
|
-
import { a as SearchToolResult, c as embedWith, d as searchTool, f as supabaseEmbed, i as SearchToolOptions, l as modelName, n as Reranker, o as SupabaseAiSession, p as toSourceParts, r as ResultsFilter, s as SupabaseEmbedOptions, t as EmbedWithOptions, u as rerankWith } from "../../embeddings-
|
|
1
|
+
import { n as Embedder, o as KnowledgeHit } from "../../knowledge-DtECa_QW.js";
|
|
2
|
+
import { a as SearchToolResult, c as embedWith, d as searchTool, f as supabaseEmbed, i as SearchToolOptions, l as modelName, n as Reranker, o as SupabaseAiSession, p as toSourceParts, r as ResultsFilter, s as SupabaseEmbedOptions, t as EmbedWithOptions, u as rerankWith } from "../../embeddings-C2PBJ2Lx.js";
|
|
3
3
|
export { type EmbedWithOptions, type Embedder, type KnowledgeHit, type Reranker, type ResultsFilter, type SearchToolOptions, type SearchToolResult, type SupabaseAiSession, type SupabaseEmbedOptions, embedWith, modelName, rerankWith, searchTool, supabaseEmbed, toSourceParts };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { b as DbError, t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
3
3
|
import { r as AiFilePart } from "../../message-Cc4bkdNw.js";
|
|
4
|
-
import { c as AiFileSource, f as AiFiles } from "../../types-
|
|
4
|
+
import { c as AiFileSource, f as AiFiles } from "../../types-DU_nNO7U.js";
|
|
5
5
|
import { Experimental_DownloadFunction } from "ai";
|
|
6
6
|
interface AiFileDownloadOptions {
|
|
7
7
|
/**
|
package/dist/ai-sdk/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { b as DbError, t as AsyncResult } from "../result-DTOQRyGY.js";
|
|
3
3
|
import { i as AiMessage } from "../message-Cc4bkdNw.js";
|
|
4
|
-
import { _ as JobHandler } from "../types-
|
|
5
|
-
import { i as AiSandboxes } from "../sandboxes-
|
|
4
|
+
import { _ as JobHandler } from "../types-LLCyr-xs.js";
|
|
5
|
+
import { i as AiSandboxes } from "../sandboxes-DKgJZYUZ.js";
|
|
6
6
|
import { n as GatewayOptions, r as gatewayOptions, t as GatewayContext } from "../gateway-options-Mut8jih_.js";
|
|
7
|
-
import { c as AiKeys, p as ResolvedProviderKey } from "../types-
|
|
8
|
-
import { a as Usage } from "../usage-
|
|
9
|
-
import { a as GatewayClient, c as UsageSource, d as modelInputOf, f as problem429, h as usageQuota, i as CostBackfillPayload, l as costBackfill, m as usageOf, n as AiUsageMeters, o as GatewayModelEntry, p as usageEntries, r as CostBackfillOptions, s as ModelCatalogRefreshOptions, t as AiUsage, u as modelCatalogRefresh } from "../gateway-
|
|
7
|
+
import { c as AiKeys, p as ResolvedProviderKey } from "../types-DCzgSAlU.js";
|
|
8
|
+
import { a as Usage } from "../usage-CJDj5j15.js";
|
|
9
|
+
import { a as GatewayClient, c as UsageSource, d as modelInputOf, f as problem429, h as usageQuota, i as CostBackfillPayload, l as costBackfill, m as usageOf, n as AiUsageMeters, o as GatewayModelEntry, p as usageEntries, r as CostBackfillOptions, s as ModelCatalogRefreshOptions, t as AiUsage, u as modelCatalogRefresh } from "../gateway-DJX-XUWl.js";
|
|
10
10
|
import { i as fromModelMessages, n as ModelApproval, r as ModelSource, t as FromModelMessagesOptions } from "../model-messages-CGSUU450.js";
|
|
11
11
|
import { i as ThreadSummarizer, o as ThreadSummaryInput, s as ThreadSummaryOutput } from "../summaries-CUemsYwV.js";
|
|
12
12
|
import { Experimental_SandboxSession, LanguageModel, Telemetry, Tool, UIMessage, safeValidateUIMessages } from "ai";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as DbError, t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
2
2
|
import { i as CredentialRef, r as CredentialProvider } from "../../provider-CVlXXbda.js";
|
|
3
|
-
import { r as ConnectorServer, s as Connectors } from "../../connectors-
|
|
3
|
+
import { r as ConnectorServer, s as Connectors } from "../../connectors-OMJkoAP6.js";
|
|
4
4
|
import { n as VaultCredentials } from "../../vault-CbhvnoVC.js";
|
|
5
5
|
import { i as SupabaseMcpScope, n as SupabaseMcpModule, t as SupabaseMcpFeature } from "../../supabase-mcp-DY32eoax.js";
|
|
6
6
|
import { ToolSet } from "ai";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as JobHandler } from "../../types-
|
|
2
|
-
import { r as ResultsFilter } from "../../embeddings-
|
|
3
|
-
import { i as MemoryHit, n as MemoryCommand, s as MemoryNamespace, t as Memory } from "../../types-
|
|
1
|
+
import { _ as JobHandler } from "../../types-LLCyr-xs.js";
|
|
2
|
+
import { r as ResultsFilter } from "../../embeddings-C2PBJ2Lx.js";
|
|
3
|
+
import { i as MemoryHit, n as MemoryCommand, s as MemoryNamespace, t as Memory } from "../../types-z31g0-5T.js";
|
|
4
4
|
import { LanguageModel, Tool } from "ai";
|
|
5
5
|
/** The memory tool for any model, with the commands of Anthropic's memory tool. */
|
|
6
6
|
export declare function memoryTool(memory: Memory, organizationId: string, ns?: MemoryNamespace): Tool<MemoryCommand, string>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as AiMessage } from "../../message-Cc4bkdNw.js";
|
|
2
|
-
import { A as AiRunStatus, P as AiStoredMessageStatus, t as AiChat } from "../../ai-chat-
|
|
2
|
+
import { A as AiRunStatus, P as AiStoredMessageStatus, t as AiChat } from "../../ai-chat-rQ7Ftq9W.js";
|
|
3
3
|
import { n as GatewayOptions } from "../../gateway-options-Mut8jih_.js";
|
|
4
4
|
import { o as StreamStore } from "../../store-c7QxUHX-.js";
|
|
5
|
-
import { i as CostBackfillPayload, t as AiUsage } from "../../gateway-
|
|
6
|
-
import { n as AssistantContext, t as Assistant } from "../../assistant-
|
|
5
|
+
import { i as CostBackfillPayload, t as AiUsage } from "../../gateway-DJX-XUWl.js";
|
|
6
|
+
import { n as AssistantContext, t as Assistant } from "../../assistant-B1p5mYaM.js";
|
|
7
7
|
import { r as ModelSource } from "../../model-messages-CGSUU450.js";
|
|
8
8
|
import { LanguageModelUsage, ModelMessage } from "ai";
|
|
9
9
|
import { ModelCallStreamPart } from "@ai-sdk/workflow";
|
|
@@ -4,9 +4,9 @@ import { t as StandardSchemaV1 } from "./standard-DRX6Ch1j.js";
|
|
|
4
4
|
import { r as FieldsOf } from "./block-fields-Puv5m5D3.js";
|
|
5
5
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
6
6
|
import { n as AuthResolver } from "./resolve-XlMQRUeG.js";
|
|
7
|
-
import { r as BlockTemporalOptions } from "./block-helpers-
|
|
7
|
+
import { r as BlockTemporalOptions } from "./block-helpers-Sj-efEhC.js";
|
|
8
8
|
import { t as BlockTransport } from "./block-transport-CDmOUuLZ.js";
|
|
9
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
9
|
+
import { n as BlockHooks } from "./block-hooks-VW4knarE.js";
|
|
10
10
|
import { JWTClaims } from "@supabase/server";
|
|
11
11
|
type ApiKeyState = "active" | "grace" | "revoked" | "expired";
|
|
12
12
|
interface ApiKey {
|
|
@@ -4,9 +4,9 @@ import { t as StandardSchemaV1 } from "./standard-DRX6Ch1j.js";
|
|
|
4
4
|
import { r as FieldsOf } from "./block-fields-Puv5m5D3.js";
|
|
5
5
|
import { et as RecordRef } from "./types-BzIYSSWK.js";
|
|
6
6
|
import { n as Logger } from "./logger-0LfhvwE4.js";
|
|
7
|
-
import {
|
|
7
|
+
import { o as BlockTenantOptions, r as BlockTemporalOptions } from "./block-helpers-Sj-efEhC.js";
|
|
8
8
|
import { t as BlockTransport } from "./block-transport-CDmOUuLZ.js";
|
|
9
|
-
import { n as BlockHooks } from "./block-hooks-
|
|
9
|
+
import { n as BlockHooks } from "./block-hooks-VW4knarE.js";
|
|
10
10
|
import { h as FilterQuery } from "./filter-query-Xj40B5KT.js";
|
|
11
11
|
import { i as AuthorizationHooks, n as Approver } from "./authorization-hooks-CR8TVvqo.js";
|
|
12
12
|
interface ApprovalsOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions, BlockTenantOptions {
|
|
@@ -54,11 +54,35 @@ interface ApprovalApprovers {
|
|
|
54
54
|
}
|
|
55
55
|
interface ApprovalStep {
|
|
56
56
|
readonly approvers: ApprovalApprovers;
|
|
57
|
+
/** Approvals the step needs; `0` with `all` until the request is filed. */
|
|
57
58
|
readonly required: number;
|
|
59
|
+
/**
|
|
60
|
+
* Every holder of `approvers.permission` decides, resolved to `users` when
|
|
61
|
+
* the request is filed.
|
|
62
|
+
*/
|
|
63
|
+
readonly all?: boolean;
|
|
64
|
+
/** A Postgres interval after which `escalateTo` may decide the step too. */
|
|
65
|
+
readonly escalateAfter?: string;
|
|
66
|
+
/** The fallback approvers once the step has waited `escalateAfter`. */
|
|
67
|
+
readonly escalateTo?: ApprovalApprovers;
|
|
68
|
+
/** Whether `escalate_approvals` let `escalateTo` decide this step. */
|
|
69
|
+
readonly escalated?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A step to save. `required: "all"` with only `approvers.permission` asks every
|
|
73
|
+
* holder of the permission when a request is filed.
|
|
74
|
+
*/
|
|
75
|
+
interface ApprovalStepInput {
|
|
76
|
+
readonly approvers: ApprovalApprovers;
|
|
77
|
+
readonly required?: number | "all";
|
|
78
|
+
/** A Postgres interval or ISO 8601 duration, such as `PT4H`. */
|
|
79
|
+
readonly escalateAfter?: string;
|
|
80
|
+
readonly escalateTo?: ApprovalApprovers;
|
|
58
81
|
}
|
|
59
82
|
interface ApprovalRequest {
|
|
60
83
|
readonly id: string;
|
|
61
|
-
|
|
84
|
+
/** `null` for a request filed without an organization (`tenantless`). */
|
|
85
|
+
readonly organizationId: string | null;
|
|
62
86
|
readonly subject: RecordRef;
|
|
63
87
|
readonly action: string;
|
|
64
88
|
readonly status: ApprovalStatus;
|
|
@@ -87,6 +111,8 @@ interface ApprovalRequirement {
|
|
|
87
111
|
readonly expiresIn?: string;
|
|
88
112
|
/** The tenant policies that matched, in order. */
|
|
89
113
|
readonly policies: readonly string[];
|
|
114
|
+
/** The floor's effects, which tenant and platform policies match on. */
|
|
115
|
+
readonly effects?: readonly string[];
|
|
90
116
|
}
|
|
91
117
|
/**
|
|
92
118
|
* A tenant's approval policy. It tightens the config policy for the same
|
|
@@ -94,9 +120,14 @@ interface ApprovalRequirement {
|
|
|
94
120
|
*/
|
|
95
121
|
interface ApprovalTenantPolicy {
|
|
96
122
|
readonly id: string;
|
|
97
|
-
|
|
123
|
+
/** `null` for a platform policy (`options.platformPolicies`). */
|
|
124
|
+
readonly organizationId: string | null;
|
|
125
|
+
/** `*` matches every subject type. */
|
|
98
126
|
readonly subjectType: string;
|
|
127
|
+
/** `*` matches every action of the subject type. */
|
|
99
128
|
readonly action: string;
|
|
129
|
+
/** Matches only requests whose floor carries this effect. */
|
|
130
|
+
readonly effect?: string;
|
|
100
131
|
readonly name: string;
|
|
101
132
|
/** Applies only to requests whose payload matches; none applies always. */
|
|
102
133
|
readonly conditions?: FilterQuery;
|
|
@@ -109,20 +140,52 @@ interface ApprovalTenantPolicy {
|
|
|
109
140
|
readonly createdAt: Temporal.Instant;
|
|
110
141
|
readonly updatedAt?: Temporal.Instant;
|
|
111
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* The app's own policy for one request, which the service role passes to
|
|
145
|
+
* `request`. It only tightens the configured and stored policies for the
|
|
146
|
+
* subject type and action: their steps come first, the stricter mode wins,
|
|
147
|
+
* self-approval needs both to allow it and the shorter expiry applies. Without
|
|
148
|
+
* a configured or stored policy it is the request's whole policy.
|
|
149
|
+
*/
|
|
150
|
+
interface ApprovalRequestPolicy {
|
|
151
|
+
/**
|
|
152
|
+
* In order. `required` is a count (`1` for any approver, `n` for a quorum) or
|
|
153
|
+
* `"all"`: every named user, or every holder of `approvers.permission`.
|
|
154
|
+
*/
|
|
155
|
+
readonly steps: readonly ApprovalStepInput[];
|
|
156
|
+
readonly mode?: ApprovalMode;
|
|
157
|
+
readonly selfApproval?: boolean;
|
|
158
|
+
/** An ISO 8601 duration or Postgres interval, such as `P2D`. */
|
|
159
|
+
readonly expiresIn?: string;
|
|
160
|
+
/**
|
|
161
|
+
* The employee whose manager an `approvers.manager` step asks, instead of the
|
|
162
|
+
* requester's. Needs the employees block.
|
|
163
|
+
*/
|
|
164
|
+
readonly managerOf?: string;
|
|
165
|
+
}
|
|
112
166
|
/** A new policy needs `subjectType`, `action` and `name`; `id` changes one. */
|
|
113
167
|
interface ApprovalPolicyInput {
|
|
114
168
|
readonly id?: string;
|
|
169
|
+
/** `*` for every subject type. */
|
|
115
170
|
readonly subjectType?: string;
|
|
171
|
+
/** `*` for every action of the subject type. */
|
|
116
172
|
readonly action?: string;
|
|
173
|
+
/** An effect a floor declares; `null` removes it. */
|
|
174
|
+
readonly effect?: string | null;
|
|
117
175
|
readonly name?: string;
|
|
118
176
|
/** `null` removes the conditions. */
|
|
119
177
|
readonly conditions?: FilterQuery | null;
|
|
120
178
|
readonly mode?: ApprovalMode;
|
|
121
|
-
readonly steps?: readonly
|
|
179
|
+
readonly steps?: readonly ApprovalStepInput[];
|
|
122
180
|
readonly selfApproval?: boolean;
|
|
123
181
|
/** A Postgres interval such as `3 days`; `null` removes it. */
|
|
124
182
|
readonly expiresIn?: string | null;
|
|
125
183
|
readonly enabled?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Values for `options.policyExtraColumns`, keyed by column name; a key left
|
|
186
|
+
* out keeps its value.
|
|
187
|
+
*/
|
|
188
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
126
189
|
}
|
|
127
190
|
interface ApprovalDecision {
|
|
128
191
|
readonly id: string;
|
|
@@ -153,6 +216,26 @@ interface ApprovalRequestInput {
|
|
|
153
216
|
* fingerprint. Build it with `approvalFingerprint`.
|
|
154
217
|
*/
|
|
155
218
|
readonly fingerprint?: string;
|
|
219
|
+
/**
|
|
220
|
+
* Files the request without an organization, for a subject type in
|
|
221
|
+
* `options.tenantless`; the block's `tenant` is not needed.
|
|
222
|
+
*/
|
|
223
|
+
readonly tenantless?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* Files the request under the app's own policy as well, such as a workflow
|
|
226
|
+
* node's approvers. Only the service role may pass it.
|
|
227
|
+
*/
|
|
228
|
+
readonly policy?: ApprovalRequestPolicy;
|
|
229
|
+
/**
|
|
230
|
+
* The user the service role files the request for. They are its requester, so
|
|
231
|
+
* they can't approve it unless the policy allows self-approval.
|
|
232
|
+
*/
|
|
233
|
+
readonly requestedBy?: string;
|
|
234
|
+
}
|
|
235
|
+
/** Who decides when the service role calls `approve` or `reject`. */
|
|
236
|
+
interface ApprovalDecideOptions {
|
|
237
|
+
/** The user the service role decides for, recorded as the approver. */
|
|
238
|
+
readonly decidedBy?: string;
|
|
156
239
|
}
|
|
157
240
|
interface ApprovalListOptions {
|
|
158
241
|
/** `null` lists every status. Default: `pending`. */
|
|
@@ -164,6 +247,8 @@ interface ApprovalListOptions {
|
|
|
164
247
|
readonly pageSize?: number;
|
|
165
248
|
/** Requests made before this time, for the next page. */
|
|
166
249
|
readonly before?: Temporal.Instant;
|
|
250
|
+
/** Requests without an organization instead of the block's tenant. */
|
|
251
|
+
readonly tenantless?: boolean;
|
|
167
252
|
}
|
|
168
253
|
/**
|
|
169
254
|
* `F` is the extra request fields `options.fields` describes. `request` and
|
|
@@ -175,10 +260,13 @@ interface Approvals<F extends object = Record<never, never>> {
|
|
|
175
260
|
* besides the input's own are the request's extra columns.
|
|
176
261
|
*/
|
|
177
262
|
request(subject: RecordRef, input: ApprovalRequestInput & Partial<F>): AsyncResult<ApprovalRequest & F>;
|
|
178
|
-
/**
|
|
179
|
-
|
|
263
|
+
/**
|
|
264
|
+
* Approves the current step; the last step runs the policy's action. The
|
|
265
|
+
* service role passes `decidedBy` to decide for a user.
|
|
266
|
+
*/
|
|
267
|
+
approve(id: string, comment?: string, options?: ApprovalDecideOptions): AsyncResult<ApprovalRequest & F>;
|
|
180
268
|
/** Rejects the request. */
|
|
181
|
-
reject(id: string, comment?: string): AsyncResult<ApprovalRequest & F>;
|
|
269
|
+
reject(id: string, comment?: string, options?: ApprovalDecideOptions): AsyncResult<ApprovalRequest & F>;
|
|
182
270
|
/** Hands the caller's place on the current step to another member. */
|
|
183
271
|
delegate(id: string, userId: string, comment?: string): AsyncResult<ApprovalRequest & F>;
|
|
184
272
|
/** The requester or a manager closes a pending request. */
|
|
@@ -193,20 +281,31 @@ interface Approvals<F extends object = Record<never, never>> {
|
|
|
193
281
|
* as the request payload tenant conditions read; `null` when nothing is
|
|
194
282
|
* required, so the action can run without a request.
|
|
195
283
|
*/
|
|
196
|
-
requirement(subjectType: string, action: string, payload?: Readonly<Record<string, unknown
|
|
284
|
+
requirement(subjectType: string, action: string, payload?: Readonly<Record<string, unknown>>, options?: {
|
|
285
|
+
readonly tenantless?: boolean;
|
|
286
|
+
}): AsyncResult<ApprovalRequirement | null>;
|
|
197
287
|
/**
|
|
198
288
|
* Uses an approved request once, before its action runs. A second call fails
|
|
199
289
|
* with `APPROVAL_CONSUMED`, and a fingerprint other than the request's with
|
|
200
290
|
* `APPROVAL_FINGERPRINT_MISMATCH`.
|
|
201
291
|
*/
|
|
202
292
|
consume(id: string, fingerprint?: string): AsyncResult<ApprovalRequest & F>;
|
|
203
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* The tenant's policies (`options.tenantPolicies`), or with `platform` the
|
|
295
|
+
* platform policies.
|
|
296
|
+
*/
|
|
204
297
|
listPolicies(options?: {
|
|
205
298
|
readonly subjectType?: string;
|
|
206
299
|
readonly pageSize?: number;
|
|
300
|
+
readonly platform?: boolean;
|
|
207
301
|
}): AsyncResult<readonly ApprovalTenantPolicy[]>;
|
|
208
|
-
/**
|
|
209
|
-
|
|
302
|
+
/**
|
|
303
|
+
* Creates or changes a tenant policy. Needs `approvals.manage`; a platform
|
|
304
|
+
* policy (`platform: true`) needs it as platform staff.
|
|
305
|
+
*/
|
|
306
|
+
savePolicy(input: ApprovalPolicyInput, options?: {
|
|
307
|
+
readonly platform?: boolean;
|
|
308
|
+
}): AsyncResult<ApprovalTenantPolicy>;
|
|
210
309
|
/** Deletes a tenant policy; `false` when it did not exist. */
|
|
211
310
|
removePolicy(id: string): AsyncResult<boolean>;
|
|
212
311
|
}
|
|
@@ -218,4 +317,4 @@ interface Approvals<F extends object = Record<never, never>> {
|
|
|
218
317
|
declare function approvalFingerprint(value: unknown): Promise<string>;
|
|
219
318
|
/** The `approvals` SQL module as typed calls. */
|
|
220
319
|
declare function createApprovals<S extends StandardSchemaV1 | undefined = undefined>(options: ApprovalsOptions<S>): Approvals<FieldsOf<S>>;
|
|
221
|
-
export {
|
|
320
|
+
export { ApprovalsOptions as _, ApprovalMode as a, ApprovalRequestDetail as c, ApprovalRequirement as d, ApprovalStatus as f, Approvals as g, ApprovalTenantPolicy as h, ApprovalListOptions as i, ApprovalRequestInput as l, ApprovalStepInput as m, ApprovalDecideOptions as n, ApprovalPolicyInput as o, ApprovalStep as p, ApprovalDecision as r, ApprovalRequest as s, ApprovalApprovers as t, ApprovalRequestPolicy as u, approvalFingerprint as v, createApprovals as y };
|
|
@@ -60,10 +60,22 @@ function approversOf(value) {
|
|
|
60
60
|
...row["manager"] === true ? { manager: true } : {}
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
function stepOf(step) {
|
|
64
|
+
const all = step["required"] === "all";
|
|
65
|
+
const escalateAfter = optionalText(step["escalateAfter"]);
|
|
66
|
+
return {
|
|
67
|
+
approvers: approversOf(step["approvers"]),
|
|
68
|
+
required: all ? 0 : Number(step["required"] ?? 1),
|
|
69
|
+
...all ? { all } : {},
|
|
70
|
+
...escalateAfter === void 0 ? {} : {
|
|
71
|
+
escalateAfter,
|
|
72
|
+
escalateTo: approversOf(step["escalateTo"]),
|
|
73
|
+
escalated: step["escalated"] === true
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
const stepsOf = (value, fn) => recordsOf(value ?? [], fn).map(stepOf);
|
|
78
|
+
const effectsOf = (value) => Array.isArray(value) && value.length > 0 ? value.map((effect) => textOf(effect)) : void 0;
|
|
67
79
|
const modeOf = (value) => value === "confirm" ? "confirm" : "authorize";
|
|
68
80
|
function requestOf(value, fn) {
|
|
69
81
|
const row = recordOf(value, fn);
|
|
@@ -73,7 +85,7 @@ function requestOf(value, fn) {
|
|
|
73
85
|
const payload = row["payload"];
|
|
74
86
|
return {
|
|
75
87
|
id: textOf(row["id"]),
|
|
76
|
-
organizationId:
|
|
88
|
+
organizationId: optionalText(row["organizationId"]) ?? null,
|
|
77
89
|
subject: subjectRefOf(row["subjectType"], row["subjectId"]),
|
|
78
90
|
action: textOf(row["action"]),
|
|
79
91
|
status: statusOf(row["status"]),
|
|
@@ -94,12 +106,14 @@ function requirementOf(value) {
|
|
|
94
106
|
if (value === null || value === void 0) return null;
|
|
95
107
|
const row = recordOf(value, "approval_requirement");
|
|
96
108
|
const expiresIn = optionalText(row["expiresIn"]);
|
|
109
|
+
const effects = effectsOf(row["effects"]);
|
|
97
110
|
return {
|
|
98
111
|
mode: modeOf(row["mode"]),
|
|
99
112
|
steps: stepsOf(row["steps"], "approval_requirement"),
|
|
100
113
|
selfApproval: row["selfApproval"] === true,
|
|
101
114
|
policies: Array.isArray(row["policies"]) ? row["policies"].map((id) => textOf(id)) : [],
|
|
102
|
-
...expiresIn === void 0 ? {} : { expiresIn }
|
|
115
|
+
...expiresIn === void 0 ? {} : { expiresIn },
|
|
116
|
+
...effects === void 0 ? {} : { effects }
|
|
103
117
|
};
|
|
104
118
|
}
|
|
105
119
|
/** Save_approval_policy stores only trees `rule_check` accepts. */
|
|
@@ -108,15 +122,23 @@ function conditionsOf(value) {
|
|
|
108
122
|
if (!isFilterGroup(value)) throw new TypeError(`approval conditions are ${JSON.stringify(value)}`);
|
|
109
123
|
return value;
|
|
110
124
|
}
|
|
125
|
+
/** `required: "all"` over named users is their count, as the SQL expects. */
|
|
126
|
+
const stepInput = (step) => step.required === "all" && step.approvers.users !== void 0 && Object.keys(step.approvers).length === 1 ? {
|
|
127
|
+
...step,
|
|
128
|
+
required: step.approvers.users.length
|
|
129
|
+
} : step;
|
|
111
130
|
function tenantPolicyOf(value, fn) {
|
|
112
131
|
const row = recordOf(value, fn);
|
|
113
132
|
const expiresIn = optionalText(row["expiresIn"]);
|
|
133
|
+
const effect = optionalText(row["effect"]);
|
|
114
134
|
const conditions = row["conditions"];
|
|
135
|
+
const fields = row["fields"];
|
|
115
136
|
return {
|
|
116
137
|
id: textOf(row["id"]),
|
|
117
|
-
organizationId:
|
|
138
|
+
organizationId: optionalText(row["organizationId"]) ?? null,
|
|
118
139
|
subjectType: textOf(row["subjectType"]),
|
|
119
140
|
action: textOf(row["action"]),
|
|
141
|
+
...effect === void 0 ? {} : { effect },
|
|
120
142
|
name: textOf(row["name"]),
|
|
121
143
|
mode: modeOf(row["mode"]),
|
|
122
144
|
steps: stepsOf(row["steps"], fn),
|
|
@@ -125,7 +147,8 @@ function tenantPolicyOf(value, fn) {
|
|
|
125
147
|
createdAt: requiredInstant(row["createdAt"], "createdAt"),
|
|
126
148
|
...conditions === null || conditions === void 0 ? {} : { conditions: conditionsOf(conditions) },
|
|
127
149
|
...expiresIn === void 0 ? {} : { expiresIn },
|
|
128
|
-
...instant(row["updatedAt"], "updatedAt")
|
|
150
|
+
...instant(row["updatedAt"], "updatedAt"),
|
|
151
|
+
...isRecord(fields) ? { fields } : {}
|
|
129
152
|
};
|
|
130
153
|
}
|
|
131
154
|
function decisionOf(value) {
|
|
@@ -166,7 +189,7 @@ function createApprovals(options) {
|
|
|
166
189
|
allowed = await approverOf(approver, {
|
|
167
190
|
kind: `${request.subject.type}.${request.action}`,
|
|
168
191
|
subject: request.subject.id,
|
|
169
|
-
tenant: request.organizationId,
|
|
192
|
+
...request.organizationId === null ? {} : { tenant: request.organizationId },
|
|
170
193
|
...request.requestedBy === void 0 ? {} : { requester: request.requestedBy }
|
|
171
194
|
});
|
|
172
195
|
} catch {
|
|
@@ -183,13 +206,15 @@ function createApprovals(options) {
|
|
|
183
206
|
decisions: recordsOf(row["decisions"] ?? [], "get_approval").map(decisionOf)
|
|
184
207
|
});
|
|
185
208
|
});
|
|
186
|
-
const decide = (id, decision, comment) => asApprover(id, () => one("decide_approval", {
|
|
209
|
+
const decide = (id, decision, comment, decideOptions) => asApprover(id, () => one("decide_approval", {
|
|
187
210
|
request_id: id,
|
|
188
211
|
decision,
|
|
189
|
-
comment: comment ?? null
|
|
212
|
+
comment: comment ?? null,
|
|
213
|
+
...decideOptions?.decidedBy === void 0 ? {} : { decided_by: decideOptions.decidedBy }
|
|
190
214
|
}));
|
|
215
|
+
const tenantOr = (tenantless) => tenantless === true ? AsyncResult.ok(null) : tenant();
|
|
191
216
|
return withBlockHooks({
|
|
192
|
-
request: (subject, { action, reason, payload, fingerprint, ...extra }) =>
|
|
217
|
+
request: (subject, { action, reason, payload, fingerprint, tenantless, policy, requestedBy, ...extra }) => tenantOr(tenantless).andThen((organizationId) => AsyncResult.from(() => extraFieldsArg(fields, extra)).andThen((more) => one("request_approval", {
|
|
193
218
|
tenant: organizationId,
|
|
194
219
|
subject_type: subject.type,
|
|
195
220
|
subject_id: subject.id,
|
|
@@ -197,10 +222,15 @@ function createApprovals(options) {
|
|
|
197
222
|
reason: reason ?? null,
|
|
198
223
|
payload: payload ?? {},
|
|
199
224
|
...more,
|
|
200
|
-
...fingerprint === void 0 ? {} : { fingerprint }
|
|
225
|
+
...fingerprint === void 0 ? {} : { fingerprint },
|
|
226
|
+
...policy === void 0 ? {} : { policy: {
|
|
227
|
+
...policy,
|
|
228
|
+
steps: policy.steps.map(stepInput)
|
|
229
|
+
} },
|
|
230
|
+
...requestedBy === void 0 ? {} : { requested_by: requestedBy }
|
|
201
231
|
}))),
|
|
202
|
-
approve: (id, comment) => decide(id, "approved", comment),
|
|
203
|
-
reject: (id, comment) => decide(id, "rejected", comment),
|
|
232
|
+
approve: (id, comment, decideOptions) => decide(id, "approved", comment, decideOptions),
|
|
233
|
+
reject: (id, comment, decideOptions) => decide(id, "rejected", comment, decideOptions),
|
|
204
234
|
delegate: (id, userId, comment) => asApprover(id, () => one("delegate_approval", {
|
|
205
235
|
request_id: id,
|
|
206
236
|
to_user: userId,
|
|
@@ -208,7 +238,7 @@ function createApprovals(options) {
|
|
|
208
238
|
})),
|
|
209
239
|
cancel: (id) => one("cancel_approval", { request_id: id }),
|
|
210
240
|
get: getRequest,
|
|
211
|
-
list: (list = {}) =>
|
|
241
|
+
list: (list = {}) => tenantOr(list.tenantless).andThen((organizationId) => call("list_approvals", {
|
|
212
242
|
tenant: organizationId,
|
|
213
243
|
status: list.status === void 0 ? "pending" : list.status,
|
|
214
244
|
assigned: list.assigned ?? false,
|
|
@@ -222,7 +252,7 @@ function createApprovals(options) {
|
|
|
222
252
|
subject_id: subject.id,
|
|
223
253
|
action
|
|
224
254
|
}, (value) => value === true),
|
|
225
|
-
requirement: (subjectType, action, payload) =>
|
|
255
|
+
requirement: (subjectType, action, payload, requirementOptions) => tenantOr(requirementOptions?.tenantless).andThen((organizationId) => call("approval_requirement", {
|
|
226
256
|
tenant: organizationId,
|
|
227
257
|
subject_type: subjectType,
|
|
228
258
|
action,
|
|
@@ -232,12 +262,12 @@ function createApprovals(options) {
|
|
|
232
262
|
request_id: id,
|
|
233
263
|
fingerprint: fingerprint ?? null
|
|
234
264
|
}),
|
|
235
|
-
listPolicies: (list = {}) =>
|
|
265
|
+
listPolicies: (list = {}) => tenantOr(list.platform).andThen((organizationId) => call("list_approval_policies", {
|
|
236
266
|
tenant: organizationId,
|
|
237
267
|
subject_type: list.subjectType ?? null,
|
|
238
268
|
page_size: list.pageSize ?? null
|
|
239
269
|
}, (value) => recordsOf(value, "list_approval_policies").map((row) => tenantPolicyOf(row, "list_approval_policies")))),
|
|
240
|
-
savePolicy: (input) =>
|
|
270
|
+
savePolicy: (input, saveOptions) => tenantOr(saveOptions?.platform).andThen((organizationId) => call("save_approval_policy", {
|
|
241
271
|
tenant: organizationId,
|
|
242
272
|
policy: input
|
|
243
273
|
}, (value) => tenantPolicyOf(value, "save_approval_policy"))),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { b as DbError } from "./result-DTOQRyGY.js";
|
|
2
2
|
import { i as AiMessage } from "./message-Cc4bkdNw.js";
|
|
3
|
-
import { A as AiRunStatus, m as AiChatRecord, t as AiChat, x as AiModerationAction, z as AiUserMessageTrigger } from "./ai-chat-
|
|
3
|
+
import { A as AiRunStatus, m as AiChatRecord, t as AiChat, x as AiModerationAction, z as AiUserMessageTrigger } from "./ai-chat-rQ7Ftq9W.js";
|
|
4
4
|
import { n as GatewayOptions } from "./gateway-options-Mut8jih_.js";
|
|
5
5
|
import { o as StreamStore } from "./store-c7QxUHX-.js";
|
|
6
|
-
import { i as CostBackfillPayload, t as AiUsage } from "./gateway-
|
|
6
|
+
import { i as CostBackfillPayload, t as AiUsage } from "./gateway-DJX-XUWl.js";
|
|
7
7
|
import { FinishReason, LanguageModelUsage, ModelMessage, TextStreamPart, ToolSet, UIMessage, UIMessageChunk, UIMessageStreamOnEndCallback, UIMessageStreamOptions, safeValidateUIMessages } from "ai";
|
|
8
8
|
/** Who asks, for one request. */
|
|
9
9
|
interface AssistantContext {
|