better-supabase 0.36.0 → 0.38.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/{ai-schedules-BZPmySUa.d.ts → ai-schedules-ChJkI2jo.d.ts} +1 -1
- package/dist/ai-sdk/agents/index.d.ts +2 -2
- package/dist/ai-sdk/batches/index.d.ts +1 -1
- package/dist/ai-sdk/index.d.ts +1 -1
- package/dist/ai-sdk/mcp/index.d.ts +3 -3
- package/dist/{api-XEaCJbgv.d.ts → api-CbY2qdzT.d.ts} +3 -3
- package/dist/{api-keys-C82fMru4.d.ts → api-keys-BncNDlWG.d.ts} +1 -1
- package/dist/{app-tables-C0XVpQEJ.d.ts → app-tables-D2c0i05-.d.ts} +1 -1
- package/dist/{approvals-DqCv7f-G.d.ts → approvals-CXW3yFWZ.d.ts} +1 -1
- package/dist/astro/index.d.ts +5 -5
- package/dist/{authorization-2Rv1AJQJ.d.ts → authorization-D8CaAdqU.d.ts} +48 -20
- package/dist/{authorization-hooks-C0GfMvFm.d.ts → authorization-hooks-CR8TVvqo.d.ts} +1 -1
- package/dist/better-result/index.d.ts +2 -2
- package/dist/{bind-C2XvMlfg.d.ts → bind-5vOwNouG.d.ts} +4 -4
- package/dist/{block-env-BQrtLPyc.d.ts → block-env-hco8BLjC.d.ts} +4 -4
- package/dist/block-subjects-CINiJW1R.js +253 -0
- package/dist/{block-tables-DPOgnT3y.d.ts → block-tables-BsgdB6VG.d.ts} +1 -1
- package/dist/blocks/access-requests/index.d.ts +2 -2
- package/dist/blocks/activities/index.d.ts +3 -3
- package/dist/blocks/agents/index.d.ts +2 -2
- package/dist/blocks/ai-cache/index.d.ts +1 -1
- package/dist/blocks/ai-chat/index.d.ts +5 -5
- package/dist/blocks/ai-files/index.d.ts +1 -1
- package/dist/blocks/ai-keys/index.d.ts +3 -3
- package/dist/blocks/ai-schedules/index.d.ts +2 -2
- package/dist/blocks/announcements/index.d.ts +5 -5
- package/dist/blocks/api-keys/index.d.ts +2 -2
- package/dist/blocks/approvals/index.d.ts +3 -3
- package/dist/blocks/assets/index.d.ts +2 -2
- package/dist/blocks/assignment/index.d.ts +3 -3
- package/dist/blocks/attachments/index.d.ts +3 -3
- package/dist/blocks/audit/index.d.ts +7 -7
- package/dist/blocks/automations/index.d.ts +5 -5
- package/dist/blocks/billable-time/index.d.ts +2 -2
- package/dist/blocks/billing/index.d.ts +5 -5
- 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 +26 -3
- package/dist/blocks/catalog/index.js +41 -2
- 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 +5 -5
- package/dist/blocks/compliance/index.d.ts +2 -2
- package/dist/blocks/connectors/index.d.ts +3 -3
- package/dist/blocks/contacts/index.d.ts +3 -3
- package/dist/blocks/content/index.d.ts +2 -2
- package/dist/blocks/contracts/index.d.ts +2 -2
- package/dist/blocks/courses/index.d.ts +2 -2
- package/dist/blocks/created-by/index.d.ts +1 -1
- package/dist/blocks/custom-fields/index.d.ts +2 -2
- 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 +2 -2
- package/dist/blocks/documents/index.d.ts +2 -2
- package/dist/blocks/domains/index.d.ts +2 -2
- package/dist/blocks/donations/index.d.ts +2 -2
- package/dist/blocks/drive/index.d.ts +3 -3
- 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 +2 -2
- package/dist/blocks/entitlements/index.d.ts +3 -3
- package/dist/blocks/expenses/index.d.ts +4 -2
- package/dist/blocks/expenses/index.js +10 -3
- package/dist/blocks/field-history/index.d.ts +1 -1
- package/dist/blocks/flags/index.d.ts +2 -2
- package/dist/blocks/forecasts/index.d.ts +3 -3
- package/dist/blocks/forms/index.d.ts +3 -3
- package/dist/blocks/goals/index.d.ts +1 -1
- package/dist/blocks/guests/index.d.ts +2 -2
- package/dist/blocks/hiring/index.d.ts +3 -3
- package/dist/blocks/identities/index.d.ts +2 -2
- package/dist/blocks/imports/index.d.ts +2 -2
- package/dist/blocks/inbox/index.d.ts +6 -6
- package/dist/blocks/incidents/index.d.ts +2 -2
- package/dist/blocks/index.d.ts +4 -4
- package/dist/blocks/inventory/index.d.ts +171 -10
- package/dist/blocks/inventory/index.js +206 -13
- package/dist/blocks/invoices/index.d.ts +18 -4
- package/dist/blocks/invoices/index.js +13 -0
- package/dist/blocks/knowledge/index.d.ts +1 -1
- package/dist/blocks/lead-scoring/index.d.ts +1 -1
- package/dist/blocks/leases/index.d.ts +2 -2
- package/dist/blocks/leave/index.d.ts +2 -2
- package/dist/blocks/leave/index.js +1 -1
- package/dist/blocks/ledger/index.d.ts +2 -2
- package/dist/blocks/mail-sync/index.d.ts +3 -3
- package/dist/blocks/memberships/index.d.ts +1 -1
- package/dist/blocks/memory/index.d.ts +1 -1
- package/dist/blocks/messaging/index.d.ts +7 -7
- package/dist/blocks/metrics/index.d.ts +2 -2
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +2 -2
- package/dist/blocks/notifications/index.d.ts +7 -7
- package/dist/blocks/numbering/index.d.ts +2 -2
- package/dist/blocks/oauth-server/index.d.ts +2 -2
- package/dist/blocks/onboarding/index.d.ts +2 -2
- package/dist/blocks/orders/index.d.ts +80 -13
- package/dist/blocks/orders/index.js +63 -4
- package/dist/blocks/organizations/index.d.ts +4 -4
- package/dist/blocks/outbox/index.d.ts +2 -2
- package/dist/blocks/passes/index.d.ts +2 -2
- package/dist/blocks/permissions/index.d.ts +3 -3
- package/dist/blocks/pipelines/index.d.ts +3 -3
- package/dist/blocks/posts/index.d.ts +2 -2
- package/dist/blocks/profiles/index.d.ts +1 -1
- package/dist/blocks/promotions/index.d.ts +3 -3
- package/dist/blocks/promotions/index.js +1 -1
- package/dist/blocks/push/index.d.ts +3 -3
- package/dist/blocks/queue/index.d.ts +1 -1
- package/dist/blocks/quotes/index.d.ts +3 -3
- package/dist/blocks/rank/index.d.ts +1 -1
- package/dist/blocks/reactions/index.d.ts +5 -5
- package/dist/blocks/relations/index.d.ts +2 -2
- package/dist/blocks/reminders/index.d.ts +3 -3
- package/dist/blocks/reviews/index.d.ts +2 -2
- package/dist/blocks/saved-views/index.d.ts +4 -4
- package/dist/blocks/scores/index.d.ts +2 -2
- package/dist/blocks/search/index.d.ts +4 -4
- package/dist/blocks/security-events/index.d.ts +3 -3
- package/dist/blocks/segments/index.d.ts +3 -3
- package/dist/blocks/sequences/index.d.ts +2 -2
- package/dist/blocks/service-accounts/index.d.ts +2 -2
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/settings/index.d.ts +3 -3
- package/dist/blocks/share-links/index.d.ts +2 -2
- package/dist/blocks/shipments/index.d.ts +73 -4
- package/dist/blocks/shipments/index.js +57 -4
- package/dist/blocks/signatures/index.d.ts +2 -2
- 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 +3 -3
- package/dist/blocks/state-machine/index.d.ts +9 -2
- package/dist/blocks/state-machine/index.js +2 -0
- package/dist/blocks/subjects/index.d.ts +2 -2
- package/dist/blocks/tags/index.d.ts +3 -3
- package/dist/blocks/tasks/index.d.ts +5 -5
- package/dist/blocks/teams/index.d.ts +2 -2
- package/dist/blocks/templates/index.d.ts +122 -9
- package/dist/blocks/templates/index.js +157 -7
- package/dist/blocks/time-tracking/index.d.ts +3 -3
- package/dist/blocks/timeline/index.d.ts +9 -7
- package/dist/blocks/timeline/index.js +3 -1
- package/dist/blocks/trash/index.d.ts +2 -2
- package/dist/blocks/undo/index.d.ts +2 -2
- package/dist/blocks/updated-at/index.d.ts +1 -1
- package/dist/blocks/usage/index.d.ts +2 -2
- package/dist/blocks/vercel-marketplace/index.d.ts +2 -2
- package/dist/blocks/versions/index.d.ts +2 -2
- package/dist/blocks/waitlist/index.d.ts +2 -2
- package/dist/blocks/webhooks/index.d.ts +6 -6
- package/dist/blocks/workflow-editor/index.d.ts +7 -7
- package/dist/blocks/workflows/index.d.ts +5 -5
- package/dist/{carrier-D2b_028L.d.ts → carrier-B2eytEjR.d.ts} +10 -1
- package/dist/chat-sdk/index.d.ts +2 -2
- package/dist/claims/index.d.ts +5 -5
- package/dist/cli/{add-Duf1-19E.js → add-7nCSDmpt.js} +11 -11
- package/dist/cli/{add-D2CH8t_B.js → add-B4tQpnXP.js} +2 -2
- package/dist/cli/add-CdDneXMN.js +1 -0
- package/dist/cli/{app-table-files-ha8X0rRE.js → app-table-files-CtO-zxpO.js} +2 -2
- package/dist/cli/{app-tables-BIyQcsHH.js → app-tables-B7UzcJ_g.js} +2 -2
- package/dist/cli/{backfill-CLgA6-ll.js → backfill-B2nFDXaS.js} +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-9AeouX4h.js → blocks-BX_6HUQT.js} +2 -2
- package/dist/cli/{blocks-BVB1fMMj.js → blocks-DU4iDrYS.js} +1 -1
- package/dist/cli/{cache-aMk9vF1_.js → cache-bS5bAoF-.js} +1 -1
- package/dist/cli/{codemod-B5wrcnF2.js → codemod-B1sSIE2p.js} +88 -62
- package/dist/cli/{command-DM_x_yzZ.js → command-67WobzTC.js} +7 -1
- package/dist/cli/{completion-DbYb3N8e.js → completion-C3nMZgUZ.js} +2 -2
- package/dist/cli/{completion-CusuUJNn.js → completion-DSrus7H1.js} +1 -1
- package/dist/cli/{completion-Cx2UYd-y.js → completion-Dm0S3ub0.js} +2 -2
- package/dist/cli/{config-BeuImpav.js → config-cbK-wiNs.js} +1 -1
- package/dist/cli/{content-mapper-CEtdbshU.js → content-mapper-CW6V6VRq.js} +2 -2
- package/dist/cli/{db-CeiQzhPq.js → db-bK5eCLaE.js} +1 -1
- package/dist/cli/{doctor-DaOUWfRN.js → doctor-Dw2pAf1b.js} +16 -16
- package/dist/cli/env-AFfMXxWw.js +1 -0
- package/dist/cli/{env-DVV10l_r.js → env-CCT-dMFm.js} +1 -1
- package/dist/cli/{gen-BO-2NF-G.js → gen-BtoSx3go.js} +14 -14
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-Xit9Hnbb.js → init-DZXbrKuJ.js} +9 -9
- package/dist/cli/{keys-DJTN2Avl.js → keys-Dj5sJNj7.js} +1 -1
- package/dist/cli/{live-CuMpyRjF.js → live-CDFfJcdR.js} +2 -2
- package/dist/cli/{mcp-C7d4j5cq.js → mcp-BukxvITV.js} +3 -3
- package/dist/cli/{metadata-D2YvkY2D.js → metadata-iZizGVuY.js} +3 -3
- package/dist/cli/{migrate-BCXxyTKt.js → migrate-DPnnGLzw.js} +2 -2
- package/dist/cli/{migration-safety-DfwTOBQ4.js → migration-safety-COcnZbMO.js} +1 -1
- package/dist/cli/{migrations-nomh4TBo.js → migrations-BBt9fmiV.js} +2 -2
- package/dist/cli/{module-migration--9T_T-zt.js → module-migration-tCmPLhQp.js} +2 -2
- package/dist/cli/{moved-CT6i1csY.js → moved-CY0yDtAr.js} +1 -1
- package/dist/cli/{parse-qgJylE_A.js → parse-yAC-NFMq.js} +1 -1
- package/dist/cli/{powersync-DB9WZsIv.js → powersync-BRmUJ-uR.js} +4 -4
- package/dist/cli/powersync-CYLPcJ9G.js +1 -0
- package/dist/cli/{print-S6IF5rZm.js → print-DdwQNG_e.js} +2 -2
- package/dist/cli/{providers-BDTcal71.js → providers-CaNg6Ayz.js} +1 -1
- package/dist/cli/{prune-workflows-Zr2DjByi.js → prune-workflows-BQQrI3tU.js} +2 -2
- package/dist/cli/{remove-CPX5Tg5s.js → remove-BEj9YEON.js} +6 -6
- package/dist/cli/{render-Bp7a7XQ9.js → render-UBqU9r44.js} +3 -3
- package/dist/cli/{run-BclCFEyP.js → run-3E_IuJzS.js} +9 -9
- package/dist/cli/{run-kgG50x_Z.js → run-BXlX9YdD.js} +44 -43
- package/dist/cli/{run-BlVaLnt_.js → run-DX4X7xqV.js} +2 -2
- package/dist/cli/seed-CLlvrV8I.js +1 -0
- package/dist/cli/{seed-Cn2R91cd.js → seed-DSC6f0oh.js} +1 -1
- package/dist/cli/{shared-D60W9NS-.js → shared-agrqD28l.js} +1 -1
- package/dist/cli/{skills-DH-yPDny.js → skills-B5p6bDwe.js} +1 -1
- package/dist/cli/{snapshot-C3_eQUgY.js → snapshot-DOXmozSq.js} +2 -2
- package/dist/cli/{source-Bk6XwIAK.js → source-BfJprU-6.js} +1 -1
- package/dist/cli/{spec-BDTpcBns.js → spec-CgtIHFsl.js} +1 -1
- package/dist/cli/{spec-C8ydQwZC.js → spec-DRpSQGOW.js} +3 -3
- package/dist/cli/{sql-layout-DVQ20UMi.js → sql-layout-Cs3FMWcY.js} +2 -2
- package/dist/cli/{stack-CmhSfY5V.js → stack-CQXLe5j0.js} +1 -1
- package/dist/cli/{sync-D-WO4Yvl.js → sync-C_YGIDjk.js} +4 -4
- package/dist/cli/{table-k5OABwy3.js → table-BIQA9Hdt.js} +1 -1
- package/dist/cli/{upgrade-DGe5Pv6v.js → upgrade-ByQeJRGU.js} +5 -5
- package/dist/cli/{upgrade-XdhMuHAu.js → upgrade-OG9vaBeX.js} +3 -3
- package/dist/cli/{version-DKfeme2I.js → version-CF6Yzah0.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/native/index.d.ts +4 -4
- package/dist/{cloud-event-BEmAUdl1.d.ts → cloud-event-BjgxkfJJ.d.ts} +1 -1
- package/dist/{codecs-B9v5Y5HH.js → codecs-D_pOvjvD.js} +1 -0
- package/dist/{codecs-B1VO2BGL.d.ts → codecs-DaP45ETv.d.ts} +1 -1
- package/dist/{composite-B-oAH16L.d.ts → composite-DPN4SFud.d.ts} +6 -6
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +4 -4
- package/dist/{config-BrRlSxhx.js → config-1-UmQczM.js} +1 -1
- package/dist/{config-BKxjItQ-.js → config-AEB5iNEO.js} +4 -123
- package/dist/{connectors-CrLRW4Ol.d.ts → connectors-DDsdz-cn.d.ts} +1 -1
- package/dist/{context-yfOlyAqb.d.ts → context-CH5FYnVk.d.ts} +2 -2
- package/dist/contract/index.d.ts +8 -8
- package/dist/{controller-CAcLEndc.d.ts → controller-CJ6rLnpS.d.ts} +1 -1
- package/dist/{conversion-s1NtB6S-.d.ts → conversion-CLBBITW5.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/credentials/index.d.ts +3 -3
- package/dist/{define-BvkaC3Oh.d.ts → define-C_He1bQO.d.ts} +1 -1
- package/dist/{define-block-Ds3aLZwz.d.ts → define-block-CDw9YGVh.d.ts} +4 -4
- package/dist/edge/index.d.ts +8 -8
- package/dist/elysia/index.d.ts +1 -1
- package/dist/{ended-iq2wp8fc.d.ts → ended-BwpmNC5k.d.ts} +1 -1
- package/dist/{entitlements-Dhu-4vlH.d.ts → entitlements-6gODwBSz.d.ts} +2 -2
- package/dist/eve/index.d.ts +3 -3
- package/dist/events/index.d.ts +3 -3
- package/dist/{events-DCw3c6pj.d.ts → events-DddDlibJ.d.ts} +8 -0
- package/dist/{executor-H8ZLkeHj.d.ts → executor-CxMHiDp_.d.ts} +2 -2
- package/dist/{executor-B-o7QMPp.d.ts → executor-uNDJBzT8.d.ts} +1 -1
- package/dist/expo/index.d.ts +3 -3
- package/dist/{field-errors-DXZk9Qjt.d.ts → field-errors-CdSjV9Zo.d.ts} +7 -7
- package/dist/flags-sdk/index.d.ts +1 -1
- package/dist/{framework-Byr_j8G-.d.ts → framework-B6JAPr1i.d.ts} +7 -7
- package/dist/h3/index.d.ts +1 -1
- package/dist/h3/v1/index.d.ts +1 -1
- package/dist/hono/index.d.ts +8 -8
- package/dist/{index-lMApFSAd.d.ts → index-B5awu2SP.d.ts} +3 -3
- package/dist/{index-CnzGRpeH.d.ts → index-BgRl484n.d.ts} +5 -5
- package/dist/{index-6H-8Ib1w.d.ts → index-CgKieWlO.d.ts} +3 -3
- package/dist/{index-kkZwp5M1.d.ts → index-CrOeAgSh.d.ts} +4 -4
- package/dist/{index-Ag-T51Jl.d.ts → index-CvLTqmdq.d.ts} +1 -1
- package/dist/{index-Dbd1E5Au.d.ts → index-DAS_5OfK.d.ts} +3 -3
- package/dist/{index-CY612vAg.d.ts → index-DjJUamhw.d.ts} +2 -2
- package/dist/{index-Dv6lfL5p.d.ts → index-DnEJVKQ2.d.ts} +11 -11
- package/dist/{index-BUluRi0b.d.ts → index-DzLLMmUB.d.ts} +5 -5
- package/dist/{index-C78VPlXW.d.ts → index-vkd2LTt2.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/{instances-xQ2lupVE.js → instances-Bycf_aus.js} +86 -7
- package/dist/{kit-DCuO1ZhB.d.ts → kit-lHFpu2_1.d.ts} +3 -3
- package/dist/list/index.d.ts +1 -1
- package/dist/{list-query-D1h3Dmnk.d.ts → list-query-BkbLV-Yc.d.ts} +1 -1
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +3 -3
- package/dist/mcp/sdk/index.d.ts +5 -5
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/next/client/index.d.ts +1 -1
- package/dist/next/index.d.ts +22 -22
- package/dist/node/index.d.ts +2 -2
- package/dist/{operations-SWpzGC_K.d.ts → operations-knMnfzgm.d.ts} +1 -1
- package/dist/{options-DqmTs2nv.js → options-CEwoGUk_.js} +2 -1
- package/dist/{options-yRwYr4up.js → options-CGQC7Wue.js} +4 -1
- package/dist/{options-RYbyaVhv.js → options-CS1DA8q9.js} +1 -0
- package/dist/{options-ScQ6Hnxo.js → options-zsLpIqBA.js} +2 -1
- package/dist/orpc/index.d.ts +7 -7
- package/dist/otel/index.d.ts +1 -1
- package/dist/otel/index.js +4 -4
- package/dist/{outbox-BFZS6Kvz.d.ts → outbox-DikdzUKf.d.ts} +2 -2
- package/dist/{permissions-2UlVQDzY.d.ts → permissions-Ed8WvLgQ.d.ts} +1 -1
- package/dist/{pool-yO-LzZAd.d.ts → pool-BJAjQcrJ.d.ts} +1 -1
- package/dist/{ports-prqYrReN.d.ts → ports-Bnwy2mlR.d.ts} +1 -1
- package/dist/postgres/index.d.ts +1 -1
- package/dist/powersync/index.d.ts +3 -3
- package/dist/preset/index.d.ts +3 -3
- package/dist/preset/index.js +3 -3
- package/dist/{preset-BvHNleCo.js → preset-DkeXFh7e.js} +2 -2
- package/dist/{project-CBvowdKY.js → project-By0R8ioI.js} +5 -5
- package/dist/{provider-bIAzxVMB.d.ts → provider-CVlXXbda.d.ts} +1 -1
- package/dist/{push-token-DtqJeg8w.d.ts → push-token-CJbEvwjI.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/react/index.d.ts +8 -8
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +9 -9
- package/dist/react/session.d.ts +1 -1
- package/dist/react-router/index.d.ts +5 -5
- package/dist/realtime/index.d.ts +4 -4
- package/dist/{record-form-BQA-lawE.d.ts → record-form-C-gIxGXe.d.ts} +1 -1
- package/dist/records/index.d.ts +7 -7
- package/dist/{refusal-BX1EvmpJ.d.ts → refusal-CjUUBfhY.d.ts} +2 -2
- package/dist/{resolve-BIpQRhvF.d.ts → resolve-XlMQRUeG.d.ts} +1 -1
- package/dist/{resource-execute-A1NbR-sd.d.ts → resource-execute-B7-QaS6R.d.ts} +1 -1
- package/dist/{resource-types-CTcc37WL.d.ts → resource-types-CF3Uc6OW.d.ts} +2 -2
- package/dist/{resources-13ZFX1G6.d.ts → resources-DnHSmJIM.d.ts} +1 -1
- package/dist/{respond-CAxhkwAi.d.ts → respond-D7kUatjc.d.ts} +1 -1
- package/dist/server/index.d.ts +21 -21
- package/dist/{server-types-DEjva0MW.d.ts → server-types-DpI82uNq.d.ts} +8 -8
- package/dist/{session-CeYL3EPm.d.ts → session-JV1z0kxa.d.ts} +2 -2
- package/dist/{session-BA0YDmjt.d.ts → session-s-mUZ8RQ.d.ts} +5 -5
- package/dist/{session-status-Df6tuKY9.d.ts → session-status-CJjTuFtA.d.ts} +2 -2
- package/dist/{sign-in-4u4vLtXG.d.ts → sign-in-D5Bg7R47.d.ts} +1 -1
- package/dist/solid/index.d.ts +9 -9
- package/dist/solid-start/index.d.ts +5 -5
- package/dist/spec/index.d.ts +1 -1
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +3 -3
- package/dist/{sql-BChN3Hxv.js → sql-B2cMvGnZ.js} +4207 -756
- package/dist/sqlite/index.d.ts +1 -1
- package/dist/ssr/index.d.ts +4 -4
- package/dist/{statuses-BTrQ5H4S.js → statuses-Qqpzda35.js} +12 -1
- package/dist/stock-detail-BMqvwq1q.js +12 -0
- package/dist/stock-detail-BRIt7CjU.d.ts +19 -0
- package/dist/{subject-readers-YL8H9G8X.d.ts → subject-readers-D1Km_Q42.d.ts} +1 -1
- package/dist/{support-BwtMgjVg.d.ts → support-Dj5V2WTs.d.ts} +4 -4
- package/dist/{support-view-GykHOIQ2.d.ts → support-view-DKZkZeM5.d.ts} +1 -1
- package/dist/svelte/index.d.ts +8 -8
- package/dist/sveltekit/index.d.ts +6 -6
- package/dist/{tags-CAfvzA1U.d.ts → tags-BihwKkTT.d.ts} +1 -1
- package/dist/tanstack-db/index.d.ts +1 -1
- package/dist/tanstack-start/index.d.ts +5 -5
- package/dist/{tenant-lBgoqg9T.d.ts → tenant-eZNRWTRJ.d.ts} +1 -1
- package/dist/testing/index.d.ts +17 -17
- package/dist/testing/index.js +2 -2
- package/dist/{timeline-CrO48Qa6.d.ts → timeline-c6I3uxya.d.ts} +3 -3
- package/dist/{topic-x-mrN_Ff.d.ts → topic-D7F2FBNp.d.ts} +3 -3
- package/dist/{types-auvHrNWC.d.ts → types-BXLiM6VM.d.ts} +1 -1
- package/dist/{types-C9XfFGmA.d.ts → types-DtiDatvu.d.ts} +2 -2
- package/dist/{types-CJqNGQKb.d.ts → types-bqvFoBhf.d.ts} +2 -2
- package/dist/{vault-DjbG4XQS.d.ts → vault-CbhvnoVC.d.ts} +1 -1
- package/dist/vercel-connect/index.d.ts +1 -1
- package/dist/vercel-sandbox/index.d.ts +1 -1
- package/dist/{verify-HOiu3lRR.d.ts → verify-Cpc1upDA.d.ts} +1 -1
- package/dist/{view-DdDY88SC.d.ts → view-eHgOOyRS.d.ts} +1 -1
- package/dist/vue/index.d.ts +9 -9
- package/dist/{watch-topic-D6bcqOrJ.d.ts → watch-topic-BIEaSN0Y.d.ts} +1 -1
- package/dist/workflow-sdk/builder/index.d.ts +3 -3
- package/dist/workflow-sdk/index.d.ts +1 -1
- package/dist/workflow-sdk/world/index.d.ts +1 -1
- package/dist/workflow-sdk/world/index.js +1 -1
- package/dist/{workflow-sdk-CBS8L2Ku.js → workflow-sdk-6psRpDIo.js} +2 -50
- package/dist/{workflow-sdk-D3H10W5h.d.ts → workflow-sdk-CUt0E4v6.d.ts} +1 -1
- package/dist/yjs/index.d.ts +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +15 -0
- package/skills/better-supabase-auth/SKILL.md +1 -1
- package/dist/cli/add-De73Ghlh.js +0 -1
- package/dist/cli/env-BfWbheiC.js +0 -1
- package/dist/cli/powersync-IBM_v_eJ.js +0 -1
- package/dist/cli/seed-DGGjReq4.js +0 -1
- package/dist/resolved-names-b6P2--jK.js +0 -130
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
import { T as ErrorMapper, b as DbError, t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
|
|
4
4
|
import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
|
|
5
|
-
import { Ct as Events, dt as TemplateEventData, ut as TemplateApplicationEventData } from "../../events-
|
|
5
|
+
import { Ct as Events, dt as TemplateEventData, ut as TemplateApplicationEventData } from "../../events-DddDlibJ.js";
|
|
6
6
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
7
7
|
import { r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
|
|
10
|
-
import { c as
|
|
10
|
+
import { _ as JobHandler, c as EnqueueOnceOptions, l as EnqueueOnceResult } from "../../types-BdhE7I8Z.js";
|
|
11
|
+
import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
|
|
11
12
|
import { t as ComposedEmail } from "../../email-BRm6wMWQ.js";
|
|
12
|
-
import { O as WorkflowStepInfo, x as WorkflowEditor } from "../../types-
|
|
13
|
-
import { a as GraphStepCall } from "../../executor-
|
|
13
|
+
import { O as WorkflowStepInfo, x as WorkflowEditor } from "../../types-DtiDatvu.js";
|
|
14
|
+
import { a as GraphStepCall } from "../../executor-uNDJBzT8.js";
|
|
14
15
|
/** How a rendered value is escaped: for HTML markup, or left as it is. */
|
|
15
16
|
type MergeEscape = "html" | "text";
|
|
16
17
|
/** One merge field a record type offers, as an editor lists it. */
|
|
@@ -84,8 +85,106 @@ interface TemplateEmailOptions extends Pick<RenderMergeFieldsOptions, "missing"
|
|
|
84
85
|
* the subject and text as text, the HTML escaped for HTML.
|
|
85
86
|
*/
|
|
86
87
|
export declare function composeTemplateEmail(body: EmailTemplateBody, values: Readonly<Record<string, unknown>>, options?: TemplateEmailOptions): ComposedEmail;
|
|
87
|
-
/**
|
|
88
|
-
|
|
88
|
+
/** The queue `recurring.job` handles. */
|
|
89
|
+
export declare const TEMPLATE_RECUR_QUEUE = "templates.recur";
|
|
90
|
+
/** The payload `recurring.schedule` enqueues on `templates.recur`. */
|
|
91
|
+
interface TemplateRecurPayload {
|
|
92
|
+
readonly schedule: string;
|
|
93
|
+
/** ISO text. */
|
|
94
|
+
readonly occurrenceAt: string;
|
|
95
|
+
readonly organizationId: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The jobs queue `recurring.schedule` enqueues on: the `queue` block's client,
|
|
99
|
+
* typed by shape so this block doesn't need it.
|
|
100
|
+
*/
|
|
101
|
+
interface TemplateJobs {
|
|
102
|
+
enqueueOnce(queue: typeof TEMPLATE_RECUR_QUEUE, payload: TemplateRecurPayload, options: EnqueueOnceOptions): AsyncResult<EnqueueOnceResult>;
|
|
103
|
+
}
|
|
104
|
+
/** A schedule that applies a template at each occurrence of an RRULE. */
|
|
105
|
+
interface TemplateSchedule {
|
|
106
|
+
readonly id: string;
|
|
107
|
+
readonly template: string;
|
|
108
|
+
readonly organizationId: string;
|
|
109
|
+
/** The `values` each apply gets. */
|
|
110
|
+
readonly input: Readonly<Record<string, unknown>>;
|
|
111
|
+
readonly enabled: boolean;
|
|
112
|
+
readonly dtstart: Temporal.Instant;
|
|
113
|
+
/** The IANA time zone the rule expands in. */
|
|
114
|
+
readonly tzid: string;
|
|
115
|
+
readonly rrule: string;
|
|
116
|
+
readonly createdBy: string | undefined;
|
|
117
|
+
readonly createdAt: Temporal.Instant;
|
|
118
|
+
readonly updatedAt: Temporal.Instant;
|
|
119
|
+
}
|
|
120
|
+
interface TemplateScheduleInput {
|
|
121
|
+
/** Leave it out to create a schedule. */
|
|
122
|
+
readonly id?: string;
|
|
123
|
+
readonly template: string;
|
|
124
|
+
readonly organizationId: string;
|
|
125
|
+
readonly dtstart: Temporal.Instant;
|
|
126
|
+
/** Default `UTC`. */
|
|
127
|
+
readonly tzid?: string;
|
|
128
|
+
/** An RFC 5545 RRULE, such as `FREQ=MONTHLY;BYMONTHDAY=1`. */
|
|
129
|
+
readonly rrule: string;
|
|
130
|
+
readonly input?: Readonly<Record<string, unknown>>;
|
|
131
|
+
/** Default `true`. */
|
|
132
|
+
readonly enabled?: boolean;
|
|
133
|
+
}
|
|
134
|
+
/** What `recurring.schedule` plans and when. */
|
|
135
|
+
interface TemplateScheduleOptions {
|
|
136
|
+
/** Default: now. */
|
|
137
|
+
readonly now?: Temporal.Instant;
|
|
138
|
+
/** How far ahead to enqueue occurrences, in minutes. Default 1440 (a day). */
|
|
139
|
+
readonly horizonMinutes?: number;
|
|
140
|
+
/** How far back a missed occurrence still runs, in minutes. Default 15. */
|
|
141
|
+
readonly lookbackMinutes?: number;
|
|
142
|
+
}
|
|
143
|
+
/** What one `recurring.schedule` run did. */
|
|
144
|
+
interface TemplateScheduleResult {
|
|
145
|
+
readonly planned: number;
|
|
146
|
+
readonly enqueued: number;
|
|
147
|
+
readonly duplicates: number;
|
|
148
|
+
/** Schedules whose time zone or rule couldn't be expanded. */
|
|
149
|
+
readonly skipped: number;
|
|
150
|
+
}
|
|
151
|
+
/** What `recurring.run` did for one occurrence. */
|
|
152
|
+
type TemplateOccurrence = {
|
|
153
|
+
readonly status: "applied";
|
|
154
|
+
readonly application: string;
|
|
155
|
+
} | {
|
|
156
|
+
readonly status: "skipped";
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Recurring records: schedules that apply a template at each occurrence of a
|
|
160
|
+
* recurrence rule kept in the reminders module. Needs the reminders module.
|
|
161
|
+
*/
|
|
162
|
+
interface TemplateRecurring {
|
|
163
|
+
/** Creates or changes a schedule. `templates.manage` in its organization. */
|
|
164
|
+
upsert(input: TemplateScheduleInput): AsyncResult<TemplateSchedule>;
|
|
165
|
+
/** The organization's schedules, of one template when given. */
|
|
166
|
+
list(organizationId: string, template?: string): AsyncResult<readonly TemplateSchedule[]>;
|
|
167
|
+
remove(id: string): AsyncResult<boolean>;
|
|
168
|
+
/**
|
|
169
|
+
* Service role. Expands every enabled schedule and enqueues one
|
|
170
|
+
* `templates.recur` job per occurrence due in the window on `jobs`, once per
|
|
171
|
+
* schedule and occurrence.
|
|
172
|
+
*/
|
|
173
|
+
schedule(options?: TemplateScheduleOptions): AsyncResult<TemplateScheduleResult>;
|
|
174
|
+
/**
|
|
175
|
+
* Service role. Claims the occurrence, applies the template with the
|
|
176
|
+
* schedule's input under the key `template-schedule:<id>:<occurrence>`, and
|
|
177
|
+
* records the application. An occurrence that already made one is skipped.
|
|
178
|
+
*/
|
|
179
|
+
run(schedule: string, occurrenceAt: Temporal.Instant): AsyncResult<TemplateOccurrence>;
|
|
180
|
+
/** The handler for the `templates.recur` queue. */
|
|
181
|
+
readonly job: JobHandler<unknown>;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Where a template lives: one organization, every organization of one brand
|
|
185
|
+
* (`options.brand`), or every one as a system starter.
|
|
186
|
+
*/
|
|
187
|
+
type TemplateScope = "tenant" | "brand" | "system";
|
|
89
188
|
/**
|
|
90
189
|
* A template type, such as `invoice` or `project`: Standard Schemas for its
|
|
91
190
|
* settings and body (checked on every write and parsed on apply), the merge
|
|
@@ -130,9 +229,11 @@ export declare function defineTemplateType<Settings = unknown, Body = unknown>(t
|
|
|
130
229
|
/** A template. `F` types the extra columns the `fields` schema describes. */
|
|
131
230
|
interface Template<F extends object = Record<never, never>> {
|
|
132
231
|
readonly id: string;
|
|
133
|
-
/** `undefined` for a system template. */
|
|
232
|
+
/** `undefined` for a system or brand template. */
|
|
134
233
|
readonly organizationId: string | undefined;
|
|
135
234
|
readonly scope: TemplateScope;
|
|
235
|
+
/** The brand of a brand template; `undefined` otherwise. */
|
|
236
|
+
readonly brand: string | undefined;
|
|
136
237
|
/** The key `sync` keeps a system template by. */
|
|
137
238
|
readonly key: string | undefined;
|
|
138
239
|
readonly type: string;
|
|
@@ -207,9 +308,14 @@ interface TemplateInput<F extends object = Record<never, never>> {
|
|
|
207
308
|
/** The extra columns to set. */
|
|
208
309
|
readonly fields?: Partial<F>;
|
|
209
310
|
}
|
|
210
|
-
/** A system template `sync` keeps, by key. */
|
|
311
|
+
/** A system template `sync` keeps, by key (and brand). */
|
|
211
312
|
interface TemplateStarter {
|
|
212
313
|
readonly key: string;
|
|
314
|
+
/**
|
|
315
|
+
* Makes it a starter of one brand, for the organizations whose brand column
|
|
316
|
+
* (`options.brand`) holds this value.
|
|
317
|
+
*/
|
|
318
|
+
readonly brand?: string;
|
|
213
319
|
readonly type: string;
|
|
214
320
|
readonly name: string;
|
|
215
321
|
readonly language?: string;
|
|
@@ -294,6 +400,8 @@ interface Templates<F extends object = Record<never, never>> {
|
|
|
294
400
|
* on the new record. `templates.apply` in `into`.
|
|
295
401
|
*/
|
|
296
402
|
apply(template: string, options: ApplyOptions): AsyncResult<TemplateApplyResult>;
|
|
403
|
+
/** Templates applied on a recurrence rule. Needs the reminders module. */
|
|
404
|
+
readonly recurring: TemplateRecurring;
|
|
297
405
|
readonly applications: {
|
|
298
406
|
/** Newest first, at most 200. */
|
|
299
407
|
list(organizationId: string, filter?: {
|
|
@@ -319,6 +427,11 @@ interface TemplatesOptions<S extends StandardSchemaV1 | undefined = undefined> e
|
|
|
319
427
|
readonly types?: Readonly<Record<string, TemplateType>>;
|
|
320
428
|
/** Starts the attached workflows; `createWorkflowEditor` as the caller. */
|
|
321
429
|
readonly workflows?: Pick<WorkflowEditor, "run">;
|
|
430
|
+
/**
|
|
431
|
+
* The jobs queue `recurring.schedule` enqueues occurrences on, such as the
|
|
432
|
+
* client `createQueue` returns.
|
|
433
|
+
*/
|
|
434
|
+
readonly jobs?: TemplateJobs;
|
|
322
435
|
/** `withBlockHooks` hooks around the client's methods. */
|
|
323
436
|
readonly hooks?: NoInfer<BlockHooks<Templates<FieldsOf<S>>>>;
|
|
324
437
|
/** Receives the errors `after` hooks throw. Default: `console`. */
|
|
@@ -365,4 +478,4 @@ type TemplatesEvents = {
|
|
|
365
478
|
export declare const templatesEvents: Events<TemplatesEvents>;
|
|
366
479
|
/** The `templates` block's manifest (ADR 0029). */
|
|
367
480
|
export declare const templatesBlock: BlockOf<"templates", typeof createTemplates, TemplatesEvents>;
|
|
368
|
-
export { type ApplyOptions, type BlockTransport, type EmailTemplateBody, type MergeEscape, type MergeFieldCatalog, type MergeFieldSpec, type MergeValues, type RenderMergeFieldsOptions, type Template, type TemplateApplication, type TemplateApplied, type TemplateApplyCall, type TemplateApplyResult, type TemplateDetail, type TemplateEmailOptions, type TemplateInput, type TemplateRunStart, type TemplateScope, type TemplateStarter, type TemplateSubject, type TemplateType, type TemplateVersion, type TemplateWorkflow, type TemplateWorkflowInput, type Templates, type TemplatesApplyOutput, type TemplatesEvents, type TemplatesOptions, dbTransport, rpcTransport, sqlTransport };
|
|
481
|
+
export { type ApplyOptions, type BlockTransport, type EmailTemplateBody, type MergeEscape, type MergeFieldCatalog, type MergeFieldSpec, type MergeValues, type RenderMergeFieldsOptions, type Template, type TemplateApplication, type TemplateApplied, type TemplateApplyCall, type TemplateApplyResult, type TemplateDetail, type TemplateEmailOptions, type TemplateInput, type TemplateJobs, type TemplateOccurrence, type TemplateRecurPayload, type TemplateRecurring, type TemplateRunStart, type TemplateSchedule, type TemplateScheduleInput, type TemplateScheduleOptions, type TemplateScheduleResult, type TemplateScope, type TemplateStarter, type TemplateSubject, type TemplateType, type TemplateVersion, type TemplateWorkflow, type TemplateWorkflowInput, type Templates, type TemplatesApplyOutput, type TemplatesEvents, type TemplatesOptions, dbTransport, rpcTransport, sqlTransport };
|
|
@@ -1,16 +1,151 @@
|
|
|
1
1
|
import { t as DbException } from "../../db-exception-Dv18UZ-I.js";
|
|
2
2
|
import { n as dbError } from "../../errors-B7tCfCvX.js";
|
|
3
3
|
import { n as isRecord } from "../../guards-CsRa6v57.js";
|
|
4
|
+
import { n as isInstant } from "../../temporal-DKTdGK9i.js";
|
|
5
|
+
import { t as temporal } from "../../temporal-required-w_2u4EDp.js";
|
|
4
6
|
import { a as ok, r as err, t as AsyncResult } from "../../result-8xza7w5W.js";
|
|
5
7
|
import { n as validate } from "../../standard-BD2aOUsf.js";
|
|
6
|
-
import { t as templatesSqlOptions } from "../../options-
|
|
8
|
+
import { t as templatesSqlOptions } from "../../options-CGQC7Wue.js";
|
|
7
9
|
import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
|
|
8
|
-
import { A as recordsOf, C as optionalInstant, L as textOf, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, d as enumOrThrow, j as requiredInstant, k as recordOrEmpty, n as applyTemporal, o as blockCall, r as asDbError, w as optionalText } from "../../block-helpers-I7UzjNEf.js";
|
|
10
|
+
import { A as recordsOf, C as optionalInstant, L as textOf, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, d as enumOrThrow, h as instantOf, j as requiredInstant, k as recordOrEmpty, n as applyTemporal, o as blockCall, r as asDbError, w as optionalText } from "../../block-helpers-I7UzjNEf.js";
|
|
9
11
|
import { r as withBlockHooks } from "../../block-hooks-CadxQ9-_.js";
|
|
10
12
|
import { n as blockFields } from "../../block-fields-Bjcv6_zc.js";
|
|
11
13
|
import { n as defineBlock } from "../../define-block-22Jv4U_-.js";
|
|
14
|
+
import { t as expandRule } from "../../rrule-BLpe2449.js";
|
|
15
|
+
// src/blocks/templates/recurring.ts
|
|
16
|
+
/** The queue `recurring.job` handles. */
|
|
17
|
+
const TEMPLATE_RECUR_QUEUE = "templates.recur";
|
|
18
|
+
function scheduleOf(row) {
|
|
19
|
+
return {
|
|
20
|
+
id: textOf(row["id"]),
|
|
21
|
+
template: textOf(row["template"]),
|
|
22
|
+
organizationId: textOf(row["tenant"]),
|
|
23
|
+
input: recordOrEmpty(row["input"]),
|
|
24
|
+
enabled: row["enabled"] !== false,
|
|
25
|
+
dtstart: requiredInstant(row["dtstart"], "dtstart"),
|
|
26
|
+
tzid: optionalText(row["tzid"]) ?? "UTC",
|
|
27
|
+
rrule: textOf(row["rrule"]),
|
|
28
|
+
createdBy: optionalText(row["createdBy"]),
|
|
29
|
+
createdAt: requiredInstant(row["createdAt"], "createdAt"),
|
|
30
|
+
updatedAt: requiredInstant(row["updatedAt"], "updatedAt")
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** Each schedule's occurrences in the window, and how many couldn't expand. */
|
|
34
|
+
function planOccurrences(schedules, window) {
|
|
35
|
+
const planned = [];
|
|
36
|
+
let skipped = 0;
|
|
37
|
+
for (const schedule of schedules) try {
|
|
38
|
+
const occurrences = expandRule({
|
|
39
|
+
dtstart: schedule.dtstart.toZonedDateTimeISO(schedule.tzid),
|
|
40
|
+
rrule: schedule.rrule,
|
|
41
|
+
window: {
|
|
42
|
+
from: window.from,
|
|
43
|
+
until: window.until
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
for (const occurrence of occurrences) planned.push({
|
|
47
|
+
schedule,
|
|
48
|
+
occurrenceAt: occurrence.toInstant()
|
|
49
|
+
});
|
|
50
|
+
} catch {
|
|
51
|
+
skipped += 1;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
planned,
|
|
55
|
+
skipped
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function payloadOf(value) {
|
|
59
|
+
if (!isRecord(value)) throw new TypeError(`${TEMPLATE_RECUR_QUEUE} needs an object payload`);
|
|
60
|
+
const at = value["occurrenceAt"];
|
|
61
|
+
return {
|
|
62
|
+
schedule: textOf(value["schedule"]),
|
|
63
|
+
occurrenceAt: isInstant(at) ? at : instantOf(at)
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const jobsMissing = () => dbError("unexpected", "templates.recurring.schedule needs the jobs queue: pass `jobs` to createTemplates", { hint: "TEMPLATE_JOBS_MISSING" });
|
|
67
|
+
function createTemplateRecurring(deps) {
|
|
68
|
+
const { call } = deps;
|
|
69
|
+
const run = (schedule, occurrenceAt) => call("claim_template_occurrence", {
|
|
70
|
+
schedule_id: schedule,
|
|
71
|
+
occurrence_at: occurrenceAt.toString()
|
|
72
|
+
}, (value) => isRecord(value) ? scheduleOf(value) : void 0).andThen((claimed) => {
|
|
73
|
+
if (claimed === void 0) return AsyncResult.ok({ status: "skipped" });
|
|
74
|
+
return deps.apply(claimed.template, {
|
|
75
|
+
into: claimed.organizationId,
|
|
76
|
+
values: claimed.input,
|
|
77
|
+
key: `template-schedule:${claimed.id}:${occurrenceAt.toString()}`
|
|
78
|
+
}).andThen(({ application }) => call("finish_template_occurrence", {
|
|
79
|
+
schedule_id: claimed.id,
|
|
80
|
+
occurrence_at: occurrenceAt.toString(),
|
|
81
|
+
application_id: application.id
|
|
82
|
+
}, () => ({
|
|
83
|
+
status: "applied",
|
|
84
|
+
application: application.id
|
|
85
|
+
})));
|
|
86
|
+
});
|
|
87
|
+
return {
|
|
88
|
+
upsert: (input) => call("save_template_schedule", {
|
|
89
|
+
schedule_id: input.id ?? null,
|
|
90
|
+
template_id: input.template,
|
|
91
|
+
tenant: input.organizationId,
|
|
92
|
+
dtstart: input.dtstart.toString(),
|
|
93
|
+
tzid: input.tzid ?? "UTC",
|
|
94
|
+
rrule: input.rrule,
|
|
95
|
+
input: input.input ?? {},
|
|
96
|
+
enabled: input.enabled ?? true
|
|
97
|
+
}, (value) => scheduleOf(recordOf(value, "save_template_schedule"))),
|
|
98
|
+
list: (organizationId, template) => call("template_schedules_list", {
|
|
99
|
+
tenant: organizationId,
|
|
100
|
+
template_id: template ?? null
|
|
101
|
+
}, (value) => recordsOf(value, "template_schedules_list").map(scheduleOf)),
|
|
102
|
+
remove: (id) => call("remove_template_schedule", { schedule_id: id }, (value) => value === true),
|
|
103
|
+
schedule: (options = {}) => AsyncResult.from(async () => {
|
|
104
|
+
const jobs = deps.jobs;
|
|
105
|
+
if (jobs === void 0) return err(jobsMissing());
|
|
106
|
+
const now = options.now ?? temporal().Now.instant();
|
|
107
|
+
const window = {
|
|
108
|
+
from: now.subtract({ minutes: options.lookbackMinutes ?? 15 }),
|
|
109
|
+
until: now.add({ minutes: options.horizonMinutes ?? 1440 })
|
|
110
|
+
};
|
|
111
|
+
const rows = await call("list_template_schedule", {}, (value) => recordsOf(value, "list_template_schedule").map(scheduleOf));
|
|
112
|
+
if (!rows.ok) return rows;
|
|
113
|
+
const { planned, skipped } = planOccurrences(rows.data, window);
|
|
114
|
+
let enqueued = 0;
|
|
115
|
+
for (const { schedule, occurrenceAt } of planned) {
|
|
116
|
+
const iso = occurrenceAt.toString();
|
|
117
|
+
const job = await jobs.enqueueOnce(TEMPLATE_RECUR_QUEUE, {
|
|
118
|
+
schedule: schedule.id,
|
|
119
|
+
occurrenceAt: iso,
|
|
120
|
+
organizationId: schedule.organizationId
|
|
121
|
+
}, {
|
|
122
|
+
dedupeKey: `${schedule.id}:${iso}`,
|
|
123
|
+
runAt: temporal().Instant.compare(occurrenceAt, now) < 0 ? now : occurrenceAt,
|
|
124
|
+
context: { tenant: schedule.organizationId }
|
|
125
|
+
});
|
|
126
|
+
if (!job.ok) return job;
|
|
127
|
+
enqueued += job.data.duplicate ? 0 : 1;
|
|
128
|
+
}
|
|
129
|
+
return ok({
|
|
130
|
+
planned: planned.length,
|
|
131
|
+
enqueued,
|
|
132
|
+
duplicates: planned.length - enqueued,
|
|
133
|
+
skipped
|
|
134
|
+
});
|
|
135
|
+
}),
|
|
136
|
+
run,
|
|
137
|
+
job: async (payload) => {
|
|
138
|
+
const { schedule, occurrenceAt } = payloadOf(payload);
|
|
139
|
+
await run(schedule, occurrenceAt).orThrow();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
12
143
|
// src/blocks/templates/templates.ts
|
|
13
|
-
const SCOPES = [
|
|
144
|
+
const SCOPES = [
|
|
145
|
+
"tenant",
|
|
146
|
+
"brand",
|
|
147
|
+
"system"
|
|
148
|
+
];
|
|
14
149
|
/** Declares a template type with its schemas typed. */
|
|
15
150
|
function defineTemplateType(type) {
|
|
16
151
|
return type;
|
|
@@ -25,6 +160,7 @@ function templateOf(row) {
|
|
|
25
160
|
id: textOf(row["id"]),
|
|
26
161
|
organizationId: optionalText(row["tenant"]),
|
|
27
162
|
scope: enumOrThrow(row["scope"], SCOPES, "template scope"),
|
|
163
|
+
brand: optionalText(row["brand"]),
|
|
28
164
|
key: optionalText(row["key"]),
|
|
29
165
|
type: textOf(row["type"]),
|
|
30
166
|
name: textOf(row["name"]),
|
|
@@ -136,7 +272,7 @@ function createTemplates(options) {
|
|
|
136
272
|
}
|
|
137
273
|
return runs;
|
|
138
274
|
};
|
|
139
|
-
|
|
275
|
+
const client = {
|
|
140
276
|
upsert: (input) => AsyncResult.from(async () => {
|
|
141
277
|
const extra = await fields.args(input.fields);
|
|
142
278
|
if (!extra.ok) return extra;
|
|
@@ -182,6 +318,7 @@ function createTemplates(options) {
|
|
|
182
318
|
if (!body.ok) return body;
|
|
183
319
|
rows.push({
|
|
184
320
|
key: starter.key,
|
|
321
|
+
...starter.brand === void 0 ? {} : { brand: starter.brand },
|
|
185
322
|
type: starter.type,
|
|
186
323
|
name: starter.name,
|
|
187
324
|
...starter.language === void 0 ? {} : { language: starter.language },
|
|
@@ -258,16 +395,23 @@ function createTemplates(options) {
|
|
|
258
395
|
runs
|
|
259
396
|
});
|
|
260
397
|
}),
|
|
398
|
+
recurring: createTemplateRecurring({
|
|
399
|
+
call,
|
|
400
|
+
apply: (template, applyOptions) => hooked.apply(template, applyOptions),
|
|
401
|
+
...options.jobs === void 0 ? {} : { jobs: options.jobs }
|
|
402
|
+
}),
|
|
261
403
|
applications: { list: (organizationId, filter = {}) => call("template_applications_list", {
|
|
262
404
|
tenant: organizationId,
|
|
263
405
|
template_id: filter.template ?? null,
|
|
264
406
|
subject_type: filter.subject?.type ?? null,
|
|
265
407
|
subject_id: filter.subject?.id ?? null
|
|
266
408
|
}, (value) => recordsOf(value, "template_applications_list").map(applicationOf)) }
|
|
267
|
-
}
|
|
409
|
+
};
|
|
410
|
+
const hooked = withBlockHooks(client, options.hooks, {
|
|
268
411
|
block: "templates",
|
|
269
412
|
...options.logger ? { logger: options.logger } : {}
|
|
270
413
|
});
|
|
414
|
+
return hooked;
|
|
271
415
|
}
|
|
272
416
|
// src/blocks/templates/merge-fields.ts
|
|
273
417
|
const FIELD = /\{\{\{\s*([A-Za-z_][\w.-]*)\s*\}\}\}|\{\{\s*([A-Za-z_][\w.-]*)\s*\}\}/g;
|
|
@@ -471,6 +615,12 @@ const templatesBlock = defineBlock({
|
|
|
471
615
|
events: templatesEvents,
|
|
472
616
|
create: createTemplates,
|
|
473
617
|
category: "content",
|
|
474
|
-
recipes: ["templates-gallery"]
|
|
618
|
+
recipes: ["templates-gallery"],
|
|
619
|
+
schedules: [{
|
|
620
|
+
name: "recurring",
|
|
621
|
+
cron: "*/5 * * * *",
|
|
622
|
+
runs: "recurring.schedule()",
|
|
623
|
+
description: "Enqueues a templates.recur job for each recurring template occurrence due in the next day."
|
|
624
|
+
}]
|
|
475
625
|
});
|
|
476
|
-
export { TEMPLATES_APPLY_STEP, composeTemplateEmail, createTemplates, dbTransport, defineMergeFields, defineTemplateType, mergeFieldsIn, renderMergeFields, rpcTransport, sqlTransport, templatesApplyStep, templatesBlock, templatesEvents };
|
|
626
|
+
export { TEMPLATES_APPLY_STEP, TEMPLATE_RECUR_QUEUE, composeTemplateEmail, createTemplates, dbTransport, defineMergeFields, defineTemplateType, mergeFieldsIn, renderMergeFields, rpcTransport, sqlTransport, templatesApplyStep, templatesBlock, templatesEvents };
|
|
@@ -3,14 +3,14 @@ import { T as ErrorMapper, t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
|
|
4
4
|
import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
|
|
5
5
|
import { et as RecordRef } from "../../types-BzIYSSWK.js";
|
|
6
|
-
import { Ct as Events, ft as TimeEntryEventData, pt as TimesheetEventData } from "../../events-
|
|
6
|
+
import { Ct as Events, ft as TimeEntryEventData, pt as TimesheetEventData } from "../../events-DddDlibJ.js";
|
|
7
7
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
8
8
|
import { a as BlockTenantOptions, r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
|
|
9
9
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
10
10
|
import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
|
|
11
|
-
import { c as BlockOf } from "../../define-block-
|
|
11
|
+
import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
|
|
12
12
|
import { n as Money } from "../../money-BgpAd7d3.js";
|
|
13
|
-
import { t as CloudEvent } from "../../cloud-event-
|
|
13
|
+
import { t as CloudEvent } from "../../cloud-event-BjgxkfJJ.js";
|
|
14
14
|
import { n as MetricDefinition } from "../../metric-definition-2KQYeUZ1.js";
|
|
15
15
|
interface TimeTrackingOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions, BlockTenantOptions {
|
|
16
16
|
readonly transport: BlockTransport;
|
|
@@ -5,18 +5,20 @@ import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
|
5
5
|
import { a as BlockTenantOptions, i as CursorPageOptions, r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
|
|
6
6
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
7
7
|
import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
|
|
8
|
-
import { t as BetterSupabase } from "../../define-
|
|
9
|
-
import { c as BlockOf } from "../../define-block-
|
|
10
|
-
import { i as EventSink, t as CloudEvent } from "../../cloud-event-
|
|
11
|
-
import { i as ListDefinition } from "../../list-query-
|
|
8
|
+
import { t as BetterSupabase } from "../../define-C_He1bQO.js";
|
|
9
|
+
import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
|
|
10
|
+
import { i as EventSink, t as CloudEvent } from "../../cloud-event-BjgxkfJJ.js";
|
|
11
|
+
import { i as ListDefinition } from "../../list-query-BkbLV-Yc.js";
|
|
12
12
|
/**
|
|
13
13
|
* Where a timeline entry comes from: `event` for an `activity_entries` row that
|
|
14
14
|
* `activitySink()` wrote, `audit` for an audit log entry on the subject's row
|
|
15
15
|
* (with the `audit` and `subjects` modules), `delivery` for a notification
|
|
16
|
-
* delivery about the subject (with `notifications`)
|
|
17
|
-
*
|
|
16
|
+
* delivery about the subject (with `notifications`), `run` for a workflow run
|
|
17
|
+
* on it (with `workflows`), `transition` for a status change of the subject
|
|
18
|
+
* (with `state-machine`) and `message` for a message in the subject's
|
|
19
|
+
* conversation (with `messaging`).
|
|
18
20
|
*/
|
|
19
|
-
type ActivitySource = "event" | "audit" | "delivery" | "run";
|
|
21
|
+
type ActivitySource = "event" | "audit" | "delivery" | "run" | "transition" | "message";
|
|
20
22
|
interface ActivityEntry {
|
|
21
23
|
/** An `activity_entries` id, or the audit entry's, delivery's or run's id. */
|
|
22
24
|
readonly id: string;
|
|
@@ -3,12 +3,12 @@ import { t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
|
|
4
4
|
import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
|
|
5
5
|
import { Ft as RepositoryExtension, Nt as Plugin, Ot as HasFlag, Q as PrimaryKeyValue } from "../../types-BzIYSSWK.js";
|
|
6
|
-
import { A as CollaborationEventData, Ct as Events } from "../../events-
|
|
6
|
+
import { A as CollaborationEventData, Ct as Events } from "../../events-DddDlibJ.js";
|
|
7
7
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
8
8
|
import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
|
|
9
9
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
10
10
|
import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
|
|
11
|
-
import { c as BlockOf } from "../../define-block-
|
|
11
|
+
import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
|
|
12
12
|
interface TrashOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockOptions {
|
|
13
13
|
/**
|
|
14
14
|
* A Standard Schema for the trash item's extra columns
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
2
|
-
import { c as BlockOf } from "../../define-block-
|
|
3
|
-
import { n as Controller } from "../../controller-
|
|
2
|
+
import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
|
|
3
|
+
import { n as Controller } from "../../controller-CJ6rLnpS.js";
|
|
4
4
|
import { a as UndoToken, c as undoToken, i as UndoOptions, n as Undo, o as createUndo, r as UndoCall, s as isUndoToken, t as UNDO_FUNCTIONS } from "../../undo-CdKp5_2X.js";
|
|
5
5
|
interface UndoEntry {
|
|
6
6
|
readonly id: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { Nt as Plugin } from "../../types-BzIYSSWK.js";
|
|
3
3
|
import { t as UpdatedAtSqlOptions } from "../../options-CJVYQue3.js";
|
|
4
|
-
import { r as Block } from "../../define-block-
|
|
4
|
+
import { r as Block } from "../../define-block-CDw9YGVh.js";
|
|
5
5
|
/**
|
|
6
6
|
* The `updated-at` block's repository extension. Stamps the columns generated
|
|
7
7
|
* as `Flags.timestamps`: `createdAt` on insert, `updatedAt` on insert and
|
|
@@ -2,8 +2,8 @@ import { b as DbError } from "../../result-DTOQRyGY.js";
|
|
|
2
2
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
3
3
|
import { n as StripeSource, t as StripeClient } from "../../stripe-Bl-sjnl6.js";
|
|
4
4
|
import { _ as reportUsageToStripe, a as Usage, c as UsageEntry, d as UsageMeterInfo, f as UsageOptions, g as createUsage, h as UsageStatus, i as ReportUsageResult, l as UsageHistoryEntry, m as UsageRecorded, n as RecordUsageOptions, o as UsageBatchRecorded, p as UsagePeriod, r as ReportUsageOptions, s as UsageBreakdownEntry, t as PurgeUsageOptions, u as UsageHistoryOptions } from "../../usage-DZ8j5Tm_.js";
|
|
5
|
-
import { c as BlockOf } from "../../define-block-
|
|
6
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
5
|
+
import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
|
|
6
|
+
import { n as Controller, t as AuthPort } from "../../controller-CJ6rLnpS.js";
|
|
7
7
|
/** The `usage` block's manifest (ADR 0029). */
|
|
8
8
|
export declare const usageBlock: BlockOf<"usage", typeof createUsage>;
|
|
9
9
|
interface UsageMeterControllerOptions {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, b as DbError, t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
3
|
-
import { Ct as Events } from "../../events-
|
|
3
|
+
import { Ct as Events } from "../../events-DddDlibJ.js";
|
|
4
4
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
5
5
|
import { r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
|
|
6
6
|
import { s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
7
7
|
import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
|
|
8
8
|
import { a as ProblemFormat, t as BlockProblemOptions } from "../../problem-NGBjN-TO.js";
|
|
9
|
-
import { c as BlockOf } from "../../define-block-
|
|
9
|
+
import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
|
|
10
10
|
import { n as Jwks } from "../../jws-CxgTsbgG.js";
|
|
11
11
|
/** The Vercel environments a resource's secrets reach. */
|
|
12
12
|
type VercelEnvironment = "production" | "preview" | "development";
|
|
@@ -3,12 +3,12 @@ import { t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
|
|
4
4
|
import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
|
|
5
5
|
import { et as RecordRef } from "../../types-BzIYSSWK.js";
|
|
6
|
-
import { A as CollaborationEventData, Ct as Events } from "../../events-
|
|
6
|
+
import { A as CollaborationEventData, Ct as Events } from "../../events-DddDlibJ.js";
|
|
7
7
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
8
8
|
import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
|
|
9
9
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
10
10
|
import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
|
|
11
|
-
import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-
|
|
11
|
+
import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-CDw9YGVh.js";
|
|
12
12
|
/** A JSON value, as a version's content holds it. */
|
|
13
13
|
type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
|
|
14
14
|
readonly [key: string]: JsonValue;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
|
|
4
4
|
import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
|
|
5
|
-
import { Ct as Events, G as InviteCodeEventData, Z as OrganizationEventData, mt as WaitlistEventData } from "../../events-
|
|
5
|
+
import { Ct as Events, G as InviteCodeEventData, Z as OrganizationEventData, mt as WaitlistEventData } from "../../events-DddDlibJ.js";
|
|
6
6
|
import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
7
7
|
import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
|
|
10
|
-
import { c as BlockOf } from "../../define-block-
|
|
10
|
+
import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
|
|
11
11
|
import { n as VerifyOptions } from "../../signatures-jPr9JXyw.js";
|
|
12
12
|
type WaitlistStatus = "waiting" | "approved" | "rejected" | "joined";
|
|
13
13
|
/** An entry. `F` types the extra columns the `fields` schema describes. */
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, f as Result, t as AsyncResult } from "../../result-DTOQRyGY.js";
|
|
3
3
|
import { It as RequestContext } from "../../types-BzIYSSWK.js";
|
|
4
|
-
import { Ct as Events, U as IncomingWebhookEventData, ht as WebhookEventData, o as EventHub } from "../../events-
|
|
5
|
-
import { i as CredentialRef, o as CredentialToken, r as CredentialProvider } from "../../provider-
|
|
4
|
+
import { Ct as Events, U as IncomingWebhookEventData, ht as WebhookEventData, o as EventHub } from "../../events-DddDlibJ.js";
|
|
5
|
+
import { i as CredentialRef, o as CredentialToken, r as CredentialProvider } from "../../provider-CVlXXbda.js";
|
|
6
6
|
import { r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
|
|
7
7
|
import { n as SqlClient } from "../../executor-DoSNec_H.js";
|
|
8
8
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
|
|
10
10
|
import { C as QueueSchemas, _ as JobHandler, x as Queue } from "../../types-BdhE7I8Z.js";
|
|
11
11
|
import { t as BlockProblemOptions } from "../../problem-NGBjN-TO.js";
|
|
12
|
-
import { c as BlockOf } from "../../define-block-
|
|
13
|
-
import { i as EventSink, t as CloudEvent } from "../../cloud-event-
|
|
14
|
-
import { g as SubscriberPolicy, i as AuthorizationHooks } from "../../authorization-hooks-
|
|
12
|
+
import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
|
|
13
|
+
import { i as EventSink, t as CloudEvent } from "../../cloud-event-BjgxkfJJ.js";
|
|
14
|
+
import { g as SubscriberPolicy, i as AuthorizationHooks } from "../../authorization-hooks-CR8TVvqo.js";
|
|
15
15
|
import { a as verifySharedSecret, i as signWebhook, n as VerifyOptions, o as verifyWebhook, r as WebhookInput, t as VerifiedWebhook } from "../../signatures-jPr9JXyw.js";
|
|
16
|
-
import { a as DatabaseWebhookPayload, c as hookError, d as stripeInboxVerify, f as verifyStripeWebhook, i as DatabaseChange, l as isDatabaseWebhook, n as AuthHookKind, o as authHook, r as AuthHooks, s as databaseChange, t as AuthHookError, u as signStripeWebhook } from "../../verify-
|
|
16
|
+
import { a as DatabaseWebhookPayload, c as hookError, d as stripeInboxVerify, f as verifyStripeWebhook, i as DatabaseChange, l as isDatabaseWebhook, n as AuthHookKind, o as authHook, r as AuthHooks, s as databaseChange, t as AuthHookError, u as signStripeWebhook } from "../../verify-Cpc1upDA.js";
|
|
17
17
|
import { A as IncomingVerify, C as isPublicAddress, D as IncomingDelivery, E as CreatedIncomingWebhook, F as UpdateIncomingWebhookInput, I as UpdatedIncomingWebhook, M as IncomingWebhooks, N as IncomingWebhooksOptions, O as IncomingDestination, P as RotatedIncomingSecret, S as ResolveHost, T as CreateIncomingWebhookInput, _ as WebhookResponse, a as WebhookSignInput, b as AllowUrl, c as standardWebhooks, d as RotateSecretOptions, f as WebhookSecretStore, g as WebhookRequest, h as WebhookPolicyError, i as StandardWebhooksOptions, j as IncomingWebhook, k as IncomingDestinationResult, l as standardWebhooksAsymmetric, m as FetchTransportOptions, n as HmacSignerOptions, o as WebhookSigner, p as sqlSecretStore, r as RawSigner, s as hmacSigner, t as AsymmetricWebhooksOptions, u as webhookPublicKey, v as WebhookTransport, w as publicUrl, x as PublicUrlOptions, y as fetchTransport } from "../../signers-Dw9DBZjJ.js";
|
|
18
18
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
19
19
|
/** Constant-time string comparison. */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { b as DbError } from "../../result-DTOQRyGY.js";
|
|
2
2
|
import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
|
|
3
3
|
import { r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
|
|
4
|
-
import { Ct as Events, gt as WorkflowEventData } from "../../events-
|
|
4
|
+
import { Ct as Events, gt as WorkflowEventData } from "../../events-DddDlibJ.js";
|
|
5
5
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
|
|
6
|
-
import { c as BlockOf } from "../../define-block-
|
|
6
|
+
import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
|
|
7
7
|
import { g as Workflows, n as WorkflowRun } from "../../workflows-BI4yKqFh.js";
|
|
8
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
9
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
10
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
11
|
-
import { $ as diffGraphs, A as WorkflowTriggerKind, B as WorkflowBuiltinNodeKind, C as WorkflowGrantPrincipal, D as WorkflowResolved, E as WorkflowPurpose, F as WorkflowNodeKindRow, G as WorkflowGraph, H as WorkflowConditionOperator, I as defineNodeKind, J as WorkflowGraphNode, K as WorkflowGraphDiff, L as GraphScope, M as WorkflowVersionOwner, N as WorkflowVersionStatus, O as WorkflowStepInfo, P as WorkflowNodeKindDefinition, Q as approved, R as ValidateGraphOptions, S as WorkflowGrantAction, T as WorkflowNodeRunStatus, U as WorkflowFilterCondition, V as WorkflowCondition, W as WorkflowFilterField, X as WorkflowNodeKind, Y as WorkflowNodeCondition, Z as WorkflowNodeKindInfo, _ as WorkflowCredential, a as CredentialInput, at as topologicalOrder, b as WorkflowDefinitionScope, c as GraphCompiler, d as RunInput, et as durationMs, f as TestRunInput, g as WorkflowBuilderHooks, h as WorkflowAlert, i as BuilderStarter, it as matchesFilter, j as WorkflowVersion, k as WorkflowTrigger, l as NodeRunRecord, m as VersionSaveOptions, n as BuilderOptions, nt as filterConditionOf, o as DefinitionInput, ot as validateGraph, p as TriggerInput, q as WorkflowGraphEdge, r as BuilderStartCall, rt as isBuiltinNodeKind, s as GrantInput, t as AlertInput, tt as evaluateCondition, u as PublishOptions, v as WorkflowDefinition, w as WorkflowNodeRun, x as WorkflowEditor, y as WorkflowDefinitionGrant, z as WORKFLOW_BUILTIN_NODE_KINDS } from "../../types-
|
|
12
|
-
import { a as GraphStepCall, c as graphRunFields, i as GraphRuntime, l as startNodeOf, n as GraphNodeCall, o as GraphSubject, r as GraphRunFields, s as executeGraph, t as GraphApprovalCall } from "../../executor-
|
|
8
|
+
import { p as SubscriptionStatus } from "../../topic-D7F2FBNp.js";
|
|
9
|
+
import { n as TopicPort } from "../../watch-topic-BIEaSN0Y.js";
|
|
10
|
+
import { n as Controller, t as AuthPort } from "../../controller-CJ6rLnpS.js";
|
|
11
|
+
import { $ as diffGraphs, A as WorkflowTriggerKind, B as WorkflowBuiltinNodeKind, C as WorkflowGrantPrincipal, D as WorkflowResolved, E as WorkflowPurpose, F as WorkflowNodeKindRow, G as WorkflowGraph, H as WorkflowConditionOperator, I as defineNodeKind, J as WorkflowGraphNode, K as WorkflowGraphDiff, L as GraphScope, M as WorkflowVersionOwner, N as WorkflowVersionStatus, O as WorkflowStepInfo, P as WorkflowNodeKindDefinition, Q as approved, R as ValidateGraphOptions, S as WorkflowGrantAction, T as WorkflowNodeRunStatus, U as WorkflowFilterCondition, V as WorkflowCondition, W as WorkflowFilterField, X as WorkflowNodeKind, Y as WorkflowNodeCondition, Z as WorkflowNodeKindInfo, _ as WorkflowCredential, a as CredentialInput, at as topologicalOrder, b as WorkflowDefinitionScope, c as GraphCompiler, d as RunInput, et as durationMs, f as TestRunInput, g as WorkflowBuilderHooks, h as WorkflowAlert, i as BuilderStarter, it as matchesFilter, j as WorkflowVersion, k as WorkflowTrigger, l as NodeRunRecord, m as VersionSaveOptions, n as BuilderOptions, nt as filterConditionOf, o as DefinitionInput, ot as validateGraph, p as TriggerInput, q as WorkflowGraphEdge, r as BuilderStartCall, rt as isBuiltinNodeKind, s as GrantInput, t as AlertInput, tt as evaluateCondition, u as PublishOptions, v as WorkflowDefinition, w as WorkflowNodeRun, x as WorkflowEditor, y as WorkflowDefinitionGrant, z as WORKFLOW_BUILTIN_NODE_KINDS } from "../../types-DtiDatvu.js";
|
|
12
|
+
import { a as GraphStepCall, c as graphRunFields, i as GraphRuntime, l as startNodeOf, n as GraphNodeCall, o as GraphSubject, r as GraphRunFields, s as executeGraph, t as GraphApprovalCall } from "../../executor-uNDJBzT8.js";
|
|
13
13
|
/**
|
|
14
14
|
* The `workflow-editor` module's definitions, versions, triggers, credentials,
|
|
15
15
|
* step library, node runs and alerts. The engine plugs in through `compile` and
|