File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ export { emailMembershipPassHandler } from "./emailMembershipPassHandler.js";
33export  {  provisionNewMemberHandler  }  from  "./provisionNewMember.js" ; 
44export  {  sendSaleEmailHandler  }  from  "./sendSaleEmailHandler.js" ; 
55export  {  emailNotificationsHandler  }  from  "./emailNotifications.js" ; 
6+ export  {  createOrgGithubTeamHandler  }  from  "./createOrgGithubTeam.js" ; 
Original file line number Diff line number Diff line change @@ -80,12 +80,22 @@ export const sqsPayloadSchemas = {
8080  ) 
8181}  as  const ; 
8282
83+ // Add this type helper 
84+ type  AllSchemas  =  { 
85+   [ K  in  AvailableSQSFunctions ] : ( typeof  sqsPayloadSchemas ) [ K ] ; 
86+ } ; 
87+ 
88+ // This will cause a TypeScript error if you're missing any schemas in the union 
89+ const  _exhaustivenessCheck : AllSchemas  =  sqsPayloadSchemas ; 
90+ 
8391export  const  sqsPayloadSchema  =  z . discriminatedUnion ( "function" ,  [ 
8492  sqsPayloadSchemas [ AvailableSQSFunctions . Ping ] , 
8593  sqsPayloadSchemas [ AvailableSQSFunctions . EmailMembershipPass ] , 
8694  sqsPayloadSchemas [ AvailableSQSFunctions . ProvisionNewMember ] , 
8795  sqsPayloadSchemas [ AvailableSQSFunctions . SendSaleEmail ] , 
88-   sqsPayloadSchemas [ AvailableSQSFunctions . EmailNotifications ] ]  as 
96+   sqsPayloadSchemas [ AvailableSQSFunctions . EmailNotifications ] , 
97+   sqsPayloadSchemas [ AvailableSQSFunctions . CreateOrgGithubTeam ] 
98+ ]  as 
8999  const ) ; 
90100
91101export  type  SQSPayload < T  extends  AvailableSQSFunctions >  =  z . infer < 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments