File tree Expand file tree Collapse file tree
apps/sim/lib/api/contracts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { describe , expect , it } from 'vitest'
22import {
33 executeWorkflowBodySchema ,
4+ getWorkflowResponseDataSchema ,
45 updateWorkflowBodySchema ,
56 workflowListItemSchema ,
67} from '@/lib/api/contracts/workflows'
@@ -119,4 +120,11 @@ describe('workflow contracts', () => {
119120 } )
120121 expect ( item . forkSyncExcluded ) . toBe ( false )
121122 } )
123+
124+ it ( 'detail response preserves forkSyncExcluded and defaults old responses' , ( ) => {
125+ const forkPolicySchema = getWorkflowResponseDataSchema . pick ( { forkSyncExcluded : true } )
126+
127+ expect ( forkPolicySchema . parse ( { forkSyncExcluded : true } ) . forkSyncExcluded ) . toBe ( true )
128+ expect ( forkPolicySchema . parse ( { } ) . forkSyncExcluded ) . toBe ( false )
129+ } )
122130} )
Original file line number Diff line number Diff line change @@ -743,6 +743,7 @@ export const getWorkflowResponseDataSchema = z.object({
743743 deployedAt : z . coerce . date ( ) . nullable ( ) ,
744744 isPublicApi : z . boolean ( ) ,
745745 locked : z . boolean ( ) ,
746+ forkSyncExcluded : z . boolean ( ) . default ( false ) ,
746747 runCount : z . number ( ) ,
747748 lastRunAt : z . coerce . date ( ) . nullable ( ) ,
748749 archivedAt : z . coerce . date ( ) . nullable ( ) ,
You can’t perform that action at this time.
0 commit comments