@classytic/arc 2.45.2 → 2.47.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/README.md +1 -1
- package/dist/{EventTransport-DHb1tpu-.mjs → EventTransport-BHKy4_Bi.mjs} +5 -6
- package/dist/{EventTransport-CiicKz2Z.d.mts → EventTransport-CYEoCJGe.d.mts} +0 -2
- package/dist/{HookSystem-C1u0EUnt.mjs → HookSystem-CAIDVoKC.mjs} +3 -4
- package/dist/{QueryCache--5uAuYPW.d.mts → QueryCache-DdvrGG8Q.d.mts} +1 -3
- package/dist/{ResourceRegistry-D2jXWVN_.mjs → ResourceRegistry-23Ml6FNe.mjs} +15 -4
- package/dist/{acquire-DTkA8Lme.mjs → acquire-DoFX06fm.mjs} +2 -3
- package/dist/{actionPermissions-DRVk6m7x.mjs → actionPermissions-DXrlWHHK.mjs} +37 -42
- package/dist/audit/index.d.mts +2 -10
- package/dist/audit/index.mjs +8 -12
- package/dist/auth/audit.d.mts +0 -2
- package/dist/auth/audit.mjs +2 -3
- package/dist/auth/index.d.mts +9 -17
- package/dist/auth/index.mjs +26 -29
- package/dist/auth/redis-session.d.mts +2 -4
- package/dist/auth/redis-session.mjs +2 -3
- package/dist/{authorizationDecision-D48fUJv1.mjs → authorizationDecision-DYiubkYw.mjs} +5 -6
- package/dist/{base-CZyixEQR.d.mts → base-HXNgPQww.d.mts} +1 -7
- package/dist/{boundedMap-DkKiPifd.mjs → boundedMap-CtdzpJ3X.mjs} +2 -3
- package/dist/{buildHandler-BiZ4VATS.mjs → buildHandler-CARdmPNo.mjs} +5 -6
- package/dist/cache/index.d.mts +4 -10
- package/dist/cache/index.mjs +5 -6
- package/dist/{caching-Cj0as-P1.mjs → caching-QRiryDLs.mjs} +3 -4
- package/dist/{claimed-ChI13rUR.mjs → claimed-BLecr1j3.mjs} +2 -3
- package/dist/cleanup/index.d.mts +4 -18
- package/dist/cleanup/index.mjs +12 -20
- package/dist/cli/commands/describe.d.mts +1 -3
- package/dist/cli/commands/describe.mjs +4 -5
- package/dist/cli/commands/docs.d.mts +1 -3
- package/dist/cli/commands/docs.mjs +4 -5
- package/dist/cli/commands/doctor.d.mts +1 -3
- package/dist/cli/commands/doctor.mjs +2 -3
- package/dist/cli/commands/generate.d.mts +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.d.mts +1 -1
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.d.mts +1 -3
- package/dist/cli/commands/introspect.mjs +3 -4
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-D_aiew34.mjs → constants-Cx7BcnHT.mjs} +2 -3
- package/dist/context/index.d.mts +0 -8
- package/dist/context/index.mjs +6 -7
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.mjs +8 -8
- package/dist/{core-QIZ2560Y.mjs → core-0WyMuo0f.mjs} +9 -12
- package/dist/{createActionRouter-CvH84dyx.mjs → createActionRouter-mLAGbpDV.mjs} +7 -8
- package/dist/{createAggregationRouter-DGyK2Hp6.mjs → createAggregationRouter-BEAjn3dA.mjs} +9 -10
- package/dist/{createApp-CKjZpmq9.mjs → createApp-QDP4vYWH.mjs} +49 -62
- package/dist/{createMcpServer-DSztofa9.d.mts → createMcpServer-DzXHX0SO.d.mts} +1 -3
- package/dist/{defineAggregation-BLza7Ca4.mjs → defineAggregation-CFNfvz-C.mjs} +2 -3
- package/dist/{defineResource-CEo0gDCb.mjs → defineResource-BROJmhzJ.mjs} +80 -29
- package/dist/discovery/index.d.mts +1 -3
- package/dist/discovery/index.mjs +2 -3
- package/dist/docs/index.d.mts +8 -8
- package/dist/docs/index.mjs +4 -5
- package/dist/{elevation-BW2J3tNj.d.mts → elevation-DPD0hcU-.d.mts} +0 -2
- package/dist/{elevation-BJTsSnke.mjs → elevation-DrXeEWWk.mjs} +9 -10
- package/dist/encryption/index.d.mts +1 -7
- package/dist/encryption/index.mjs +8 -13
- package/dist/{errorHandler--4rSMMvq.d.mts → errorHandler-B9r88jZV.d.mts} +8 -3
- package/dist/{errorHandler-2p4SL5zm.mjs → errorHandler-BiBXtxj4.mjs} +16 -6
- package/dist/{errors-JYc9vwqE.d.mts → errors-DTo0me1o.d.mts} +0 -2
- package/dist/{errors-grZkIA8N.mjs → errors-DnrUChAy.mjs} +2 -3
- package/dist/{eventPlugin-BtmA4-3P.d.mts → eventPlugin-BY38F6yK.d.mts} +1 -7
- package/dist/{eventPlugin-ItcYBGUs.mjs → eventPlugin-BhKLUe7H.mjs} +10 -12
- package/dist/{eventTypes-Ck6fD3ne.mjs → eventTypes-CCIRGakw.mjs} +5 -8
- package/dist/events/index.d.mts +5 -17
- package/dist/events/index.mjs +9 -9
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +5 -6
- package/dist/events/transports/redis.d.mts +2 -4
- package/dist/events/transports/redis.mjs +3 -4
- package/dist/{externalPaths-CmGOxOtD.d.mts → externalPaths-BOqdq5wr.d.mts} +0 -2
- package/dist/factory/index.d.mts +4 -14
- package/dist/factory/index.mjs +12 -18
- package/dist/{fastify-augmentation-DRlCIWE9.d.mts → fastify-augmentation-bzkWPt1f.d.mts} +4 -10
- package/dist/{fields-BRX0Krcj.mjs → fields-CYdpcV73.mjs} +2 -3
- package/dist/{fields-BBSpf8pS.d.mts → fields-JTkrtO-r.d.mts} +0 -2
- package/dist/{filter-merge-CDc7YMwX.mjs → filter-merge-6kasezRH.mjs} +2 -3
- package/dist/{generate-DCGuEbqI.d.mts → generate-C-g_KOkV.d.mts} +0 -4
- package/dist/{generate-hvg7V2g1.mjs → generate-DUkcbc4r.mjs} +7 -12
- package/dist/{headers-Cqkg4LzI.mjs → headers-KxhrKevA.mjs} +3 -4
- package/dist/{health-PVt0VjOx.mjs → health-CRJg3IIq.mjs} +2 -3
- package/dist/{health-DyeP3mTW.mjs → health-jkYNdobJ.mjs} +4 -7
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/http-cache/index.d.mts +211 -0
- package/dist/http-cache/index.mjs +605 -0
- package/dist/http-cache/purgers/cloudflare.d.mts +13 -0
- package/dist/http-cache/purgers/cloudflare.mjs +46 -0
- package/dist/http-cache/purgers/fastly.d.mts +12 -0
- package/dist/http-cache/purgers/fastly.mjs +47 -0
- package/dist/http-cache/testing/index.d.mts +68 -0
- package/dist/http-cache/testing/index.mjs +168 -0
- package/dist/idempotency/index.d.mts +3 -9
- package/dist/idempotency/index.mjs +11 -14
- package/dist/idempotency/redis.d.mts +1 -1
- package/dist/idempotency/redis.mjs +3 -4
- package/dist/{index-Bxriq3so.d.mts → index-B5i9-vuP.d.mts} +4 -26
- package/dist/{index-Chgz3d0i.d.mts → index-BAXDo5eE.d.mts} +1 -7
- package/dist/{index-Beg3aNnK.d.mts → index-BxZS-8So.d.mts} +67 -25
- package/dist/{index-WH7xgvxS.d.mts → index-Cy2-QffW.d.mts} +40 -92
- package/dist/{index-uhkUA5-U.d.mts → index-D1X_C_qz.d.mts} +13 -23
- package/dist/{index-CUJvoyw3.d.mts → index-DFCCQ9AE.d.mts} +2 -24
- package/dist/index.d.mts +7 -9
- package/dist/index.mjs +12 -13
- package/dist/{init-jC3rMPzb.mjs → init-CACwpktI.mjs} +18 -35
- package/dist/{init-Cscs4lab.d.mts → init-CV2_Fw3H.d.mts} +0 -4
- package/dist/integrations/event-gateway.d.mts +3 -5
- package/dist/integrations/event-gateway.mjs +3 -4
- package/dist/integrations/index.d.mts +3 -3
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.d.mts +1 -1
- package/dist/integrations/jobs/index.mjs +7 -11
- package/dist/integrations/mcp/index.d.mts +7 -39
- package/dist/integrations/mcp/index.mjs +8 -14
- package/dist/integrations/mcp/testing.d.mts +3 -5
- package/dist/integrations/mcp/testing.mjs +3 -4
- package/dist/integrations/streamline.d.mts +1 -3
- package/dist/integrations/streamline.mjs +4 -5
- package/dist/integrations/webhooks.d.mts +2 -4
- package/dist/integrations/webhooks.mjs +5 -5
- package/dist/integrations/websocket-pushref-redis.d.mts +2 -4
- package/dist/integrations/websocket-pushref-redis.mjs +2 -3
- package/dist/integrations/websocket-redis.d.mts +2 -4
- package/dist/integrations/websocket-redis.mjs +2 -3
- package/dist/integrations/websocket.d.mts +2 -2
- package/dist/integrations/websocket.mjs +13 -24
- package/dist/{interface-JJzwH4Ro.d.mts → interface-BmExzQRD.d.mts} +0 -2
- package/dist/{interface-BOk3YnTz.d.mts → interface-WR1U0K7t.d.mts} +0 -2
- package/dist/{jsonBody-ptwyzZQ-.mjs → jsonBody-CzDBkCme.mjs} +3 -4
- package/dist/{keys-C1vFuSbv.mjs → keys-Cbwf6r1B.mjs} +2 -3
- package/dist/{loadResources-CHPDyIPn.mjs → loadResources-Kr6vuljv.mjs} +4 -5
- package/dist/{loadResourcesFromEntry-BkHHTu_B.mjs → loadResourcesFromEntry-D2e0qoDR.mjs} +3 -4
- package/dist/logger/index.d.mts +1 -3
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-C5bvCiAK.mjs → logger-C110X5Yz.mjs} +3 -5
- package/dist/{mcpPlugin-C9qohJCF.mjs → mcpPlugin-4lIPr9OJ.mjs} +41 -60
- package/dist/{memory-CxiTwT0j.mjs → memory-D9qkhXiB.mjs} +4 -5
- package/dist/{metrics-Ckp2zRy-.mjs → metrics-B-qrrWfI.mjs} +4 -5
- package/dist/middleware/index.d.mts +1 -5
- package/dist/middleware/index.mjs +4 -5
- package/dist/migrations/index.d.mts +0 -2
- package/dist/migrations/index.mjs +3 -4
- package/dist/{module-CfnKuIuH.mjs → module-BD8xHgrz.mjs} +2 -3
- package/dist/{multiTenant-CAtYlW6H.d.mts → multiTenant-KZj8j1uJ.d.mts} +1 -5
- package/dist/{multipartBody-BFasGtP9.mjs → multipartBody-qU7KCn1l.mjs} +2 -3
- package/dist/observeSend-BnPtTotW.mjs +20 -0
- package/dist/{openapi-DAPxjYHX.mjs → openapi-DoVa5SVP.mjs} +18 -28
- package/dist/outbox-admin/index.d.mts +2 -4
- package/dist/outbox-admin/index.mjs +6 -7
- package/dist/{outbox-module-gZCHoE4H.d.mts → outbox-module-5Mnwcycy.d.mts} +3 -9
- package/dist/outbox-module-DyITEIop.mjs +297 -0
- package/dist/permissions/index.d.mts +4 -4
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-B14c3OMp.mjs → permissions-BBy4bOGi.mjs} +19 -29
- package/dist/{pipe-CQv7PsAK.mjs → pipe-BOm2o4UA.mjs} +3 -4
- package/dist/pipeline/index.d.mts +1 -9
- package/dist/pipeline/index.mjs +5 -8
- package/dist/{plan-CpnTykjb.mjs → plan-DDIGwuxr.mjs} +5 -9
- package/dist/{plugin-DXTjVg_Q.mjs → plugin-Bn4D_0XK.mjs} +156 -64
- package/dist/plugins/index.d.mts +8 -16
- package/dist/plugins/index.mjs +22 -26
- package/dist/plugins/response-cache.d.mts +2 -4
- package/dist/plugins/response-cache.mjs +10 -10
- package/dist/plugins/tracing-entry.d.mts +1 -1
- package/dist/plugins/tracing-entry.mjs +3 -4
- package/dist/{pluralize-C3VJKRGp.mjs → pluralize-ClEjcKlG.mjs} +2 -3
- package/dist/policy.types-DPqToKG1.d.mts +50 -0
- package/dist/presets/filesUpload.d.mts +4 -6
- package/dist/presets/filesUpload.mjs +6 -7
- package/dist/presets/index.d.mts +3 -19
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +7 -7
- package/dist/presets/search.d.mts +3 -5
- package/dist/presets/search.mjs +3 -4
- package/dist/{presets-CquqYJPy.mjs → presets-DK2jh5YR.mjs} +11 -18
- package/dist/{projection-CgfSLOSM.mjs → projection-BHH-sXyS.mjs} +3 -4
- package/dist/purger.types-2wNJK_89.mjs +24 -0
- package/dist/purger.types-DvPp4-yd.d.mts +26 -0
- package/dist/{pushref-registry-UxCkoA4C.d.mts → pushref-registry-d86QUaSq.d.mts} +0 -6
- package/dist/{queryCachePlugin-D0HUISHJ.mjs → queryCachePlugin-Ckqe98AM.mjs} +8 -10
- package/dist/{queryCachePlugin-C2lZjTxk.d.mts → queryCachePlugin-DYQUyeJ9.d.mts} +2 -4
- package/dist/{rateLimitKey-AvkBOMkl.mjs → rateLimitKey-CWAjlqcN.mjs} +2 -3
- package/dist/{realtime-CbWtVbqK.mjs → realtime-BIJi9USY.mjs} +17 -19
- package/dist/{redis-BDgv9Glw.d.mts → redis-RpDMemdm.d.mts} +2 -4
- package/dist/{redis-stream-BMk-bpQS.d.mts → redis-stream-CS1N9dwM.d.mts} +1 -3
- package/dist/{redisShapes-CQksY67q.d.mts → redisShapes-CqBXTn_s.d.mts} +0 -2
- package/dist/registry/index.d.mts +2 -12
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-BVwpAuFI.mjs → registry-y9ZA-R_J.mjs} +7 -12
- package/dist/{outbox-module-B4FAkx3A.mjs → relay-BNrC1CEP.mjs} +8 -306
- package/dist/{renewingLease-CykpeNcQ.mjs → renewingLease-CS43br5E.mjs} +2 -3
- package/dist/{replyHelpers-DA51IZio.mjs → replyHelpers-oZDzakGb.mjs} +3 -4
- package/dist/{requestContext-DIWHKDtQ.mjs → requestContext-fWb_YaV2.mjs} +2 -3
- package/dist/{requirement-Cp_fsMDL.mjs → requirement--2hWyyHi.mjs} +2 -3
- package/dist/{requirement-CbiLdQ1n.d.mts → requirement-CTRQjjQx.d.mts} +0 -2
- package/dist/{resourceRateLimit-BFuluodF.mjs → resourceRateLimit-1WbcyMZY.mjs} +3 -4
- package/dist/{resourceRateLimit-Wf6d6FL9.d.mts → resourceRateLimit-DCWglD7V.d.mts} +1 -3
- package/dist/{rolldown-runtime-D_lMdYOd.mjs → rolldown-runtime-yH2lHMo_.mjs} +2 -3
- package/dist/{routeValidator-DuLonYwr.mjs → routeValidator-BSlRIA5c.mjs} +2 -3
- package/dist/{runtimeCapabilities-CydRfm0i.mjs → runtimeCapabilities-CYCEtU1W.mjs} +2 -3
- package/dist/{schedules-B693KXxa.mjs → schedules-B5WGlYIT.mjs} +132 -9
- package/dist/{schemaConverter-DNvZWTV6.mjs → schemaConverter-DtNvts-6.mjs} +3 -4
- package/dist/{schemaIR-REV2y7Wd.mjs → schemaIR-uS_RHqa3.mjs} +3 -4
- package/dist/schemas/index.d.mts +0 -2
- package/dist/schemas/index.mjs +2 -3
- package/dist/scim/index.d.mts +0 -12
- package/dist/scim/index.mjs +10 -18
- package/dist/scope/index.d.mts +2 -6
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-Bevxy_ST.mjs → scope-BwVLSyNG.mjs} +5 -6
- package/dist/{sessionManager-qimlKV0P.d.mts → sessionManager-CdvDF04x.d.mts} +2 -4
- package/dist/{shutdown-CfrqPR7A.mjs → shutdown-BJiJN7FT.mjs} +2 -3
- package/dist/{simpleEqualityMatcher-BJwfuRKP.mjs → simpleEqualityMatcher-DGRLq-1k.mjs} +2 -3
- package/dist/{sse-CuNNWr2z.mjs → sse-B_50llZu.mjs} +8 -9
- package/dist/{sseStream-C_2ujAVY.mjs → sseStream-BjSo9Ult.mjs} +3 -4
- package/dist/{storage-Cx9Sz3Ou.d.mts → storage-odC5MNKN.d.mts} +0 -2
- package/dist/{store-helpers-C8uBGCbb.mjs → store-helpers-D-n5cwy5.mjs} +2 -3
- package/dist/{streaming-Bdq_M4d5.mjs → streaming-Dcgqa-hH.mjs} +2 -3
- package/dist/{subscriberIdentity-B-KpZkdl.mjs → subscriberIdentity-C9KhIXTF.mjs} +2 -3
- package/dist/{tenancy-C5PCvm1h.mjs → tenancy-COrhjPRZ.mjs} +3 -4
- package/dist/{tenantPreparation-dYvWrgNa.mjs → tenantPreparation-BElWHytd.mjs} +5 -6
- package/dist/testing/cleanupStoreContract.d.mts +2 -4
- package/dist/testing/cleanupStoreContract.mjs +2 -3
- package/dist/testing/index.d.mts +6 -32
- package/dist/testing/index.mjs +24 -37
- package/dist/testing/outboxStoreContract.d.mts +1 -3
- package/dist/testing/outboxStoreContract.mjs +3 -4
- package/dist/testing/requiredPorts.d.mts +2 -4
- package/dist/testing/requiredPorts.mjs +3 -4
- package/dist/testing/storageContract.d.mts +2 -4
- package/dist/testing/storageContract.mjs +2 -3
- package/dist/{timing-DCqsezX8.mjs → timing-CaxKbRk_.mjs} +3 -5
- package/dist/{tracing-Dro5eH6j.d.mts → tracing-JSFiBl5r.d.mts} +0 -2
- package/dist/{transactionContext-DrcNyjpv.mjs → transactionContext-8qKON0Nk.mjs} +2 -3
- package/dist/{typeGuards-CEl10KPy.mjs → typeGuards-DVjVSsXO.mjs} +2 -3
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.d.mts +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-ByHn9rEO.d.mts → types-0Dqlbgn8.d.mts} +0 -2
- package/dist/{types-BJ-2XqVF.d.mts → types-BeEJm-DV.d.mts} +114 -14
- package/dist/{types-DVLddu2q.d.mts → types-C0YJAiL0.d.mts} +0 -2
- package/dist/{types-D9NWjpYc.mjs → types-DZHqOuJE.mjs} +5 -6
- package/dist/{types-D3Ixsh00.d.mts → types-DeLiuaNv.d.mts} +2 -4
- package/dist/{types-Ddl9OjmE.d.mts → types-DnkIALZ8.d.mts} +0 -4
- package/dist/usage/index.d.mts +2 -10
- package/dist/usage/index.mjs +8 -12
- package/dist/{userHelpers-BHig1kHq.mjs → userHelpers-_eGj6kf0.mjs} +2 -3
- package/dist/utils/index.d.mts +5 -39
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-BG5P7_Vb.mjs → utils-Dd6MWpye.mjs} +20 -30
- package/dist/{validate-D_mdOCir.mjs → validate-BaF5wd0x.mjs} +5 -7
- package/dist/{versioning-DBGHjPh7.mjs → versioning-DyV7mwtK.mjs} +4 -5
- package/dist/{versioning-Bqm_57Qt.d.mts → versioning-S18y2-0C.d.mts} +1 -15
- package/dist/{websocket-Cs4awVyD.d.mts → websocket-BGuc-WVZ.d.mts} +1 -15
- package/dist/{workScope-DPPfM4m6.mjs → workScope-CmCBUmPR.mjs} +3 -4
- package/llms.txt +37 -30
- package/package.json +51 -22
- package/skills/arc/SKILL.md +65 -844
- package/skills/arc/references/agent-auth.md +82 -193
- package/skills/arc/references/api-reference.md +41 -245
- package/skills/arc/references/auth-api-keys.md +99 -0
- package/skills/arc/references/auth-better-auth-overlay.md +87 -0
- package/skills/arc/references/auth-better-auth.md +78 -0
- package/skills/arc/references/auth-permissions.md +100 -0
- package/skills/arc/references/auth-strategies.md +122 -0
- package/skills/arc/references/boot.md +80 -0
- package/skills/arc/references/enterprise-auth.md +65 -81
- package/skills/arc/references/events-outbox.md +90 -0
- package/skills/arc/references/events.md +75 -440
- package/skills/arc/references/integrations-jobs.md +74 -0
- package/skills/arc/references/integrations-realtime.md +84 -0
- package/skills/arc/references/integrations-webhooks.md +71 -0
- package/skills/arc/references/integrations-workflows.md +47 -0
- package/skills/arc/references/mcp-auth.md +83 -0
- package/skills/arc/references/mcp-custom-tools.md +125 -0
- package/skills/arc/references/mcp-setup.md +115 -0
- package/skills/arc/references/mcp-testing.md +63 -0
- package/skills/arc/references/multi-tenancy.md +56 -230
- package/skills/arc/references/permissions-scope.md +81 -0
- package/skills/arc/references/production-api.md +119 -0
- package/skills/arc/references/production-audit.md +101 -0
- package/skills/arc/references/production-boot.md +91 -0
- package/skills/arc/references/production-caching.md +63 -0
- package/skills/arc/references/production-distributed.md +75 -0
- package/skills/arc/references/production-idempotency.md +83 -0
- package/skills/arc/references/production-observability.md +83 -0
- package/skills/arc/references/production-realtime.md +70 -0
- package/skills/arc/references/production-reliability.md +100 -0
- package/skills/arc/references/production-shutdown.md +43 -0
- package/skills/arc/references/querying.md +76 -0
- package/skills/arc/references/resources.md +97 -0
- package/skills/arc/references/schedules.md +79 -0
- package/skills/arc/references/scim.md +61 -208
- package/skills/arc/references/tenancy-scope-install.md +82 -0
- package/skills/arc/references/testing.md +101 -144
- package/skills/arc/references/usage-cleanup-capabilities.md +45 -0
- package/skills/arc/references/validation.md +91 -0
- package/skills/arc/references/writes-hooks-errors.md +80 -0
- package/skills/arc-code-review/SKILL.md +67 -114
- package/skills/arc-code-review/references/arc-cheatsheet.md +68 -167
- package/skills/arc-code-review/references/mongokit-repositories.md +104 -0
- package/skills/arc-code-review/references/recipe-events-cache-jobs.md +112 -0
- package/skills/arc-code-review/references/recipe-resource.md +100 -0
- package/skills/arc-code-review/references/recipe-schemas-fields.md +93 -0
- package/skills/arc-code-review/references/recipe-scope-permissions.md +82 -0
- package/skills/arc-code-review/references/scaffolding.md +61 -198
- package/skills/arc-code-review/references/severity.md +49 -102
- package/skills/arc-code-review/references/smells-auth-scope.md +80 -0
- package/skills/arc-code-review/references/smells-data-events.md +66 -0
- package/skills/arc-code-review/references/smells-imports-style.md +59 -0
- package/skills/arc-code-review/references/smells-platform.md +89 -0
- package/skills/arc-code-review/references/smells-routes-schemas.md +66 -0
- package/skills/arc-module-publishing/SKILL.md +82 -208
- package/skills/arc-module-publishing/references/action-presets-and-plugins.md +87 -0
- package/skills/arc-module-publishing/references/build-and-types.md +73 -0
- package/skills/arc-module-publishing/references/module-lifecycle.md +101 -0
- package/skills/arc-module-publishing/references/package-manifest.md +34 -122
- package/skills/arc-module-publishing/references/publishing-workflow.md +44 -140
- package/skills/arc-module-publishing/references/resource-assembly.md +102 -0
- package/skills/arc-module-publishing/references/testing-packages.md +82 -0
- package/skills/arc/references/auth.md +0 -729
- package/skills/arc/references/integrations.md +0 -452
- package/skills/arc/references/mcp.md +0 -691
- package/skills/arc/references/production.md +0 -835
- package/skills/arc-code-review/references/anti-patterns.md +0 -1008
- package/skills/arc-code-review/references/migration-recipes.md +0 -649
- package/skills/arc-code-review/references/mongokit-migration.md +0 -360
- package/skills/arc-module-publishing/references/authoring-modules.md +0 -327
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
import { i as RequestScope } from "./types-
|
|
3
|
-
import { l as PermissionCheck, t as AnyRecord } from "./base-
|
|
4
|
-
import { A as RequestWithExtras, Dt as RouteMcpConfig, F as ResourceDefinition, Hn as IRequestContext, I as CrudController, L as ResourceConfig, O as FastifyWithDecorators, St as ActionDefinition, Vn as IControllerResponse, X as RouteSchemaOptions, Z as ArcFieldRule, g as RequestContext, ot as AggregationConfig, v as CrudRouterOptions } from "./index-
|
|
5
|
-
import "./fastify-augmentation-
|
|
2
|
+
import { i as RequestScope } from "./types-DnkIALZ8.mjs";
|
|
3
|
+
import { l as PermissionCheck, t as AnyRecord } from "./base-HXNgPQww.mjs";
|
|
4
|
+
import { A as RequestWithExtras, Dt as RouteMcpConfig, F as ResourceDefinition, Hn as IRequestContext, I as CrudController, L as ResourceConfig, O as FastifyWithDecorators, St as ActionDefinition, Vn as IControllerResponse, X as RouteSchemaOptions, Z as ArcFieldRule, g as RequestContext, k as MiddlewareHandler, ot as AggregationConfig, v as CrudRouterOptions } from "./index-Cy2-QffW.mjs";
|
|
5
|
+
import "./fastify-augmentation-bzkWPt1f.mjs";
|
|
6
6
|
import { Filter } from "@classytic/repo-core/filter";
|
|
7
7
|
import { FastifyReply, FastifyRequest, RouteHandlerMethod } from "fastify";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { DataAdapter } from "@classytic/repo-core/adapter";
|
|
10
|
-
//#region src/constants.d.ts
|
|
11
10
|
/**
|
|
12
11
|
* Arc Framework Constants — Single Source of Truth
|
|
13
12
|
*
|
|
@@ -63,8 +62,6 @@ declare const MAX_FILTER_DEPTH: 10;
|
|
|
63
62
|
* merges `q.filter[*]` back into the top-level filter map.
|
|
64
63
|
*/
|
|
65
64
|
declare const RESERVED_QUERY_PARAMS: Readonly<Set<string>>;
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/core/aggregation/defineAggregation.d.ts
|
|
68
65
|
/**
|
|
69
66
|
* Declare a single resource aggregation. Exported configs flow into
|
|
70
67
|
* `defineResource({ aggregations: { ... } })` either as named keys or
|
|
@@ -84,8 +81,6 @@ declare const RESERVED_QUERY_PARAMS: Readonly<Set<string>>;
|
|
|
84
81
|
* ```
|
|
85
82
|
*/
|
|
86
83
|
declare function defineAggregation(config: AggregationConfig): AggregationConfig;
|
|
87
|
-
//#endregion
|
|
88
|
-
//#region src/core/createCrudRouter.d.ts
|
|
89
84
|
/**
|
|
90
85
|
* Create CRUD routes for a controller.
|
|
91
86
|
*
|
|
@@ -101,8 +96,6 @@ declare function createCrudRouter<TDoc = unknown>(fastify: FastifyWithDecorators
|
|
|
101
96
|
* registered outside the resource system.
|
|
102
97
|
*/
|
|
103
98
|
declare function createPermissionMiddleware(permission: PermissionCheck, resourceName: string, action: string): RouteHandlerMethod | null;
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/core/defineAction.d.ts
|
|
106
99
|
/**
|
|
107
100
|
* Config for `defineAction()`. `TSchema` is the literal Zod schema type
|
|
108
101
|
* captured from the call site; `TData` is its `z.infer` projection.
|
|
@@ -112,6 +105,8 @@ declare function createPermissionMiddleware(permission: PermissionCheck, resourc
|
|
|
112
105
|
interface DefineActionConfig<TSchema extends z.ZodTypeAny | undefined = undefined, TData = TSchema extends z.ZodTypeAny ? z.infer<TSchema> : Record<string, unknown>> {
|
|
113
106
|
/** Per-action body schema (Zod v4). Drives both AJV validation and the typed `data` param. */
|
|
114
107
|
schema?: TSchema;
|
|
108
|
+
/** Parse the body with `schema` before the handler runs (trim/defaults/refine). See `ActionDefinition.parse`. */
|
|
109
|
+
parse?: boolean;
|
|
115
110
|
/** Per-action permission gate. Falls back to resource-level if omitted. */
|
|
116
111
|
permissions?: PermissionCheck;
|
|
117
112
|
/** OpenAPI / MCP description. */
|
|
@@ -147,8 +142,6 @@ interface DefineActionConfig<TSchema extends z.ZodTypeAny | undefined = undefine
|
|
|
147
142
|
* The runtime shape is unchanged; only the type-level inference is new.
|
|
148
143
|
*/
|
|
149
144
|
declare function defineAction<TSchema extends z.ZodTypeAny | undefined = undefined>(config: DefineActionConfig<TSchema>): ActionDefinition;
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region src/core/defineResource/seams.d.ts
|
|
152
145
|
/**
|
|
153
146
|
* Structural adapter boundary — the `ControllerLike` pattern
|
|
154
147
|
* applied to adapters. `DataAdapter<T>` is invariant in `T`, so a
|
|
@@ -227,8 +220,6 @@ type SeamedResourceConfig<TDoc = AnyRecord> = {
|
|
|
227
220
|
* author ever writes one (mirrors mongokit's one-cast-at-the-boundary rule).
|
|
228
221
|
*/
|
|
229
222
|
declare function mergeResourceConfig<TDoc = AnyRecord>(base: SeamedResourceConfig<TDoc>, ...seams: ReadonlyArray<ResourceSeams<TDoc> | undefined>): ResourceConfig<TDoc>;
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/core/defineResourceVariants.d.ts
|
|
232
223
|
/**
|
|
233
224
|
* Required identity fields for each variant. The user MUST provide a unique
|
|
234
225
|
* `name` (registry collision prevention) and a unique `prefix` (route
|
|
@@ -270,8 +261,6 @@ type VariantsResult<TDoc, V extends VariantsMap<TDoc>> = { [K in keyof V]: Resou
|
|
|
270
261
|
* `ResourceDefinition` ready for `.toPlugin()` registration.
|
|
271
262
|
*/
|
|
272
263
|
declare function defineResourceVariants<TDoc extends object = AnyRecord, V extends VariantsMap<TDoc> = VariantsMap<TDoc>>(base: Omit<ResourceConfig<TDoc>, "name" | "prefix">, variants: V): VariantsResult<TDoc, V>;
|
|
273
|
-
//#endregion
|
|
274
|
-
//#region src/core/fastifyAdapter.d.ts
|
|
275
264
|
/**
|
|
276
265
|
* Project `FastifyRequest` into the `IRequestContext` controllers receive,
|
|
277
266
|
* lifting scope, context, and a server accessor onto a flat, typed surface.
|
|
@@ -305,8 +294,6 @@ declare function sendControllerResponse<T>(reply: FastifyReply, response: IContr
|
|
|
305
294
|
* ```
|
|
306
295
|
*/
|
|
307
296
|
declare function createFastifyHandler<T>(controllerMethod: (req: IRequestContext) => Promise<IControllerResponse<T>>): (req: FastifyRequest, reply: FastifyReply) => Promise<FastifyReply>;
|
|
308
|
-
//#endregion
|
|
309
|
-
//#region src/core/fieldRulePredicates.d.ts
|
|
310
297
|
/**
|
|
311
298
|
* True when the field is allowed to appear in client-readable surfaces
|
|
312
299
|
* (response payloads, `select=` whitelists, `_distinct` queries).
|
|
@@ -323,8 +310,6 @@ declare function isFieldReadable(rule: ArcFieldRule | undefined): boolean;
|
|
|
323
310
|
* so call-sites can early-out without creating empty allocations.
|
|
324
311
|
*/
|
|
325
312
|
declare function collectReadBlockedFields(schemaOptions: RouteSchemaOptions | undefined): Set<string> | null;
|
|
326
|
-
//#endregion
|
|
327
|
-
//#region src/core/repositoryFilter.d.ts
|
|
328
313
|
declare const NATIVE_FILTER_DIALECT: unique symbol;
|
|
329
314
|
type NativePolicyFilter<Dialect extends string = string> = AnyRecord & {
|
|
330
315
|
readonly [NATIVE_FILTER_DIALECT]: Dialect;
|
|
@@ -335,8 +320,66 @@ type NativePolicyFilter<Dialect extends string = string> = AnyRecord & {
|
|
|
335
320
|
* (for example MongoDB `$elemMatch`). Never apply it to client input.
|
|
336
321
|
*/
|
|
337
322
|
declare function nativePolicyFilter<const Dialect extends string>(dialect: Dialect, record: AnyRecord): NativePolicyFilter<Dialect>;
|
|
338
|
-
|
|
339
|
-
|
|
323
|
+
/** A zod schema (parsed by the preHandler) or plain JSON Schema (AJV only). */
|
|
324
|
+
type InputSchema = z.ZodType | Record<string, unknown>;
|
|
325
|
+
interface RouteInputSlots {
|
|
326
|
+
/** `RouteDefinition.schema` is an open record. */
|
|
327
|
+
[slot: string]: unknown;
|
|
328
|
+
body?: InputSchema | undefined;
|
|
329
|
+
querystring?: InputSchema | undefined;
|
|
330
|
+
params?: InputSchema | undefined;
|
|
331
|
+
/** Validated by AJV only; headers are not rewritten. */
|
|
332
|
+
headers?: InputSchema | undefined;
|
|
333
|
+
/** Serialization + docs. A `z.object` response strips fields it does not declare. */
|
|
334
|
+
response?: Record<number, InputSchema> | undefined;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Spread into a route entry: `{ method, path, permissions, ...routeInput({ body }), handler }`.
|
|
338
|
+
* `preHandler` is empty when no zod body/querystring/params slot is declared.
|
|
339
|
+
*/
|
|
340
|
+
declare function routeInput<const S extends RouteInputSlots>(slots: S): {
|
|
341
|
+
schema: S;
|
|
342
|
+
preHandler: RouteHandlerMethod[];
|
|
343
|
+
};
|
|
344
|
+
/** The request part {@link routeInput} already parsed with `schema`: typed from it, not parsed again. */
|
|
345
|
+
declare function parsed<S extends z.ZodType>(_schema: S, value: unknown): z.output<S>;
|
|
346
|
+
/**
|
|
347
|
+
* A body that must be empty. As an action `schema` (or route `body`) AJV rejects any stray field,
|
|
348
|
+
* and the reference states that the verb takes nothing else. Plain JSON Schema, so no zod needed.
|
|
349
|
+
*/
|
|
350
|
+
declare const noPayloadSchema: Readonly<Record<string, unknown>>;
|
|
351
|
+
/**
|
|
352
|
+
* Wire shape of a resource's own CRUD writes. Spread into `defineResource`:
|
|
353
|
+
* `customSchemas` is what AJV validates (and, for zod, converts input-direction: a `.default()`
|
|
354
|
+
* stays optional; `z.strictObject` refuses unknown keys); `openApiSchemas` makes the generated
|
|
355
|
+
* reference describe what the route accepts rather than the stored model.
|
|
356
|
+
*
|
|
357
|
+
* `parse: true` also adds a create/update middleware that replaces `request.body` with the zod
|
|
358
|
+
* OUTPUT (trim, defaults, refinements). It writes `middlewares.create` / `middlewares.update`, so
|
|
359
|
+
* merge your own: `middlewares: { create: [...mine, ...crud.middlewares.create] }`.
|
|
360
|
+
*/
|
|
361
|
+
declare function crudInput(input: {
|
|
362
|
+
create?: InputSchema;
|
|
363
|
+
update?: InputSchema;
|
|
364
|
+
parse?: boolean;
|
|
365
|
+
}): {
|
|
366
|
+
customSchemas: {
|
|
367
|
+
create?: {
|
|
368
|
+
body: InputSchema;
|
|
369
|
+
} | undefined;
|
|
370
|
+
update?: {
|
|
371
|
+
body: InputSchema;
|
|
372
|
+
} | undefined;
|
|
373
|
+
};
|
|
374
|
+
openApiSchemas: {
|
|
375
|
+
createBody?: InputSchema | undefined;
|
|
376
|
+
updateBody?: InputSchema | undefined;
|
|
377
|
+
};
|
|
378
|
+
middlewares: {
|
|
379
|
+
create?: MiddlewareHandler[];
|
|
380
|
+
update?: MiddlewareHandler[];
|
|
381
|
+
};
|
|
382
|
+
};
|
|
340
383
|
interface ConfigError {
|
|
341
384
|
field: string;
|
|
342
385
|
message: string;
|
|
@@ -367,5 +410,4 @@ declare function formatValidationErrors(resourceName: string, result: Validation
|
|
|
367
410
|
* Validate and throw if invalid
|
|
368
411
|
*/
|
|
369
412
|
declare function assertValidConfig(config: ResourceConfig, options?: ValidateOptions): void;
|
|
370
|
-
|
|
371
|
-
export { CrudOperation as A, HookOperation as B, mergeResourceConfig as C, createPermissionMiddleware as D, createCrudRouter as E, DEFAULT_TENANT_FIELD as F, MUTATION_OPERATIONS as G, MAX_FILTER_DEPTH as H, DEFAULT_UPDATE_METHOD as I, SYSTEM_FIELDS as J, MutationOperation as K, DEFAULT_VERSION_FIELD as L, DEFAULT_LIMIT as M, DEFAULT_MAX_LIMIT as N, defineAggregation as O, DEFAULT_SORT as P, HOOK_OPERATIONS as R, SeamedResourceConfig as S, defineAction as T, MAX_REGEX_LENGTH as U, HookPhase as V, MAX_SEARCH_LENGTH as W, VariantsMap as _, formatValidationErrors as a, AdapterLike as b, nativePolicyFilter as c, createFastifyHandler as d, createRequestContext as f, VariantOverride as g, sendControllerResponse as h, assertValidConfig as i, DEFAULT_ID_FIELD as j, CRUD_OPERATIONS as k, collectReadBlockedFields as l, getControllerScope as m, ValidateOptions as n, validateResourceConfig as o, getControllerContext as p, RESERVED_QUERY_PARAMS as q, ValidationResult as r, NativePolicyFilter as s, ConfigError as t, isFieldReadable as u, VariantsResult as v, DefineActionConfig as w, ResourceSeams as x, defineResourceVariants as y, HOOK_PHASES as z };
|
|
413
|
+
export { RESERVED_QUERY_PARAMS as $, DefineActionConfig as A, DEFAULT_SORT as B, VariantsMap as C, ResourceSeams as D, AdapterLike as E, CRUD_OPERATIONS as F, HOOK_PHASES as G, DEFAULT_UPDATE_METHOD as H, CrudOperation as I, MAX_FILTER_DEPTH as J, HookOperation as K, DEFAULT_ID_FIELD as L, createCrudRouter as M, createPermissionMiddleware as N, SeamedResourceConfig as O, defineAggregation as P, MutationOperation as Q, DEFAULT_LIMIT as R, VariantOverride as S, defineResourceVariants as T, DEFAULT_VERSION_FIELD as U, DEFAULT_TENANT_FIELD as V, HOOK_OPERATIONS as W, MAX_SEARCH_LENGTH as X, MAX_REGEX_LENGTH as Y, MUTATION_OPERATIONS as Z, createFastifyHandler as _, formatValidationErrors as a, getControllerScope as b, RouteInputSlots as c, parsed as d, SYSTEM_FIELDS as et, routeInput as f, isFieldReadable as g, collectReadBlockedFields as h, assertValidConfig as i, defineAction as j, mergeResourceConfig as k, crudInput as l, nativePolicyFilter as m, ValidateOptions as n, validateResourceConfig as o, NativePolicyFilter as p, HookPhase as q, ValidationResult as r, InputSchema as s, ConfigError as t, noPayloadSchema as u, createRequestContext as v, VariantsResult as w, sendControllerResponse as x, getControllerContext as y, DEFAULT_MAX_LIMIT as z };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
import { P as ArcHeaders, i as RequestScope } from "./types-
|
|
3
|
-
import { d as UserBase, l as PermissionCheck, t as AnyRecord } from "./base-
|
|
4
|
-
import { a as QueryCacheConfig } from "./QueryCache
|
|
5
|
-
import "./elevation-
|
|
6
|
-
import "./requirement-
|
|
7
|
-
import { n as FieldPermissionMap } from "./fields-
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
2
|
+
import { P as ArcHeaders, i as RequestScope } from "./types-DnkIALZ8.mjs";
|
|
3
|
+
import { d as UserBase, l as PermissionCheck, t as AnyRecord } from "./base-HXNgPQww.mjs";
|
|
4
|
+
import { a as QueryCacheConfig } from "./QueryCache-DdvrGG8Q.mjs";
|
|
5
|
+
import "./elevation-DPD0hcU-.mjs";
|
|
6
|
+
import "./requirement-CTRQjjQx.mjs";
|
|
7
|
+
import { n as FieldPermissionMap } from "./fields-JTkrtO-r.mjs";
|
|
8
|
+
import { s as ResourceHttpCacheConfig } from "./policy.types-DPqToKG1.mjs";
|
|
9
|
+
import { n as EncryptionDirective } from "./types-0Dqlbgn8.mjs";
|
|
10
|
+
import { n as DomainEvent } from "./EventTransport-CYEoCJGe.mjs";
|
|
10
11
|
import { Filter } from "@classytic/repo-core/filter";
|
|
11
12
|
import { AggDateBucket, AggMeasure, AggTopN, QueryOptions, TenantPurgeStrategy, TransactionHandle } from "@classytic/repo-core/repository";
|
|
12
13
|
import { KeysetPaginationResult, OffsetPaginationResult } from "@classytic/repo-core/pagination";
|
|
@@ -14,7 +15,6 @@ import { FastifyInstance, FastifyPluginAsync, FastifyReply, FastifyRequest, Rout
|
|
|
14
15
|
import { DataAdapter, RepositoryLike } from "@classytic/repo-core/adapter";
|
|
15
16
|
import { LookupSpec } from "@classytic/repo-core/lookup";
|
|
16
17
|
import { FieldRule, SchemaBuilderOptions } from "@classytic/repo-core/schema";
|
|
17
|
-
//#region src/types/handlers.d.ts
|
|
18
18
|
/**
|
|
19
19
|
* Minimal server accessor — exposes safe, read-only server decorators.
|
|
20
20
|
* Allows controller handlers to publish events, log, and audit
|
|
@@ -335,8 +335,6 @@ interface ControllerLike {
|
|
|
335
335
|
update?: unknown;
|
|
336
336
|
delete?: unknown;
|
|
337
337
|
}
|
|
338
|
-
//#endregion
|
|
339
|
-
//#region src/types/resource/writes.d.ts
|
|
340
338
|
/**
|
|
341
339
|
* What every write verb receives besides its data.
|
|
342
340
|
*
|
|
@@ -431,8 +429,6 @@ interface ResourceWrites<TDoc = AnyRecord> {
|
|
|
431
429
|
* check at its use sites — drift is a compile error, not a runtime surprise.
|
|
432
430
|
*/
|
|
433
431
|
type WriteVerbKey = "create" | "update" | "delete";
|
|
434
|
-
//#endregion
|
|
435
|
-
//#region src/core/BodySanitizer.d.ts
|
|
436
432
|
/**
|
|
437
433
|
* Policy for handling fields the caller lacks write permission for.
|
|
438
434
|
*
|
|
@@ -479,8 +475,6 @@ declare class BodySanitizer {
|
|
|
479
475
|
*/
|
|
480
476
|
sanitize(body: AnyRecord, _operation: "create" | "update", req?: IRequestContext, meta?: ArcInternalMetadata): AnyRecord;
|
|
481
477
|
}
|
|
482
|
-
//#endregion
|
|
483
|
-
//#region src/core/controllerTypes.d.ts
|
|
484
478
|
/**
|
|
485
479
|
* Union of every return shape repo-core's `MinimalRepo.getAll()` is
|
|
486
480
|
* contractually allowed to produce. See repo-core's `MinimalRepo.getAll`
|
|
@@ -663,8 +657,6 @@ interface ControllerConfigurableOptions {
|
|
|
663
657
|
* `ControllerConfigurableOptions`.
|
|
664
658
|
*/
|
|
665
659
|
interface BaseControllerOptions extends ControllerConstructionOptions, ControllerConfigurableOptions {}
|
|
666
|
-
//#endregion
|
|
667
|
-
//#region src/scope/projection.d.ts
|
|
668
660
|
/**
|
|
669
661
|
* Lightweight projection of `RequestScope` — just the fields tenant-aware
|
|
670
662
|
* hooks and controllers usually read. Full discriminated-union access is
|
|
@@ -683,8 +675,6 @@ interface RequestScopeProjection {
|
|
|
683
675
|
/** Host-defined project / branch / region / workspace dimensions. */
|
|
684
676
|
context?: Readonly<Record<string, string>>;
|
|
685
677
|
}
|
|
686
|
-
//#endregion
|
|
687
|
-
//#region src/hooks/HookSystem.d.ts
|
|
688
678
|
type HookPhase = "before" | "around" | "after";
|
|
689
679
|
type HookOperation = "create" | "update" | "delete" | "restore" | "read" | "list";
|
|
690
680
|
interface HookContext<T = AnyRecord> {
|
|
@@ -913,8 +903,6 @@ declare function beforeDelete<T = AnyRecord>(hooks: HookSystem, resource: string
|
|
|
913
903
|
* Create an after-delete hook registration for a given hook system
|
|
914
904
|
*/
|
|
915
905
|
declare function afterDelete<T = AnyRecord>(hooks: HookSystem, resource: string, handler: HookHandler<T>, priority?: number): () => void;
|
|
916
|
-
//#endregion
|
|
917
|
-
//#region src/core/AccessControl.d.ts
|
|
918
906
|
/** Denial reason codes returned by `fetchDetailed()`. */
|
|
919
907
|
type FetchDenialReason = "NOT_FOUND" | "POLICY_FILTERED" | "ORG_SCOPE_DENIED";
|
|
920
908
|
/** Result of a detailed fetch with access control. */
|
|
@@ -1041,8 +1029,6 @@ declare class AccessControl {
|
|
|
1041
1029
|
/** Extract typed Arc internal metadata from request */
|
|
1042
1030
|
private _meta;
|
|
1043
1031
|
}
|
|
1044
|
-
//#endregion
|
|
1045
|
-
//#region src/core/entityHelpers.d.ts
|
|
1046
1032
|
/**
|
|
1047
1033
|
* Read the resource's configured `idField` for the current request.
|
|
1048
1034
|
* Falls back to the framework default (`_id`) when the route hasn't
|
|
@@ -1085,8 +1071,6 @@ declare function getActionTarget<TDoc = Record<string, unknown>>(req: {
|
|
|
1085
1071
|
readonly actionTarget?: unknown;
|
|
1086
1072
|
};
|
|
1087
1073
|
}): TDoc | undefined;
|
|
1088
|
-
//#endregion
|
|
1089
|
-
//#region src/core/QueryResolver.d.ts
|
|
1090
1074
|
interface QueryResolverConfig {
|
|
1091
1075
|
/** Query parser instance (default: Arc built-in parser) */
|
|
1092
1076
|
queryParser?: QueryParserInterface;
|
|
@@ -1198,8 +1182,6 @@ declare class QueryResolver {
|
|
|
1198
1182
|
*/
|
|
1199
1183
|
private assertNoBlockedReadKeys;
|
|
1200
1184
|
}
|
|
1201
|
-
//#endregion
|
|
1202
|
-
//#region src/core/BaseCrudController.d.ts
|
|
1203
1185
|
/**
|
|
1204
1186
|
* Framework-agnostic CRUD controller implementing IController.
|
|
1205
1187
|
* Composes AccessControl, BodySanitizer, and QueryResolver.
|
|
@@ -1456,8 +1438,6 @@ declare class BaseCrudController<TDoc = AnyRecord, TRepository extends Repositor
|
|
|
1456
1438
|
soft?: boolean;
|
|
1457
1439
|
}>>;
|
|
1458
1440
|
}
|
|
1459
|
-
//#endregion
|
|
1460
|
-
//#region src/core/mixins/bulk.d.ts
|
|
1461
1441
|
/** Public surface contributed by BulkMixin. */
|
|
1462
1442
|
interface BulkExt {
|
|
1463
1443
|
bulkCreate(req: IRequestContext): Promise<IControllerResponse<object[]>>;
|
|
@@ -1470,31 +1450,23 @@ interface BulkExt {
|
|
|
1470
1450
|
}>>;
|
|
1471
1451
|
}
|
|
1472
1452
|
declare function BulkMixin<TBase extends MixinConstructor<BaseCrudController<object>>>(Base: TBase): TBase & MixinConstructor<BulkExt>;
|
|
1473
|
-
//#endregion
|
|
1474
|
-
//#region src/core/mixins/slug.d.ts
|
|
1475
1453
|
/** Public surface contributed by SlugMixin. */
|
|
1476
1454
|
interface SlugExt {
|
|
1477
1455
|
getBySlug(req: IRequestContext): Promise<IControllerResponse<object>>;
|
|
1478
1456
|
}
|
|
1479
1457
|
declare function SlugMixin<TBase extends MixinConstructor<BaseCrudController<object>>>(Base: TBase): TBase & MixinConstructor<SlugExt>;
|
|
1480
|
-
//#endregion
|
|
1481
|
-
//#region src/core/mixins/tree.d.ts
|
|
1482
1458
|
/** Public surface contributed by TreeMixin. */
|
|
1483
1459
|
interface TreeExt {
|
|
1484
1460
|
getTree(req: IRequestContext): Promise<IControllerResponse<object[]>>;
|
|
1485
1461
|
getChildren(req: IRequestContext): Promise<IControllerResponse<object[]>>;
|
|
1486
1462
|
}
|
|
1487
1463
|
declare function TreeMixin<TBase extends MixinConstructor<BaseCrudController<object>>>(Base: TBase): TBase & MixinConstructor<TreeExt>;
|
|
1488
|
-
//#endregion
|
|
1489
|
-
//#region src/core/mixins/softDelete.d.ts
|
|
1490
1464
|
/** Public surface contributed by SoftDeleteMixin. */
|
|
1491
1465
|
interface SoftDeleteExt {
|
|
1492
1466
|
getDeleted(req: IRequestContext): Promise<IControllerResponse<PaginationResult<object>>>;
|
|
1493
1467
|
restore(req: IRequestContext): Promise<IControllerResponse<object>>;
|
|
1494
1468
|
}
|
|
1495
1469
|
declare function SoftDeleteMixin<TBase extends MixinConstructor<BaseCrudController<object>>>(Base: TBase): TBase & MixinConstructor<SoftDeleteExt>;
|
|
1496
|
-
//#endregion
|
|
1497
|
-
//#region src/core/BaseController.d.ts
|
|
1498
1470
|
/**
|
|
1499
1471
|
* Fully-composed controller shape: all CRUD methods + every preset method
|
|
1500
1472
|
* (SoftDelete / Tree / Slug / Bulk) typed over the caller-supplied `TDoc`.
|
|
@@ -1543,8 +1515,6 @@ declare const BaseController_base: {
|
|
|
1543
1515
|
declare class BaseController<TDoc extends object = AnyRecord, _TRepository extends RepositoryLike = RepositoryLike<TDoc>> extends BaseController_base {
|
|
1544
1516
|
readonly _phantom?: [TDoc, _TRepository];
|
|
1545
1517
|
}
|
|
1546
|
-
//#endregion
|
|
1547
|
-
//#region src/types/auth.d.ts
|
|
1548
1518
|
/**
|
|
1549
1519
|
* JWT utilities provided to authenticator. Arc provides the helpers;
|
|
1550
1520
|
* apps use them as needed.
|
|
@@ -1721,8 +1691,6 @@ interface AuthPluginOptions {
|
|
|
1721
1691
|
*/
|
|
1722
1692
|
strictTokenType?: boolean;
|
|
1723
1693
|
}
|
|
1724
|
-
//#endregion
|
|
1725
|
-
//#region src/core/middlewares/rateLimit.d.ts
|
|
1726
1694
|
/**
|
|
1727
1695
|
* Per-route CORS override, read by `@fastify/cors` off `routeOptions.config.cors`.
|
|
1728
1696
|
*
|
|
@@ -1737,8 +1705,6 @@ interface AuthPluginOptions {
|
|
|
1737
1705
|
* option surface.
|
|
1738
1706
|
*/
|
|
1739
1707
|
type RouteCorsConfig = Record<string, unknown> | false;
|
|
1740
|
-
//#endregion
|
|
1741
|
-
//#region src/types/resource/rate-limit.d.ts
|
|
1742
1708
|
/**
|
|
1743
1709
|
* Resource-level rate-limit shape — shared by `ResourceConfig.rateLimit`
|
|
1744
1710
|
* and per-route `RouteDefinition.rateLimit` overrides.
|
|
@@ -1749,8 +1715,6 @@ interface RateLimitConfig {
|
|
|
1749
1715
|
/** Time window for rate limiting (e.g., '1 minute', '15 seconds') */
|
|
1750
1716
|
timeWindow: string;
|
|
1751
1717
|
}
|
|
1752
|
-
//#endregion
|
|
1753
|
-
//#region src/types/resource/routes.d.ts
|
|
1754
1718
|
/** HTTP methods for custom routes. */
|
|
1755
1719
|
type RouteMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1756
1720
|
/** MCP tool configuration for a route or action. */
|
|
@@ -2058,8 +2022,6 @@ interface RouteDefinition {
|
|
|
2058
2022
|
isError?: boolean;
|
|
2059
2023
|
}>;
|
|
2060
2024
|
}
|
|
2061
|
-
//#endregion
|
|
2062
|
-
//#region src/types/resource/actions.d.ts
|
|
2063
2025
|
/**
|
|
2064
2026
|
* Action handler function for state transitions. Receives the resource
|
|
2065
2027
|
* ID, action-specific data, and the request.
|
|
@@ -2087,6 +2049,12 @@ interface ActionDefinition {
|
|
|
2087
2049
|
* Runtime feature-detects via `convertRouteSchema` / `toJsonSchema`.
|
|
2088
2050
|
*/
|
|
2089
2051
|
readonly schema?: unknown;
|
|
2052
|
+
/**
|
|
2053
|
+
* With a Zod `schema`: parse the body with it before the handler runs, so `data` is the schema's
|
|
2054
|
+
* OUTPUT (trimmed, defaulted, refined). A failure is a 400 `arc.validation_error`. Default
|
|
2055
|
+
* `false`: `data` is what AJV accepted. Ignored for a plain JSON Schema.
|
|
2056
|
+
*/
|
|
2057
|
+
readonly parse?: boolean;
|
|
2090
2058
|
/** Description for OpenAPI docs and MCP tool */
|
|
2091
2059
|
readonly description?: string;
|
|
2092
2060
|
/**
|
|
@@ -2142,8 +2110,6 @@ interface ActionDefinition {
|
|
|
2142
2110
|
type ActionEntry = ActionHandlerFn | ActionDefinition;
|
|
2143
2111
|
/** Actions configuration map. */
|
|
2144
2112
|
type ActionsMap = Record<string, ActionEntry>;
|
|
2145
|
-
//#endregion
|
|
2146
|
-
//#region src/types/resource/cache.d.ts
|
|
2147
2113
|
/**
|
|
2148
2114
|
* Per-resource QueryCache configuration — stale-while-revalidate
|
|
2149
2115
|
* windows, per-operation overrides, and tag-based cross-resource
|
|
@@ -2178,8 +2144,6 @@ interface ResourceCacheConfig {
|
|
|
2178
2144
|
/** Disable caching for this resource */
|
|
2179
2145
|
disabled?: boolean;
|
|
2180
2146
|
}
|
|
2181
|
-
//#endregion
|
|
2182
|
-
//#region src/pipeline/types.d.ts
|
|
2183
2147
|
/**
|
|
2184
2148
|
* Pipeline context passed to guards, transforms, and interceptors.
|
|
2185
2149
|
* Extends IRequestContext with pipeline-specific metadata.
|
|
@@ -2240,8 +2204,6 @@ type PipelineConfig = PipelineStep[] | {
|
|
|
2240
2204
|
delete?: PipelineStep[];
|
|
2241
2205
|
[operation: string]: PipelineStep[] | undefined;
|
|
2242
2206
|
};
|
|
2243
|
-
//#endregion
|
|
2244
|
-
//#region src/core/aggregation/types.d.ts
|
|
2245
2207
|
/**
|
|
2246
2208
|
* Sugar for measures: `'count'` / `'count:field'` / `'sum:price'` /
|
|
2247
2209
|
* `'avg:rating'` / `'min:created'` / `'max:updated'` /
|
|
@@ -2548,8 +2510,6 @@ interface AggregationConfig {
|
|
|
2548
2510
|
}
|
|
2549
2511
|
/** Map of name → declaration. Keys become URL segments under `/aggregations/<name>`. */
|
|
2550
2512
|
type AggregationsMap = Record<string, AggregationConfig>;
|
|
2551
|
-
//#endregion
|
|
2552
|
-
//#region src/types/resource/events.d.ts
|
|
2553
2513
|
/**
|
|
2554
2514
|
* Domain-event declaration on a resource — name, optional handler, and
|
|
2555
2515
|
* payload schema for the `events:` block of a resource definition.
|
|
@@ -2566,8 +2526,6 @@ interface EventDefinition {
|
|
|
2566
2526
|
schema?: unknown;
|
|
2567
2527
|
description?: string;
|
|
2568
2528
|
}
|
|
2569
|
-
//#endregion
|
|
2570
|
-
//#region src/types/resource/extensions.d.ts
|
|
2571
2529
|
/**
|
|
2572
2530
|
* `ResourceExtensions` — the typed plugin-extension namespace plugins
|
|
2573
2531
|
* augment via declaration merging (`declare module "@classytic/arc/types"`).
|
|
@@ -2631,8 +2589,6 @@ interface ResourceExtensions {
|
|
|
2631
2589
|
*/
|
|
2632
2590
|
encryption?: EncryptionDirective;
|
|
2633
2591
|
}
|
|
2634
|
-
//#endregion
|
|
2635
|
-
//#region src/types/resource/hooks.d.ts
|
|
2636
2592
|
/**
|
|
2637
2593
|
* Hook context passed to resource-level hook handlers. Mirrors
|
|
2638
2594
|
* HookSystem's HookContext but with a simpler API for inline use.
|
|
@@ -2710,8 +2666,6 @@ interface ResourceHooks {
|
|
|
2710
2666
|
beforeDelete?: (ctx: ResourceHookContext) => Promise<void> | void;
|
|
2711
2667
|
afterDelete?: (ctx: ResourceHookContext) => Promise<void> | void;
|
|
2712
2668
|
}
|
|
2713
|
-
//#endregion
|
|
2714
|
-
//#region src/types/resource/fields.d.ts
|
|
2715
2669
|
/**
|
|
2716
2670
|
* Per-field rule — arc's extension of repo-core's 4-field `FieldRule` floor
|
|
2717
2671
|
* (`immutable`, `immutableAfterCreate`, `systemManaged`, `optional`) with
|
|
@@ -2806,8 +2760,6 @@ interface FieldRule$1 {
|
|
|
2806
2760
|
readonly?: boolean;
|
|
2807
2761
|
hidden?: boolean;
|
|
2808
2762
|
}
|
|
2809
|
-
//#endregion
|
|
2810
|
-
//#region src/types/resource/schemas.d.ts
|
|
2811
2763
|
/**
|
|
2812
2764
|
* One client-requestable join. The base collection's tenant filter never reaches a joined
|
|
2813
2765
|
* collection, so its scope is REQUIRED and is always the server's — a client `where` is discarded.
|
|
@@ -2982,8 +2934,6 @@ interface MiddlewareConfig {
|
|
|
2982
2934
|
delete?: MiddlewareHandler[];
|
|
2983
2935
|
[key: string]: MiddlewareHandler[] | undefined;
|
|
2984
2936
|
}
|
|
2985
|
-
//#endregion
|
|
2986
|
-
//#region src/types/resource/presets.d.ts
|
|
2987
2937
|
interface PresetHook {
|
|
2988
2938
|
operation: "create" | "update" | "delete" | "read" | "list";
|
|
2989
2939
|
phase: "before" | "after";
|
|
@@ -3010,8 +2960,6 @@ interface PresetResult {
|
|
|
3010
2960
|
hooks?: PresetHook[];
|
|
3011
2961
|
}
|
|
3012
2962
|
type PresetFunction = (config: ResourceConfig) => PresetResult;
|
|
3013
|
-
//#endregion
|
|
3014
|
-
//#region src/types/resource/tenant.d.ts
|
|
3015
2963
|
/**
|
|
3016
2964
|
* Tenant-cleanup declaration on a resource — compliance-grade strategy
|
|
3017
2965
|
* for what happens to this resource's rows when the owning organization
|
|
@@ -3068,8 +3016,6 @@ interface ResolvedTenantPurge {
|
|
|
3068
3016
|
*/
|
|
3069
3017
|
readonly source: "declared" | "disabled";
|
|
3070
3018
|
}
|
|
3071
|
-
//#endregion
|
|
3072
|
-
//#region src/types/resource/config.d.ts
|
|
3073
3019
|
/**
|
|
3074
3020
|
* Built-in write routes whose retry must not execute twice: each listed op answers a
|
|
3075
3021
|
* keyless call with 400 `arc.idempotency_key_required` and dedupes a keyed one. Needs
|
|
@@ -3425,6 +3371,12 @@ interface ResourceConfig<TDoc = AnyRecord> {
|
|
|
3425
3371
|
* `ARC_STRICT_PERMISSIONS=true` env — the recommended production posture.
|
|
3426
3372
|
*/
|
|
3427
3373
|
strictPermissions?: boolean;
|
|
3374
|
+
/**
|
|
3375
|
+
* A `{ body: X }` wrapper where arc expects the schema itself (an action's `schema`, a route's
|
|
3376
|
+
* `body` slot) is read as an empty schema, so the endpoint accepts anything. Default: warn at
|
|
3377
|
+
* registration. `true` (or `ARC_STRICT_SCHEMAS=true`) fails `defineResource()` instead.
|
|
3378
|
+
*/
|
|
3379
|
+
strictSchemas?: boolean;
|
|
3428
3380
|
/**
|
|
3429
3381
|
* Default `limit` value when the request omits `?limit=`. Default 20.
|
|
3430
3382
|
* Surfaced at the resource level (rather than only via a custom
|
|
@@ -3538,6 +3490,11 @@ interface ResourceConfig<TDoc = AnyRecord> {
|
|
|
3538
3490
|
rateLimit?: RateLimitConfig | false;
|
|
3539
3491
|
/** Idempotency-key fence for the built-in write routes. See `ResourceIdempotencyConfig`. */
|
|
3540
3492
|
idempotency?: ResourceIdempotencyConfig;
|
|
3493
|
+
/**
|
|
3494
|
+
* HTTP caching for the built-in `list` / `get` routes: tags `<name>` and `<name>:<id>` are derived, and
|
|
3495
|
+
* the resource's CRUD events purge them. Requires `httpCachePlugin` (`@classytic/arc/http-cache`).
|
|
3496
|
+
*/
|
|
3497
|
+
httpCache?: ResourceHttpCacheConfig;
|
|
3541
3498
|
/**
|
|
3542
3499
|
* QueryCache configuration for this resource. Enables
|
|
3543
3500
|
* stale-while-revalidate and auto-invalidation. Requires
|
|
@@ -3610,8 +3567,6 @@ interface ResourceConfig<TDoc = AnyRecord> {
|
|
|
3610
3567
|
*/
|
|
3611
3568
|
extensions?: ResourceExtensions;
|
|
3612
3569
|
}
|
|
3613
|
-
//#endregion
|
|
3614
|
-
//#region src/core/defineResource/diagnostics.d.ts
|
|
3615
3570
|
/**
|
|
3616
3571
|
* Boot-time diagnostics produced by the `defineResource()` validation pipeline.
|
|
3617
3572
|
*
|
|
@@ -3646,8 +3601,6 @@ interface ResourceDiagnostic {
|
|
|
3646
3601
|
code: string;
|
|
3647
3602
|
message: string;
|
|
3648
3603
|
}
|
|
3649
|
-
//#endregion
|
|
3650
|
-
//#region src/core/defineResource/ResourceDefinition.d.ts
|
|
3651
3604
|
/**
|
|
3652
3605
|
* Constructor input shape — `ResourceConfig` plus the metadata
|
|
3653
3606
|
* Phases 3-6 stamp on it. Defined locally because the class
|
|
@@ -3690,6 +3643,7 @@ declare class ResourceDefinition<TDoc = AnyRecord> {
|
|
|
3690
3643
|
readonly events: Record<string, EventDefinition>;
|
|
3691
3644
|
readonly rateLimit?: RateLimitConfig | false;
|
|
3692
3645
|
readonly idempotency?: ResourceIdempotencyConfig;
|
|
3646
|
+
readonly httpCache?: ResourceHttpCacheConfig;
|
|
3693
3647
|
readonly lookupFields?: readonly string[];
|
|
3694
3648
|
readonly audit?: boolean | {
|
|
3695
3649
|
operations?: ("create" | "update" | "delete")[];
|
|
@@ -3829,8 +3783,6 @@ declare class ResourceDefinition<TDoc = AnyRecord> {
|
|
|
3829
3783
|
/** Resource metadata — shape consumed by registry / introspection. */
|
|
3830
3784
|
getMetadata(): ResourceMetadata;
|
|
3831
3785
|
}
|
|
3832
|
-
//#endregion
|
|
3833
|
-
//#region src/core/defineResource.d.ts
|
|
3834
3786
|
/**
|
|
3835
3787
|
* `TDoc` is **unconstrained** at this layer. The previous `TDoc
|
|
3836
3788
|
* extends object` bound leaked out of `BaseController`'s
|
|
@@ -3868,8 +3820,6 @@ declare function defineResource<TDoc, TActions extends ActionsMap>(config: Resou
|
|
|
3868
3820
|
* back-compat breakage for hosts that never touched actions.
|
|
3869
3821
|
*/
|
|
3870
3822
|
declare function defineResource<TDoc = AnyRecord>(config: ResourceConfig<TDoc>): ResourceDefinition<TDoc>;
|
|
3871
|
-
//#endregion
|
|
3872
|
-
//#region src/registry/ResourceRegistry.d.ts
|
|
3873
3823
|
interface RegisterOptions {
|
|
3874
3824
|
module?: string;
|
|
3875
3825
|
/** Pre-generated OpenAPI schemas */
|
|
@@ -4009,8 +3959,6 @@ declare class ResourceRegistry {
|
|
|
4009
3959
|
*/
|
|
4010
3960
|
private _groupBy;
|
|
4011
3961
|
}
|
|
4012
|
-
//#endregion
|
|
4013
|
-
//#region src/types/fastify.d.ts
|
|
4014
3962
|
interface FastifyRequestExtras {
|
|
4015
3963
|
user?: Record<string, unknown>;
|
|
4016
3964
|
}
|
|
@@ -4055,7 +4003,7 @@ interface RequestWithExtras extends FastifyRequest {
|
|
|
4055
4003
|
_ownershipCheck?: Record<string, unknown>;
|
|
4056
4004
|
}
|
|
4057
4005
|
type FastifyWithAuth = FastifyInstance & {
|
|
4058
|
-
authenticate: (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
4006
|
+
authenticate: (request: FastifyRequest, reply: FastifyReply) => Promise<void | FastifyReply>;
|
|
4059
4007
|
};
|
|
4060
4008
|
/**
|
|
4061
4009
|
* Arc core decorator — added by `arcCorePlugin`. Provides instance-scoped
|
|
@@ -4089,7 +4037,7 @@ interface EventsDecorator {
|
|
|
4089
4037
|
type FastifyWithDecorators = FastifyInstance & {
|
|
4090
4038
|
arc?: ArcDecorator;
|
|
4091
4039
|
events?: EventsDecorator;
|
|
4092
|
-
authenticate?: (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
4040
|
+
authenticate?: (request: FastifyRequest, reply: FastifyReply) => Promise<void | FastifyReply>;
|
|
4093
4041
|
optionalAuthenticate?: (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
|
|
4094
4042
|
/** Organization-scoped filtering — from `multiTenant` preset */
|
|
4095
4043
|
organizationScoped?: (options?: {
|
|
@@ -4111,8 +4059,6 @@ declare module "fastify" {
|
|
|
4111
4059
|
arcExtensions?: ResourceExtensions;
|
|
4112
4060
|
}
|
|
4113
4061
|
}
|
|
4114
|
-
//#endregion
|
|
4115
|
-
//#region src/types/plugins.d.ts
|
|
4116
4062
|
interface GracefulShutdownOptions {
|
|
4117
4063
|
timeout?: number;
|
|
4118
4064
|
onShutdown?: () => Promise<void> | void;
|
|
@@ -4181,6 +4127,8 @@ interface CrudRouterOptions {
|
|
|
4181
4127
|
rateLimit?: RateLimitConfig | false;
|
|
4182
4128
|
/** Idempotency-key fence for the built-in write routes. */
|
|
4183
4129
|
idempotency?: ResourceIdempotencyConfig;
|
|
4130
|
+
/** HTTP caching for the built-in list/get routes. */
|
|
4131
|
+
httpCache?: ResourceHttpCacheConfig;
|
|
4184
4132
|
/** PreHandler guards applied to every route (CRUD + custom + preset). */
|
|
4185
4133
|
routeGuards?: RouteHandlerMethod[];
|
|
4186
4134
|
/**
|
|
@@ -4198,8 +4146,6 @@ interface CrudRouterOptions {
|
|
|
4198
4146
|
*/
|
|
4199
4147
|
extensions?: ResourceExtensions;
|
|
4200
4148
|
}
|
|
4201
|
-
//#endregion
|
|
4202
|
-
//#region src/types/query.d.ts
|
|
4203
4149
|
/**
|
|
4204
4150
|
* Request-shaped context object passed to controller methods. Apps and
|
|
4205
4151
|
* adapters extend it freely via the index signature.
|
|
@@ -4403,8 +4349,6 @@ interface ServiceContext {
|
|
|
4403
4349
|
/** Return plain objects */
|
|
4404
4350
|
lean?: boolean;
|
|
4405
4351
|
}
|
|
4406
|
-
//#endregion
|
|
4407
|
-
//#region src/types/registry.d.ts
|
|
4408
4352
|
interface ResourceMetadata {
|
|
4409
4353
|
name: string;
|
|
4410
4354
|
displayName?: string;
|
|
@@ -4501,6 +4445,15 @@ interface RegistryEntry extends ResourceMetadata {
|
|
|
4501
4445
|
rateLimit?: RateLimitConfig | false;
|
|
4502
4446
|
/** Built-in write ops that require an idempotency key (`defineResource({ idempotency })`). */
|
|
4503
4447
|
idempotency?: ResourceIdempotencyConfig;
|
|
4448
|
+
/**
|
|
4449
|
+
* What the resource's query parser declares for the list route: allowed filter fields, operators
|
|
4450
|
+
* and sort fields. Published as `x-arc-query` on the list operation. Absent when it declares none.
|
|
4451
|
+
*/
|
|
4452
|
+
queryContract?: {
|
|
4453
|
+
filterFields?: readonly string[];
|
|
4454
|
+
operators?: readonly string[];
|
|
4455
|
+
sortFields?: readonly string[];
|
|
4456
|
+
};
|
|
4504
4457
|
/** Per-resource audit opt-in flag (read by `auditPlugin` perResource mode) */
|
|
4505
4458
|
audit?: boolean | {
|
|
4506
4459
|
operations?: ("create" | "update" | "delete")[];
|
|
@@ -4609,8 +4562,6 @@ interface IntrospectionData {
|
|
|
4609
4562
|
stats: RegistryStats;
|
|
4610
4563
|
generatedAt?: string;
|
|
4611
4564
|
}
|
|
4612
|
-
//#endregion
|
|
4613
|
-
//#region src/types/repository.d.ts
|
|
4614
4565
|
/**
|
|
4615
4566
|
* Discriminated union of pagination result shapes. Narrow on `method`.
|
|
4616
4567
|
*
|
|
@@ -4630,8 +4581,6 @@ interface IntrospectionData {
|
|
|
4630
4581
|
* ```
|
|
4631
4582
|
*/
|
|
4632
4583
|
type PaginationResult<TDoc, TExtra extends Record<string, unknown> = Record<string, never>> = OffsetPaginationResult<TDoc, TExtra> | KeysetPaginationResult<TDoc, TExtra>;
|
|
4633
|
-
//#endregion
|
|
4634
|
-
//#region src/types/utility.d.ts
|
|
4635
4584
|
/**
|
|
4636
4585
|
* Infer document type from a `DataAdapter` or `ResourceConfig`. Smart
|
|
4637
4586
|
* inference that works with multiple sources.
|
|
@@ -4655,5 +4604,4 @@ type InferDocType<T> = T extends DataAdapter<infer D> ? D : T extends ResourceCo
|
|
|
4655
4604
|
*/
|
|
4656
4605
|
type InferAdapterDoc<A> = A extends DataAdapter<infer D> ? D : unknown;
|
|
4657
4606
|
type InferResourceDoc<T> = T extends ResourceConfig<infer D> ? D : never;
|
|
4658
|
-
//#endregion
|
|
4659
4607
|
export { ResourceHookContext as $, AccessControl as $t, RequestWithExtras as A, MixinConstructor as An, AuthHelpers as At, OnTenantDeleteConfig as B, IController as Bn, TreeMixin as Bt, RequestIdOptions as C, ArcGetResult as Cn, ActionEntry as Ct, FastifyWithAuth as D, ControllerConfigurableOptions as Dn, RouteMcpConfig as Dt, FastifyRequestExtras as E, BaseControllerOptions as En, RouteDefinition as Et, ResourceDefinition as F, WriteContext as Fn, TokenPair as Ft, CrudRouteKey as G, ServerAccessor as Gn, BaseCrudController as Gt, PresetFunction as H, IRequestContext as Hn, SlugMixin as Ht, CrudController as I, WriteVerbKey as In, BaseController as It, MiddlewareConfig as J, ActionTargetCheck as Jt, CrudSchemas as K, QueryResolver as Kt, ResourceConfig as L, ControllerHandler as Ln, SoftDeleteExt as Lt, ResourceRegistry as M, BodySanitizerConfig as Mn, Authenticator as Mt, RouteRow as N, MutationWriteContext as Nn, AuthenticatorContext as Nt, FastifyWithDecorators as O, ControllerConstructionOptions as On, RouteMethod as Ot, defineResource as P, ResourceWrites as Pn, JwtContext as Pt, FieldRule$1 as Q, getEntityQuery as Qt, ResourceIdempotencyConfig as R, ControllerLike as Rn, SoftDeleteMixin as Rt, IntrospectionPluginOptions as S, ArcDeleteResult as Sn, ActionDefinition as St, EventsDecorator as T, ArcUpdateResult as Tn, ActionsMap as Tt, PresetHook as U, RawRouteHandler as Un, BulkExt as Ut, ResolvedTenantPurge as V, IControllerResponse as Vn, SlugExt as Vt, PresetResult as W, RouteHandler as Wn, BulkMixin as Wt, RouteSchemaOptions as X, getEntityId as Xt, OpenApiSchemas as Y, getActionTarget as Yt, ArcFieldRule as Z, getEntityIdField as Zt, ServiceContext as _, beforeDelete as _n, PipelineConfig as _t, IntrospectionData as a, DefineHookOptions as an, AggregationCacheConfig as at, HealthCheck as b, defineHook as bn, Transform as bt, ResourceMetadata as c, HookOperation as cn, AggregationIndexHint as ct, LookupOption as d, HookSystem as dn, AggregationRateLimit as dt, AccessControlConfig as en, ResourceHooks as et, OwnershipCheck as f, HookSystemOptions as fn, AggregationsMap as ft, RequestContext as g, beforeCreate as gn, OperationFilter as gt, QueryParserInterface as h, afterUpdate as hn, NextFunction as ht, PaginationResult as i, AroundHookHandler as in, AggMeasureShorthand as it, RegisterOptions as j, BodySanitizer as jn, AuthPluginOptions as jt, MiddlewareHandler as k, ListResult as kn, RateLimitConfig as kt, ArcInternalMetadata as l, HookPhase as ln, AggregationMaterializedContext as lt, PopulateOption as m, afterDelete as mn, Interceptor as mt, InferDocType as n, FetchDenialReason as nn, EventDefinition as nt, RegistryEntry as o, HookContext as on, AggregationConfig as ot, ParsedQuery as p, afterCreate as pn, Guard as pt, LookupPolicy as q, QueryResolverConfig as qt, InferResourceDoc as r, FetchResult as rn, AggMeasureInput as rt, RegistryStats as s, HookHandler as sn, AggregationDateRangeRequirement as st, InferAdapterDoc as t, AccessControlRepository as tn, ResourceExtensions as tt, ControllerQueryOptions as u, HookRegistration as un, AggregationMaterializedResult as ut, CrudRouterOptions as v, beforeUpdate as vn, PipelineContext as vt, ArcDecorator as w, ArcListResult as wn, ActionHandlerFn as wt, HealthOptions as x, ArcCreateResult as xn, ResourceCacheConfig as xt, GracefulShutdownOptions as y, createHookSystem as yn, PipelineStep as yt, ResourcePermissions as z, FastifyHandler as zn, TreeExt as zt };
|