better-supabase 0.22.0 → 0.25.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/{access-sql-CNIgUqWf.js → access-sql-bjWFUWlk.js} +11 -0
- package/dist/{ai-schedules-7uQNMXve.d.ts → ai-schedules-yGZH-vQb.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-CHObZL7m.d.ts → api-B1OkIWdx.d.ts} +3 -3
- package/dist/{api-keys-D5k63K6y.d.ts → api-keys-ClhKBDcc.d.ts} +1 -1
- package/dist/{app-tables-BGzdnQm5.d.ts → app-tables-xij_MI5H.d.ts} +1 -1
- package/dist/{approvals-Dh9dUXrN.d.ts → approvals-C5fmPLsH.d.ts} +1 -1
- package/dist/astro/index.d.ts +5 -5
- package/dist/{authorization-DhoA7dsD.d.ts → authorization-BJV2i8xB.d.ts} +136 -21
- package/dist/{authorization-hooks-D_pwXlBs.d.ts → authorization-hooks-DtzreCAq.d.ts} +1 -1
- package/dist/{automations-FCnWy387.js → automations-8L3NEuoq.js} +4 -1
- package/dist/{availability-vguUvEK2.d.ts → availability-BdeKCHpl.d.ts} +10 -0
- package/dist/better-result/index.d.ts +2 -2
- package/dist/{bind-CFsctoFJ.d.ts → bind-vKDmdu_4.d.ts} +4 -4
- package/dist/{block-env-BrUNeuJ_.d.ts → block-env-wVLz0KMV.d.ts} +4 -4
- 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 +5 -5
- 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 +6 -6
- package/dist/blocks/bulk/index.d.ts +2 -2
- package/dist/blocks/calendar/index.d.ts +50 -13
- package/dist/blocks/calendar/index.js +133 -30
- package/dist/blocks/catalog/index.d.ts +2 -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 +45 -3
- package/dist/blocks/custom-fields/index.js +40 -1
- 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 +4 -4
- package/dist/blocks/employees/index.d.ts +25 -6
- package/dist/blocks/employees/index.js +37 -2
- 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 +2 -2
- 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 +13 -6
- package/dist/blocks/hiring/index.js +15 -4
- 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 +2 -2
- package/dist/blocks/invoices/index.d.ts +3 -3
- 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/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 +3 -3
- 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 +3 -3
- 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 +2 -2
- 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 +6 -4
- package/dist/blocks/search/index.js +2 -0
- 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 +30 -5
- package/dist/blocks/share-links/index.js +58 -22
- 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 +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 +2 -2
- package/dist/blocks/subjects/index.d.ts +2 -2
- package/dist/blocks/tags/index.d.ts +20 -5
- package/dist/blocks/tags/index.js +15 -2
- package/dist/blocks/tasks/index.d.ts +5 -5
- package/dist/blocks/teams/index.d.ts +28 -6
- package/dist/blocks/teams/index.js +10 -3
- package/dist/blocks/templates/index.d.ts +4 -4
- package/dist/blocks/time-tracking/index.d.ts +28 -5
- package/dist/blocks/time-tracking/index.js +27 -11
- package/dist/blocks/timeline/index.d.ts +4 -4
- 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/{bookings-BpCNphYp.d.ts → bookings-CVw5-Q0Z.d.ts} +1 -1
- package/dist/chat-sdk/index.d.ts +2 -2
- package/dist/cli/{add-BXFzr0Wf.js → add-BTVrOGJF.js} +11 -11
- package/dist/cli/add-Bf1fyCWm.js +1 -0
- package/dist/cli/{add-B6CQOt3A.js → add-C2pNvVpu.js} +2 -2
- package/dist/cli/{backfill-Dflp6JZk.js → backfill-BicVPugb.js} +3 -3
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-CBH3N7Fy.js → blocks-BmYOH4T-.js} +1 -1
- package/dist/cli/{blocks-FtOIcUbu.js → blocks-sScN-ik-.js} +1 -1
- package/dist/cli/{cache-61VwYKEv.js → cache-1TfBy2K4.js} +1 -1
- package/dist/cli/{codemod-CqPRa25J.js → codemod-ylE6wGLo.js} +1 -1
- package/dist/cli/{config-BH0goim0.js → config-BVfeG3A5.js} +37 -5
- package/dist/cli/{config-CTRzkX0H.js → config-CeaQMrvS.js} +1 -1
- package/dist/cli/{content-mapper-DGQQY5IA.js → content-mapper-hUW2nb92.js} +2 -2
- package/dist/cli/{db-DCeyHS1y.js → db-DwjyUbAh.js} +2 -2
- package/dist/cli/{doctor-BxxSO193.js → doctor-D3WKFBSv.js} +16 -16
- package/dist/cli/{gen-D2cqqqTH.js → gen-CqsUdsB2.js} +14 -14
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/{init-BnG1IE1y.js → init-DryZ5Mp1.js} +6 -6
- package/dist/cli/{live-D26OWOAb.js → live-Di45imoV.js} +2 -2
- package/dist/cli/{mcp-1l3C_GdB.js → mcp-BklC-3eK.js} +2 -2
- package/dist/cli/{metadata-DDfPBHwI.js → metadata-7PsBF5Xw.js} +3 -3
- package/dist/cli/{migration-safety-CQbrfZIx.js → migration-safety-Doy9qYO8.js} +2 -2
- package/dist/cli/{migrations-Ch5Uuvyj.js → migrations-JtsPYv8g.js} +1 -1
- package/dist/cli/{module-migration-Dul1uTYX.js → module-migration-ZIn1NCMi.js} +2 -2
- package/dist/cli/{powersync-CfT-tRx1.js → powersync-BRGXOCJ0.js} +2 -2
- package/dist/cli/powersync-Dq-txa0_.js +1 -0
- package/dist/cli/{print-CbPT4PTL.js → print-Dfqd4DB-.js} +2 -2
- package/dist/cli/{remove-kDH1yxKZ.js → remove-CQzSCYTu.js} +5 -5
- package/dist/cli/{render-0Vd7BaNA.js → render-DWRz-uPQ.js} +7 -4
- package/dist/cli/{run-DxTd55Ug.js → run-DPLedqTF.js} +25 -25
- package/dist/cli/{run-Dafms0D2.js → run-j54rk2w-.js} +8 -8
- package/dist/cli/{seed-CdSxunFT.js → seed-BMynpMPy.js} +2 -2
- package/dist/cli/seed-CO3j_bly.js +1 -0
- package/dist/cli/{shared-BQAMXvwd.js → shared-CslNcs-R.js} +1 -1
- package/dist/cli/{snapshot-B8K6gYjA.js → snapshot-DdN5GlhH.js} +3 -3
- package/dist/cli/{source-CXDyCWz5.js → source-COARbqch.js} +1 -1
- package/dist/cli/{source-args-z-jkabmO.js → source-args-CDmmFmFG.js} +1 -1
- package/dist/cli/{spec-BGsnTkIl.js → spec-CgLNZc_C.js} +2 -2
- package/dist/cli/{spec-CaN7nOqI.js → spec-DIhBQlBF.js} +1 -1
- package/dist/cli/{sql-layout-BGAlcp1U.js → sql-layout-8jrP5gIa.js} +2 -2
- package/dist/cli/{sync-CT_5VG0E.js → sync-SqyVHRSJ.js} +3 -3
- package/dist/cli/{upgrade-frUtPDDb.js → upgrade-CY-vj_qh.js} +4 -4
- package/dist/cli/{upgrade-DA7aO88E.js → upgrade-D0aLhluU.js} +2 -2
- package/dist/cli/{version-CUdPyV6J.js → version-Bhca9D6q.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/native/index.d.ts +4 -4
- package/dist/{cloud-event-CzZTJkXv.d.ts → cloud-event-DcJwder2.d.ts} +1 -1
- package/dist/{composite-ChzHhSB0.d.ts → composite-CWJvZgni.d.ts} +6 -6
- package/dist/config/index.d.ts +4 -4
- package/dist/config/index.js +4 -4
- package/dist/{config-C9AOcQ9S.js → config-C19McoGo.js} +4 -3
- package/dist/{config-CH-D2B-4.js → config-CP-WaboC.js} +6 -5
- package/dist/{connectors-Fud4amxp.d.ts → connectors-CHGiffYH.d.ts} +1 -1
- package/dist/{context-DEisra3V.d.ts → context-BJoHD20l.d.ts} +60 -14
- package/dist/{controller-B6vWdKSa.d.ts → controller-CwGXms17.d.ts} +1 -1
- package/dist/{conversion-DBgMck5U.d.ts → conversion-DlfStnln.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-Lf6rI2QN.d.ts → define-BLP6XtoL.d.ts} +1 -1
- package/dist/{define-block-DCAiOrNX.d.ts → define-block-DibVN37N.d.ts} +4 -4
- package/dist/edge/index.d.ts +8 -8
- package/dist/elysia/index.d.ts +1 -1
- package/dist/{ended-gUsMZVNg.d.ts → ended-B8RyuUXF.d.ts} +1 -1
- package/dist/{entitlements-BPaPd3MD.d.ts → entitlements-CsZcfllV.d.ts} +2 -2
- package/dist/eve/index.d.ts +2 -2
- package/dist/{event-calendar-DCufbihU.d.ts → event-calendar-DVLs2wUO.d.ts} +1 -1
- package/dist/events/index.d.ts +3 -3
- package/dist/{events-vcqenSYU.d.ts → events-Cc9DDQWH.d.ts} +2 -0
- package/dist/{executor-DNK401lZ.d.ts → executor-C-Ox9eKq.d.ts} +1 -1
- package/dist/{executor-aFV7nEBs.d.ts → executor-DNPm13a9.d.ts} +2 -2
- package/dist/expo/index.d.ts +3 -3
- package/dist/{field-errors-DBgDCITw.d.ts → field-errors-6BVg31Yp.d.ts} +7 -7
- package/dist/{framework-DKA3fTHl.d.ts → framework-GlxXiotm.d.ts} +6 -6
- 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-ClvuSZEz.d.ts → index-BfYDY6eh.d.ts} +3 -3
- package/dist/{index-CM2aGNRo.d.ts → index-C0QuN9_P.d.ts} +186 -8
- package/dist/{index-CG9rA8H8.d.ts → index-C_qlBJ3k.d.ts} +2 -2
- package/dist/{index-3p_oWttZ.d.ts → index-Cagz4Z2k.d.ts} +1 -1
- package/dist/{index-ByF22_C6.d.ts → index-CbUCGMqj.d.ts} +3 -3
- package/dist/{index-C4sjewrr.d.ts → index-D01wHGSN.d.ts} +11 -11
- package/dist/{index-iRkFvJ7J.d.ts → index-D1ckLbUM.d.ts} +1 -1
- package/dist/{index-CdMZQCYR.d.ts → index-DOHx3JuB.d.ts} +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/{instances-CK0jR3Pc.js → instances-qz2MCMyK.js} +111 -11
- package/dist/{kit-CVgQCIBO.d.ts → kit-Dxx3MT8m.d.ts} +3 -3
- package/dist/list/index.d.ts +1 -1
- package/dist/{list-query-XYfUZb0j.d.ts → list-query-XHoYDlRN.d.ts} +1 -1
- package/dist/mapper/bin.js +6 -6
- package/dist/mcp/index.d.ts +5 -5
- 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 +21 -21
- package/dist/node/index.d.ts +2 -2
- package/dist/{operations-DC3wU3Sy.d.ts → operations-CPhOcuzl.d.ts} +1 -1
- package/dist/{options-fMxhtuVR.js → options-BJtdsK7b.js} +4 -1
- package/dist/options-BOGo1qCA.js +13 -0
- package/dist/options-BSsYXjhC.js +9 -0
- package/dist/options-C4LuqmdG.js +15 -0
- package/dist/{options-DhdazgTZ.js → options-eTepQ1rZ.js} +4 -1
- package/dist/{options-BfFC4iFE.js → options-jsOCvLUz.js} +3 -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-HxjZTfF6.d.ts → outbox-DxZgoKwp.d.ts} +2 -2
- package/dist/{pool-CrtT4dg-.d.ts → pool-wjbAMqc1.d.ts} +1 -1
- package/dist/{ports-BbBJVyS0.d.ts → ports-Bw7uxPd_.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-CS490mYJ.js → preset-BbSWLoXM.js} +2 -2
- package/dist/{project-NmP1NdLi.js → project-TN03XDsA.js} +5 -5
- package/dist/{provider-CqwEOLCA.d.ts → provider-ClrIplXa.d.ts} +1 -1
- package/dist/{push-token-CPJfPFa2.d.ts → push-token-vykw2JXT.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/react/index.d.ts +7 -7
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +8 -8
- package/dist/react/session.d.ts +2 -2
- package/dist/react-router/index.d.ts +5 -5
- package/dist/realtime/index.d.ts +4 -4
- package/dist/realtime/index.js +1 -1
- package/dist/{record-form-BbZpwsEi.d.ts → record-form-D2-F4IwS.d.ts} +1 -1
- package/dist/records/index.d.ts +7 -7
- package/dist/{refresh-DT_ICaK-.d.ts → refresh-CCKB1Wa6.d.ts} +1 -1
- package/dist/{refusal-OrlI3g4H.d.ts → refusal-D_tklIEb.d.ts} +2 -2
- package/dist/{resolve-CXX6DHv3.d.ts → resolve-Bj1qD7Dy.d.ts} +1 -1
- package/dist/{resolved-names-DdlJzoMK.js → resolved-names-Dsf28_Dr.js} +1 -1
- package/dist/{resource-execute-CUG6xUuh.d.ts → resource-execute-BSTIfp1D.d.ts} +1 -1
- package/dist/{resource-types-DjZ91WKA.d.ts → resource-types-D5WEvYtV.d.ts} +2 -2
- package/dist/{resources-6Ncdt9XT.d.ts → resources-CsZ7RhZC.d.ts} +1 -1
- package/dist/{respond-oZeJ342J.d.ts → respond-BzRG-0qc.d.ts} +1 -1
- package/dist/server/index.d.ts +20 -20
- package/dist/{server-types-BH6AjDBN.d.ts → server-types-BlDiY-ya.d.ts} +8 -8
- package/dist/{session-Y5SSYO2C.d.ts → session-BGP98Rgj.d.ts} +5 -5
- package/dist/{session-status-qQLm7jzh.d.ts → session-status-C4t7kbSn.d.ts} +2 -2
- package/dist/{sign-in-BAjR49fq.d.ts → sign-in-CAadgm33.d.ts} +2 -2
- 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 +5 -5
- package/dist/{sql-BMXEHTvr.js → sql-Dg3W1ENk.js} +5113 -1530
- package/dist/sqlite/index.d.ts +1 -1
- package/dist/ssr/index.d.ts +5 -5
- package/dist/storage/index.js +1 -1
- package/dist/{subject-readers-8GySC9Z8.d.ts → subject-readers-DJbzlm8a.d.ts} +1 -1
- package/dist/subjects-NomQg6Eg.d.ts +131 -0
- package/dist/{support-B4ZBVxt3.d.ts → support-D7CMbhRT.d.ts} +4 -4
- package/dist/{support-view-BYOgwXsJ.d.ts → support-view-CIDXF3_H.d.ts} +1 -1
- package/dist/svelte/index.d.ts +8 -8
- package/dist/sveltekit/index.d.ts +6 -6
- package/dist/{tags-Cjtcp5cN.d.ts → tags-Dg4Ywmqp.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-BHvMFNXl.d.ts → tenant-BRmKZ7aq.d.ts} +2 -2
- package/dist/testing/index.d.ts +16 -16
- package/dist/testing/index.js +2 -2
- package/dist/{timeline-CEzj9v1z.d.ts → timeline-Cjl-1hiA.d.ts} +3 -3
- package/dist/{topic-gTVjLGTk.d.ts → topic-CpsKVBot.d.ts} +3 -3
- package/dist/{topic-DClSoqY7.js → topic-F0FKzJyQ.js} +1 -1
- package/dist/{types-yj8VF4oY.d.ts → types-BdaBfYIw.d.ts} +2 -2
- package/dist/{types-BC1HLEVx.d.ts → types-CjRwmCRP.d.ts} +2 -2
- package/dist/{types-EO2crSX_.d.ts → types-DR1MHh7N.d.ts} +1 -1
- package/dist/{vault-O-YlAyHb.d.ts → vault-BghaujrZ.d.ts} +1 -1
- package/dist/vercel-connect/index.d.ts +1 -1
- package/dist/{verify-B0KLBb3j.d.ts → verify-CI8LgSpv.d.ts} +1 -1
- package/dist/{view-DyFdMCqg.d.ts → view-BvNA7EOC.d.ts} +1 -1
- package/dist/vue/index.d.ts +9 -9
- package/dist/{watch-topic-C6HhbnVz.d.ts → watch-topic-BaMZX139.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-B3Ss55Fy.d.ts → workflow-sdk-BNsZrcVg.d.ts} +1 -1
- package/dist/{workflow-sdk-DELaQEp3.js → workflow-sdk-CE8sEK57.js} +38 -1
- package/dist/yjs/index.d.ts +1 -1
- package/dist/yjs/index.js +1 -1
- package/package.json +1 -1
- package/schemas/config-v1.json +217 -1
- package/dist/cli/add-w_HumDPX.js +0 -1
- package/dist/cli/powersync-Vmhw5c1N.js +0 -1
- package/dist/cli/seed-CXJvTU5D.js +0 -1
- package/dist/options-C1-pwEqm.js +0 -5
- package/dist/options-CTv-xmbA.js +0 -5
- package/dist/options-ChiL-4ZS.js +0 -8
- package/dist/subjects-DvmQeF_F.d.ts +0 -79
|
@@ -8,6 +8,27 @@ import { n as defineBlock } from "../../define-block-BGqOO8B3.js";
|
|
|
8
8
|
import { t as requireOrganization } from "../../block-tenant-DHp7subc.js";
|
|
9
9
|
import { t as rankBetweenResult } from "../../rank-result-BBJIK-k_.js";
|
|
10
10
|
//#region src/blocks/custom-fields/custom-fields.ts
|
|
11
|
+
function fieldValueOf(value) {
|
|
12
|
+
const row = recordOf(value, "field value");
|
|
13
|
+
const optional = (key) => {
|
|
14
|
+
const found = optionalText(row[key]);
|
|
15
|
+
return found === void 0 ? {} : { [key]: found };
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
id: textOf(row["id"]),
|
|
19
|
+
subject: {
|
|
20
|
+
type: textOf(row["subjectType"]),
|
|
21
|
+
id: textOf(row["subjectId"])
|
|
22
|
+
},
|
|
23
|
+
key: textOf(row["key"]),
|
|
24
|
+
label: textOf(row["label"]),
|
|
25
|
+
type: textOf(row["type"]),
|
|
26
|
+
value: row["value"] ?? null,
|
|
27
|
+
...optional("rank"),
|
|
28
|
+
...optional("createdAt"),
|
|
29
|
+
...optional("updatedAt")
|
|
30
|
+
};
|
|
31
|
+
}
|
|
11
32
|
function createCustomFields(options) {
|
|
12
33
|
const call = blockCall(options.transport, options.schema, options.mappers);
|
|
13
34
|
const idOf = (label) => (value) => ({ id: textOf(recordOf(value, label)["id"]) });
|
|
@@ -59,7 +80,24 @@ function createCustomFields(options) {
|
|
|
59
80
|
subject_id: subject.id,
|
|
60
81
|
definition: definitionId,
|
|
61
82
|
value
|
|
62
|
-
}, idOf("set_field_value")))
|
|
83
|
+
}, idOf("set_field_value"))),
|
|
84
|
+
readFields: (subject) => tenant().andThen((organizationId) => call("read_field_values", {
|
|
85
|
+
tenant: organizationId,
|
|
86
|
+
subject_type: subject.type,
|
|
87
|
+
subject_id: subject.id
|
|
88
|
+
}, (value) => (Array.isArray(value) ? value : []).map(fieldValueOf))),
|
|
89
|
+
setField: (subject, input) => tenant().andThen((organizationId) => call("set_field_value", {
|
|
90
|
+
tenant: organizationId,
|
|
91
|
+
subject_type: subject.type,
|
|
92
|
+
subject_id: subject.id,
|
|
93
|
+
key: input.key,
|
|
94
|
+
label: input.label,
|
|
95
|
+
type: input.type,
|
|
96
|
+
value: input.value ?? null,
|
|
97
|
+
rank: input.rank ?? null,
|
|
98
|
+
if_absent: input.ifAbsent ?? false
|
|
99
|
+
}, fieldValueOf)),
|
|
100
|
+
deleteValue: (id) => call("delete_field_value", { value_id: id }, (value) => value === true)
|
|
63
101
|
}, options.hooks, {
|
|
64
102
|
block: "custom-fields",
|
|
65
103
|
...options.logger ? { logger: options.logger } : {}
|
|
@@ -72,6 +110,7 @@ const customFieldsEvents = defineEvents({
|
|
|
72
110
|
"custom_field.saved": event(),
|
|
73
111
|
"custom_field.deleted": event(),
|
|
74
112
|
"field_value.set": event(),
|
|
113
|
+
"field_value.deleted": event(),
|
|
75
114
|
"field_value.viewed": event()
|
|
76
115
|
});
|
|
77
116
|
//#endregion
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
|
-
import { Ct as Events, F as DataExportEventData, K as LegalHoldEventData, Y as OrganizationDeletionEventData } from "../../events-
|
|
3
|
+
import { Ct as Events, F as DataExportEventData, K as LegalHoldEventData, Y as OrganizationDeletionEventData } from "../../events-Cc9DDQWH.js";
|
|
4
4
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
5
|
-
import { a as CredentialSubject, i as CredentialRef, r as CredentialProvider } from "../../provider-
|
|
5
|
+
import { a as CredentialSubject, i as CredentialRef, r as CredentialProvider } from "../../provider-ClrIplXa.js";
|
|
6
6
|
import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
7
7
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
8
8
|
import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
|
|
9
9
|
import { g as JobHandler } from "../../types-Czq9Xtpa.js";
|
|
10
|
-
import { c as BlockOf } from "../../define-block-
|
|
11
|
-
import { i as EventSink } from "../../cloud-event-
|
|
10
|
+
import { c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
11
|
+
import { i as EventSink } from "../../cloud-event-DcJwder2.js";
|
|
12
12
|
//#region src/blocks/data-lifecycle/data-lifecycle.d.ts
|
|
13
13
|
interface StorageReply<T> {
|
|
14
14
|
readonly data: T | null;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DBV730sF.js";
|
|
4
4
|
import { r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
5
|
-
import { Ct as Events } from "../../events-
|
|
6
|
-
import { v as DealEventData } from "../../index-
|
|
5
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
6
|
+
import { v as DealEventData } from "../../index-C_qlBJ3k.js";
|
|
7
7
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
8
8
|
import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
9
9
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
10
10
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
11
|
-
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-
|
|
11
|
+
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
12
12
|
import { n as Money } from "../../money-BNRdJQzA.js";
|
|
13
13
|
import { t as DealForecast } from "../../deal-forecast-LwO-Z4_C.js";
|
|
14
14
|
//#region src/blocks/deals/deals.d.ts
|
|
@@ -3,13 +3,13 @@ import { t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DBV730sF.js";
|
|
4
4
|
import { n as ExtraFields, r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
5
5
|
import { $ as RecordRef } from "../../types-DFdg_4yN.js";
|
|
6
|
-
import { Ct as Events } from "../../events-
|
|
6
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
7
7
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
8
8
|
import { n as BlockOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
9
9
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
10
10
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
11
11
|
import { n as dispatchSqlOptions, t as DispatchSqlOptions } from "../../options-o5wCw8H7.js";
|
|
12
|
-
import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-
|
|
12
|
+
import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-DibVN37N.js";
|
|
13
13
|
//#region src/blocks/dispatch/statuses.d.ts
|
|
14
14
|
/** Where a work order is in its life. */
|
|
15
15
|
export declare const WORK_ORDER_STATUSES: readonly ["unscheduled", "scheduled", "en_route", "on_site", "done", "cancelled"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ct as Events, I as DocumentEventData, L as DocumentSuggestionEventData } from "../../events-
|
|
1
|
+
import { Ct as Events, I as DocumentEventData, L as DocumentSuggestionEventData } from "../../events-Cc9DDQWH.js";
|
|
2
2
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
3
|
-
import { c as BlockOf } from "../../define-block-
|
|
3
|
+
import { c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
4
4
|
import { a as DocumentSuggestion, c as DocumentVersion, d as OpenedDocument, f as SuggestionDecision, i as DocumentState, l as Documents, n as DocumentInfo, o as DocumentSuggestionStatus, p as createDocuments, r as DocumentRef, s as DocumentUpdate, t as DecidedSuggestion, u as DocumentsOptions } from "../../documents-Cup1rpjF.js";
|
|
5
5
|
//#region src/blocks/documents/events.d.ts
|
|
6
6
|
/** The events of the `documents` block: type to data. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
|
-
import { Ct as Events } from "../../events-
|
|
3
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
4
4
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
5
5
|
import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
6
6
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
7
7
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
8
|
-
import { c as BlockOf } from "../../define-block-
|
|
8
|
+
import { c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
9
9
|
import { _ as dohResolver, m as TxtResolver, t as DohResolverOptions } from "../../sso-B0Txid2-.js";
|
|
10
10
|
//#region src/blocks/domains/domains.d.ts
|
|
11
11
|
/** The DNS record that proves a custom domain belongs to the organization. */
|
|
@@ -3,12 +3,12 @@ import { b as DbError, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DBV730sF.js";
|
|
4
4
|
import { n as ExtraFields, r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
5
5
|
import { $ as RecordRef } from "../../types-DFdg_4yN.js";
|
|
6
|
-
import { Ct as Events } from "../../events-
|
|
6
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
7
7
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
8
8
|
import { n as BlockOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
9
9
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
10
10
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
11
|
-
import { Sn as EntitySchema, c as BlockOf, rn as RecordBinding } from "../../define-block-
|
|
11
|
+
import { Sn as EntitySchema, c as BlockOf, rn as RecordBinding } from "../../define-block-DibVN37N.js";
|
|
12
12
|
import { n as Money } from "../../money-BNRdJQzA.js";
|
|
13
13
|
import { r as WebhookInput } from "../../signatures-Dkx9OE8j.js";
|
|
14
14
|
import { i as PaymentEvent, n as Payment, o as PaymentProvider } from "../../payments-BYcN34Fp.js";
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DBV730sF.js";
|
|
4
4
|
import { r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
5
|
-
import { Ct as Events, R as DriveEventData } from "../../events-
|
|
5
|
+
import { Ct as Events, R as DriveEventData } from "../../events-Cc9DDQWH.js";
|
|
6
6
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
7
7
|
import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
|
|
10
|
-
import { Ot as Attachments, Tt as AttachmentStorage, _t as AttachmentDownload, c as BlockOf, ht as Attachment } from "../../define-block-
|
|
11
|
-
import { s as ApprovalStatus } from "../../approvals-
|
|
12
|
-
import { t as SubjectConfig } from "../../subjects-
|
|
10
|
+
import { Ot as Attachments, Tt as AttachmentStorage, _t as AttachmentDownload, c as BlockOf, ht as Attachment } from "../../define-block-DibVN37N.js";
|
|
11
|
+
import { s as ApprovalStatus } from "../../approvals-C5fmPLsH.js";
|
|
12
|
+
import { t as SubjectConfig } from "../../subjects-NomQg6Eg.js";
|
|
13
13
|
//#region src/blocks/drive/drive.d.ts
|
|
14
14
|
interface DriveOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions {
|
|
15
15
|
/** The caller's transport (`rpcTransport(supabase)`), so grants apply. */
|
|
@@ -3,15 +3,15 @@ import { T as ErrorMapper, f as Result, t as AsyncResult } from "../../result-DZ
|
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DBV730sF.js";
|
|
4
4
|
import { r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
5
5
|
import { $ as RecordRef } from "../../types-DFdg_4yN.js";
|
|
6
|
-
import { Ct as Events } from "../../events-
|
|
7
|
-
import { y as EmployeeEventData } from "../../index-
|
|
6
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
7
|
+
import { y as EmployeeEventData } from "../../index-C_qlBJ3k.js";
|
|
8
8
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
9
9
|
import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
10
10
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
11
11
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
12
|
-
import { Bt as Action, Sn as EntitySchema, c as BlockOf } from "../../define-block-
|
|
12
|
+
import { Bt as Action, Sn as EntitySchema, c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
13
13
|
import { n as Money } from "../../money-BNRdJQzA.js";
|
|
14
|
-
import { n as ConversionContext, t as ConversionClients } from "../../conversion-
|
|
14
|
+
import { n as ConversionContext, t as ConversionClients } from "../../conversion-DlfStnln.js";
|
|
15
15
|
//#region src/blocks/employees/employees.d.ts
|
|
16
16
|
type EmployeeStatus = "preboarding" | "active" | "on_leave" | "offboarded";
|
|
17
17
|
type SalaryPeriod = "hour" | "week" | "month" | "year";
|
|
@@ -20,6 +20,8 @@ interface Employee<F extends object = Record<never, never>> {
|
|
|
20
20
|
readonly id: string;
|
|
21
21
|
readonly organizationId: string;
|
|
22
22
|
readonly name: string;
|
|
23
|
+
readonly firstName?: string;
|
|
24
|
+
readonly lastName?: string;
|
|
23
25
|
readonly email?: string;
|
|
24
26
|
/**
|
|
25
27
|
* The account, when the employee has one; contractors and interns often
|
|
@@ -48,6 +50,8 @@ interface OrgChartEntry<F extends object = Record<never, never>> extends Employe
|
|
|
48
50
|
}
|
|
49
51
|
interface EmployeeInput<F extends object = Record<never, never>> {
|
|
50
52
|
readonly name: string;
|
|
53
|
+
readonly firstName?: string;
|
|
54
|
+
readonly lastName?: string;
|
|
51
55
|
readonly email?: string;
|
|
52
56
|
readonly userId?: string;
|
|
53
57
|
readonly jobTitle?: string;
|
|
@@ -63,7 +67,7 @@ interface EmployeeInput<F extends object = Record<never, never>> {
|
|
|
63
67
|
readonly origin?: RecordRef;
|
|
64
68
|
readonly fields?: Partial<F> & Readonly<Record<string, unknown>>;
|
|
65
69
|
}
|
|
66
|
-
type EmployeeField = "name" | "email" | "userId" | "jobTitle" | "teamId" | "managerId" | "employmentType" | "status" | "startDate" | "endDate";
|
|
70
|
+
type EmployeeField = "name" | "firstName" | "lastName" | "email" | "userId" | "jobTitle" | "teamId" | "managerId" | "employmentType" | "status" | "startDate" | "endDate";
|
|
67
71
|
/** One cell edit: a field above, or an extra column by name. `null` clears it. */
|
|
68
72
|
interface EmployeeChange {
|
|
69
73
|
readonly employeeId: string;
|
|
@@ -103,6 +107,8 @@ interface PrivateDetails {
|
|
|
103
107
|
}
|
|
104
108
|
/** The details to save. Left out keeps the stored value; `null` clears it. */
|
|
105
109
|
interface PrivateDetailsInput {
|
|
110
|
+
/** With `options.privateDetailsExtraColumns`: values for those columns. */
|
|
111
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
106
112
|
readonly nationalId?: string | null;
|
|
107
113
|
readonly iban?: string | null;
|
|
108
114
|
readonly birthDate?: Temporal.PlainDate | null;
|
|
@@ -123,6 +129,8 @@ interface Contract {
|
|
|
123
129
|
readonly note?: string;
|
|
124
130
|
}
|
|
125
131
|
interface ContractInput {
|
|
132
|
+
/** With `options.contractExtraColumns`: values for those columns. */
|
|
133
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
126
134
|
readonly startsOn: Temporal.PlainDate;
|
|
127
135
|
readonly endsOn?: Temporal.PlainDate;
|
|
128
136
|
readonly hoursPerWeek?: number;
|
|
@@ -130,6 +138,15 @@ interface ContractInput {
|
|
|
130
138
|
readonly salaryPeriod?: SalaryPeriod;
|
|
131
139
|
readonly note?: string;
|
|
132
140
|
}
|
|
141
|
+
interface ContractPatch {
|
|
142
|
+
readonly fields?: Readonly<Record<string, unknown>>;
|
|
143
|
+
readonly startsOn?: Temporal.PlainDate;
|
|
144
|
+
readonly endsOn?: Temporal.PlainDate | null;
|
|
145
|
+
readonly hoursPerWeek?: number | null;
|
|
146
|
+
readonly salary?: Money | null;
|
|
147
|
+
readonly salaryPeriod?: SalaryPeriod | null;
|
|
148
|
+
readonly note?: string | null;
|
|
149
|
+
}
|
|
133
150
|
interface Employees<F extends object = Record<never, never>> {
|
|
134
151
|
create(organizationId: string, input: EmployeeInput<F>): AsyncResult<Employee<F>>;
|
|
135
152
|
/** Applies each change on its own; one that fails doesn't stop the others. */
|
|
@@ -160,6 +177,8 @@ interface Employees<F extends object = Record<never, never>> {
|
|
|
160
177
|
contracts(employeeId: string): AsyncResult<readonly Contract[]>;
|
|
161
178
|
/** Starts after the latest contract, which ends the day before. */
|
|
162
179
|
addContract(employeeId: string, input: ContractInput): AsyncResult<Contract>;
|
|
180
|
+
updateContract(contractId: string, patch: ContractPatch): AsyncResult<Contract>;
|
|
181
|
+
deleteContract(contractId: string): AsyncResult<Contract>;
|
|
163
182
|
}
|
|
164
183
|
interface EmployeesOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions {
|
|
165
184
|
readonly transport: BlockTransport;
|
|
@@ -225,4 +244,4 @@ interface EmployeeFromApplicationOptions {
|
|
|
225
244
|
*/
|
|
226
245
|
export declare function employeeFromApplicationAction(options: EmployeeFromApplicationOptions): Action;
|
|
227
246
|
//#endregion
|
|
228
|
-
export { type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type Contract, type ContractInput, type EmergencyContact, type Employee, type EmployeeChange, type EmployeeChangeResult, type EmployeeField, type EmployeeFromApplicationClients, type EmployeeFromApplicationOptions, type EmployeeInput, type EmployeeStatus, type Employees, type EmployeesEvents, type EmployeesOptions, type OrgChartEntry, type PrivateDetails, type PrivateDetailsInput, type RpcClient, type SalaryPeriod, dbTransport, extendBlock, rpcTransport, sqlTransport, withBlockHooks, wrapTransport };
|
|
247
|
+
export { type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type Contract, type ContractInput, type ContractPatch, type EmergencyContact, type Employee, type EmployeeChange, type EmployeeChangeResult, type EmployeeField, type EmployeeFromApplicationClients, type EmployeeFromApplicationOptions, type EmployeeInput, type EmployeeStatus, type Employees, type EmployeesEvents, type EmployeesOptions, type OrgChartEntry, type PrivateDetails, type PrivateDetailsInput, type RpcClient, type SalaryPeriod, dbTransport, extendBlock, rpcTransport, sqlTransport, withBlockHooks, wrapTransport };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as isRecord } from "../../guards-6F2bCtQR.js";
|
|
2
2
|
import { t as temporal } from "../../temporal-required-DcLhnDhQ.js";
|
|
3
3
|
import { a as ok, t as AsyncResult } from "../../result-ntFBW2p2.js";
|
|
4
|
-
import { t as employeesSqlOptions } from "../../options-
|
|
4
|
+
import { t as employeesSqlOptions } from "../../options-BOGo1qCA.js";
|
|
5
5
|
import { n as event, t as defineEvents } from "../../event-map-CtPFhcOp.js";
|
|
6
6
|
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, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-B0f0ZVb5.js";
|
|
7
7
|
import { i as wrapTransport, n as extendBlock, r as withBlockHooks } from "../../block-hooks-DKtz0HRh.js";
|
|
@@ -29,6 +29,8 @@ const COLUMNS = /* @__PURE__ */ new Set([
|
|
|
29
29
|
"tenant_id",
|
|
30
30
|
"user_id",
|
|
31
31
|
"name",
|
|
32
|
+
"first_name",
|
|
33
|
+
"last_name",
|
|
32
34
|
"email",
|
|
33
35
|
"job_title",
|
|
34
36
|
"team_id",
|
|
@@ -66,6 +68,20 @@ function contractArgs(input) {
|
|
|
66
68
|
}
|
|
67
69
|
};
|
|
68
70
|
}
|
|
71
|
+
function contractPatchArgs(patch) {
|
|
72
|
+
const { salary, ...rest } = patch;
|
|
73
|
+
if (salary === void 0) return argsOf(rest);
|
|
74
|
+
return {
|
|
75
|
+
...argsOf(rest),
|
|
76
|
+
...salary === null ? {
|
|
77
|
+
salary: null,
|
|
78
|
+
currency: null
|
|
79
|
+
} : {
|
|
80
|
+
salary: amountText(salary),
|
|
81
|
+
currency: salary.currency
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
69
85
|
function requiredDate(value, field) {
|
|
70
86
|
const date = plainDate(value);
|
|
71
87
|
if (date === void 0) throw new TypeError(`${field} is missing`);
|
|
@@ -78,6 +94,8 @@ function employeeOf(value) {
|
|
|
78
94
|
id: textOf(row["id"]),
|
|
79
95
|
organizationId: textOf(row["tenant_id"]),
|
|
80
96
|
name: textOf(row["name"]),
|
|
97
|
+
firstName: optionalText(row["first_name"]),
|
|
98
|
+
lastName: optionalText(row["last_name"]),
|
|
81
99
|
email: optionalText(row["email"]),
|
|
82
100
|
userId: optionalText(row["user_id"]),
|
|
83
101
|
jobTitle: optionalText(row["job_title"]),
|
|
@@ -132,6 +150,8 @@ function contractOf(value) {
|
|
|
132
150
|
}
|
|
133
151
|
const BUILT_IN = /* @__PURE__ */ new Set([
|
|
134
152
|
"name",
|
|
153
|
+
"firstName",
|
|
154
|
+
"lastName",
|
|
135
155
|
"email",
|
|
136
156
|
"userId",
|
|
137
157
|
"jobTitle",
|
|
@@ -240,7 +260,12 @@ function createEmployees(options) {
|
|
|
240
260
|
addContract: (employeeId, input) => call("add_employee_contract", {
|
|
241
261
|
employee: employeeId,
|
|
242
262
|
attrs: contractArgs(input)
|
|
243
|
-
}, contractOf)
|
|
263
|
+
}, contractOf),
|
|
264
|
+
updateContract: (contractId, patch) => call("update_employee_contract", {
|
|
265
|
+
contract: contractId,
|
|
266
|
+
attrs: contractPatchArgs(patch)
|
|
267
|
+
}, contractOf),
|
|
268
|
+
deleteContract: (contractId) => call("delete_employee_contract", { contract: contractId }, contractOf)
|
|
244
269
|
}, options.hooks, {
|
|
245
270
|
block: "employees",
|
|
246
271
|
...options.logger ? { logger: options.logger } : {}
|
|
@@ -266,6 +291,16 @@ const employeeInputSchema = entitySchema({
|
|
|
266
291
|
minLength: 1,
|
|
267
292
|
maxLength: 200
|
|
268
293
|
},
|
|
294
|
+
firstName: {
|
|
295
|
+
kind: "string",
|
|
296
|
+
optional: true,
|
|
297
|
+
maxLength: 200
|
|
298
|
+
},
|
|
299
|
+
lastName: {
|
|
300
|
+
kind: "string",
|
|
301
|
+
optional: true,
|
|
302
|
+
maxLength: 200
|
|
303
|
+
},
|
|
269
304
|
email: {
|
|
270
305
|
kind: "string",
|
|
271
306
|
optional: true,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
|
-
import { Ct as Events } from "../../events-
|
|
4
|
-
import { S as EnrichmentEventData } from "../../index-
|
|
3
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
4
|
+
import { S as EnrichmentEventData } from "../../index-C_qlBJ3k.js";
|
|
5
5
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
6
6
|
import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
7
7
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
8
8
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
9
|
-
import { c as BlockOf } from "../../define-block-
|
|
9
|
+
import { c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
10
10
|
//#region src/blocks/enrichment/providers.d.ts
|
|
11
11
|
/** What a provider looks up a company by. */
|
|
12
12
|
interface CompanyLookup {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
3
|
import { $ as RecordRef } from "../../types-DFdg_4yN.js";
|
|
4
|
-
import { Ct as Events } from "../../events-
|
|
4
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
5
5
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
6
6
|
import { a as BlockTenantOptions, r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
7
7
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
8
8
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
9
9
|
import { t as EnrollmentsSqlOptions } from "../../options-CSCXNYJO.js";
|
|
10
|
-
import { c as BlockOf, rn as RecordBinding } from "../../define-block-
|
|
10
|
+
import { c as BlockOf, rn as RecordBinding } from "../../define-block-DibVN37N.js";
|
|
11
11
|
//#region src/blocks/enrollments/enrollments.d.ts
|
|
12
12
|
interface EnrollmentsOptions extends BlockTemporalOptions, BlockTenantOptions {
|
|
13
13
|
readonly transport: BlockTransport;
|
|
@@ -3,9 +3,9 @@ import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
|
3
3
|
import { n as SqlClient } from "../../executor-hGjrop3A.js";
|
|
4
4
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
5
5
|
import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
|
|
6
|
-
import { c as BlockOf } from "../../define-block-
|
|
7
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
8
|
-
import { i as hasEntitlement, n as EntitlementKey, t as EntitlementClaimOptions } from "../../entitlements-
|
|
6
|
+
import { c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
7
|
+
import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
|
|
8
|
+
import { i as hasEntitlement, n as EntitlementKey, t as EntitlementClaimOptions } from "../../entitlements-CsZcfllV.js";
|
|
9
9
|
//#region src/blocks/entitlements/entitlements.d.ts
|
|
10
10
|
/** The Stripe event sent when a customer's active entitlements change. */
|
|
11
11
|
export declare const ENTITLEMENTS_UPDATED = "entitlements.active_entitlement_summary.updated";
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DBV730sF.js";
|
|
4
4
|
import { n as ExtraFields, r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
5
|
-
import { Ct as Events } from "../../events-
|
|
5
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
6
6
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
7
7
|
import { a as BlockTenantOptions, r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
8
8
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
9
9
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
10
|
-
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-
|
|
10
|
+
import { Sn as EntitySchema, c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
11
11
|
import { n as Money } from "../../money-BNRdJQzA.js";
|
|
12
12
|
//#region src/blocks/expenses/expenses.d.ts
|
|
13
13
|
type ExpenseReportStatus = "draft" | "submitted" | "approved" | "rejected" | "reimbursed" | "cancelled";
|
|
@@ -4,7 +4,7 @@ import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
|
4
4
|
import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
5
5
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
6
6
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
7
|
-
import { c as BlockOf } from "../../define-block-
|
|
7
|
+
import { c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
8
8
|
//#region src/blocks/field-history/field-history.d.ts
|
|
9
9
|
/** One column's change on one record. */
|
|
10
10
|
interface FieldChange {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
2
2
|
import { t as StandardSchemaV1 } from "../../standard-DBV730sF.js";
|
|
3
3
|
import { r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
4
|
-
import { Ct as Events, z as FlagEventData } from "../../events-
|
|
4
|
+
import { Ct as Events, z as FlagEventData } from "../../events-Cc9DDQWH.js";
|
|
5
5
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
6
6
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
7
7
|
import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
|
|
8
|
-
import { c as BlockOf } from "../../define-block-
|
|
8
|
+
import { c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
9
9
|
import { C as flagDefinitionsOf, S as flagContext, _ as RequestFlagContext, a as FlagDefinition, b as evaluateFlag, c as FlagEvaluation, d as FlagResolution, f as FlagRule, g as FlagsProviderOptions, h as FlagsProvider, i as FlagContextSource, l as FlagOverride, m as FlagValue, n as FlagContext, o as FlagDetails, p as FlagType, r as FlagContextOptions, s as FlagErrorCode, t as FlagClient, u as FlagReason, v as createFlagClient, x as flagBucket, y as createFlagsProvider } from "../../flags-C01PLMJ-.js";
|
|
10
10
|
//#region src/blocks/flags/admin.d.ts
|
|
11
11
|
interface FlagsOptions<S extends StandardSchemaV1 | undefined = undefined> {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
|
-
import { Ct as Events } from "../../events-
|
|
4
|
-
import { C as ForecastSnapshotEventData } from "../../index-
|
|
3
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
4
|
+
import { C as ForecastSnapshotEventData } from "../../index-C_qlBJ3k.js";
|
|
5
5
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
6
6
|
import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
7
7
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
8
8
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
9
|
-
import { c as BlockOf } from "../../define-block-
|
|
9
|
+
import { c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
10
10
|
import { n as Money } from "../../money-BNRdJQzA.js";
|
|
11
11
|
import { t as DealForecast } from "../../deal-forecast-LwO-Z4_C.js";
|
|
12
12
|
//#region src/blocks/forecasts/forecasts.d.ts
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { D as ValidationIssue, T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
3
|
import { t as StandardSchemaV1$1 } from "../../standard-DBV730sF.js";
|
|
4
4
|
import { r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
5
|
-
import { B as FormEventData, Ct as Events, V as FormSubmissionEventData } from "../../events-
|
|
5
|
+
import { B as FormEventData, Ct as Events, V as FormSubmissionEventData } from "../../events-Cc9DDQWH.js";
|
|
6
6
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
7
7
|
import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
|
|
10
|
-
import { c as BlockOf } from "../../define-block-
|
|
11
|
-
import { n as Controller } from "../../controller-
|
|
10
|
+
import { c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
11
|
+
import { n as Controller } from "../../controller-CwGXms17.js";
|
|
12
12
|
import { _ as isFormDefinition, a as FormDefinition, c as FormJson, d as FormScoring, f as FormStep, g as formSchema, h as formDefinitionProblems, i as FormCondition, l as FormJsonSchema, m as UNSCORED_FIELD_TYPES, n as FORM_FIELD_TYPES, o as FormField, p as NPS_MAX, r as FORM_SCHEMA_DIALECT, s as FormFieldType, t as FORM_DEFINITION_SCHEMA, u as FormOption } from "../../form-definition-BjEtH8BT.js";
|
|
13
13
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
14
14
|
//#region src/blocks/forms/validate.d.ts
|
|
@@ -6,7 +6,7 @@ import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
|
6
6
|
import { n as BlockOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
7
7
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
8
8
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
9
|
-
import { c as BlockOf } from "../../define-block-
|
|
9
|
+
import { c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
10
10
|
//#region src/blocks/goals/goals.d.ts
|
|
11
11
|
/**
|
|
12
12
|
* A metric the database computes, or any other name the app keeps the actual
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
3
|
import { $ as RecordRef } from "../../types-DFdg_4yN.js";
|
|
4
|
-
import { Ct as Events } from "../../events-
|
|
4
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
5
5
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
6
6
|
import { a as BlockTenantOptions, r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
7
7
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
8
8
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
9
|
-
import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-
|
|
9
|
+
import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-DibVN37N.js";
|
|
10
10
|
import { t as GuestAction } from "../../guest-actions-1T1DeS5Y.js";
|
|
11
11
|
//#region src/blocks/guests/guests.d.ts
|
|
12
12
|
interface GuestsOptions extends BlockTemporalOptions, BlockTenantOptions {
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { T as ErrorMapper, t as AsyncResult } from "../../result-DZeA5KS6.js";
|
|
3
3
|
import { t as StandardSchemaV1 } from "../../standard-DBV730sF.js";
|
|
4
4
|
import { r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
5
|
-
import { Ct as Events } from "../../events-
|
|
6
|
-
import { T as JobEventData, f as ApplicationEventData } from "../../index-
|
|
5
|
+
import { Ct as Events } from "../../events-Cc9DDQWH.js";
|
|
6
|
+
import { T as JobEventData, f as ApplicationEventData } from "../../index-C_qlBJ3k.js";
|
|
7
7
|
import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
8
8
|
import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
9
9
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
10
10
|
import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
|
|
11
|
-
import { Zt as DefaultAutomation, c as BlockOf } from "../../define-block-
|
|
11
|
+
import { Zt as DefaultAutomation, c as BlockOf } from "../../define-block-DibVN37N.js";
|
|
12
12
|
//#region src/blocks/hiring/hiring.d.ts
|
|
13
13
|
type JobStatus = "draft" | "open" | "closed";
|
|
14
14
|
type ApplicationState = "active" | "hired" | "rejected" | "withdrawn";
|
|
@@ -60,14 +60,20 @@ interface Application {
|
|
|
60
60
|
readonly hiredAt?: Temporal.Instant;
|
|
61
61
|
readonly createdAt: Temporal.Instant;
|
|
62
62
|
}
|
|
63
|
+
interface ScorecardScore {
|
|
64
|
+
readonly criterion: string;
|
|
65
|
+
readonly score: number;
|
|
66
|
+
readonly notes?: string;
|
|
67
|
+
}
|
|
63
68
|
interface Scorecard {
|
|
64
69
|
readonly id: string;
|
|
65
70
|
readonly stageId?: string;
|
|
66
71
|
readonly reviewerId: string;
|
|
67
72
|
/** 1 to 4. */
|
|
68
73
|
readonly rating: number;
|
|
69
|
-
readonly recommendation
|
|
74
|
+
readonly recommendation?: Recommendation;
|
|
70
75
|
readonly notes?: string;
|
|
76
|
+
readonly scores?: readonly ScorecardScore[];
|
|
71
77
|
readonly submittedAt: Temporal.Instant;
|
|
72
78
|
}
|
|
73
79
|
interface Interview {
|
|
@@ -100,8 +106,9 @@ interface Hiring<F extends object = Record<never, never>> {
|
|
|
100
106
|
/** The caller's scorecard at the application's current stage. */
|
|
101
107
|
score(applicationId: string, card: {
|
|
102
108
|
readonly rating: number;
|
|
103
|
-
readonly recommendation
|
|
109
|
+
readonly recommendation?: Recommendation;
|
|
104
110
|
readonly notes?: string;
|
|
111
|
+
readonly scores?: readonly ScorecardScore[];
|
|
105
112
|
}): AsyncResult<Scorecard>;
|
|
106
113
|
scheduleInterview(applicationId: string, interview: {
|
|
107
114
|
readonly startsAt: Temporal.Instant;
|
|
@@ -161,4 +168,4 @@ export declare const APPLICATION_TO_EMPLOYEE: DefaultAutomation;
|
|
|
161
168
|
/** The automations the hiring block ships. */
|
|
162
169
|
export declare const HIRING_AUTOMATIONS: readonly DefaultAutomation[];
|
|
163
170
|
//#endregion
|
|
164
|
-
export { type Application, type ApplicationDetail, type ApplicationState, type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type Candidate, type Hiring, type HiringEvents, type HiringOptions, type Interview, type Job, type JobInput, type JobStatus, type Recommendation, type RpcClient, type Scorecard, dbTransport, extendBlock, rpcTransport, sqlTransport, withBlockHooks, wrapTransport };
|
|
171
|
+
export { type Application, type ApplicationDetail, type ApplicationState, type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type Candidate, type Hiring, type HiringEvents, type HiringOptions, type Interview, type Job, type JobInput, type JobStatus, type Recommendation, type RpcClient, type Scorecard, type ScorecardScore, dbTransport, extendBlock, rpcTransport, sqlTransport, withBlockHooks, wrapTransport };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as isRecord } from "../../guards-6F2bCtQR.js";
|
|
2
2
|
import { t as AsyncResult } from "../../result-ntFBW2p2.js";
|
|
3
|
-
import { n as HIRING_AUTOMATIONS, r as hiringSqlOptions, t as APPLICATION_TO_EMPLOYEE } from "../../automations-
|
|
3
|
+
import { n as HIRING_AUTOMATIONS, r as hiringSqlOptions, t as APPLICATION_TO_EMPLOYEE } from "../../automations-8L3NEuoq.js";
|
|
4
4
|
import { n as event, t as defineEvents } from "../../event-map-CtPFhcOp.js";
|
|
5
5
|
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, m as instantArg, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-B0f0ZVb5.js";
|
|
6
6
|
import { i as wrapTransport, n as extendBlock, r as withBlockHooks } from "../../block-hooks-DKtz0HRh.js";
|
|
@@ -61,15 +61,25 @@ function applicationOf(value) {
|
|
|
61
61
|
createdAt: requiredInstant(row["created_at"], "createdAt")
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
+
function scoreOf(value) {
|
|
65
|
+
const row = recordOf(value, "score");
|
|
66
|
+
return compact({
|
|
67
|
+
criterion: textOf(row["criterion"]),
|
|
68
|
+
score: Number(row["score"]),
|
|
69
|
+
notes: optionalText(row["notes"])
|
|
70
|
+
});
|
|
71
|
+
}
|
|
64
72
|
function scorecardOf(value) {
|
|
65
73
|
const row = recordOf(value, "scorecard");
|
|
74
|
+
const recommendation = row["recommendation"];
|
|
66
75
|
return compact({
|
|
67
76
|
id: textOf(row["id"]),
|
|
68
77
|
stageId: optionalText(row["stage_id"]),
|
|
69
78
|
reviewerId: textOf(row["reviewer_user_id"]),
|
|
70
79
|
rating: Number(row["rating"]),
|
|
71
|
-
recommendation: enumOrThrow(
|
|
80
|
+
recommendation: recommendation === null || recommendation === void 0 ? void 0 : enumOrThrow(recommendation, RECOMMENDATIONS, "recommendation"),
|
|
72
81
|
notes: optionalText(row["notes"]),
|
|
82
|
+
scores: Array.isArray(row["scores"]) ? recordsOf(row["scores"], "scores").map(scoreOf) : void 0,
|
|
73
83
|
submittedAt: requiredInstant(row["submitted_at"], "submittedAt")
|
|
74
84
|
});
|
|
75
85
|
}
|
|
@@ -125,8 +135,9 @@ function createHiring(options) {
|
|
|
125
135
|
score: (applicationId, card) => call("submit_scorecard", {
|
|
126
136
|
application: applicationId,
|
|
127
137
|
rating: card.rating,
|
|
128
|
-
recommendation: card.recommendation,
|
|
129
|
-
notes: card.notes ?? null
|
|
138
|
+
recommendation: card.recommendation ?? null,
|
|
139
|
+
notes: card.notes ?? null,
|
|
140
|
+
...card.scores !== void 0 && { scores: card.scores.map((score) => ({ ...score })) }
|
|
130
141
|
}, scorecardOf),
|
|
131
142
|
scheduleInterview: (applicationId, interview) => call("schedule_interview", {
|
|
132
143
|
application: applicationId,
|