better-supabase 0.40.0 → 0.41.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-kHGNXFsd.d.ts} +1 -1
- package/dist/{approvals-CXW3yFWZ.d.ts → approvals-CTVaWq1O.d.ts} +74 -13
- package/dist/{approvals-D8gR1R8R.js → approvals-Qjn42OAZ.js} +35 -17
- package/dist/{assistant-5heV2GeR.d.ts → assistant-B1p5mYaM.d.ts} +2 -2
- package/dist/{authorization-Ul_ApMYW.d.ts → authorization-CS5Q1V7A.d.ts} +33 -7
- package/dist/{automations-D4QTP8nI.js → automations-CJhRmPmq.js} +3 -1
- package/dist/{bind-B2GlypM6.d.ts → bind-XrFxNm5r.d.ts} +4 -4
- package/dist/{block-env-Bcr-jEA1.d.ts → block-env-CHFHOjvz.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-Bz95_dqA.js} +1 -1
- package/dist/{block-tables-nkIjJ1ly.d.ts → block-tables-EXcmuOJT.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 +4 -2
- 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 +7 -3
- package/dist/blocks/invoices/index.js +4 -2
- 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 +2 -1
- 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-BVs8Ym-K.js → add-BGErz-yb.js} +10 -10
- package/dist/cli/add-CoP8iie6.js +1 -0
- package/dist/cli/{add-DP1ct-7e.js → add-DU5HAq6w.js} +2 -2
- package/dist/cli/{app-table-files-gjMyFqH4.js → app-table-files-Drzpekpt.js} +2 -2
- package/dist/cli/{app-tables-B26PHK75.js → app-tables-dZpH63--.js} +2 -2
- package/dist/cli/{backfill-CP_LpTK2.js → backfill-B-p-19g6.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-CpBLp57s.js → blocks-Ews-FZZO.js} +1 -1
- package/dist/cli/{blocks-Ewp49Kbm.js → blocks-iUjNl5yJ.js} +1 -1
- package/dist/cli/{cache-BxxtUXVN.js → cache-JT4JhdmX.js} +1 -1
- package/dist/cli/{codemod-CGCxMEyD.js → codemod-KIxYiazj.js} +1 -1
- package/dist/cli/{content-mapper-DngBJv4r.js → content-mapper-DkXzxt6f.js} +2 -2
- package/dist/cli/{doctor-3dcMraMn.js → doctor-VWanOD74.js} +15 -15
- package/dist/cli/{gen-DrXxFwUU.js → gen-_lBdTgaR.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-Cm6n4u_3.js} +8 -8
- package/dist/cli/{live-CHTbAqdS.js → live-D4iSuTmS.js} +2 -2
- package/dist/cli/{mcp-BbmhntrR.js → mcp-CHYX7utI.js} +2 -2
- package/dist/cli/{metadata-BS56R_eb.js → metadata-DLba0VjH.js} +3 -3
- package/dist/cli/{migrate-DV6a9-jI.js → migrate-nQhh0nEJ.js} +1 -1
- package/dist/cli/{migration-safety-Ce9IQwmJ.js → migration-safety-C2d3BSTf.js} +1 -1
- package/dist/cli/{migrations-CCCnMhmM.js → migrations-BOmMcme9.js} +2 -2
- package/dist/cli/{module-migration-C0cAzpNa.js → module-migration-DSDB473C.js} +2 -2
- package/dist/cli/{powersync-OIIpG-y_.js → powersync-CAHvPkkb.js} +3 -3
- package/dist/cli/powersync-nH-NLDjy.js +1 -0
- package/dist/cli/{print-BGF3d6O2.js → print-CahE8HYK.js} +2 -2
- package/dist/cli/{providers-fEzlYSLs.js → providers-CL5Z5Uj4.js} +1 -1
- package/dist/cli/{prune-workflows-Bx7J5T3a.js → prune-workflows-C9xO0fRU.js} +1 -1
- package/dist/cli/{remove-Ds4N6WvD.js → remove-DIy7gthm.js} +5 -5
- package/dist/cli/{render-BeZToAp-.js → render-CoCZr3Ru.js} +3 -3
- package/dist/cli/{run-iUmtksq5.js → run-BBj137Fn.js} +27 -27
- package/dist/cli/{run-DR0sTyNQ.js → run-CVw8hmLk.js} +9 -9
- package/dist/cli/{shared-BCWYvKeR.js → shared-BdKeo7xp.js} +1 -1
- package/dist/cli/{snapshot-CfgRxTQq.js → snapshot-P2ww2xCt.js} +2 -2
- package/dist/cli/{source-Ct3ZCy6p.js → source-BCs4oBl2.js} +1 -1
- package/dist/cli/{spec-1eEq2P4T.js → spec-oPbt9sbZ.js} +1 -1
- package/dist/cli/{spec-9vb-or-k.js → spec-uCpXPLoF.js} +2 -2
- package/dist/cli/{sql-layout-cYsnyjRf.js → sql-layout-Bsnge2oW.js} +2 -2
- package/dist/cli/{sync-XpcpINnx.js → sync-Cv7iBRhe.js} +4 -4
- package/dist/cli/{upgrade-A18FY5Iy.js → upgrade-C6jWNxkc.js} +2 -2
- package/dist/cli/{upgrade-DXhyb2jV.js → upgrade-DV7jTRdh.js} +5 -5
- package/dist/cli/{version-PcwPOm4G.js → version-Hza4Q2PB.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-BRGMUEE2.js → config-B7hnJFxh.js} +1 -1
- package/dist/{config-qqAfS_1_.js → config-DwXYtmwt.js} +3 -3
- package/dist/{connectors-DDsdz-cn.d.ts → connectors-OMJkoAP6.d.ts} +2 -2
- package/dist/{context-dHluCmud.d.ts → context-tFoygone.d.ts} +2 -2
- package/dist/contract/index.d.ts +4 -4
- package/dist/{controller-BQXgMwWN.d.ts → controller-phhsPHSz.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-LfW6S2RW.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-CMWRPBmF.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-BKz-E3Mv.d.ts → index-B-HuxATL.d.ts} +8 -8
- package/dist/{index-xmb6YGTg.d.ts → index-B21Pim3I.d.ts} +2 -2
- package/dist/{index-DhcLJAtX.d.ts → index-BXkPvYzd.d.ts} +1 -1
- package/dist/{index-IrJQqPeQ.d.ts → index-D-uiT4Qz.d.ts} +3 -3
- package/dist/{index-g_eFnFqo.d.ts → index-RZqQdq1G.d.ts} +2 -2
- package/dist/{index-y70eTezB.d.ts → index-X5igfnIi.d.ts} +2 -2
- package/dist/{index-CpZ4WDDJ.d.ts → index-fmrLdtVT.d.ts} +1 -1
- package/dist/{instances-DqEZrffE.js → instances-DJOknCJ0.js} +8 -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-Cm4mSrAX.d.ts} +1 -1
- package/dist/{options-Bgnm4pTD.js → options-CzxG2Phg.js} +3 -0
- 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-r0Cxhxos.d.ts} +1 -1
- package/dist/{ports-1M1E_r2n.d.ts → ports-BJJJmfWK.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-U47pzJMK.js} +2 -2
- package/dist/{project-Y2wW_nr_.js → project-Dng8tO8S.js} +5 -5
- package/dist/{push-token-DKImhAca.d.ts → push-token-CA31xmQr.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-BudVz33a.js} +1113 -375
- 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-C2vnB0wX.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-CKN3kmoi.d.ts} +1 -1
- package/dist/{types-DtiDatvu.d.ts → types-D--4dv5K.d.ts} +3 -3
- package/dist/{types-B42S7qfO.d.ts → types-D8Tltfdq.d.ts} +2 -2
- 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-0dXuJMuE.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-CUt0E4v6.d.ts → workflow-sdk-DzKQo265.d.ts} +2 -2
- package/dist/{workflow-sdk-6psRpDIo.js → workflow-sdk-vXuxBSrk.js} +20 -1
- 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 +22 -0
- 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-CS5Q1V7A.js";
|
|
6
|
+
import { t as OperationTable } from "../../operations-Cm4mSrAX.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;
|
|
@@ -112,13 +143,17 @@ interface ApprovalTenantPolicy {
|
|
|
112
143
|
/** A new policy needs `subjectType`, `action` and `name`; `id` changes one. */
|
|
113
144
|
interface ApprovalPolicyInput {
|
|
114
145
|
readonly id?: string;
|
|
146
|
+
/** `*` for every subject type. */
|
|
115
147
|
readonly subjectType?: string;
|
|
148
|
+
/** `*` for every action of the subject type. */
|
|
116
149
|
readonly action?: string;
|
|
150
|
+
/** An effect a floor declares; `null` removes it. */
|
|
151
|
+
readonly effect?: string | null;
|
|
117
152
|
readonly name?: string;
|
|
118
153
|
/** `null` removes the conditions. */
|
|
119
154
|
readonly conditions?: FilterQuery | null;
|
|
120
155
|
readonly mode?: ApprovalMode;
|
|
121
|
-
readonly steps?: readonly
|
|
156
|
+
readonly steps?: readonly ApprovalStepInput[];
|
|
122
157
|
readonly selfApproval?: boolean;
|
|
123
158
|
/** A Postgres interval such as `3 days`; `null` removes it. */
|
|
124
159
|
readonly expiresIn?: string | null;
|
|
@@ -153,6 +188,16 @@ interface ApprovalRequestInput {
|
|
|
153
188
|
* fingerprint. Build it with `approvalFingerprint`.
|
|
154
189
|
*/
|
|
155
190
|
readonly fingerprint?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Files the request without an organization, for a subject type in
|
|
193
|
+
* `options.tenantless`; the block's `tenant` is not needed.
|
|
194
|
+
*/
|
|
195
|
+
readonly tenantless?: boolean;
|
|
196
|
+
}
|
|
197
|
+
/** Who decides when the service role calls `approve` or `reject`. */
|
|
198
|
+
interface ApprovalDecideOptions {
|
|
199
|
+
/** The user the service role decides for, recorded as the approver. */
|
|
200
|
+
readonly decidedBy?: string;
|
|
156
201
|
}
|
|
157
202
|
interface ApprovalListOptions {
|
|
158
203
|
/** `null` lists every status. Default: `pending`. */
|
|
@@ -164,6 +209,8 @@ interface ApprovalListOptions {
|
|
|
164
209
|
readonly pageSize?: number;
|
|
165
210
|
/** Requests made before this time, for the next page. */
|
|
166
211
|
readonly before?: Temporal.Instant;
|
|
212
|
+
/** Requests without an organization instead of the block's tenant. */
|
|
213
|
+
readonly tenantless?: boolean;
|
|
167
214
|
}
|
|
168
215
|
/**
|
|
169
216
|
* `F` is the extra request fields `options.fields` describes. `request` and
|
|
@@ -175,10 +222,13 @@ interface Approvals<F extends object = Record<never, never>> {
|
|
|
175
222
|
* besides the input's own are the request's extra columns.
|
|
176
223
|
*/
|
|
177
224
|
request(subject: RecordRef, input: ApprovalRequestInput & Partial<F>): AsyncResult<ApprovalRequest & F>;
|
|
178
|
-
/**
|
|
179
|
-
|
|
225
|
+
/**
|
|
226
|
+
* Approves the current step; the last step runs the policy's action. The
|
|
227
|
+
* service role passes `decidedBy` to decide for a user.
|
|
228
|
+
*/
|
|
229
|
+
approve(id: string, comment?: string, options?: ApprovalDecideOptions): AsyncResult<ApprovalRequest & F>;
|
|
180
230
|
/** Rejects the request. */
|
|
181
|
-
reject(id: string, comment?: string): AsyncResult<ApprovalRequest & F>;
|
|
231
|
+
reject(id: string, comment?: string, options?: ApprovalDecideOptions): AsyncResult<ApprovalRequest & F>;
|
|
182
232
|
/** Hands the caller's place on the current step to another member. */
|
|
183
233
|
delegate(id: string, userId: string, comment?: string): AsyncResult<ApprovalRequest & F>;
|
|
184
234
|
/** The requester or a manager closes a pending request. */
|
|
@@ -193,20 +243,31 @@ interface Approvals<F extends object = Record<never, never>> {
|
|
|
193
243
|
* as the request payload tenant conditions read; `null` when nothing is
|
|
194
244
|
* required, so the action can run without a request.
|
|
195
245
|
*/
|
|
196
|
-
requirement(subjectType: string, action: string, payload?: Readonly<Record<string, unknown
|
|
246
|
+
requirement(subjectType: string, action: string, payload?: Readonly<Record<string, unknown>>, options?: {
|
|
247
|
+
readonly tenantless?: boolean;
|
|
248
|
+
}): AsyncResult<ApprovalRequirement | null>;
|
|
197
249
|
/**
|
|
198
250
|
* Uses an approved request once, before its action runs. A second call fails
|
|
199
251
|
* with `APPROVAL_CONSUMED`, and a fingerprint other than the request's with
|
|
200
252
|
* `APPROVAL_FINGERPRINT_MISMATCH`.
|
|
201
253
|
*/
|
|
202
254
|
consume(id: string, fingerprint?: string): AsyncResult<ApprovalRequest & F>;
|
|
203
|
-
/**
|
|
255
|
+
/**
|
|
256
|
+
* The tenant's policies (`options.tenantPolicies`), or with `platform` the
|
|
257
|
+
* platform policies.
|
|
258
|
+
*/
|
|
204
259
|
listPolicies(options?: {
|
|
205
260
|
readonly subjectType?: string;
|
|
206
261
|
readonly pageSize?: number;
|
|
262
|
+
readonly platform?: boolean;
|
|
207
263
|
}): AsyncResult<readonly ApprovalTenantPolicy[]>;
|
|
208
|
-
/**
|
|
209
|
-
|
|
264
|
+
/**
|
|
265
|
+
* Creates or changes a tenant policy. Needs `approvals.manage`; a platform
|
|
266
|
+
* policy (`platform: true`) needs it as platform staff.
|
|
267
|
+
*/
|
|
268
|
+
savePolicy(input: ApprovalPolicyInput, options?: {
|
|
269
|
+
readonly platform?: boolean;
|
|
270
|
+
}): AsyncResult<ApprovalTenantPolicy>;
|
|
210
271
|
/** Deletes a tenant policy; `false` when it did not exist. */
|
|
211
272
|
removePolicy(id: string): AsyncResult<boolean>;
|
|
212
273
|
}
|
|
@@ -218,4 +279,4 @@ interface Approvals<F extends object = Record<never, never>> {
|
|
|
218
279
|
declare function approvalFingerprint(value: unknown): Promise<string>;
|
|
219
280
|
/** The `approvals` SQL module as typed calls. */
|
|
220
281
|
declare function createApprovals<S extends StandardSchemaV1 | undefined = undefined>(options: ApprovalsOptions<S>): Approvals<FieldsOf<S>>;
|
|
221
|
-
export {
|
|
282
|
+
export { approvalFingerprint as _, ApprovalMode as a, ApprovalRequestDetail as c, ApprovalStatus as d, ApprovalStep as f, ApprovalsOptions as g, Approvals as h, ApprovalListOptions as i, ApprovalRequestInput as l, ApprovalTenantPolicy as m, ApprovalDecideOptions as n, ApprovalPolicyInput as o, ApprovalStepInput as p, ApprovalDecision as r, ApprovalRequest as s, ApprovalApprovers as t, ApprovalRequirement as u, createApprovals as v };
|
|
@@ -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. */
|
|
@@ -111,12 +125,14 @@ function conditionsOf(value) {
|
|
|
111
125
|
function tenantPolicyOf(value, fn) {
|
|
112
126
|
const row = recordOf(value, fn);
|
|
113
127
|
const expiresIn = optionalText(row["expiresIn"]);
|
|
128
|
+
const effect = optionalText(row["effect"]);
|
|
114
129
|
const conditions = row["conditions"];
|
|
115
130
|
return {
|
|
116
131
|
id: textOf(row["id"]),
|
|
117
|
-
organizationId:
|
|
132
|
+
organizationId: optionalText(row["organizationId"]) ?? null,
|
|
118
133
|
subjectType: textOf(row["subjectType"]),
|
|
119
134
|
action: textOf(row["action"]),
|
|
135
|
+
...effect === void 0 ? {} : { effect },
|
|
120
136
|
name: textOf(row["name"]),
|
|
121
137
|
mode: modeOf(row["mode"]),
|
|
122
138
|
steps: stepsOf(row["steps"], fn),
|
|
@@ -166,7 +182,7 @@ function createApprovals(options) {
|
|
|
166
182
|
allowed = await approverOf(approver, {
|
|
167
183
|
kind: `${request.subject.type}.${request.action}`,
|
|
168
184
|
subject: request.subject.id,
|
|
169
|
-
tenant: request.organizationId,
|
|
185
|
+
...request.organizationId === null ? {} : { tenant: request.organizationId },
|
|
170
186
|
...request.requestedBy === void 0 ? {} : { requester: request.requestedBy }
|
|
171
187
|
});
|
|
172
188
|
} catch {
|
|
@@ -183,13 +199,15 @@ function createApprovals(options) {
|
|
|
183
199
|
decisions: recordsOf(row["decisions"] ?? [], "get_approval").map(decisionOf)
|
|
184
200
|
});
|
|
185
201
|
});
|
|
186
|
-
const decide = (id, decision, comment) => asApprover(id, () => one("decide_approval", {
|
|
202
|
+
const decide = (id, decision, comment, decideOptions) => asApprover(id, () => one("decide_approval", {
|
|
187
203
|
request_id: id,
|
|
188
204
|
decision,
|
|
189
|
-
comment: comment ?? null
|
|
205
|
+
comment: comment ?? null,
|
|
206
|
+
...decideOptions?.decidedBy === void 0 ? {} : { decided_by: decideOptions.decidedBy }
|
|
190
207
|
}));
|
|
208
|
+
const tenantOr = (tenantless) => tenantless === true ? AsyncResult.ok(null) : tenant();
|
|
191
209
|
return withBlockHooks({
|
|
192
|
-
request: (subject, { action, reason, payload, fingerprint, ...extra }) =>
|
|
210
|
+
request: (subject, { action, reason, payload, fingerprint, tenantless, ...extra }) => tenantOr(tenantless).andThen((organizationId) => AsyncResult.from(() => extraFieldsArg(fields, extra)).andThen((more) => one("request_approval", {
|
|
193
211
|
tenant: organizationId,
|
|
194
212
|
subject_type: subject.type,
|
|
195
213
|
subject_id: subject.id,
|
|
@@ -199,8 +217,8 @@ function createApprovals(options) {
|
|
|
199
217
|
...more,
|
|
200
218
|
...fingerprint === void 0 ? {} : { fingerprint }
|
|
201
219
|
}))),
|
|
202
|
-
approve: (id, comment) => decide(id, "approved", comment),
|
|
203
|
-
reject: (id, comment) => decide(id, "rejected", comment),
|
|
220
|
+
approve: (id, comment, decideOptions) => decide(id, "approved", comment, decideOptions),
|
|
221
|
+
reject: (id, comment, decideOptions) => decide(id, "rejected", comment, decideOptions),
|
|
204
222
|
delegate: (id, userId, comment) => asApprover(id, () => one("delegate_approval", {
|
|
205
223
|
request_id: id,
|
|
206
224
|
to_user: userId,
|
|
@@ -208,7 +226,7 @@ function createApprovals(options) {
|
|
|
208
226
|
})),
|
|
209
227
|
cancel: (id) => one("cancel_approval", { request_id: id }),
|
|
210
228
|
get: getRequest,
|
|
211
|
-
list: (list = {}) =>
|
|
229
|
+
list: (list = {}) => tenantOr(list.tenantless).andThen((organizationId) => call("list_approvals", {
|
|
212
230
|
tenant: organizationId,
|
|
213
231
|
status: list.status === void 0 ? "pending" : list.status,
|
|
214
232
|
assigned: list.assigned ?? false,
|
|
@@ -222,7 +240,7 @@ function createApprovals(options) {
|
|
|
222
240
|
subject_id: subject.id,
|
|
223
241
|
action
|
|
224
242
|
}, (value) => value === true),
|
|
225
|
-
requirement: (subjectType, action, payload) =>
|
|
243
|
+
requirement: (subjectType, action, payload, requirementOptions) => tenantOr(requirementOptions?.tenantless).andThen((organizationId) => call("approval_requirement", {
|
|
226
244
|
tenant: organizationId,
|
|
227
245
|
subject_type: subjectType,
|
|
228
246
|
action,
|
|
@@ -232,12 +250,12 @@ function createApprovals(options) {
|
|
|
232
250
|
request_id: id,
|
|
233
251
|
fingerprint: fingerprint ?? null
|
|
234
252
|
}),
|
|
235
|
-
listPolicies: (list = {}) =>
|
|
253
|
+
listPolicies: (list = {}) => tenantOr(list.platform).andThen((organizationId) => call("list_approval_policies", {
|
|
236
254
|
tenant: organizationId,
|
|
237
255
|
subject_type: list.subjectType ?? null,
|
|
238
256
|
page_size: list.pageSize ?? null
|
|
239
257
|
}, (value) => recordsOf(value, "list_approval_policies").map((row) => tenantPolicyOf(row, "list_approval_policies")))),
|
|
240
|
-
savePolicy: (input) =>
|
|
258
|
+
savePolicy: (input, saveOptions) => tenantOr(saveOptions?.platform).andThen((organizationId) => call("save_approval_policy", {
|
|
241
259
|
tenant: organizationId,
|
|
242
260
|
policy: input
|
|
243
261
|
}, (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 {
|