better-supabase 0.55.0 → 0.56.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-CBXJce8J.d.ts → agents-DJChYmXn.d.ts} +2 -2
- package/dist/{ai-schedules-CtwkMJDZ.d.ts → ai-schedules-5fxfEOWM.d.ts} +1 -1
- package/dist/ai-sdk/agents/index.d.ts +1 -1
- package/dist/ai-sdk/workflow/index.d.ts +1 -1
- package/dist/{app-tables-BsDmauWB.d.ts → app-tables-CWnf7wpo.d.ts} +1 -1
- package/dist/{authorization-DK7YSiFV.d.ts → authorization-Hh9xUm0r.d.ts} +1 -1
- package/dist/{bind-DiGmjHzz.d.ts → bind-CC5-eBT-.d.ts} +3 -3
- package/dist/{block-env-BTKZBCL4.d.ts → block-env-CzT1OAiI.d.ts} +4 -4
- package/dist/{block-subjects-BoJrJAgR.js → block-subjects-B9hb1LLk.js} +2 -2
- package/dist/{block-tables-B6Jt0mWg.d.ts → block-tables-DOGtmm0m.d.ts} +1 -1
- package/dist/blocks/access-requests/index.d.ts +1 -1
- package/dist/blocks/accounting/index.d.ts +1 -1
- package/dist/blocks/acknowledgements/index.d.ts +1 -1
- package/dist/blocks/activities/index.d.ts +2 -2
- package/dist/blocks/advisories/index.d.ts +1 -1
- package/dist/blocks/agent-checkout/index.d.ts +1 -1
- package/dist/blocks/agents/index.d.ts +1 -1
- package/dist/blocks/ai-cache/index.d.ts +1 -1
- package/dist/blocks/ai-chat/index.d.ts +1 -1
- package/dist/blocks/ai-evals/index.d.ts +1 -1
- package/dist/blocks/ai-files/index.d.ts +1 -1
- package/dist/blocks/ai-guardrails/index.d.ts +1 -1
- package/dist/blocks/ai-keys/index.d.ts +1 -1
- package/dist/blocks/ai-schedules/index.d.ts +2 -2
- package/dist/blocks/announcements/index.d.ts +4 -4
- package/dist/blocks/api-keys/index.d.ts +1 -1
- package/dist/blocks/appraisals/index.d.ts +1 -1
- package/dist/blocks/approvals/index.d.ts +1 -1
- package/dist/blocks/assets/index.d.ts +2 -2
- package/dist/blocks/assignment/index.d.ts +1 -1
- package/dist/blocks/attachments/index.d.ts +5 -5
- package/dist/blocks/audit/index.d.ts +2 -2
- package/dist/blocks/automations/index.d.ts +3 -3
- package/dist/blocks/banking/index.d.ts +1 -1
- package/dist/blocks/billable-time/index.d.ts +1 -1
- package/dist/blocks/billing/index.d.ts +2 -2
- package/dist/blocks/bookings/index.d.ts +2 -2
- package/dist/blocks/bulk/index.d.ts +1 -1
- package/dist/blocks/calendar/index.d.ts +3 -3
- package/dist/blocks/care/index.d.ts +27 -27
- package/dist/blocks/care-plans/index.d.ts +3 -3
- package/dist/blocks/cases/index.d.ts +3 -3
- package/dist/blocks/catalog/index.d.ts +2 -2
- package/dist/blocks/channels/index.d.ts +1 -1
- package/dist/blocks/clinical-decision-support/index.d.ts +1 -1
- package/dist/blocks/cms/index.d.ts +5 -5
- package/dist/blocks/collaboration/index.d.ts +6 -6
- package/dist/blocks/collections/index.d.ts +1 -1
- package/dist/blocks/comments/index.d.ts +2 -2
- package/dist/blocks/commerce/index.d.ts +5 -5
- package/dist/blocks/commissions/index.d.ts +1 -1
- package/dist/blocks/compliance/index.d.ts +1 -1
- package/dist/blocks/connectors/index.d.ts +1 -1
- package/dist/blocks/consents/index.d.ts +2 -2
- package/dist/blocks/contacts/index.d.ts +2 -2
- package/dist/blocks/content/index.d.ts +2 -2
- package/dist/blocks/contracts/index.d.ts +1 -1
- package/dist/blocks/courses/index.d.ts +3 -3
- package/dist/blocks/created-by/index.d.ts +2 -2
- package/dist/blocks/crm/index.d.ts +16 -16
- package/dist/blocks/custom-fields/index.d.ts +1 -1
- package/dist/blocks/dam/index.d.ts +2 -2
- package/dist/blocks/data-lifecycle/index.d.ts +2 -2
- package/dist/blocks/deadlines/index.d.ts +249 -43
- package/dist/blocks/deadlines/index.js +862 -20
- package/dist/blocks/deals/index.d.ts +1 -1
- package/dist/blocks/dispatch/index.d.ts +2 -2
- package/dist/blocks/document-templates/index.d.ts +2 -2
- package/dist/blocks/documents/index.d.ts +1 -1
- package/dist/blocks/domains/index.d.ts +1 -1
- package/dist/blocks/donations/index.d.ts +1 -1
- package/dist/blocks/drive/index.d.ts +5 -5
- package/dist/blocks/e-prescribing/index.d.ts +1 -1
- package/dist/blocks/employees/index.d.ts +1 -1
- package/dist/blocks/enrichment/index.d.ts +1 -1
- package/dist/blocks/enrollments/index.d.ts +2 -2
- package/dist/blocks/entitlements/index.d.ts +3 -3
- package/dist/blocks/events/index.d.ts +3 -3
- package/dist/blocks/expenses/index.d.ts +1 -1
- package/dist/blocks/field-history/index.d.ts +1 -1
- package/dist/blocks/filespace/index.d.ts +8 -8
- package/dist/blocks/finance/index.d.ts +5 -5
- package/dist/blocks/flags/index.d.ts +1 -1
- package/dist/blocks/forecasts/index.d.ts +1 -1
- package/dist/blocks/forms/index.d.ts +3 -3
- package/dist/blocks/funding/index.d.ts +2 -2
- package/dist/blocks/goals/index.d.ts +1 -1
- package/dist/blocks/governance/index.d.ts +4 -4
- package/dist/blocks/guests/index.d.ts +1 -1
- package/dist/blocks/hiring/index.d.ts +1 -1
- package/dist/blocks/identities/index.d.ts +1 -1
- 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 +1 -1
- package/dist/blocks/index.d.ts +3 -3
- package/dist/blocks/inspections/index.d.ts +2 -2
- package/dist/blocks/inventory/index.d.ts +1 -1
- package/dist/blocks/invoices/index.d.ts +1 -1
- package/dist/blocks/knowledge/index.d.ts +1 -1
- package/dist/blocks/lead-scoring/index.d.ts +2 -2
- package/dist/blocks/learning/index.d.ts +3 -3
- package/dist/blocks/leases/index.d.ts +1 -1
- package/dist/blocks/leave/index.d.ts +1 -1
- package/dist/blocks/ledger/index.d.ts +1 -1
- package/dist/blocks/legal-entities/index.d.ts +2 -2
- package/dist/blocks/lims/index.d.ts +2 -2
- package/dist/blocks/mail-sync/index.d.ts +3 -3
- package/dist/blocks/maintenance/index.d.ts +2 -2
- package/dist/blocks/manufacturing/index.d.ts +2 -2
- package/dist/blocks/medications/index.d.ts +1 -1
- package/dist/blocks/meetings/index.d.ts +3 -3
- package/dist/blocks/memberships/index.d.ts +2 -2
- package/dist/blocks/memory/index.d.ts +1 -1
- package/dist/blocks/messaging/index.d.ts +5 -5
- package/dist/blocks/metrics/index.d.ts +1 -1
- 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 +5 -5
- package/dist/blocks/numbering/index.d.ts +1 -1
- package/dist/blocks/oauth-server/index.d.ts +1 -1
- package/dist/blocks/observations/index.d.ts +2 -2
- package/dist/blocks/onboarding/index.d.ts +2 -2
- package/dist/blocks/option-sets/index.d.ts +2 -2
- package/dist/blocks/orders/index.d.ts +1 -1
- package/dist/blocks/organizations/index.d.ts +2 -2
- package/dist/blocks/outbox/index.d.ts +1 -1
- package/dist/blocks/passes/index.d.ts +2 -2
- package/dist/blocks/payroll-export/index.d.ts +2 -2
- package/dist/blocks/people/index.d.ts +7 -7
- package/dist/blocks/periods/index.d.ts +1 -1
- package/dist/blocks/permissions/index.d.ts +3 -3
- package/dist/blocks/pipelines/index.d.ts +1 -1
- package/dist/blocks/posts/index.d.ts +2 -2
- package/dist/blocks/procurement/index.d.ts +5 -5
- package/dist/blocks/profiles/index.d.ts +1 -1
- package/dist/blocks/projects/index.d.ts +7 -7
- package/dist/blocks/promotions/index.d.ts +1 -1
- package/dist/blocks/prompts/index.d.ts +1 -1
- package/dist/blocks/push/index.d.ts +2 -2
- package/dist/blocks/qualifications/index.d.ts +2 -2
- package/dist/blocks/queue/index.d.ts +2 -2
- package/dist/blocks/quotes/index.d.ts +1 -1
- package/dist/blocks/rank/index.d.ts +1 -1
- package/dist/blocks/reactions/index.d.ts +4 -4
- package/dist/blocks/recruiting/index.d.ts +4 -4
- package/dist/blocks/referrals/index.d.ts +1 -1
- package/dist/blocks/relations/index.d.ts +1 -1
- package/dist/blocks/reminders/index.d.ts +1 -1
- package/dist/blocks/reviews/index.d.ts +1 -1
- package/dist/blocks/rfqs/index.d.ts +2 -2
- package/dist/blocks/risks/index.d.ts +2 -2
- package/dist/blocks/saas/index.d.ts +12 -12
- package/dist/blocks/sales/index.d.ts +1 -1
- package/dist/blocks/saved-views/index.d.ts +2 -2
- package/dist/blocks/scheduling/index.d.ts +4 -4
- package/dist/blocks/scores/index.d.ts +2 -2
- package/dist/blocks/search/index.d.ts +3 -3
- package/dist/blocks/security-events/index.d.ts +1 -1
- package/dist/blocks/segments/index.d.ts +2 -2
- package/dist/blocks/sequences/index.d.ts +3 -3
- package/dist/blocks/service/index.d.ts +7 -7
- package/dist/blocks/service-accounts/index.d.ts +1 -1
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/settings/index.d.ts +2 -2
- package/dist/blocks/share-links/index.d.ts +1 -1
- package/dist/blocks/shifts/index.d.ts +2 -2
- package/dist/blocks/shipments/index.d.ts +2 -2
- package/dist/blocks/signatures/index.d.ts +2 -2
- package/dist/blocks/signing-keys/index.d.ts +1 -1
- package/dist/blocks/sla/index.d.ts +1 -1
- package/dist/blocks/sso/index.d.ts +1 -1
- package/dist/blocks/state-machine/index.d.ts +1 -1
- package/dist/blocks/subjects/index.d.ts +2 -2
- package/dist/blocks/support/index.d.ts +5 -5
- package/dist/blocks/tags/index.d.ts +2 -2
- package/dist/blocks/tasks/index.d.ts +2 -2
- package/dist/blocks/tax/index.d.ts +2 -2
- package/dist/blocks/teams/index.d.ts +1 -1
- package/dist/blocks/templates/index.d.ts +1 -1
- package/dist/blocks/tills/index.d.ts +1 -1
- package/dist/blocks/time-tracking/index.d.ts +2 -2
- package/dist/blocks/timeline/index.d.ts +1 -1
- package/dist/blocks/trash/index.d.ts +1 -1
- package/dist/blocks/undo/index.d.ts +2 -2
- package/dist/blocks/updated-at/index.d.ts +2 -2
- package/dist/blocks/usage/index.d.ts +2 -2
- package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
- package/dist/blocks/versions/index.d.ts +1 -1
- package/dist/blocks/waitlist/index.d.ts +1 -1
- package/dist/blocks/warehouse/index.d.ts +1 -1
- package/dist/blocks/webhooks/index.d.ts +1 -1
- package/dist/blocks/workflow-editor/index.d.ts +4 -4
- package/dist/blocks/workflows/index.d.ts +4 -4
- package/dist/{blocks-2HFgUcqG.d.ts → blocks-DvWEz8mQ.d.ts} +4 -4
- package/dist/claims/index.d.ts +3 -3
- package/dist/cli/{add-LvxZ-JNB.js → add--O_HFhs0.js} +2 -2
- package/dist/cli/add-CUAchifS.js +1 -0
- package/dist/cli/{add-BnYh-Kpy.js → add-DT2QsJB0.js} +10 -10
- package/dist/cli/{app-table-files-7M0I9LaE.js → app-table-files-BjMDa_7_.js} +2 -2
- package/dist/cli/{app-tables-BfWPWiOJ.js → app-tables-D34g1ASz.js} +2 -2
- package/dist/cli/{backfill-i0Tx24Sa.js → backfill-DWD5chCd.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-C_7ioBdJ.js → blocks-BduQcXFb.js} +1 -1
- package/dist/cli/{blocks-X_eD_t_f.js → blocks-DKs7Qj8R.js} +1 -1
- package/dist/cli/{cache-D98rjB1C.js → cache-EFwNdKib.js} +1 -1
- package/dist/cli/{codemod-j1nCkgA5.js → codemod-CuaWRwst.js} +1 -1
- package/dist/cli/{content-mapper-UsLt4y0J.js → content-mapper-BlOMmIM2.js} +2 -2
- package/dist/cli/{doctor-BYJM72wi.js → doctor-JdxWuscJ.js} +15 -15
- package/dist/cli/{gen-D47t5jj3.js → gen-n6l6AMLo.js} +11 -11
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{init-CAWeLXCs.js → init-BLMHN_2A.js} +9 -9
- package/dist/cli/{live-DNd8MMNk.js → live-C4uCg3ME.js} +2 -2
- package/dist/cli/{mcp-BUs7M6fq.js → mcp-CFLvzFKH.js} +2 -2
- package/dist/cli/{metadata-UwEYCntC.js → metadata-CRp8JQTE.js} +3 -3
- package/dist/cli/{migrate-D-GzXR4D.js → migrate-BjDf0moD.js} +1 -1
- package/dist/cli/{migration-safety-Cg9jf2s-.js → migration-safety-D-QnV2BW.js} +1 -1
- package/dist/cli/{migrations-Bhcf7MHM.js → migrations-8dDFF8SW.js} +2 -2
- package/dist/cli/{module-migration-BJaOdOWy.js → module-migration-DuwIX8MO.js} +2 -2
- package/dist/cli/powersync-ByqoHJwp.js +1 -0
- package/dist/cli/{powersync-DQKdjG_K.js → powersync-CHVlZIqs.js} +3 -3
- package/dist/cli/{print-B1onZWRG.js → print-orgMiDzp.js} +2 -2
- package/dist/cli/{providers-M7s8btf1.js → providers-DWZVnoDw.js} +1 -1
- package/dist/cli/{prune-workflows-BiRF1YBZ.js → prune-workflows-DelKs-zD.js} +1 -1
- package/dist/cli/{remove-BHyzqWNm.js → remove-BH6Zwjhs.js} +6 -6
- package/dist/cli/{render-DDCy_0V_.js → render-DyWVslCM.js} +3 -3
- package/dist/cli/{run-DDUBMkbN.js → run-BYX5n5rt.js} +9 -9
- package/dist/cli/{run-Csm1-Uto.js → run-GcSBgXCH.js} +31 -31
- package/dist/cli/{shared-Cv22MEAO.js → shared-BoVOOrpJ.js} +1 -1
- package/dist/cli/{snapshot-9xnSt525.js → snapshot-BZGZ9pB-.js} +2 -2
- package/dist/cli/{source-B_miugrh.js → source-Buw7eODS.js} +1 -1
- package/dist/cli/{spec-dYLJbr9J.js → spec-CUWMpL3f.js} +2 -2
- package/dist/cli/{spec-BeAgQ-of.js → spec-CnRC9FcX.js} +1 -1
- package/dist/cli/{sql-layout-3YU4941N.js → sql-layout-BZ-NhhTI.js} +2 -2
- package/dist/cli/{sync-Bfwk4Ldc.js → sync-CFzA4xdr.js} +4 -4
- package/dist/cli/{upgrade-BMrkzAcD.js → upgrade-D1szGysi.js} +5 -5
- package/dist/cli/{upgrade-DRvMFW2T.js → upgrade-ukOP0GXf.js} +2 -2
- package/dist/cli/{version-BXjNETWS.js → version-D1sJX6_6.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 +4 -4
- package/dist/config/index.js +4 -4
- package/dist/{config-CsX2THwJ.js → config-Bx3UYp8b.js} +3 -3
- package/dist/{config-Dgl6AxKE.js → config-CAjlOSQY.js} +1 -1
- package/dist/{context-DSJpfeVv.d.ts → context-BIBqUjVz.d.ts} +3 -3
- package/dist/contract/index.d.ts +3 -3
- package/dist/{controller-BVee4yX8.d.ts → controller-DBD6WWDa.d.ts} +1 -1
- package/dist/{conversion-BPkWkVoa.d.ts → conversion-DLkof9_y.d.ts} +1 -1
- package/dist/create/index.d.ts +4 -4
- 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/deadlines-values-vmaCCdGl.js +92 -0
- package/dist/{define-block-Cu67KCN1.d.ts → define-block-zK3QnPyG.d.ts} +1 -1
- package/dist/{drive-D008IDpI.d.ts → drive-Keqe8dIg.d.ts} +1 -1
- package/dist/{entitlements-CRBZg5y2.d.ts → entitlements-QwMag409.d.ts} +1 -1
- package/dist/{extract-BU5w3k5s.d.ts → extract-CJWS6MMG.d.ts} +1 -1
- package/dist/{field-errors-CjEgbjO9.d.ts → field-errors-BlyD3if3.d.ts} +5 -5
- package/dist/{index-ilxdL8pz.d.ts → index-0AVn1Dcr.d.ts} +1 -1
- package/dist/{index-dMGEJLxl.d.ts → index-9rajR8Ti.d.ts} +1 -1
- package/dist/{index-r3QZBY7z.d.ts → index-B5rQ9MEl.d.ts} +1 -1
- package/dist/{index-BleHtlJ6.d.ts → index-B7_Mq8Qm.d.ts} +1 -1
- package/dist/{index-DDDHYXtr.d.ts → index-BGqvP9dE.d.ts} +8 -8
- package/dist/{index-D5nY5k-2.d.ts → index-BIClMq6S.d.ts} +7 -7
- package/dist/{index-DsA7MQwZ.d.ts → index-BOI3eLz0.d.ts} +1 -1
- package/dist/{index-CaW37FHZ.d.ts → index-BSdDLEA-.d.ts} +1 -1
- package/dist/{index-BoCyVsCr.d.ts → index-BTC40rxx.d.ts} +1 -1
- package/dist/{index-u8EXkOzJ.d.ts → index-BxdldeGx.d.ts} +1 -1
- package/dist/{index-JzAR_Y7n.d.ts → index-C7tmYYB5.d.ts} +3 -3
- package/dist/{index-DYzQ_PPW.d.ts → index-CJB2uCFk.d.ts} +1 -1
- package/dist/{index-_wr8wCe9.d.ts → index-COLMIEk0.d.ts} +1 -1
- package/dist/{index-BVJsz3pS.d.ts → index-CPRQdNHc.d.ts} +2 -2
- package/dist/{index--7HXH_H_.d.ts → index-CSdjm0Kn.d.ts} +2 -2
- package/dist/{index-_RnZChF8.d.ts → index-CT0OjCk1.d.ts} +1 -1
- package/dist/{index-D7zwaGAP.d.ts → index-CocISf2h.d.ts} +1 -1
- package/dist/{index-D-3fZP5z.d.ts → index-Cvd24Ybb.d.ts} +1 -1
- package/dist/{index-BeU2DRAI.d.ts → index-DASeimpy.d.ts} +1 -1
- package/dist/{index-voglIa16.d.ts → index-DBqRH5cj.d.ts} +3 -3
- package/dist/{index-DZRsTCds.d.ts → index-DCeA3cFQ.d.ts} +1 -1
- package/dist/{index-DtMdKIJU.d.ts → index-DD3Ldome.d.ts} +2 -2
- package/dist/{index-ChaJiMkI.d.ts → index-DEDIPDaW.d.ts} +2 -2
- package/dist/{index-DhS8Qkgj.d.ts → index-DNitLhgU.d.ts} +2 -2
- package/dist/{index-DR4P3Lf9.d.ts → index-D_OEwOaE.d.ts} +2 -2
- package/dist/{index-BTl5A8Aj.d.ts → index-D_g2loq-.d.ts} +1 -1
- package/dist/{index-BDn4Mqq0.d.ts → index-DaTxv1aA.d.ts} +1 -1
- package/dist/{index-E_Q5L9PV.d.ts → index-DcihkEQo.d.ts} +1 -1
- package/dist/{index-BOZ6AsMs.d.ts → index-Do6ZAvXT.d.ts} +1 -1
- package/dist/{index-BvPirjfD.d.ts → index-DpwRuDBy.d.ts} +4 -4
- package/dist/{index-CDEzb5bl.d.ts → index-HANt6RDT.d.ts} +1 -1
- package/dist/{index-slG4UpF_.d.ts → index-QpKsKUbn.d.ts} +2 -2
- package/dist/{index-DJ1Uk4ff.d.ts → index-WXVYfOHr.d.ts} +4 -4
- package/dist/{index-BR8ZkijS.d.ts → index-XjhYgGhk.d.ts} +2 -2
- package/dist/{index-AmPcMT_X.d.ts → index-_rOaXPbx.d.ts} +1 -1
- package/dist/{index-Dyq6B4gZ.d.ts → index-n-7IwvYP.d.ts} +2 -2
- package/dist/{index-CKdNndE3.d.ts → index-urOSlPMc.d.ts} +2 -2
- package/dist/{instances-BMjIO6Xu.js → instances-z6DJn2Gr.js} +20 -1
- package/dist/{manifest-DYPVnKW_.d.ts → manifest-B4SF4ieN.d.ts} +1 -1
- package/dist/{manifest-DsuoLp-Y.d.ts → manifest-B9D-PHpo.d.ts} +1 -1
- package/dist/{manifest-BE7UwezO.d.ts → manifest-BBIs-5xy.d.ts} +1 -1
- package/dist/{manifest-CdD44xlg.d.ts → manifest-BE6JGlFP.d.ts} +1 -1
- package/dist/{manifest-lzwWCAYV.d.ts → manifest-BExilPWu.d.ts} +1 -1
- package/dist/{manifest-CaA-2HPK.d.ts → manifest-BNhdYakH.d.ts} +1 -1
- package/dist/{manifest-DhpmWh55.d.ts → manifest-BVkjX2t-.d.ts} +1 -1
- package/dist/{manifest-CMNPpmWS.d.ts → manifest-BVnfLMPU.d.ts} +2 -2
- package/dist/{manifest-Dk_7prKx.d.ts → manifest-BX7vyeYr.d.ts} +1 -1
- package/dist/{manifest-D9P9Yhe3.d.ts → manifest-BYxKYFcH.d.ts} +1 -1
- package/dist/{manifest-DxPLHyKY.d.ts → manifest-Bcx4GSo0.d.ts} +1 -1
- package/dist/{manifest-BknZ4yQ-.d.ts → manifest-BeupHUUC.d.ts} +1 -1
- package/dist/{manifest-DhXoSaUC.d.ts → manifest-BmI85ooO.d.ts} +1 -1
- package/dist/{manifest-BXxSqnLS.d.ts → manifest-BoKnFQJK.d.ts} +1 -1
- package/dist/{manifest-Bz0EjE76.d.ts → manifest-BwwWlxof.d.ts} +1 -1
- package/dist/{manifest-CoFpa0dN.d.ts → manifest-Bx62hgMv.d.ts} +1 -1
- package/dist/{manifest-D2d1wS7g.d.ts → manifest-C1plIFth.d.ts} +1 -1
- package/dist/{manifest-X4analSK.d.ts → manifest-C8-zVlM4.d.ts} +1 -1
- package/dist/{manifest-BB3GjGa3.d.ts → manifest-CANbbLyM.d.ts} +1 -1
- package/dist/{manifest-DwCorUVJ.d.ts → manifest-CCQYjt7L.d.ts} +1 -1
- package/dist/{manifest-Dc8pNExY.d.ts → manifest-CDIvE9Po.d.ts} +1 -1
- package/dist/{manifest-xikzppm9.d.ts → manifest-CJEzfFKP.d.ts} +1 -1
- package/dist/{manifest-DG0oDOmq.d.ts → manifest-CLSlmLnn.d.ts} +1 -1
- package/dist/{manifest-BZL2TAB1.d.ts → manifest-CV-9uzTU.d.ts} +1 -1
- package/dist/{manifest-CBwrN4Nf.d.ts → manifest-CYDtm5Yz.d.ts} +1 -1
- package/dist/{manifest-BYbt4y_O.d.ts → manifest-Cb0BCYmS.d.ts} +1 -1
- package/dist/{manifest-BVjhJ3Mj.d.ts → manifest-Cc1r_IME.d.ts} +1 -1
- package/dist/{manifest-BMNwdO5D.d.ts → manifest-CeFiTTOx.d.ts} +1 -1
- package/dist/{manifest-CSHNTEJZ.d.ts → manifest-Ch8G8wad.d.ts} +1 -1
- package/dist/{manifest-CWj5SFuw.d.ts → manifest-Ciu7htmT.d.ts} +1 -1
- package/dist/{manifest-DMvx2rWH.d.ts → manifest-CtvRTQoq.d.ts} +1 -1
- package/dist/{manifest-Bp0oZ3-W.d.ts → manifest-CxJtO760.d.ts} +1 -1
- package/dist/{manifest-Eazz96as.d.ts → manifest-D2mvuqCe.d.ts} +1 -1
- package/dist/{manifest-B17Sra5h.d.ts → manifest-D8o7ivPa.d.ts} +1 -1
- package/dist/{manifest-C_dVunWg.d.ts → manifest-DAQAHnHf.d.ts} +1 -1
- package/dist/{manifest-auanzyjB.d.ts → manifest-DBUE3KbP.d.ts} +1 -1
- package/dist/{manifest-B4CEdcH_.d.ts → manifest-DElW3hfs.d.ts} +1 -1
- package/dist/{manifest-BSvxbZH5.d.ts → manifest-DFGW17h3.d.ts} +1 -1
- package/dist/{manifest-D7mliM-d.d.ts → manifest-DGXOQgh3.d.ts} +1 -1
- package/dist/{manifest-CELTce26.d.ts → manifest-DHV0zxVj.d.ts} +1 -1
- package/dist/{manifest-yKx0faak.d.ts → manifest-DKCc24tm.d.ts} +1 -1
- package/dist/{manifest-DGiswyG5.d.ts → manifest-DKk12W7u.d.ts} +1 -1
- package/dist/{manifest-BzsuqiQx.d.ts → manifest-DOUGC7xP.d.ts} +1 -1
- package/dist/{manifest-DUlZ8qck.d.ts → manifest-DPQpIRCO.d.ts} +1 -1
- package/dist/{manifest-DGLrMEdB.d.ts → manifest-DPXd-wZG.d.ts} +1 -1
- package/dist/{manifest-uIIb_YLI.d.ts → manifest-D_tuEFvt.d.ts} +1 -1
- package/dist/{manifest-DPqKZgWn.d.ts → manifest-DbzB7NQP.d.ts} +1 -1
- package/dist/{manifest-DAXz8rxB.d.ts → manifest-Dd0bmqd-.d.ts} +1 -1
- package/dist/{manifest-CGZQ9lU3.d.ts → manifest-DebHyEiN.d.ts} +1 -1
- package/dist/{manifest-CMnLDDS3.d.ts → manifest-Doxj-elq.d.ts} +1 -1
- package/dist/{manifest-D_VmA0aC.d.ts → manifest-DujUV7Cu.d.ts} +1 -1
- package/dist/{manifest-Dl_bw4IU.d.ts → manifest-Duj_AN2H.d.ts} +1 -1
- package/dist/{manifest-gGFtQDJz.d.ts → manifest-DzN5YdbZ.d.ts} +1 -1
- package/dist/{manifest-DIZ6chpf.d.ts → manifest-P2Pzb1Jo.d.ts} +1 -1
- package/dist/{manifest-CbKgs5qA.d.ts → manifest-SEhx1LFs.d.ts} +1 -1
- package/dist/{manifest-CGcGylmw.d.ts → manifest-Se6qEw03.d.ts} +1 -1
- package/dist/{manifest-6PhMgCFi.d.ts → manifest-UHESrKBI.d.ts} +1 -1
- package/dist/{manifest-Df1QDhiQ.d.ts → manifest-Ul7Uq35H.d.ts} +1 -1
- package/dist/{manifest-Pl5us_yz.d.ts → manifest-XpSrCsAV.d.ts} +1 -1
- package/dist/{manifest-DtEcJBdE.d.ts → manifest-iRX3gQ3g.d.ts} +1 -1
- package/dist/{manifest-D0FjVeay.d.ts → manifest-uRsVzPOJ.d.ts} +1 -1
- package/dist/{manifest-D2Z_2z9-.d.ts → manifest-x50nYF_4.d.ts} +1 -1
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +1 -1
- package/dist/next/index.d.ts +7 -7
- package/dist/{operations-DKfYeS5z.d.ts → operations-Ce53BGJ0.d.ts} +1 -1
- package/dist/otel/index.js +4 -4
- package/dist/{permissions-C5h1cU25.d.ts → permissions-Bi4WvjnM.d.ts} +1 -1
- package/dist/{ports-DvaVv_3b.d.ts → ports-TvLRuWgJ.d.ts} +1 -1
- package/dist/powersync/index.d.ts +2 -2
- package/dist/preset/index.d.ts +4 -4
- package/dist/preset/index.js +3 -3
- package/dist/{preset-Cl3Q5ASC.js → preset-CPUA9haY.js} +3 -3
- package/dist/{preview-Bwg7r1Lf.d.ts → preview-DvpfbcDY.d.ts} +2 -2
- package/dist/{project-At5wBJSS.js → project-CkGGYXKd.js} +5 -5
- package/dist/{push-token-C6ZGE1g0.d.ts → push-token-GJUUE_6j.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-DTncyqVH.d.ts → record-form-DhpdYw5e.d.ts} +1 -1
- package/dist/records/index.d.ts +7 -7
- package/dist/server/index.d.ts +3 -3
- package/dist/solid/index.d.ts +5 -5
- package/dist/sql/index.d.ts +5 -5
- package/dist/sql/index.js +2 -2
- package/dist/{sql-CdZdPqjA.js → sql-CFsIpR4t.js} +1508 -258
- package/dist/ssr/index.d.ts +1 -1
- package/dist/svelte/index.d.ts +5 -5
- package/dist/{tenant-BTnwa5oZ.d.ts → tenant-BTxVWIN6.d.ts} +1 -1
- package/dist/testing/index.d.ts +6 -6
- package/dist/testing/index.js +1 -1
- package/dist/{timeline-B7kBQ1gh.d.ts → timeline-9r4mx0A2.d.ts} +2 -2
- package/dist/{topic-hu0RP7CG.d.ts → topic-_7QKu4b5.d.ts} +1 -1
- package/dist/{types-DvglaQ_D.d.ts → types-C2qXUXjK.d.ts} +2 -2
- package/dist/vue/index.d.ts +5 -5
- package/dist/{watch-topic-C_rGHxIA.d.ts → watch-topic-Do0x41n3.d.ts} +1 -1
- package/dist/webmcp/index.d.ts +1 -1
- package/dist/yjs/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cli/add-D0TUMxXn.js +0 -1
- package/dist/cli/powersync-Bn-u0TGP.js +0 -1
- package/dist/deadlines-values-B7ArpVJU.js +0 -127
|
@@ -4,19 +4,34 @@ import { n as Logger } from "../../logger-0LfhvwE4.js";
|
|
|
4
4
|
import { t as AsyncResult } from "../../result-CMqlHv82.js";
|
|
5
5
|
import { n as BlockOptions } from "../../block-helpers-rTsuHt6v.js";
|
|
6
6
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CP4wAHU-.js";
|
|
7
|
-
import { c as BlockOf } from "../../define-block-
|
|
7
|
+
import { c as BlockOf } from "../../define-block-zK3QnPyG.js";
|
|
8
8
|
import { Dt as Events } from "../../events-DN9PAcjq.js";
|
|
9
9
|
/** The states of a version of a rule set. */
|
|
10
10
|
declare const RULE_VERSION_STATUSES: readonly ["draft", "approved"];
|
|
11
|
-
/** What
|
|
12
|
-
declare const DEADLINE_RESULTS: readonly ["due", "unknown"];
|
|
11
|
+
/** What one group of a rule set version yields for a subject. */
|
|
12
|
+
declare const DEADLINE_RESULTS: readonly ["due", "unknown", "pending", "undated", "not_covered", "not_applicable", "not_required", "barred"];
|
|
13
|
+
type DeadlineResult = (typeof DEADLINE_RESULTS)[number];
|
|
13
14
|
/** Where a deadline stands: pending until an action satisfies it. */
|
|
14
15
|
declare const DEADLINE_STATES: readonly ["pending", "satisfied"];
|
|
15
16
|
declare const OFFSET_UNITS: readonly ["days", "business_days", "months"];
|
|
16
17
|
type OffsetUnit = (typeof OFFSET_UNITS)[number];
|
|
17
|
-
/** How a date that lands on a
|
|
18
|
+
/** How a date that lands on a non-business day moves after the roll. */
|
|
18
19
|
declare const DEADLINE_ADJUSTMENTS: readonly ["none", "next_business_day", "previous_business_day"];
|
|
19
20
|
type DeadlineAdjustment = (typeof DEADLINE_ADJUSTMENTS)[number];
|
|
21
|
+
/** The approval state of a rule, an exception or a counting block. */
|
|
22
|
+
declare const PART_STATUSES: readonly ["approved", "draft", "review_required"];
|
|
23
|
+
type PartStatus = (typeof PART_STATUSES)[number];
|
|
24
|
+
/** What a settled exception decides; `review_required` never decides. */
|
|
25
|
+
declare const EXCEPTION_RESULTS: readonly ["barred", "not_applicable", "not_required", "review_required"];
|
|
26
|
+
/** The days a counting block can roll a last day past. */
|
|
27
|
+
declare const ROLL_DAYS: readonly ["saturday", "sunday", "holiday"];
|
|
28
|
+
type RollDay = (typeof ROLL_DAYS)[number];
|
|
29
|
+
declare const WEEKDAYS: readonly ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
|
30
|
+
type Weekday = (typeof WEEKDAYS)[number];
|
|
31
|
+
/** The listed day an observed shift reads. */
|
|
32
|
+
declare const OBSERVED_FALLS_ON: readonly ["saturday", "sunday", "other_than_sunday"];
|
|
33
|
+
/** Where an observed shift moves a holiday, strictly before or after it. */
|
|
34
|
+
declare const OBSERVED_MOVES: readonly ["preceding_friday", "following_monday", "preceding_sunday", "following_sunday"];
|
|
20
35
|
/** Where a rule comes from. */
|
|
21
36
|
interface DeadlineCitation {
|
|
22
37
|
/** A statute or regulation reference, such as `Section 12(3)`. */
|
|
@@ -25,31 +40,182 @@ interface DeadlineCitation {
|
|
|
25
40
|
/** The quoted text the rule follows. */
|
|
26
41
|
readonly text?: string;
|
|
27
42
|
}
|
|
28
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* One condition value: equals for a string or a boolean, any of for a list of
|
|
45
|
+
* codes, and the existence of the fact for `present` or `absent`.
|
|
46
|
+
*/
|
|
47
|
+
type ConditionValue = string | boolean | readonly string[];
|
|
48
|
+
/** An AND of entries, keyed by fact name. */
|
|
49
|
+
type Condition = Readonly<Record<string, ConditionValue>>;
|
|
50
|
+
/** A date regime: the fact's date is on or after `from` and before `before`. */
|
|
51
|
+
interface DateRegime {
|
|
52
|
+
readonly from?: string;
|
|
53
|
+
readonly before?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* What selects a rule: a list of codes per fact, `present` or `absent`, and at
|
|
57
|
+
* most one date regime.
|
|
58
|
+
*/
|
|
59
|
+
type Applies = Readonly<Record<string, ConditionValue | DateRegime>>;
|
|
60
|
+
/** One count: `n` units from a fact's date, or before it. */
|
|
61
|
+
interface DeadlineCount {
|
|
62
|
+
/** Required unless the count is `before` a fact without one ("on or before"). */
|
|
63
|
+
readonly n?: number;
|
|
64
|
+
/** Required with `n`. */
|
|
65
|
+
readonly unit?: OffsetUnit;
|
|
66
|
+
/** Exactly one of `from` and `before` names the fact the count reads. */
|
|
67
|
+
readonly from?: string;
|
|
68
|
+
readonly before?: string;
|
|
69
|
+
/** With `months`: the day of the target month, clamped to its last day. */
|
|
70
|
+
readonly day_of_month?: number;
|
|
71
|
+
/** One deadline per furnishing month, each counted from the first of it. */
|
|
72
|
+
readonly each?: "furnishing_month";
|
|
73
|
+
}
|
|
74
|
+
/** A rule's deadline: none, one count, or a combinator of two or more. */
|
|
75
|
+
type DeadlineSpec = "none" | DeadlineCount | {
|
|
76
|
+
readonly first_of: readonly DeadlineCount[];
|
|
77
|
+
} | {
|
|
78
|
+
readonly earlier_of: readonly DeadlineCount[];
|
|
79
|
+
} | {
|
|
80
|
+
readonly later_of: readonly DeadlineCount[];
|
|
81
|
+
};
|
|
82
|
+
/** An exception of a rule: what the subject's facts change about the duty. */
|
|
83
|
+
interface DeadlineException {
|
|
84
|
+
readonly name: string;
|
|
85
|
+
readonly when: Condition;
|
|
86
|
+
/** A missing `unless` never holds. */
|
|
87
|
+
readonly unless?: Condition;
|
|
88
|
+
readonly result: (typeof EXCEPTION_RESULTS)[number];
|
|
89
|
+
/** Where the remedy moved when barred, such as `claim_against_bond`. */
|
|
90
|
+
readonly remedy?: string;
|
|
91
|
+
readonly citation: DeadlineCitation;
|
|
92
|
+
readonly note?: string;
|
|
93
|
+
/** `approved` by default; `review_required` never decides. */
|
|
94
|
+
readonly status?: PartStatus;
|
|
95
|
+
}
|
|
96
|
+
/** One rule: when it applies, its exceptions and the deadline it counts. */
|
|
29
97
|
interface DeadlineRule {
|
|
30
|
-
/** The name of the rule inside its
|
|
98
|
+
/** The name of the rule inside its version. */
|
|
31
99
|
readonly key: string;
|
|
100
|
+
/** The group it belongs to; the first rule of a group that applies wins. */
|
|
101
|
+
readonly group: string;
|
|
32
102
|
readonly title?: string;
|
|
33
|
-
/**
|
|
34
|
-
readonly
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
103
|
+
/** Absent: the rule applies to every subject. */
|
|
104
|
+
readonly applies?: Applies;
|
|
105
|
+
/** `false`: the duty does not exist for the subjects it selects. */
|
|
106
|
+
readonly required?: boolean;
|
|
107
|
+
/** Absent means `none`: a duty without a date. */
|
|
108
|
+
readonly deadline?: DeadlineSpec;
|
|
109
|
+
readonly exceptions?: readonly DeadlineException[];
|
|
110
|
+
/** Moves a result off a non-business day after the counting roll. */
|
|
40
111
|
readonly adjust?: DeadlineAdjustment;
|
|
41
|
-
/**
|
|
112
|
+
/** `approved` by default; any other status is carried for review only. */
|
|
113
|
+
readonly status?: PartStatus;
|
|
114
|
+
readonly citation: DeadlineCitation;
|
|
115
|
+
/** Opaque data the block keeps and never reads. */
|
|
116
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
117
|
+
}
|
|
118
|
+
/** A group of rules: one result per subject (one per month for a periodic rule). */
|
|
119
|
+
interface DeadlineGroup {
|
|
120
|
+
readonly key: string;
|
|
121
|
+
readonly title?: string;
|
|
122
|
+
readonly citation: DeadlineCitation;
|
|
123
|
+
/** Groups whose `barred` result bars this one too. */
|
|
42
124
|
readonly requires?: readonly string[];
|
|
125
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
126
|
+
}
|
|
127
|
+
/** One holiday of a counting block. */
|
|
128
|
+
interface DeadlineHoliday {
|
|
129
|
+
readonly name: string;
|
|
130
|
+
readonly date: {
|
|
131
|
+
readonly month: number;
|
|
132
|
+
readonly day: number;
|
|
133
|
+
} | {
|
|
134
|
+
readonly month: number;
|
|
135
|
+
readonly weekday: Weekday;
|
|
136
|
+
readonly nth: 1 | 2 | 3 | 4 | 5 | "last";
|
|
137
|
+
};
|
|
43
138
|
readonly citation: DeadlineCitation;
|
|
139
|
+
readonly observed?: readonly {
|
|
140
|
+
readonly falls_on: (typeof OBSERVED_FALLS_ON)[number];
|
|
141
|
+
readonly observe: (typeof OBSERVED_MOVES)[number];
|
|
142
|
+
/** The listed date stops being a holiday. */
|
|
143
|
+
readonly replaces?: boolean;
|
|
144
|
+
readonly citation: DeadlineCitation;
|
|
145
|
+
}[];
|
|
44
146
|
}
|
|
45
|
-
/**
|
|
46
|
-
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
147
|
+
/** How a version counts: the days a last day rolls past, and its holidays. */
|
|
148
|
+
interface DeadlineCounting {
|
|
149
|
+
readonly roll_to: "next_business_day";
|
|
150
|
+
readonly roll_when: readonly RollDay[];
|
|
151
|
+
readonly holidays?: readonly DeadlineHoliday[];
|
|
152
|
+
readonly citation?: DeadlineCitation;
|
|
153
|
+
/** Only an approved block rolls a date. */
|
|
154
|
+
readonly status?: PartStatus;
|
|
155
|
+
}
|
|
156
|
+
/** What `save_rule_version` takes and a version row holds. */
|
|
157
|
+
interface RuleVersionContent {
|
|
158
|
+
readonly rules: readonly DeadlineRule[];
|
|
159
|
+
readonly groups: readonly DeadlineGroup[];
|
|
160
|
+
readonly counting?: DeadlineCounting | null;
|
|
161
|
+
readonly meta?: Readonly<Record<string, unknown>> | null;
|
|
162
|
+
}
|
|
163
|
+
/** Why a result needs a person to look at it; it never changes the result. */
|
|
164
|
+
type DeadlineReview = {
|
|
165
|
+
readonly kind: "regime";
|
|
166
|
+
readonly fact: string;
|
|
167
|
+
readonly from: string | null;
|
|
49
168
|
} | {
|
|
50
|
-
readonly
|
|
51
|
-
readonly
|
|
169
|
+
readonly kind: "exception";
|
|
170
|
+
readonly name: string;
|
|
171
|
+
readonly citation: DeadlineCitation;
|
|
172
|
+
readonly note?: string;
|
|
173
|
+
} | {
|
|
174
|
+
readonly kind: "rule";
|
|
175
|
+
readonly status: PartStatus;
|
|
176
|
+
} | {
|
|
177
|
+
readonly kind: "counting";
|
|
178
|
+
readonly status: PartStatus;
|
|
52
179
|
};
|
|
180
|
+
/** What a dated result rests on. */
|
|
181
|
+
interface DeadlineBasis {
|
|
182
|
+
/** The fact and date the taken count read; null for earlier_of and later_of. */
|
|
183
|
+
readonly anchor: {
|
|
184
|
+
readonly fact: string;
|
|
185
|
+
readonly date: string;
|
|
186
|
+
} | null;
|
|
187
|
+
/** The `from` facts counted as not having happened. */
|
|
188
|
+
readonly without: readonly string[];
|
|
189
|
+
}
|
|
190
|
+
/** The exception that decided a result. */
|
|
191
|
+
interface DeadlineExceptionResult {
|
|
192
|
+
readonly name: string;
|
|
193
|
+
readonly citation: DeadlineCitation;
|
|
194
|
+
readonly remedy?: string;
|
|
195
|
+
readonly note?: string;
|
|
196
|
+
}
|
|
197
|
+
/** One result of a group for a subject. */
|
|
198
|
+
interface DeadlineGroupResult {
|
|
199
|
+
readonly group: string;
|
|
200
|
+
readonly ruleKey: string | null;
|
|
201
|
+
/** `YYYY-MM` for a monthly count's month. */
|
|
202
|
+
readonly period: string | null;
|
|
203
|
+
readonly result: DeadlineResult;
|
|
204
|
+
readonly dueOn: string | null;
|
|
205
|
+
/** A date or result that a missing answer could still change. */
|
|
206
|
+
readonly provisional: boolean;
|
|
207
|
+
/** The facts still asked, sorted. */
|
|
208
|
+
readonly missing: readonly string[];
|
|
209
|
+
readonly exception: DeadlineExceptionResult | null;
|
|
210
|
+
readonly review: readonly DeadlineReview[];
|
|
211
|
+
readonly basis: DeadlineBasis | null;
|
|
212
|
+
/** The selected rule's deadline as authored. */
|
|
213
|
+
readonly deadline: DeadlineSpec | null;
|
|
214
|
+
/** The rule's citation, else the group's. */
|
|
215
|
+
readonly citation: DeadlineCitation;
|
|
216
|
+
}
|
|
217
|
+
/** Facts: a missing key is unknown, `null` does not exist or has not happened. */
|
|
218
|
+
type DeadlineFacts = Readonly<Record<string, unknown>>;
|
|
53
219
|
/** A version of a rule set: draft until approved, then frozen. */
|
|
54
220
|
interface RuleVersion {
|
|
55
221
|
readonly id: string;
|
|
@@ -58,7 +224,11 @@ interface RuleVersion {
|
|
|
58
224
|
readonly version: number;
|
|
59
225
|
readonly status: (typeof RULE_VERSION_STATUSES)[number];
|
|
60
226
|
readonly rules: readonly DeadlineRule[];
|
|
61
|
-
|
|
227
|
+
readonly groups: readonly DeadlineGroup[];
|
|
228
|
+
readonly counting?: DeadlineCounting;
|
|
229
|
+
/** Opaque data the block keeps and never reads. */
|
|
230
|
+
readonly meta?: Readonly<Record<string, unknown>>;
|
|
231
|
+
/** SHA-256 of the content, set when the version is approved. */
|
|
62
232
|
readonly contentHash?: string;
|
|
63
233
|
/** The first day the version applies. */
|
|
64
234
|
readonly effectiveFrom?: Temporal.PlainDate;
|
|
@@ -66,7 +236,7 @@ interface RuleVersion {
|
|
|
66
236
|
readonly approvedAt?: Temporal.Instant;
|
|
67
237
|
readonly createdAt: Temporal.Instant;
|
|
68
238
|
}
|
|
69
|
-
/**
|
|
239
|
+
/** The deadline of one group (one month of a periodic rule) for one subject. */
|
|
70
240
|
interface Deadline {
|
|
71
241
|
readonly id: string;
|
|
72
242
|
readonly organizationId: string;
|
|
@@ -74,16 +244,32 @@ interface Deadline {
|
|
|
74
244
|
readonly subjectId: string;
|
|
75
245
|
readonly jurisdiction: string;
|
|
76
246
|
readonly kind: string;
|
|
77
|
-
readonly
|
|
247
|
+
readonly groupKey: string;
|
|
248
|
+
/** The rule that applied; absent when none did. */
|
|
249
|
+
readonly ruleKey?: string;
|
|
250
|
+
/** `YYYY-MM` for one month of a periodic rule. */
|
|
251
|
+
readonly period?: string;
|
|
78
252
|
readonly ruleVersionId: string;
|
|
79
253
|
readonly ruleVersion?: number;
|
|
80
|
-
readonly facts:
|
|
254
|
+
readonly facts: DeadlineFacts;
|
|
81
255
|
readonly result: (typeof DEADLINE_RESULTS)[number];
|
|
82
256
|
/** Set when the result is `due`. */
|
|
83
257
|
readonly dueOn?: Temporal.PlainDate;
|
|
84
|
-
/**
|
|
258
|
+
/** A date or result a missing answer could still change. */
|
|
259
|
+
readonly provisional: boolean;
|
|
260
|
+
/** The facts the deadline still asks, sorted. */
|
|
85
261
|
readonly missing: readonly string[];
|
|
262
|
+
/** The exception that decided a refusal. */
|
|
263
|
+
readonly exception?: DeadlineExceptionResult;
|
|
264
|
+
/** What needs a person's review; it never changes the result. */
|
|
265
|
+
readonly review: readonly DeadlineReview[];
|
|
266
|
+
/** What a due date rests on. */
|
|
267
|
+
readonly basis?: DeadlineBasis;
|
|
268
|
+
/** The applied rule's deadline as authored. */
|
|
269
|
+
readonly deadline?: DeadlineSpec;
|
|
86
270
|
readonly citation: DeadlineCitation;
|
|
271
|
+
/** The date the deadline was evaluated on. */
|
|
272
|
+
readonly asOf: Temporal.PlainDate;
|
|
87
273
|
readonly state: (typeof DEADLINE_STATES)[number];
|
|
88
274
|
readonly satisfiedAt?: Temporal.Instant;
|
|
89
275
|
readonly satisfiedBy?: string;
|
|
@@ -98,8 +284,11 @@ interface DeadlineSubject {
|
|
|
98
284
|
interface DeadlineListOptions {
|
|
99
285
|
readonly subjectType?: string;
|
|
100
286
|
readonly subjectId?: string;
|
|
287
|
+
readonly groupKey?: string;
|
|
288
|
+
readonly period?: string;
|
|
101
289
|
readonly state?: Deadline["state"];
|
|
102
290
|
readonly result?: Deadline["result"];
|
|
291
|
+
readonly provisional?: boolean;
|
|
103
292
|
/** Only deadlines due before this date. */
|
|
104
293
|
readonly dueBefore?: Temporal.PlainDate;
|
|
105
294
|
/** At most 500; 100 by default. */
|
|
@@ -111,13 +300,13 @@ interface DeadlinesOptions extends BlockOptions {
|
|
|
111
300
|
}
|
|
112
301
|
interface Deadlines {
|
|
113
302
|
/**
|
|
114
|
-
* Saves
|
|
115
|
-
* use. Service role only.
|
|
303
|
+
* Saves a version's content as a draft version of a rule set, creating the
|
|
304
|
+
* set on first use. Service role only.
|
|
116
305
|
*/
|
|
117
306
|
saveRules(input: {
|
|
118
307
|
readonly jurisdiction: string;
|
|
119
308
|
readonly kind: string;
|
|
120
|
-
readonly
|
|
309
|
+
readonly content: RuleVersionContent;
|
|
121
310
|
readonly effectiveFrom?: Temporal.PlainDate;
|
|
122
311
|
readonly title?: string;
|
|
123
312
|
}): AsyncResult<RuleVersion>;
|
|
@@ -137,14 +326,19 @@ interface Deadlines {
|
|
|
137
326
|
readonly kind: string;
|
|
138
327
|
readonly date?: Temporal.PlainDate;
|
|
139
328
|
}): AsyncResult<RuleVersion | undefined>;
|
|
140
|
-
/**
|
|
329
|
+
/**
|
|
330
|
+
* Computes and stores a subject's deadlines from its facts: one per group of
|
|
331
|
+
* the version that applies on `asOf` (today by default), or only `group`'s,
|
|
332
|
+
* and one per month for a periodic rule. A missing fact is unknown and `null`
|
|
333
|
+
* does not exist or has not happened.
|
|
334
|
+
*/
|
|
141
335
|
compute(input: DeadlineSubject & {
|
|
142
336
|
readonly jurisdiction: string;
|
|
143
337
|
readonly kind: string;
|
|
144
|
-
readonly
|
|
145
|
-
readonly facts: Readonly<Record<string, unknown>>;
|
|
338
|
+
readonly facts: DeadlineFacts;
|
|
146
339
|
readonly asOf?: Temporal.PlainDate;
|
|
147
|
-
|
|
340
|
+
readonly group?: string;
|
|
341
|
+
}): AsyncResult<readonly Deadline[]>;
|
|
148
342
|
/** Re-evaluates a subject's pending deadlines with extra facts. */
|
|
149
343
|
recompute(input: DeadlineSubject & {
|
|
150
344
|
readonly facts?: Readonly<Record<string, unknown>>;
|
|
@@ -157,16 +351,18 @@ interface Deadlines {
|
|
|
157
351
|
list(options?: DeadlineListOptions): AsyncResult<readonly Deadline[]>;
|
|
158
352
|
}
|
|
159
353
|
/**
|
|
160
|
-
* Evaluates
|
|
161
|
-
*
|
|
354
|
+
* Evaluates a rule set version against facts in TypeScript, with the same
|
|
355
|
+
* results as the database: one per group (one per month for a periodic rule),
|
|
356
|
+
* or only `group`'s. Use it to preview a draft or to show dates without a round
|
|
357
|
+
* trip. `asOf` is an ISO date, today by default.
|
|
162
358
|
*/
|
|
163
|
-
export declare function
|
|
164
|
-
/** The problems of a
|
|
165
|
-
export declare function
|
|
359
|
+
export declare function evaluateVersion(content: RuleVersionContent, facts: DeadlineFacts, asOf?: Temporal.PlainDate | string, group?: string): readonly DeadlineGroupResult[];
|
|
360
|
+
/** The problems of a version's content, or an empty array when it can be saved. */
|
|
361
|
+
export declare function validateRuleVersion(content: unknown): readonly string[];
|
|
166
362
|
/**
|
|
167
363
|
* Deadlines: rule sets owned by the platform, versioned and approved once, and
|
|
168
|
-
* the deadlines computed from a subject's facts. A
|
|
169
|
-
* known
|
|
364
|
+
* the deadlines computed from a subject's facts. A deadline whose facts are not
|
|
365
|
+
* all known is `unknown` with the facts it waits for, never a guess.
|
|
170
366
|
*/
|
|
171
367
|
export declare function createDeadlines(options: DeadlinesOptions): Deadlines;
|
|
172
368
|
/** What every `deadline.*` event carries. */
|
|
@@ -175,11 +371,21 @@ interface DeadlineEventData {
|
|
|
175
371
|
readonly id: string;
|
|
176
372
|
readonly subjectType: string;
|
|
177
373
|
readonly subjectId: string;
|
|
178
|
-
|
|
179
|
-
|
|
374
|
+
/** The group of the rule set version the deadline belongs to. */
|
|
375
|
+
readonly groupKey: string;
|
|
376
|
+
/** The rule that applied; null when none did. */
|
|
377
|
+
readonly ruleKey?: string | null;
|
|
378
|
+
/** `YYYY-MM` for one month of a periodic rule. */
|
|
379
|
+
readonly period?: string | null;
|
|
380
|
+
/**
|
|
381
|
+
* `due`, `unknown`, `pending`, `undated`, `not_covered`, `not_applicable`,
|
|
382
|
+
* `not_required` or `barred`.
|
|
383
|
+
*/
|
|
180
384
|
readonly result: string;
|
|
181
|
-
/** The due date as an ISO date;
|
|
385
|
+
/** The due date as an ISO date; set only while the result is `due`. */
|
|
182
386
|
readonly dueOn?: string | null;
|
|
387
|
+
/** A date or result a missing answer could still change. */
|
|
388
|
+
readonly provisional: boolean;
|
|
183
389
|
}
|
|
184
390
|
/** The events of the `deadlines` block: type to data. */
|
|
185
391
|
type DeadlinesEvents = {
|
|
@@ -190,4 +396,4 @@ type DeadlinesEvents = {
|
|
|
190
396
|
export declare const deadlinesEvents: Events<DeadlinesEvents>;
|
|
191
397
|
/** The `deadlines` block's manifest. */
|
|
192
398
|
export declare const deadlinesBlock: BlockOf<"deadlines", typeof createDeadlines, DeadlinesEvents>;
|
|
193
|
-
export { type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type Deadline, type DeadlineCitation, type
|
|
399
|
+
export { type Applies, type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type Condition, type ConditionValue, type DateRegime, type Deadline, type DeadlineBasis, type DeadlineCitation, type DeadlineCount, type DeadlineCounting, type DeadlineEventData, type DeadlineException, type DeadlineExceptionResult, type DeadlineFacts, type DeadlineGroup, type DeadlineGroupResult, type DeadlineHoliday, type DeadlineListOptions, type DeadlineResult, type DeadlineReview, type DeadlineRule, type DeadlineSpec, type DeadlineSubject, type Deadlines, type DeadlinesEvents, type DeadlinesOptions, type RpcClient, type RuleVersion, type RuleVersionContent, dbTransport, extendBlock, rpcTransport, sqlTransport, withBlockHooks, wrapTransport };
|