File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,39 @@ Resources:
339339          Projection :
340340            ProjectionType : ALL 
341341
342+   RoomRequestUpdatesTable :
343+     Type : " AWS::DynamoDB::Table" 
344+     DeletionPolicy : " Retain" 
345+     UpdateReplacePolicy : " Retain" 
346+     Properties :
347+       BillingMode : " PAY_PER_REQUEST" 
348+       TableName : infra-core-api-room-requests-status 
349+       DeletionProtectionEnabled : true 
350+       PointInTimeRecoverySpecification :
351+         PointInTimeRecoveryEnabled : !If [IsProd, true, false] 
352+       AttributeDefinitions :
353+         - AttributeName : requestId 
354+           AttributeType : S 
355+         - AttributeName : semesterId 
356+           AttributeType : S 
357+         - AttributeName : createdAt 
358+           AttributeType : S 
359+       KeySchema :
360+         - AttributeName : requestId 
361+           KeyType : HASH 
362+         - AttributeName : createdAt 
363+           KeyType : RANGE 
364+       GlobalSecondaryIndexes :
365+         - IndexName : SemesterId 
366+           KeySchema :
367+             - AttributeName : semesterId 
368+               KeyType : HASH 
369+             - AttributeName : requestId 
370+               KeyType : RANGE 
371+           Projection :
372+             ProjectionType : ALL 
373+ 
374+ 
342375
343376  IamGroupRolesTable :
344377    Type : " AWS::DynamoDB::Table" 
Original file line number Diff line number Diff line change @@ -57,6 +57,12 @@ export enum RoomRequestStatus {
5757  APPROVED  =  "approved" , 
5858  REJECTED_BY_UIUC  =  "rejected_by_uiuc" 
5959} 
60+ export  const  roomRequestStatusUpdate  =  z . object ( { 
61+   status : z . nativeEnum ( RoomRequestStatus ) , 
62+   createdAt : z . string ( ) . datetime ( ) , 
63+   createdBy : z . string ( ) . email ( ) , 
64+   notes : z . optional ( z . string ( ) . min ( 1 ) . max ( 1000 ) ) 
65+ } ) 
6066
6167export  const  roomRequestSchema  =  z . object ( { 
6268  host : z . enum ( OrganizationList ) , 
@@ -92,4 +98,13 @@ export const roomRequestPostResponse = z.object({
9298  status : z . literal ( RoomRequestStatus . CREATED ) , 
9399} ) 
94100
101+ export  const  roomRequestGetResponse  =  z . object ( { 
102+   data : roomRequestSchema , 
103+   statusUpdates : z . array ( roomRequestStatusUpdate ) , 
104+ } ) 
105+ 
95106export  type  RoomRequestPostResponse  =  z . infer < typeof  roomRequestPostResponse > ; 
107+ 
108+ export  type  RoomRequestStatusUpdate  =  z . infer < typeof  roomRequestStatusUpdate > ; 
109+ 
110+ export  type  RoomRequestGetResponse  =  z . infer < typeof  roomRequestGetResponse > ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments