Skip to content

Commit be9008c

Browse files
committed
merge main conflicts
2 parents e251c67 + ca4496e commit be9008c

21 files changed

+2334
-31
lines changed

cloudformation/iam.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ Resources:
7272
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-stripe-links
7373
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-membership-provisioning
7474
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-membership-external
75+
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests
76+
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests-status
77+
# Index accesses
78+
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-stripe-links/index/*
79+
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-events/index/*
80+
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-merchstore-purchase-history/index/*
81+
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests/index/*
82+
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests-status/index/*
7583

7684
- Sid: DynamoDBCacheAccess
7785
Effect: Allow
@@ -94,15 +102,6 @@ Resources:
94102
Resource:
95103
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-rate-limiter
96104

97-
- Sid: DynamoDBIndexAccess
98-
Effect: Allow
99-
Action:
100-
- dynamodb:Query
101-
Resource:
102-
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-stripe-links/index/*
103-
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-events/index/*
104-
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-merchstore-purchase-history/index/*
105-
106105
- Sid: DynamoDBStreamAccess
107106
Effect: Allow
108107
Action:
@@ -211,6 +210,19 @@ Resources:
211210
ForAllValues:StringLike:
212211
ses:Recipients:
213212
- "*@illinois.edu"
213+
- PolicyName: ses-notifications
214+
PolicyDocument:
215+
Version: "2012-10-17"
216+
Statement:
217+
- Action:
218+
- ses:SendEmail
219+
- ses:SendRawEmail
220+
Effect: Allow
221+
Resource: "*"
222+
Condition:
223+
StringEquals:
224+
ses:FromAddress:
225+
Fn::Sub: "notifications@${SesEmailDomain}"
214226
- PolicyName: ses-sales
215227
PolicyDocument:
216228
Version: "2012-10-17"

cloudformation/main.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,70 @@ Resources:
307307
- AttributeName: netid_list
308308
KeyType: HASH
309309

310+
RoomRequestsTable:
311+
Type: "AWS::DynamoDB::Table"
312+
DeletionPolicy: "Retain"
313+
UpdateReplacePolicy: "Retain"
314+
Properties:
315+
BillingMode: "PAY_PER_REQUEST"
316+
TableName: infra-core-api-room-requests
317+
DeletionProtectionEnabled: true
318+
PointInTimeRecoverySpecification:
319+
PointInTimeRecoveryEnabled: !If [IsProd, true, false]
320+
AttributeDefinitions:
321+
- AttributeName: userId#requestId
322+
AttributeType: S
323+
- AttributeName: requestId
324+
AttributeType: S
325+
- AttributeName: semesterId
326+
AttributeType: S
327+
KeySchema:
328+
- AttributeName: semesterId
329+
KeyType: HASH
330+
- AttributeName: userId#requestId
331+
KeyType: RANGE
332+
GlobalSecondaryIndexes:
333+
- IndexName: RequestIdIndex
334+
KeySchema:
335+
- AttributeName: requestId
336+
KeyType: HASH
337+
Projection:
338+
ProjectionType: ALL
339+
340+
RoomRequestUpdatesTable:
341+
Type: "AWS::DynamoDB::Table"
342+
DeletionPolicy: "Retain"
343+
UpdateReplacePolicy: "Retain"
344+
Properties:
345+
BillingMode: "PAY_PER_REQUEST"
346+
TableName: infra-core-api-room-requests-status
347+
DeletionProtectionEnabled: true
348+
PointInTimeRecoverySpecification:
349+
PointInTimeRecoveryEnabled: !If [IsProd, true, false]
350+
AttributeDefinitions:
351+
- AttributeName: requestId
352+
AttributeType: S
353+
- AttributeName: semesterId
354+
AttributeType: S
355+
- AttributeName: createdAt#status
356+
AttributeType: S
357+
KeySchema:
358+
- AttributeName: requestId
359+
KeyType: HASH
360+
- AttributeName: createdAt#status
361+
KeyType: RANGE
362+
GlobalSecondaryIndexes:
363+
- IndexName: SemesterId
364+
KeySchema:
365+
- AttributeName: semesterId
366+
KeyType: HASH
367+
- AttributeName: requestId
368+
KeyType: RANGE
369+
Projection:
370+
ProjectionType: ALL
371+
372+
373+
310374
IamGroupRolesTable:
311375
Type: "AWS::DynamoDB::Table"
312376
DeletionPolicy: "Retain"

src/api/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import stripeRoutes from "./routes/stripe.js";
2727
import membershipPlugin from "./routes/membership.js";
2828
import path from "path"; // eslint-disable-line import/no-nodejs-modules
2929
import sigleadRoutes from "./routes/siglead.js";
30+
import roomRequestRoutes from "./routes/roomRequests.js";
3031

3132
dotenv.config();
3233

@@ -135,6 +136,7 @@ async function init(prettyPrint: boolean = false) {
135136
api.register(mobileWalletRoute, { prefix: "/mobileWallet" });
136137
api.register(stripeRoutes, { prefix: "/stripe" });
137138
api.register(sigleadRoutes, { prefix: "/siglead" });
139+
api.register(roomRequestRoutes, { prefix: "/roomRequests" });
138140
if (app.runEnvironment === "dev") {
139141
api.register(vendingPlugin, { prefix: "/vending" });
140142
}

0 commit comments

Comments
 (0)